|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.egothor.io.DataInputStream
org.egothor.io.MemoryInputStream
public class MemoryInputStream
Constructor Summary | |
---|---|
MemoryInputStream(byte[] buffer)
Creates a new instance of MemoryInputStream |
|
MemoryInputStream(byte[] buffer,
int begin)
Creates a new instance of MemoryInputStream |
|
MemoryInputStream(byte[] buffer,
int begin,
int end)
Create an InputStream on top of a byte array. |
|
MemoryInputStream(DataInput in,
int size)
|
Method Summary | |
---|---|
int |
directRead(long from,
byte[] arr)
Read from the offset position without buffering. |
long |
getFilePointer()
Gets the filePointer attribute of the DataInputStream object |
long |
getMarkPointer()
Returns the offset of the mark if any, else returns 0. |
void |
jump()
|
long |
length()
Description of the Method |
void |
mark(long skip)
Denote position at getFilePointer+skip for DataInput.jump() . |
int |
read(byte[] arr,
int offset,
int max_len)
|
byte |
readByte()
Description of the Method |
int |
readFully(byte[] arr)
Description of the Method |
static int |
readInt(byte[] rd_buff,
int i)
Reads the integer value from the array at the offset. |
static long |
readLong(byte[] rd_buff,
int i)
Reads the long-int value from the array at the offset. |
void |
seek(long pos)
Description of the Method |
java.lang.String |
toString()
|
Methods inherited from class org.egothor.io.DataInputStream |
---|
close, readBoolean, readInt, readLong, readPack7, readPack7I, readShort, readString, readString, skipBytes, skipPack7, skipPack7I |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MemoryInputStream(byte[] buffer)
public MemoryInputStream(DataInput in, int size) throws java.io.IOException
java.io.IOException
public MemoryInputStream(byte[] buffer, int begin)
public MemoryInputStream(byte[] buffer, int begin, int end)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public int readFully(byte[] arr) throws java.io.IOException
DataInputStream
readFully
in interface DataInput
readFully
in class DataInputStream
arr
- Description of the Parameter
java.io.IOException
- Description of the Exceptionpublic int read(byte[] arr, int offset, int max_len) throws java.io.IOException
read
in interface DataInput
read
in class DataInputStream
arr
- Description of the Parametermax_len
- Description of the Parameter
java.io.IOException
- Description of the Exceptionpublic byte readByte() throws java.io.IOException
DataInputStream
readByte
in interface DataInput
readByte
in class DataInputStream
java.io.IOException
- Description of the Exceptionpublic int directRead(long from, byte[] arr) throws java.io.IOException
DataInput
directRead
in interface DataInput
directRead
in class DataInputStream
java.io.IOException
public void seek(long pos) throws java.io.IOException
DataInputStream
seek
in interface DataInput
seek
in class DataInputStream
pos
- Description of the Parameter
java.io.IOException
- Description of the Exceptionpublic long length() throws java.io.IOException
DataInputStream
length
in interface DataInput
length
in class DataInputStream
java.io.IOException
- Description of the Exceptionpublic long getMarkPointer()
DataInput
getMarkPointer
in interface DataInput
getMarkPointer
in class DataInputStream
public void jump() throws java.io.IOException
jump
in interface DataInput
jump
in class DataInputStream
java.io.IOException
public void mark(long skip)
DataInput
DataInput.jump()
.
mark
in interface DataInput
mark
in class DataInputStream
public long getFilePointer()
DataInputStream
getFilePointer
in interface DataInput
getFilePointer
in class DataInputStream
public static long readLong(byte[] rd_buff, int i)
public static int readInt(byte[] rd_buff, int i)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |