|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.squawk.platform.BaseGCFFile
com.sun.squawk.platform.posix.GCFFileImpl
public class GCFFileImpl
* Interface for POSIX peer of a file handle
Field Summary |
---|
Fields inherited from class com.sun.squawk.platform.BaseGCFFile |
---|
INVALID_HANDLE, nativeFileName, readHandle, writeHandle |
Constructor Summary | |
---|---|
GCFFileImpl()
|
Method Summary | |
---|---|
void |
closeForRead()
Closes the file for reading. |
void |
closeForWrite()
Closes the file for writing. |
void |
create()
Create file corresponding to this file handler. |
void |
delete()
Deletes the file or directory associated with this handler. |
boolean |
exists()
Check is file or directory corresponding to this filehandler exists. |
long |
fileSize()
Determines the size of a file on the file system. |
void |
flush()
Flushes any output to the file. |
String |
illegalFileNameChars()
Returns a string that contains all characters forbidden for the use on the given platform except "/" (forward slash) which is always considered illegal. |
boolean |
isDirectory()
Check is file corresponding to this filehandler exists and is a directory. |
void |
openForRead()
Opens the file for reading. |
void |
openForWrite()
Opens the file for writing. |
void |
positionForWrite(long offset)
Sets the next write location. |
int |
read(byte[] b,
int off,
int len)
Reads data from the file to an array. |
int |
write(byte[] b,
int off,
int len)
Write data from an array to the file. |
Methods inherited from class com.sun.squawk.platform.BaseGCFFile |
---|
close, closeForReadWrite, connect, getFileSeparator |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GCFFileImpl()
Method Detail |
---|
public boolean exists()
true
if the file/directory exists,
false
otherwise.public boolean isDirectory()
true
if pathname is a directorypublic void delete() throws IOException
IOException
- If the target is a directory and it is not empty,
the connection target does not exist or is unaccessible, or
an unspecified error occurs preventing deletion of the target.public long fileSize() throws IOException
flush()
on any open output streams to the file
prior to invoking this method to ensure accurate results.
IOException
- if the method is invoked on a directory.public String illegalFileNameChars()
public void openForRead() throws IOException
IOException
- if any error occurs during input/output operations.public void closeForRead() throws IOException
IOException
- if any error occurs during input/output operations.public void openForWrite() throws IOException
IOException
- if any error occurs during input/output operations.public void closeForWrite() throws IOException
IOException
- if any error occurs during input/output operations.public int read(byte[] b, int off, int len) throws IOException
b
- array for input dataoff
- index in the input arraylen
- length of data to read
IOException
- if any error occurs.public int write(byte[] b, int off, int len) throws IOException
b
- array of output dataoff
- index in the output arraylen
- length of data to write
IOException
- if any error occurs.public void positionForWrite(long offset) throws IOException
offset
- seek position for next write
IOException
- if any error occurs.public void flush() throws IOException
IOException
- if any error occurs.public void create() throws IOException
GCFFile
IOException
- if invoked on the existing file or unexpected error
occurs.
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |