final class ASCII85OutputStream
extends java.io.FilterOutputStream
Modifier and Type | Field and Description |
---|---|
private int |
count |
private boolean |
flushed |
private byte[] |
indata |
private int |
lineBreak |
private int |
maxline
Function produces five ASCII printing characters from
four bytes of binary data.
|
private static char |
NEWLINE |
private static char |
OFFSET |
private byte[] |
outdata |
private char |
terminator |
private static char |
Z |
Constructor and Description |
---|
ASCII85OutputStream(java.io.OutputStream out)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This will close the stream.
|
void |
flush()
This will flush the data to the stream.
|
int |
getLineLength()
This will get the length of the line.
|
char |
getTerminator()
This will get the terminating character.
|
void |
setLineLength(int l)
This will set the line length that will be used.
|
void |
setTerminator(char term)
This will set the terminating character.
|
private void |
transformASCII85()
This will transform the next four ascii bytes.
|
void |
write(int b)
This will write a single byte.
|
private int lineBreak
private int count
private byte[] indata
private byte[] outdata
private int maxline
private boolean flushed
private char terminator
private static final char OFFSET
private static final char NEWLINE
private static final char Z
ASCII85OutputStream(java.io.OutputStream out)
out
- The output stream to write to.public void setTerminator(char term)
term
- The terminating character.public char getTerminator()
public void setLineLength(int l)
l
- The length of the line to use.public int getLineLength()
private void transformASCII85()
public void write(int b) throws java.io.IOException
write
in class java.io.FilterOutputStream
b
- The byte to write.java.io.IOException
- If there is an error writing to the stream.public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.FilterOutputStream
java.io.IOException
- If there is an error writing the data to the stream.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterOutputStream
java.io.IOException
- If there is an error closing the wrapped stream.