Package com.silabs.na.pcap
Class Block
- java.lang.Object
-
- com.silabs.na.pcap.Block
-
public class Block extends java.lang.Object
PcapNG format is made of blocks. This class abstracts one block.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsDataOfType(java.lang.Class<?> dataType)
Returns true if this block contains a data of a given type.java.lang.Object
data()
Returns the data object.Option[]
options()
Returns an array of options that are attached to this block.java.lang.String
toString()
BlockType
type()
Returns the type of the block.
-
-
-
Method Detail
-
options
public Option[] options()
Returns an array of options that are attached to this block.- Returns:
- Returns an array of options. May be empty array. Does not return null.
-
type
public BlockType type()
Returns the type of the block.- Returns:
- block type
-
containsDataOfType
public boolean containsDataOfType(java.lang.Class<?> dataType)
Returns true if this block contains a data of a given type.- Parameters:
dataType
- Class of data that you're querying for.- Returns:
- True if the class contains the specified class type of data.
-
data
public java.lang.Object data()
Returns the data object.- Returns:
- data object.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-