Class OtherName
- java.lang.Object
-
- org.mozilla.jss.netscape.security.x509.OtherName
-
- All Implemented Interfaces:
java.io.Serializable,GeneralNameInterface
public class OtherName extends java.lang.Object implements GeneralNameInterface
This class implements the OtherName as required by the GeneralNames ASN.1 object. OtherName ::= SEQUENCE { type-id OBJECT IDENTIFIER, value [0] EXPLICIT ANY DEFINED BY type-id }- See Also:
GeneralName,GeneralNameInterface,GeneralNames, Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.mozilla.jss.netscape.security.x509.GeneralNameInterface
NAME_ANY, NAME_DIRECTORY, NAME_DNS, NAME_EDI, NAME_IP, NAME_OID, NAME_RFC822, NAME_URI, NAME_X400
-
-
Constructor Summary
Constructors Constructor Description OtherName(byte[] data)OtherName(DerValue derValue)Create the IPAddressName object from the passed encoded Der value.OtherName(ObjectIdentifier oid, byte[] data)OtherName(ObjectIdentifier oid, byte tag, java.lang.String value)Constructs a string-based other name.OtherName(ObjectIdentifier oid, java.lang.String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(java.io.InputStream in)voidencode(DerOutputStream out)Encode the IPAddress name into the DerOutputStream.ObjectIdentifiergetOID()intgetType()Return the type of the GeneralName.byte[]getValue()java.lang.StringtoStr(byte[] data)java.lang.StringtoString()Return a printable string of IPaddress-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.mozilla.jss.netscape.security.x509.GeneralNameInterface
validSingle, validSubtree
-
-
-
-
Constructor Detail
-
OtherName
public OtherName(DerValue derValue) throws java.io.IOException
Create the IPAddressName object from the passed encoded Der value.- Parameters:
derValue- the encoded DER IPAddressName.- Throws:
java.io.IOException- on error.
-
OtherName
public OtherName(ObjectIdentifier oid, byte[] data) throws java.io.IOException
- Throws:
java.io.IOException
-
OtherName
public OtherName(ObjectIdentifier oid, byte tag, java.lang.String value) throws java.io.IOException
Constructs a string-based other name.- Throws:
java.io.IOException
-
OtherName
public OtherName(ObjectIdentifier oid, java.lang.String value) throws java.io.IOException
- Throws:
java.io.IOException
-
OtherName
public OtherName(byte[] data)
-
-
Method Detail
-
getOID
public ObjectIdentifier getOID()
-
getType
public int getType()
Return the type of the GeneralName.- Specified by:
getTypein interfaceGeneralNameInterface
-
encode
public void encode(DerOutputStream out) throws java.io.IOException
Encode the IPAddress name into the DerOutputStream.- Specified by:
encodein interfaceGeneralNameInterface- Parameters:
out- the DER stream to encode the IPAddressName to.- Throws:
java.io.IOException- on encoding errors.
-
decode
public void decode(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
getValue
public byte[] getValue()
-
toString
public java.lang.String toString()
Return a printable string of IPaddress- Overrides:
toStringin classjava.lang.Object
-
toStr
public java.lang.String toStr(byte[] data)
-
-