"

2013 FRC Java API

"

com.sun.squawk.platform
Class BaseGCFFile

java.lang.Object
  extended by com.sun.squawk.platform.BaseGCFFile
All Implemented Interfaces:
GCFFile
Direct Known Subclasses:
GCFFileImpl, GCFFileImpl

public abstract class BaseGCFFile
extends Object
implements GCFFile

Base class of common implementation of GCFFile

Author:
dw29446

Field Summary
static int INVALID_HANDLE
           
protected  String nativeFileName
          File name.
protected  int readHandle
          Read handle.
protected  int writeHandle
          Write handle.
 
Constructor Summary
BaseGCFFile()
           
 
Method Summary
 void close()
          Close file associated with this handler.
 void closeForReadWrite()
          Closes the file for both reading and writing.
 void connect(String rootName, String fileName)
          Connect file handler to the abstract file target.
static char getFileSeparator()
          Gets the system-dependent file separator character.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.squawk.platform.GCFFile
closeForRead, closeForWrite, create, delete, exists, fileSize, flush, illegalFileNameChars, isDirectory, openForRead, openForWrite, positionForWrite, read, write
 

Field Detail

INVALID_HANDLE

public static final int INVALID_HANDLE
See Also:
Constant Field Values

readHandle

protected int readHandle
Read handle.


writeHandle

protected int writeHandle
Write handle.


nativeFileName

protected String nativeFileName
File name.

Constructor Detail

BaseGCFFile

public BaseGCFFile()
Method Detail

connect

public void connect(String rootName,
                    String fileName)
Connect file handler to the abstract file target. This operation should not trigger any access to the native filesystem.

Specified by:
connect in interface GCFFile
Parameters:
rootName - The name of the root directory.
fileName - Full path to the file to be handled by this handler.
Throws:
IllegalArgumentException - if filename contains characters not allowed by the file system. This check should not involve any actual access to the filesystem.

getFileSeparator

public static char getFileSeparator()
Gets the system-dependent file separator character.

Returns:
The file separator character.

close

public void close()
           throws IOException
Close file associated with this handler. Open file and all system resources should be released by this call. Handler object can be reused by subsequent call to connect().

Specified by:
close in interface GCFFile
Throws:
IOException - if I/O error occurs

closeForReadWrite

public void closeForReadWrite()
                       throws IOException
Closes the file for both reading and writing.

Specified by:
closeForReadWrite in interface GCFFile
Throws:
IOException - if any error occurs during input/output operations.

"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"