private void ensureStatusStreamListenerIsSet(){
  if (statusListeners.size() == 0 && rawStreamListeners.size() == 0)   throw new IllegalStateException("StatusListener is not set.");
}

private void ensureStatusStreamListenerIsSet ( ) { if ( statusListeners . size ( ) == 0 && rawStreamListeners . size ( ) == 0 ) throw new IllegalStateException ( "StatusListener is not set." ) ; }
check if any listener is set . throws illegalstateexception if no listener is set .
