@Override public void decode(ByteBuffer content) throws IOException { chosenField = null; setValue(null); super.decode(content); }
@Override public void decode(ByteBuffer content) throws IOException { chosenField = null; setValue(null); super.decode(content); }
protected void setChoiceValue(EnumType index, Asn1Type value) { if (fieldInfos[index.getValue()].getIndex() != index) { throw new IllegalArgumentException("Incorrect choice option to set"); } this.chosenField = fieldInfos[index.getValue()]; setValue(value); }
protected void setChoiceValue(EnumType index, Asn1Type value) { if (fieldInfos[index.getValue()].getIndex() != index) { throw new IllegalArgumentException("Incorrect choice option to set"); } this.chosenField = fieldInfos[index.getValue()]; setValue(value); }
public boolean matchAndSetValue(Tag tag) { int foundPos = -1; for (int i = 0; i < fieldInfos.length; i++) { if (tag.isContextSpecific()) { if (fieldInfos[i].getTagNo() == tag.tagNo()) { foundPos = i; break; } } else if (tags[i].equals(tag)) { foundPos = i; break; } } if (foundPos != -1) { this.chosenField = fieldInfos[foundPos]; setValue(fieldInfos[foundPos].createFieldValue()); return true; } return false; }
public boolean matchAndSetValue(Tag tag) { int foundPos = -1; for (int i = 0; i < fieldInfos.length; i++) { if (tag.isContextSpecific()) { if (fieldInfos[i].getTagNo() == tag.tagNo()) { foundPos = i; break; } } else if (tags[i].equals(tag)) { foundPos = i; break; } } if (foundPos != -1) { this.chosenField = fieldInfos[foundPos]; setValue(fieldInfos[foundPos].createFieldValue()); return true; } return false; }