public static void error(String message, ParserException e) { callback.error(message, e); } }
public static void info(String message) { callback.info(message); }
public static void warning(String message) { callback.warning(message); }
public static void info(String message) { callback.info(message); }
public static void warning(String message) { callback.warning(message); }
public static void error(String message, ParserException e) { callback.error(message, e); } }
/** * Called just prior to calling connect. * Part of the ConnectionMonitor interface, this implementation just * sends the request header to the feedback object if any. * @param connection The connection which is about to be connected. * @throws ParserException <em>Not used</em> * @see ConnectionMonitor#preConnect */ public void preConnect (HttpURLConnection connection) throws ParserException { getFeedback ().info (HttpHeader.getRequestHeader (connection)); }
getFeedback ().warning ( "URL " + mLexer.getPage ().getUrl ()
mFeedback.error (msgBuffer.toString (), ex); throw ex;
/** * Called just after calling connect. * Part of the ConnectionMonitor interface, this implementation just * sends the response header to the feedback object if any. * @param connection The connection that was just connected. * @throws ParserException <em>Not used.</em> * @see ConnectionMonitor#postConnect */ public void postConnect (HttpURLConnection connection) throws ParserException { getFeedback ().info (ConnectionManager.getResponseHeader (connection)); }
/** * Set the lexer for this parser. * The current NodeFactory is transferred to (set on) the given lexer, * since the lexer owns the node factory object. * It does not adjust the <code>feedback</code> object. * Trying to set the lexer to <code>null</code> is a no-op. * @param lexer The lexer object to use. * @see #setNodeFactory */ public void setLexer (Lexer lexer) { NodeFactory factory; String type; if (null != lexer) { // move a node factory that's been set to the new lexer factory = null; if (null != getLexer ()) factory = getLexer ().getNodeFactory (); if (null != factory) lexer.setNodeFactory (factory); mLexer = lexer; // warn about content that's not likely text type = mLexer.getPage ().getContentType (); if (type != null && !type.startsWith ("text")) getFeedback ().warning ( "URL " + mLexer.getPage ().getUrl () + " does not contain text"); } }
mFeedback.error (msgBuffer.toString (), ex); throw ex;
/** * Called just prior to calling connect. * Part of the ConnectionMonitor interface, this implementation just * sends the request header to the feedback object if any. * @param connection The connection which is about to be connected. * @throws ParserException <em>Not used</em> * @see ConnectionMonitor#preConnect */ public void preConnect (HttpURLConnection connection) throws ParserException { getFeedback ().info (ConnectionManager.getRequestHeader (connection)); }
/** * Called just after calling connect. * Part of the ConnectionMonitor interface, this implementation just * sends the response header to the feedback object if any. * @param connection The connection that was just connected. * @throws ParserException <em>Not used.</em> * @see ConnectionMonitor#postConnect */ public void postConnect (HttpURLConnection connection) throws ParserException { getFeedback ().info (HttpHeader.getResponseHeader (connection)); }