public class JNLPFileAccess extends Object implements FileAccess
Constructor and Description |
---|
JNLPFileAccess(javax.jnlp.FileContents fc)
Creates new JNLPFileAccess
|
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.
|
public JNLPFileAccess(javax.jnlp.FileContents fc)
public boolean canRead() throws IOException
FileAccess
canRead
in interface FileAccess
IOException
public boolean canWrite() throws IOException
FileAccess
canWrite
in interface FileAccess
IOException
public InputStream getInputStream() throws IOException
FileAccess
getInputStream
in interface FileAccess
IOException
public OutputStream getOutputStream(boolean append) throws IOException
FileAccess
getOutputStream
in interface FileAccess
IOException
public String getName() throws IOException
FileAccess
getName
in interface FileAccess
IOException
public long getLength() throws IOException
FileAccess
getLength
in interface FileAccess
IOException
public long getMaxLength() throws IOException
FileAccess
getMaxLength
in interface FileAccess
IOException
public long setMaxLength(long length) throws IOException
FileAccess
setMaxLength
in interface FileAccess
IOException
public File getFile() throws IOException, SecurityException
FileAccess
getFile
in interface FileAccess
IOException
SecurityException
Copyright © 2000–2017 FreeHEP. All rights reserved.