Что не так?
package com.javarush.task.task18.task1808;
import java.io.*;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader cRead = new BufferedReader(new InputStreamReader(System.in));
String file1 = cRead.readLine();
String file2 = cRead.readLine();
String file3 = cRead.readLine();
FileInputStream inputStream = null;
try {
inputStream = new FileInputStream(file1);
int size = inputStream.available();
if (size > 0) {
int halfSize = size / 2;
size -= halfSize;
byte[] second = new byte[halfSize];
byte[] first = new byte[size];
FileOutputStream out = new FileOutputStream(file2);
inputStream.read(first);
out.write(first);
out.close();
out = new FileOutputStream(file3);
inputStream.read(second);
out.write(second);
out.close();
}
}
catch (Exception e) {
}
finally {
inputStream.close();
cRead.close();
}
}
}