|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.cert.extensions.PresentationAddress
This class is used in the GeneralNames
object.
PresentationAddress ::= SEQUENCE { pSelector [0] EXPLICIT OCTET STRING OPTIONAL, sSelector [1] EXPLICIT OCTET STRING OPTIONAL, tSelector [2] EXPLICIT OCTET STRING OPTIONAL, nAddresses [3] EXPLICIT SET SIZE (1..MAX) OF OCTET STRING } |
See Also
Constructor Summary |
|
PresentationAddress()
Constructs an empty |
|
PresentationAddress(byte[] nameBER,
int offset,
int special)
Constructs a |
Method Summary |
|
clone()
Overrides the default |
|
boolean |
equals(Object obj)
Returns |
int |
getDEREncoding(byte[] encoding,
int offset,
int special)
Places the DER encoding of the
|
int |
getDERLen(int special)
Returns the number of bytes that will be used by the DER encoding of
this |
byte[][] |
getNAddresses()
Gets the value of the |
static int |
getNextBEROffset(byte[] nameBER,
int offset)
Gets the next offset after the name:
Given nameBER, the BER encoding of an
|
byte[] |
getPSelector()
Gets the value of |
byte[] |
getSSelector()
Gets the value of |
byte[] |
getTSelector()
Gets the value of |
void |
setNAddress(byte[] data,
int offset,
int len)
Adds the value of |
void |
setPSelector(byte[] data,
int offset,
int len)
Sets the value of |
void |
setSSelector(byte[] data,
int offset,
int len)
Sets the value of |
void |
setTSelector(byte[] data,
int offset,
int len)
Sets the value of |
toString()
Returns a |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PresentationAddress(byte[] nameBER, int offset, int special) throws NameException
PresentationAddress
object and
initializes it with the given values.Parameters
nameBER | A | ||
offset | The offset into nameBER where the encoding begins. | ||
special | The special circumstances of the BER encoding,
if there are any.
The following ASN.1 constants are
possible values for special:
|
Throws
NameException
- If the encoding is invalid.public PresentationAddress()
PresentationAddress
object.Method Detail |
public void setPSelector(byte[] data, int offset, int len) throws NameException
PSelector
in this object.Parameters
data | The | ||
offset | The offset into data where the value begins. | ||
len | The length of the data in the data array. |
Throws
NameException
- If data is
null
or if len is 0.public void setSSelector(byte[] data, int offset, int len) throws NameException
SSelector
in this object.Parameters
data | The | ||
offset | The offset into data where the value begins. | ||
len | The length of the data in the data array. |
Throws
NameException
- If data is null
or if len is 0
.public void setTSelector(byte[] data, int offset, int len) throws NameException
TSelector
in this object.Parameters
data | The | ||
offset | The offset into data where the value begins. | ||
len | The length of the data in the data array. |
Throws
NameException
- If data is
null
or if len is 0
.public void setNAddress(byte[] data, int offset, int len) throws NameException
nAddress
into this object.Parameters
data | The | ||
offset | The offset into data where the value begins. | ||
len | The length of the data in the data array. |
Throws
NameException
- If data is
null
or if len is 0
.public byte[] getPSelector()
PSelector
in this object.
Returns
byte
array that
contains the PSelector
data.public byte[] getSSelector()
SSelector
in this object.
Returns
byte
array that
contains the SSelector
data.public byte[] getTSelector()
TSelector
in this object.
Returns
byte
array that
contains the TSelector
data.public byte[][] getNAddresses()
nAddresses
field.
Returns
byte
arrays that
contain the nAddresses
value.public String toString()
String
that describes this
PresentationAddress
object.
Overrides
toString
in class Object
Returns
String
that describes this
PresentationAddress
object.public static int getNextBEROffset(byte[] nameBER, int offset) throws NameException
PresentationAddress
object, beginning at
offset, finds the index to the next element
in the encoding.
For example, if the offset is 120 and the length of the
BER encoding of the PresentationAddress
object is 1819
bytes, this method returns 1939, the index
immediately following the PresentationAddress
object. nameBER[120
] is the first
byte in the encoding of the PresentationAddress
object, nameBER[1938]
is the last byte in the
encoding of the PresentationAddress
object, and the
next element begins at index 1939.Parameters
nameBER | The BER encoding of a | ||
offset | The offset into nameBER where the encoding begins. |
Returns
Throws
NameException
- If the method cannot read
the BER encoding.public int getDERLen(int special)
PresentationAddress
object. If this object is not set
with values, this method returns zero.Parameters
special | The special DER circumstances of the encoding, if there
are any.
The following ASN.1 constants are
possible values for special:
|
Returns
public int getDEREncoding(byte[] encoding, int offset, int special) throws NameException
PresentationAddress
object into
encoding, beginning at offset. To determine
the length of the encoding, call getDERLen
. If
this object is not yet set with values, then this method
places nothing into the array and returns zero. To indicate
that the DER encoding should follow any special
instructions, use the special argument.
For example, to indicate the following:
extension [1] IMPLICIT Extension |
special = (ASN1.CONTEXT_IMPLICIT | 1); |
special = 0 |
APP_IMPLICIT
, APP_EXPLICIT
,
PRIVATE_IMPLICIT
, PRIVATE_EXPLICIT
,
OPTIONAL
, DEFAULT
,
CONTEXT_IMPLICIT
,
or CONTEXT_EXPLICIT
.Parameters
encoding | The | ||
offset | The offset into encoding where to begin writing. | ||
special | The special circumstances of the DER encoding, if there
are any.
The following ASN.1 constants are
possible values for special:
|
Returns
Throws
NameException
- If the method cannot create
the DER encoding.public boolean equals(Object obj)
true
if this object and obj
contain the same PresentationAddress
, returns
false
otherwise.Overrides
equals
in class Object
Parameters
obj | An instance of the |
Returns
boolean
that indicates whether
these objects are equal.public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Returns
PresentationAddress
object,
a copy of this object.
Throws
CloneNotSupportedException
- If the cloning
operation is not successful.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |