public class ASCII85OutputStream extends java.io.FilterOutputStream implements ASCII85Constants, Finalizable
Modifier and Type | Field and Description |
---|---|
private long |
buffer |
private int |
bw |
private static boolean |
DEBUG |
private int |
pos |
private int |
posinline |
END, EOD, EOL, POW85, START, ZERO, ZERO_ARRAY
Constructor and Description |
---|
ASCII85OutputStream(java.io.OutputStream out) |
Modifier and Type | Method and Description |
---|---|
private void |
checkedWrite(byte[] buf) |
private void |
checkedWrite(byte[] buf,
boolean nosplit) |
private void |
checkedWrite(byte[] buf,
int len) |
private void |
checkedWrite(byte[] buf,
int len,
boolean nosplit) |
void |
close() |
private byte[] |
convertWord(long word)
This converts a 32 bit value (4 bytes) into 5 bytes using base 85.
|
void |
finalizeStream()
This method can be called instead of close() on a subclass of
FilteredOutputStream when a final marker has to be written to the target
stream, but close() cannot be called.
|
void |
write(int b) |
private static final boolean DEBUG
private int pos
private long buffer
private int posinline
private int bw
public ASCII85OutputStream(java.io.OutputStream out)
FilterOutputStream
public void write(int b) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
FilterOutputStream
private void checkedWrite(byte[] buf) throws java.io.IOException
java.io.IOException
private void checkedWrite(byte[] buf, boolean nosplit) throws java.io.IOException
java.io.IOException
private void checkedWrite(byte[] buf, int len) throws java.io.IOException
java.io.IOException
private void checkedWrite(byte[] buf, int len, boolean nosplit) throws java.io.IOException
java.io.IOException
private byte[] convertWord(long word)
word
- the 32 bit unsigned (hence the long datatype) wordpublic void finalizeStream() throws java.io.IOException
Finalizable
finalizeStream
in interface Finalizable
java.io.IOException
- In case of an IO problemFinalizable
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
FilterOutputStream