question: private ByteBuffer read ( FileChannel channel , int size , long offset ) { ByteBuffer byteBffer = ByteBuffer . allocate ( size ) ; try { channel . position ( offset ) ; channel . read ( byteBffer ) ; } catch ( Exception e ) { LOGGER . error ( e , e . getMessage ( ) ) ; } byteBffer . rewind ( ) ; return byteBffer ; }
target:  This method will be used to read from file based on number of bytes to be read and positon