|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.mail.util.RFC2231Encoder
public class RFC2231Encoder
Encoder for RFC2231 encoded parameters RFC2231 string are encoded as charset'language'encoded-text and encoded-text = *(char / hexchar) where char is any ASCII character in the range 33-126, EXCEPT the characters "%" and " ". hexchar is an ASCII "%" followed by two upper case hexadecimal digits.
Field Summary | |
---|---|
protected byte[] |
decodingTable
|
protected String |
DEFAULT_SPECIALS
|
protected byte[] |
encodingTable
|
protected String |
specials
|
Constructor Summary | |
---|---|
RFC2231Encoder()
|
|
RFC2231Encoder(String specials)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final byte[] encodingTable
protected String DEFAULT_SPECIALS
protected String specials
protected final byte[] decodingTable
Constructor Detail |
---|
public RFC2231Encoder()
public RFC2231Encoder(String specials)
Method Detail |
---|
protected void initialiseDecodingTable()
public int encode(byte[] data, int off, int length, OutputStream out) throws IOException
encode
in interface Encoder
IOException
public int decode(byte[] data, int off, int length, OutputStream out) throws IOException
decode
in interface Encoder
IOException
public int decode(String data, OutputStream out) throws IOException
decode
in interface Encoder
IOException
public 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.
IOException
public String decode(String data) throws IOException, UnsupportedEncodingException
data
- The data to decode.
IOException
UnsupportedEncodingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |