Class RandomAccessStream.InputStreamView

java.lang.Object
java.io.InputStream
com.twelvemonkeys.io.SeekableInputStream
com.twelvemonkeys.io.RandomAccessStream.InputStreamView
All Implemented Interfaces:
Seekable, Closeable, AutoCloseable
Enclosing class:
RandomAccessStream

static final class RandomAccessStream.InputStreamView extends SeekableInputStream
  • Field Details

  • Constructor Details

  • Method Details

    • isCached

      public boolean isCached()
      Description copied from interface: Seekable
      Returns true if this Seekable stream caches data itself in order to allow seeking backwards. Applications may consult this in order to decide how frequently, or whether, to flush in order to conserve cache resources.
      Returns:
      true if this Seekable caches data.
      See Also:
    • isCachedFile

      public boolean isCachedFile()
      Description copied from interface: Seekable
      Returns true if this Seekable stream caches data itself in order to allow seeking backwards, and the cache is kept in a temporary file. Applications may consult this in order to decide how frequently, or whether, to flush in order to conserve cache resources.
      Returns:
      true if this Seekable caches data in a temporary file.
      See Also:
    • isCachedMemory

      public boolean isCachedMemory()
      Description copied from interface: Seekable
      Returns true if this Seekable stream caches data itself in order to allow seeking backwards, and the cache is kept in main memory. Applications may consult this in order to decide how frequently, or whether, to flush in order to conserve cache resources.
      Returns:
      true if this Seekable caches data in main memory.
      See Also:
    • closeImpl

      protected void closeImpl() throws IOException
      Specified by:
      closeImpl in class SeekableInputStream
      Throws:
      IOException
    • flushBeforeImpl

      protected void flushBeforeImpl(long pPosition) throws IOException
      Description copied from class: SeekableInputStream
      Discards the initial portion of the stream prior to the indicated postion.
      Specified by:
      flushBeforeImpl in class SeekableInputStream
      Parameters:
      pPosition - the position to flush to
      Throws:
      IOException - if an I/O exception occurs during the flush operation
      See Also:
    • seekImpl

      protected void seekImpl(long pPosition) throws IOException
      Specified by:
      seekImpl in class SeekableInputStream
      Throws:
      IOException
    • read

      public int read() throws IOException
      Specified by:
      read in class InputStream
      Throws:
      IOException
    • read

      public int read(byte[] pBytes, int pOffset, int pLength) throws IOException
      Overrides:
      read in class InputStream
      Throws:
      IOException