code: public static ReadableBuffer getBufferFromStream(InputStream stream) {
      if (!sZeroCopyReceiveSupported
          || !stream.getClass().equals(sReadableBufferField.getDeclaringClass())) {
        return null;
      }
      try {
        return (ReadableBuffer) sReadableBufferField.get(stream);
      } catch (Exception e) {
        LOG.warn("Failed to get data buffer from stream.", e);
        return null;
      }
    }
docs: Gets a buffer directly from a gRPC input stream.
  
  @param stream the input stream
  @return the raw data buffer