Class RandomAccessFileInputStream

java.lang.Object
java.io.InputStream
org.apache.commons.io.input.RandomAccessFileInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class RandomAccessFileInputStream extends InputStream
Streams data from a RandomAccessFile starting at its current position.
Since:
2.8.0
  • Field Details

    • closeOnClose

      private final boolean closeOnClose
    • randomAccessFile

      private final RandomAccessFile randomAccessFile
  • Constructor Details

    • RandomAccessFileInputStream

      public RandomAccessFileInputStream(RandomAccessFile file)
      Constructs a new instance configured to leave the underlying file open when this stream is closed.
      Parameters:
      file - The file to stream.
    • RandomAccessFileInputStream

      public RandomAccessFileInputStream(RandomAccessFile file, boolean closeOnClose)
      Constructs a new instance.
      Parameters:
      file - The file to stream.
      closeOnClose - Whether to close the underlying file when this stream is closed.
  • Method Details