Package org.apache.pdfbox.pdfwriter
Class ContentStreamWriter
- java.lang.Object
-
- org.apache.pdfbox.pdfwriter.ContentStreamWriter
-
public class ContentStreamWriter extends java.lang.Object
A class that will take a list of tokens and write out a stream with them.
-
-
Constructor Summary
Constructors Constructor Description ContentStreamWriter(java.io.OutputStream out)
This will create a new content stream writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
writeObject(java.lang.Object o)
void
writeToken(Operator op)
Writes a single operator token.void
writeToken(COSBase base)
Writes a single operand token.void
writeTokens(java.lang.Object... tokens)
Writes a series of tokens followed by a new line.void
writeTokens(java.util.List<?> tokens)
This will write out the list of tokens to the stream.
-
-
-
Method Detail
-
writeToken
public void writeToken(COSBase base) throws java.io.IOException
Writes a single operand token.- Parameters:
base
- The operand to write to the stream.- Throws:
java.io.IOException
- If there is an error writing to the stream.
-
writeToken
public void writeToken(Operator op) throws java.io.IOException
Writes a single operator token.- Parameters:
op
- The operator to write to the stream.- Throws:
java.io.IOException
- If there is an error writing to the stream.
-
writeTokens
public void writeTokens(java.lang.Object... tokens) throws java.io.IOException
Writes a series of tokens followed by a new line.- Parameters:
tokens
- The tokens to write to the stream.- Throws:
java.io.IOException
- If there is an error writing to the stream.
-
writeTokens
public void writeTokens(java.util.List<?> tokens) throws java.io.IOException
This will write out the list of tokens to the stream.- Parameters:
tokens
- The tokens to write to the stream.- Throws:
java.io.IOException
- If there is an error writing to the stream.
-
writeObject
private void writeObject(java.lang.Object o) throws java.io.IOException
- Throws:
java.io.IOException
-
-