private void readObject(ObjectInputStream stream)
            throws IOException, ClassNotFoundException {
        StreamEvent previousStreamEvent;
        beforeWindowData = (Object[]) stream.readObject();
        onAfterWindowData = (Object[]) stream.readObject();
        outputData = (Object[]) stream.readObject();
        type = (Type) stream.readObject();
        timestamp = stream.readLong();
        previousStreamEvent = this;
        boolean isNextAvailable = stream.readBoolean();
        while (isNextAvailable) {
            StreamEvent nextEvent = new StreamEvent(0, 0, 0);
            nextEvent.beforeWindowData = (Object[]) stream.readObject();
            nextEvent.onAfterWindowData = (Object[]) stream.readObject();
            nextEvent.outputData = (Object[]) stream.readObject();
            nextEvent.type = (Type) stream.readObject();
            nextEvent.timestamp = stream.readLong();
            previousStreamEvent.next = nextEvent;
            previousStreamEvent = nextEvent;
            isNextAvailable = stream.readBoolean();
        }
    }
@param position int array of 4 elements
                position[0] and position[1] are discarded
                position[2]-BeforeWindowData or OutputData or AfterWindowData, position[3]- which attribute
@return attribute
modules/siddhi-core/src/main/java/io/siddhi/core/event/stream/StreamEvent.java