public static class Streamer.BinaryData extends Streamer implements Streamer.IStreamer
Streamer.BinaryData, Streamer.Compression, Streamer.Data, Streamer.IStreamer, Streamer.MediaTypes
ROOT_EXTENSION, ROOT_TYPE
Constructor and Description |
---|
Streamer.BinaryData(InputStream inputStream,
String mediaType,
String requestedOutputMediaType)
Constructor that attempts to detect file type for given media type if detector is available and if
successful, sets input and output type to given type or to root type if type detection failed.
|
Modifier and Type | Method and Description |
---|---|
Streamer.Compression |
getCompression() |
String |
getExtensionFor(String supportedMediaType)
Get file extension for corresponding media type from set of supported MIME types.
|
OutputStream |
getOutputStream(OutputStream outputStream) |
getDefaultExtension, getInputMediaType, getInputStream, getOutputMediaType, isRootType, nonEmptyStream
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputMediaType, getInputStream, getOutputMediaType
public Streamer.BinaryData(InputStream inputStream, String mediaType, String requestedOutputMediaType) throws IOException
inputStream
- - input streammediaType
- - media type to be detectedrequestedOutputMediaType
- - requested output media typeIOException
- with failure to read input streampublic final Streamer.Compression getCompression()
getCompression
in interface Streamer.IStreamer
public final OutputStream getOutputStream(OutputStream outputStream)
getOutputStream
in interface Streamer.IStreamer
outputStream
- - output streampublic final String getExtensionFor(String supportedMediaType)
Streamer.IStreamer
getExtensionFor
in interface Streamer.IStreamer
supportedMediaType
- - supported by this streamer media typeCopyright © 2005–2017 Zementis, Inc.. All rights reserved.