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 int
available()
void
close()
int
getPosition()
void
mark(int readAheadLimit)
boolean
markSupported()
int
read()
int
read(byte[] b, int offset, int length)
void
reset()
void
seek(int position)
long
skip(long requestedSkip)
-
Methods inherited from class java.io.InputStream
read
-
-
-
-
Method Detail
-
read
public int read()
- Specified by:
read
in classInputStream
-
read
public int read(byte[] b, int offset, int length)
- Overrides:
read
in classInputStream
-
skip
public long skip(long requestedSkip)
- Overrides:
skip
in classInputStream
-
available
public int available()
- Overrides:
available
in classInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classInputStream
-
mark
public void mark(int readAheadLimit)
- Overrides:
mark
in classInputStream
-
reset
public void reset()
- Overrides:
reset
in classInputStream
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
seek
public void seek(int position)
-
getPosition
public int getPosition()
-
-