Class SeekableByteArrayInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.accumulo.core.file.blockfile.impl.SeekableByteArrayInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class SeekableByteArrayInputStream extends InputStream
This class is like byte array input stream with two differences. It supports seeking and avoids synchronization.
-
-
Constructor Summary
Constructors Constructor Description SeekableByteArrayInputStream(byte[] buf)SeekableByteArrayInputStream(byte[] buf, int maxOffset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()intgetPosition()voidmark(int readAheadLimit)booleanmarkSupported()intread()intread(byte[] b, int offset, int length)voidreset()voidseek(int position)longskip(long requestedSkip)-
Methods inherited from class java.io.InputStream
nullInputStream, read, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Method Detail
-
read
public int read()
- Specified by:
readin classInputStream
-
read
public int read(byte[] b, int offset, int length)- Overrides:
readin classInputStream
-
skip
public long skip(long requestedSkip)
- Overrides:
skipin classInputStream
-
available
public int available()
- Overrides:
availablein classInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classInputStream
-
mark
public void mark(int readAheadLimit)
- Overrides:
markin classInputStream
-
reset
public void reset()
- Overrides:
resetin classInputStream
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
seek
public void seek(int position)
-
getPosition
public int getPosition()
-
-