Package edu.harvard.hul.ois.jhove
Class Signature
java.lang.Object
edu.harvard.hul.ois.jhove.Signature
- Direct Known Subclasses:
ExternalSignature,InternalSignature
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 Summary
ConstructorsModifierConstructorDescriptionprotectedSignature(int[] value, SignatureType type, SignatureUseType use) A Signature cannot be created directly; this constructor can be called as the superclass constructor from a subclass.protectedSignature(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.protectedSignature(String value, SignatureType type, SignatureUseType use) A Signature cannot be created directly; this constructor can be called as the superclass constructor from a subclass.protectedSignature(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. -
Method Summary
Modifier and TypeMethodDescriptiongetNote()Returns the note specified for this Signature, or null if no note was specified.getType()Returns the type of this SignaturegetUse()Returns the use requirement for this Signatureint[]getValue()Returns the byte array value for this Signature.Returns the value of this Signature as a hexadecimal string.Returns the string value of this Signature.booleanReturns true if this Signature's value was provided as a String, false if as an array.
-
Constructor Details
-
Signature
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
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
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
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 Details
-
getType
Returns the type of this Signature -
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
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
Returns the string value of this Signature. Returns null if this Signature was constructed with an array. -
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.
-