@Override public QueueUpdate parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException { boolean done = false; int position = -1; int timeRemaining = -1; while (!done) { parser.next(); String elementName = parser.getName(); if (parser.getEventType() == XmlPullParser.START_TAG && "position".equals(elementName)) { try { position = Integer.parseInt(parser.nextText()); } catch (NumberFormatException nfe) { } } else if (parser.getEventType() == XmlPullParser.START_TAG && "time".equals(elementName)) { try { timeRemaining = Integer.parseInt(parser.nextText()); } catch (NumberFormatException nfe) { } } else if (parser.getEventType() == XmlPullParser.END_TAG && "queue-status".equals(elementName)) { done = true; } } return new QueueUpdate(position, timeRemaining); } }
if (queueUpdate.getPosition() != -1) { fireQueuePositionEvent(queueUpdate.getPosition()); if (queueUpdate.getRemaingTime() != -1) { fireQueueTimeEvent(queueUpdate.getRemaingTime());
if (queueUpdate.getPosition() != -1) { fireQueuePositionEvent(queueUpdate.getPosition()); if (queueUpdate.getRemaingTime() != -1) { fireQueueTimeEvent(queueUpdate.getRemaingTime());
public PacketExtension parseExtension(XmlPullParser parser) throws Exception { boolean done = false; int position = -1; int timeRemaining = -1; while (!done) { parser.next(); String elementName = parser.getName(); if (parser.getEventType() == XmlPullParser.START_TAG && "position".equals(elementName)) { try { position = Integer.parseInt(parser.nextText()); } catch (NumberFormatException nfe) { } } else if (parser.getEventType() == XmlPullParser.START_TAG && "time".equals(elementName)) { try { timeRemaining = Integer.parseInt(parser.nextText()); } catch (NumberFormatException nfe) { } } else if (parser.getEventType() == XmlPullParser.END_TAG && "queue-status".equals(elementName)) { done = true; } } return new QueueUpdate(position, timeRemaining); } }
if (queueUpdate.getPosition() != -1) { fireQueuePositionEvent(queueUpdate.getPosition()); if (queueUpdate.getRemaingTime() != -1) { fireQueueTimeEvent(queueUpdate.getRemaingTime());
public PacketExtension parseExtension(XmlPullParser parser) throws Exception { boolean done = false; int position = -1; int timeRemaining = -1; while (!done) { parser.next(); String elementName = parser.getName(); if (parser.getEventType() == XmlPullParser.START_TAG && "position".equals(elementName)) { try { position = Integer.parseInt(parser.nextText()); } catch (NumberFormatException nfe) { } } else if (parser.getEventType() == XmlPullParser.START_TAG && "time".equals(elementName)) { try { timeRemaining = Integer.parseInt(parser.nextText()); } catch (NumberFormatException nfe) { } } else if (parser.getEventType() == XmlPullParser.END_TAG && "queue-status".equals(elementName)) { done = true; } } return new QueueUpdate(position, timeRemaining); } }
if (queueUpdate.getPosition() != -1) { fireQueuePositionEvent(queueUpdate.getPosition()); if (queueUpdate.getRemaingTime() != -1) { fireQueueTimeEvent(queueUpdate.getRemaingTime());
public PacketExtension parseExtension(XmlPullParser parser) throws Exception { boolean done = false; int position = -1; int timeRemaining = -1; while (!done) { parser.next(); String elementName = parser.getName(); if (parser.getEventType() == XmlPullParser.START_TAG && "position".equals(elementName)) { try { position = Integer.parseInt(parser.nextText()); } catch (NumberFormatException nfe) { } } else if (parser.getEventType() == XmlPullParser.START_TAG && "time".equals(elementName)) { try { timeRemaining = Integer.parseInt(parser.nextText()); } catch (NumberFormatException nfe) { } } else if (parser.getEventType() == XmlPullParser.END_TAG && "queue-status".equals(elementName)) { done = true; } } return new QueueUpdate(position, timeRemaining); } }