public static class Streamer.Data extends Streamer implements Streamer.IStreamer
Streamer.BinaryData, Streamer.Compression, Streamer.Data, Streamer.IStreamer, Streamer.MediaTypes
ROOT_EXTENSION, ROOT_TYPE
Constructor and Description |
---|
Streamer.Data(File file)
Constructor that maps input type to output type.
|
Streamer.Data(File file,
String requestedOutputMediaType)
Constructor that maps input type to requested output type if requested type is valid and one of supported
output types (csv, json).
|
Streamer.Data(InputStream inputStream)
Constructor that maps input type to output type.
|
Streamer.Data(InputStream inputStream,
String requestedOutputMediaType)
Constructor that maps input type to requested output type if requested type is valid and one of supported
output types (csv, json).
|
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 os) |
getDefaultExtension, getInputMediaType, getInputStream, getOutputMediaType, isRootType, nonEmptyStream
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputMediaType, getInputStream, getOutputMediaType
public Streamer.Data(InputStream inputStream) throws IOException
inputStream
- - input streamIOException
- with failure to read input streampublic Streamer.Data(InputStream inputStream, String requestedOutputMediaType) throws IOException
inputStream
- - input streamrequestedOutputMediaType
- - requested output media typeIOException
- with failure to read input streampublic Streamer.Data(File file) throws IOException
file
- - fileIOException
- with failure to read filepublic Streamer.Data(File file, String requestedOutputMediaType) throws IOException
file
- - filerequestedOutputMediaType
- - requested media typeIOException
- with failure to read filepublic final OutputStream getOutputStream(OutputStream os)
getOutputStream
in interface Streamer.IStreamer
os
- - output streampublic final Streamer.Compression getCompression()
getCompression
in interface Streamer.IStreamer
public 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.