|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neociclo.odetteftp.protocol.DataExchangeBuffer.SubrecordHeader
public static class DataExchangeBuffer.SubrecordHeader
Subrecord Header is defined in one octet as follows:
0 1 2 3 4 5 6 7 o-------------------------------o | E | C | | | o | F | C O U N T | | R | | | o-------------------------------o Bits 0 End of Record Flag Set to indicate that the next subrecord is the last subrecord of the current record. Unstructured files are transmitted as a single record; in this case, the flag acts as an end-of-file marker. 1 Compression Flag Set to indicate that the next subrecord is compressed. 2-7 Subrecord Count The number of octets in the Virtual File represented by the next subrecord expressed as a binary value. For uncompressed data, this is simply the length of the subrecord. For compressed data, this is the number of times that the single octet in the following subrecord must be inserted in the Virtual File. As 6 bits are available, the next subrecord may represent between 0 and 63 octets of the Virtual File.
Constructor Summary | |
---|---|
DataExchangeBuffer.SubrecordHeader(int startPos,
boolean eor,
boolean compr,
byte count)
|
Method Summary | |
---|---|
byte |
asOctet()
|
byte |
getCount()
The number of octets in the Virtual File represented by the next subrecord expressed as a binary value. |
int |
getDataIndex()
|
static byte |
getSubrecordCount(short headerOctet)
Subrecord Count: last 6 bits |
boolean |
isCompressed()
Set to indicate that the next subrecord is compressed. |
static boolean |
isCompressed(short headerOctet)
Compression Flag: is second bit set? |
boolean |
isEndOfRecord()
Set to indicate that the next subrecord is the last subrecord of the current record. |
static boolean |
isEndOfRecord(short headerOctet)
End of Record: is first bit set? |
static byte |
toOctet(boolean endOfRecord,
boolean compression,
byte count)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataExchangeBuffer.SubrecordHeader(int startPos, boolean eor, boolean compr, byte count)
startPos
- the Subrecord position within the Data Exchange Buffer
(after the Subrecord header).eor
- End of Record flag.compr
- Compression flag.count
- Subrecord count.Method Detail |
---|
public static byte getSubrecordCount(short headerOctet)
headerOctet
-
public static boolean isCompressed(short headerOctet)
headerOctet
-
public static boolean isEndOfRecord(short headerOctet)
headerOctet
-
public static byte toOctet(boolean endOfRecord, boolean compression, byte count)
public byte asOctet()
public byte getCount()
For uncompressed data this is simply the length of the subrecord.
For compressed data this is the number of times that the single octet in the following subrecord must be inserted in the Virtual File.
As six bits are available, the next subrecord may represent between 0 and 63 octets of the Virtual File.
public int getDataIndex()
public boolean isCompressed()
public boolean isEndOfRecord()
Unstructured files are transmitted as a single record, in this case the flag acts as an end of file marker.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |