Interface IByteReader
- All Known Implementing Classes:
ByteReader
public interface IByteReader
IByteReader
- Version:
- 0.0.1
- Author:
- scx567888
-
Method Summary
Modifier and TypeMethodDescriptiondefault longindexOf(byte b) default longindexOf(byte[] b) default longindexOf(byte[] b, long maxLength) default longindexOf(byte[] b, long maxLength, long maxPullCount) default longindexOf(byte b, long maxLength) default longindexOf(byte b, long maxLength, long maxPullCount) longindexOf(ByteIndexer indexer, long maxLength, long maxPullCount) 查找索引intInputStream 写法的 readintinputStreamRead(byte[] b, int off, int len) InputStream 写法的 readbyte[]inputStreamReadNBytes(long len) InputStream 写法的 readdefault longlonginputStreamTransferTo(OutputStream out, long maxLength) InputStream 写法的 TransferTovoidmark()标记bytepeek()查看单个字节 (指针会移动) 当没有更多的数据时会抛出异常default byte[]peek(int maxLength) default byte[]peek(int maxLength, long maxPullCount) default voidpeek(ByteConsumer byteConsumer, long maxLength) voidpeek(ByteConsumer byteConsumer, long maxLength, long maxPullCount) 向 byteConsumer 写入指定长度字节 (指针不会移动) 当没有更多的数据时会抛出异常default byte[]peekUntil(byte b) default byte[]peekUntil(byte[] b) default byte[]peekUntil(byte[] b, int maxLength) default byte[]peekUntil(byte b, int maxLength) byteread()读取单个字节 (指针会移动) 当没有更多的数据时会抛出异常default byte[]read(int maxLength) default byte[]read(int maxLength, long maxPullCount) default voidread(ByteConsumer byteConsumer, long maxLength) voidread(ByteConsumer byteConsumer, long maxLength, long maxPullCount) 向 byteConsumer 写入指定长度字节 (指针会移动) 当没有更多的数据时会抛出异常default byte[]readUntil(byte b) default byte[]readUntil(byte[] b) default byte[]readUntil(byte[] b, int maxLength) default byte[]readUntil(byte b, int maxLength) voidreset()重置default voidskip(long length) default voidskip(long length, long maxPullCount)
-
Method Details
-
read
读取单个字节 (指针会移动) 当没有更多的数据时会抛出异常- Returns:
- byte
- Throws:
NoMoreDataException- 没有更多数据时抛出ByteSupplierException
-
read
void read(ByteConsumer byteConsumer, long maxLength, long maxPullCount) throws NoMoreDataException, ByteSupplierException 向 byteConsumer 写入指定长度字节 (指针会移动) 当没有更多的数据时会抛出异常- Parameters:
byteConsumer- 消费者maxLength- 最大长度maxPullCount- 最大长度- Throws:
NoMoreDataException- 没有更多数据时抛出ByteSupplierException
-
peek
查看单个字节 (指针会移动) 当没有更多的数据时会抛出异常- Returns:
- byte
- Throws:
NoMoreDataException- 没有更多数据时抛出ByteSupplierException
-
peek
void peek(ByteConsumer byteConsumer, long maxLength, long maxPullCount) throws NoMoreDataException, ByteSupplierException 向 byteConsumer 写入指定长度字节 (指针不会移动) 当没有更多的数据时会抛出异常- Parameters:
byteConsumer- 消费者maxLength- 最大长度maxPullCount- 最大长度- Throws:
NoMoreDataException- 没有更多数据时抛出ByteSupplierException
-
indexOf
long indexOf(ByteIndexer indexer, long maxLength, long maxPullCount) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException 查找索引 -
mark
void mark()标记 -
reset
void reset()重置 -
inputStreamRead
-
inputStreamRead
InputStream 写法的 read- Throws:
IOException
-
inputStreamTransferTo
InputStream 写法的 TransferTo- Throws:
IOException
-
inputStreamReadNBytes
-
read
-
read
default byte[] read(int maxLength, long maxPullCount) throws NoMoreDataException, ByteSupplierException -
read
default void read(ByteConsumer byteConsumer, long maxLength) throws NoMoreDataException, ByteSupplierException -
peek
-
peek
default byte[] peek(int maxLength, long maxPullCount) throws NoMoreDataException, ByteSupplierException -
peek
default void peek(ByteConsumer byteConsumer, long maxLength) throws NoMoreDataException, ByteSupplierException -
skip
-
skip
-
indexOf
default long indexOf(byte b) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
indexOf
default long indexOf(byte b, long maxLength) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
indexOf
default long indexOf(byte b, long maxLength, long maxPullCount) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
indexOf
default long indexOf(byte[] b) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
indexOf
default long indexOf(byte[] b, long maxLength) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
indexOf
default long indexOf(byte[] b, long maxLength, long maxPullCount) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
readUntil
default byte[] readUntil(byte b) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
readUntil
default byte[] readUntil(byte b, int maxLength) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
readUntil
default byte[] readUntil(byte[] b) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
readUntil
default byte[] readUntil(byte[] b, int maxLength) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
peekUntil
default byte[] peekUntil(byte b) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
peekUntil
default byte[] peekUntil(byte b, int maxLength) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
peekUntil
default byte[] peekUntil(byte[] b) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
peekUntil
default byte[] peekUntil(byte[] b, int maxLength) throws NoMatchFoundException, NoMoreDataException, ByteSupplierException -
inputStreamTransferTo
- Throws:
IOException
-