public class FileItem extends FormItem
Constructor and Description |
---|
FileItem(File file)
Constructor to be used in tests, field name and file name are set to File name.
|
FileItem(String name,
String fieldName,
byte[] content)
Constructor to be used in tests.
|
FileItem(String name,
String fieldName,
String contentType,
byte[] content)
Constructor to be used in tests.
|
getBytes, getContentType, getFieldName, getFileName, getInputStream, getName, getStreamAsString, isFile, isFormField, saveTo
public FileItem(String name, String fieldName, String contentType, byte[] content)
name
- name of a filefieldName
- name of a field.contentType
- content type for this file.content
- content in bytes.public FileItem(String name, String fieldName, byte[] content) throws IOException
name
- file namefieldName
- field name.content
- content to send.IOException
public FileItem(File file) throws IOException
file
- file to send.IOException
Copyright © 2019 JavaLite. All rights reserved.