Usually stream returned by http connection will support mark (see
InputStream#markSupported), but it's safer to wrap returned stream
with BufferedInputStream since size of buffer is unknown on original
stream (and it may not be large enough to keep all necessary data).
With stream which support mark you can call:

is.mark();
doStuff(is);
is.reset();
doStuff2(is);

--
Bart Janusz
www.beepstreet.com

On Jan 9, 6:28 pm, jax <[email protected]> wrote:
> What I mean is that I just want to start reading from the start of the
> Stream again, not request the whole http page again.
>
> so basically - read a little of the stream and do some tests I have
> created
>
> then send the stream to another function where I need the entire
> stream from the beginning
>
> On Jan 9, 10:31 pm, "Maps.Huge.Info (Maps API Guru)"
>
> <[email protected]> wrote:
> > It would seem to me that a more logical approach would be to save the
> > stream when reading it then parse the data rather than re-read the
> > stream a second time. What if the second time there was an error? I'm
> > not positive how this works, it may be that the stream is cached so
> > you're not actually making a second http request by resetting it, but
> > then again, you may in which case it would be very wasteful to reset.
>
> > -John Coryat
>
> > "Radar Now!"
>
> > "What Zip Code?"
>
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to