rcs.nml
Class NMLFormatConverterBase

java.lang.Object
rcs.nml.NMLFormatConverter
rcs.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
|
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)
|
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
NMLFormatConverterBase
public NMLFormatConverterBase()
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