@@ -0,0 +1,1009 @@
+package com.javarush.task.task22.task2211;%0A%0Aimport java.io.FileInputStream;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0A%0A/* %0A%D0%A1%D0%BC%D0%B5%D0%BD%D0%B0 %D0%BA%D0%BE%D0%B4%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B8%0A*/%0Apublic class Solution %7B%0A    static String win1251TestString = %22%D0%A0%D1%9C%D0%A0%C2%B0%D0%A1%D0%82%D0%A1%D1%93%D0%A1%E2%82%AC%D0%A0%C2%B5%D0%A0%D0%85%D0%A0%D1%91%D0%A0%C2%B5 %D0%A0%D1%94%D0%A0%D1%95%D0%A0%D2%91%D0%A0%D1%91%D0%A1%D0%82%D0%A0%D1%95%D0%A0%D0%86%D0%A0%D1%94%D0%A0%D1%91 %D0%A0%D1%94%D0%A0%D1%95%D0%A0%D0%85%D0%A1%D0%83%D0%A0%D1%95%D0%A0%C2%BB%D0%A0%D1%91?%22; //only for your testing%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        //%D0%A2%D0%B0%D0%BA %D0%B2%D0%B0%D0%BB%D0%B8%D0%B4%D0%B0%D1%82%D0%BE%D1%80 %D0%BD%D0%B5 %D0%BF%D1%80%D0%BD%D0%B8%D0%BC%D0%B0%D0%B5%D1%82:%0A        //byte%5B%5D buffer = Files.readAllBytes(Paths.get(args%5B0%5D));%0A        //Files.write(Paths.get(args%5B1%5D),new String(buffer, %22UTF-8%22).getBytes(%22Windows-1251%22));%0A%0A        //%D0%90 %D1%82%D0%B0%D0%BA %D0%BF%D1%80%D0%B8%D0%BD%D0%B8%D0%BC%D0%B0%D0%B5%D1%82%0A        FileInputStream fileInputStream = new FileInputStream(args%5B0%5D);%0A        FileOutputStream fileOutputStream = new FileOutputStream(args%5B1%5D);%0A%0A        byte%5B%5D buffer = new byte%5BfileInputStream.available()%5D;%0A        fileInputStream.read(buffer);%0A%0A        fileOutputStream.write(new String(buffer, %22UTF-8%22).getBytes(%22Windows-1251%22));%0A%0A        fileInputStream.close();%0A        fileOutputStream.close();%0A%0A%0A    %7D%0A%7D%0A

Task --> 2211