Signature (JHOVE Documentation)
Date: 2013-09-08

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.harvard.hul.ois.jhove
Class Signature

    java.lang.Object
      edu.harvard.hul.ois.jhove.Signature

Direct Known Subclasses:
  ExternalSignature, InternalSignature

    public abstract class Signature

extends java.lang.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 Summary
`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.
`protected` | `Signature(int[] value, SignatureType type, SignatureUseType use, java.lang.String note)` A Signature cannot be created directly; this constructor can be called as the superclass constructor from a subclass.
`protected` | `Signature(java.lang.String value, SignatureType type, SignatureUseType use)` A Signature cannot be created directly; this constructor can be called as the superclass constructor from a subclass.
`protected` | `Signature(java.lang.String value, SignatureType type, SignatureUseType use, java.lang.String note)` A Signature cannot be created directly; this constructor can be called as the superclass constructor from a subclass.

Method Summary
`java.lang.String` | `getNote()` Returns the note specified for this Signature, or null if no note was specified.
`SignatureType` | `getType()` Returns the type of this Signature
`SignatureUseType` | `getUse()` Returns the use requirement for this Signature
`int[]` | `getValue()` Returns the byte array value for this Signature.
`java.lang.String` | `getValueHexString()` Returns the value of this Signature as a hexadecimal string.
`java.lang.String` | `getValueString()` Returns the string value of this Signature.
`boolean` | `isStringValue()` Returns true if this Signature's value was provided as a String, false if as an array.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Signature

    protected Signature(java.lang.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(java.lang.String value,
                        SignatureType type,
                        SignatureUseType use,
                        java.lang.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,
                        java.lang.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 java.lang.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 java.lang.String getValueString()

  Returns the string value of this Signature. Returns null if this Signature was constructed with an array.

### getValueHexString

    public java.lang.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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD