public class ASN1GenericPrimitive extends java.lang.Object implements ASN1TaggedObject
| Constructor and Description |
|---|
ASN1GenericPrimitive(ASN1Object o, int tag)
Creates a new ASN.1 primitive object, with the specified tag and the context-specific tag class, which has the given ASN.1 object as its underlying value.
|
ASN1GenericPrimitive(ASN1Object o, int tag, int tagClass)
Creates a new ASN.1 primitive object, with the specified tag and tag class, which has the given ASN.1 object as its underlying value.
|
ASN1GenericPrimitive(byte[] body, int tag)
Creates a new ASN.1 generic primitive object, with the given tag and the context-specific tag class.
|
ASN1GenericPrimitive(byte[] body, int tag, int tagClass)
Creates a new ASN.1 generic primitive object, with the given tag and tag class.
|
ASN1GenericPrimitive(java.io.InputStream is) |
ASN1GenericPrimitive(java.io.InputStream is, int tag) |
ASN1GenericPrimitive(java.io.InputStream is, int tag, int tagClass) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBody() |
ASN1Header |
getHeader() |
int |
getTag() |
int |
getTagClass() |
void |
input(java.io.InputStream is)
Inputs this object from the specified input stream.
|
int |
length()
Length of this object's encoding.
|
void |
output(java.io.OutputStream os)
Outputs this object to the specified output stream.
|
ASN1Object |
withTag(int tag)
Creates a new ASN.1 object, which has the same body as this one, but with the given tag and UNIVERSAL class.
|
ASN1Object |
withTag(int tag, int tagClass)
Creates a new ASN.1 object, which has the same body as this one, but with the given tag and tag class.
|
public ASN1GenericPrimitive(byte[] body,
int tag)
public ASN1GenericPrimitive(byte[] body,
int tag,
int tagClass)
public ASN1GenericPrimitive(ASN1Object o, int tag)
o - the underlying value, which must be a primitive-encoded ASN.1 objecttag - the tagtagClass - the tag classpublic ASN1GenericPrimitive(ASN1Object o, int tag, int tagClass)
o - the underlying value, which must be a primitive-encoded ASN.1 objecttag - the tagtagClass - the tag class
public ASN1GenericPrimitive(java.io.InputStream is)
throws java.io.IOException
java.io.IOException
public ASN1GenericPrimitive(java.io.InputStream is,
int tag)
throws java.io.IOException
java.io.IOException
public ASN1GenericPrimitive(java.io.InputStream is,
int tag,
int tagClass)
throws java.io.IOException
java.io.IOExceptionpublic ASN1Header getHeader()
getHeader in interface ASN1TaggedObjectpublic int getTag()
public int getTagClass()
public byte[] getBody()
public ASN1Object withTag(int tag) throws java.io.IOException
java.io.IOExceptionpublic ASN1Object withTag(int tag, int tagClass) throws java.io.IOException
java.io.IOException
public void input(java.io.InputStream is)
throws java.io.IOException
Streamableinput in interface Streamablejava.io.IOException
public void output(java.io.OutputStream os)
throws java.io.IOException
Streamableoutput in interface Streamablejava.io.IOExceptionpublic int length()
Streamablelength in interface Streamable