----- Original Message -----
From: Ranieri Argentini <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 26, 1999 4:36 PM
Subject: Re: [JOS-Kernel] Progress!
> >> Hmm, it would appear it does .. how do i get the stream to pull its
bytes
> >> from an array though? Or is an Array a child of InputStream so i can
pass
> >> it directly to DatInputStream's only constructor?
> >You can always use ArrayInputStream, giving the Array as the input, then
use
> >that in the paramter to DataInputStream's constructor.
>
> Ok, you lost me here ... my java.io.* or java.lang.* don't seem to have an
> ArrayInputStream class. I'm a using an old version of the JDK or
something?
> If so, which one should i get?
>
> RA
>
There I go again, not checking my docs before I spew from my fingers. I'm
referring to "ByteArrayInputStream", which has been around since JDK 1.0.
You pass it, in the constructor, the byte array to be used as the input
stream, then use it as you would any other input stream. This uses your
given array as the buffer to read from.
-Matt
_______________________________________________
Kernel maillist - [EMAIL PROTECTED]
http://jos.org/mailman/listinfo/kernel