while ( true ) {
connection = server.accept();
receivedData = new byte[1024];
//recibimos el nombre del fichero
file = dis.readUTF();
file = file.substring(file.indexOf('/')+1,file.length());
file = file.concat("_host");
while ((in = bis.read(receivedData)) != -1){
bos.write(receivedData,0,in);
}
bos.close();
dis.close();
break;
}
Prueba con esto y me dices.....
sino enviame el codigo completo el server y el cliente...
estoy atento.......