Class ASN1Object
- java.lang.Object
-
- org.apache.sshd.common.util.io.der.ASN1Object
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class ASN1Object extends Object implements Serializable, Cloneable
- Author:
- Apache MINA SSHD Project
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static byte
CONSTRUCTED
-
Constructor Summary
Constructors Constructor Description ASN1Object()
ASN1Object(byte tag, int len, byte... data)
ASN1Object(ASN1Class c, ASN1Type t, boolean ctored, int len, byte... data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigInteger
asInteger()
Get the value asBigInteger
Object
asObject()
List<Integer>
asOID()
String
asString()
Get value as string.ASN1Object
clone()
DERParser
createParser()
boolean
equals(Object obj)
int
getLength()
ASN1Class
getObjClass()
ASN1Type
getObjType()
byte[]
getPureValueBytes()
byte[]
getValue()
int
hashCode()
boolean
isConstructed()
void
setConstructed(boolean c)
void
setLength(int l)
void
setObjClass(ASN1Class c)
void
setObjType(ASN1Type y)
void
setValue(byte[] v)
BigInteger
toInteger()
List<Integer>
toOID()
String
toString()
-
-
-
Field Detail
-
CONSTRUCTED
public static final byte CONSTRUCTED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getObjClass
public ASN1Class getObjClass()
-
setObjClass
public void setObjClass(ASN1Class c)
-
getObjType
public ASN1Type getObjType()
-
setObjType
public void setObjType(ASN1Type y)
-
isConstructed
public boolean isConstructed()
-
setConstructed
public void setConstructed(boolean c)
-
getLength
public int getLength()
-
setLength
public void setLength(int l)
-
getValue
public byte[] getValue()
-
getPureValueBytes
public byte[] getPureValueBytes()
-
setValue
public void setValue(byte[] v)
-
createParser
public DERParser createParser()
-
asObject
public Object asObject() throws IOException
- Throws:
IOException
-
asInteger
public BigInteger asInteger() throws IOException
Get the value asBigInteger
- Returns:
- BigInteger
- Throws:
IOException
- if type not anASN1Type.INTEGER
-
toInteger
public BigInteger toInteger()
-
asString
public String asString() throws IOException
Get value as string. Most strings are treated as Latin-1.- Returns:
- Java string
- Throws:
IOException
- if
-
asOID
public List<Integer> asOID() throws IOException
- Throws:
IOException
-
toOID
public List<Integer> toOID() throws IOException
- Throws:
IOException
-
clone
public ASN1Object clone()
-
-