public class OpenFile extends AbstractFile
file| Constructor and Description |
|---|
OpenFile(File file)
Creates an open file action in read mode.
|
OpenFile(File file,
boolean writeMode,
boolean overwrite)
Creates an open file action.
|
OpenFile(RandomAccessFile file) |
| Modifier and Type | Method and Description |
|---|---|
long |
getOverwritingSize()
Returns the size of the file before overwriting.
|
boolean |
isOverwritten()
Tells whether the file will be overwritten if it exists.
|
boolean |
isWriteMode()
Tells whether the file is opened in write mode or not.
|
void |
onEnd(boolean endWithSuccess)
Called when the execution of the action is finished.
|
void |
onStart()
Called when the execution of the action is about to start.
|
getFilepublic OpenFile(File file)
file - the file to be opened in read mode.public OpenFile(File file, boolean writeMode, boolean overwrite)
file - the file to be opened.writeMode - true if the file is opened in write mode.overwrite - true if the file will be overwritten if it exists; false otherwise. This parameter has no effect if
writeMode is set to false.public OpenFile(RandomAccessFile file)
public long getOverwritingSize()
public boolean isOverwritten()
public boolean isWriteMode()
public void onEnd(boolean endWithSuccess)
endWithSuccess - true if the execution of the action was ended with success; false otherwise.public void onStart()
throws SecurityException
SecurityException - if the action is not allowed to be performed.