Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. public static void konvertuj(String in, String out) throws IOException {
  2.          
  3.         File frJm = new File(in);
  4.         File fwJm = new File(out);
  5.         if (frJm.exists() == true) {
  6.           FileReader fr = new FileReader(frJm);
  7.           BufferedWriter fw = new BufferedWriter(
  8.                                 new OutputStreamWriter(
  9.                                    new FileOutputStream(fwJm),
  10.                                 "UTF-8"));
  11.           int c;
  12.           //System.out.println(fr.getEncoding());
  13.           while ((c = fr.read()) != -1)
  14.               fw.write(c);
  15.  
  16.           fr.close();
  17.           fw.close();
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement