MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / writeU16At

Method writeU16At

src/main/java/core/org/xbill/DNS/DNSOutput.java:132–140  ·  view source on GitHub ↗

Writes an unsigned 16 bit value to the specified position in the stream. @param val The value to be written @param where The position to write the value.

(int val, int where)

Source from the content-addressed store, hash-verified

130 * @param where The position to write the value.
131 */
132public void
133writeU16At(int val, int where) {
134 check(val, 16);
135 if (where > pos - 2)
136 throw new IllegalArgumentException("cannot write past " +
137 "end of data");
138 array[where++] = (byte)((val >>> 8) & 0xFF);
139 array[where++] = (byte)(val & 0xFF);
140}
141
142/**
143 * Writes an unsigned 32 bit value to the stream.

Callers 4

toWireMethod · 0.80
toWireCanonicalMethod · 0.80
toWireMethod · 0.80
toWireMethod · 0.80

Calls 1

checkMethod · 0.95

Tested by

no test coverage detected