private int countScanBands(){
  List ids=new ArrayList();
  Iterator iter=markerSequence.iterator();
  while (iter.hasNext()) {
    MarkerSegment seg=(MarkerSegment)iter.next();
    if (seg instanceof SOSMarkerSegment) {
      SOSMarkerSegment sos=(SOSMarkerSegment)seg;
      SOSMarkerSegment.ScanComponentSpec[] specs=sos.componentSpecs;
      for (int i=0; i < specs.length; i++) {
        Integer id=new Integer(specs[i].componentSelector);
        if (!ids.contains(id)) {
          ids.add(id);
        }
      }
    }
  }
  return ids.size();
}

private int countScanBands ( ) { List ids = new ArrayList ( ) ; Iterator iter = markerSequence . iterator ( ) ; while ( iter . hasNext ( ) ) { MarkerSegment seg = ( MarkerSegment ) iter . next ( ) ; if ( seg instanceof SOSMarkerSegment ) { SOSMarkerSegment sos = ( SOSMarkerSegment ) seg ; SOSMarkerSegment . ScanComponentSpec [ ] specs = sos . componentSpecs ; for ( int i = 0 ; i < specs . length ; i ++ ) { Integer id = new Integer ( specs [ i ] . componentSelector ) ; if ( ! ids . contains ( id ) ) { ids . add ( id ) ; } } } } return ids . size ( ) ; }
returns the total number of bands referenced in all sos marker segments , including 0 if there are no sos marker segments .
