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

Quick Search    Search Deep

rcs.nml
Class NMLFormatConverterBase  view NMLFormatConverterBase download NMLFormatConverterBase.java

java.lang.Object
  extended byrcs.nml.NMLFormatConverter
      extended byrcs.nml.NMLFormatConverterBase
Direct Known Subclasses:
DISPFormatConverter, XDRFormatConverter

public abstract class NMLFormatConverterBase
extends NMLFormatConverter

This class is the base class for all classes used by NML to convert local data types to some neutral format usable by many different types of hosts. Source Code: NMLFormatConverter.java


Field Summary
protected  int bytes_in_input_stream
           
protected  boolean bytes_in_input_stream_known
           
static boolean debug_on
           
 boolean decoding
          True when the data from the network is being converted into a message in this hosts format, false when a message on this host is being converted to a neutral format.
 boolean first_format_error
           
protected  java.io.DataInputStream input_stream
           
protected  java.lang.String input_string
           
protected  java.util.StringTokenizer input_string_tokenizer
           
protected  NMLMessageDictionary msg_dict
           
protected  int msg_size
           
protected  java.io.DataOutputStream output_stream
           
protected  java.lang.String output_string
           
protected  int raw_data_size
           
protected  boolean use_string
           
 
Fields inherited from class rcs.nml.NMLFormatConverter
cmd_msg_updated, error_in_update, msg_to_update, msg_type, stat_msg_updated
 
Constructor Summary
NMLFormatConverterBase()
           
 
Method Summary
protected  int convertMsgToRawData(byte[] b, int size, NMLmsg msg)
           
protected  java.lang.String convertMsgToString(NMLmsg msg)
           
protected  NMLmsg convertRawDataToMsg(byte[] b, int offset, int size)
           
protected  NMLmsg convertStringToMsg(java.lang.String str)
           
protected  NMLMessageDictionary GetMessageDictionary()
           
protected  NMLmsg getMessageFromInputStream(java.io.DataInputStream dis)
           
 void rewind()
          Function that should be called before every message or string is parsed.
protected  int sendMsgToOutputStream(java.io.DataOutputStream dos, NMLmsg msg)
           
protected  void SetMessageDictionary(NMLMessageDictionary new_dict)
           
abstract  byte update(byte x)
           
abstract  void update(byte[] x, int num_elements)
           
abstract  char update(char x)
           
abstract  void update(char[] x, int num_elements)
           
abstract  double update(double x)
           
abstract  void update(double[] x, int num_elements)
           
abstract  float update(float x)
           
abstract  void update(float[] x, int num_elements)
           
abstract  int update(int x)
           
abstract  void update(int[] x, int num_elements)
           
abstract  long update(long x)
           
abstract  void update(long[] x, int num_elements)
           
abstract  short update(short x)
           
abstract  void update(short[] x, int num_elements)
           
 
Methods inherited from class rcs.nml.NMLFormatConverter
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

decoding

public boolean decoding
True when the data from the network is being converted into a message in this hosts format, false when a message on this host is being converted to a neutral format.


first_format_error

public boolean first_format_error

use_string

protected boolean use_string

debug_on

public static boolean debug_on

output_string

protected java.lang.String output_string

input_string

protected java.lang.String input_string

input_stream

protected java.io.DataInputStream input_stream

input_string_tokenizer

protected java.util.StringTokenizer input_string_tokenizer

output_stream

protected java.io.DataOutputStream output_stream

msg_size

protected int msg_size

raw_data_size

protected int raw_data_size

msg_dict

protected NMLMessageDictionary msg_dict

bytes_in_input_stream

protected int bytes_in_input_stream

bytes_in_input_stream_known

protected boolean bytes_in_input_stream_known
Constructor Detail

NMLFormatConverterBase

public NMLFormatConverterBase()
Method Detail

SetMessageDictionary

protected void SetMessageDictionary(NMLMessageDictionary new_dict)

rewind

public void rewind()
Function that should be called before every message or string is parsed.


GetMessageDictionary

protected NMLMessageDictionary GetMessageDictionary()

convertRawDataToMsg

protected NMLmsg convertRawDataToMsg(byte[] b,
                                     int offset,
                                     int size)

convertStringToMsg

protected NMLmsg convertStringToMsg(java.lang.String str)

convertMsgToRawData

protected int convertMsgToRawData(byte[] b,
                                  int size,
                                  NMLmsg msg)

convertMsgToString

protected java.lang.String convertMsgToString(NMLmsg msg)

getMessageFromInputStream

protected NMLmsg getMessageFromInputStream(java.io.DataInputStream dis)

sendMsgToOutputStream

protected int sendMsgToOutputStream(java.io.DataOutputStream dos,
                                    NMLmsg msg)

update

public abstract byte update(byte x)
Specified by:
update in class NMLFormatConverter

update

public abstract void update(byte[] x,
                            int num_elements)
Specified by:
update in class NMLFormatConverter

update

public abstract char update(char x)
Specified by:
update in class NMLFormatConverter

update

public abstract void update(char[] x,
                            int num_elements)
Specified by:
update in class NMLFormatConverter

update

public abstract short update(short x)
Specified by:
update in class NMLFormatConverter

update

public abstract void update(short[] x,
                            int num_elements)
Specified by:
update in class NMLFormatConverter

update

public abstract int update(int x)
Specified by:
update in class NMLFormatConverter

update

public abstract void update(int[] x,
                            int num_elements)
Specified by:
update in class NMLFormatConverter

update

public abstract long update(long x)
Specified by:
update in class NMLFormatConverter

update

public abstract void update(long[] x,
                            int num_elements)
Specified by:
update in class NMLFormatConverter

update

public abstract float update(float x)
Specified by:
update in class NMLFormatConverter

update

public abstract void update(float[] x,
                            int num_elements)
Specified by:
update in class NMLFormatConverter

update

public abstract double update(double x)
Specified by:
update in class NMLFormatConverter

update

public abstract void update(double[] x,
                            int num_elements)
Specified by:
update in class NMLFormatConverter