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