java.io.Closeable, java.io.Flushable, java.lang.AutoCloseablepublic class COSStandardOutputStream
extends java.io.FilterOutputStream
| Modifier and Type | Field | Description |
|---|---|---|
static byte[] |
CRLF |
To be used when 2 byte sequence is enforced.
|
static byte[] |
EOL |
standard line separator.
|
static byte[] |
LF |
Line feed character.
|
| Constructor | Description |
|---|---|
COSStandardOutputStream(java.io.OutputStream out) |
COSOutputStream constructor comment.
|
| Modifier and Type | Method | Description |
|---|---|---|
byte[] |
getFileInBytes(int[] byteRange) |
|
java.io.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 set 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.
|
public static final byte[] CRLF
public static final byte[] LF
public static final byte[] EOL
public COSStandardOutputStream(java.io.OutputStream out)
out - The underlying stream to write to.public long getPos()
public void setPos(long pos)
throws java.io.IOException
pos - the to be set position in the stream.java.io.IOExceptionpublic 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 java.io.IOException
write in class java.io.FilterOutputStreamb - The source byte array.off - The offset into the array to start writing.len - The number of bytes to write.java.io.IOException - If the underlying stream throws an exception.public void write(int b)
throws java.io.IOException
write in class java.io.FilterOutputStreamb - The byte to write to the stream.java.io.IOException - If there is an error writing to the underlying stream.public void writeCRLF()
throws java.io.IOException
java.io.IOException - If there is an error writing the data to the stream.public void writeEOL()
throws java.io.IOException
java.io.IOException - If there is an error writing to the streampublic void writeLF()
throws java.io.IOException
java.io.IOException - If there is an error writing to the underlying stream.public void mark()
throws java.io.IOException
java.io.IOExceptionpublic void reset()
throws java.io.IOException
java.io.IOExceptionpublic byte[] getFileInBytes(int[] byteRange)
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getFilterInputStream(int[] byteRange)