use of org.fusesource.hawtbuf.UTF8Buffer in project fabric8 by jboss-fuse.
the class BaseDataStreamMarshaller method looseUnmarsalThrowable.
protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataByteArrayInputStream dataIn) throws IOException {
if (dataIn.readBoolean()) {
UTF8Buffer clazz = looseUnmarshalString(dataIn);
UTF8Buffer message = looseUnmarshalString(dataIn);
Throwable o = createThrowable(clazz, message);
if (wireFormat.isStackTraceEnabled()) {
if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
StackTraceElement[] ss = new StackTraceElement[dataIn.readShort()];
for (int i = 0; i < ss.length; i++) {
try {
ss[i] = (StackTraceElement) STACK_TRACE_ELEMENT_CONSTRUCTOR.newInstance(new Object[] { looseUnmarshalString(dataIn), looseUnmarshalString(dataIn), looseUnmarshalString(dataIn), Integer.valueOf(dataIn.readInt()) });
} catch (IOException e) {
throw e;
} catch (Throwable e) {
}
}
o.setStackTrace(ss);
} else {
short size = dataIn.readShort();
for (int i = 0; i < size; i++) {
looseUnmarshalString(dataIn);
looseUnmarshalString(dataIn);
looseUnmarshalString(dataIn);
dataIn.readInt();
}
}
o.initCause(looseUnmarsalThrowable(wireFormat, dataIn));
}
return o;
} else {
return null;
}
}
Aggregations