Interface TargetStore

All Superinterfaces:
TargetReader
All Known Implementing Classes:
FileSystemTufStore

public interface TargetStore extends TargetReader
Interface that defines a mutable target store functionality.
  • Method Details

    • getIdentifier

      String getIdentifier()
      A generic string for identifying the local store in debug messages. A file system based implementation might return the path being used for storage, while an in-memory store may just return something like 'in-memory'.
    • writeTarget

      void writeTarget(String targetName, byte[] targetContents) throws IOException
      Writes a TUF target to the local target store. Target names may include path elements and the storage engine should be consistent when handling writing and reading these.
      Parameters:
      targetName - the name of the target file to write (e.g. ctfe.pub)
      targetContents - the content of the target file as bytes
      Throws:
      IOException - if an error occurs