int counter = source.available();
for (int i = 0; i <= counter/2 ; i++) {
target1.write(source.read());
}
while (source.available() !=0){
target2.write(source.read());
}
source.close();
target1.close();
target2.close();
}onetwothree