Writable Data Provider
WritableDataProvider is an interface which should be implemented by any DataProvider that should support saving PDF documents. Classes implementing this interface must implement all methods from this interface and from DataProvider interface for document loading and saving to work properly.
Classes implementing this interface need to implement all methods correctly to allow PSPDFKit loading documents. Furthermore, if classes with this interface are meant to be used with PdfActivity, they must also implement android.os.Parcelable. If you plan to use the DataProvider only for PdfFragment parcelation code is not necessary.
All callbacks will be called on a background thread.
Inheritors
Functions
Called by PSPDFKit after all data has been written via method. This allows the data provider to close all opened input streams. In case of WriteMode.REWRITE_FILE access, the data provider should here replace the original file with the written temporary file.
Called before writing to the file begins so the provider can prepare file output.
Reports whether this provider supports appending to output file as opposed to always rewriting it. If this returns false, only WriteMode.REWRITE_FILE will be used and the PDF file will always be fully rewritten on save.