Package org.apache.juneau.swaps
Class InputStreamSwap.Hex
java.lang.Object
org.apache.juneau.swap.ObjectSwap<T,String>
 
org.apache.juneau.swap.StringSwap<InputStream>
org.apache.juneau.swaps.InputStreamSwap
org.apache.juneau.swaps.InputStreamSwap.Hex
- Enclosing class:
- InputStreamSwap
Converts 
InputStreams to hex encoding.- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.juneau.swaps.InputStreamSwapInputStreamSwap.Base64, InputStreamSwap.Hex, InputStreamSwap.SpacedHex
- 
Field SummaryFields inherited from class org.apache.juneau.swap.ObjectSwapNULL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionswap(BeanSession session, InputStream is) Converts the specifiedInputStreamto aString.unswap(BeanSession session, String s, ClassMeta<?> hint) Converts the specifiedStringto anInputStream.Methods inherited from class org.apache.juneau.swaps.InputStreamSwaptoBytes, toStreamMethods inherited from class org.apache.juneau.swap.ObjectSwapforMediaTypes, forMediaTypes, getNormalClass, getSwapClass, getSwapClassMeta, isNormalObject, isSwappedObject, match, swap, toString, unswap, withTemplate, withTemplate
- 
Constructor Details- 
Hexpublic Hex()
 
- 
- 
Method Details- 
swapConverts the specifiedInputStreamto aString.- Overrides:
- swapin class- StringSwap<InputStream>
- Parameters:
- 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.
- Returns:
- The transformed object.
- Throws:
- Exception- If a problem occurred trying to convert the output.
 
- 
unswapConverts the specifiedStringto anInputStream.- Overrides:
- unswapin class- StringSwap<InputStream>
- Parameters:
- 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.
 This may be- null if the parser cannot make this determination.
- Returns:
- The narrowed object.
- Throws:
- Exception- If this method is not implemented.
 
 
-