|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.cert.extensions.EDIPartyName
This class holds and builds an EDIPartyName
that
is used in the GeneralName
object.
This class is defined as follows: EDIPartyName ::= SEQUENCE { nameAssigner [0] DirectoryString {ub-name} OPTIONAL, partyName [1] DirectoryString {ub-name} } ub-name INTEGER ::= 32768 DirectoryString ::= CHOICE { teletexString TeletexString (SIZE (1..MAX)), printableString PrintableString (SIZE (1..MAX)), universalString UniversalString (SIZE (1..MAX)), utf8String UTF8String (SIZE (1.. MAX)), bmpString BMPString (SIZE (1..MAX)) } |
See Also
Constructor Summary |
|
EDIPartyName()
Constructs an empty |
|
EDIPartyName(byte[] nameBER,
int offset,
int special)
Constructs an |
Method Summary |
|
void |
addNameAssigner(String value,
int type)
Adds the assigner name. |
void |
addPartyName(String value,
int type)
Adds the party name. |
clone()
Overrides the default |
|
boolean |
equals(Object obj)
Returns |
int |
getDEREncoding(byte[] encoding,
int offset,
int special)
Places the DER encoding of this object into encoding, beginning at offset. |
int |
getDERLen(int special)
Returns the number of bytes that will be used by the DER encoding
of this |
getNameAssigner()
Returns the name assigner string. |
|
static int |
getNextBEROffset(byte[] nameBER,
int offset)
Given nameBER, the BER encoding of an EDI party name, beginning at offset, finds the index to the next element in the encoding. |
getPartyName()
Returns the party name string. |
|
toString()
Gets a string representation of the EDI party name. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EDIPartyName(byte[] nameBER, int offset, int special) throws NameException
EDIPartyName
object and
initializes it with the given values.Parameters
nameBER | A | ||
offset | The offset into the nameBER array. | ||
special | The special instructions of the BER encoding.
The following ASN.1 constants are
possible values for special:
|
public EDIPartyName()
EDIPartyName
object.Method Detail |
public void addNameAssigner(String value, int type)
Parameters
value | A | ||
type | An |
public void addPartyName(String value, int type)
Parameters
value | A | ||
type | The ASN1 |
public String getNameAssigner()
Returns
EDIPartyName
object.public String getPartyName()
Returns
public String toString()
Overrides
toString
in class Object
Returns
String
that describes this EDI
party name.public static int getNextBEROffset(byte[] nameBER, int offset) throws NameException
EDIPartyName
object.
For example, if the offset is 120 and the
EDIPartyName
object's BER encoding
is 1819 bytes, this method will return 1939, the
index immediately following the
EDIPartyName
object. That is,
nameBER[120]
is the first byte in the
encoding of the EDIPartyName
object,
nameBER[1938]
is the last byte in the
encoding of the EDIPartyName
object,
and the next element begins at index 1939.Parameters
nameBER | The BER encoding of an EDI party name. | ||
offset | The offset into nameBER where the encoding begins. |
Returns
int
that contains 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) throws NameException
EDIPartyName
object. If this object
is not set with values, this method returns 0.Parameters
special | The special DER circumstances of the encoding, if there
are any.
The following ASN.1 constants are
possible values for special:
|
Returns
Throws
NameException
- If the method cannot
get the length of the DER encoding.public int getDEREncoding(byte[] encoding, int offset, int special) throws NameException
getDERLen
. If
this object is not yet set with values, 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:
value [1] IMPLICIT OCTET STRINGpass 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 the writing begins. | ||
special | The special circumstances of the DER encoding, if there are any. |
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
EDIPartyName
,
returns false
otherwise.Overrides
equals
in class Object
Parameters
obj | The instance of the
|
Returns
boolean
indicating whether
these objects are equal .public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Returns
EDIPartyName
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 |