|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileAccess
Encapsulates access to a File in a way which will work with unsigned java web start apps. This interface can also be used by applications.
Method Summary | |
---|---|
boolean |
canRead()
Returns whether the file can be read. |
boolean |
canWrite()
Returns whether the file can be written to. |
File |
getFile()
Applications that need direct access to the underlying File can call this method, but it breaks the JNLP encapsualtion and will throw a SecurityException if used from an unsigned JNLP application. |
InputStream |
getInputStream()
Gets an InputStream from the file. |
long |
getLength()
Gets the length of the file |
long |
getMaxLength()
Gets the maximum length of this file. |
String |
getName()
Gets the file name as a string |
OutputStream |
getOutputStream(boolean append)
Gets an OutputStream to the file. |
long |
setMaxLength(long length)
Sets the maximum file length for the file. |
Method Detail |
---|
boolean canRead() throws IOException
IOException
boolean canWrite() throws IOException
IOException
InputStream getInputStream() throws IOException
IOException
OutputStream getOutputStream(boolean append) throws IOException
IOException
String getName() throws IOException
IOException
long getLength() throws IOException
IOException
long getMaxLength() throws IOException
IOException
long setMaxLength(long length) throws IOException
IOException
File getFile() throws IOException, SecurityException
IOException
SecurityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |