PluginDatapublic final class PluginData extends Object This class encapsulates the content generated by a plugin. The
data itself is meant to be loaded into webkit via the
PluginContentLoader class, which needs to be able to construct an
HTTP response. For this, it needs a stream with the response body,
the length of the body, the response headers, and the response
status code. The PluginData class is the container for all these
parts. |
Fields Summary |
---|
private InputStream | mStreamThe content stream. | private long | mContentLengthThe content length. | private Map | mHeadersThe associated HTTP response headers stored as a map of
lowercase header name to [ unmodified header name, header value].
TODO: This design was always a hack. Remove (involves updating
the Gears C++ side). | private int | mHeaderValueIndexThe index of the header value in the above mapping. | private int | mStatusCodeThe associated HTTP response code. |
Constructors Summary |
---|
public PluginData(InputStream stream, long length, Map headers, int code)Creates a PluginData instance.
mStream = stream;
mContentLength = length;
mHeaders = headers;
mStatusCode = code;
|
Methods Summary |
---|
public long | getContentLength()Returns the length of the plugin content.
return mContentLength;
| public java.util.Map | getHeaders()Returns the HTTP response headers associated with the plugin
content.
return mHeaders;
| public java.io.InputStream | getInputStream()Returns the input stream that contains the plugin content.
return mStream;
| public int | getStatusCode()Returns the HTTP status code for the response.
return mStatusCode;
|
|