@Component public class TemporaryBytesManager extends Object
BytesStorageService| Constructor and Description |
|---|
TemporaryBytesManager() |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
createInputStream(RepositoryFile repositoryFile,
long offset)
Creates the input stream.
|
OutputStream |
createOutputStream(FtpUser user,
RepositoryFile repositoryFile,
long offset)
Creates the output stream.
|
OutputStream |
newFile(FtpUser user,
Path path)
Create a local file for writing.
|
protected byte[] |
readTempFileToBytes(File tempFile)
Read temp file to bytes.
|
public OutputStream newFile(FtpUser user, Path path) throws IOException
BytesStorageServiceuser - the userpath - the pathIOException - Signals that an I/O exception has occurred.protected byte[] readTempFileToBytes(File tempFile) throws IOException
tempFile - the temp fileIOException - Signals that an I/O exception has occurred.public InputStream createInputStream(RepositoryFile repositoryFile, long offset) throws IOException
repositoryFile - the repository fileoffset - the offsetIOException - Signals that an I/O exception has occurred.public OutputStream createOutputStream(FtpUser user, RepositoryFile repositoryFile, long offset) throws IOException
user - the userrepositoryFile - the repository fileoffset - the offsetIOException - Signals that an I/O exception has occurred.Copyright © 2018 Global Crop Diversity Trust. All rights reserved.