org.apache.tools.ant.types.resources
public class ZipResource extends ArchiveResource
Since: Ant 1.7
Constructor Summary | |
---|---|
ZipResource()
Default constructor. | |
ZipResource(File z, String enc, ZipEntry e)
Construct a ZipResource representing the specified
entry in the specified zipfile. |
Method Summary | |
---|---|
void | addConfigured(ResourceCollection a)
Sets the archive that holds this as a single element Resource
collection. |
protected void | fetchEntry()
fetches information from the named entry inside the archive. |
String | getEncoding()
Get the encoding to use with the zipfile. |
ZipExtraField[] | getExtraFields()
Retrieves extra fields. |
InputStream | getInputStream()
Return an InputStream for reading the contents of this Resource. |
int | getMethod()
The compression method that has been used. |
OutputStream | getOutputStream()
Get an OutputStream for the Resource. |
File | getZipfile()
Get the zipfile that holds this ZipResource. |
void | setEncoding(String enc)
Set the encoding to use with the zipfile. |
void | setRefid(Reference r)
Overrides the super version. |
void | setZipfile(File z)
Set the zipfile that holds this ZipResource. |
Parameters: z the zipfile as File. enc the encoding used for filenames. e the ZipEntry.
Parameters: a the archive as a single element Resource collection.
Returns: String encoding.
Returns: an array of the extra fields
Since: Ant 1.8.0
Returns: an InputStream object.
Throws: IOException if the zip file cannot be opened, or the entry cannot be read.
Since: Ant 1.8.0
Returns: an OutputStream to which content can be written.
Throws: IOException if unable to provide the content of this Resource as a stream. UnsupportedOperationException if OutputStreams are not supported for this Resource type.
Returns: the zipfile as a File.
Parameters: enc the String encoding.
Parameters: r the Reference to set.
Parameters: z the zipfile as a File.