public final class

PluginData

extends Object
java.lang.Object
   ↳ android.webkit.PluginData

Class Overview

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.

Summary

Public Constructors
PluginData(InputStream stream, long length, Map<StringString[]> headers, int code)
Creates a PluginData instance.
Public Methods
long getContentLength()
Returns the length of the plugin content.
Map<StringString[]> getHeaders()
Returns the HTTP response headers associated with the plugin content.
InputStream getInputStream()
Returns the input stream that contains the plugin content.
int getStatusCode()
Returns the HTTP status code for the response.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PluginData (InputStream stream, long length, Map<StringString[]> headers, int code)

Creates a PluginData instance.

Parameters
stream The stream that supplies content for the plugin.
length The HTTP response status code.
headers The response headers. Map of lowercase header name to [ unmodified header name, header value]

Public Methods

public long getContentLength ()

Returns the length of the plugin content.

Returns
  • the length of the plugin content.

public Map<StringString[]> getHeaders ()

Returns the HTTP response headers associated with the plugin content.

Returns
  • A Map containing all headers. The mapping is 'lowercase header name' to ['unmodified header name', header value].

public InputStream getInputStream ()

Returns the input stream that contains the plugin content.

Returns
  • An InputStream instance with the plugin content.

public int getStatusCode ()

Returns the HTTP status code for the response.

Returns
  • The HTTP statue code, e.g 200.