| com.pspdfkit.document.providers.WritingStrategy |
Known Indirect Subclasses
|
WritingStrategy is used by the OutputStreamAdapter to determine how writing to the WritableDataProvider is handled.
Writing works in three steps:
prepare(OutputStreamAdapter) is called before any writing takes place.write(byte[]) is called until all data has been written.finishWriting() is called once all data has been written.
It is the WritingStrategys responsibility to call writeToDataProvider(byte[])
and finishWritingToDataProvider() at the appropriate times.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract void |
finishWriting()
Called by the
OutputStreamAdapter once the last byte was written. | ||||||||||
| abstract void |
prepare(OutputStreamAdapter adapter)
Called by the
OutputStreamAdapter before the first byte is written. | ||||||||||
| abstract void |
write(byte[] data)
Called by the
OutputStreamAdapter with the data that should be written. | ||||||||||
Called by the OutputStreamAdapter once the last byte was written.
You should clear your reference to the OutputStreamAdapter at this time.
| IOException |
|---|
Called by the OutputStreamAdapter before the first byte is written.
| adapter | The OutputStreamAdapter using this WritingStrategy.
|
|---|
Called by the OutputStreamAdapter with the data that should be written.
| data | The data that should be written. |
|---|
| IOException |
|---|