larksuite-oapi/src/main/java/com/larksuite/oapi/okhttp3_14/RequestBody.java
public static RequestBody create(final @Nullable MediaType contentType, final byte[] content,
                                   final int offset, final int byteCount) {
    if (content == null) throw new NullPointerException("content == null");
    Util.checkOffsetAndCount(content.length, offset, byteCount);
    return new RequestBody() {
      @Override public @Nullable
      MediaType contentType() {
        return contentType;
      }

      @Override public long contentLength() {
        return byteCount;
      }

      @Override public void writeTo(BufferedSink sink) throws IOException {
        sink.write(content, offset, byteCount);
      }
    };
  }
/** Returns a new request body that transmits {@code content}. */
Returns a new request body that transmits  content.
Returns a new request body that transmits content .
public static RequestBody create(final @Nullable MediaType contentType, final byte[] content,
                                   final int offset, final int byteCount) {
    if (content == null) throw new NullPointerException("content == null");
    Util.checkOffsetAndCount(content.length, offset, byteCount);
    return new RequestBody() {
      @Override public @Nullable
      MediaType contentType() {
        return contentType;
      }
      @Override public long contentLength() {
        return byteCount;
      }
      @Override public void writeTo(BufferedSink sink) throws IOException {
        sink.write(content, offset, byteCount);
      }
    };
  }
public static RequestBody create ( final @ Nullable MediaType contentType , final byte [ ] content , final int offset , final int byteCount ) { if ( content == null ) throw new NullPointerException ( "content == null" ) ; Util . checkOffsetAndCount ( content . length , offset , byteCount ) ; return new RequestBody ( ) { @ Override public @ Nullable MediaType contentType ( ) { return contentType ; } @ Override public long contentLength ( ) { return byteCount ; } @ Override public void writeTo ( BufferedSink sink ) throws IOException { sink . write ( content , offset , byteCount ) ; } } ; }
Returns a new request body that transmits {@code content}.
Returns a new request body that transmits { @code content } .