PdfXMPSource (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.module.pdf
Class PdfXMPSource

    java.lang.Object
      org.xml.sax.InputSource
          edu.harvard.hul.ois.jhove.XMPSource
              edu.harvard.hul.ois.jhove.module.pdf.PdfXMPSource

    public final class PdfXMPSource

extends XMPSource

Class for providing an InputSource to XMPHandler. Only an InputSource based on a Reader is supported.

Author:
  Gary McGath

Field Summary
`protected java.lang.String` | `_encoding`

Fields inherited from class edu.harvard.hul.ois.jhove.XMPSource
`_reader`

Constructor Summary
`PdfXMPSource(PdfStream stream, java.io.RandomAccessFile raf)` Constructor based on Stream object.
`PdfXMPSource(PdfStream stream, java.io.RandomAccessFile raf, java.lang.String encoding)` Constructor based on Stream object with encoding specified.

Method Summary
`protected void` | `resetReader()` Causes reading to begin from the start again.

Methods inherited from class edu.harvard.hul.ois.jhove.XMPSource
`makeProperty`

Methods inherited from class org.xml.sax.InputSource
`getByteStream, getCharacterStream, getEncoding, getPublicId, getSystemId, setByteStream, setCharacterStream, setEncoding, setPublicId, setSystemId`

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

Field Detail

### _encoding

    protected java.lang.String _encoding

Constructor Detail

### PdfXMPSource

    public PdfXMPSource(PdfStream stream,
                        java.io.RandomAccessFile raf)
                 throws java.io.UnsupportedEncodingException

  Constructor based on Stream object. Since a double read may be necessary, we have one version without encoding (before it's known), and another with encoding.

  Parameters:
    `stream` - PDFStream containing the XMP
    `raf` - The RandomAccessFile object underlying the PDF
  Throws:
    `java.io.UnsupportedEncodingException`

### PdfXMPSource

    public PdfXMPSource(PdfStream stream,
                        java.io.RandomAccessFile raf,
                        java.lang.String encoding)
                 throws java.io.UnsupportedEncodingException

  Constructor based on Stream object with encoding specified.

  Parameters:
    `stream` - PDFStream containing the XMP
    `raf` - The RandomAccessFile object underlying the PDF
    `encoding` - The character encoding to use
  Throws:
    `java.io.UnsupportedEncodingException`

Method Detail

### resetReader

    protected void resetReader()

  Description copied from class: `XMPSource`
  Causes reading to begin from the start again. Typically this means creating a new value for _reader that will start over.

  Specified by:
    `resetReader` in class `XMPSource`

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