Package com.pspdfkit.document.providers
Class DirectWritingStrategy
-
- All Implemented Interfaces:
-
com.pspdfkit.document.providers.WritingStrategy
public class DirectWritingStrategy implements WritingStrategy
A WritingStrategy that immediately writes to the WritableDataProvider.
-
-
Constructor Summary
Constructors Constructor Description DirectWritingStrategy()
-
Method Summary
Modifier and Type Method Description void
prepare(@NonNull() OutputStreamAdapter adapter)
Called by the OutputStreamAdapter before the first byte is written. void
write(@NonNull() Array<byte> data)
Called by the OutputStreamAdapter with the data that should be written. void
finishWriting()
Called by the OutputStreamAdapter once the last byte was written. -
-
Method Detail
-
prepare
void prepare(@NonNull() OutputStreamAdapter adapter)
Called by the OutputStreamAdapter before the first byte is written.
- Parameters:
adapter
- The OutputStreamAdapter using this WritingStrategy.
-
write
void write(@NonNull() Array<byte> data)
Called by the OutputStreamAdapter with the data that should be written.
- Parameters:
data
- The data that should be written.
-
finishWriting
void finishWriting()
Called by the OutputStreamAdapter once the last byte was written. You should clear your reference to the OutputStreamAdapter at this time.
-
-
-
-