Class FileItem

java.lang.Object
org.javalite.activeweb.FormItem
org.javalite.activeweb.FileItem

public class FileItem extends FormItem
Convenience class for use in tests.
Author:
Igor Polevoy
  • Constructor Details

    • FileItem

      public FileItem(String name, String fieldName, String contentType, byte[] content)
      Constructor to be used in tests.
      Parameters:
      name - name of a file
      fieldName - name of a field.
      contentType - content type for this file.
      content - content in bytes.
    • FileItem

      public FileItem(String name, String fieldName, byte[] content) throws IOException
      Constructor to be used in tests. Content type set to "text/plain".
      Parameters:
      name - file name
      fieldName - field name.
      content - content to send.
      Throws:
      IOException
    • FileItem

      public FileItem(File file) throws IOException
      Constructor to be used in tests, field name and file name are set to File name. Content type set to "text/plain".
      Parameters:
      file - file to send.
      Throws:
      IOException