Class InputHeader<T extends RpmBaseTag>

    • Constructor Summary

      Constructors 
      Constructor Description
      InputHeader​(HeaderValue[] entries, long start, long length)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<HeaderValue> getEntry​(int tag)  
      java.util.Optional<HeaderValue> getEntry​(T tag)  
      long getLength()
      Get the length of header section in the stream
      java.util.Optional<java.lang.Object> getOptionalTag​(int tag)  
      java.util.Optional<java.lang.Object> getOptionalTag​(T tag)  
      java.util.Map<java.lang.Integer,​HeaderValue> getRawTags()  
      long getStart()
      Get the start position of the header section in the stream
      java.lang.Object getTag​(int tag)  
      java.lang.Object getTag​(T tag)  
      java.lang.Object getTagOrDefault​(int tag, java.lang.Object defaultValue)  
      java.lang.Object getTagOrDefault​(T tag, java.lang.Object defaultValue)  
      java.util.Optional<java.lang.Object> getValue​(T tag)
      Get the value from a header structure
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InputHeader

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

      • 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 java.lang.Object getTag​(T tag)
      • getTag

        public java.lang.Object getTag​(int tag)
      • getValue

        public java.util.Optional<java.lang.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 java.util.Optional<java.lang.Object> getOptionalTag​(T tag)
      • getOptionalTag

        public java.util.Optional<java.lang.Object> getOptionalTag​(int tag)
      • getEntry

        public java.util.Optional<HeaderValue> getEntry​(T tag)
      • getEntry

        public java.util.Optional<HeaderValue> getEntry​(int tag)
      • getTagOrDefault

        public java.lang.Object getTagOrDefault​(T tag,
                                                java.lang.Object defaultValue)
      • getTagOrDefault

        public java.lang.Object getTagOrDefault​(int tag,
                                                java.lang.Object defaultValue)
      • getRawTags

        public java.util.Map<java.lang.Integer,​HeaderValue> getRawTags()