Class FileUtil
java.lang.Object
com.atlassian.jira.rest.v2.avatar.FileUtil
Created by dszuksztul on 20/03/14.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTempFile
(InputStream stream, String filenamePrefix) Creates temp file frm given streamcreateTempFileFromBoundedStream
(InputStream stream, long size, String filenamePrefix) Creates temp file frm given stream with expecteation that this stream will have given siae.createTemporaryFile
(String prefix, String suffix)
-
Constructor Details
-
FileUtil
public FileUtil()
-
-
Method Details
-
createTempFileFromBoundedStream
public File createTempFileFromBoundedStream(InputStream stream, long size, String filenamePrefix) throws LimitedOutputStream.TooBigIOException, FileUtil.StreamSizeMismatchException, IOException Creates temp file frm given stream with expecteation that this stream will have given siae.- Parameters:
stream
- stream to copy data fromsize
- expected number of bytes from streamfilenamePrefix
-- Returns:
- temp file created from stream contents
- Throws:
IOException
- some ioLimitedOutputStream.TooBigIOException
- when size of stream is bigger than expectedFileUtil.StreamSizeMismatchException
- when size of stream is smaller than expected
-
createTempFile
Creates temp file frm given stream- Parameters:
stream
- stream to copy data fromfilenamePrefix
-- Returns:
- temp file created from stream contents
- Throws:
IOException
- some io
-
createTemporaryFile
- Throws:
IOException
-