Top Description Fields Constructors Methods
com.sun.mail.util

public Class QEncoderStream

extends QPEncoderStream
Class Inheritance
Imports
java.io.*

This class implements a Q Encoder as defined by RFC 2047 for encoding MIME headers. It subclasses the QPEncoderStream class.
Author
John Mani

Field Summary

Modifier and TypeField and Description
private String
private static String
private static String

Constructor Summary

AccessConstructor and Description
public
QEncoderStream(OutputStream
the output stream
out
,
boolean
true if we are Q-encoding a word within a phrase.
encodingWord
)

Create a Q encoder that encodes the specified input stream

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

the length
encodedLength
(byte[]
the byte array
b
,
boolean
true if encoding words, false if encoding text
encodingWord
)

Returns the length of the encoded version of this byte array.

public void
write(int
the byte.
c
)

Overrides com.sun.mail.util.QPEncoderStream.write.

Encodes the specified byte to this output stream.
Inherited from com.sun.mail.util.QPEncoderStream:
closeflushoutputwritewrite

Field Detail

specialsback to summary
private String specials
TEXT_SPECIALSback to summary
private static String TEXT_SPECIALS
WORD_SPECIALSback to summary
private static String WORD_SPECIALS

Constructor Detail

QEncoderStreamback to summary
public QEncoderStream(OutputStream out, boolean encodingWord)

Create a Q encoder that encodes the specified input stream

Parameters
out:OutputStream

the output stream

encodingWord:boolean

true if we are Q-encoding a word within a phrase.

Method Detail

encodedLengthback to summary
public static int encodedLength(byte[] b, boolean encodingWord)

Returns the length of the encoded version of this byte array.

Parameters
b:byte[]

the byte array

encodingWord:boolean

true if encoding words, false if encoding text

Returns:int

the length

writeback to summary
public void write(int c) throws IOException

Overrides com.sun.mail.util.QPEncoderStream.write.

Encodes the specified byte to this output stream.

Parameters
c:int

the byte.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.