added streaming test util and KeyStream.as source code