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

Method getBase64

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

Gets the remaining string tokens until an EOL/EOF is seen, concatenates them together, and converts the base64 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

(boolean required)

Source from the content-addressed store, hash-verified

604 * @throws IOException An I/O error occurred.
605 */
606public byte []
607getBase64(boolean required) throws IOException {
608 String s = remainingStrings();
609 if (s == null) {
610 if (required)
611 throw exception("expected base64 encoded string");
612 else
613 return null;
614 }
615 byte [] array = base64.fromString(s);
616 if (array == null)
617 throw exception("invalid base64 encoding");
618 return array;
619}
620
621/**
622 * Gets the remaining string tokens until an EOL/EOF is seen, concatenates

Callers 7

rdataFromStringMethod · 0.80
rdataFromStringMethod · 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