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, readUTF
public MemoryInputStream(Memory mem)
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public void readFully(byte[] buffer, int offset, int count) throws java.io.IOException
AbstractDataInput
buffer
starting at offset offset
. This method blocks until count
number of bytes have been
read.readFully
in interface java.io.DataInput
readFully
in class AbstractDataInput
buffer
- 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 AbstractDataInput
protected int getPosition()
getPosition
in class AbstractDataInput
public int skipBytes(int n) throws java.io.IOException
java.io.IOException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
Copyright © 2015 The Apache Software Foundation