abstract class FormDataElement
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
FormDataElement.ByteArrayElement
A form data element based on a byte array.
|
private static class |
FormDataElement.FileElement
A form data element based on a file.
|
Modifier and Type | Field and Description |
---|---|
private java.io.InputStream |
inputStream
The input stream from which the content of this element
can be read.
|
Constructor and Description |
---|
FormDataElement() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
close()
Closes this element and releases all resources associated with it.
|
protected abstract java.io.InputStream |
createInputStream()
Creates the input stream from which the content of this element
can be read.
|
protected abstract long |
doGetSize()
Returns the size of this element's content in bytes.
|
private static FormDataElement |
fwkCreateFromByteArray(byte[] byteArray)
Creates a new FormDataElement from a byte array.
|
private static FormDataElement |
fwkCreateFromFile(java.lang.String fileName)
Creates a new FormDataElement from a file.
|
(package private) java.io.InputStream |
getInputStream()
Returns the input stream from which the content of this element
can be read.
|
(package private) long |
getSize()
Returns the size of this element's content in bytes.
|
(package private) void |
open()
Opens this element and makes its size and content available
for retrieval.
|
private java.io.InputStream inputStream
void open() throws java.io.IOException
java.io.IOException
long getSize()
java.io.InputStream getInputStream()
void close() throws java.io.IOException
java.io.IOException
protected abstract java.io.InputStream createInputStream() throws java.io.IOException
java.io.IOException
protected abstract long doGetSize()
private static FormDataElement fwkCreateFromByteArray(byte[] byteArray)
private static FormDataElement fwkCreateFromFile(java.lang.String fileName)