code: public Number createStream(Number streamId) {
          IConnection conn = Red5.getConnectionLocal();
          log.trace("createStream stream id: {} connection: {}", streamId, conn.getSessionId());
          if (conn instanceof IStreamCapableConnection) {
              try {
                  if (streamId.intValue() > 0) {
                      streamId = ((IStreamCapableConnection) conn).reserveStreamId(streamId);
                  } else {
                      streamId = ((IStreamCapableConnection) conn).reserveStreamId();
                  }
                  if (log.isTraceEnabled()) {
                      log.trace("Stream id: {} created for {}", streamId, conn.getSessionId());
                  }
                  return streamId;
              } catch (IndexOutOfBoundsException e) {
                  log.error("Unable to create stream", e);
              }
          }
          return -1;
      }
docs: {@inheritDoc}