|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FilePacker
This interface should be implemented by classes that can pack files and directories
from BASE file system. The implementing class must also have a public no-argument
constructor. The implementing classes are used by the
PackedFileExporter
plug-in. Each class should
be registered in a PluginConfiguration
for the
PackedFileExporter
.
Method Summary | |
---|---|
void |
close()
End the packing and close. |
String |
getDescription()
Get a short description of this file format that is suitable for display in selection list boxes. |
String |
getFileExtension()
Gets the extension that files, packed with this tool, should have, for example, zip or tar.gz Don't include the first
dot! |
String |
getMimeType()
Gets the MIME type to give compressed files from this packer |
void |
pack(String entryName,
InputStream in,
long size,
long lastModified)
Compress the uncompressed input stream to an entry with the given name into the outputstream. |
void |
setOutputStream(OutputStream out)
The output stream that the compressed files should be written to. |
Method Detail |
---|
String getDescription()
String getFileExtension()
zip
or tar.gz
Don't include the first
dot!
String getMimeType()
void setOutputStream(OutputStream out) throws IOException
out
- The output stream to write to
IOException
- If there is an error setting the output streamvoid pack(String entryName, InputStream in, long size, long lastModified) throws IOException
entryName
- The name of the packed resource, including path
informationin
- The input stream to read uncompressed data from, or null
if the entry represents a directorysize
- The number of bytes of uncompressed datalastModified
- The time the contents was last modified, or 0
if not known
IOException
- If there are any errors when reading or writingvoid close() throws IOException
setOutputStream(OutputStream)
method, and
cleanup temporary objects.
IOException
- If there are any errors
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |