This class assembles a set of key/value pairs to valid JDP packet, ready to be sent across a Net
| Modifier and Type | Field and Description |
|---|---|
| private final ByteArrayOutputStream | |
| private final DataOutputStream |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public byte[] |
| baos | back to summary |
|---|---|
| private final ByteArrayOutputStream baos | |
| pkt | back to summary |
|---|---|
| private final DataOutputStream pkt | |
| JdpPacketWriter | back to summary |
|---|---|
| public JdpPacketWriter() throws IOException Create a JDP packet, add mandatory magic and version headers | |
| addEntry | back to summary |
|---|---|
| public void addEntry(String entry) throws IOException Put string entry to packet
| |
| addEntry | back to summary |
|---|---|
| public void addEntry(String key, String val) throws IOException Put key/value pair to packet | |
| getPacketBytes | back to summary |
|---|---|
| public byte[] getPacketBytes() Return assembled packet as a byte array
| |