TopLevelBoxHolder (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.jpeg2000
Class TopLevelBoxHolder

    java.lang.Object
      edu.harvard.hul.ois.jhove.module.jpeg2000.BoxHolder
          edu.harvard.hul.ois.jhove.module.jpeg2000.TopLevelBoxHolder

All Implemented Interfaces:
  java.util.Iterator<java.lang.Object>

    public class TopLevelBoxHolder

extends BoxHolder

A subclass of BoxHolder specifically for getting top-level boxes in a JPEG 2000 file.

Author:
  Gary McGath

Field Summary

Fields inherited from class edu.harvard.hul.ois.jhove.module.jpeg2000.BoxHolder
`_boxHeader, _dstrm, _module, _parentBox, _raf, _repInfo, bytesLeft, filePos, hasBoxes`

Constructor Summary
`TopLevelBoxHolder(Jpeg2000Module module, java.io.RandomAccessFile raf, RepInfo info, java.io.DataInputStream dstream)`

Method Summary
`protected java.lang.String` | `getSelfPropName()` Returns a name for use in messages.
`boolean` | `hasNext()` Checks if any more subboxes are available.

Methods inherited from class edu.harvard.hul.ois.jhove.module.jpeg2000.BoxHolder
`getFilePos, next, remove, superboxOverrun, superboxUnderrun`

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

Constructor Detail

### TopLevelBoxHolder

    public TopLevelBoxHolder(Jpeg2000Module module,
                             java.io.RandomAccessFile raf,
                             RepInfo info,
                             java.io.DataInputStream dstream)

Parameters:
  `raf` -

Method Detail

### getSelfPropName

    protected java.lang.String getSelfPropName()

  Returns a name for use in messages.

  Overrides:
    `getSelfPropName` in class `BoxHolder`

### hasNext

    public boolean hasNext()

  Description copied from class: `BoxHolder`
  Checks if any more subboxes are available. This class doesn't fully conform to the Iterator interface, as there are some cases where the lack of more boxes won't be detected till an EOF is encounterd. So callers should call `hasNext` to avoid reading overruns, and then test the value returned by `next` for nullity.

  Specified by:
    `hasNext` in interface `java.util.Iterator<java.lang.Object>`
  Overrides:
    `hasNext` in class `BoxHolder`

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