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)
| 604 | * @throws IOException An I/O error occurred. |
| 605 | */ |
| 606 | public byte [] |
| 607 | getBase64(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 |
no test coverage detected