Interface StorageService
- All Known Implementing Classes:
JpaLobStorageService
public interface StorageService
- Author:
- Phillip Verheyden (phillipuniverse)
-
Method Summary
Modifier and TypeMethodDescriptionReads out previously-stored data withstore(InputStream, String)
void
Deletes the resource at the givenpath
void
store
(InputStream content, String path) Stores a stream to a backing provider, overwriting any data existing at thepath
-
Method Details
-
store
Stores a stream to a backing provider, overwriting any data existing at thepath
- Parameters:
content
- the data to storepath
- a path to reference the data by for further operations
-
read
Reads out previously-stored data withstore(InputStream, String)
- Parameters:
path
- the original path that was used to store the file- Returns:
- a stream to the resource or an empty optional if nothing was found at the given
path
- Throws:
IOException
- if the InputStream could not be opened
-
remove
Deletes the resource at the givenpath
- Parameters:
path
- the path that should be deleted from the store
-