com.sun.mail.util
Class QEncoderStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.sun.mail.util.QPEncoderStream
com.sun.mail.util.QEncoderStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class QEncoderStream
- extends QPEncoderStream
This class implements a Q Encoder as defined by RFC 2047 for
encoding MIME headers. It subclasses the QPEncoderStream class.
- Author:
- John Mani
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary |
QEncoderStream(java.io.OutputStream out,
boolean encodingWord)
Create a Q encoder that encodes the specified input stream |
Method Summary |
static int |
encodedLength(byte[] b,
boolean encodingWord)
Returns the length of the encoded version of this byte array. |
void |
write(int c)
Encodes the specified byte to this output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QEncoderStream
public QEncoderStream(java.io.OutputStream out,
boolean encodingWord)
- Create a Q encoder that encodes the specified input stream
- Parameters:
out
- the output streamencodingWord
- true if we are Q-encoding a word within a
phrase.
write
public void write(int c)
throws java.io.IOException
- Encodes the specified
byte
to this output stream.
- Overrides:
write
in class QPEncoderStream
- Parameters:
c
- the byte
.
- Throws:
java.io.IOException
- if an I/O error occurs.
encodedLength
public static int encodedLength(byte[] b,
boolean encodingWord)
- Returns the length of the encoded version of this byte array.
Copyright © 2011 Sun Microsystems, Inc.. All Rights Reserved.