Package com.drew.lang

Class RandomAccessFileReader

java.lang.Object
com.drew.lang.RandomAccessReader
com.drew.lang.RandomAccessFileReader

@Deprecated(since="2024-11-20") public class RandomAccessFileReader extends RandomAccessReader
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
Provides methods to read specific values from a RandomAccessFile, with a consistent, checked exception structure for issues.
  • Constructor Details

  • Method Details

    • toUnshiftedOffset

      public int toUnshiftedOffset(int localOffset)
      Deprecated.
      Specified by:
      toUnshiftedOffset in class RandomAccessReader
    • getLength

      public long getLength()
      Deprecated.
      Description copied from class: RandomAccessReader
      Returns the length of the data source in bytes.

      This is a simple operation for implementations (such as RandomAccessFileReader and ByteArrayReader) that have the entire data source available.

      Users of this method must be aware that sequentially accessed implementations such as RandomAccessStreamReader will have to read and buffer the entire data source in order to determine the length.

      Specified by:
      getLength in class RandomAccessReader
      Returns:
      the length of the data source, in bytes.
    • getByte

      public byte getByte(int index) throws IOException
      Deprecated.
      Description copied from class: RandomAccessReader
      Gets the byte value at the specified byte index.

      Implementations should not perform any bounds checking in this method. That should be performed in validateIndex and isValidIndex.

      Specified by:
      getByte in class RandomAccessReader
      Parameters:
      index - The index from which to read the byte
      Returns:
      The read byte value
      Throws:
      IOException - if the byte is unable to be read
    • getBytes

      public byte[] getBytes(int index, int count) throws IOException
      Deprecated.
      Description copied from class: RandomAccessReader
      Returns the required number of bytes from the specified index from the underlying source.
      Specified by:
      getBytes in class RandomAccessReader
      Parameters:
      index - The index from which the bytes begins in the underlying source
      count - The number of bytes to be returned
      Returns:
      The requested bytes
      Throws:
      IOException - if the byte is unable to be read