Если в первом файле нечетное количество байт, твоя программа во второй файл записывает меньшую часть байтов, а нужно наоборот.
package com.javarush.task.task18.task1808;
/*
Разделение файла
*/
import java.io.*;
public class Solution {
public static void main(String[] args) {
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
FileInputStream file1 = new FileInputStream(br.readLine());
FileOutputStream file2 = new FileOutputStream(br.readLine());
FileOutputStream file3 = new FileOutputStream(br.readLine())) {
if (file1.available() > 0) {
byte[] buffer = new byte[file1.available()];
int count = file1.read(buffer);
if (count % 2 == 0) {
file2.write(buffer, 0, count / 2);
file3.write(buffer, count / 2, count);
} else {
file2.write(buffer, 0, (count / 2) + 1);
file3.write(buffer, (count / 2) + 1, count);
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
len
bytes from the specified byte array starting at offsetoff
to this file output stream."