Public Member Functions | |
String | getPath () |
Gets the path. More... | |
FileStream (String path) | |
Initializes a new instance of the File class. More... | |
long | getLength () |
Gets the file length (must be opened first). More... | |
long | getPosition () |
Gets the position in the file. More... | |
void | setPosition (long position) |
Sets the position in the file. More... | |
boolean | exists () |
Returns a boolean value indicating whether the file exists. More... | |
void | open (FileStreamAccess access) |
Opens the file. More... | |
void | close () |
Closes the file. More... | |
boolean | flush () |
Flushes the file contents. More... | |
boolean | write (byte[] data, int index, int length) |
Writes data to the file. More... | |
boolean | writeTo (int location, byte[] data, int index, int length) |
Writes data to the file. More... | |
int | read (byte[] data, int index, int length) |
Reads data from the file. More... | |
Public Member Functions inherited from fm.liveswitch.IFileStream | |
abstract void | open (fm.liveswitch.FileStreamAccess access) |
Opens the file stream. More... | |
fm.liveswitch.FileStream.FileStream | ( | String | path | ) |
Initializes a new instance of the File class.
path | The path. |
void fm.liveswitch.FileStream.close | ( | ) |
Closes the file.
Implements fm.liveswitch.IFileStream.
boolean fm.liveswitch.FileStream.exists | ( | ) |
Returns a boolean value indicating whether the file exists.
Implements fm.liveswitch.IFileStream.
boolean fm.liveswitch.FileStream.flush | ( | ) |
Flushes the file contents.
Implements fm.liveswitch.IFileStream.
long fm.liveswitch.FileStream.getLength | ( | ) |
Gets the file length (must be opened first).
Implements fm.liveswitch.IFileStream.
String fm.liveswitch.FileStream.getPath | ( | ) |
Gets the path.
Implements fm.liveswitch.IFileStream.
long fm.liveswitch.FileStream.getPosition | ( | ) |
Gets the position in the file.
Implements fm.liveswitch.IFileStream.
void fm.liveswitch.FileStream.open | ( | FileStreamAccess | access | ) |
Opens the file.
access | The access requirement. |
int fm.liveswitch.FileStream.read | ( | byte[] | data, |
int | index, | ||
int | length | ||
) |
Reads data from the file.
data | The buffer to fill with data from the file. |
index | The index at which to start writing. |
length | The maximum number of bytes to read. |
Implements fm.liveswitch.IFileStream.
void fm.liveswitch.FileStream.setPosition | ( | long | position | ) |
Sets the position in the file.
Implements fm.liveswitch.IFileStream.
boolean fm.liveswitch.FileStream.write | ( | byte[] | data, |
int | index, | ||
int | length | ||
) |
Writes data to the file.
data | The data to write to the file. |
index | The index at which to start reading. |
length | The number of bytes to write. |
true
if the data was written; otherwise, false
.Implements fm.liveswitch.IFileStream.
boolean fm.liveswitch.FileStream.writeTo | ( | int | location, |
byte[] | data, | ||
int | index, | ||
int | length | ||
) |
Writes data to the file.
location | The location to write to. |
data | The data to write to the file. |
index | The index at which to start reading. |
length | The number of bytes to write. |
true
if the data was written; otherwise, false
.Implements fm.liveswitch.IFileStream.