ProGuard

proguard.io
Interface DataEntryWriter

All Known Implementing Classes:
CascadingDataEntryWriter, DirectoryWriter, FilteredDataEntryWriter, JarWriter, ParentDataEntryWriter

public interface DataEntryWriter

This interface provides methods for writing data entries, such as ZIP entries or files. The implementation determines to which type of data entry the data will be written.


Method Summary
 void close()
          Finishes writing all data entries.
 OutputStream getOutputStream(DataEntry dataEntry)
          Returns an output stream for writing data.
 OutputStream getOutputStream(DataEntry dataEntry, Finisher finisher)
          Returns an output stream for writing data.
 

Method Detail

getOutputStream

public OutputStream getOutputStream(DataEntry dataEntry)
                             throws IOException
Returns an output stream for writing data. The caller must not close the output stream; closing the output stream is the responsibility of the implementation of this interface.

Parameters:
dataEntry - the data entry for which the output stream is to be created.
Returns:
the output stream. The stream may be null to indicate that the data entry should not be written.
Throws:
IOException

getOutputStream

public OutputStream getOutputStream(DataEntry dataEntry,
                                    Finisher finisher)
                             throws IOException
Returns an output stream for writing data. The caller must not close the output stream; closing the output stream is the responsibility of the implementation of this interface.

Parameters:
dataEntry - the data entry for which the output stream is to be created.
finisher - the optional finisher that will be called before this class closes the output stream (at some later point in time) that will be returned (now).
Returns:
the output stream. The stream may be null to indicate that the data entry should not be written.
Throws:
IOException

close

public void close()
           throws IOException
Finishes writing all data entries.

Throws:
IOException

ProGuard