[Htmlparser-cvs] htmlparser/src/org/htmlparser/util LinkProcessor.java,1.33,1.34
Brought to you by:
derrickoswald
From: Derrick O. <der...@us...> - 2004-03-18 04:13:46
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24099/src/org/htmlparser/util Modified Files: LinkProcessor.java Log Message: Deprecate LinkProcessor. Functionality moved to Page. Index: LinkProcessor.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/util/LinkProcessor.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** LinkProcessor.java 2 Jan 2004 16:24:58 -0000 1.33 --- LinkProcessor.java 18 Mar 2004 04:04:08 -0000 1.34 *************** *** 33,36 **** --- 33,37 ---- /** * Processor class for links, is present basically as a utility class. + * @deprecated Use a Page object instead. */ public class LinkProcessor *************** *** 57,60 **** --- 58,62 ---- * @param base The base URL unless overridden by the current baseURL property. * @return The fully qualified URL or the original link if a failure occured. + * @deprecated Use Page.getAbsoluteURL() instead. */ public String extract (String link, String base) *************** *** 91,99 **** public String stripQuotes (String string) { ! //remove any double quotes from around charset string if (string.startsWith ("\"") && string.endsWith ("\"") && (1 < string.length ())) string = string.substring (1, string.length () - 1); ! //remove any single quote from around charset string if (string.startsWith ("'") && string.endsWith ("'") && (1 < string.length ())) string = string.substring (1, string.length () - 1); --- 93,101 ---- public String stripQuotes (String string) { ! // remove any double quotes from around string if (string.startsWith ("\"") && string.endsWith ("\"") && (1 < string.length ())) string = string.substring (1, string.length () - 1); ! // remove any single quote from around string if (string.startsWith ("'") && string.endsWith ("'") && (1 < string.length ())) string = string.substring (1, string.length () - 1); *************** *** 101,105 **** return (string); } ! public URL constructUrl(String link, String base) throws MalformedURLException { --- 103,110 ---- return (string); } ! ! /** ! * @deprecated Use Page.constructUrl() instead. ! */ public URL constructUrl(String link, String base) throws MalformedURLException { *************** *** 140,143 **** --- 145,149 ---- * @param url The url containing spaces. * @return The URL with spaces as %20 sequences. + * @deprecated Use Parser.fixSpaces() instead. */ public static String fixSpaces (String url) *************** *** 208,211 **** --- 214,220 ---- } + /** + * @deprecated Removing the last slash from a URL is a bad idea. + */ public static String removeLastSlash(String baseUrl) { if(baseUrl.charAt(baseUrl.length()-1)=='/') |