@Component public class FileUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FileUtil.StreamSizeMismatchException |
Constructor and Description |
---|
FileUtil() |
Modifier and Type | Method and Description |
---|---|
File |
createTempFile(InputStream stream,
String filenamePrefix)
Creates temp file frm given stream
|
File |
createTempFileFromBoundedStream(InputStream stream,
long size,
String filenamePrefix)
Creates temp file frm given stream with expecteation that this stream will have given siae.
|
File |
createTemporaryFile(String prefix,
String suffix) |
public File createTempFileFromBoundedStream(InputStream stream, long size, String filenamePrefix) throws LimitedOutputStream.TooBigIOException, FileUtil.StreamSizeMismatchException, IOException
stream
- stream to copy data fromsize
- expected number of bytes from streamfilenamePrefix
- IOException
- some ioLimitedOutputStream.TooBigIOException
- when size of stream is bigger than expectedFileUtil.StreamSizeMismatchException
- when size of stream is smaller than expectedpublic File createTempFile(InputStream stream, String filenamePrefix) throws IOException
stream
- stream to copy data fromfilenamePrefix
- IOException
- some iopublic File createTemporaryFile(String prefix, String suffix) throws IOException
IOException
Copyright © 2002-2022 Atlassian. All Rights Reserved.