com.rsa.certj.cert.attributes

Class PostalAddress

java.lang.Object
  |
  +--com.rsa.certj.cert.attributes.X501Attribute
        |
        +--com.rsa.certj.cert.attributes.PostalAddress
All Implemented Interfaces:
Cloneable, Serializable

public class PostalAddress
extends X501Attribute
implements Cloneable, Serializable

This class holds, encodes, and decodes the PostalAddress attribute, which is defined in X.520. The PostalAddress attribute type specifies the address information required for the physical delivery of postal messages by the postal authority to the named object. An attribute value for postal address is typically composed of selected attributes from the MHS Unformatted Postal O/R Address version 1 according to CCITT Recommendation F.401 and limited to six lines of 30 characters each, including a postal country name. The information contained in such an address can include an addressee's name, street address, city, state or province, postal code, and possibly a Post Office Box number depending on the specific requirements of the named object.

 postalAddress ATTRIBUTE	::=	{
	WITH SYNTAX		PostalAddress
	EQUALITY MATCHING RULE		caseIgnoreListMatch
	SUBSTRINGS MATCHING RULE	caseIgnoreListSubstringsMatch
	ID		id-at-postalAddress }
	PostalAddress	::=	SEQUENCE SIZE(1..ub-postal-line) OF
                             DirectoryString {ub-postal-string}
 }

Copyright © RSA Security Inc., 2002. All rights reserved.

See Also

Serialized Form

Fields inherited from class com.rsa.certj.cert.attributes.X501Attribute
CHALLENGE_PASSWORD, CONTENT_TYPE, COUNTRY_OF_CITIZENSHIP, COUNTRY_OF_RESIDENCE, CRS_DUAL_STATUS, CRS_FAILURE_INFO, CRS_MESSAGE_TYPE, CRS_PKI_STATUS, CRS_RECIPIENT_NONCE, CRS_SENDER_NONCE, CRS_TRANSACTION_ID, CRS_VERSION, DATE_OF_BIRTH, FRIENDLY_NAME, GENDER, LOCAL_KEY_ID, MESSAGE_DIGEST, NON_STANDARD, PLACE_OF_BIRTH, POSTAL_ADDRESS, PSEUDONYM, SIGNING_TIME, SMART_CSP, X509_V3_EXTENSION
 

Constructor Summary

PostalAddress()

Constructs an empty PostalAddress object.

PostalAddress(String postalAddress, int stringType)

Constructs a PostalAddress object and initializes it with the value given.

 

Method Summary

 void

addPostalAddress(String postalAddress, int stringType)

Adds the postalAddress address to the values of this attribute.

 Object

clone()

Overrides the default clone method to get a deeper clone.

 boolean

equals(Object obj)

Returns true if this object and obj contain the same PostalAddress; returns false, otherwise.

 String[]

getPostalAddress()

Gets the value of this attribute, the postal address.

 
Methods inherited from class com.rsa.certj.cert.attributes.X501Attribute
clearSensitiveData, compareOID, derEncodeAttributeLen, getAttributeType, getAttributeTypeString, getDEREncoding, getDERLen, getInstance, getNextBEROffset, getOID, isAttributeType
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostalAddress

public PostalAddress()
Constructs an empty PostalAddress object.

PostalAddress

public PostalAddress(String postalAddress,
                     int stringType)
              throws AttributeException
Constructs a PostalAddress object and initializes it with the value given.

Parameters

         postalAddress  

The address information required for the physical delivery of postal messages by the postal authority to the named object.

         stringType  

postalAddress is BER-encoded, as this is an ASN.1 string type. This argument must be one of the following fields: ASN1.PRINT_STRING, ASN1.UNIVERSAL_STRING, ASN1.UTF8_STRING, ASN1.BMP_STRING, ASN1.IA5_STRING, or ASN1.TELETEX_STRING.

Throws

AttributeException - If the specified stringType is invalid, or if postalAddress is null.
Method Detail

addPostalAddress

public void addPostalAddress(String postalAddress,
                             int stringType)
                      throws AttributeException
Adds the postalAddress address to the values of this attribute.

Parameters

         postalAddress  

The address information required for the physical delivery of postal messages by the postal authority to the named object.

         stringType  

postalAddress is BER-encoded, as this is an ASN.1 string type. This argument must be one of the following fields: ASN1.PRINT_STRING, ASN1.UNIVERSAL_STRING, ASN1.UTF8_STRING, ASN1.BMP_STRING, ASN1.IA5_STRING, or ASN1.TELETEX_STRING.

Throws

AttributeException - If the encoding is invalid for this attribute, or if postalAddress is null.

getPostalAddress

public String[] getPostalAddress()
Gets the value of this attribute, the postal address.

Returns

The address information required for the physical delivery of postal messages by the postal authority to the named object.

clone

public Object clone()
             throws CloneNotSupportedException
Overrides the default clone method to get a deeper clone.

Overrides

clone in class X501Attribute

Returns

A new PostalAddress object, a copy of this object.

Throws

CloneNotSupportedException - If the cloning operation is not successful.

equals

public boolean equals(Object obj)
Returns true if this object and obj contain the same PostalAddress; returns false, otherwise.

Overrides

equals in class Object

Parameters

         obj  

The instance of the PostalAddress object.

Returns

A Boolean indicating whether these objects are equal.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000