Interface StorageService

All Known Implementing Classes:
JpaLobStorageService

public interface StorageService
Author:
Phillip Verheyden (phillipuniverse)
  • Method Details

    • store

      void store(InputStream content, String path)
      Stores a stream to a backing provider, overwriting any data existing at the path
      Parameters:
      content - the data to store
      path - a path to reference the data by for further operations
    • read

      Optional<InputStream> read(String path) throws IOException
      Reads out previously-stored data with store(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 given path
      Parameters:
      path - the path that should be deleted from the store