public abstract class FileBasedUploadFilter extends Object implements UploadFilter, SetServiceLocatorCallback
Constructor and Description |
---|
FileBasedUploadFilter() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Callback method which may be used to do some clean up.
|
abstract void |
doFilter(File tempFile)
IOException indicates to not store the File tempFile in the repository
|
protected ServiceLocator |
getServiceLocator() |
protected void |
init() |
void |
initUploadFilter(InputStream in,
String extension)
Initialize the filter instance.
|
int |
read(byte[] b,
int off,
int len)
|
void |
setServiceLocator(ServiceLocator value) |
public final void setServiceLocator(@NotNull ServiceLocator value)
setServiceLocator
in interface SetServiceLocatorCallback
protected void init()
protected ServiceLocator getServiceLocator()
public void initUploadFilter(@NotNull InputStream in, @NotNull String extension) throws IOException
UploadFilter
initUploadFilter
in interface UploadFilter
in
- input stream containing the dataextension
- file extension - it is not save to guess the file content from this extensionIOException
public abstract void doFilter(File tempFile) throws IOException
tempFile
- IOException
public int read(@NotNull byte[] b, int off, int len) throws IOException
UploadFilter
read
in interface UploadFilter
IOException
public void close()
UploadFilter
UploadFilter.initUploadFilter(java.io.InputStream, String)
.close
in interface UploadFilter
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500