Package land.oras

Class Subject

java.lang.Object
land.oras.Subject

@NullMarked public final class Subject extends Object
Class for subject
  • Method Details

    • getMediaType

      public String getMediaType()
      Get the media type
      Returns:
      The media type
    • getDigest

      public String getDigest()
      Get the digest
      Returns:
      The digest
    • getSize

      public long getSize()
      Get the size
      Returns:
      The size
    • toJson

      public String toJson()
      Return the JSON representation of the manifest
      Returns:
      The JSON string
    • of

      public static Subject of(String mediaType, String digest, long size)
      Create a subject
      Parameters:
      mediaType - The media type
      digest - The digest
      size - The size
      Returns:
      The subject
    • fromJson

      public static Subject fromJson(String json)
      Create a subject from a JSON string
      Parameters:
      json - The JSON string
      Returns:
      The subject