Class MultipartProcessor

java.lang.Object
com.stripe.net.MultipartProcessor

public class MultipartProcessor extends Object
  • 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