public class FileStorageDisk extends Object implements FileStorage
| Constructor and Description |
|---|
FileStorageDisk() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
deleteFile(FileDescriptor fd)
Deletes file from storage
|
boolean |
deleteFile(FileDescriptor fd,
Person creator)
Deletes file from storage
|
String |
getFolder() |
int |
getLevels() |
InputStream |
readFile(FileDescriptor fd)
Read file from storage
|
void |
setFolder(String folder) |
void |
setLevels(int levels) |
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)
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)
Store file in file storage system
|
public int getLevels()
public void setLevels(int levels)
levels - the levels to setpublic String getFolder()
public void setFolder(String folder)
folder - the folder to setpublic FileDescriptor storeFile(InputStream is) throws IOException
FileStoragestoreFile in interface FileStorageis - - inputstream of the file to storeIOException - if an I/O error occurspublic FileDescriptor storeFile(String filename, InputStream is, Person creator) throws IOException
FileStoragestoreFile in interface FileStoragefilename - - name of the fileis - - inputstream of the file to storecreator - - file creatorIOException - if an I/O error occurspublic FileDescriptor storeFile(String filename, InputStream is) throws IOException
FileStoragestoreFile in interface FileStoragefilename - - name of the fileis - - inputstream of the file to storeIOException - if an I/O error occurspublic URL storeFile(FileDescriptor fd, InputStream is) throws IOException
FileStoragestoreFile in interface FileStoragefd - - 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, Person creator) throws IOException
FileStoragestoreFile in interface FileStorageid - - descriptor id to store the file withfilename - - name of the fileis - - inputstream of the file to storecreator - - file creatorIOException - if an I/O error occurspublic FileDescriptor storeFile(String id, String filename, InputStream is) throws IOException
FileStoragestoreFile in interface FileStorageid - - descriptor id to store the file withfilename - - name of the fileis - - inputstream of the file to storeIOException - if an I/O error occurspublic boolean deleteFile(FileDescriptor fd, Person creator)
FileStoragedeleteFile in interface FileStoragefd - - File descriptor representing the file to deletecreator - - file creatorpublic boolean deleteFile(FileDescriptor fd)
FileStoragedeleteFile in interface FileStoragefd - - File descriptor representing the file to deletepublic InputStream readFile(FileDescriptor fd) throws IOException
FileStoragereadFile in interface FileStoragefd - FileDescriptor of file to readIOException - if an I/O error occursCopyright © 2017. All rights reserved.