Posted By:
Anonymous
Posted On:
Tuesday, September 3, 2002 02:30 AM
you know the size of the file so try this:
first set your socket receive Buffer Size:
socket.setReceiveBufferSize( 1500 );
byte[] read_bytes = new byte[1500];
FileOutputStream file_output = new FileOutputStream( String dest_filename, boolean append );
for( int i = 1 ; i <= file_size ; ){
i += socket.getInputStream().read( read_bytes ) ;
file_output.write( read_bytes ) ;
}
hope this will help