Class ByteArrayInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.moilioncircle.redis.replicator.io.ByteArrayInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ByteArrayInputStream extends InputStream
- Since:
- 2.1.0
- Author:
- Leon Chen
-
-
Constructor Summary
Constructors Constructor Description ByteArrayInputStream(ByteArray buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()voidmark(int readAheadLimit)booleanmarkSupported()intread()intread(byte[] b, int off, int len)voidreset()longskip(long n)-
Methods inherited from class java.io.InputStream
nullInputStream, read, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Field Detail
-
pos
protected long pos
-
count
protected long count
-
mark
protected long mark
-
buf
protected ByteArray buf
-
-
Constructor Detail
-
ByteArrayInputStream
public ByteArrayInputStream(ByteArray buf)
-
-
Method Detail
-
read
public int read()
- Specified by:
readin classInputStream
-
read
public int read(byte[] b, int off, int len)- Overrides:
readin classInputStream
-
skip
public long skip(long n)
- 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
-
-