Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.k_int.codec.runtime
Class BERInputStream  view BERInputStream download BERInputStream.java

java.lang.Object
  extended bycom.k_int.codec.runtime.BERInputStream
All Implemented Interfaces:
SerializationManager

public class BERInputStream
extends java.lang.Object
implements SerializationManager


Field Summary
private  base_codec codec_hint
           
(package private)  java.util.Stack encoding_info
           
(package private)  java.io.BufferedInputStream in
           
 boolean is_constructed
           
 boolean next_is_constructed
           
 boolean next_is_indefinite
           
 int next_length
           
 int next_tag_class
           
 int next_tag_number
           
 int tag_class
           
 int tag_value
           
 
Fields inherited from interface com.k_int.codec.runtime.SerializationManager
ANY, BITSTRING, BOOLEAN, DIRECTION_DECODE, DIRECTION_ENCODE, DIRECTION_PRINT, ENUMERATED, EXPLICIT, EXTERNAL, GENERAL_STRING, GENERALIZED_TIME, GRAPHIC_STRING, IMPLICIT, INTEGER, NULL, NUMERIC_STRING, OBJECT_DESCRIPTOR, OCTETSTRING, OID, PRINTABLE_STRING, REAL, SEQUENCE, SEQUENCEOF, SET, TAGMODE_NONE, UNIVERSAL, VISIBLE_STRING
 
Constructor Summary
BERInputStream(java.io.InputStream from)
           
 
Method Summary
 byte[] any_codec(java.lang.Object instance, boolean is_constructed)
           
 AsnBitString bitstring_codec(java.lang.Object instance, boolean is_constructed)
           
 java.lang.Boolean boolean_codec(java.lang.Object instance, boolean is_constructed)
           
 java.lang.Object choice(java.lang.Object current_instance, java.lang.Object[][] choice_info, int which, java.lang.String name)
           
 boolean constructedBegin(int tagclass, int tagnumber)
           
 boolean constructedEnd()
           
private  void debug(java.lang.String msg)
           
private  int decodeBase128Int(java.io.InputStream ins)
           
private  int decodeLengthOctets()
           
private  void decodeNextTag()
           
 java.lang.Object explicit_tag(base_codec c, java.lang.Object current_instance, int tag_class, int tag_number, boolean is_optional, java.lang.String name)
           
 int getDirection()
           
 base_codec getHintCodec()
           
 void implicit_settag(int tagclass, int tagvalue)
           
 java.lang.Object implicit_tag(base_codec c, java.lang.Object current_instance, int tag_class, int tag_number, boolean is_optional, java.lang.String name)
           
 java.math.BigInteger integer_codec(java.lang.Object instance, boolean is_constructed)
           
 boolean moreData()
           
 AsnNull null_codec(java.lang.Object instance, boolean is_constructed)
           
 java.lang.String octetstring_codec(java.lang.Object instance, boolean is_constructed)
           
 int[] oid_codec(java.lang.Object instance, boolean is_constructed)
           
 int read()
           
 int read(byte[] buffer, int offset, int max)
           
 boolean sequenceBegin()
           
 boolean sequenceEnd()
           
 boolean sequenceOf(java.util.Vector v, base_codec codec)
           
 void setHintCodec(base_codec c)
           
 int tag_codec(boolean is_constructed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encoding_info

java.util.Stack encoding_info

tag_class

public int tag_class

tag_value

public int tag_value

next_tag_class

public int next_tag_class

next_tag_number

public int next_tag_number

next_is_constructed

public boolean next_is_constructed

next_is_indefinite

public boolean next_is_indefinite

next_length

public int next_length

is_constructed

public boolean is_constructed

in

java.io.BufferedInputStream in

codec_hint

private base_codec codec_hint
Constructor Detail

BERInputStream

public BERInputStream(java.io.InputStream from)
Method Detail

getDirection

public int getDirection()
Specified by:
getDirection in interface SerializationManager

tag_codec

public int tag_codec(boolean is_constructed)
              throws java.io.IOException
Specified by:
tag_codec in interface SerializationManager

decodeNextTag

private void decodeNextTag()
                    throws java.io.IOException

decodeLengthOctets

private int decodeLengthOctets()
                        throws java.io.IOException

octetstring_codec

public java.lang.String octetstring_codec(java.lang.Object instance,
                                          boolean is_constructed)
                                   throws java.io.IOException
Specified by:
octetstring_codec in interface SerializationManager

boolean_codec

public java.lang.Boolean boolean_codec(java.lang.Object instance,
                                       boolean is_constructed)
                                throws java.io.IOException
Specified by:
boolean_codec in interface SerializationManager

integer_codec

public java.math.BigInteger integer_codec(java.lang.Object instance,
                                          boolean is_constructed)
                                   throws java.io.IOException
Specified by:
integer_codec in interface SerializationManager

oid_codec

public int[] oid_codec(java.lang.Object instance,
                       boolean is_constructed)
                throws java.io.IOException
Specified by:
oid_codec in interface SerializationManager

any_codec

public byte[] any_codec(java.lang.Object instance,
                        boolean is_constructed)
                 throws java.io.IOException
Specified by:
any_codec in interface SerializationManager

bitstring_codec

public AsnBitString bitstring_codec(java.lang.Object instance,
                                    boolean is_constructed)
                             throws java.io.IOException
Specified by:
bitstring_codec in interface SerializationManager

null_codec

public AsnNull null_codec(java.lang.Object instance,
                          boolean is_constructed)
                   throws java.io.IOException
Specified by:
null_codec in interface SerializationManager

choice

public java.lang.Object choice(java.lang.Object current_instance,
                               java.lang.Object[][] choice_info,
                               int which,
                               java.lang.String name)
                        throws java.io.IOException
Specified by:
choice in interface SerializationManager

sequenceBegin

public boolean sequenceBegin()
                      throws java.io.IOException
Specified by:
sequenceBegin in interface SerializationManager

sequenceEnd

public boolean sequenceEnd()
                    throws java.io.IOException
Specified by:
sequenceEnd in interface SerializationManager

constructedBegin

public boolean constructedBegin(int tagclass,
                                int tagnumber)
                         throws java.io.IOException
Specified by:
constructedBegin in interface SerializationManager

constructedEnd

public boolean constructedEnd()
                       throws java.io.IOException
Specified by:
constructedEnd in interface SerializationManager

implicit_tag

public java.lang.Object implicit_tag(base_codec c,
                                     java.lang.Object current_instance,
                                     int tag_class,
                                     int tag_number,
                                     boolean is_optional,
                                     java.lang.String name)
                              throws java.io.IOException
Specified by:
implicit_tag in interface SerializationManager

explicit_tag

public java.lang.Object explicit_tag(base_codec c,
                                     java.lang.Object current_instance,
                                     int tag_class,
                                     int tag_number,
                                     boolean is_optional,
                                     java.lang.String name)
                              throws java.io.IOException
Specified by:
explicit_tag in interface SerializationManager

sequenceOf

public boolean sequenceOf(java.util.Vector v,
                          base_codec codec)
                   throws java.io.IOException
Specified by:
sequenceOf in interface SerializationManager

implicit_settag

public void implicit_settag(int tagclass,
                            int tagvalue)
Specified by:
implicit_settag in interface SerializationManager

debug

private void debug(java.lang.String msg)

read

public int read()
         throws java.io.IOException

read

public int read(byte[] buffer,
                int offset,
                int max)
         throws java.io.IOException

moreData

public boolean moreData()
                 throws java.io.IOException

decodeBase128Int

private int decodeBase128Int(java.io.InputStream ins)
                      throws java.io.IOException

getHintCodec

public base_codec getHintCodec()
Specified by:
getHintCodec in interface SerializationManager

setHintCodec

public void setHintCodec(base_codec c)
Specified by:
setHintCodec in interface SerializationManager