Top Description Fields Constructors Methods
org.bouncycastle.asn1

pack-priv Class LazyEncodedSequence

extends ASN1Sequence
Class Inheritance
Imports
java.io.IOException, java.util.Enumeration, .Iterator

Note

this class is for processing DER/DL encoded sequences only.

Field Summary

Modifier and TypeField and Description
private byte[]
Inherited from org.bouncycastle.asn1.ASN1Sequence:
elementsTYPE

Constructor Summary

AccessConstructor and Description
pack-priv
LazyEncodedSequence(byte[] encoded)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
encode(ASN1OutputStream out, boolean withTag)

Implements abstract org.bouncycastle.asn1.ASN1Primitive.encode.

pack-priv int
private synchronized void
private synchronized byte[]
public ASN1Encodable
getObjectAt(int
the sequence number (starting at zero) of the object
index
)

Overrides org.bouncycastle.asn1.ASN1Sequence.getObjectAt.

Return the object at the sequence position indicated by index.

public Enumeration<E>
public int
hashCode()

Overrides org.bouncycastle.asn1.ASN1Sequence.hashCode.

Returns a hash code value for this object.

public Iterator<ASN1Encodable>
iterator()

Overrides org.bouncycastle.asn1.ASN1Sequence.iterator.

Implements org.bouncycastle.util.Iterable.iterator.

Returns an iterator over a set of elements of type T.

public int
size()

Overrides org.bouncycastle.asn1.ASN1Sequence.size.

Return the number of objects in this sequence.

public ASN1Encodable[]
pack-priv ASN1Encodable[]
pack-priv ASN1BitString
pack-priv ASN1External
pack-priv ASN1OctetString
pack-priv ASN1Set
pack-priv ASN1Primitive
toDERObject()

Overrides org.bouncycastle.asn1.ASN1Sequence.toDERObject.

Change current SEQUENCE object to be encoded as DERSequence.

pack-priv ASN1Primitive
toDLObject()

Overrides org.bouncycastle.asn1.ASN1Sequence.toDLObject.

Change current SEQUENCE object to be encoded as DLSequence.

Inherited from org.bouncycastle.asn1.ASN1Sequence:
asn1EqualsencodeConstructedgetConstructedBitStringsgetConstructedOctetStringsgetInstancegetInstanceparsertoString

Field Detail

encodedback to summary
private byte[] encoded

Constructor Detail

LazyEncodedSequenceback to summary
pack-priv LazyEncodedSequence(byte[] encoded) throws IOException

Method Detail

encodeback to summary
pack-priv void encode(ASN1OutputStream out, boolean withTag) throws IOException

Implements abstract org.bouncycastle.asn1.ASN1Primitive.encode.

encodedLengthback to summary
pack-priv int encodedLength(boolean withTag) throws IOException

Implements abstract org.bouncycastle.asn1.ASN1Primitive.encodedLength.

forceback to summary
private synchronized void force()
getContentsback to summary
private synchronized byte[] getContents()
getObjectAtback to summary
public ASN1Encodable getObjectAt(int index)

Overrides org.bouncycastle.asn1.ASN1Sequence.getObjectAt.

Doc from org.bouncycastle.asn1.ASN1Sequence.getObjectAt.

Return the object at the sequence position indicated by index.

Parameters
index:int

the sequence number (starting at zero) of the object

Returns:ASN1Encodable

the object at the sequence position indicated by index.

getObjectsback to summary
public Enumeration<E> getObjects()

Overrides org.bouncycastle.asn1.ASN1Sequence.getObjects.

hashCodeback to summary
public int hashCode()

Overrides org.bouncycastle.asn1.ASN1Sequence.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

iteratorback to summary
public Iterator<ASN1Encodable> iterator()

Overrides org.bouncycastle.asn1.ASN1Sequence.iterator.

Implements org.bouncycastle.util.Iterable.iterator.

Doc from org.bouncycastle.util.Iterable.iterator.

Returns an iterator over a set of elements of type T.

Returns:Iterator<ASN1Encodable>

an Iterator.

sizeback to summary
public int size()

Overrides org.bouncycastle.asn1.ASN1Sequence.size.

Doc from org.bouncycastle.asn1.ASN1Sequence.size.

Return the number of objects in this sequence.

Returns:int

the number of objects in this sequence.

toArrayback to summary
public ASN1Encodable[] toArray()

Overrides org.bouncycastle.asn1.ASN1Sequence.toArray.

toArrayInternalback to summary
pack-priv ASN1Encodable[] toArrayInternal()

Overrides org.bouncycastle.asn1.ASN1Sequence.toArrayInternal.

toASN1BitStringback to summary
pack-priv ASN1BitString toASN1BitString()

Implements abstract org.bouncycastle.asn1.ASN1Sequence.toASN1BitString.

toASN1Externalback to summary
pack-priv ASN1External toASN1External()

Implements abstract org.bouncycastle.asn1.ASN1Sequence.toASN1External.

toASN1OctetStringback to summary
pack-priv ASN1OctetString toASN1OctetString()

Implements abstract org.bouncycastle.asn1.ASN1Sequence.toASN1OctetString.

toASN1Setback to summary
pack-priv ASN1Set toASN1Set()

Implements abstract org.bouncycastle.asn1.ASN1Sequence.toASN1Set.

toDERObjectback to summary
pack-priv ASN1Primitive toDERObject()

Overrides org.bouncycastle.asn1.ASN1Sequence.toDERObject.

Doc from org.bouncycastle.asn1.ASN1Sequence.toDERObject.

Change current SEQUENCE object to be encoded as DERSequence. This is part of Distinguished Encoding Rules form serialization.

Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Primitive.toDERObject.

a DER version of this.

toDLObjectback to summary
pack-priv ASN1Primitive toDLObject()

Overrides org.bouncycastle.asn1.ASN1Sequence.toDLObject.

Doc from org.bouncycastle.asn1.ASN1Sequence.toDLObject.

Change current SEQUENCE object to be encoded as DLSequence. This is part of Direct Length form serialization.

Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Primitive.toDLObject.

a DL version of this.