com.atlassian.jira.rest.v2.avatar
Class FileUtil
java.lang.Object
com.atlassian.jira.rest.v2.avatar.FileUtil
@Component
public class FileUtil
- extends Object
Created by dszuksztul on 20/03/14.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileUtil
public FileUtil()
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 io
LimitedOutputStream.TooBigIOException
- when size of stream is bigger than expected
FileUtil.StreamSizeMismatchException
- when size of stream is smaller than expected
createTempFile
public File createTempFile(InputStream stream,
String filenamePrefix)
throws IOException
- 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
public File createTemporaryFile(String prefix,
String suffix)
throws IOException
- Throws:
IOException
Copyright © 2002-2014 Atlassian. All Rights Reserved.