org.pdfbox.pdfwriter
Class COSStandardOutputStream
FilterOutputStream
org.pdfbox.pdfwriter.COSStandardOutputStream
public class COSStandardOutputStream
extends FilterOutputStream
simple output stream with some minor features for generating "pretty"
pdf files.
static byte[] | CRLF - To be used when 2 byte sequence is enforced.
|
static byte[] | EOL - standard line separator on this platform.
|
static byte[] | LF - Line feed character.
|
long | getPos() - This will get the current position in the stream.
|
boolean | isOnNewLine() - This will tell if we are on a newling.
|
void | setOnNewLine(boolean newOnNewLine) - This will set a flag telling if we are on a newline.
|
void | write(byte[] b, int off, int len) - This will write some byte to the stream.
|
void | write(int b) - This will write a single byte to the stream.
|
void | writeCRLF() - This will write a CRLF to the stream.
|
void | writeEOL() - This will write an EOL to the stream.
|
void | writeLF() - This will write a Linefeed to the stream.
|
CRLF
public static final byte[] CRLF
To be used when 2 byte sequence is enforced.
EOL
public static final byte[] EOL
standard line separator on this platform.
LF
public static final byte[] LF
Line feed character.
COSStandardOutputStream
public COSStandardOutputStream(OutputStream out)
COSOutputStream constructor comment.
out
- The underlying stream to write to.
getPos
public long getPos()
This will get the current position in the stream.
- The current position in the stream.
isOnNewLine
public boolean isOnNewLine()
This will tell if we are on a newling.
- true If we are on a newline.
setOnNewLine
public void setOnNewLine(boolean newOnNewLine)
This will set a flag telling if we are on a newline.
newOnNewLine
- The new value for the onNewLine attribute.
write
public void write(byte[] b,
int off,
int len)
throws IOException
This will write some byte to the stream.
b
- The source byte array.off
- The offset into the array to start writing.len
- The number of bytes to write.
write
public void write(int b)
throws IOException
This will write a single byte to the stream.
b
- The byte to write to the stream.
writeCRLF
public void writeCRLF()
throws IOException
This will write a CRLF to the stream.
writeEOL
public void writeEOL()
throws IOException
This will write an EOL to the stream.
writeLF
public void writeLF()
throws IOException
This will write a Linefeed to the stream.