|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileUnpacker
This interface should be implemented by plugins that can unpack a single compressed
file into the BASE file system. The plugin may extend the
AbstractFileUnpacker
class which implements most of the
plugin specified parts, leaving only the actual unpacking to the subclass.
The file upload functionality checks all plugins that implement this interface to provide automatic unpacking of uploaded files without having to store them in a temporary place first.
ZipFileUnpacker
,
AbstractFileUnpacker
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.sf.basedb.core.plugin.Plugin |
---|
Plugin.MainType |
Method Summary | |
---|---|
Set<String> |
getExtensions()
Get the file extensions that this unpacker supports. |
String |
getFormatName()
Get the name of the compressed file format this unpacker supports. |
Set<String> |
getMimeTypes()
Get the MIME type for the file formats this unpacker supports. |
int |
unpack(DbControl dc,
Directory dir,
InputStream in,
boolean overwrite,
AbsoluteProgressReporter progress)
Unpack the given input stream into a BASE directory. |
Methods inherited from interface net.sf.basedb.core.plugin.Plugin |
---|
done, getAbout, getMainType, getPermissions, init, requiresConfiguration, run, supportsConfigurations |
Method Detail |
---|
String getFormatName()
Set<String> getExtensions()
Set<String> getMimeTypes()
int unpack(DbControl dc, Directory dir, InputStream in, boolean overwrite, AbsoluteProgressReporter progress) throws IOException, BaseException
dc
- The DbControl to use for database accessdir
- The directory to unpack the files toin
- The input stream containing the packed dataoverwrite
- If existing files should be overwritten or ignoredprogress
- A optional progress reporter which expects the number
of compressed bytes that has been uncompressed
IOException
- If there is an error reading the input stream
BaseException
- If there is another error
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |