gov.nasa.gsfc.drl.rtstps.core.output.hdf5
Class RDRAllReader

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.output.hdf5.RDRAllReader
All Implemented Interfaces:
java.util.Iterator<RawApplicationPackets>

public class RDRAllReader
extends java.lang.Object
implements java.util.Iterator<RawApplicationPackets>

Iterator for read a specific RDR_All such CrIS-SCIENCE-RDR_All in an HDF file


Field Summary
private  long counter
           
private  long numObjects
           
private  int rootGroup
           
 
Constructor Summary
RDRAllReader(int group, RDRName rdrName)
          Construct an RDR reader, using RDRName object
RDRAllReader(int group, RDRName rdrName, boolean doNotOpen)
          Construct an RDR reader, using RDRName object and an already open group.
RDRAllReader(int group, java.lang.String rdrNameAll)
          Construct an RDR reader, this includes the "All" at the end of the name.
 
Method Summary
 void close()
          Close the RDR_All group
 boolean hasNext()
          Return if there are any RawApplicationPackets left in the RDR_All
 RawApplicationPackets next()
          Return the next RawApplicationPacket item in the RDR_All
private  void open(int group, java.lang.String rdrName)
          Open the RDR_All group
 void remove()
          Not supported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rootGroup

private int rootGroup

numObjects

private long numObjects

counter

private long counter
Constructor Detail

RDRAllReader

RDRAllReader(int group,
             java.lang.String rdrNameAll)
       throws RtStpsException
Construct an RDR reader, this includes the "All" at the end of the name. Note this is package private and must be called by another class

Parameters:
group - the RDR_All HDF group of interest
rdrNameAll - the name of the RDR in a String, includes the "All" in the name, i.e. "CrIS-SCIENCE-RDR_All"
Throws:
RtStpsException - wraps any HDF exceptions

RDRAllReader

RDRAllReader(int group,
             RDRName rdrName)
       throws RtStpsException
Construct an RDR reader, using RDRName object

Parameters:
group - the RDR_All HDF group of interest
rdrName - the RDR name of interest as an RDRName
Throws:
RtStpsException - wraps any HDF exceptions

RDRAllReader

RDRAllReader(int group,
             RDRName rdrName,
             boolean doNotOpen)
       throws RtStpsException
Construct an RDR reader, using RDRName object and an already open group. This is used only in the dereference case from Aggregate. The flag is not checked, just its presence.

Parameters:
group - the RDR_All HDF group of interest
rdrName - the RDR name of interest as an RDRName
doNotOpen - a way to differentiate this constructor, the value is not used
Throws:
RtStpsException - wraps any HDF exceptions
Method Detail

open

private void open(int group,
                  java.lang.String rdrName)
           throws RtStpsException
Open the RDR_All group

Parameters:
group - the RDR_All HDF group of interest
rdrName - the fully constructed RDR name
Throws:
RtStpsException - wraps any HDF exceptions

close

public void close()
           throws RtStpsException
Close the RDR_All group

Throws:
RtStpsException - wraps any HDF exceptions

hasNext

public boolean hasNext()
Return if there are any RawApplicationPackets left in the RDR_All

Specified by:
hasNext in interface java.util.Iterator<RawApplicationPackets>
Returns:
true or false

next

public RawApplicationPackets next()
Return the next RawApplicationPacket item in the RDR_All

Specified by:
next in interface java.util.Iterator<RawApplicationPackets>
Returns:
the next RawApplicationPackets

remove

public void remove()
Not supported

Specified by:
remove in interface java.util.Iterator<RawApplicationPackets>