Interface StorageService
-
- All Known Implementing Classes:
JpaLobStorageService
public interface StorageService
- Author:
- Phillip Verheyden (phillipuniverse)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<InputStream>
read(String path)
Reads out previously-stored data withstore(InputStream, String)
void
remove(String path)
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 Detail
-
store
void store(InputStream content, String path)
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
Optional<InputStream> read(String path) throws IOException
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
void remove(String path)
Deletes the resource at the givenpath
- Parameters:
path
- the path that should be deleted from the store
-
-