(DNSOutput out, BigInteger val, int len)
| 382 | } |
| 383 | |
| 384 | private static void |
| 385 | writePaddedBigInteger(DNSOutput out, BigInteger val, int len) { |
| 386 | byte [] b = trimByteArray(val.toByteArray()); |
| 387 | |
| 388 | if (b.length > len) |
| 389 | throw new IllegalArgumentException(); |
| 390 | |
| 391 | if (b.length < len) { |
| 392 | byte [] pad = new byte[len - b.length]; |
| 393 | out.writeByteArray(pad); |
| 394 | } |
| 395 | |
| 396 | out.writeByteArray(b); |
| 397 | } |
| 398 | |
| 399 | private static void |
| 400 | writePaddedBigIntegerLittleEndian(DNSOutput out, BigInteger val, int len) { |
no test coverage detected