The lightweight calls do not create any objects or use heavy amount storage and provide a quick way to determine which headers exists within a packet. The lightweight methods are invoked using a call to {@link #quickScan()}which relies on {@link Scandec} interface to provide lightweight, in possiblynon-java way. Scandecs can be implemented using native or BPF byte code librariers which do nor rely on need for creating and accessing java objects.
The heavyweight class produce header objects and if fully decoded sub header and field objects as well. This is much heavier way of accessing packet content but is required by the general jNetStream public API. For example invoking the method call {@link Packet#format()} forces entire packetcontents to be fully decoded so that information about each piece of the packet nicely formatted and displayed to the user.
@author Mark Bednarczyk @author Sly Technologies, Inc.
|
|
|
|