org.jnetpcap.util
Class Debug

java.lang.Object
  extended by org.jnetpcap.nio.JMemory
      extended by org.jnetpcap.nio.JStruct
          extended by org.jnetpcap.util.Debug

public class Debug
extends JStruct

Specialized debug class that provides debugging and tracing services. There is a low level native debug object compiled into jnetpcap library. The native trace debugger works similar to the way that java logger's do with message levels that can be set which will allow debug information to be printed out.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
static class Debug.Level
          Defines various message severity levels.
static interface Debug.LevelId
          Provides access to raw level value.
 
Nested classes/interfaces inherited from class org.jnetpcap.nio.JMemory
JMemory.Type
 
Field Summary
 
Fields inherited from class org.jnetpcap.nio.JMemory
JNETPCAP_LIBRARY_NAME, MAX_DIRECT_MEMORY_DEFAULT, POINTER
 
Constructor Summary
Debug()
          Instantiates a new debug.
 
Method Summary
 int getLevel()
          Gets the level.
 Debug.Level getLevelEnum()
          Gets the level enum.
 void setLevel(Debug.LevelId level)
          Sets the level.
 void setLevel(int level)
          Sets the level.
static int sizeof()
          Size of native debug_t structure.
 
Methods inherited from class org.jnetpcap.nio.JStruct
getStructName, toString
 
Methods inherited from class org.jnetpcap.nio.JMemory
availableDirectMemory, check, cleanup, createReference, isInitialized, isJMemoryBasedOwner, isOwner, maxDirectMemory, peer, peer, peer, reservedDirectMemory, setSize, size, softDirectMemory, toDebugString, toHexdump, toHexdump, totalActiveAllocated, totalAllocateCalls, totalAllocated, totalAllocatedSegments0To255Bytes, totalAllocatedSegments256OrAbove, totalDeAllocateCalls, totalDeAllocated, transferFrom, transferFrom, transferFrom, transferFrom, transferFromDirect, transferOwnership, transferTo, transferTo, transferTo, transferTo, transferTo, transferTo, transferTo, transferTo0
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Debug

public Debug()
Instantiates a new debug.

Method Detail

sizeof

public static int sizeof()
Size of native debug_t structure.

Returns:
size in bytes

setLevel

public void setLevel(Debug.LevelId level)
Sets the level.

Parameters:
level - the new level

setLevel

public void setLevel(int level)
Sets the level.

Parameters:
level - the new level

getLevel

public int getLevel()
Gets the level.

Returns:
the level

getLevelEnum

public Debug.Level getLevelEnum()
Gets the level enum.

Returns:
the level enum