public static void readBehaviors( WindowNode windowNode, WindowMemory memory, MarshallerReaderContext inCtx ) throws IOException { short token = -1; while (( token = inCtx.readShort() ) != PersisterEnums.END) { int i = inCtx.readInt(); Object object = ( (Object[]) memory.behaviorContext )[i]; switch (token) { case PersisterEnums.SLIDING_TIME_WIN: { readSlidingTimeWindowBehaviour( windowNode, memory, (SlidingTimeWindow) windowNode.getBehaviors()[i], (SlidingTimeWindowContext) object, inCtx ); break; } case PersisterEnums.SLIDING_LENGTH_WIN: { readSlidingLengthWindowBehaviour( windowNode, memory, (SlidingLengthWindow) windowNode.getBehaviors()[i], (SlidingLengthWindowContext) object, inCtx ); break; } } } }