private long getRemainingBytes ( ) { if ( in != null ) { if ( ! useLoadBuf ) { return in . remaining ( ) ; } try { if ( channel . isOpen ( ) ) { return channelSize - channel . position ( ) + in . remaining ( ) ; } else { return in . remaining ( ) ; } } catch ( Exception e ) { log . error ( "Error getRemainingBytes" , e ) ; } } return 0 ; }
Get the remaining bytes that could be read from a file or ByteBuffer .