public class ByteFileBuffered extends Object implements ByteInSeekable
BitFileBuffered
This class uses a "file pool", so pay attention to close unused resourcesModifier and Type | Class and Description |
---|---|
static class |
ByteFileBuffered.BufferedFileByteIn |
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger |
Constructor and Description |
---|
ByteFileBuffered(String filename)
Constructs an instance of the class for a given filename.
|
ByteFileBuffered(String filename,
int bufSize)
Constructs an instance of the class for a given filename
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
ByteIn |
readReset(long startByteOffset) |
ByteIn |
readReset(long startByteOffset,
long endByteOffset) |
void |
reclaim(RandomDataInput file) |
public ByteFileBuffered(String filename)
filename
- java.lang.String the name of the underlying filepublic ByteFileBuffered(String filename, int bufSize)
filename
- java.lang.String the name of the underlying filebufSize
- how much of the file to bufferpublic void close()
close
in interface Closeable
close
in interface AutoCloseable
public ByteIn readReset(long startByteOffset, long endByteOffset) throws IOException
readReset
in interface ByteInSeekable
IOException
public ByteIn readReset(long startByteOffset) throws IOException
readReset
in interface ByteInSeekable
IOException
public void reclaim(RandomDataInput file)
Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow