No destination is dynamically returned by other request to the server.
Basically i am a server which returns a list of urls which i am processing
in a for loop using this code. The server is querying a search engine and
returns urls which content mach the desired search.

On Mon, Apr 4, 2011 at 5:04 PM, Daniel Drozdzewski <
daniel.drozdzew...@gmail.com> wrote:

> What does destination String equal to?
> have you changed it recently?
>
>
>
> On Mon, Apr 4, 2011 at 2:40 PM, manigault <manig...@gmail.com> wrote:
> > Hi all,
> > I faced really nasty problem these days. I am executing the following
> > code
> >
> >
> >    String destination = "";// this string is initialized before
> > coming here
> >
> >
> >    URL url = null;
> >    InputStream inputStream = null;
> >    try {
> >        url = new URL(destination);
> >        inputStream = url.openStream();
> >        // process the input stream
> >    catch (IOException e) {
> >        // handle the exception
> >    } finally {
> >        if (inputStream != null) {
> >            inputStream.close();
> >        }
> >    }
> >
> >
> > This was working fine so far, but i start to receive to following
> > exception -
> >
> >
> >    Exception: java.lang.StringIndexOutOfBoundsException
> >    Stack Trace :
> >    java.lang.String.substring(String.java:1579)
> >
> >
> org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getAuthorizationCredentials(HttpURLConnectionImpl.java:
> > 1769)
> >
> >
> org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequestInternal(HttpURLConnectionImpl.java:
> > 1701)
> >
> >
> org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequest(HttpURLConnectionImpl.java:
> > 1649)
> >
> >
> org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:
> > 1153)
> >    java.net.URL.openStream(URL.java:653)
> >
> > I can't figure out for which values of 'destination' this exception is
> > thrown but i think this should never happen. The doc says the
> > openStream could throw only IOException. Any ideas ?
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Daniel Drozdzewski
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
When I raise my flashing sword, and my hand takes hold on judgment, I will
take vengeance upon mine enemies, and I will repay those who haze me. Oh,
Lord, raise me to Thy right hand and count me among Thy saints.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to