You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2007/01/13 22:18:46 UTC

svn commit: r495971 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/TestPostFile.java

Author: thorsten
Date: Sat Jan 13 13:18:46 2007
New Revision: 495971

URL: http://svn.apache.org/viewvc?view=rev&rev=495971
Log:
Adding copyright notice. 
Fixing method changing it to stream.

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/TestPostFile.java

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/TestPostFile.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/TestPostFile.java?view=diff&rev=495971&r1=495970&r2=495971
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/TestPostFile.java (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/src/java/org/apache/forrest/http/client/TestPostFile.java Sat Jan 13 13:18:46 2007
@@ -1,11 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.forrest.http.client;
 
 import java.io.IOException;
 import java.net.MalformedURLException;
+import java.net.URL;
 
 public class TestPostFile {
     public TestPostFile(String destinationUrl, String srcUrl) throws MalformedURLException, IOException{
-        PostFile post = new PostFile(destinationUrl, srcUrl);
+        PostFile post = new PostFile(destinationUrl, new URL(srcUrl).openStream());
         System.out.println("body: "+post.getResponseBodyAsString());
     }
     public static void main (String[] args) throws MalformedURLException, IOException{