При проверке пишет, что "Не найден метод "readAllBytes()" в переменной "in"."
Что-то не понял юмора - это от версии зависит? Валидатор оперирует иными версиями?
Мне все переделывать?
package com.javarush.task.task18.task1820;
/*
Округление чисел
*/
import java.io.*;
public class Solution {
public static void main(String[] args) {
String filename_1 = null;
String filename_2 = null;
String byte_to_string = null;
String[] arraySplit;
InputStream in = null;
OutputStream out = null;
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try {
filename_1 = reader.readLine();
filename_2 = reader.readLine();
in = new BufferedInputStream(new FileInputStream(filename_1));
out = new BufferedOutputStream((new FileOutputStream(filename_2)));
byte[] allByte = in.readAllBytes();
byte_to_string = new String(allByte);
arraySplit = byte_to_string.split(" ");
for (int i = 0; i < arraySplit.length; i++) {
String oneByte;
oneByte = String.valueOf(Math.round(Double.parseDouble(arraySplit[i])));
out.write(oneByte.getBytes());
out.write(" ".getBytes());
}
} catch (IOException e) {
e.printStackTrace();
}
try {
in.close();
out.close();
reader.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}