fullstop-core/fullstop-processing/src/main/java/org/zalando/stups/fullstop/filereader/FileEventReader.java
private EventSerializer getEventSerializer(final GZIPInputStream inputStream, final CloudTrailLog ctLog)
            throws IOException {
        final EventSerializer serializer;

        if (isEnableRawEventInfo) {
            final String logFileContent = new String(LibraryUtils.toByteArray(inputStream), StandardCharsets.UTF_8);
            final JsonParser jsonParser = this.mapper.getFactory().createParser(logFileContent);
            serializer = new RawLogDeliveryEventSerializer(logFileContent, ctLog, jsonParser);
        }
        else {
            final JsonParser jsonParser = this.mapper.getFactory().createParser(inputStream);
            serializer = new DefaultEventSerializer(ctLog, jsonParser);
        }

        return serializer;
    }
private EventSerializer getEventSerializer(final GZIPInputStream inputStream, final CloudTrailLog ctLog)
            throws IOException {
        final EventSerializer serializer;

        if (isEnableRawEventInfo) {
            final String logFileContent = new String(LibraryUtils.toByteArray(inputStream), StandardCharsets.UTF_8);
            final JsonParser jsonParser = this.mapper.getFactory().createParser(logFileContent);
            serializer = new RawLogDeliveryEventSerializer(logFileContent, ctLog, jsonParser);
        }
        else {
            final JsonParser jsonParser = this.mapper.getFactory().createParser(inputStream);
            serializer = new DefaultEventSerializer(ctLog, jsonParser);
        }

        return serializer;
    }
private EventSerializer getEventSerializer ( final GZIPInputStream inputStream , final CloudTrailLog ctLog ) throws IOException { final EventSerializer serializer ; if ( isEnableRawEventInfo ) { final String logFileContent = new String ( LibraryUtils . toByteArray ( inputStream ) , StandardCharsets . UTF_8 ) ; final JsonParser jsonParser = this . mapper . getFactory ( ) . createParser ( logFileContent ) ; serializer = new RawLogDeliveryEventSerializer ( logFileContent , ctLog , jsonParser ) ; } else { final JsonParser jsonParser = this . mapper . getFactory ( ) . createParser ( inputStream ) ; serializer = new DefaultEventSerializer ( ctLog , jsonParser ) ; } return serializer ; }
Get the EventSerializer based on user's configuration.

@param inputStream the Gzipped content from CloudTrail log file
@param ctLog       CloudTrail log file
@return parser that parses CloudTrail log file
@throws java.io.IOException
Get the EventSerializer based on user s configuration .