public abstract class InputStreamSwap extends StringSwap<InputStream>
InputStreams to Strings.| Modifier and Type | Class and Description |
|---|---|
static class |
InputStreamSwap.Base64
Converts
InputStreams to BASE-64 encoding. |
static class |
InputStreamSwap.Hex
Converts
InputStreams to hex encoding. |
static class |
InputStreamSwap.SpacedHex
Converts
InputStreams to spaced-hex encoding. |
| Constructor and Description |
|---|
InputStreamSwap() |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
toBytes(InputStream is)
Convert the specified input stream to a byte array.
|
protected InputStream |
toStream(byte[] b,
ClassMeta<?> hint)
Convert the specified byte array into an input stream.
|
swap, unswapforMediaTypes, forMediaTypes, getNormalClass, getSwapClass, getSwapClassMeta, isNormalObject, isSwappedObject, match, swap, toString, unswap, withTemplate, withTemplatepublic InputStreamSwap()
protected byte[] toBytes(InputStream is) throws IOException
is - The input stream to convert to bytes.IOException - Thrown by input stream.protected InputStream toStream(byte[] b, ClassMeta<?> hint)
b - The byte array.hint - Contains a hint about what subtype is being requested.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.