Package land.oras

Class Config


@NullUnmarked public final class Config extends Descriptor
Class for config
  • Method Details

    • getAnnotations

      public @Nullable Map<String,String> getAnnotations()
      Get the annotations
      Overrides:
      getAnnotations in class Descriptor
      Returns:
      The annotations
    • withAnnotations

      public Config withAnnotations(Annotations annotations)
      Create a new config with annotations
      Parameters:
      annotations - The annotations
      Returns:
      The new config
    • withMediaType

      public Config withMediaType(String mediaType)
      Create a new config with media type
      Parameters:
      mediaType - The media type
      Returns:
      The new config
    • getDataBytes

      public byte[] getDataBytes()
      Get the data as bytes
      Returns:
      The data as bytes
    • getData

      public @Nullable String getData()
      Get the data as a string
      Returns:
      The data as a string
    • fromJson

      public static Config fromJson(String json)
      Create a config from a JSON string
      Parameters:
      json - The JSON string
      Returns:
      The config
    • empty

      public static Config empty()
      An empty config
      Returns:
      The empty config
    • fromBlob

      public static Config fromBlob(String mediaType, Layer layer)
      A config with referrence on a blob (too large for data)
      Parameters:
      mediaType - The media type
      layer - The layer
      Returns:
      The config