Java 类org.jivesoftware.smack.sm.packet.StreamManagement.Enabled 实例源码

项目:Smack    文件:ParseStreamManagement.java   
public static Enabled enabled(XmlPullParser parser) throws XmlPullParserException, IOException {
    ParserUtils.assertAtStartTag(parser);
    boolean resume = ParserUtils.getBooleanAttribute(parser, "resume", false);
    String id = parser.getAttributeValue("", "id");
    String location = parser.getAttributeValue("", "location");
    int max = ParserUtils.getIntegerAttribute(parser, "max", -1);
    parser.next();
    ParserUtils.assertAtEndTag(parser);
    return new Enabled(id, resume, location, max);
}