JSPservletPkg
Class ResourcePrivilegedAction

java.lang.Object
  |
  +--JSPservletPkg.ResourcePrivilegedAction

class ResourcePrivilegedAction
extends java.lang.Object
implements java.security.PrivilegedAction

Wraps a resource download. Must be invoked by AccessController.doPrivileged.

Copyright (c) 2000-2001

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; version 2
 of the License.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 

Version:
1, 0, 2
Author:
Alexis Grandemange

Field Summary
(package private)  JSPhandler handler
          Back pointer on handler.
(package private)  JSPloader loader
          Back pointer on loader.
(package private)  java.lang.String name
          Resource path.
(package private)  java.lang.String remoteLoc
          Resource base URL.
 
Constructor Summary
ResourcePrivilegedAction(JSPloader jl, java.lang.String rl, java.lang.String name)
          Constructor.
 
Method Summary
private  byte[] getStream(java.io.InputStream is)
          reads a stream in a byte buffer.
 java.lang.Object run()
          Invoked by AccessController.doPrivileged.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

loader

JSPloader loader
Back pointer on loader.

handler

JSPhandler handler
Back pointer on handler.

remoteLoc

java.lang.String remoteLoc
Resource base URL.

name

java.lang.String name
Resource path.
Constructor Detail

ResourcePrivilegedAction

public ResourcePrivilegedAction(JSPloader jl,
                                java.lang.String rl,
                                java.lang.String name)
Constructor.
Parameters:
jl - invoking JSPloader.
rl - resource base URL.
name - resource path.
Method Detail

getStream

private final byte[] getStream(java.io.InputStream is)
                        throws java.io.IOException
reads a stream in a byte buffer. Called by run.
Parameters:
is - input stream.

run

public java.lang.Object run()
Invoked by AccessController.doPrivileged.
Specified by:
run in interface java.security.PrivilegedAction