class ClassLoaderResource extends java.lang.Object implements ForkResource
Modifier and Type | Field and Description |
---|---|
private java.lang.ClassLoader |
loader |
Constructor and Description |
---|
ClassLoaderResource(java.lang.ClassLoader loader) |
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
process(java.io.DataInputStream input,
java.io.DataOutputStream output)
Processes a request for one (code 1) or many (code 2) class loader
resources.
|
private void |
writeAndCloseStream(java.io.DataOutputStream output,
java.io.InputStream stream)
Sends the contents of the given input stream to the given output.
|
public java.lang.Throwable process(java.io.DataInputStream input, java.io.DataOutputStream output) throws java.io.IOException
true
value. If the resource was not found (code 1) or
when the last resource has been sent (code 2), a boolean
false
value is sent instead.process
in interface ForkResource
name
- resource namejava.io.IOException
- if the resource could not be sentprivate void writeAndCloseStream(java.io.DataOutputStream output, java.io.InputStream stream) throws java.io.IOException
The stream is guaranteed to be closed by this method, regardless of the way it returns.
stream
- the stream to be sentjava.io.IOException
- if the stream could not be sent