Exemple #1
0
  /**
   * @param item The DataItem to examine
   * @return true if the DataItem has one of the SOF marker id's
   */
  protected boolean isSOF(DataItem item) {
    if (!(item instanceof Marker)) {
      return false;
    }

    Marker marker = (Marker) item;
    int id = marker.getMarkerId();

    return ((id >= SofSegment.FIRST1_MARKERID && id <= SofSegment.LAST1_MARKERID)
        || (id >= SofSegment.FIRST2_MARKERID && id <= SofSegment.LAST2_MARKERID)
        || (id >= SofSegment.FIRST3_MARKERID && id <= SofSegment.LAST3_MARKERID)
        || (id >= SofSegment.FIRST4_MARKERID && id <= SofSegment.LAST4_MARKERID));
  }
Exemple #2
0
  /**
   * @param item The DataItem to examine
   * @return true if the DataItem is one of the segment types that the standard calls Tables/Misc
   */
  protected boolean isTablesMisc(DataItem item) {
    if (!(item instanceof Marker)) {
      return false;
    }

    Marker marker = (Marker) item;
    int id = marker.getMarkerId();

    return (id == DqtSegment.MARKERID
        || id == DhtSegment.MARKERID
        || id == DacSegment.MARKERID
        || id == DriSegment.MARKERID
        || id == ComSegment.MARKERID
        || (id >= AppNSegment.FIRST_MARKERID && id <= AppNSegment.LAST_MARKERID));
  }