Top Description Inners Fields Constructors Methods
com.sun.webkit.network

pack-priv abstract Class FormDataElement

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.webkit.network.FormDataElement.ByteArrayElement, com.sun.webkit.network.FormDataElement.FileElement
Imports
java.io.BufferedInputStream, .ByteArrayInputStream, .File, .FileInputStream, .IOException, .InputStream

A form data element, such as a byte array or a local file.

Nested and Inner Type Summary

Modifier and TypeClass 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.

Field Summary

Modifier and TypeField and Description
private InputStream
inputStream

The input stream from which the content of this element can be read.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
close()

Closes this element and releases all resources associated with it.

protected abstract 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(String fileName)

Creates a new FormDataElement from a file.

pack-priv InputStream
getInputStream()

Returns the input stream from which the content of this element can be read.

pack-priv long
getSize()

Returns the size of this element's content in bytes.

pack-priv void
open()

Opens this element and makes its size and content available for retrieval.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

inputStreamback to summary
private InputStream inputStream

The input stream from which the content of this element can be read.

Constructor Detail

FormDataElementback to summary
pack-priv FormDataElement()

Method Detail

closeback to summary
pack-priv void close() throws IOException

Closes this element and releases all resources associated with it. This method makes the element's size and content unavailable for retrieval. This method is a no op if the element is already closed.

createInputStreamback to summary
protected abstract InputStream createInputStream() throws IOException

Creates the input stream from which the content of this element can be read.

doGetSizeback to summary
protected abstract long doGetSize()

Returns the size of this element's content in bytes.

fwkCreateFromByteArrayback to summary
private static FormDataElement fwkCreateFromByteArray(byte[] byteArray)

Creates a new FormDataElement from a byte array.

fwkCreateFromFileback to summary
private static FormDataElement fwkCreateFromFile(String fileName)

Creates a new FormDataElement from a file.

getInputStreamback to summary
pack-priv InputStream getInputStream()

Returns the input stream from which the content of this element can be read.

getSizeback to summary
pack-priv long getSize()

Returns the size of this element's content in bytes.

openback to summary
pack-priv void open() throws IOException

Opens this element and makes its size and content available for retrieval.

com.sun.webkit.network back to summary

private final Class FormDataElement.ByteArrayElement

extends FormDataElement
Class Inheritance

A form data element based on a byte array.

Field Summary

Modifier and TypeField and Description
private final byte[]

Constructor Summary

AccessConstructor and Description
private
ByteArrayElement(byte[] byteArray)

Method Summary

Modifier and TypeMethod and Description
protected InputStream
createInputStream()

Implements abstract com.sun.webkit.network.FormDataElement.createInputStream.

Creates the input stream from which the content of this element can be read.

protected long
doGetSize()

Implements abstract com.sun.webkit.network.FormDataElement.doGetSize.

Returns the size of this element's content in bytes.

Inherited from com.sun.webkit.network.FormDataElement:
closegetInputStreamgetSizeopen

Field Detail

byteArrayback to summary
private final byte[] byteArray

Constructor Detail

ByteArrayElementback to summary
private ByteArrayElement(byte[] byteArray)

Method Detail

createInputStreamback to summary
protected InputStream createInputStream()

Implements abstract com.sun.webkit.network.FormDataElement.createInputStream.

Doc from com.sun.webkit.network.FormDataElement.createInputStream.

Creates the input stream from which the content of this element can be read.

Annotations
@Override
doGetSizeback to summary
protected long doGetSize()

Implements abstract com.sun.webkit.network.FormDataElement.doGetSize.

Doc from com.sun.webkit.network.FormDataElement.doGetSize.

Returns the size of this element's content in bytes.

Annotations
@Override
com.sun.webkit.network back to summary

private final Class FormDataElement.FileElement

extends FormDataElement
Class Inheritance

A form data element based on a file.

Field Summary

Modifier and TypeField and Description
private final File

Constructor Summary

AccessConstructor and Description
private
FileElement(String filename)

Method Summary

Modifier and TypeMethod and Description
protected InputStream
createInputStream()

Implements abstract com.sun.webkit.network.FormDataElement.createInputStream.

Creates the input stream from which the content of this element can be read.

protected long
doGetSize()

Implements abstract com.sun.webkit.network.FormDataElement.doGetSize.

Returns the size of this element's content in bytes.

Inherited from com.sun.webkit.network.FormDataElement:
closegetInputStreamgetSizeopen

Field Detail

fileback to summary
private final File file

Constructor Detail

FileElementback to summary
private FileElement(String filename)

Method Detail

createInputStreamback to summary
protected InputStream createInputStream() throws IOException

Implements abstract com.sun.webkit.network.FormDataElement.createInputStream.

Doc from com.sun.webkit.network.FormDataElement.createInputStream.

Creates the input stream from which the content of this element can be read.

Annotations
@Override
doGetSizeback to summary
protected long doGetSize()

Implements abstract com.sun.webkit.network.FormDataElement.doGetSize.

Doc from com.sun.webkit.network.FormDataElement.doGetSize.

Returns the size of this element's content in bytes.

Annotations
@Override