public class Base64OutputStream
extends java.io.FilterOutputStream
endBase64()
close()
to write out the final padding.
The class also automatically puts line breaks in the output stream.
Minor modifications made for use in Starlink software: constructors now take OutputStream not PrintStream, assertion mechanism changed.
Constructor | Description |
---|---|
Base64OutputStream(java.io.OutputStream out) |
Create a stream that does not insert line breaks.
|
Base64OutputStream(java.io.OutputStream out,
int quadsPerLine) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
This invokes
endBase64() and
closes the next stream downstream. |
void |
endBase64() |
Calling this will put the ending padding on the base64 stream,
so don't call it until you have no data left.
|
void |
write(byte[] buffer) |
|
void |
write(byte[] buffer,
int offset,
int count) |
|
void |
write(int oneByte) |
public Base64OutputStream(java.io.OutputStream out)
public Base64OutputStream(java.io.OutputStream out, int quadsPerLine)
quadsPerLine
- Number of 4-character blocks to write before
outputting a line break. For example, for 76-characters per line,
pass in 76/4 = 19.public void write(int oneByte) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void close() throws java.io.IOException
endBase64()
and
closes the next stream downstream.close
in class java.io.FilterOutputStream
java.io.IOException
public void endBase64() throws java.io.IOException
java.io.IOException
public void write(byte[] buffer) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(byte[] buffer, int offset, int count) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.