use of com.sun.messaging.jmq.util.io.FilteringObjectInputStream in project openmq by eclipse-ee4j.
the class DirectStreamPacket method _reset.
/**
* Reset method for private use
*/
private void _reset(String methodName) throws JMSException {
super._setReadOnlyBody(true);
try {
if (this.writePerformed) {
this.objectOutputStream.flush();
this.messageBody = this.byteArrayOutputStream.toByteArray();
this.objectOutputStream.close();
this.byteArrayOutputStream.close();
this.writePerformed = false;
}
if (this.messageBody != null) {
this.byteArrayInputStream = new ByteArrayInputStream(this.messageBody);
this.objectInputStream = new FilteringObjectInputStream(this.byteArrayInputStream);
}
} catch (Exception e) {
String errMsg = _lgrMID_EXC + ":Exception:StreamMessage." + methodName + ":message=" + e.getMessage();
_loggerJM.severe(errMsg);
JMSException jmse = new jakarta.jms.JMSException(errMsg);
jmse.initCause(e);
throw jmse;
}
// reset flag
this.byteArrayReadState = false;
this.notYetProcessedPrimitiveObject = null;
}
use of com.sun.messaging.jmq.util.io.FilteringObjectInputStream in project openmq by eclipse-ee4j.
the class ReadChannel method getHashtableFromMessageBody.
protected static Hashtable getHashtableFromMessageBody(ReadOnlyPacket pkt) {
Hashtable prop = null;
try {
InputStream is = pkt.getMessageBodyStream();
ObjectInputStream ois = new FilteringObjectInputStream(is);
prop = (Hashtable) ois.readObject();
ois.close();
is.close();
} catch (Exception e) {
ExceptionHandler.logCaughtException(e);
Debug.printStackTrace(e);
}
return prop;
}
Aggregations