@FunctionalInterface public static interface FileStore.Writer
FileStore.| Modifier and Type | Method and Description |
|---|---|
default void |
write(byte[] data)
Writes the given byte array to the file.
|
default void |
write(FileStore.InputStreamSupplier inputStreamSupplier)
Writes the data provided by the given
FileStore.InputStreamSupplier to the file. |
default void |
write(FileStore.OutputStreamWriter bufferWriter)
Writes to the file using an
FileStore.OutputStreamWriter. |
void |
write(InputStream source)
Writes the data from the given
InputStream to the file. |
void write(@WillNotClose InputStream source) throws IOException, FileStoreAccessDeniedException
InputStream to the file.
It is the responsibility of the caller to ensure that the source stream is closed when no longer required.source - The InputStream containing the data to be written.IOException - If the file cannot be written, or if the source cannot be read.FileStoreAccessDeniedException - if the required permissions to write the file are not present.default void write(FileStore.InputStreamSupplier inputStreamSupplier) throws IOException, FileStoreAccessDeniedException
FileStore.InputStreamSupplier to the file.inputStreamSupplier - An FileStore.InputStreamSupplier which provides an InputStream.IOException - If the file cannot be written to, or if the source cannot be read.FileStoreAccessDeniedException - if the required permissions to write the file are not present.default void write(byte[] data)
throws IOException,
FileStoreAccessDeniedException
data - The bytes to be written.IOException - If the file cannot be writen to.FileStoreAccessDeniedException - if the required permissions to write the file are not present.default void write(FileStore.OutputStreamWriter bufferWriter) throws IOException, FileStoreAccessDeniedException
FileStore.OutputStreamWriter.
The default implementation will write the contents into a memory buffer, then the buffer will written to the file.
Implementing classes may change this behaviour.bufferWriter - The FileStore.OutputStreamWriter which will write the file contents.IOException - If the file cannot be written to.FileStoreAccessDeniedException - if the required permissions to write the file are not present.Copyright © 2021–2024 Atlassian. All rights reserved.