public class DefaultFormatHandler extends java.lang.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.
|
java.io.InputStream |
getMetadata(java.io.InputStream in)
Return metadata as in input stream (utility method).
|
java.awt.image.BufferedImage |
getThumbnailImage(java.io.InputStream in)
Return a thumbnail image from an input stream (utility method).
|
void |
process(java.io.InputStream in,
Context context)
Process the input stream given.
|
public boolean accepts(byte[] data, int off, int len)
accepts
in interface FormatHandler
data
- data bufferoff
- offsetlen
- number of valid bytestrue
if the handler is able to handle the data; false
otherwisepublic final void process(java.io.InputStream in, Context context) throws java.io.IOException
process
in interface FormatHandler
in
- input streamcontext
- call contextjava.io.IOException
- if an I/O error occurspublic java.awt.image.BufferedImage getThumbnailImage(java.io.InputStream in) throws java.io.IOException, ProcessorException
getThumbnailImage
in interface FormatHandler
in
- input streamnull
java.io.IOException
- if an I/O error occursProcessorException
- if a processor reports an errorpublic java.io.InputStream getMetadata(java.io.InputStream in) throws java.io.IOException, ProcessorException
getMetadata
in interface FormatHandler
in
- input streamnull
java.io.IOException
- if an I/O error occursProcessorException
- if a processor reports an errorCopyright © 2010 - 2020 Adobe. All Rights Reserved