return false;
}
public Queue<Packet> restorePacketForOffLineUser(XMPPResourceConnection conn)
throws NotAuthorizedException, TigaseDBException {
DomBuilderHandler domHandler = new DomBuilderHandler();
String[] msgs = conn.getOfflineDataList(ID, "messages");
if (msgs != null && msgs.length > 0) {
conn.removeOfflineData(ID, "messages");
LinkedList<Packet> pacs = new LinkedList<Packet>();
StringBuilder sb = new StringBuilder();
for (String msg: msgs) {
sb.append(msg);
}
char[] data = sb.toString().toCharArray();
parser.parse(domHandler, data, 0, data.length);
Queue<Element> elems = domHandler.getParsedElements();
Element elem = null;
while ((elem = elems.poll()) != null) {
pacs.offer(new Packet(elem));
} // end of while (elem = elems.poll() != null)
try {