uka.transport
Class MemoryInputStream
java.lang.Object
java.io.InputStream
uka.transport.MemoryInputStream
- public final class MemoryInputStream
- extends java.io.InputStream
An input stream that reads from memory.
- Author:
- Bernhard Haumacher
|
Field Summary |
(package private) byte[] |
buffer
|
(package private) int |
lastIndex
one index behind the last valid value |
(package private) int |
pos
|
| Fields inherited from class java.io.InputStream |
|
| Methods inherited from class java.io.InputStream |
close, mark, markSupported, read, reset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
byte[] buffer
pos
int pos
lastIndex
int lastIndex
- one index behind the last valid value
MemoryInputStream
public MemoryInputStream()
- Before use this object must be initialized by calling
set(byte[], int, int).
MemoryInputStream
public MemoryInputStream(byte[] buffer)
MemoryInputStream
public MemoryInputStream(byte[] buffer,
int offset,
int length)
set
public void set(byte[] buffer,
int offset,
int length)
read
public int read()
read
public int read(byte[] b,
int off,
int len)
skip
public long skip(long n)
available
public int available()
getPosition
public int getPosition()