本文整理汇总了Java中org.dom4j.io.XPPPacketReader类的典型用法代码示例。如果您正苦于以下问题:Java XPPPacketReader类的具体用法?Java XPPPacketReader怎么用?Java XPPPacketReader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XPPPacketReader类属于org.dom4j.io包,在下文中一共展示了XPPPacketReader类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resetParser
import org.dom4j.io.XPPPacketReader; //导入依赖的package包/类
/**
* Resets the parser using the latest connection's reader. Reseting the
* parser is necessary when the plain connection has been secured or when a
* new opening stream element is going to be sent by the server.
*/
private void resetParser() {
try {
innerReader = new XPPPacketReader();
innerReader.setXPPFactory(XmlPullParserFactory.newInstance());
innerReader.getXPPParser().setInput(connection.reader);
reset = true;
} catch (Exception xppe) {
LOGGER.log(Level.WARN, "Error while resetting parser", xppe);
}
}
示例2: SocketReadThread
import org.dom4j.io.XPPPacketReader; //导入依赖的package包/类
/**
* Create dedicated read thread for this socket.
*
* @param component The component for which this thread is reading for
* @param reader The reader to use for reading
*/
public SocketReadThread(ExternalComponent component, XPPPacketReader reader) {
super("Component socket reader");
this.component = component;
this.reader = reader;
}
示例3: SocketReadThread
import org.dom4j.io.XPPPacketReader; //导入依赖的package包/类
/**
* Create dedicated read thread for this socket.
*
* @param component
* The component for which this thread is reading for
* @param reader
* The reader to use for reading
*/
public SocketReadThread(ExternalComponent component, XPPPacketReader reader) {
super("Component socket reader");
this.component = component;
this.reader = reader;
}