public class MemoryInputStream extends DataInputStream
| Constructor and Description |
|---|
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) |
| Modifier and Type | Method and Description |
|---|---|
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
|
String |
toString() |
close, readBoolean, readInt, readLong, readPack7, readPack7I, readShort, readString, readString, skipBytes, skipPack7, skipPack7Ipublic MemoryInputStream(byte[] buffer)
public MemoryInputStream(DataInput in, int size) throws IOException
IOExceptionpublic MemoryInputStream(byte[] buffer,
int begin)
public MemoryInputStream(byte[] buffer,
int begin,
int end)
public int readFully(byte[] arr)
throws IOException
DataInputStreamreadFully in interface DataInputreadFully in class DataInputStreamarr - Description of the ParameterIOException - Description of the Exceptionpublic int read(byte[] arr,
int offset,
int max_len)
throws IOException
read in interface DataInputread in class DataInputStreamarr - Description of the Parametermax_len - Description of the ParameterIOException - Description of the Exceptionpublic byte readByte()
throws IOException
DataInputStreamreadByte in interface DataInputreadByte in class DataInputStreamIOException - Description of the Exceptionpublic int directRead(long from,
byte[] arr)
throws IOException
DataInputdirectRead in interface DataInputdirectRead in class DataInputStreamIOExceptionpublic void seek(long pos)
throws IOException
DataInputStreamseek in interface DataInputseek in class DataInputStreampos - Description of the ParameterIOException - Description of the Exceptionpublic long length()
throws IOException
DataInputStreamlength in interface DataInputlength in class DataInputStreamIOException - Description of the Exceptionpublic long getMarkPointer()
DataInputgetMarkPointer in interface DataInputgetMarkPointer in class DataInputStreampublic void jump()
throws IOException
jump in interface DataInputjump in class DataInputStreamIOExceptionpublic void mark(long skip)
DataInputDataInput.jump().mark in interface DataInputmark in class DataInputStreampublic long getFilePointer()
DataInputStreamgetFilePointer in interface DataInputgetFilePointer in class DataInputStreampublic static long readLong(byte[] rd_buff,
int i)
public static int readInt(byte[] rd_buff,
int i)
Copyright © 2016 Egothor. All Rights Reserved.