×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Nov 2010
    Location
    Egypt,Mansoura
    Posts
    80

    i want to read form URL

    I want to read from URL Can AnyOne help me

    i can read but i want to select a special string from the page source But i want a String not char

    can any one help me
    Let The Impossible Happen!!!

  2. #2
    Regular Contributor
    Join Date
    Nov 2010
    Location
    Egypt,Mansoura
    Posts
    80

    Re: i want to read form URL

    Thank You, I get the answer for my question

    i want to share it for knowledge

    http://www.java2s.com/Tutorial/Java/0430__J2ME/Read...
    Let The Impossible Happen!!!

  3. #3
    Super Contributor
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: i want to read form URL

    this is very wrong.
    buffer.append((char) ch);
    assumes that every byte received is a char and that their encoding is the same as yours.
    prefer ByteArrayOutputStream to write the content of the response, and then create a String from the byte[], precising the encoding.

Similar Threads

  1. Read from a URL
    By jaddeuel in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2010-06-05, 10:01
  2. J2ME Form and URL
    By qasimahmad in forum Mobile Java General
    Replies: 3
    Last Post: 2008-02-05, 08:21
  3. Can not read data from URL.
    By ramis55 in forum Mobile Java General
    Replies: 6
    Last Post: 2008-01-15, 18:50
  4. urllib.urlopen(url).read() error in emulator
    By dehlerm in forum Symbian
    Replies: 0
    Last Post: 2007-10-19, 11:03
  5. Is it possible to read http:// url via socket protocol
    By amity in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2007-05-23, 19:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×