public final class EncodingHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.io.InputStream |
decode(java.io.InputStream inputStream,
EncodingType encodingType)
Decodes the provided InputStream using the specified encoding type.
|
static byte[] |
encode(java.io.ByteArrayOutputStream baos,
EncodingType encodingType)
Encodes the provided ByteArrayOutputStream using the specified encoding type.
|
public static byte[] encode(java.io.ByteArrayOutputStream baos, EncodingType encodingType)
baos
- The ByteArrayOutputStream to encodeencodingType
- The encoding to usepublic static java.io.InputStream decode(java.io.InputStream inputStream, EncodingType encodingType) throws java.io.IOException
inputStream
- The InputStream to decodeencodingType
- The encoding to usejava.io.IOException
- If an error occurs decoding the input streamjava.lang.IllegalArgumentException
- if the specified encodingType is not supportedCopyright © 2005-2020 Apache Software Foundation. All Rights Reserved.