public static Event parse(Event rawEvent) throws IOException {
        if(rawEvent.getHeader() == null) {
            return null;
        }
        if(rawEvent.getData() == null || !rawEvent.isRawData()) {
            return rawEvent;
        }
        IEventHeader header = rawEvent.getHeader();
        BinaryIEventData rawData = (BinaryIEventData)rawEvent.getData();
        ByteArrayInputStream bi = new ByteArrayInputStream(rawData.getData());

        EventDataParser parser = parserMap.get(header.getEventType());
        if(parser == null) {
            return rawEvent;
        }
        IEventData parsedData = parser.parse(bi);
        return new Event(header, parsedData);
    }