Package nl.tue.storage
Class FastByteArrayInputStream
- java.lang.Object
-
- java.io.InputStream
-
- nl.tue.storage.FastByteArrayInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class FastByteArrayInputStream extends java.io.InputStreamByteArrayInputStream implementation that does not synchronize methods, nor does it check for the end of stream. If the end of stream is read, exceptions may be thrown.
-
-
Constructor Summary
Constructors Constructor Description FastByteArrayInputStream(byte[] buf, int pos, int count)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()java.lang.ObjectgetLock()when reading from this stream, you need a lock on this object.intread()intread(byte[] b, int off, int len)longskip(long n)
-
-
-
Method Detail
-
available
public final int available()
- Overrides:
availablein classjava.io.InputStream
-
read
public final int read()
- Specified by:
readin classjava.io.InputStream
-
read
public final int read(byte[] b, int off, int len)- Overrides:
readin classjava.io.InputStream
-
skip
public final long skip(long n)
- Overrides:
skipin classjava.io.InputStream
-
getLock
public java.lang.Object getLock()
when reading from this stream, you need a lock on this object.- Returns:
-
-