|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
org.apache.pdfbox.pdfwriter.COSStandardOutputStream
public class COSStandardOutputStream
simple output stream with some minor features for generating "pretty" pdf files.
Field Summary | |
---|---|
static byte[] |
CRLF
To be used when 2 byte sequence is enforced. |
static byte[] |
EOL
standard line separator. |
static byte[] |
LF
Line feed character. |
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
COSStandardOutputStream(OutputStream out)
COSOutputStream constructor comment. |
Method Summary | |
---|---|
byte[] |
getFileInBytes(int[] byteRange)
|
InputStream |
getFilterInputStream(int[] byteRange)
|
long |
getPos()
This will get the current position in the stream. |
boolean |
isOnNewLine()
This will tell if we are on a newline. |
void |
mark()
|
void |
reset()
|
void |
setOnNewLine(boolean newOnNewLine)
This will set a flag telling if we are on a newline. |
void |
setPos(long pos)
This will get the current position in the stream. |
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. |
Methods inherited from class java.io.FilterOutputStream |
---|
close, flush, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte[] CRLF
public static final byte[] LF
public static final byte[] EOL
Constructor Detail |
---|
public COSStandardOutputStream(OutputStream out)
out
- The underlying stream to write to.Method Detail |
---|
public long getPos()
public void setPos(long pos) throws IOException
IOException
public boolean isOnNewLine()
public void setOnNewLine(boolean newOnNewLine)
newOnNewLine
- The new value for the onNewLine attribute.public void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
b
- The source byte array.off
- The offset into the array to start writing.len
- The number of bytes to write.
IOException
- If the underlying stream throws an exception.public void write(int b) throws IOException
write
in class FilterOutputStream
b
- The byte to write to the stream.
IOException
- If there is an error writing to the underlying stream.public void writeCRLF() throws IOException
IOException
- If there is an error writing the data to the stream.public void writeEOL() throws IOException
IOException
- If there is an error writing to the streampublic void writeLF() throws IOException
IOException
- If there is an error writing to the underlying stream.public void mark() throws IOException
IOException
public void reset() throws IOException
IOException
public byte[] getFileInBytes(int[] byteRange) throws IOException
IOException
public InputStream getFilterInputStream(int[] byteRange)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |