Interface TargetStore

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getIdentifier()
      A generic string for identifying the local store in debug messages.
      void writeTarget​(java.lang.String targetName, byte[] targetContents)
      Writes a TUF target to the local target store.
    • Method Detail

      • getIdentifier

        java.lang.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​(java.lang.String targetName,
                         byte[] targetContents)
                  throws java.io.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:
        java.io.IOException - if an error occurs