|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.cert.extensions.ExtendedNetworkAddress
This class holds and builds an ExtendedNetworkAddress
object that is used in the GeneralName
object.
ExtendedNetworkAddress ::= CHOICE { e163-4-address SEQUENCE { number [0] NumericString (SIZE (1..ub-e163-4-number-length)), sub-address [1] NumericString (SIZE (1..ub-e163-4-sub-address-length)) OPTIONAL }, psap-address [0] PresentationAddress } ub-e163-4-number-length INTEGER ::= 15 ub-e163-4-sub-address-length INTEGER ::= 40 |
See Also
Constructor Summary |
|
ExtendedNetworkAddress()
The default constructor for this class. |
|
ExtendedNetworkAddress(byte[] valueBER,
int offset,
int special)
Constructs an |
Method Summary |
|
clone()
Overrides the default |
|
boolean |
equals(Object obj)
Returns true if this object and obj contain the same
|
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
|
static int |
getNextBEROffset(byte[] nameBER,
int offset)
Given nameBER, the BER encoding of an
|
getNumber()
Gets the number value of the |
|
getPsapAddress()
Gets the |
|
getSubAddress()
Gets the |
|
void |
setNumber(String number)
Sets the |
void |
setPsapAddress(PresentationAddress psapAddress)
Sets the |
void |
setSubAddress(String subAddress)
Sets the |
toString()
Returns A |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ExtendedNetworkAddress(byte[] valueBER, int offset, int special) throws NameException
ExtendedNetworkAddress
object,
and initializes it with the collection of attributes
represented by valueBER.Parameters
valueBER | A | ||
offset | The offset into valueBER 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 ExtendedNetworkAddress()
Method Detail |
public void setNumber(String number) throws NameException
number
value of
the e163-4-address
.Parameters
number | A |
Throws
NameException
- If the specified
value is too long, or if
a null
value is passed.public void setSubAddress(String subAddress) throws NameException
Sub-Address
value of
the e163-4-address
.Parameters
subAddress | A |
Throws
NameException
- If the
specified value is too long, or if
a null
value is passed.public void setPsapAddress(PresentationAddress psapAddress) throws NameException
psap-address
value.Parameters
psapAddress | The |
Throws
NameException
- If the specified value is null
.public String getNumber()
e163-4-address
.
Returns
String
that specifies the number value.public String getSubAddress()
sub-address
value of
the e163-4-address
.
Returns
psap-address
value.public PresentationAddress getPsapAddress()
psap-address
value.
Returns
psap-address
value.public String toString()
String
that describes this object.
Overrides
toString
in class Object
Returns
String
that describes this object.public static int getNextBEROffset(byte[] nameBER, int offset) throws NameException
ExtendedNetworkAddress
object,
beginning at offset, finds the index to
the next element in the encoding. In other words, this
method gets the next offset after the
ExtendedNetworkAddress
object.
For example, if the offset is 120 and the
ExtendedNetworkAddress
object's BER
encoding is 1819 bytes, this method will return
1939, the index immediately following the
ExtendedNetworkAddress
object. That
is, nameBER[120]
is the first byte in
the encoding of the
ExtendedNetworkAddress
object,
nameBER[1938]
is the last byte in the
encoding of the
ExtendedNetworkAddress
object, and
the next element begins at index 1939.Parameters
nameBER | The BER encoding of
an | ||
offset | The offset into nameBER where the encoding begins. |
Returns
int
that is the index
to the next element in the BER encoding.
Throws
NameException
- If the method cannot read the BER encoding.public int getDERLen(int special)
ExtendedNetworkAddress
object. If
this object is not yet set with values, then this
method returns zero.Parameters
special | The special circumstances of the DER 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
ExtendedNetworkAddress
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 Extensionpass in the following:
special = (ASN1.CONTEXT_IMPLICIT | 1);If there are no special circumstances, pass in the following:
special = 0The following ASN.1 constants are possible values for special:
APP_IMPLICIT
, APP_EXPLICIT
,
PRIVATE_IMPLICIT
, PRIVATE_EXPLICIT
,
OPTIONAL
, DEFAULT
,
CONTEXT_IMPLICIT
,
or CONTEXT_EXPLICIT
.Parameters
encoding | A | ||
offset | The offset into encoding where writing begins. | ||
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)
ExtendedNetworkAddress
, returns false otherwise.Overrides
equals
in class Object
Parameters
obj | An instance of the |
Returns
boolean
indicating whether
these objects are equal.public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Returns
ExtendedNetworkAddress
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 |