本文整理了Java中org.htmlparser.Parser.setConnection()
方法的一些代码示例,展示了Parser.setConnection()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.setConnection()
方法的具体详情如下:
包路径:org.htmlparser.Parser
类名称:Parser
方法名:setConnection
[英]Set the connection for this parser. This method creates a new Lexer
reading from the connection.
[中]设置此解析器的连接。此方法会从连接中创建新的Lexer
读取。
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
/**
* Setter for property Connection.
* @param connection New value of property Connection.
*/
public void setConnection (URLConnection connection)
{
try
{
mParser.setConnection (connection);
setLinks ();
}
catch (ParserException hpe)
{
// failed... now what
}
}
代码示例来源:origin: org.htmlparser/htmlparser
/**
* Setter for property Connection.
* @param connection New value of property Connection.
*/
public void setConnection (URLConnection connection)
{
try
{
mParser.setConnection (connection);
setLinks ();
}
catch (ParserException hpe)
{
// failed... now what
}
}
代码示例来源:origin: org.htmlparser/htmlparser
/**
* Set the URL for this parser.
* This method creates a new Lexer reading from the given URL.
* Trying to set the url to null or an empty string is a no-op.
* @param url The new URL for the parser.
* @throws ParserException If the url is invalid or creation of the
* underlying Lexer cannot be performed.
* @exception ParserException if a problem occurs in connecting.
* @see #getURL
*/
public void setURL (String url)
throws
ParserException
{
if ((null != url) && !"".equals (url))
setConnection (getConnectionManager ().openConnection (url));
}
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
/**
* Set the URL for this parser.
* This method creates a new Lexer reading from the given URL.
* Trying to set the url to null or an empty string is a no-op.
* @param url The new URL for the parser.
* @throws ParserException If the url is invalid or creation of the
* underlying Lexer cannot be performed.
*/
public void setURL (String url)
throws
ParserException
{
if ((null != url) && !"".equals (url))
setConnection (getConnectionManager ().openConnection (url));
}
代码示例来源:origin: org.htmlparser/htmlparser
mParser = new Parser (connection);
else
mParser.setConnection (connection);
mPropertySupport.firePropertyChange (
PROP_URL_PROPERTY, url, getURL ());
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
mParser = new Parser (connection);
else
mParser.setConnection (connection);
mPropertySupport.firePropertyChange (
PROP_URL_PROPERTY, url, getURL ());
代码示例来源:origin: org.htmlparser/htmlparser
mParser = new Parser (connection);
else
mParser.setConnection (connection);
mPropertySupport.firePropertyChange (
PROP_URL_PROPERTY, url, getURL ());
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
mParser = new Parser (connection);
else
mParser.setConnection (connection);
mPropertySupport.firePropertyChange (
PROP_URL_PROPERTY, url, getURL ());
内容来源于网络,如有侵权,请联系作者删除!