wt.security
Class FileAccess

java.lang.Object
  extended bywt.security.Access
      extended bywt.security.FileAccess
Direct Known Subclasses:
FileAccess_plugin

public class FileAccess
extends Access

Class that provides wrappers to priviledged file methods using the wt.security package. This allows applets to perform file operations that are typically restricted by the sandbox.

Supported API: true


Field Summary
 
Fields inherited from class wt.security.Access
 
Constructor Summary
FileAccess()
           
 
Method Summary
 boolean canRead(File file)
          Wrapper for File.canRead()
(package private)  boolean canRead0(File file)
           
 boolean canWrite(File file)
          Wrapper for File.canWrite()
(package private)  boolean canWrite0(File file)
           
 boolean delete(File file)
          Wrapper for File.delete()
(package private)  boolean delete0(File file)
           
 boolean exists(File file)
          Wrapper for File.exists()
(package private)  boolean exists0(File file)
           
 void FileDialog_setDirectory(FileDialog dialog, String directory)
          Wrapper for FileDialog.setDirectory().
(package private)  void FileDialog_setDirectory0(FileDialog dialog, String directory)
           
 void FileDialog_setFile(FileDialog dialog, String filename)
          Wrapper for FileDialog.setFile().
(package private)  void FileDialog_setFile0(FileDialog dialog, String filename)
           
 void FileDialog_show(FileDialog dialog)
          Wrapper for FileDialog.show().
(package private)  void FileDialog_show0(FileDialog dialog)
           
 boolean fileEquals(File file0, File file1)
          Wrapper for File.equals()
(package private)  boolean fileEquals0(File file0, File file1)
           
 String getAbsolutePath(File file)
          Wrapper for File.getAbsolutePath()
(package private)  String getAbsolutePath0(File file)
           
 String getCanonicalPath(File file)
          Wrapper for File.getCanonicalPath()
(package private)  String getCanonicalPath0(File file)
           
static FileAccess getFileAccess()
          Get instance of FileAccess.
static FileAccess getFileAccess(Frame parentFrame)
          Get instance of FileAccess.
 FileInputStream getFileInputStream(File file)
          Wrapper for FileInputStream constructor.
 FileInputStream getFileInputStream(FileDescriptor file)
          Wrapper for FileInputStream constructor.
 FileInputStream getFileInputStream(String file)
          Wrapper for FileInputStream constructor.
(package private)  FileInputStream getFileInputStream0(File file)
           
(package private)  FileInputStream getFileInputStream0(FileDescriptor file)
           
(package private)  FileInputStream getFileInputStream0(String file)
           
 FileOutputStream getFileOutputStream(File file)
          Wrapper for FileOutputStream constructor.
 FileOutputStream getFileOutputStream(FileDescriptor file)
          Wrapper for FileOutputStream constructor.
 FileOutputStream getFileOutputStream(String file)
          Wrapper for FileOutputStream constructor.
 FileOutputStream getFileOutputStream(String file, boolean append)
          Wrapper for FileOutputStream constructor.
(package private)  FileOutputStream getFileOutputStream0(File file)
           
(package private)  FileOutputStream getFileOutputStream0(FileDescriptor file)
           
(package private)  FileOutputStream getFileOutputStream0(String file)
           
(package private)  FileOutputStream getFileOutputStream0(String file, boolean append)
           
 String getParent(File file)
          Wrapper for File.getParent()
(package private)  String getParent0(File file)
           
 File getParentDirectory(FileSystemView view, File file)
           
(package private)  File getParentDirectory0(FileSystemView view, File file)
           
 boolean isAbsolute(File file)
          Wrapper for File.isAbsolute()
(package private)  boolean isAbsolute0(File file)
           
 boolean isDirectory(File file)
          Wrapper for File.isDirectory()
(package private)  boolean isDirectory0(File file)
           
 boolean isFile(File file)
          Wrapper for File.isFile()
(package private)  boolean isFile0(File file)
           
protected  void JFileChooser_setCurrentDirectory(WTJFileChooser jfc, File dir)
          Wrapper for JFileChooser.setCurrentDirectory().
(package private)  void JFileChooser_setCurrentDirectory0(WTJFileChooser jfc, File dir)
           
 void JFileChooser_setSelectedFile(WTJFileChooser jfc, File file)
          Wrapper for JFileChooser.setSelectedFile().
(package private)  void JFileChooser_setSelectedFile0(WTJFileChooser jfc, File file)
           
 void JFileChooser_setSelectedFiles(WTJFileChooser jfc, File[] file)
          Wrapper for JFileChooser.setSelectedFiles().
(package private)  void JFileChooser_setSelectedFiles0(WTJFileChooser jfc, File[] file)
           
protected  int JFileChooser_showDialog(WTJFileChooser jfc, Component parent, String text)
          Wrapper for JFileChooser.showDialog().
(package private)  int JFileChooser_showDialog0(WTJFileChooser jfc, Component parent, String text)
           
 long lastModified(File file)
          Wrapper for File.lastModified()
(package private)  long lastModified0(File file)
           
 long length(File file)
          Wrapper for File.length()
(package private)  long length0(File file)
           
 String[] list(File file)
          Wrapper for File.list()
(package private)  String[] list0(File file)
           
 File[] listFiles(File file)
          Wrapper for File.listFiles()
(package private)  File[] listFiles0(File file)
           
 boolean mkdir(File file)
          Wrapper for File.mkdir()
(package private)  boolean mkdir0(File file)
           
 boolean mkdirs(File file)
          Wrapper for File.mkdirs()
(package private)  boolean mkdirs0(File file)
           
 FileDialog newFileDialog(Frame frame)
          Wrapper for new FileDialog().
(package private)  FileDialog newFileDialog0(Frame frame)
           
 JFileChooser newJFileChooser()
          Wrapper for new JFileChooser().
 JFileChooser newJFileChooser(File currentDirectory)
          Wrapper for new JFileChooser(File).
(package private)  WTJFileChooser newJFileChooser0()
           
(package private)  WTJFileChooser newJFileChooser0(File currentDirectory)
           
 boolean renameTo(File from, File to)
          Wrapper for File.renameTo()
(package private)  boolean renameTo0(File from, File to)
           
 
Methods inherited from class wt.security.Access
checkAccess, checkAccessAll, checkClass, checkClass, checkClass, getAccessImpl, setParentFrame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileAccess

public FileAccess()
Method Detail

getFileAccess

public static FileAccess getFileAccess(Frame parentFrame)
Get instance of FileAccess. This instance can then be used to perform file operation that are typically restricted by the sandbox.

Parameters:
parentFrame - the parent frame for security dialog boxes that may be presented

Supported API: true

getFileAccess

public static FileAccess getFileAccess()
Get instance of FileAccess. This instance can then be used to perform file operation that are typically restricted by the sandbox.

Supported API: true


getFileInputStream

public FileInputStream getFileInputStream(String file)
                                   throws WTSecurityException,
                                          FileNotFoundException
Wrapper for FileInputStream constructor.

Parameters:
file - the filename for the file to be opened for the input stream

Supported API: true
Throws:
WTSecurityException
FileNotFoundException

getFileInputStream0

FileInputStream getFileInputStream0(String file)
                              throws WTSecurityException,
                                     FileNotFoundException
Throws:
WTSecurityException
FileNotFoundException

getFileInputStream

public FileInputStream getFileInputStream(File file)
                                   throws WTSecurityException,
                                          FileNotFoundException
Wrapper for FileInputStream constructor.

Parameters:
file - the file to be opened for the input stream

Supported API: true
Throws:
WTSecurityException
FileNotFoundException

getFileInputStream0

FileInputStream getFileInputStream0(File file)
                              throws WTSecurityException,
                                     FileNotFoundException
Throws:
WTSecurityException
FileNotFoundException

getFileInputStream

public FileInputStream getFileInputStream(FileDescriptor file)
                                   throws WTSecurityException
Wrapper for FileInputStream constructor.

Parameters:
file - the file descriptor of the file to be opened for the input stream

Supported API: true
Throws:
WTSecurityException

getFileInputStream0

FileInputStream getFileInputStream0(FileDescriptor file)
                              throws WTSecurityException
Throws:
WTSecurityException

getFileOutputStream

public FileOutputStream getFileOutputStream(File file)
                                     throws WTSecurityException,
                                            IOException
Wrapper for FileOutputStream constructor.

Parameters:
file - the file to be opened for the output stream

Supported API: true
Throws:
WTSecurityException
IOException

getFileOutputStream0

FileOutputStream getFileOutputStream0(File file)
                                throws WTSecurityException,
                                       IOException
Throws:
WTSecurityException
IOException

getFileOutputStream

public FileOutputStream getFileOutputStream(FileDescriptor file)
                                     throws WTSecurityException
Wrapper for FileOutputStream constructor.

Parameters:
file - the file descriptor to the file to be opened for the output stream

Supported API: true
Throws:
WTSecurityException

getFileOutputStream0

FileOutputStream getFileOutputStream0(FileDescriptor file)
                                throws WTSecurityException
Throws:
WTSecurityException

getFileOutputStream

public FileOutputStream getFileOutputStream(String file)
                                     throws WTSecurityException,
                                            IOException
Wrapper for FileOutputStream constructor.

Parameters:
file - the filename to the file to be opened for the output stream

Supported API: true
Throws:
WTSecurityException
IOException

getFileOutputStream0

FileOutputStream getFileOutputStream0(String file)
                                throws WTSecurityException,
                                       IOException
Throws:
WTSecurityException
IOException

getFileOutputStream

public FileOutputStream getFileOutputStream(String file,
                                            boolean append)
                                     throws WTSecurityException,
                                            IOException
Wrapper for FileOutputStream constructor.

Parameters:
file - the filename to the file to be opened for the output stream
append - boolean stating if the file should be appended to

Supported API: true
Throws:
WTSecurityException
IOException

getFileOutputStream0

FileOutputStream getFileOutputStream0(String file,
                                      boolean append)
                                throws WTSecurityException,
                                       IOException
Throws:
WTSecurityException
IOException

exists

public boolean exists(File file)
               throws WTSecurityException
Wrapper for File.exists()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

exists0

boolean exists0(File file)
          throws WTSecurityException
Throws:
WTSecurityException

list

public String[] list(File file)
              throws WTSecurityException
Wrapper for File.list()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

list0

String[] list0(File file)
         throws WTSecurityException
Throws:
WTSecurityException

listFiles

public File[] listFiles(File file)
                 throws WTSecurityException
Wrapper for File.listFiles()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

listFiles0

File[] listFiles0(File file)
            throws WTSecurityException
Throws:
WTSecurityException

isFile

public boolean isFile(File file)
               throws WTSecurityException
Wrapper for File.isFile()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

isFile0

boolean isFile0(File file)
          throws WTSecurityException
Throws:
WTSecurityException

isDirectory

public boolean isDirectory(File file)
                    throws WTSecurityException
Wrapper for File.isDirectory()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

isDirectory0

boolean isDirectory0(File file)
               throws WTSecurityException
Throws:
WTSecurityException

isAbsolute

public boolean isAbsolute(File file)
                   throws WTSecurityException
Wrapper for File.isAbsolute()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

isAbsolute0

boolean isAbsolute0(File file)
              throws WTSecurityException
Throws:
WTSecurityException

lastModified

public long lastModified(File file)
                  throws WTSecurityException
Wrapper for File.lastModified()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

lastModified0

long lastModified0(File file)
             throws WTSecurityException
Throws:
WTSecurityException

length

public long length(File file)
            throws WTSecurityException
Wrapper for File.length()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

length0

long length0(File file)
       throws WTSecurityException
Throws:
WTSecurityException

mkdir

public boolean mkdir(File file)
              throws WTSecurityException
Wrapper for File.mkdir()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

mkdir0

boolean mkdir0(File file)
         throws WTSecurityException
Throws:
WTSecurityException

mkdirs

public boolean mkdirs(File file)
               throws WTSecurityException
Wrapper for File.mkdirs()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

mkdirs0

boolean mkdirs0(File file)
          throws WTSecurityException
Throws:
WTSecurityException

renameTo

public boolean renameTo(File from,
                        File to)
                 throws WTSecurityException
Wrapper for File.renameTo()

Parameters:
from - the file that is being renamed
to - the file that from is being renamed to

Supported API: true
Throws:
WTSecurityException

renameTo0

boolean renameTo0(File from,
                  File to)
            throws WTSecurityException
Throws:
WTSecurityException

delete

public boolean delete(File file)
               throws WTSecurityException
Wrapper for File.delete()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

delete0

boolean delete0(File file)
          throws WTSecurityException
Throws:
WTSecurityException

getCanonicalPath

public String getCanonicalPath(File file)
                        throws WTSecurityException,
                               IOException
Wrapper for File.getCanonicalPath()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException
IOException

getCanonicalPath0

String getCanonicalPath0(File file)
                   throws WTSecurityException,
                          IOException
Throws:
WTSecurityException
IOException

getParent

public String getParent(File file)
                 throws WTSecurityException,
                        IOException
Wrapper for File.getParent()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException
IOException

getParent0

String getParent0(File file)
            throws WTSecurityException,
                   IOException
Throws:
WTSecurityException
IOException

getParentDirectory

public File getParentDirectory(FileSystemView view,
                               File file)
                        throws WTSecurityException
Throws:
WTSecurityException

getParentDirectory0

File getParentDirectory0(FileSystemView view,
                         File file)
                   throws WTSecurityException
Throws:
WTSecurityException

getAbsolutePath

public String getAbsolutePath(File file)
                       throws WTSecurityException,
                              IOException
Wrapper for File.getAbsolutePath()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException
IOException

getAbsolutePath0

String getAbsolutePath0(File file)
                  throws WTSecurityException,
                         IOException
Throws:
WTSecurityException
IOException

canRead

public boolean canRead(File file)
                throws WTSecurityException
Wrapper for File.canRead()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

canRead0

boolean canRead0(File file)
           throws WTSecurityException
Throws:
WTSecurityException

canWrite

public boolean canWrite(File file)
                 throws WTSecurityException
Wrapper for File.canWrite()

Parameters:
file - the file the operation is being performed upon

Supported API: true
Throws:
WTSecurityException

canWrite0

boolean canWrite0(File file)
            throws WTSecurityException
Throws:
WTSecurityException

fileEquals

public boolean fileEquals(File file0,
                          File file1)
                   throws WTSecurityException
Wrapper for File.equals()

Throws:
WTSecurityException

fileEquals0

boolean fileEquals0(File file0,
                    File file1)
              throws WTSecurityException
Throws:
WTSecurityException

newFileDialog

public FileDialog newFileDialog(Frame frame)
                         throws WTSecurityException
Wrapper for new FileDialog(). This operation requires permission under Internet Explorer.

Parameters:
frame - the parent frame for this newly constructed FileDialog

Supported API: true
Throws:
WTSecurityException

newFileDialog0

FileDialog newFileDialog0(Frame frame)
                    throws WTSecurityException
Throws:
WTSecurityException

FileDialog_show

public void FileDialog_show(FileDialog dialog)
                     throws WTSecurityException
Wrapper for FileDialog.show().

Throws:
WTSecurityException

FileDialog_show0

void FileDialog_show0(FileDialog dialog)
                throws WTSecurityException
Throws:
WTSecurityException

FileDialog_setDirectory

public void FileDialog_setDirectory(FileDialog dialog,
                                    String directory)
                             throws WTSecurityException
Wrapper for FileDialog.setDirectory().

Throws:
WTSecurityException

FileDialog_setDirectory0

void FileDialog_setDirectory0(FileDialog dialog,
                              String directory)
                        throws WTSecurityException
Throws:
WTSecurityException

FileDialog_setFile

public void FileDialog_setFile(FileDialog dialog,
                               String filename)
                        throws WTSecurityException
Wrapper for FileDialog.setFile().

Throws:
WTSecurityException

FileDialog_setFile0

void FileDialog_setFile0(FileDialog dialog,
                         String filename)
                   throws WTSecurityException
Throws:
WTSecurityException

newJFileChooser

public JFileChooser newJFileChooser()
                             throws WTSecurityException
Wrapper for new JFileChooser().

Supported API: true

Throws:
WTSecurityException

newJFileChooser0

WTJFileChooser newJFileChooser0()
                          throws WTSecurityException
Throws:
WTSecurityException

newJFileChooser

public JFileChooser newJFileChooser(File currentDirectory)
                             throws WTSecurityException
Wrapper for new JFileChooser(File).

Supported API: true

Throws:
WTSecurityException

newJFileChooser0

WTJFileChooser newJFileChooser0(File currentDirectory)
                          throws WTSecurityException
Throws:
WTSecurityException

JFileChooser_showDialog

protected int JFileChooser_showDialog(WTJFileChooser jfc,
                                      Component parent,
                                      String text)
                               throws WTSecurityException
Wrapper for JFileChooser.showDialog().

Parameters:
parent - the parent component of the dialog
text - the text of the ApproveButton

Supported API: true
Throws:
WTSecurityException

JFileChooser_showDialog0

int JFileChooser_showDialog0(WTJFileChooser jfc,
                             Component parent,
                             String text)
                       throws WTSecurityException
Throws:
WTSecurityException

JFileChooser_setCurrentDirectory

protected void JFileChooser_setCurrentDirectory(WTJFileChooser jfc,
                                                File dir)
                                         throws WTSecurityException
Wrapper for JFileChooser.setCurrentDirectory().

Parameters:
dir - the current directory to point to

Supported API: true
Throws:
WTSecurityException

JFileChooser_setCurrentDirectory0

void JFileChooser_setCurrentDirectory0(WTJFileChooser jfc,
                                       File dir)
                                 throws WTSecurityException
Throws:
WTSecurityException

JFileChooser_setSelectedFile

public void JFileChooser_setSelectedFile(WTJFileChooser jfc,
                                         File file)
                                  throws WTSecurityException
Wrapper for JFileChooser.setSelectedFile().

Parameters:
file - the file currently selected

Supported API: true
Throws:
WTSecurityException

JFileChooser_setSelectedFile0

void JFileChooser_setSelectedFile0(WTJFileChooser jfc,
                                   File file)
                             throws WTSecurityException
Throws:
WTSecurityException

JFileChooser_setSelectedFiles

public void JFileChooser_setSelectedFiles(WTJFileChooser jfc,
                                          File[] file)
                                   throws WTSecurityException
Wrapper for JFileChooser.setSelectedFiles().

Parameters:
file - the file currently selected

Supported API: true
Throws:
WTSecurityException

JFileChooser_setSelectedFiles0

void JFileChooser_setSelectedFiles0(WTJFileChooser jfc,
                                    File[] file)
                              throws WTSecurityException
Throws:
WTSecurityException