martin hilpert wrote:
i dont understand how i can monitor the stream.MonitorInputStream min = new MonitorInputStream(fin);
HttpClient client = new HttpClient(); PutMethod put = new PutMethod(zielurl); FileInputStream fin =new FileInputStream("C:\test.jpg");
put.setRequestBody(fin); put.setRequestContentLength(PutMethod.CONTENT_LENGTH_CHUNKED); client.executeMethod(put); System.out.print(put.getResponseBodyAsString()); put.releaseConnection();
class MonitorInputStream extends FilterInputStream {
public MonitorInputStream(InputStream in) { super(in); }
...
public int read(byte[] b, int off, int len) { int bytesRead = super.read(b, off, len);
... do what you like with bytesRead now ...
return bytesRead; }
}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]