|Modifier and Type||Method and Description|
Return the media types that this reader can read.
Attempt to guess the media type for a stream or file that starts with these bytes.
Read a file containing a workflow bundle in the specified media type and return a
Read a stream containing a workflow bundle in the specified media type and return a
It is recommended, but not required, that the reader can also recognise
those media types from
If the returned set is empty, the reader should should be able to
Recognise at least one media type from
WorkflowBundle readBundle(File bundleFile, String mediaType) throws ReaderException, IOException
WorkflowBundle readBundle(InputStream inputStream, String mediaType) throws ReaderException, IOException
inputStream- the stream containing the workflow bundle
mediaType- the media type of the workflow bundle
WorkflowBundleread from the stream
ReaderException- if there is an error parsing the workflow bundle
IOException- if there is an error reading from the stream
String guessMediaTypeForSignature(byte firstBytes)
null if ambiguous (more than one possibility) or
Typically a WorkflowBundleReader should be able to recognise the same
types as those listed in
getMediaTypes(), but this is no
requirement. A WorkflowBundleReader could also recognise types not listed
firstBytes- The initial bytes, at least 512 bytes long unless the resource is smaller.
nullif the bytes were ambiguous or unknown.
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.