Class InputHeader<T extends RpmBaseTag>

java.lang.Object
org.eclipse.packager.rpm.parse.InputHeader<T>
All Implemented Interfaces:
ReadableHeader<T>

public class InputHeader<T extends RpmBaseTag> extends Object implements ReadableHeader<T>
  • Constructor Details

    • InputHeader

      public InputHeader(HeaderValue[] entries, long start, long length)
  • Method Details

    • getStart

      public long getStart()
      Get the start position of the header section in the stream
      Returns:
      the start position
    • getLength

      public long getLength()
      Get the length of header section in the stream
      Returns:
      the length of the header in bytes
    • getTag

      public Object getTag(T tag)
    • getTag

      public Object getTag(int tag)
    • getValue

      public Optional<Object> getValue(T tag)
      Description copied from interface: ReadableHeader
      Get the value from a header structure
      Specified by:
      getValue in interface ReadableHeader<T extends RpmBaseTag>
      Parameters:
      tag - the tag
      Returns:
      the optional value
    • getOptionalTag

      public Optional<Object> getOptionalTag(T tag)
    • getOptionalTag

      public Optional<Object> getOptionalTag(int tag)
    • getEntry

      public Optional<HeaderValue> getEntry(T tag)
    • getEntry

      public Optional<HeaderValue> getEntry(int tag)
    • getTagOrDefault

      public Object getTagOrDefault(T tag, Object defaultValue)
    • getTagOrDefault

      public Object getTagOrDefault(int tag, Object defaultValue)
    • getRawTags

      public Map<Integer,HeaderValue> getRawTags()