try{
int readData = System.in.read();
//read() : 키보드의 입력 값 중에 가장 처음 입력값에 대한 코드 값을 반환.
// 엔터가 눌러져야 다음 코드로 진행된다.
}catch(IOException ie){
}

FileInputStream fls = new FileInputStream( File객체 );
//File객체 : String 경로 + 파일명File file = new File("파일의 경로");boolean b = file.exists();boolean b = file.isFile();boolean b = file.isDirectory();boolean b = file.canRead();boolean b = file.canWrite();boolean b = file.isHidden();long l = file.length();String str = file.getAbsolutePath();String str = file.getCanonicalPath();boolean b = file.canExecute();String path = file.getParent();String path = file.getName();long l = file.lastModified();
//xxxx년 xx월 xx일 처럼 원하는 형식으로 표현하기 위해서는
//SimpleDateFormat을 활용한다.
//SimpleDateFormat sdf = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss");
//System.out.println(sdf.format(new Date(file.lastModified())));File file = new File("디렉토리명");mkdir() // 부모디렉토리가 존재하지 않으면 하위 디렉토리를 생성하지 않는다.
mkdirs() // 부모디렉토리가 존재하지 않으면, 부모디렉토리부터 생성한다.File file = new File("파일명");
file.delete();File file = new File("변경전 이름");File renameFile = new File("변경후 이름");이전이름.renameTo(새이름객체)
파일에 스트림을 연결
FileInputStream fis = new FileInputStream( File객체 )
파일에서 내용을 읽어 들인다. (읽어 들인 내용이 없다면 -1이 나온다.)
int readData = 0;
while((readData = fis.read())=-1){
//읽어들인 데이터를 사용
}
스트림 사용을 종료하면 연결을 끊는다.
fis.close();