|
|
Choosing A Webhost: |
svn commit: r523183 - in /lenya/branches/BRANCH_1_2_X/src/java/org/apache/l: msg#00030cms.lenya.cvs
Author: antonio Date: Tue Mar 27 22:38:45 2007 New Revision: 523183 URL: http://svn.apache.org/viewvc?view=rev&rev=523183 Log: Extract imports. Modified: lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/ant/StaticHTMLExporter.java lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/net/WGet.java Modified: lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/ant/StaticHTMLExporter.java URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/ant/StaticHTMLExporter.java?view=diff&rev=523183&r1=523182&r2=523183 ============================================================================== --- lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/ant/StaticHTMLExporter.java (original) +++ lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/ant/StaticHTMLExporter.java Tue Mar 27 22:38:45 2007 @@ -25,6 +25,7 @@ import java.net.URL; import org.apache.lenya.cms.publishing.ExportException; +import org.apache.lenya.net.WGet; import org.apache.tools.ant.BuildException; @@ -141,7 +142,7 @@ exportDirectory.mkdirs(); } - org.apache.lenya.net.WGet wget = new org.apache.lenya.net.WGet(); + WGet wget = new WGet(); wget.setDirectoryPrefix(exportDirectory.getAbsolutePath()); String fullServerURI = serverURI.toString(); Modified: lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/net/WGet.java URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/net/WGet.java?view=diff&rev=523183&r1=523182&r2=523183 ============================================================================== --- lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/net/WGet.java (original) +++ lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/net/WGet.java Tue Mar 27 22:38:45 2007 @@ -32,6 +32,9 @@ import java.util.Iterator; import java.util.List; +import org.apache.lenya.util.HTML; +import org.apache.lenya.util.SED; +import org.apache.lenya.util.URLUtil; import org.apache.log4j.Logger; /** @@ -146,7 +149,7 @@ String link = (String) iterator.next(); try { - URL child_url = new URL(org.apache.lenya.util.URLUtil.complete(url.toString(), + URL child_url = new URL(URLUtil.complete(url.toString(), link)); byte[] child_sresponse = getResource(child_url); @@ -192,7 +195,7 @@ List links = null; try { - org.apache.lenya.util.HTML html = new org.apache.lenya.util.HTML(url.toString()); + HTML html = new HTML(url.toString()); links = html.getImageSrcs(false); links.addAll(html.getLinkHRefs(false)); } catch (Exception e) { @@ -218,7 +221,7 @@ public void substitutePrefix(String filename, String prefixSubstitute, String substituteReplacement) throws IOException { log.debug("Replace " + prefixSubstitute + " by " + substituteReplacement); - org.apache.lenya.util.SED.replaceAll(new File(filename), escapeSlashes(prefixSubstitute), escapeSlashes(substituteReplacement)); + SED.replaceAll(new File(filename), escapeSlashes(prefixSubstitute), escapeSlashes(substituteReplacement)); } /** @@ -283,10 +286,10 @@ public byte[] runProcess(String command) throws Exception { Process process = Runtime.getRuntime().exec(command); - java.io.InputStream in = process.getInputStream(); + InputStream in = process.getInputStream(); byte[] buffer = new byte[1024]; int bytes_read = 0; - java.io.ByteArrayOutputStream baout = new java.io.ByteArrayOutputStream(); + ByteArrayOutputStream baout = new ByteArrayOutputStream(); while ((bytes_read = in.read(buffer)) != -1) { baout.write(buffer, 0, bytes_read); @@ -297,8 +300,8 @@ "END:InputStream%%%"); } - java.io.InputStream in_e = process.getErrorStream(); - java.io.ByteArrayOutputStream baout_e = new java.io.ByteArrayOutputStream(); + InputStream in_e = process.getErrorStream(); + ByteArrayOutputStream baout_e = new ByteArrayOutputStream(); while ((bytes_read = in_e.read(buffer)) != -1) { baout_e.write(buffer, 0, bytes_read);
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | svn commit: r521346 - in /lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source: SiteSource.java SiteSourceFactory.java, andreas |
|---|---|
| Next by Date: | svn commit: r523184 - /lenya/branches/BRANCH_1_2_X/INSTALL-SRC.txt, antonio |
| Previous by Thread: | svn commit: r521346 - in /lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source: SiteSource.java SiteSourceFactory.java, andreas |
| Next by Thread: | svn commit: r523184 - /lenya/branches/BRANCH_1_2_X/INSTALL-SRC.txt, antonio |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |