public class DefaultFormatHandler extends Object implements FormatHandler
| Constructor and Description |
|---|
DefaultFormatHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(byte[] data,
int off,
int len)
Return a flag indicating whether the handler is able to handle the data.
|
InputStream |
getMetadata(InputStream in)
Return metadata as in input stream (utility method).
|
BufferedImage |
getThumbnailImage(InputStream in)
Return a thumbnail image from an input stream (utility method).
|
void |
process(InputStream in,
Context context)
Process the input stream given.
|
public boolean accepts(byte[] data,
int off,
int len)
accepts in interface FormatHandlerdata - data bufferoff - offsetlen - number of valid bytestrue if the handler is able to handle the data; false otherwisepublic final void process(InputStream in, Context context) throws IOException
process in interface FormatHandlerin - input streamcontext - call contextIOException - if an I/O error occurspublic BufferedImage getThumbnailImage(InputStream in) throws IOException, ProcessorException
getThumbnailImage in interface FormatHandlerin - input streamnullIOException - if an I/O error occursProcessorException - if a processor reports an errorpublic InputStream getMetadata(InputStream in) throws IOException, ProcessorException
getMetadata in interface FormatHandlerin - input streamnullIOException - if an I/O error occursProcessorException - if a processor reports an errorCopyright © 2010 - 2020 Adobe. All Rights Reserved