public class RFC2231Encoder extends java.lang.Object implements Encoder
Modifier and Type | Field and Description |
---|---|
protected byte[] |
decodingTable |
protected java.lang.String |
DEFAULT_SPECIALS |
protected byte[] |
encodingTable |
protected java.lang.String |
specials |
Constructor and Description |
---|
RFC2231Encoder() |
RFC2231Encoder(java.lang.String specials) |
Modifier and Type | Method and Description |
---|---|
int |
decode(byte[] data,
int off,
int length,
java.io.OutputStream out)
decode the RFC2231 encoded byte data writing it to the given output stream
|
java.lang.String |
decode(java.lang.String data)
Decode an RFC2231 encoded string.
|
int |
decode(java.lang.String data,
java.io.OutputStream out)
decode the RFC2231 encoded String data writing it to the given output stream.
|
int |
encode(byte[] data,
int off,
int length,
java.io.OutputStream out)
encode the input data producing an RFC2231 output stream.
|
java.lang.String |
encode(java.lang.String charset,
java.lang.String language,
java.lang.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 java.lang.String DEFAULT_SPECIALS
protected java.lang.String specials
protected final byte[] decodingTable
public RFC2231Encoder()
public RFC2231Encoder(java.lang.String specials)
protected void initialiseDecodingTable()
public int encode(byte[] data, int off, int length, java.io.OutputStream out) throws java.io.IOException
public int decode(byte[] data, int off, int length, java.io.OutputStream out) throws java.io.IOException
public int decode(java.lang.String data, java.io.OutputStream out) throws java.io.IOException
public java.lang.String encode(java.lang.String charset, java.lang.String language, java.lang.String data) throws java.io.IOException
charset
- The source character set (the MIME version).language
- The encoding language.data
- The data to encode.java.io.IOException
public java.lang.String decode(java.lang.String data) throws java.io.IOException, java.io.UnsupportedEncodingException
data
- The data to decode.java.io.IOException
java.io.UnsupportedEncodingException