|
||||||||||
| 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 DataInputreadFully in class DataInputStreamarr - Description of the Parameter
java.io.IOException - Description of the Exception
public int read(byte[] arr,
int offset,
int max_len)
throws java.io.IOException
read in interface DataInputread in class DataInputStreamarr - Description of the Parametermax_len - Description of the Parameter
java.io.IOException - Description of the Exception
public byte readByte()
throws java.io.IOException
DataInputStream
readByte in interface DataInputreadByte in class DataInputStreamjava.io.IOException - Description of the Exception
public int directRead(long from,
byte[] arr)
throws java.io.IOException
DataInput
directRead in interface DataInputdirectRead in class DataInputStreamjava.io.IOException
public void seek(long pos)
throws java.io.IOException
DataInputStream
seek in interface DataInputseek in class DataInputStreampos - Description of the Parameter
java.io.IOException - Description of the Exception
public long length()
throws java.io.IOException
DataInputStream
length in interface DataInputlength in class DataInputStreamjava.io.IOException - Description of the Exceptionpublic long getMarkPointer()
DataInput
getMarkPointer in interface DataInputgetMarkPointer in class DataInputStream
public void jump()
throws java.io.IOException
jump in interface DataInputjump in class DataInputStreamjava.io.IOExceptionpublic void mark(long skip)
DataInputDataInput.jump().
mark in interface DataInputmark in class DataInputStreampublic long getFilePointer()
DataInputStream
getFilePointer in interface DataInputgetFilePointer 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 | |||||||||