|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.mail.util.QuotedPrintableEncoder
public class QuotedPrintableEncoder
Field Summary | |
---|---|
protected int |
bytesWritten
|
protected int |
cachedCharacter
|
protected static byte[] |
decodingTable
|
protected int |
deferredWhitespace
|
protected static byte[] |
encodingTable
|
protected boolean |
lastCR
|
protected boolean |
lastWhitespace
|
protected int |
lineCount
|
protected int |
lineLength
|
protected OutputStream |
out
|
Constructor Summary | |
---|---|
QuotedPrintableEncoder()
|
|
QuotedPrintableEncoder(OutputStream out)
|
|
QuotedPrintableEncoder(OutputStream out,
int lineLength)
|
Method Summary | |
---|---|
int |
decode(byte[] data,
int off,
int length,
OutputStream out)
decode the uuencoded byte data writing it to the given output stream |
int |
decode(InputStream in)
|
int |
decode(String data,
OutputStream out)
decode the UUEncoded String data writing it to the given output stream. |
int |
decodeWord(byte[] data,
int off,
int length,
OutputStream out)
decode the uuencoded byte data writing it to the given output stream |
int |
decodeWord(byte[] data,
OutputStream out)
Decode a byte array of data. |
int |
encode(byte[] data,
int off,
int length)
encode the input data producing a UUEncoded output stream. |
int |
encode(byte[] data,
int off,
int length,
OutputStream out)
encode the input data producing a UUEncoded output stream. |
int |
encode(byte[] data,
int off,
int length,
String specials)
encode the input data producing a UUEncoded output stream. |
void |
encode(int ch)
|
void |
encode(int ch,
String specials)
Specialized version of the decoder that handles encoding of RFC 2047 encoded word values. |
int |
encode(PushbackInputStream in,
StringBuffer out,
String specials,
int limit)
encode the input data producing a UUEncoded output stream. |
void |
encodeWord(byte[] data,
StringBuffer out,
String charset,
String specials)
Perform RFC-2047 word encoding using Base64 data encoding. |
void |
encodeWord(InputStream in,
String charset,
String specials,
OutputStream out,
boolean fold)
Perform RFC-2047 word encoding using Q-P data encoding. |
void |
encodeWordData(byte[] data,
StringBuffer out,
String specials)
Perform RFC-2047 word encoding using Q-P data encoding. |
int |
estimateEncodedLength(byte[] data,
String specials)
Estimate the final encoded size of a segment of data. |
void |
writeCharacter(int ch)
|
void |
writeEncodedCharacter(int ch)
|
void |
writeEOL()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final byte[] encodingTable
protected static final byte[] decodingTable
protected OutputStream out
protected int bytesWritten
protected int lineCount
protected int lineLength
protected int deferredWhitespace
protected int cachedCharacter
protected boolean lastCR
protected boolean lastWhitespace
Constructor Detail |
---|
public QuotedPrintableEncoder()
public QuotedPrintableEncoder(OutputStream out)
public QuotedPrintableEncoder(OutputStream out, int lineLength)
Method Detail |
---|
public int encode(byte[] data, int off, int length) throws IOException
data
- The array of byte data.off
- The starting offset within the data.length
- Length of the data to encode.
IOException
public void encode(int ch) throws IOException
IOException
public int encode(byte[] data, int off, int length, String specials) throws IOException
data
- The array of byte data.off
- The starting offset within the data.length
- Length of the data to encode.
IOException
public int encode(PushbackInputStream in, StringBuffer out, String specials, int limit) throws IOException
data
- The array of byte data.off
- The starting offset within the data.length
- Length of the data to encode.
IOException
public void encode(int ch, String specials) throws IOException
ch
- specials
-
IOException
public int encode(byte[] data, int off, int length, OutputStream out) throws IOException
encode
in interface Encoder
data
- The array of byte data.off
- The starting offset within the data.length
- Length of the data to encode.out
- The output stream the encoded data is written to.
IOException
public int decode(byte[] data, int off, int length, OutputStream out) throws IOException
decode
in interface Encoder
data
- The array of byte data to decode.off
- Starting offset within the array.length
- The length of data to encode.out
- The output stream used to return the decoded data.
IOException
public int decodeWord(byte[] data, OutputStream out) throws IOException
data
- The data array.out
- The output stream target for the decoded data.
IOException
public int decodeWord(byte[] data, int off, int length, OutputStream out) throws IOException
data
- The array of byte data to decode.off
- Starting offset within the array.length
- The length of data to encode.out
- The output stream used to return the decoded data.
IOException
public int decode(String data, OutputStream out) throws IOException
decode
in interface Encoder
data
- The String data to decode.out
- The output stream to write the decoded data to.
IOException
public void writeEncodedCharacter(int ch) throws IOException
IOException
public void writeCharacter(int ch) throws IOException
IOException
public void writeEOL() throws IOException
IOException
public int decode(InputStream in) throws IOException
IOException
public void encodeWord(InputStream in, String charset, String specials, OutputStream out, boolean fold) throws IOException
in
- The source for the encoded data.charset
- The charset tag to be added to each encoded data section.specials
- The set of special characters that we require to encoded.out
- The output stream where the encoded data is to be written.fold
- Controls whether separate sections of encoded data are separated by
linebreaks or whitespace.
IOException
public void encodeWord(byte[] data, StringBuffer out, String charset, String specials) throws IOException
in
- The source for the encoded data.charset
- The charset tag to be added to each encoded data section.out
- The output stream where the encoded data is to be written.fold
- Controls whether separate sections of encoded data are separated by
linebreaks or whitespace.
IOException
public void encodeWordData(byte[] data, StringBuffer out, String specials) throws IOException
in
- The source for the encoded data.charset
- The charset tag to be added to each encoded data section.specials
- The set of special characters that we require to encoded.out
- The output stream where the encoded data is to be written.fold
- Controls whether separate sections of encoded data are separated by
linebreaks or whitespace.
IOException
public int estimateEncodedLength(byte[] data, String specials)
data
- The data we're anticipating encoding.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |