com.vladium.util
Class ByteArrayIStream
java.lang.Object
java.io.InputStream
com.vladium.util.ByteArrayIStream
- public final class ByteArrayIStream
- extends java.io.InputStream
An unsynchronized version of java.io.ByteArrayInputStream.
All argument validation is disabled in release mode.
- Author:
- (C) 2001, Vlad Roubtsov
Fields inherited from class java.io.InputStream |
|
Method Summary |
int |
available()
|
void |
close()
Equivalent to reset() . |
int |
read()
|
int |
read(byte[] buf,
int offset,
int length)
|
void |
reset()
Differs from the contruct for InputStream.reset() in that this method
always resets the stream to the same it was immediately after creation. |
long |
skip(long n)
|
Methods inherited from class java.io.InputStream |
mark, markSupported, read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_buf
private final byte[] m_buf
m_max
private final int m_max
m_pos
private int m_pos
NATIVE_COPY_THRESHOLD
private static final int NATIVE_COPY_THRESHOLD
- See Also:
- Constant Field Values
ByteArrayIStream
public ByteArrayIStream(byte[] buf)
ByteArrayIStream
public ByteArrayIStream(byte[] buf,
int length)
read
public final int read()
read
public final int read(byte[] buf,
int offset,
int length)
available
public final int available()
skip
public final long skip(long n)
reset
public final void reset()
- Differs from the contruct for InputStream.reset() in that this method
always resets the stream to the same it was immediately after creation.
close
public final void close()
- Equivalent to
reset()
.