|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
edu.vt.middleware.crypt.io.AbstractEncodingFilterOutputStream
edu.vt.middleware.crypt.io.Base64FilterOutputStream
public class Base64FilterOutputStream
Encodes raw bytes into base-64 encoded character bytes in the wrapped output stream.
| Field Summary | |
|---|---|
static int |
LINE_LENGTH_64
Wrap lines at 64 characters. |
static int |
LINE_LENGTH_76
Wrap lines at 76 characters. |
static char |
LINE_TERMINATOR
Line termination character. |
| Fields inherited from class java.io.FilterOutputStream |
|---|
out |
| Constructor Summary | |
|---|---|
Base64FilterOutputStream(OutputStream out)
Creates a base-64 filter output stream around the given output stream. |
|
Base64FilterOutputStream(OutputStream out,
int charsPerLine)
/** Creates a base-64 filter output stream around the given output stream. |
|
| Method Summary | |
|---|---|
void |
close()
|
protected void |
flushToStream()
Encodes the contents of the write buffer and writes the result to the wrapped output stream. |
protected void |
writeEncoded(byte[] data,
int offset,
int length)
Encode the given raw bytes and write the result to the wrapped output stream. |
| Methods inherited from class edu.vt.middleware.crypt.io.AbstractEncodingFilterOutputStream |
|---|
write, write, write |
| Methods inherited from class java.io.FilterOutputStream |
|---|
flush |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LINE_LENGTH_64
public static final int LINE_LENGTH_76
public static final char LINE_TERMINATOR
| Constructor Detail |
|---|
public Base64FilterOutputStream(OutputStream out)
out - Output stream to wrap.
public Base64FilterOutputStream(OutputStream out,
int charsPerLine)
out - Output stream to wrap.charsPerLine - Number of characters per line of encoded output. Must
be one of LINE_LENGTH_64, LINE_LENGTH_76, or 0 to
indicate no wrapping.| Method Detail |
|---|
public void close()
throws IOException
close in interface Closeableclose in class FilterOutputStreamIOException
protected void writeEncoded(byte[] data,
int offset,
int length)
throws IOException
writeEncoded in class AbstractEncodingFilterOutputStreamdata - Raw bytes to be encoded and written.offset - Starting index of data to be written in input byte array.length - Number of bytes to be written from input byte array.
IOException - On write errors.
protected void flushToStream()
throws IOException
IOException - On write errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||