Clearing content octets when a DerOctets is fixed.
Fix ambiguous definition on FrightStatusTypes.asn.
} while (specification != null);
try {
data.accept(this);
+ } catch (ASN1DecodingException ex) {
+ throw ex;
} catch (Exception e) {
ASN1DecodingException ex = new ASN1DecodingException();
ex.setMessage("Exception thrown while decoding process.", e,
if (e.matches(BerDecoder.this.tagClass,
BerDecoder.this.tagNumber)) {
processComponent(data, e);
+ break;
}
}
}
System.arraycopy(e, 0, encodedOctets, index, e.length);
index += e.length;
}
+ clearContents();
}
/**
}
/**
- * @return
+ * Returns all content octets.
+ *
+ * @return The array of content octets.
*/
abstract byte[][] getContents();
+
+ /**
+ * Clears content octets.
+ */
+ abstract void clearContents();
/**
* Comparator used for sorting elements by the canonical order for tags.
return new byte[][] {contents};
}
+ /* (non-Javadoc)
+ * @see jp.bitmeister.asn1.codec.ber.DerEncoder.DerOctets#clearContents()
+ */
+ @Override
+ void clearContents() {
+ contents = null;
+ }
+
}
/**
return contents;
}
+ /* (non-Javadoc)
+ * @see jp.bitmeister.asn1.codec.ber.DerEncoder.DerOctets#clearContents()
+ */
+ @Override
+ void clearContents() {
+ // nothing to do.
+ }
+
/**
* Sorts elements by the canonical order for tags.
*
import jp.bitmeister.asn1.sample.FrightStatusTypes.Status;
import jp.bitmeister.asn1.type.ASN1TagClass;
import jp.bitmeister.asn1.type.ASN1TagMode;
-import jp.bitmeister.asn1.type.builtin.SEQUENCE;
+import jp.bitmeister.asn1.type.builtin.SET;
@ASN1ModuleRef(FrightStatusTypes.class)
@ASN1Tag(value = 0, tagClass = ASN1TagClass.APPLICATION, tagMode = ASN1TagMode.IMPLICIT)
-public class FrightStatus extends SEQUENCE {
+public class FrightStatus extends SET {
@ASN1Element(0)
public FrightNumber frightNo;
public Information arrival;
@ASN1Element(3)
+ @ASN1Tag(2)
public Status status;
public FrightStatus() {}
frightNo FrightNumber,
departure [0] IMPLICIT Information,
arrival [1] IMPLICIT Information,
- status Status
+ status [2] Status
}
AllFrights ::= SEQUENCE OF FrightStatus