@Override public CharSequence getEntityName( int id ) { return names.get( id ); }
public InputStream stream( final long n ) throws IOException { // Creates a Segmented Input Stream with only one segment in (the requested one). ensureDocumentIndex( n ); IOUtils.closeQuietly( lastStream ); final TRECDocumentDescriptor descr = descriptors.get( n ); return lastStream = new SegmentedInputStream( openFileStream( file[ descr.fileIndex ] ), descr.toSegments() ); }
public InputStream stream( final long n ) throws IOException { // Creates a Segmented Input Stream with only one segment in (the requested one). ensureDocumentIndex( n ); IOUtils.closeQuietly( lastStream ); final TRECDocumentDescriptor descr = descriptors.get( n ); return lastStream = new SegmentedInputStream( openFileStream( file[ descr.fileIndex ] ), descr.toSegments() ); }