public synchronized void reset() throws JMSException {
if (this.writeOnly) {
this.content = this.baos.toByteArray();
}
this.bais = new ByteArrayInputStream(this.content);
this.dataIs = new DataInputStream(this.bais);
if (!this.dataIs.markSupported())
throw new XBException(ErrorCode.INTERNAL_NOTIMPLEMENTED.getDescription(), "Mark is not supported for the stream. Can not recover in case of an IOException");
this.readOnly = true;
this.writeOnly = false;