类 RedisInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.moilioncircle.redis.replicator.io.RedisInputStream
-
- 所有已实现的接口:
Closeable,AutoCloseable
public class RedisInputStream extends InputStream
- 从以下版本开始:
- 2.1.0
- 作者:
- Leon Chen
-
-
字段概要
字段 修饰符和类型 字段 说明 protected byte[]bufprotected intheadprotected InputStreaminprotected booleanmarkprotected longmarkLenprotected List<RawByteListener>rawByteListenersprotected inttailprotected longtotal
-
构造器概要
构造器 构造器 说明 RedisInputStream(ByteArray array)RedisInputStream(InputStream in)RedisInputStream(InputStream in, int len)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 intavailable()intbufSize()voidclose()protected voidfill()inthead()booleanisMarked()voidmark()voidmark(long len)protected voidnotify(byte... bytes)intread()intread(byte[] b)intread(byte[] b, int off, int len)longread(ByteArray bytes, long offset, long len)ByteArrayreadBytes(long len)intreadInt(byte[] bytes)intreadInt(byte[] bytes, boolean littleEndian)intreadInt(int len)intreadInt(int length, boolean littleEndian)longreadLong(int len)longreadLong(int length, boolean littleEndian)StringreadString(int len)StringreadString(int len, Charset charset)longreadUInt(int length)longreadUInt(int length, boolean littleEndian)voidsetRawByteListeners(List<RawByteListener> rawByteListeners)longskip(long len)longskip(long len, boolean notify)inttail()longtotal()longunmark()-
从类继承的方法 java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
-
-
-
字段详细资料
-
head
protected int head
-
tail
protected int tail
-
total
protected long total
-
markLen
protected long markLen
-
buf
protected final byte[] buf
-
mark
protected boolean mark
-
in
protected final InputStream in
-
rawByteListeners
protected List<RawByteListener> rawByteListeners
-
-
构造器详细资料
-
RedisInputStream
public RedisInputStream(ByteArray array)
-
RedisInputStream
public RedisInputStream(InputStream in)
-
RedisInputStream
public RedisInputStream(InputStream in, int len)
-
-
方法详细资料
-
setRawByteListeners
public void setRawByteListeners(List<RawByteListener> rawByteListeners)
- 参数:
rawByteListeners- raw byte listeners- 从以下版本开始:
- 2.2.0
-
notify
protected void notify(byte... bytes)
-
head
public int head()
-
tail
public int tail()
-
bufSize
public int bufSize()
-
isMarked
public boolean isMarked()
-
mark
public void mark(long len)
-
mark
public void mark()
-
unmark
public long unmark()
-
total
public long total()
-
readBytes
public ByteArray readBytes(long len) throws IOException
- 抛出:
IOException
-
readInt
public int readInt(int len) throws IOException- 抛出:
IOException
-
readLong
public long readLong(int len) throws IOException- 抛出:
IOException
-
readInt
public int readInt(int length, boolean littleEndian) throws IOException- 抛出:
IOException
-
readUInt
public long readUInt(int length) throws IOException- 抛出:
IOException
-
readUInt
public long readUInt(int length, boolean littleEndian) throws IOException- 抛出:
IOException
-
readInt
public int readInt(byte[] bytes)
-
readInt
public int readInt(byte[] bytes, boolean littleEndian)
-
readLong
public long readLong(int length, boolean littleEndian) throws IOException- 抛出:
IOException
-
readString
public String readString(int len) throws IOException
- 抛出:
IOException
-
readString
public String readString(int len, Charset charset) throws IOException
- 抛出:
IOException
-
read
public int read() throws IOException- 指定者:
read在类中InputStream- 抛出:
IOException
-
read
public long read(ByteArray bytes, long offset, long len) throws IOException
- 抛出:
IOException
-
read
public int read(byte[] b) throws IOException- 覆盖:
read在类中InputStream- 抛出:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- 覆盖:
read在类中InputStream- 抛出:
IOException
-
available
public int available() throws IOException- 覆盖:
available在类中InputStream- 抛出:
IOException
-
skip
public long skip(long len, boolean notify) throws IOException- 抛出:
IOException
-
skip
public long skip(long len) throws IOException- 覆盖:
skip在类中InputStream- 抛出:
IOException
-
close
public void close() throws IOException- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 覆盖:
close在类中InputStream- 抛出:
IOException
-
fill
protected void fill() throws IOException- 抛出:
IOException
-
-