|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
org.terrier.utility.io.RandomDataInputMemory
public class RandomDataInputMemory
Implements a RandomDataInput backed by a byte[] rather than a file.
Field Summary | |
---|---|
protected org.terrier.utility.io.RandomDataInputMemory.Seekable |
buf
input stream to use |
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
|
RandomDataInputMemory(byte[] b)
Construct a new RandomDataInputMemory object, backed by the specified buffer |
|
RandomDataInputMemory(DataInputStream in,
long length)
Construct a new RandomDataInputMemory object, backed by the specified buffer |
protected |
RandomDataInputMemory(InputStream seekable)
|
|
RandomDataInputMemory(String filename)
Construct a new RandomDataInputMemory object, backed by the specified file |
Method Summary | |
---|---|
Object |
clone()
|
void |
close()
|
long |
getFilePointer()
Return the current position in the file |
long |
length()
Returns the length of the file |
void |
seek(long _pos)
Seek to specified position in the file |
Methods inherited from class java.io.DataInputStream |
---|
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes |
Methods inherited from class java.io.FilterInputStream |
---|
available, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.io.DataInput |
---|
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes |
Field Detail |
---|
protected org.terrier.utility.io.RandomDataInputMemory.Seekable buf
Constructor Detail |
---|
protected RandomDataInputMemory(InputStream seekable) throws IOException
IOException
public RandomDataInputMemory(String filename) throws IOException
IOException
public RandomDataInputMemory(DataInputStream in, long length) throws IOException
IOException
public RandomDataInputMemory(byte[] b)
Method Detail |
---|
public long getFilePointer() throws IOException
getFilePointer
in interface RandomDataInput
IOException
public long length() throws IOException
length
in interface RandomDataInput
IOException
public void seek(long _pos) throws IOException
seek
in interface RandomDataInput
IOException
public void close() throws IOException
close
in interface Closeable
close
in class FilterInputStream
IOException
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |