public class RFC2231Encoder extends Object implements Encoder
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
decodingTable |
protected String |
DEFAULT_SPECIALS |
protected byte[] |
encodingTable |
protected String |
specials |
| Constructor and Description |
|---|
RFC2231Encoder() |
RFC2231Encoder(String specials) |
| Modifier and Type | Method and Description |
|---|---|
int |
decode(byte[] data,
int off,
int length,
OutputStream out)
decode the RFC2231 encoded byte data writing it to the given output stream
|
String |
decode(String data)
Decode an RFC2231 encoded string.
|
int |
decode(String data,
OutputStream out)
decode the RFC2231 encoded String data writing it to the given output stream.
|
int |
encode(byte[] data,
int off,
int length,
OutputStream out)
encode the input data producing an RFC2231 output stream.
|
String |
encode(String charset,
String language,
String data)
Encode a string as an RFC2231 encoded parameter, using the
given character set and language.
|
protected void |
initialiseDecodingTable() |
protected final byte[] encodingTable
protected String DEFAULT_SPECIALS
protected String specials
protected final byte[] decodingTable
public RFC2231Encoder()
public RFC2231Encoder(String specials)
protected void initialiseDecodingTable()
public int encode(byte[] data,
int off,
int length,
OutputStream out)
throws IOException
encode in interface EncoderIOExceptionpublic int decode(byte[] data,
int off,
int length,
OutputStream out)
throws IOException
decode in interface EncoderIOExceptionpublic int decode(String data, OutputStream out) throws IOException
decode in interface EncoderIOExceptionpublic String encode(String charset, String language, String data) throws IOException
charset - The source character set (the MIME version).language - The encoding language.data - The data to encode.IOExceptionpublic String decode(String data) throws IOException, UnsupportedEncodingException
data - The data to decode.IOExceptionUnsupportedEncodingExceptionCopyright © 2013. All Rights Reserved.