public class FileMC extends Object
Constructor and Description |
---|
FileMC(String file)
Open file for reading objects from a serialized file in sequential order.
|
FileMC(String file,
String option)
Open a file to write/read objects to/from a file in sequential order.
|
Modifier and Type | Method and Description |
---|---|
boolean |
close()
Close the file
|
String |
entriesToString()
Get a string representing file content.
|
promc.io.ProMCDescriptionFile.ProMCDescription |
fetchDescription()
Get description information.
|
void |
fetchDescriptionURL()
Get the description from URL file.
|
String |
getDescription() |
long |
getEvents() |
promc.io.ProMCHeaderFile.ProMCHeader |
getHeader()
Get a header file information
|
boolean |
getIsURL()
Is this a remote file?
|
String |
getLastModified()
Last modified
|
String |
getLogfileTxt()
Return info about the log file.
|
long |
getNEntries()
Get number of events stored in the file.
|
String |
getProMCDescriptionTxt()
Return ProMCDescription.proto
|
String |
getProMCHeaderTxt()
Return ProMCHeader.proto
|
String |
getProMCStatTxt()
Return ProMCStat.proto
|
String |
getProMCTxt()
Return ProMC.proto.
|
long |
getRequestedEvents() |
promc.io.ProMCStatFile.ProMCStat |
getStat()
Get statistics information.
|
Map<String,Object> |
getStoredProtoURL() |
long |
getVersion() |
ZipFile |
getZipFile()
Return this zip file.
|
promc.io.ProMC.ProMCEvent |
read()
Read next event
|
promc.io.ProMC.ProMCEvent |
read(long index)
Get object from a file using its index.
|
promc.io.ProMC.ProMCEvent |
read(String key)
Read an event using a key
|
String |
readLogfile()
Return logfile text
|
void |
readMeta()
Read all metadata
|
long |
size()
Get the number of events stored in the file.
|
public FileMC(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 FileMC(String file)
file
- File namepublic boolean getIsURL()
public void fetchDescriptionURL()
public void readMeta()
public String getLogfileTxt()
public String readLogfile()
public String getLastModified()
public String getProMCDescriptionTxt()
public String getProMCHeaderTxt()
public String getProMCTxt()
public String getProMCStatTxt()
public long getVersion()
public String getDescription()
public long getEvents()
public long getRequestedEvents()
public ZipFile getZipFile()
public long size()
public long getNEntries()
public String entriesToString()
public promc.io.ProMC.ProMCEvent read()
public promc.io.ProMCHeaderFile.ProMCHeader getHeader()
public promc.io.ProMCStatFile.ProMCStat getStat()
public promc.io.ProMCDescriptionFile.ProMCDescription fetchDescription()
public promc.io.ProMC.ProMCEvent read(long index)
index
- of the objectpublic promc.io.ProMC.ProMCEvent read(String key)
key
- keypublic boolean close()
© Copyright 2005-2015 S.Chekanov. ProMC data format. HepSim repository.