edu.vt.middleware.crypt.x509
Class RDNSequenceIterator

java.lang.Object
  extended by edu.vt.middleware.crypt.x509.RDNSequenceIterator
All Implemented Interfaces:
Iterable<RelativeDistinguishedName>, Iterator<RelativeDistinguishedName>

public class RDNSequenceIterator
extends Object
implements Iterator<RelativeDistinguishedName>, Iterable<RelativeDistinguishedName>

Iterates over an ASN.1 encoded RelativeDistinguishedName sequence in reverse order as specified in section 2.1 of RFC 2253 for converting an ASN.1 representation of an RDN sequence to a string.

Version:
$Revision: 578 $
Author:
Middleware Services

Constructor Summary
RDNSequenceIterator(org.bouncycastle.asn1.ASN1Sequence rdnSequence)
          Creates a new instance from an ASN.1 sequence of RDNs.
RDNSequenceIterator(byte[] encodedRDNSequence)
          Creates a new instance from the bytes comprising an encoded ASN.1 sequence of RDN types.
 
Method Summary
 boolean hasNext()
          
 Iterator<RelativeDistinguishedName> iterator()
          
 RelativeDistinguishedName next()
          
 void remove()
          Not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDNSequenceIterator

public RDNSequenceIterator(byte[] encodedRDNSequence)
Creates a new instance from the bytes comprising an encoded ASN.1 sequence of RDN types.

Parameters:
encodedRDNSequence - ASN.1 encoded sequence as a byte array.

RDNSequenceIterator

public RDNSequenceIterator(org.bouncycastle.asn1.ASN1Sequence rdnSequence)
Creates a new instance from an ASN.1 sequence of RDNs.

Parameters:
rdnSequence - ASN.1 sequence containing AttributeValueAndType items representing RDNs.
Method Detail

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator<RelativeDistinguishedName>

next

public RelativeDistinguishedName next()

Specified by:
next in interface Iterator<RelativeDistinguishedName>

remove

public void remove()
Not supported.

Specified by:
remove in interface Iterator<RelativeDistinguishedName>
Throws:
UnsupportedOperationException - In all cases.

iterator

public Iterator<RelativeDistinguishedName> iterator()

Specified by:
iterator in interface Iterable<RelativeDistinguishedName>


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.