Streamer.BinaryData, Streamer.Compression, Streamer.Data, Streamer.IStreamer, Streamer.MediaTypes
ROOT_EXTENSION, ROOT_TYPE
Constructor and Description |
---|
Streamer.Compression(InputStream inputStream)
Constructor that maps input media type to output media type.
|
Streamer.Compression(InputStream inputStream,
String requestedOutputMediaType)
Constructor that sets output type to requested type if it is not null and one of supported compression types,
or to input type otherwise.
|
Modifier and Type | Method and Description |
---|---|
OutputStream |
compress(OutputStream outputStream)
Compress output stream.
|
OutputStream |
compress(OutputStream outputStream,
String zipEntry)
Compress output stream with given file name for zip entry.
|
InputStream |
decompress() |
String |
getExtensionFor(String supportedMediaType)
Get file extension for corresponding media type from set of supported MIME types.
|
getDefaultExtension, getInputMediaType, getInputStream, getOutputMediaType, isRootType, nonEmptyStream
public Streamer.Compression(InputStream inputStream) throws IOException
inputStream
- - input streamIOException
- with failure to read input streampublic Streamer.Compression(InputStream inputStream, String requestedOutputMediaType) throws IOException
inputStream
- - input streamrequestedOutputMediaType
- - requested output media typeIOException
- when failure to read the streampublic final OutputStream compress(OutputStream outputStream)
outputStream
- - output streampublic final OutputStream compress(OutputStream outputStream, String zipEntry)
outputStream
- - output streamzipEntry
- - file name for zip entrypublic final InputStream decompress()
public final String getExtensionFor(String supportedMediaType)
supportedMediaType
- - supported by this streamer media typeCopyright © 2005–2017 Zementis, Inc.. All rights reserved.