|
Apache JAMES Mime4j 0.6-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
org.apache.james.mime4j.codec.Base64OutputStream
public class Base64OutputStream
This class implements section 6.8. Base64 Content-Transfer-Encoding from RFC 2045 Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies by Freed and Borenstein.
Code is based on Base64 and Base64OutputStream code from Commons-Codec 1.4.
Field Summary |
---|
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
Base64OutputStream(OutputStream out)
Creates a Base64OutputStream that writes the encoded data
to the given output stream using the default line length (76) and line
separator (CRLF). |
|
Base64OutputStream(OutputStream out,
int lineLength)
Creates a Base64OutputStream that writes the encoded data
to the given output stream using the given line length and the default
line separator (CRLF). |
|
Base64OutputStream(OutputStream out,
int lineLength,
byte[] lineSeparator)
Creates a Base64OutputStream that writes the encoded data
to the given output stream using the given line length and line
separator. |
Method Summary | |
---|---|
void |
close()
|
void |
flush()
|
void |
write(byte[] buffer)
|
void |
write(byte[] buffer,
int offset,
int length)
|
void |
write(int b)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Base64OutputStream(OutputStream out)
Base64OutputStream
that writes the encoded data
to the given output stream using the default line length (76) and line
separator (CRLF).
out
- underlying output stream.public Base64OutputStream(OutputStream out, int lineLength)
Base64OutputStream
that writes the encoded data
to the given output stream using the given line length and the default
line separator (CRLF).
The given line length will be rounded up to the nearest multiple of 4. If the line length is zero then the output will not be split into lines.
out
- underlying output stream.lineLength
- desired line length.public Base64OutputStream(OutputStream out, int lineLength, byte[] lineSeparator)
Base64OutputStream
that writes the encoded data
to the given output stream using the given line length and line
separator.
The given line length will be rounded up to the nearest multiple of 4. If the line length is zero then the output will not be split into lines and the line separator is ignored.
The line separator must not include characters from the BASE64 alphabet
(including the padding character =
).
out
- underlying output stream.lineLength
- desired line length.lineSeparator
- line separator to use.Method Detail |
---|
public final void write(int b) throws IOException
write
in class FilterOutputStream
IOException
public final void write(byte[] buffer) throws IOException
write
in class FilterOutputStream
IOException
public final void write(byte[] buffer, int offset, int length) throws IOException
write
in class FilterOutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class FilterOutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class FilterOutputStream
IOException
|
Apache JAMES Mime4j 0.6-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |