class SerializedEvent {

    public Event asEvent() {
        if (event == null) {
            try {
                event = Event.parseFrom(serializedData);
            } catch (InvalidProtocolBufferException e) {
                throw new MessagingPlatformException(ErrorCode.DATAFILE_READ_ERROR, e.getMessage(), e);
            }
        }
        return event;
    }

    public  SerializedEvent(Event event);
    public  SerializedEvent(byte[] eventFromFile);
    public  SerializedEvent(InputStream event);

}