116117118119120121122123124125126
CharArrayWriter out = new CharArrayWriter(); for (int ch = reader.read(); ch >= 0; ch = reader.read()) out.write(ch); return Base64.encode(new String(out.toCharArray())); } } throw new JAXBException(e); }