|
||||||||||
| 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(java.io.DataInputStream in,
long length)
Construct a new RandomDataInputMemory object, backed by the specified buffer |
protected |
RandomDataInputMemory(java.io.InputStream seekable)
|
|
RandomDataInputMemory(java.lang.String filename)
Construct a new RandomDataInputMemory object, backed by the specified file |
| Method Summary | |
|---|---|
java.lang.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(java.io.InputStream seekable)
throws java.io.IOException
java.io.IOException
public RandomDataInputMemory(java.lang.String filename)
throws java.io.IOException
java.io.IOException
public RandomDataInputMemory(java.io.DataInputStream in,
long length)
throws java.io.IOException
java.io.IOExceptionpublic RandomDataInputMemory(byte[] b)
| Method Detail |
|---|
public long getFilePointer()
throws java.io.IOException
getFilePointer in interface RandomDataInputjava.io.IOException
public long length()
throws java.io.IOException
length in interface RandomDataInputjava.io.IOException
public void seek(long _pos)
throws java.io.IOException
seek in interface RandomDataInputjava.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.FilterInputStreamjava.io.IOException
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||