Ошибка в файле com/javarush/task/task18/task1825/Solution.java в строке 34
cannot find symbol
symbol: method readAllBytes()
location: class java.io.BufferedInputStream
package com.javarush.task.task18.task1825;
import java.io.*;
import java.nio.Buffer;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Set;
import java.util.TreeSet;
/*
Собираем файл
*/
public class Solution {
public static void main(String[] args) {
ArrayList<Stream> arrS = new ArrayList<>();
try {
BufferedOutputStream fileOut = new BufferedOutputStream(new FileOutputStream("C:\\My_folder\\JavaRushTasks\\2.JavaCore\\src\\com\\javarush\\task\\task18\\task1825\\files\\Lion.avi"));
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
while(true){
String s = reader.readLine();
if("end".equals(s)) break;
arrS.add(new Stream(s));
}
for(int x = 0;x<arrS.size();x++) {
for (Stream s : arrS) {
String str = s.name;
if (x == Integer.parseInt(str.substring(str.indexOf(".part") + 5, str.length()))) {
// System.out.println(fileOut + "--------" + s.getBuffStream() + "------method");
fileOut.write(s.getBuffStream().readAllBytes());
}
// int index = Integer.parseInt(str.substring(str.indexOf(".part") + 5, str.length()));
// System.out.println(index);
}
}
for(Stream s : arrS){
s.getBuffStream().close();
}
fileOut.close();
reader.close();
}catch (Exception e){
e.printStackTrace();
}
}
public static class Stream{
private String name;
private BufferedInputStream buffStream;
Stream(String name){
this.name = name;
}
public String getName(){
return this.name;
}
public BufferedInputStream getBuffStream()throws Exception{
buffStream = new BufferedInputStream(new FileInputStream(name));
//System.out.println(buffStream + "---------Object");
return buffStream;
}
}
}