question: private static void transferFrom ( FileChannel channel , InputStream in ) throws IOException { ReadableByteChannel readChannel = Channels . newChannel ( in ) ; if ( ! BROKEN_NIO ) { channel . transferFrom ( readChannel , 0 , MAX_EMPTYDB_SIZE ) ; } else { ByteBuffer bb = ByteBuffer . allocate ( 8096 ) ; while ( readChannel . read ( bb ) >= 0 ) { bb . flip ( ) ; channel . write ( bb ) ; bb . clear ( ) ; } } }
target:  Copies the given InputStream to the given channel using the most efficient means possible.