|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjhplot.io.HFile
public class HFile
Write or read objects in sequential order using the Java serialization. The objects inside files are gzipped on-fly. The size of serialized files should be significantly smaller than when using HFile class. Use "close()" to flush buffered output stream. Use HFileBrowser to browser all entries in a GUI frame. Normally, files should extension "ser". Files can be viewed using HFileBrowser.
| Field Summary | |
|---|---|
FileOutputStream |
oof
|
ObjectOutputStream |
oos
|
File |
recordsFile
|
| Constructor Summary | |
|---|---|
HFile(String file)
Open file for reading objects from a serialized file in sequential order. |
|
HFile(String file,
String option)
Open file for reading objects from a serialized file in sequential order. |
|
HFile(String file,
String option,
boolean compression)
Open a file to write/read objects to/from a serialized file in sequential order. |
|
HFile(String file,
String option,
boolean compression,
int bufferSize)
Open a file to write/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()
Return processed number of entries |
Object |
read()
Get object from a file. |
void |
setFlush(int reset)
Set after how many events data will be flushed. |
boolean |
write(Object ob)
Add an object to a file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public File recordsFile
public FileOutputStream oof
public ObjectOutputStream oos
| Constructor Detail |
|---|
public HFile(String file,
String option,
boolean compression,
int bufferSize)
file - File nameoption - Option to create the file. If "w" - write a file (or read)
file, if "r" only read created file.compression - if true, objects are compressed on-fly using GZIPbufferSize - set buffer size for I/O. It is best to use buffer sizes that
are multiples of 1024 bytes.
public HFile(String file,
String option,
boolean compression)
file - File nameoption - Option to create the file. If "w" - write a file (or read)
file, if "r" only read created file.compression - if true, objects are compressed on-fly using GZIPbuffer - set buffer size for I/O. It is best to use buffer sizes that
are multiples of 1024 bytes.public HFile(String file)
file - File name
public HFile(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.| Method Detail |
|---|
public int getBufferSize()
public boolean write(Object ob)
ob - Objectkey - key for object
public void setFlush(int reset)
reset - after how many events data will be reset.public int getEntries()
public Object read()
public boolean close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||