|
Rational Developer for i 7.5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.etools.systems.as400.debug.protocol.PROTOCOL_Base
public abstract class PROTOCOL_Base
The base class that all EPDC classes extend
| Field Summary | |
|---|---|
protected byte[] |
_byteBuffer
|
static byte |
DISPLAYDETAIL
|
| Constructor Summary | |
|---|---|
|
PROTOCOL_Base()
Used to create a reply/request for output |
protected |
PROTOCOL_Base(byte[] byteBuffer,
PROTOCOL_EngineSession engineSession)
Used to decode an input reply/request |
| Method Summary | |
|---|---|
protected int |
bytesAvailable()
|
protected static void |
dumpEPDC(byte[] bytes,
PROTOCOL_EngineSession engineSession,
int packetType)
|
protected abstract int |
fixedLen()
Return the total length of the fixed component including any base fixed length Each reply/request must implement this to return the "fixed" portion of their protocol. |
protected byte[] |
getByteBuffer()
|
protected DataInputStream |
getDataInputStream()
Return the input stream |
protected PROTOCOL_EngineSession |
getEPDCEngineSession()
|
protected int |
getEPDCVersion()
Check the EPDC version. |
String |
getInternalName()
This is for internal use only. |
protected int |
getOffset()
Returns the current offset in the buffer |
protected static short |
getPlatformIdentifier()
|
protected static int |
intAsBytes(int integer,
byte[] bytes,
int offset)
Converts an integer to an array of bytes and stores it in the supplied byte array at the offset |
protected void |
markOffset()
Marks the current position in the buffer This must be used after the fixed portion of the EPDC request/reply has been read in. |
protected void |
posBuffer(int offset)
Positions the buffer at the offset passed |
protected byte |
readChar()
Reads in a character (1 byte) |
protected com.ibm.etools.systems.as400.debug.protocol.PExtString |
readExtString()
Reads an EExtString from the current offset. |
protected int |
readInt()
Reads in an integer (4 bytes) |
protected int |
readOffset()
Reads in a offset (4 bytes) |
protected short |
readShort()
Reads in a short (2 bytes) |
protected com.ibm.etools.systems.as400.debug.protocol.PStdString |
readStdString()
Reads an EStdString from the current offset. |
void |
setEPDCEngineSession(PROTOCOL_EngineSession engineSession)
Need to set the EPDC version before each request is written out. |
protected void |
skipBytes(int num)
Skips bytes... |
protected int |
totalBytes()
|
protected static int |
totalBytes(PROTOCOL_Base object)
|
protected abstract int |
varLen()
Return the total length of the variable component including any *base* variable length Return the length of the variable component Each reply/request must implement this to return the length of the variable portion of its protocol e.g. |
protected void |
writeChar(DataOutputStream os,
byte b)
Writes a EPDC Character to the output stream |
abstract void |
writeFormattedEPDC(DataOutputStream dataOutputStream,
byte formatFlags)
Write to the output stream an XML formatted representation of this EPDC class NOTE: This method should be implemented in all EPDC classes |
protected void |
writeInt(DataOutputStream os,
int d)
Writes an int (4 bytes) to an output stream |
protected void |
writeOffset(DataOutputStream os,
int offset)
Writes an offset (4 bytes) to an output stream |
protected static int |
writeOffsetOrZero(DataOutputStream os,
int offset,
PROTOCOL_Base object)
|
protected void |
writeShort(DataOutputStream os,
short s)
Writes a short (2 bytes) to an output stream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte DISPLAYDETAIL
protected transient byte[] _byteBuffer
| Constructor Detail |
|---|
protected PROTOCOL_Base(byte[] byteBuffer,
PROTOCOL_EngineSession engineSession)
engineSession -
IOException - if an I/O error occurspublic PROTOCOL_Base()
| Method Detail |
|---|
protected abstract int fixedLen()
protected abstract int varLen()
protected final void skipBytes(int num)
throws IOException
IOException - if an I/O error occurs
protected final byte readChar()
throws IOException
IOException - if an I/O error occurs
protected final void writeChar(DataOutputStream os,
byte b)
throws IOException
IOException - if an I/O error occur
protected final short readShort()
throws IOException
IOException - if an I/O error occurs
protected final void writeShort(DataOutputStream os,
short s)
throws IOException
IOException - if an I/O error occurs
protected final int readInt()
throws IOException
IOException - if an I/O error occurs
protected final void writeInt(DataOutputStream os,
int d)
throws IOException
IOException - if an I/O error occurs
protected final int readOffset()
throws IOException
IOException - if an I/O error occurs
protected final void writeOffset(DataOutputStream os,
int offset)
throws IOException
IOException - if an I/O error occurs
protected final com.ibm.etools.systems.as400.debug.protocol.PStdString readStdString()
throws IOException
IOException - if an I/O error occurs
protected final com.ibm.etools.systems.as400.debug.protocol.PExtString readExtString()
throws IOException
IOException - if an I/O error occurs
protected static final int writeOffsetOrZero(DataOutputStream os,
int offset,
PROTOCOL_Base object)
throws IOException
IOExceptionprotected final int getOffset()
protected final void markOffset()
throws IOException
IOException - if an I/O error occurs
protected final void posBuffer(int offset)
throws IOException
IOException - if an I/O error occursprotected int totalBytes()
protected static int totalBytes(PROTOCOL_Base object)
protected static final short getPlatformIdentifier()
public final void setEPDCEngineSession(PROTOCOL_EngineSession engineSession)
protected final int getEPDCVersion()
protected final PROTOCOL_EngineSession getEPDCEngineSession()
protected DataInputStream getDataInputStream()
protected byte[] getByteBuffer()
protected int bytesAvailable()
protected static void dumpEPDC(byte[] bytes,
PROTOCOL_EngineSession engineSession,
int packetType)
protected static final int intAsBytes(int integer,
byte[] bytes,
int offset)
integer - to be convertedbytes - byte arrayoffset - offset in byte array
public String getInternalName()
public abstract void writeFormattedEPDC(DataOutputStream dataOutputStream,
byte formatFlags)
dataOutputStream - displayInfol - flags used to indicate detail to output
|
Rational Developer for i 7.5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||