| java.lang.Object | ||
| ↳ | java.io.OutputStream | |
| ↳ | com.pspdfkit.document.providers.OutputStreamAdapter | |
The OutputStreamAdapter allows you to use a WritableDataProvider in APIs that expect an OutputStream.
This uses a WritingStrategy to control how the data is passed over to the WritableDataProvider.
Obtain an instance using the OutputStreamAdapter.Builder.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| class | OutputStreamAdapter.Builder | Creates instances of the OutputStreamAdapter. |
|||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void | close() | ||||||||||
| void |
finishWritingToDataProvider()
Call this from your
WritingStrategy once your done writing all data using writeToDataProvider(byte[]) | ||||||||||
| void | write(byte[] data) | ||||||||||
| void | write(int data) | ||||||||||
| void |
writeToDataProvider(byte[] data)
Call this from your
WritingStrategy to actually write to the WritableDataProvider. | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.OutputStream
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
| |||||||||||
From interface
java.io.Flushable
| |||||||||||
From interface
java.lang.AutoCloseable
| |||||||||||
Call this from your WritingStrategy once your done writing all data using writeToDataProvider(byte[])
| IOException | If there was a problem writing to the data provider. |
|---|
Call this from your WritingStrategy to actually write to the WritableDataProvider.
| data | The data to write. |
|---|
| IOException | If there was a problem writing to the data provider. |
|---|