You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by th...@apache.org on 2007/02/21 02:23:31 UTC
svn commit: r509859 -
/labs/droids/src/plugins/handle-save/src/java/org/apache/droids/handle/Save.java
Author: thorsten
Date: Tue Feb 20 17:23:30 2007
New Revision: 509859
URL: http://svn.apache.org/viewvc?view=rev&rev=509859
Log:
enhancing the config for the save location where we save the files. further allowing multiple hosts to be exported.
Modified:
labs/droids/src/plugins/handle-save/src/java/org/apache/droids/handle/Save.java
Modified: labs/droids/src/plugins/handle-save/src/java/org/apache/droids/handle/Save.java
URL: http://svn.apache.org/viewvc/labs/droids/src/plugins/handle-save/src/java/org/apache/droids/handle/Save.java?view=diff&rev=509859&r1=509858&r2=509859
==============================================================================
--- labs/droids/src/plugins/handle-save/src/java/org/apache/droids/handle/Save.java (original)
+++ labs/droids/src/plugins/handle-save/src/java/org/apache/droids/handle/Save.java Tue Feb 20 17:23:30 2007
@@ -19,7 +19,7 @@
public void setConf(Configuration conf) {
this.conf=conf;
- outputDir =conf.get("handle.save.output.dir","./build/handle/save");
+ outputDir =conf.get("handle.save.output.dir","droids.handler.output/");
}
public void handle(InputStream stream, URL url) {
this.url=url;
@@ -33,10 +33,10 @@
private void writeOutput(InputStream stream) throws IOException {
if(!url.getFile().endsWith("/")){
Reader reader = new InputStreamReader(stream);
- String file=outputDir+url.getFile();
+ String file=outputDir+url.getHost()+url.getFile();
File cache = new File(file);
createFile(cache);
- Writer output = new OutputStreamWriter(new FileOutputStream(outputDir+url.getFile()));
+ Writer output = new OutputStreamWriter(new FileOutputStream(cache));
pipe(reader, output);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org