(DNSOutput out, Compression c, boolean canonical)
| 258 | } |
| 259 | |
| 260 | void |
| 261 | rrToWire(DNSOutput out, Compression c, boolean canonical) { |
| 262 | for (Iterator it = elements.iterator(); it.hasNext(); ) { |
| 263 | Element element = (Element) it.next(); |
| 264 | int length = 0; |
| 265 | byte [] data; |
| 266 | if (element.family == Address.IPv4 || |
| 267 | element.family == Address.IPv6) |
| 268 | { |
| 269 | InetAddress addr = (InetAddress) element.address; |
| 270 | data = addr.getAddress(); |
| 271 | length = addressLength(data); |
| 272 | } else { |
| 273 | data = (byte []) element.address; |
| 274 | length = data.length; |
| 275 | } |
| 276 | int wlength = length; |
| 277 | if (element.negative) { |
| 278 | wlength |= 0x80; |
| 279 | } |
| 280 | out.writeU16(element.family); |
| 281 | out.writeU8(element.prefixLength); |
| 282 | out.writeU8(wlength); |
| 283 | out.writeByteArray(data, 0, length); |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | } |
nothing calls this directly
no test coverage detected