Package org.pcap4j.packet
Class Dot11ChannelUsageElement
- java.lang.Object
-
- org.pcap4j.packet.Dot11InformationElement
-
- org.pcap4j.packet.Dot11ChannelUsageElement
-
- All Implemented Interfaces:
java.io.Serializable
public final class Dot11ChannelUsageElement extends Dot11InformationElement
IEEE802.11 Channel Usage element1 1 1 2n +----------+----------+----------+--------------- |Element ID| Length |Usage Mode|Channel Entry +----------+----------+----------+--------------- Element ID: 97
The Channel Usage element defines the channel usage information for noninfrastructure networks or an off channel TDLS direct link.- Since:
- pcap4j 1.7.0
- Author:
- Kaito Yamada
- See Also:
- IEEE802.11, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Dot11ChannelUsageElement.Builder
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Dot11ChannelUsageElement.Builder
getBuilder()
java.util.ArrayList<Dot11ChannelEntry>
getChannelEntries()
byte[]
getRawData()
Dot11ChannelUsageMode
getUsageMode()
int
hashCode()
int
length()
static Dot11ChannelUsageElement
newInstance(byte[] rawData, int offset, int length)
A static factory method.java.lang.String
toString()
java.lang.String
toString(java.lang.String indent)
-
Methods inherited from class org.pcap4j.packet.Dot11InformationElement
getElementId, getLength, getLengthAsInt
-
-
-
-
Method Detail
-
newInstance
public static Dot11ChannelUsageElement newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException
A static factory method. This method validates the arguments byByteArrays.validateBounds(byte[], int, int)
, which may throw exceptions undocumented here.- Parameters:
rawData
- rawDataoffset
- offsetlength
- length- Returns:
- a new Dot11ChannelUsageElement object.
- Throws:
IllegalRawDataException
- if parsing the raw data fails.
-
getUsageMode
public Dot11ChannelUsageMode getUsageMode()
- Returns:
- usageMode
-
getChannelEntries
public java.util.ArrayList<Dot11ChannelEntry> getChannelEntries()
- Returns:
- channelEntries
-
length
public int length()
- Specified by:
length
in classDot11InformationElement
- Returns:
- the length
-
getRawData
public byte[] getRawData()
- Specified by:
getRawData
in classDot11InformationElement
- Returns:
- the raw data.
-
getBuilder
public Dot11ChannelUsageElement.Builder getBuilder()
- Returns:
- a new Builder object populated with this object's fields.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classDot11InformationElement
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classDot11InformationElement
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String indent)
- Parameters:
indent
- indent- Returns:
- the string representation of this object.
-
-