Class Signature

  • Direct Known Subclasses:
    ExternalSignature, InternalSignature

    public abstract class Signature
    extends Object
    This class encapsulates information about format signatures, both internal and external. The value of a Signature may be either a String or a byte array (stored as an int array to avoid signed byte problems).
    • Constructor Detail

      • Signature

        protected Signature​(String value,
                            SignatureType type,
                            SignatureUseType use)
        A Signature cannot be created directly; this constructor can be called as the superclass constructor from a subclass. This constructor uses a String value.
      • Signature

        protected Signature​(int[] value,
                            SignatureType type,
                            SignatureUseType use)
        A Signature cannot be created directly; this constructor can be called as the superclass constructor from a subclass. This constructor uses a byte array (stored as an int array) value.
      • Signature

        protected Signature​(String value,
                            SignatureType type,
                            SignatureUseType use,
                            String note)
        A Signature cannot be created directly; this constructor can be called as the superclass constructor from a subclass. This constructor uses a String value and allows specification of a note.
      • Signature

        protected Signature​(int[] value,
                            SignatureType type,
                            SignatureUseType use,
                            String note)
        A Signature cannot be created directly; this constructor can be called as the superclass constructor from a subclass. This constructor uses a byte array (stored as an int array) value and allows specification of a note.
    • Method Detail

      • getType

        public SignatureType getType()
        Returns the type of this Signature
      • getUse

        public SignatureUseType getUse()
        Returns the use requirement for this Signature
      • getValue

        public int[] getValue()
        Returns the byte array value for this Signature. If this Signature was constructed from a String, it returns the characters of the String as the bytes of the array.
      • getNote

        public String getNote()
        Returns the note specified for this Signature, or null if no note was specified.
      • isStringValue

        public boolean isStringValue()
        Returns true if this Signature's value was provided as a String, false if as an array.
      • getValueString

        public String getValueString()
        Returns the string value of this Signature. Returns null if this Signature was constructed with an array.
      • getValueHexString

        public String getValueHexString()
        Returns the value of this Signature as a hexadecimal string. The length of the string is twice the length of the array or string from which this Signature was created, and all alphabetic characters are lower case.