Class ProcessedAndRawByteSources
- java.lang.Object
-
- com.android.tools.build.apkzlib.zip.ProcessedAndRawByteSources
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ProcessedAndRawByteSources extends java.lang.Object implements java.io.CloseableContainer 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 Summary
Constructors Constructor Description ProcessedAndRawByteSources(CloseableByteSource processedSource, CloseableByteSource rawSource)Creates a new container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()CloseableByteSourcegetProcessedByteSource()Obtains a byte source that read the processed contents of the entry.CloseableByteSourcegetRawByteSource()Obtains a byte source that reads the raw contents of an entry.
-
-
-
Constructor Detail
-
ProcessedAndRawByteSources
public ProcessedAndRawByteSources(CloseableByteSource processedSource, CloseableByteSource rawSource)
Creates a new container.- Parameters:
processedSource- the processed sourcerawSource- 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 bygetProcessedByteSource().- Returns:
- a byte source
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-