Class Overview
This class represents the OtherName as required by the GeneralNames
ASN.1 object. It supplies the generic framework to allow specific
Other Name types, and also provides minimal support for unrecognized
Other Name types.
The ASN.1 definition for OtherName is:
OtherName ::= SEQUENCE {
type-id OBJECT IDENTIFIER,
value [0] EXPLICIT ANY DEFINED BY type-id
}
Summary
Public Constructors |
|
OtherName(ObjectIdentifier oid, byte[] value)
Create the OtherName object from a passed ObjectIdentfier and
byte array name value
|
|
OtherName(DerValue derValue)
Create the OtherName object from the passed encoded Der value.
|
Public Methods |
int
|
constrains(GeneralNameInterface inputName)
Return type of constraint inputName places on this name:
- NAME_DIFF_TYPE = -1: input name is different type from name
(i.e.
|
void
|
encode(DerOutputStream out)
Encode the Other name into the DerOutputStream.
|
boolean
|
equals(Object other)
Compares this name with another, for equality.
|
byte[]
|
getNameValue()
Get name value
|
ObjectIdentifier
|
getOID()
Get ObjectIdentifier
|
int
|
getType()
Return the type of the GeneralName.
|
int
|
hashCode()
Returns the hash code for this OtherName.
|
int
|
subtreeDepth()
Return subtree depth of this name for purposes of determining
NameConstraints minimum and maximum bounds.
|
String
|
toString()
Convert the name into user readable string.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
From interface
sun.security.x509.GeneralNameInterface
abstract
int
|
constrains(GeneralNameInterface inputName)
Return type of constraint inputName places on this name:
- NAME_DIFF_TYPE = -1: input name is different type from name (i.e.
|
abstract
void
|
encode(DerOutputStream out)
Encode the name to the specified DerOutputStream.
|
abstract
int
|
getType()
Return the type of the general name, as
defined above.
|
abstract
int
|
subtreeDepth()
Return subtree depth of this name for purposes of determining
NameConstraints minimum and maximum bounds and for calculating
path lengths in name subtrees.
|
|
Public Constructors
public
OtherName
(ObjectIdentifier oid, byte[] value)
Create the OtherName object from a passed ObjectIdentfier and
byte array name value
Parameters
oid
| ObjectIdentifier of this OtherName object |
value
| the DER-encoded value of the OtherName |
public
OtherName
(DerValue derValue)
Create the OtherName object from the passed encoded Der value.
Parameters
derValue
| the encoded DER OtherName. |
Public Methods
Return type of constraint inputName places on this name:
- NAME_DIFF_TYPE = -1: input name is different type from name
(i.e. does not constrain).
- NAME_MATCH = 0: input name matches name.
- NAME_NARROWS = 1: input name narrows name (is lower in the
naming subtree)
- NAME_WIDENS = 2: input name widens name (is higher in the
naming subtree)
- NAME_SAME_TYPE = 3: input name does not match or narrow name,
but is same type.
. These results are used in checking NameConstraints during
certification path verification.
Parameters
inputName
| to be checked for being constrained |
Encode the Other name into the DerOutputStream.
Parameters
out
| the DER stream to encode the Other-Name to. |
public
boolean
equals
(Object other)
Compares this name with another, for equality.
Parameters
other
| the reference object with which to compare. |
Returns
- true iff the names are identical.
public
byte[]
getNameValue
()
public
int
getType
()
Return the type of the GeneralName.
public
int
hashCode
()
Returns the hash code for this OtherName.
public
int
subtreeDepth
()
Return subtree depth of this name for purposes of determining
NameConstraints minimum and maximum bounds.
public
String
toString
()
Convert the name into user readable string.
Returns
- a string representation of the object.