Package org.apache.pdfbox.pdfwriter
Class ContentStreamWriter
java.lang.Object
org.apache.pdfbox.pdfwriter.ContentStreamWriter
A class that will take a list of tokens and write out a stream with them.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte[]
standard line separatorprivate final OutputStream
static final byte[]
space character. -
Constructor Summary
ConstructorsConstructorDescriptionThis will create a new content stream writer. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
writeToken
(Operator op) Writes a single operator token.void
writeToken
(COSBase base) Writes a single operand token.void
writeTokens
(Object... tokens) Writes a series of tokens followed by a new line.void
writeTokens
(List<?> tokens) This will write out the list of tokens to the stream.
-
Field Details
-
output
-
SPACE
public static final byte[] SPACEspace character. -
EOL
public static final byte[] EOLstandard line separator
-
-
Constructor Details
-
ContentStreamWriter
This will create a new content stream writer.- Parameters:
out
- The stream to write the data to.
-
-
Method Details
-
writeToken
Writes a single operand token.- Parameters:
base
- The operand to write to the stream.- Throws:
IOException
- If there is an error writing to the stream.
-
writeToken
Writes a single operator token.- Parameters:
op
- The operator to write to the stream.- Throws:
IOException
- If there is an error writing to the stream.
-
writeTokens
Writes a series of tokens followed by a new line.- Parameters:
tokens
- The tokens to write to the stream.- Throws:
IOException
- If there is an error writing to the stream.
-
writeTokens
This will write out the list of tokens to the stream.- Parameters:
tokens
- The tokens to write to the stream.- Throws:
IOException
- If there is an error writing to the stream.
-
writeObject
- Throws:
IOException
-