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 byteCONSTRUCTED
-
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 BigIntegerasInteger()Get the value asBigIntegerObjectasObject()List<Integer>asOID()StringasString()Get value as string.ASN1Objectclone()DERParsercreateParser()booleanequals(Object obj)intgetLength()ASN1ClassgetObjClass()ASN1TypegetObjType()byte[]getPureValueBytes()byte[]getValue()inthashCode()booleanisConstructed()voidsetConstructed(boolean c)voidsetLength(int l)voidsetObjClass(ASN1Class c)voidsetObjType(ASN1Type y)voidsetValue(byte[] v)BigIntegertoInteger()List<Integer>toOID()StringtoString()
-
-
-
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()
-
-