Interface IBinaryDataBuilder<Self>

Type Parameters:
Self - Type of the builder returned by the build methods.
All Superinterfaces:
IHttpBodyBuilder
All Known Subinterfaces:
IMultipartBodyBuilder

public interface IBinaryDataBuilder<Self> extends IHttpBodyBuilder
A builder for an HTTP request body that can have binary data items, such as a multipart body.
Since:
7.0.3
Author:
XIMA MEDIA GmbH
  • Method Details

    • addBinaryData

      @Nonnull Self addBinaryData(BinaryData data)
      Adds a binary data file to this builder.
      Parameters:
      data - The binary data to be added.
      Returns:
      This builder for chaining method calls.
    • addBinaryData

      @Nonnull Self addBinaryData(@Nonnull String elementName, @Nullable byte[] data, @Nonnull String filename, @Nonnull String mimeType)
      Adds a binary data item to this builder. When a charset is required, the default charset of the HTTP request builder is used.
      Parameters:
      elementName - Name of the file.
      data - Binary data of the file.
      filename - Name of the file.
      mimeType - Mime type of the file.
      Returns:
      This builder for chaining method calls.
    • addBinaryData

      @Nonnull Self addBinaryData(@Nonnull String elementName, @Nullable byte[] data, @Nonnull String filename, @Nonnull String mimeType, @Nonnull Charset charset)
      Adds a binary data item to this builder.
      Parameters:
      elementName - Name of the file.
      data - Binary data of the file.
      filename - Name of the file.
      mimeType - Mime type of the file.
      charset - Charset of the file, this is combined with the mime type.
      Returns:
      This builder for chaining method calls.
    • addBinaryDataItems

      @Nonnull Self addBinaryDataItems(Iterable<BinaryData> dataItems)
      Adds binary data items file to this builder.
      Parameters:
      dataItems - The binary data items to be added.
      Returns:
      This builder for chaining method calls.