Package proguard.io
Class DataEntryCopier
java.lang.Object
proguard.io.DataEntryCopier
- All Implemented Interfaces:
DataEntryReader
- Direct Known Subclasses:
DataEntryRewriter
This
DataEntryReader writes the ZIP entries and files that it reads to a given DataEntryWriter.-
Constructor Summary
ConstructorsConstructorDescriptionDataEntryCopier(DataEntryWriter dataEntryWriter) Creates a new DataEntryCopier. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcopyData(InputStream inputStream, OutputStream outputStream) Copies all data that it can read from the given input stream to the given output stream.static voidA main method for testing file/archive/directory copying.voidReads the given data entry.
-
Constructor Details
-
DataEntryCopier
Creates a new DataEntryCopier.
-
-
Method Details
-
read
Description copied from interface:DataEntryReaderReads the given data entry.- Specified by:
readin interfaceDataEntryReader- Throws:
IOException
-
copyData
Copies all data that it can read from the given input stream to the given output stream. The caller of this method will open and afterwards flush and close the input stream and the output stream. The implementation of this method needs to make sure that any wrapping output streams are flushed before returning.- Throws:
IOException
-
main
A main method for testing file/archive/directory copying.
-