Class ObjectStorageAttachmentDataUtil
- java.lang.Object
-
- com.atlassian.confluence.impl.pages.attachments.objectstorage.ObjectStorageAttachmentDataUtil
-
public class ObjectStorageAttachmentDataUtil extends Object
- Since:
- 8.1
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
writeStreamToPath(InputStream data, com.atlassian.dc.filestore.api.FileStore.Path destFile, Long expectedFileSize)
Writes stream to destination file.
-
-
-
Method Detail
-
writeStreamToPath
public static void writeStreamToPath(InputStream data, com.atlassian.dc.filestore.api.FileStore.Path destFile, @Nullable Long expectedFileSize)
Writes stream to destination file. If the number of bytes in the stream do not match up with the expected size of the attachment an error will be thrown and the write will be aborted.- Parameters:
data
- attachment body represented as a streamdestFile
- path to copy stream intoexpectedFileSize
- expected size of the created file. May be null of no size check is to be performed.- Throws:
AttachmentDataStreamSizeMismatchException
- if the number of bytes in the stream does not match the expectedAttachmentSize
-
-