// Read in a JSON string containing base-64 encoded data and decode it.
protected byte[] readJSONBase64() throws TException {
TByteArrayOutputStream arr = readJSONString(false);
byte[] b = arr.get();
int len = arr.len();
int off = 0;
int size = 0;
while (len >= 4) {
// Decode 4 bytes at a time
TBase64Utils.decode(b, off, 4, b, size); // NB: decoded in place