public class FilterWriter
extends java.lang.Object
StdFile outfile=new StdFile("file.dat"), StdFile.e_write_mode);
FilterWriter fwriter=new FilterWriter(outfile);
byte[] buf=...
fwriter.writeBuffer(buf);
fwriter.flush();
Constructor and Description |
---|
FilterWriter()
Instantiates a new filter writer.
|
FilterWriter(Filter filter)
Instantiates a new filter writer for specified Filter
|
Modifier and Type | Method and Description |
---|---|
long |
__GetHandle() |
void |
attachFilter(Filter filter)
Attaches a filter to the this FilterWriter.
|
long |
count()
Count number of bytes consumed since opening the filter or seek operation
|
void |
destroy()
Frees the native memory of the object.
|
void |
flush()
Forces any data remaining in the buffer to be written to input or output filter.
|
void |
flushAll()
Forces any data remaining in the filter chain to the source or destination.
|
Filter |
getAttachedFilter()
Get the attached filter.
|
void |
seek(long offset,
int origin)
Set the position within the current stream.
|
long |
tell()
Reports the current read position in the stream relative to the stream origin.
|
long |
writeBuffer(byte[] buf)
Write buffer.
|
void |
writeFilter(FilterReader reader)
Write the entire input stream to the output stream (i.e.
|
void |
writeInt(int num)
Write an integer to the output stream.
|
void |
writeLine(java.lang.String line)
Write out a null terminated 'line' followed by a end of line character
default end of line character is carriage return.
|
void |
writeString(java.lang.String str)
Write a string to the output stream.
|
void |
writeUChar(byte ch)
Write a single character to the output stream.
|
public FilterWriter() throws PDFNetException
PDFNetException
public FilterWriter(Filter filter) throws PDFNetException
filter
- the filterPDFNetException
public void destroy() throws PDFNetException
PDFNetException
public void writeUChar(byte ch) throws PDFNetException
ch
- An unsigned character to write to the output stream.PDFNetException
public void writeInt(int num) throws PDFNetException
num
- An integer to write to the output stream.PDFNetException
public void writeString(java.lang.String str) throws PDFNetException
str
- A string to write to the output stream.PDFNetException
public void writeFilter(FilterReader reader) throws PDFNetException
reader
- A FilterReader attached to an input stream.PDFNetException
public void writeLine(java.lang.String line) throws PDFNetException
line
- the linePDFNetException
public long writeBuffer(byte[] buf) throws PDFNetException
buf
- the bufPDFNetException
public void attachFilter(Filter filter) throws PDFNetException
filter
- the filterPDFNetException
public Filter getAttachedFilter() throws PDFNetException
PDFNetException
public void seek(long offset, int origin) throws PDFNetException
Note: - After each Seek() operation the number of consumed bytes (i.e. Count()) is set to 0.
offset
- - A byte offset relative to origin. If offset is negative,
the new position will precede the position specified by origin by the number
of bytes specified by offset. If offset is zero, the new position will be the
position specified by origin. If offset is positive, the new position will follow
the position specified by origin by the number of bytes specified by offset.origin
- - A value of type ReferencePos indicating the reference point used
to obtain the new positionPDFNetException
public long tell() throws PDFNetException
PDFNetException
public long count() throws PDFNetException
PDFNetException
public void flush() throws PDFNetException
PDFNetException
public void flushAll() throws PDFNetException
PDFNetException
public long __GetHandle()