Class LinkedDataReader

java.lang.Object
cool.scx.io.LinkedDataReader
All Implemented Interfaces:
DataReader

public class LinkedDataReader extends Object implements DataReader
LinkedDataReader
Version:
0.0.1
Author:
scx567888
  • Field Summary

    Fields inherited from interface cool.scx.io.DataReader

    EMPTY_BYTES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    indexOf(byte[] pattern, int max)
    查找 指定字节数组 第一次出现的 index (指针不会移动)
    int
    indexOf(byte b, int max)
    查找 指定字节 第一次出现的 index (指针不会移动)
    byte
    向 dataConsumer 写入指定长度字节 (指针不会移动) 当没有更多的数据时会抛出异常
    byte[]
    peek(int maxLength)
    读取指定长度字节 (指针不会移动) 当没有更多的数据时会抛出异常
    void
    peek(DataConsumer dataConsumer, int maxLength)
    向 outputStream 写入指定长度字节 (指针不会移动) 当没有更多的数据时会抛出异常
    byte
    读取单个字节 (指针会移动) 当没有更多的数据时会抛出异常
    byte[]
    read(int maxLength)
    读取字节 (指针会移动) 当没有更多的数据时会抛出异常
    void
    read(DataConsumer dataConsumer, int maxLength)
    向 dataConsumer 写入指定长度字节 (指针会移动) 当没有更多的数据时会抛出异常
    void
    skip(int length)
    向后移动指定字节

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface cool.scx.io.DataReader

    indexOf, indexOf, peekUntil, peekUntil, peekUntil, peekUntil, readUntil, readUntil, readUntil, readUntil