toByteArrayStream method

  1. @override
void toByteArrayStream(
  1. ByteSink out
)
inherited

Writes the current object to the output stream.

@param out the output stream receiving the object @throws IOException if an exception occurs while writing to the stream

Implementation

@override
void toByteArrayStream(ByteSink out) {
  SerializerHelper.writeLong(out, serialversionUID);
  SerializerHelper.writeString(out, _name);
  SerializerHelper.writeString(out, _message);
  SerializerHelper.writeStackTraces(out, _stackTrace);
  if (_cause != null) {
    SerializerHelper.writeInt(out, 1);
    _cause!.toByteArrayStream(out);
  } else {
    SerializerHelper.writeInt(out, 0);
  }
  SerializerHelper.writeLong(out, serialversionUID);
}