Interface WriteablePart


public interface WriteablePart
A single part of a WriteableMultiPart message.
  • Method Details

    • builder

      static WriteablePart.Builder builder(String partName)
      Builder to create a new part.
      Parameters:
      partName - name of this part (will be used in content disposition if used)
      Returns:
      a new builder
    • name

      String name()
      Name of this part.
      Returns:
      part name
    • fileName

      Optional<String> fileName()
      File name if defined in content disposition.
      Returns:
      file name
    • contentType

      HttpMediaType contentType()
      Content type of this part.
      Returns:
      content type
    • headers

      Headers headers()
      Full set of configured headers of this part.
      Returns:
      headers
    • writeServerResponse

      void writeServerResponse(MediaContext context, OutputStream outputStream, Headers requestHeaders)
      Write this part as part of server response.
      Parameters:
      context - media context
      outputStream - output stream to write to
      requestHeaders - request headers (server request headers)
    • writeClientRequest

      void writeClientRequest(MediaContext context, OutputStream outputStream)
      Write this part as part of client request.
      Parameters:
      context - media context
      outputStream - output stream to write to