GetState function

Return current state of a stream