ruper2/src/java/core/org/krysalis/ruper2/util/net/http HttpClientUserAgent.java,1.1,1.2

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper2/util/net/http
In directory sc8-pr-cvs1:/tmp/cvs-serv25339/src/java/core/org/krysalis/ruper2/util/net/http

Modified Files:
	HttpClientUserAgent.java 
Log Message:
Opps, did it for HTTP input but not File input. Added that.

Index: HttpClientUserAgent.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper2/util/net/http/HttpClientUserAgent.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** HttpClientUserAgent.java	9 Oct 2003 20:30:27 -0000	1.1
--- HttpClientUserAgent.java	9 Oct 2003 21:14:58 -0000	1.2
***************
*** 14,17 ****
--- 14,18 ----
  import org.apache.commons.httpclient.methods.HeadMethod;
  import org.apache.commons.httpclient.util.HttpURLConnection;
+ import org.krysalis.ruper2.util.io.IOUtils;
  import org.krysalis.ruper2.version.Version;
  import org.krysalis.version.util.SystemUtils;
***************
*** 88,101 ****
  
  				InputStream input = get.getResponseBodyAsStream();
! 
! 				// Transfer the bytes in blocks..
! 				byte b[] = new byte[1000];
! 				int numRead = -1;
! 				do {
! 					numRead = input.read(b);
! 					if (numRead != -1)
! 						output.write(b, 0, numRead);
! 				}
! 				while (numRead != -1);
  			}
  		}
--- 89,94 ----
  
  				InputStream input = get.getResponseBodyAsStream();
! 				IOUtils.transfer(input, output);
! 				IOUtils.close(input);
  			}
  		}




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.