Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2008

    InputStream.available() not implemented on Nokia


    I'm trying to talk over with the DarwinStreamingServer (RTSP).

    SocketConnection sc = (SocketConnection)Connector.open(socket://;

    InputStream is = sc.openInputStream();
    OutputStream os = sc.openOutputStream();

    I can write a message, but I can't receive the answer without to know how many byte I need to read.
    Neither is.available() nor while((b = is.read()) != -1){...}
    works on Nokia.

    I must do something like this:
    while(l < lengthOfTheBeforeSniffedAnswer){

    Could you please help me?

  2. #2
    Regular Contributor
    Join Date
    Jul 2008
    Faridabad(Delhi NCR)

    Re: InputStream.available() not implemented on Nokia

    Can u tell me wat u wana do exactly.if u wana play video via streaming or u want to download
    Anshu Chauhan
    J2me Developer

  3. #3
    Registered User
    Join Date
    Aug 2008

    Re: InputStream.available() not implemented on Nokia

    I need to receive, test and save each RTP-packet of the video (my previous thread).

    Before I need to send (DESCRIBE, SETUP, PLAY) and Receive(RTSP 200/O.K. ...) some simple messages over TCP.
    To get the RTSP-answer from the server I need to know how many bytes I must to read: while((b = is.read()) != -1){...} and is.available() doesn't work on Nokia (seen in many other threads).

    It would be perfect to read a TCP-message regardles of how many bytes are to read.

    Best thanks.

Similar Threads

  1. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16

Posting Permissions

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