Package io.github.ai4ci.util
Class Cloner.FastByteArrayInputStream
java.lang.Object
java.io.InputStream
io.github.ai4ci.util.Cloner.FastByteArrayInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
- Cloner
ByteArrayInputStream implementation that does not synchronize methods.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Field Details
-
buf
protected byte[] bufOur byte buffer -
count
protected int countNumber of bytes that we can read from the buffer -
pos
protected int posNumber of bytes that have been read from the buffer
-
-
Constructor Details
-
FastByteArrayInputStream
public FastByteArrayInputStream(byte[] buf, int count)
-
-
Method Details
-
available
public final int available()- Overrides:
available
in classInputStream
-
read
public final int read()- Specified by:
read
in classInputStream
-
read
public final int read(byte[] b, int off, int len) - Overrides:
read
in classInputStream
-
skip
public final long skip(long n) - Overrides:
skip
in classInputStream
-