fulmine.protocol.specification
Class FieldReader
java.lang.Object
fulmine.protocol.specification.FieldReader
public final class FieldReader
- extends Object
Utility methods for reading component specs from byte[] buffers.
Please refer to the "Fulmine Delta Transmission Protocol" specification for a
complete description of the fulmine serialisation technique.
- Author:
- Ramon Servadei
- See Also:
FieldWriter
Nested Class Summary |
static interface |
FieldReader.IFieldReaderTask
A visitor that is invoked for every component spec found during the
header parsing of the
FieldReader#readIWFFieldSpecs(byte[], int, int, int, int, IFieldReaderTask)
and
FieldReader#readSWFFieldSpecs(byte[], int, int, int, int, IFieldReaderTask)
methods. |
Method Summary |
static void |
readIWFFieldSpecs(IOperationScope scope,
byte[] buffer,
int headerStart,
int headerLen,
int dataStart,
int dataLen,
FieldReader.IFieldReaderTask task)
Parses the buffer from headerStart to headerLen and for each component
spec found, invokes the component reader task to process the component. |
static void |
readSWFFieldSpecs(IOperationScope scope,
byte[] buffer,
int headerStart,
int headerLen,
int dataStart,
int dataLen,
FieldReader.IFieldReaderTask task)
Parses the buffer from headerStart to headerLen and for each component
spec found, invokes the component reader task to process the component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FieldReader
public FieldReader()
readSWFFieldSpecs
public static void readSWFFieldSpecs(IOperationScope scope,
byte[] buffer,
int headerStart,
int headerLen,
int dataStart,
int dataLen,
FieldReader.IFieldReaderTask task)
- Parses the buffer from headerStart to headerLen and for each component
spec found, invokes the component reader task to process the component.
This method operates on string wire format component specs.
- Parameters:
scope
- the scope of the read state operationbuffer
- the byte[] holding the header and data buffers, at some
locationheaderStart
- the position in the buffer where the header buffer is locatedheaderLen
- the number of bytes that make up the header bufferdataStart
- the position in the buffer where the data buffer is locateddataLen
- the number of bytes that make up the data buffertask
- the delegate task that will process each component spec found
readIWFFieldSpecs
public static void readIWFFieldSpecs(IOperationScope scope,
byte[] buffer,
int headerStart,
int headerLen,
int dataStart,
int dataLen,
FieldReader.IFieldReaderTask task)
- Parses the buffer from headerStart to headerLen and for each component
spec found, invokes the component reader task to process the component.
This method operates on integer wire format component specs.
- Parameters:
scope
- the scope of the read state operationbuffer
- the byte[] holding the header and data buffers, at some
locationheaderStart
- the position in the buffer where the header buffer is locatedheaderLen
- the number of bytes that make up the header bufferdataStart
- the position in the buffer where the data buffer is locateddataLen
- the number of bytes that make up the data buffertask
- the delegate task that will process each component spec found
Copyright © 2007-2009. All Rights Reserved.