docs: @Override
      public Object fromByteBuffer(ByteBuffer bytes) {
          if (bytes == null || !bytes.hasRemaining()) {
              return null;
          }
          ByteBuffer dup = bytes.duplicate();
          ByteArrayInputStream bais = new ByteArrayInputStream(dup.array());
          try {
              XMLStreamReader reader = createStreamReader(bais);
              Object ret = unmarshaller.get().unmarshal(reader);
              reader.close();
              return ret;
          }
          catch (JAXBException e) {
              throw new SerializationException("Jaxb exception occurred during deserialization.", e);
          }
          catch (XMLStreamException e) {
              throw new SerializationException("Exception reading XML stream.", e);
          }
      }