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
[Expand]
Inherited Methods |
From class java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Is called before the object's memory is being reclaimed by the VM.
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of Class which represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
|
Public Constructors
public
PluginData
(InputStream stream, long length, Map<String, String[]> 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.
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.