public abstract class AbstractImportPlugin extends java.lang.Object implements ImportPlugin
| Constructor and Description |
|---|
AbstractImportPlugin() |
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
getFile()
Returns the File object this plugin was instantiated with.
|
protected java.io.InputStream |
getInputStream(java.io.File file)
This method returns an inputStream for a file.
|
java.lang.Object |
importFile(PluginContext context,
java.io.File f) |
java.lang.Object |
importFile(PluginContext context,
java.lang.String filename) |
java.lang.Object |
importFile(PluginContext context,
java.net.URI uri) |
java.lang.Object |
importFile(PluginContext context,
java.net.URL url) |
protected abstract java.lang.Object |
importFromStream(PluginContext context,
java.io.InputStream input,
java.lang.String filename,
long fileSizeInBytes)
This method is called by all plugin variants to do the actual importing.
|
public java.io.File getFile()
ImportPlugingetFile in interface ImportPluginpublic java.lang.Object importFile(PluginContext context, java.lang.String filename) throws java.lang.Exception
importFile in interface ImportPluginjava.lang.Exceptionpublic java.lang.Object importFile(PluginContext context, java.net.URI uri) throws java.lang.Exception
importFile in interface ImportPluginjava.lang.Exceptionpublic java.lang.Object importFile(PluginContext context, java.net.URL url) throws java.lang.Exception
importFile in interface ImportPluginjava.lang.Exceptionpublic java.lang.Object importFile(PluginContext context, java.io.File f) throws java.lang.Exception
importFile in interface ImportPluginjava.lang.Exceptionprotected java.io.InputStream getInputStream(java.io.File file)
throws java.lang.Exception
file - java.io.FileNotFoundExceptionjava.lang.Exceptionprotected abstract java.lang.Object importFromStream(PluginContext context, java.io.InputStream input, java.lang.String filename, long fileSizeInBytes) throws java.lang.Exception
context - input - filename - fileSizeInBytes - java.lang.Exception