hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsona laio <freeonf...@yahoo.co.uk>
Subject save file problem
Date Mon, 06 Dec 2004 05:38:38 GMT
Lately I write a simple program follow up the sample
code on http client
I want to save a file after gettin the content from
the web (an zip file format), which associate with an
inputStream (with post method getResponseBody() ).
But I encounter a problem when compiling source code.
What should I do in order to save a file correctly? Or
where there's resource talking about this.
I appreciate it sincerely.

ObjectOutputStream(java.io.OutputStream) in java.io.
ObjectOutputStream cannot be applied to ()
ObjectOutputStream out = new ObjectOutputStream() ;
=========beg save file snippet source====
byte[] bytes = new byte[10240];
ObjectInputStream ois = new ObjectInputStream(in);
ObjectOutputStream out = new ObjectOutputStream() ;
int beg = 0;
int len = 0;
long c =0;
out.write(bytes, beg , 10240);
beg += 10240;
=========end save file snippet source====

Win a castle for NYE with your mates and Yahoo! Messenger 

To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org

View raw message