public interface FileAccess
Modifier and Type | Method and Description |
---|---|
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.
|
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
Copyright © 2000–2015 FreeHEP. All rights reserved.