How can I do that?
I tried this:
String a = "my_byte_buffer_copied_from_my_logs";
value = ByteBuffer.wrap(a.getBytes(StandardCharsets.UTF_8));
InputStream callbackRequest = new ByteArrayInputStream(value.array());
return jaxbContext.createUnmarshaller().unmarshal(callbackRequest);
But it fails with this message:
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
Which seems to indicate that the XML is not valid
FYI, I know that the encoding UTF-8 is correct.