cryptix.asn1.encoding
Class BaseCoder
java.lang.Object
cryptix.asn1.encoding.BaseCoder
- All Implemented Interfaces:
- CoderOperations, ParserVisitor
- Direct Known Subclasses:
- DER
public class BaseCoder
- extends java.lang.Object
- implements CoderOperations
Field Summary |
protected java.io.InputStream |
in
|
protected java.io.OutputStream |
out
|
Method Summary |
void |
decode(ASNAny obj,
java.io.InputStream in)
|
void |
decode(ASNBitString obj,
java.io.InputStream in)
|
void |
decode(ASNBoolean obj,
java.io.InputStream in)
|
void |
decode(ASNInteger obj,
java.io.InputStream in)
|
void |
decode(ASNNull obj,
java.io.InputStream in)
|
void |
decode(ASNObjectIdentifier obj,
java.io.InputStream in)
|
void |
decode(ASNOctetString obj,
java.io.InputStream in)
|
void |
decode(ASNPrintableString obj,
java.io.InputStream in)
|
void |
decode(ASNSequence obj,
java.io.InputStream in)
|
void |
decode(ASNSequenceOf obj,
java.io.InputStream in)
|
void |
decode(ASNSet obj,
java.io.InputStream in)
|
void |
decode(ASNSetOf obj,
java.io.InputStream in)
|
void |
decode(ASNTaggedType obj,
java.io.InputStream in)
|
void |
decode(ASNTime obj,
java.io.InputStream in)
|
void |
decode(ASNTypeAlias obj,
java.io.InputStream in)
|
void |
decode(ASNType obj,
java.io.InputStream in)
|
void |
encode(ASNAny obj,
java.io.OutputStream out)
|
void |
encode(ASNBitString obj,
java.io.OutputStream out)
|
void |
encode(ASNBoolean obj,
java.io.OutputStream out)
|
void |
encode(ASNInteger obj,
java.io.OutputStream out)
|
void |
encode(ASNNull obj,
java.io.OutputStream out)
|
void |
encode(ASNObjectIdentifier obj,
java.io.OutputStream out)
|
void |
encode(ASNOctetString obj,
java.io.OutputStream out)
|
void |
encode(ASNPrintableString obj,
java.io.OutputStream out)
|
void |
encode(ASNSequenceOf obj,
java.io.OutputStream out)
|
void |
encode(ASNSequence obj,
java.io.OutputStream out)
|
void |
encode(ASNSetOf obj,
java.io.OutputStream out)
|
void |
encode(ASNSet obj,
java.io.OutputStream out)
|
void |
encode(ASNTaggedType obj,
java.io.OutputStream out)
|
void |
encode(ASNTime obj,
java.io.OutputStream out)
|
void |
encode(ASNTypeAlias obj,
java.io.OutputStream out)
|
void |
encode(ASNType obj,
java.io.OutputStream out)
|
static CoderOperations |
getInstance(java.lang.String anEncoding)
Instantiates an ASN.1 coder to use for concrete processing
of the input/output. |
int |
getState()
|
void |
init(java.io.InputStream is)
|
void |
init(java.io.OutputStream os)
|
java.lang.Object |
visit(ASNAny node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNBitString node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNBoolean node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNInteger node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNNull node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNObjectIdentifier node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNOctetString node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNPrintableString node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNSequence node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNSequenceOf node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNSet node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNSetOf node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNSpecification node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNTaggedType node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNTime node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNTypeAlias node,
java.lang.Object data)
|
java.lang.Object |
visit(ASNType node,
java.lang.Object data)
|
java.lang.Object |
visit(SimpleNode x,
java.lang.Object data)
|
protected java.lang.Object |
visitInternal(SimpleNode node,
java.lang.Object data)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
protected java.io.InputStream in
out
protected java.io.OutputStream out
BaseCoder
public BaseCoder()
getInstance
public static CoderOperations getInstance(java.lang.String anEncoding)
- Instantiates an ASN.1 coder to use for concrete processing
of the input/output.
Effectively, EncodingFactory objects implement the encoding
format for an ASN.1 grammar.
- Parameters:
anEncoding
- Name of the encoding. If the name is not
fully qualified, then look for a class with same name
in package defined by the package-specific property
with the key "asn.1.encoding.home".
getState
public int getState()
visit
public java.lang.Object visit(SimpleNode x,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNSpecification node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNTypeAlias node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNType node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNBoolean node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNInteger node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNBitString node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNOctetString node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNNull node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNObjectIdentifier node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNSequence node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNSequenceOf node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNSet node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNSetOf node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNTaggedType node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNAny node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNPrintableString node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visit
public java.lang.Object visit(ASNTime node,
java.lang.Object data)
throws java.io.IOException
- Specified by:
visit
in interface ParserVisitor
- Throws:
java.io.IOException
visitInternal
protected java.lang.Object visitInternal(SimpleNode node,
java.lang.Object data)
throws java.io.IOException
- Throws:
java.io.IOException
init
public void init(java.io.OutputStream os)
- Specified by:
init
in interface CoderOperations
init
public void init(java.io.InputStream is)
- Specified by:
init
in interface CoderOperations
encode
public void encode(ASNType obj,
java.io.OutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
encode
public void encode(ASNTypeAlias obj,
java.io.OutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
encode
public void encode(ASNBoolean obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNInteger obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNBitString obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNOctetString obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNNull obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNObjectIdentifier obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNSequence obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNSequenceOf obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNSet obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNSetOf obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNTaggedType obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNAny obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNPrintableString obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
encode
public void encode(ASNTime obj,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNBoolean obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNInteger obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNBitString obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNOctetString obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNNull obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNObjectIdentifier obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNSequence obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNSequenceOf obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNSet obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNSetOf obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNTaggedType obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNAny obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNPrintableString obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNTime obj,
java.io.InputStream in)
throws java.io.IOException
- Specified by:
decode
in interface CoderOperations
- Throws:
java.io.IOException
decode
public void decode(ASNType obj,
java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
decode
public void decode(ASNTypeAlias obj,
java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException