Class LinkedDataReader

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

public class LinkedDataReader extends Object implements DataReader
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields inherited from interface cool.scx.io.DataReader

    EMPTY_BYTES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

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

    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

    peekUntil, peekUntil, readUntil, readUntil