Package org.apache.pdfbox.io
Class ASCII85OutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.pdfbox.io.ASCII85OutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
This class represents an ASCII85 output stream.
- Author:
- Ben Litchfield
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
This will close the stream.final void
flush()
This will flush the data to the stream.int
This will get the length of the line.char
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.final void
write
(int b) This will write a single byte.Methods inherited from class java.io.FilterOutputStream
write, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
ASCII85OutputStream
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.
-
write
This will write a single byte.- Overrides:
write
in 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:
flush
in interfaceFlushable
- Overrides:
flush
in classFilterOutputStream
- Throws:
IOException
- If there is an error writing the data to the stream.
-
close
This will close the stream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
- If there is an error closing the wrapped stream.
-