Class ProcessedAndRawByteSources

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class ProcessedAndRawByteSources
    extends java.lang.Object
    implements java.io.Closeable
    Container that has two bytes sources: one representing raw data and another processed data. In case of compression, the raw data is the compressed data and the processed data is the uncompressed data. It is valid for a RaP ("Raw-and-Processed") to contain the same byte sources for both processed and raw data.
    • Constructor Detail

      • ProcessedAndRawByteSources

        public ProcessedAndRawByteSources​(CloseableByteSource processedSource,
                                          CloseableByteSource rawSource)
        Creates a new container.
        Parameters:
        processedSource - the processed source
        rawSource - the raw source
    • Method Detail

      • getProcessedByteSource

        public CloseableByteSource getProcessedByteSource()
        Obtains a byte source that read the processed contents of the entry.
        Returns:
        a byte source
      • getRawByteSource

        public CloseableByteSource getRawByteSource()
        Obtains a byte source that reads the raw contents of an entry. This is the data that is ultimately stored in the file and, in the case of compressed files, is the same data in the source returned by getProcessedByteSource().
        Returns:
        a byte source
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException