public class FileSystemAttachmentDataUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
TEMP_FILE_PREFIX
Used to prefix all temp files created as part of writing an attachment input stream to disk.
|
Constructor and Description |
---|
FileSystemAttachmentDataUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cleanupEmptyAncestors(File file,
File stopAtFile) |
static void |
writeStreamToFile(InputStream data,
File destFile,
Long expectedFileSize)
Writes stream to destination file.
|
public static final String TEMP_FILE_PREFIX
#writeStreamToFile(java.io.InputStream, java.io.File, long)
,
Constant Field Valuespublic static void writeStreamToFile(InputStream data, File destFile, Long expectedFileSize)
data
- attachment body represented as a streamdestFile
- file to copy stream intoexpectedFileSize
- expected size of the created file. May be null of no size check is to be performed.AttachmentDataStreamSizeMismatchException
- if the number of bytes in the stream does not match the expectedAttachmentSizeCopyright © 2003–2016 Atlassian. All rights reserved.