接口 RandomAccessData

  • 所有已知实现类:
    RandomAccessDataFile

    public interface RandomAccessData
    提供对某些基础数据的只读随机访问的接口。实现必须允许以线程安全的方式并发读取
    • 方法详细资料

      • getSubsection

        RandomAccessData getSubsection​(long offset,
                                       long length)
        为此数据的特定子部分返回一个新的 RandomAccessData
        参数:
        offset - 偏移量
        length - 长度
      • read

        byte[] read()
             throws IOException
        读取所有数据并将其作为字节数组返回
        抛出:
        IOException
      • read

        byte[] read​(long offset,
                    long length)
             throws IOException
        读取从给定 offset开始的数据的 length 字节
        抛出:
        IOException
      • getSize

        long getSize()
        返回数据的大小