} else if (item.getType() == Type.BASE64_BINARY || item.getType() == Type.HEX_BINARY) {
LOG.debug("Streaming base64 binary");
final BinaryValue binary = (BinaryValue) item;
final byte[] data = (byte[]) binary.toJavaObject(byte[].class);
final InputStream is = new ByteArrayInputStream(data);
streamSource.setInputStream(is);
//TODO consider using BinaryValue.getInputStream()