For a packet to be sent to the web server, finish the process of accumulating data and write the length of the data payload into the header.
()
| 85 | * data payload into the header. |
| 86 | */ |
| 87 | public void end() { |
| 88 | len = pos; |
| 89 | int dLen = len - 4; |
| 90 | |
| 91 | buf[0] = (byte) 0x41; |
| 92 | buf[1] = (byte) 0x42; |
| 93 | buf[2] = (byte) ((dLen >>> 8) & 0xFF); |
| 94 | buf[3] = (byte) (dLen & 0xFF); |
| 95 | } |
| 96 | |
| 97 | |
| 98 | /** |