java.lang.Object | ||
↳ | com.pdftron.filters.Filter | |
↳ | com.pdftron.filters.MemoryFilter |
MemoryFilter is a memory buffer that can be used as a source or a sink Filter in the Filter pipeline. When a MemoryFilter is the source, other filters can read data stored in memory; When MemoryFilter is a sink, other filters generate data which is then pushed in a memory buffer owned by MemoryFilter (MemoryFilter makes sure that there is enough space to accomodate all data).
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MemoryFilter(long buf_sz, boolean is_input)
Instantiates a new memory filter with specified buffer size.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
byte[] |
getBuffer()
Get the memory buffer
Note: MemoryFilter specific function. | ||||||||||
void |
setAsInputFilter()
Set the MemoryBuffer as input filter
Note: MemoryFilter-specific function used to change filter mode from output to input. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.filters.Filter
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.lang.AutoCloseable
|
Instantiates a new memory filter with specified buffer size.
buf_sz | the buffer size |
---|---|
is_input | determine whether the MemoryFilter is input or not |
PDFNetException |
---|
Get the memory buffer
Note: MemoryFilter specific function.
PDFNetException |
---|
Set the MemoryBuffer as input filter
Note: MemoryFilter-specific function used to change filter mode from output to input. The utility function is useful in cases when an output data buffer should be converted to an input stream.
Note: The function has no effect on an input MemoryFilter.
PDFNetException |
---|