public static class InputStreamSwap.Base64 extends InputStreamSwap
InputStreams to BASE-64 encoding.InputStreamSwap.Base64, InputStreamSwap.Hex, InputStreamSwap.SpacedHex| Constructor and Description |
|---|
Base64() |
| Modifier and Type | Method and Description |
|---|---|
String |
swap(BeanSession session,
InputStream is)
Converts the specified
InputStream to a String. |
InputStream |
unswap(BeanSession session,
String s,
ClassMeta<?> hint)
Converts the specified
String to an InputStream. |
toBytes, toStreamforMediaTypes, forMediaTypes, getNormalClass, getSwapClass, getSwapClassMeta, isNormalObject, isSwappedObject, match, swap, toString, unswap, withTemplate, withTemplatepublic Base64()
public String swap(BeanSession session, InputStream is) throws Exception
InputStream to a String.swap in class StringSwap<InputStream>session - The bean session to use to get the class meta.
This is always going to be the same bean context that created this swap.is - The object to be transformed.Exception - If a problem occurred trying to convert the output.public InputStream unswap(BeanSession session, String s, ClassMeta<?> hint) throws Exception
String to an InputStream.unswap in class StringSwap<InputStream>session - The bean session to use to get the class meta.
This is always going to be the same bean context that created this swap.s - The transformed object.hint - If possible, the parser will try to tell you the object type being created.
For example, on a serialized date, this may tell you that the object being created must be of type
GregorianCalendar.
Exception - If this method is not implemented.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.