code: public static Object create(Delegate delegate, int bufferSize) {
      if (bufferSize < 1) {
        throw new IllegalArgumentException("Invalid buffer size: " + bufferSize);
      }
  
      if (delegate == null) {
        throw new IllegalArgumentException("Delegate must not be null");
      }
  
      return nativeCreate(delegate, bufferSize);
    }
docs: Creates a native NSInputStream that is piped to a NSOutpuStream, which in turn requests data
  from the supplied delegate asynchronously.
  
  <p>Please note that the returned NSInputStream is not yet open. This is to allow the stream to
  be used by other Foundation API (such as NSMutableURLRequest) and is consistent with other
  NSInputStream initializers.
  
  @param delegate the delegate.
  @param bufferSize the size of the internal buffer used to pipe the NSOutputStream to the
  NSInputStream.
  @return a native NSInputStream.