net.java.sip.communicator.impl.history
Class DBStructSerializer
java.lang.Object
net.java.sip.communicator.impl.history.DBStructSerializer
public class DBStructSerializer
- extends Object
- Author:
- Alexander Pelov
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBStructSerializer
public DBStructSerializer(HistoryServiceImpl historyService)
- Constructor.
- Parameters:
historyService - the history service
writeHistory
public void writeHistory(File dbDatFile,
History history)
throws IOException
- Write the history.
- Parameters:
dbDatFile - the database filehistory - the history to write
- Throws:
IOException - if write failed for any reason
loadHistory
public History loadHistory(File dbDatFile)
throws SAXException,
IOException,
ParseException
- This method parses an XML file, and returns a History object created with
the information from it. The parsing is non-validating, so if a malformed
XML is passed the results are undefined. The file should be with the
following structure:
- Parameters:
dbDatFile - The file to be parsed.
- Returns:
- A History object corresponding to this dbstruct file.
- Throws:
SAXException - Thrown if an error occurs during XML parsing.
IOException - Thrown if an IO error occurs.
ParseException - Thrown if there is error in the XML data format.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.