public class IncoreFileStorage extends Object implements FileStorage
Constructor and Description |
---|
IncoreFileStorage() |
Modifier and Type | Method and Description |
---|---|
boolean |
deleteFile(FileDescriptor fd)
Deletes file from storage
|
boolean |
deleteFile(FileDescriptor fd,
Person creator)
Deletes file from storage
|
InputStream |
readFile(FileDescriptor fd)
Read file from storage
|
URL |
storeFile(FileDescriptor fd,
InputStream is)
Store file in file storage system
|
FileDescriptor |
storeFile(InputStream is)
Store file in file storage system
|
FileDescriptor |
storeFile(String filename,
InputStream is)
Store file in file storage system
|
FileDescriptor |
storeFile(String filename,
InputStream is,
Person creator,
Dataset ds)
Store file in file storage system
|
FileDescriptor |
storeFile(String id,
String filename,
InputStream is)
Store file in file storage system
|
FileDescriptor |
storeFile(String id,
String filename,
InputStream is,
Person creator,
Dataset ds)
Store file in file storage system
|
public FileDescriptor storeFile(InputStream is) throws IOException
FileStorage
storeFile
in interface FileStorage
is
- - inputstream of the file to storeIOException
- if an I/O error occurspublic FileDescriptor storeFile(String filename, InputStream is) throws IOException
FileStorage
storeFile
in interface FileStorage
filename
- - name of the fileis
- - inputstream of the file to storeIOException
- if an I/O error occurspublic FileDescriptor storeFile(String filename, InputStream is, Person creator, Dataset ds) throws IOException
FileStorage
storeFile
in interface FileStorage
filename
- - name of the fileis
- - inputstream of the file to storecreator
- - file creatords
- - dataset to attach file toIOException
- if an I/O error occurspublic URL storeFile(FileDescriptor fd, InputStream is) throws IOException
FileStorage
storeFile
in interface FileStorage
fd
- - file descriptor to store the file withis
- - inputstream of the file to storeIOException
- if an I/O error occurspublic FileDescriptor storeFile(String id, String filename, InputStream is) throws IOException
FileStorage
storeFile
in interface FileStorage
id
- - descriptor id to store the file withfilename
- - name of the fileis
- - inputstream of the file to storeIOException
- if an I/O error occurspublic FileDescriptor storeFile(String id, String filename, InputStream is, Person creator, Dataset ds) throws IOException
FileStorage
storeFile
in interface FileStorage
id
- - descriptor id to store the file withfilename
- - name of the fileis
- - inputstream of the file to storecreator
- - file creatords
- - dataset to attach file toIOException
- if an I/O error occurspublic InputStream readFile(FileDescriptor fd) throws IOException
FileStorage
readFile
in interface FileStorage
fd
- FileDescriptor of file to readIOException
- if an I/O error occurspublic boolean deleteFile(FileDescriptor fd)
FileStorage
deleteFile
in interface FileStorage
fd
- - File descriptor representing the file to deletepublic boolean deleteFile(FileDescriptor fd, Person creator)
FileStorage
deleteFile
in interface FileStorage
fd
- - File descriptor representing the file to deletecreator
- - file creatorCopyright © 2022. All rights reserved.