question: private int readLocal ( final ByteBuffer buffer , final long position ) throws IOException { final int requestLen = buffer . remaining ( ) ; final long eof = m_channel . size ( ) ; if ( eof < ( position + requestLen ) ) { if ( position == eof ) return - 1 ; final int len = ( int ) ( eof - position ) ; buffer . limit ( len ) ; FileChannelUtility . readAll ( m_reopener , buffer , position ) ; buffer . limit ( requestLen ) ; } else { FileChannelUtility . readAll ( m_reopener , buffer , position ) ; } return requestLen - buffer . remaining ( ) ; }
target:  Simulates the normal InputStream request, returning -1 if EOF and only asking for as much as can be read - do not try to read past EOF. In fact, we probably do not need to make these checks since the Object Streaming used only ever asks for what is expected.