APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.x509

public Class OIDName

extends Object
implements GeneralNameInterface
Class Inheritance
All Implemented Interfaces
sun.security.x509.GeneralNameInterface, sun.security.util.DerEncoder
Imports
java.io.IOException, sun.security.util.*

This class implements the OIDName as required by the GeneralNames ASN.1 object.
Authors
Amit Kapoor, Hemma Prafullchandra
See Also
GeneralName, GeneralNames, GeneralNameInterface

Field Summary

Modifier and TypeField and Description
private final ObjectIdentifier

Constructor Summary

AccessConstructor and Description
public
OIDName(DerValue
the encoded DER OIDName.
derValue
)

Create the OIDName object from the passed encoded Der value.

public
OIDName(ObjectIdentifier
the OIDName.
oid
)

Create the OIDName object with the specified name.

public
OIDName(String
the OIDName in form "x.y.z..."
name
)

Create the OIDName from the String form of the OID

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

constraint type above
constrains
(GeneralNameInterface
to be checked for being constrained
inputName
)

Implements sun.security.x509.GeneralNameInterface.constrains.

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.
public void
encode(DerOutputStream
the DER stream to encode the OIDName to.
out
)

Implements sun.security.util.DerEncoder.encode.

Encode the OID name into the DerOutputStream.

public boolean

Returns:

true iff the names are identical
equals
(Object obj)

Overrides java.lang.Object.equals.

Compares this name with another, for equality.

public ObjectIdentifier
getOID()

Returns this OID name.

public int
getType()

Implements sun.security.x509.GeneralNameInterface.getType.

Return the type of the GeneralName.

public int

Returns:

the hash code value for this object
hashCode
()

Overrides java.lang.Object.hashCode.

Returns the hash code value for this object.

public int

Returns:

distance of name from root
subtreeDepth
()

Implements sun.security.x509.GeneralNameInterface.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 String
toString()

Overrides java.lang.Object.toString.

Convert the name into user readable string.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

oidback to summary
private final ObjectIdentifier oid

Constructor Detail

OIDNameback to summary
public OIDName(DerValue derValue) throws IOException

Create the OIDName object from the passed encoded Der value.

Parameters
derValue:DerValue

the encoded DER OIDName.

Exceptions
IOException:
on error.
OIDNameback to summary
public OIDName(ObjectIdentifier oid)

Create the OIDName object with the specified name.

Parameters
oid:ObjectIdentifier

the OIDName.

OIDNameback to summary
public OIDName(String name) throws IOException

Create the OIDName from the String form of the OID

Parameters
name:String

the OIDName in form "x.y.z..."

Exceptions
IOException:
on error

Method Detail

constrainsback to summary
public int constrains(GeneralNameInterface inputName) throws UnsupportedOperationException

Implements sun.security.x509.GeneralNameInterface.constrains.

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:GeneralNameInterface

to be checked for being constrained

Returns:int

constraint type above

Exceptions
UnsupportedOperationException:
if name is not exact match, but narrowing and widening are not supported for this name type.
encodeback to summary
public void encode(DerOutputStream out)

Implements sun.security.util.DerEncoder.encode.

Encode the OID name into the DerOutputStream.

Parameters
out:DerOutputStream

the DER stream to encode the OIDName to.

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Compares this name with another, for equality.

Returns:boolean

true iff the names are identical

Annotations
@Override
getOIDback to summary
public ObjectIdentifier getOID()

Returns this OID name.

getTypeback to summary
public int getType()

Implements sun.security.x509.GeneralNameInterface.getType.

Return the type of the GeneralName.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hash code value for this object.

Returns:int

the hash code value for this object

Annotations
@Override
subtreeDepthback to summary
public int subtreeDepth() throws UnsupportedOperationException

Implements sun.security.x509.GeneralNameInterface.subtreeDepth.

Return subtree depth of this name for purposes of determining NameConstraints minimum and maximum bounds and for calculating path lengths in name subtrees.

Returns:int

distance of name from root

Exceptions
UnsupportedOperationException:
if not supported for this name type
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Convert the name into user readable string.