org.apache.avro.file

## Interface SeekableInput

- All Superinterfaces:
    AutoCloseable, Closeable
  All Known Implementing Classes:
    FsInput, SeekableByteArrayInput, SeekableFileInput

      public interface SeekableInput
      extends Closeable

  An InputStream that supports seek and tell.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `length()` Return the length of the file.
    `int` | `read(byte[] b, int off, int len)` Equivalent to `InputStream.read(byte[],int,int)`.
    `void` | `seek(long p)` Set the position for the next `read()`.
    `long` | `tell()` Return the position of the next `read()`.

    - ### Methods inherited from interface java.io.Closeable

      `close`

- - ### Method Detail

    - #### seek

          void seek(long p)
             throws IOException

      Set the position for the next `read()`.
      Throws:
        `IOException`

    - #### tell

          long tell()
             throws IOException

      Return the position of the next `read()`.
      Throws:
        `IOException`

    - #### length

          long length()
               throws IOException

      Return the length of the file.
      Throws:
        `IOException`

    - #### read

          int read(byte[] b,
                   int off,
                   int len)
            throws IOException

      Equivalent to `InputStream.read(byte[],int,int)`.
      Throws:
        `IOException`

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.