Package org.apache.pdfbox.filter
Class ASCII85OutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.pdfbox.filter.ASCII85OutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
This class represents an ASCII85 output stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate booleanprivate byte[]private intprivate intFunction produces five ASCII printing characters from four bytes of binary data.private static final charprivate static final charprivate byte[]private charprivate static final charFields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()This will close the stream.voidflush()This will flush the data to the stream.intThis will get the length of the line.charThis will get the terminating character.voidsetLineLength(int l) This will set the line length that will be used.voidsetTerminator(char term) This will set the terminating character.private voidThis will transform the next four ascii bytes.voidwrite(int b) This will write a single byte.Methods inherited from class java.io.FilterOutputStream
write, writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
lineBreak
private int lineBreak -
count
private int count -
indata
private byte[] indata -
outdata
private byte[] outdata -
maxline
private int maxlineFunction produces five ASCII printing characters from four bytes of binary data. -
flushed
private boolean flushed -
terminator
private char terminator -
OFFSET
private static final char OFFSET- See Also:
-
NEWLINE
private static final char NEWLINE- See Also:
-
Z
private static final char Z- See Also:
-
-
Constructor Details
-
ASCII85OutputStream
ASCII85OutputStream(OutputStream out) Constructor.- Parameters:
out- The output stream to write to.
-
-
Method Details
-
setTerminator
public void setTerminator(char term) This will set the terminating character.- Parameters:
term- The terminating character.
-
getTerminator
public char getTerminator()This will get the terminating character.- Returns:
- The terminating character.
-
setLineLength
public void setLineLength(int l) This will set the line length that will be used.- Parameters:
l- The length of the line to use.
-
getLineLength
public int getLineLength()This will get the length of the line.- Returns:
- The line length attribute.
-
transformASCII85
private void transformASCII85()This will transform the next four ascii bytes. -
write
This will write a single byte.- Overrides:
writein classFilterOutputStream- Parameters:
b- The byte to write.- Throws:
IOException- If there is an error writing to the stream.
-
flush
This will flush the data to the stream.- Specified by:
flushin interfaceFlushable- Overrides:
flushin classFilterOutputStream- Throws:
IOException- If there is an error writing the data to the stream.
-
close
This will close the stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException- If there is an error closing the wrapped stream.
-