Has got android a special URI order to list a URI?
When my code is reading in a javaprogram I get a String back.
When my code is reading in android then I get nothing no failure, too.
I have debuggt my code and the problem was the order
"URL url = new URL( "http://localhost:8046/IListServices" );
is = url.openStream();"
Know anyone my problem?
Hier my code:
Using java Syntax Highlighting
- import java.io.IOException;
- import java.io.InputStream;
- import java.net.HttpURLConnection;
- import java.net.URL;
- import java.util.Scanner;
- class ReadAllFromUrl
- {
- String name;
- String kurzN;
- String version;
- public void url(){
- InputStream is = null;
- try
- {
- URL url = new URL( "http://localhost:8046/IListServices" );
- is = url.openStream();
- Scanner scanner = new Scanner(is);
- String[] splittArray;
- splittArray = scanner.next().split(" ");
- name = splittArray[0]; //await the first String from splittArray
- }
- catch ( Exception e ) {
- e.printStackTrace();
- }
- finally {
- if ( is != null )
- try { is.close(); } catch ( IOException e ) { e.printStackTrace(); }
- }
- }
- }
Parsed in 0.035 seconds, using GeSHi 1.0.8.4


