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

Method getHex

src/main/java/core/org/xbill/DNS/Tokenizer.java:644–657  ·  view source on GitHub ↗

Gets the remaining string tokens until an EOL/EOF is seen, concatenates them together, and converts the hex encoded data to a byte array. @param required If true, an exception will be thrown if no strings remain; otherwise null be be returned. @return The byte array containing the decoded strings, o

(boolean required)

Source from the content-addressed store, hash-verified

642 * @throws IOException An I/O error occurred.
643 */
644public byte []
645getHex(boolean required) throws IOException {
646 String s = remainingStrings();
647 if (s == null) {
648 if (required)
649 throw exception("expected hex encoded string");
650 else
651 return null;
652 }
653 byte [] array = base16.fromString(s);
654 if (array == null)
655 throw exception("invalid hex encoding");
656 return array;
657}
658
659/**
660 * Gets the remaining string tokens until an EOL/EOF is seen, concatenates

Callers 6

fromStringMethod · 0.80
rdataFromStringMethod · 0.80
rdataFromStringMethod · 0.80
rdataFromStringMethod · 0.80
rdataFromStringMethod · 0.80
rdataFromStringMethod · 0.80

Calls 3

remainingStringsMethod · 0.95
exceptionMethod · 0.95
fromStringMethod · 0.45

Tested by

no test coverage detected