public void testEncoding(File f, OutputStreamWriter osw) { if(f.isFile()) { if (osw.getEncoding().equals("UTF8")) { System.out.println(f.getName() + " --> Encoding resounding success! current Encoding is: " + osw.getEncoding()); } else { System.out.println(f.getName() + " --> Encoding failure! current Encoding is:" + osw.getEncoding()); } }
} }
// ------------------------------------------------------------ // Main Method public class TestBatchEncoder { public static void main(String[] args) { BatchEncoder be = new BatchEncoder("D:\\BatchEncoder"); }