Package proguard.io
Class DataEntryRewriter
- java.lang.Object
-
- proguard.io.DataEntryCopier
-
- proguard.io.DataEntryRewriter
-
- All Implemented Interfaces:
DataEntryReader
- Direct Known Subclasses:
ManifestRewriter
public class DataEntryRewriter extends DataEntryCopier
ThisDataEntryReader
writes the resource data entries that it reads to a givenDataEntryWriter
, updating their contents based on the renamed classes in the givenClassPool
.
-
-
Constructor Summary
Constructors Constructor Description DataEntryRewriter(ClassPool classPool, java.nio.charset.Charset charset, DataEntryWriter dataEntryWriter)
Creates a new DataEntryRewriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyData(java.io.InputStream inputStream, java.io.OutputStream outputStream)
Copies all data that it can read from the given input stream to the given output stream.protected void
copyData(java.io.Reader reader, java.io.Writer writer)
Copies all data that it can read from the given reader to the given writer.-
Methods inherited from class proguard.io.DataEntryCopier
main, read
-
-
-
-
Constructor Detail
-
DataEntryRewriter
public DataEntryRewriter(ClassPool classPool, java.nio.charset.Charset charset, DataEntryWriter dataEntryWriter)
Creates a new DataEntryRewriter.
-
-
Method Detail
-
copyData
protected void copyData(java.io.InputStream inputStream, java.io.OutputStream outputStream) throws java.io.IOException
Description copied from class:DataEntryCopier
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.- Overrides:
copyData
in classDataEntryCopier
- Throws:
java.io.IOException
-
copyData
protected void copyData(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
Copies all data that it can read from the given reader to the given writer.- Throws:
java.io.IOException
-
-