|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.alarexgroup.m2mplf.file.File
public class File
Class for work with files in module memory. This class encapsulates original FileConnection - for easier usage.
Example - creating and recor into file:
File file = new File("a:/test.txt");
|
File file = new File("a:/testx.txt");
|
| Constructor Summary | |
|---|---|
File(java.lang.String fileName)
Creates file instance |
|
| Method Summary | |
|---|---|
void |
close()
Finish the work with file and unblock the sources. |
boolean |
create()
Creates physically new file. |
boolean |
delete()
Erease file |
boolean |
exists()
Detect if the file existed. |
long |
fileSize()
Returns file size. |
boolean |
isHidden()
Tests if the file was hidden. |
java.io.InputStream |
openForRead()
Opens file for reading. |
java.io.OutputStream |
openForWrite()
Opens file for record. |
java.io.OutputStream |
openForWrite(long offset)
|
boolean |
rename(java.lang.String name)
Rename file. |
boolean |
setHidden(boolean hidden)
Sets file as a hidden file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public File(java.lang.String fileName)
fileName - full path to file, for example: A:/mujsoubor.dat| Method Detail |
|---|
public boolean create()
public java.io.InputStream openForRead()
public java.io.OutputStream openForWrite()
public java.io.OutputStream openForWrite(long offset)
public boolean rename(java.lang.String name)
name - new file name, without path specification.
public boolean delete()
public boolean exists()
public long fileSize()
public boolean setHidden(boolean hidden)
hidden - True - hide
False - show
public boolean isHidden()
public void close()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||