fulmine.protocol.specification
Class FieldReader

java.lang.Object
  extended by 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.
 
Constructor Summary
FieldReader()
           
 
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
 

Constructor Detail

FieldReader

public FieldReader()
Method Detail

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 operation
buffer - the byte[] holding the header and data buffers, at some location
headerStart - the position in the buffer where the header buffer is located
headerLen - the number of bytes that make up the header buffer
dataStart - the position in the buffer where the data buffer is located
dataLen - the number of bytes that make up the data buffer
task - 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 operation
buffer - the byte[] holding the header and data buffers, at some location
headerStart - the position in the buffer where the header buffer is located
headerLen - the number of bytes that make up the header buffer
dataStart - the position in the buffer where the data buffer is located
dataLen - the number of bytes that make up the data buffer
task - the delegate task that will process each component spec found


Copyright © 2007-2009. All Rights Reserved.