BufferedReader(new InputStraemReader(new FileInputStream("path"),"EUC-JP"));
PrintWriter(new OutputStreamWriter(new FileOutputStream("path","Shit-JIS")));
ファイルの一覧取得
File dir = new File("./");
File[] list = dir.listFiles(new FileFilter() {
@Override
public boolean accept(File pathname) {
return pathname.getName().matches(".*\\.txt$");
}
});
for(File f : list) {
System.out.println(f.getName());}
}
標準入力を読み込み
cat sample.csv | java Reader
Reader.java
BufferedReader br = new BufferedReader(new InputStreamReader(Sytetm.in)));