FileDocCategorySizeDatePackage
PluginData.javaAPI DocAndroid 5.1 API4169Thu Mar 12 22:22:10 GMT 2015android.webkit

PluginData

public 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.
hide
deprecated
This class was intended to be used by Gears. Since Gears was deprecated, so is this class.

Fields Summary
private InputStream
mStream
The content stream.
private long
mContentLength
The content length.
private Map
mHeaders
The 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
mStatusCode
The associated HTTP response code.
Constructors Summary
public PluginData(InputStream stream, long length, Map headers, int code)
Creates a PluginData instance.

param
stream The stream that supplies content for the plugin.
param
length The length of the plugin content.
param
headers The response headers. Map of lowercase header name to [ unmodified header name, header value]
param
length The HTTP response status code.
hide
deprecated
This class was intended to be used by Gears. Since Gears was deprecated, so is this class.

        mStream = stream;
        mContentLength = length;
        mHeaders = headers;
        mStatusCode = code;
    
Methods Summary
public longgetContentLength()
Returns the length of the plugin content.

return
the length of the plugin content.
hide
deprecated
This class was intended to be used by Gears. Since Gears was deprecated, so is this class.

        return mContentLength;
    
public java.util.MapgetHeaders()
Returns the HTTP response headers associated with the plugin content.

return
A Map containing all headers. The mapping is 'lowercase header name' to ['unmodified header name', header value].
hide
deprecated
This class was intended to be used by Gears. Since Gears was deprecated, so is this class.

        return mHeaders;
    
public java.io.InputStreamgetInputStream()
Returns the input stream that contains the plugin content.

return
An InputStream instance with the plugin content.
hide
deprecated
This class was intended to be used by Gears. Since Gears was deprecated, so is this class.

        return mStream;
    
public intgetStatusCode()
Returns the HTTP status code for the response.

return
The HTTP statue code, e.g 200.
hide
deprecated
This class was intended to be used by Gears. Since Gears was deprecated, so is this class.

        return mStatusCode;