public class MemoryInputStream extends AbstractDataInput
| Constructor and Description |
|---|
MemoryInputStream(Memory mem) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected int |
getPosition() |
int |
read() |
void |
readFully(byte[] buffer,
int offset,
int count)
Read bytes from this file into
buffer starting at offset offset. |
protected void |
seekInternal(int pos) |
int |
skipBytes(int n) |
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTFpublic MemoryInputStream(Memory mem)
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void readFully(byte[] buffer,
int offset,
int count)
throws java.io.IOException
AbstractDataInputbuffer starting at offset offset. This method blocks until count number of bytes have been
read.readFully in interface java.io.DataInputreadFully in class AbstractDataInputbuffer - the buffer to read bytes into.offset - the initial position in buffer to store the bytes read
from this file.count - the maximum number of bytes to store in buffer.java.io.EOFException - if the end of this file is detected.java.io.IOException - if this file is closed or another I/O error occurs.protected void seekInternal(int pos)
seekInternal in class AbstractDataInputprotected int getPosition()
getPosition in class AbstractDataInputpublic int skipBytes(int n)
throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamCopyright © 2015 The Apache Software Foundation