@Override public void endSetOf() throws IllegalStateException { endSet(LEXICOGRAPHIC_COMPARATOR); }
@Override public void endSet() throws IllegalStateException { endSet(TAG_COMPARATOR); }
@Override public void flush() { while (states.size() != 0) { EncoderState lastState = states.peekLast(); if (lastState.getTag() == SEQUENCE_TYPE) { endSequence(); } else if (lastState.getTag() == SET_TYPE) { endSet(); } } }
/** * Build the principal. On return (with any outcome), this builder is re-set for building a new principal. * * @return the constructed principal (not {@code null}) * @throws IllegalArgumentException if the principal is somehow invalid */ public X500Principal build() throws IllegalArgumentException { final DEREncoder derEncoder = new DEREncoder(); derEncoder.startSequence(); for (Collection<X500AttributeTypeAndValue> itemSet : items) { derEncoder.startSet(); for (X500AttributeTypeAndValue item : itemSet) { item.encodeTo(derEncoder); } derEncoder.endSet(); } derEncoder.endSequence(); return new X500Principal(derEncoder.getEncoded()); } }
@Override public void endSet() throws IllegalStateException { endSet(TAG_COMPARATOR); }
@Override public void endSetOf() throws IllegalStateException { endSet(LEXICOGRAPHIC_COMPARATOR); }
@Override public void endSet() throws IllegalStateException { endSet(TAG_COMPARATOR); }
@Override public void endSet() throws IllegalStateException { endSet(TAG_COMPARATOR); }
@Override public void endSetOf() throws IllegalStateException { endSet(LEXICOGRAPHIC_COMPARATOR); }
@Override public void endSetOf() throws IllegalStateException { endSet(LEXICOGRAPHIC_COMPARATOR); }
@Override public void flush() { while (states.size() != 0) { EncoderState lastState = states.peekLast(); if (lastState.getTag() == SEQUENCE_TYPE) { endSequence(); } else if (lastState.getTag() == SET_TYPE) { endSet(); } } }
@Override public void flush() { while (states.size() != 0) { EncoderState lastState = states.peekLast(); if (lastState.getTag() == SEQUENCE_TYPE) { endSequence(); } else if (lastState.getTag() == SET_TYPE) { endSet(); } } }
@Override public void flush() { while (states.size() != 0) { EncoderState lastState = states.peekLast(); if (lastState.getTag() == SEQUENCE_TYPE) { endSequence(); } else if (lastState.getTag() == SET_TYPE) { endSet(); } } }
/** * Build the principal. On return (with any outcome), this builder is re-set for building a new principal. * * @return the constructed principal (not {@code null}) * @throws IllegalArgumentException if the principal is somehow invalid */ public X500Principal build() throws IllegalArgumentException { final DEREncoder derEncoder = new DEREncoder(); derEncoder.startSequence(); for (Collection<X500AttributeTypeAndValue> itemSet : items) { derEncoder.startSet(); for (X500AttributeTypeAndValue item : itemSet) { item.encodeTo(derEncoder); } derEncoder.endSet(); } derEncoder.endSequence(); return new X500Principal(derEncoder.getEncoded()); } }
/** * Build the principal. On return (with any outcome), this builder is re-set for building a new principal. * * @return the constructed principal (not {@code null}) * @throws IllegalArgumentException if the principal is somehow invalid */ public X500Principal build() throws IllegalArgumentException { final DEREncoder derEncoder = new DEREncoder(); derEncoder.startSequence(); for (Collection<X500AttributeTypeAndValue> itemSet : items) { derEncoder.startSet(); for (X500AttributeTypeAndValue item : itemSet) { item.encodeTo(derEncoder); } derEncoder.endSet(); } derEncoder.endSequence(); return new X500Principal(derEncoder.getEncoded()); } }
/** * Build the principal. On return (with any outcome), this builder is re-set for building a new principal. * * @return the constructed principal (not {@code null}) * @throws IllegalArgumentException if the principal is somehow invalid */ public X500Principal build() throws IllegalArgumentException { final DEREncoder derEncoder = new DEREncoder(); derEncoder.startSequence(); for (Collection<X500AttributeTypeAndValue> itemSet : items) { derEncoder.startSet(); for (X500AttributeTypeAndValue item : itemSet) { item.encodeTo(derEncoder); } derEncoder.endSet(); } derEncoder.endSequence(); return new X500Principal(derEncoder.getEncoded()); } }