Package com.atlan.net

Class MultipartProcessor

java.lang.Object
com.atlan.net.MultipartProcessor

public class MultipartProcessor extends Object
Currently unused — may be useful longer-term for endpoints that need to upload files (TBC).
  • Constructor Details

  • Method Details

    • addFormField

      public void addFormField(String name, String value)
      Adds a form field to the multipart message.
      Parameters:
      name - field name
      value - field value
    • addFileField

      public void addFileField(String name, String fileName, InputStream inputStream) throws IOException
      Adds a file field to the multipart message, but takes in an InputStream instead of just a file to read bytes from.
      Parameters:
      name - Field name
      fileName - Name of the "file" being uploaded.
      inputStream - Stream of bytes to use in place of a file.
      Throws:
      IOException - Thrown when writing / reading from streams fails.
    • finish

      public void finish() throws IOException
      Adds the final boundary to the multipart message and closes streams.
      Throws:
      IOException