try {
StreamEventData data = StreamEventDataCodec.decode(decoder);
// Read the timestamp
long timestamp = decoder.readLong();
return new DefaultStreamEvent(data, timestamp);
} catch (IOException e) {
// It should never happens, otherwise something very wrong.
throw Throwables.propagate(e);