On Sat, Jul 07, 2001 at 04:42:50PM +1000, Peter Donald wrote:
> 
> Finally got around to committing it. I have removed the return statements. If 
> we need to we can put them back. Putting them back in is backwards compatible 
> but removing them would not be ;)

Excellent. I've fully come round to yours' and Leo's way of thinking.
Here's a good article that convinced me:

http://www.unixreview.com/articles/1998/9804/9804ja/ja.htm

But having said that, I have a Cunning Plan (tm) to avoid the close()
problems while still keeping the ease of use that a return variable
allows. I'll leave that for another mail.

> PS I am glad to see I am not the only one who still uses GNU style standards 
> ;) (old emacs user???)

Nup, sorry, you're the only one ;) I've had it drummed into me that
'Thou Shalt use the Coding Conventions of the Previous Author' ;)

--Jeff


> On Thu,  5 Jul 2001 10:41, jeff wrote:
> > Hi,
> >
> > In a dark corner of Excalibur lies a rather unexciting class called
> > IOUtils.java. It lets you copy between InputStreams and OutputStreams,
> > cleanly shut down streams, and that's it.
> >
> > Over the last week I have ruthlessly expanded it's functionality, such
> > that there are now methods to copy from (InputStream|Reader|String) to
> > (OutputStream|Writer|String), with variants to select the buffer size
> > and (where appropriate) the byte->char encoding.
> >
> > Example uses:
> >
> > // Read text from a file to a String
> > String s = IOUtil.toString( new FileReader("foo.txt") );
> >
> > // Copy the jakarta home page to a File:
> > IOUtil.copy(
> >     new URL("http://jakarta.apache.org";).openStream(),
> >     new FileOutputStream("index.html")
> >     ).close();
> >
> > etc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to