APIdia Launch Partner
Top Description Fields Constructors Methods
sun.management.jdp

public final Class JdpPacketReader

extends Object
Class Inheritance
Imports
java.io.ByteArrayInputStream, .DataInputStream, .EOFException, .IOException, java.util.Collections, .HashMap, .Map

JdpPacketReader responsible for reading a packet

This class gets a byte array as it came from a Net, validates it and breaks a part

Field Summary

Modifier and TypeField and Description
private final DataInputStream
private Map<String, String>

Constructor Summary

AccessConstructor and Description
public
JdpPacketReader(byte[]
- packet received from a Net
packet
)

Create packet reader, extract and check magic and version

Method Summary

Modifier and TypeMethod and Description
public Map<String, String>

Returns:

map containing packet entries pair of entries treated as key,value
getDiscoveryDataAsMap
()

return packet content as a key/value map

public String

Returns:

the entry
getEntry
()

Get next entry from packet

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

pktback to summary
private final DataInputStream pkt
pmapback to summary
private Map<String, String> pmap

Constructor Detail

JdpPacketReaderback to summary
public JdpPacketReader(byte[] packet) throws JdpException

Create packet reader, extract and check magic and version

Parameters
packet:byte[]

- packet received from a Net

Method Detail

getDiscoveryDataAsMapback to summary
public Map<String, String> getDiscoveryDataAsMap() throws JdpException

return packet content as a key/value map

Returns:Map<String, String>

map containing packet entries pair of entries treated as key,value

getEntryback to summary
public String getEntry() throws EOFException, JdpException

Get next entry from packet

Returns:String

the entry