eu.beesoft.gaia.util
Class FastByteArrayInputStream
java.lang.Object
java.io.InputStream
eu.beesoft.gaia.util.FastByteArrayInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class FastByteArrayInputStream
- extends java.io.InputStream
ByteArrayInputStream implementation that does not synchronize methods.
Field Summary |
protected byte[] |
buf
Our byte buffer |
protected int |
count
Number of bytes that we can read from the buffer |
protected int |
pos
Number of bytes that have been read from the buffer |
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 |
buf
protected byte[] buf
- Our byte buffer
count
protected int count
- Number of bytes that we can read from the buffer
pos
protected int pos
- Number of bytes that have been read from the buffer
FastByteArrayInputStream
public FastByteArrayInputStream(byte[] buf)
FastByteArrayInputStream
public FastByteArrayInputStream(byte[] buf,
int count)
available
public final int available()
- Overrides:
available
in class java.io.InputStream
read
public final int read()
- Specified by:
read
in class java.io.InputStream
read
public final int read(byte[] b,
int off,
int len)
- Overrides:
read
in class java.io.InputStream
skip
public final long skip(long n)
- Overrides:
skip
in class java.io.InputStream