|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjhplot.io.HFileXML
public class HFileXML
Open a XML file to write/read objects in sequential order using java serialization in XML. Do not forget apply close() at the end of run.
| Field Summary | |
|---|---|
FileOutputStream |
oof
|
ObjectOutputStream |
oos
|
File |
recordsFile
|
| Constructor Summary | |
|---|---|
HFileXML(String file)
Open a XML file to write or read objects to/from a serialized file in sequential order. |
|
HFileXML(String file,
String option)
Open a XML file to write or read objects to/from a serialized file in sequential order. |
|
HFileXML(String file,
String option,
int bufferSize)
Open a XML file to write or read objects to/from a serialized file in sequential order. |
|
| Method Summary | |
|---|---|
boolean |
close()
Close the file |
int |
getBufferSize()
Get current buffer size for I/O. |
int |
getEntries()
Get number of processed entries |
Object |
read()
Get object from a file. |
boolean |
write(Object ob)
Add an object to a XML file |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public File recordsFile
public FileOutputStream oof
public ObjectOutputStream oos
| Constructor Detail |
|---|
public HFileXML(String file,
String option,
int bufferSize)
file - File nameoption - Option to create the file . If "w" - write a file (or read)
file, if "r" only read created file.bufferSize - set buffer size for I/O. It is best to use buffer sizes that
are multiples of 1024 bytes.
public HFileXML(String file,
String option)
file - File nameoption - Option to create the file . If "w" - write a file (or read)
file, if "r" only read created file.public HFileXML(String file)
file - File name for reading| Method Detail |
|---|
public int getBufferSize()
public boolean write(Object ob)
ob - Objectkey - key for object
public Object read()
public boolean close()
public int getEntries()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||