×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2006
    Location
    Grenoble
    Posts
    20

    SVGImage from Stream

    Hello,

    I m trying to get my SVGImage by a different way than the commun way.

    The classic method is
    Code:
    InputStream svgStream = getClass().getResourceAsStream("/race.svg");
    System.out.println("Stream :"+svgStream);
    SVGImage cartoon = (SVGImage)( SVGImage.createImage(svgStream,null ) );
    The println ln give : " Stream :com.sun.midp.io.ResourceInputStream@e938beb1 "


    Now i would get my race using fileConnection so i made (found ) all the browsing system and I finish with that :
    Code:
    System.out.println("connect with : "+imageName);
    FileConnection fileConn;
    try {
    fileConn = (FileConnection)Connector.open(imageName, Connector.READ);
    InputStream svgStream = fileConn.openInputStream();
    System.out.println("Stream :"+svgStream);
    SVGImage cartoon = (SVGImage)( SVGImage.createImage(svgStream,null ) );
    And the results are :
    connect with : file:///c:/nokia/images/race.svg
    Stream :com.sun.midp.io.BaseInputStream@11eaa96
    and the SVGImage cartoon = (SVGImage)( SVGImage.createImage(svgStream,null ) ); is never passed succefully, no exception, nothing the programs blocks .

    So I have noticed the difference betwen my 2 InputStream BaseInputStream and ResourceInputStream, and my reaction was : "What's that ?????"

    So if anyone know anything about these two kind of InputStream and how fight versus that ^^ thanx !!
    Don't too much care about your life, in all the cases you will not survive.

  2. #2
    Registered User
    Join Date
    Jun 2006
    Location
    Grenoble
    Posts
    20

    Re: SVGImage from Stream

    Arf, the problem changed.
    I forgot stop my emulator and "oh surprise" the stream has been read... 2 min after.

    So : my second code work, but seems to be a little slow

    do you know why ?
    Don't too much care about your life, in all the cases you will not survive.

Similar Threads

  1. Recording an audio stream using the Series 60 emulator
    By rastapasta in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2007-04-23, 11:46
  2. Exception on SvgImage.createImage from an HTTP Stream ?
    By douville in forum Mobile Java General
    Replies: 7
    Last Post: 2006-06-16, 12:57
  3. Half Duplex Audio Streaming
    By subhrajyotisaha in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-05-25, 04:39
  4. SIP content type
    By hlothman in forum Symbian Networking & Messaging (Closed)
    Replies: 8
    Last Post: 2006-05-17, 09:26
  5. Video stream to nokia 3650
    By auvinent in forum Streaming and Video
    Replies: 5
    Last Post: 2004-01-30, 08:31

Posting Permissions

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