[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java I/O on Stream




InputStream in = ... your input stream ...
BufferedInputStream bis = new BufferedInputStream(in);

String line = "";
while( (line = bis.readLine()) != null) {

    ... use line ...

}

I strongly recommend reading Elliotte Rusty Harold's Java I/O book from
OReilly. It's an absolute classic.

On 7 Nov 2002, cfowler wrote:

>
>
> Java I/O still confuses me!.  I need to take an InputStream that is
> connected to a socket and convert it to a Object that will allow me to
> do a readLine().  I gues I can allways extend InputStream and add a
> readLine() function.
>
> Any help would be appreciated.
>
> Chris
>
>