Download content through wap using a midlet

Ok, lets make it quick.
my java ME app:
CLDC 1.1
MIDP 2.0
It downloads 4 images from four URLs. The images are served by an Apache server, http://some.site/image0.png.
Here is how i do it
private Image getImage(int zoomLevel) throws IOException, Exception {
        ContentConnection connection = (ContentConnection) Connector.open(baseUrl + "/" + String.valueOf(zoomLevel));
        // * There is a bug in MIDP 1.0.3 in which read() sometimes returns
        //   an invalid length. To work around this, I have changed the
        //   stream to DataInputStream and called readFully() instead of read()
//    InputStream iStrm = connection.openInputStream();
        DataInputStream iStrm = connection.openDataInputStream();
        ByteArrayOutputStream bStrm = null;
        Image im = null;
        try {
            // ContentConnection includes a length method
            byte imageData[];
            int length = (int) connection.getLength();
            if (length != -1) {
                imageData = new byte[length];
                // Read the png into an array
              //  iStrm.read(imageData);
               iStrm.readFully(imageData);
            } else // Length not available...
                bStrm = new ByteArrayOutputStream();
                int ch;
                while ((ch = iStrm.read()) != -1) {
                    bStrm.write(ch);
                imageData = bStrm.toByteArray();
                bStrm.close();
            // Create the image from the byte array
            im = Image.createImage(imageData, 0, imageData.length);
        } finally {
            // Clean up
            if (iStrm != null) {
                iStrm.close();
            if (connection != null) {
                connection.close();
            if (bStrm != null) {
                bStrm.close();
        if (im == null) {
            throw new Exception("Unable to download image");
        } else {
            return im;
    }This works in the emulator.
The problem is that my Internet provider does not allow network traffic other than viewing wap pages.
Is there a way to trick my provider and download the images? Perhaps to set up a dummy wap page?
thanks,
kostas

I did reset but I'm all up to date with my subscribe download using an earlier wire to iTunes on my MacBook, so I really can't tell right now.  I'll give it a couple days and then try to download again wirelessly.
Thanks for trying.  I'll let you know.

Similar Messages

  • Problem Downloading Content on iPad using ios6

    Every time I attempt to download an update or a new purchase on the new iPad with iOS6, it requires me to agree to the new terms agreement. I am prompted press "agree"  and then "done" but the update or purchase does not download. I have attempted to download content several times and encountered the same result. It does not matter whether I'm using wifi or 4G Internet service. Has anybody else had a problem with accepting the terms agreement and downloading content from iTunes?

    In thumbnail view in the Photos app you should still be able to use the Edit button at the top right of the screen to select up to 5 photos and then use the Share button top left to attach them to an email. Or within the Mail app itself you can press and hold within the body of the email after a second or two when the magnifying glass symbol appears release the screen and you should get a pop-up with one option being 'Insert Photo or Video'

  • How do i put downloadable content on a dvd?

    I made a dvd in iDVD and would like to include some downloadable content (when people use the dvd in the computer). How do I do that with iDVD?

    You can add files to the DVD-ROM part of a Video DVD:
    http://docs.info.apple.com/article.html?path=iDVD/7.0/en/6693.html
    mish

  • Downloading files through a MIDlet

    Hi there, I am new to the J2ME network connections API, especially for downloading data through a MIDlet. I have a small question I hope you could provide some assistance on.
    I was wondering if there was a way to download data (ie: a text file) from a website or server. I know that there is a class called "FileConnection" that may do this, but I was wondering how to use it to do that. Also, is there a way to do it without the FileConnection API for phones that do not support it? And as for when the data is downloaded, where exactly on the phone is it stored? In the RMS? Is there a way to download the data into the "/res" folder directly?
    Any help would be appreciated,
    thanks,
    take care

    You can do it by a thread, sample run function is given below
    public void run() {
            HttpConnection c = null;
            DataInputStream is = null;
            DataOutputStream os = null;      
            try
                String downloadURL = "yourdownloadurl";
                c = (HttpConnection) Connector.open(downloadURL);   
                c.setRequestMethod(HttpConnection.GET);
                int resCode = c.getResponseCode();   
                is = new DataInputStream(c.openInputStream());
                ByteArrayOutputStream baos = new ByteArrayOutputStream();                       
                os = new DataOutputStream(baos);                     
                int v;
                byte []data = new byte[2048];
                while ((v = is.read(data)) >0 && downloading) 
                    os.write(data,0,v);
                os.flush();
                is.close();
                os.close();
                baos.close();
                c.close();
                System.out.println("The file is "+baos.toString());
            catch (Exception e)
    }Edited by: Shimul on Oct 7, 2007 3:32 AM

  • Trying to Download a Software Image to Cisco 2800 series router through TFTP Using the tftpdnld ROMmon Command

    Trying to Download a Software Image to Cisco 2800 series router through TFTP Using the tftpdnld ROMmon Command
    and I am getting an Error , I cant figure out what I am doing wrong. I have also pasted my display down here can someone help me out, thanks in advance, I am still new to this utility.
    My questions are How do you direct this utility to point to the desktop or the TFTP folder
    does FE_PORT: Fast Ethernet 0 imply or point to Fa0/0 on my router
    My router is suppose to have 10.0.0.3 255.0.0.0
    Gateway of 10.0.0.1 255.0.0.0
    My TFTP Server 10.0.0.2 255.0.0.0
    How do I get the MAC address of the Router or the TFTP Server and which one  is required?
    my Ethernet port is 100Mb/Sec I cant tell whether it is full duplex or not so How do i set this FE_SPEED_MODE: Auto???
    =====================================================================================
    rommon 10 >
    rommon 10 > set
    PS1=rommon ! >
    FE_PORT=0
    WARM_REBOOT=
    RET_2_RTS=20:35:55 UTC Thu Sep 25 2014
    BSI=0
    RET_2_RCALTS=
    RANDOM_NUM=1600357627
    ?=0
    IP_ADDRESS=10.0.0.3
    IP_SUBNET_MASK=255.0.0.0
    DEFAULT_GATEWAY=10.0.0.1
    TFTP_SERVER=10.0.0.2
    TFTP_FILE=
    rommon 11 > TFTP_FILE=c2800nm-adventerprisek9-mz.124-24.T4
    rommon 12 > TFTP_CHECKSUM=0
    rommon 13 > SET
    monitor: command "SET" not found
    rommon 14 > set
    PS1=rommon ! >
    FE_PORT=0
    WARM_REBOOT=
    RET_2_RTS=20:35:55 UTC Thu Sep 25 2014
    BSI=0
    RET_2_RCALTS=
    RANDOM_NUM=1600357627
    IP_ADDRESS=10.0.0.3
    IP_SUBNET_MASK=255.0.0.0
    DEFAULT_GATEWAY=10.0.0.1
    TFTP_SERVER=10.0.0.2
    ?=0
    TFTP_FILE=c2800nm-adventerprisek9-mz.124-24.T4
    TFTP_CHECKSUM=0
    rommon 15 > tftpdnld
              IP_ADDRESS: 10.0.0.3
          IP_SUBNET_MASK: 255.0.0.0
         DEFAULT_GATEWAY: 10.0.0.1
             TFTP_SERVER: 10.0.0.2
               TFTP_FILE: c2800nm-adventerprisek9-mz.124-24.T4
            TFTP_VERBOSE: Progress
        TFTP_RETRY_COUNT: 18
            TFTP_TIMEOUT: 7200
           TFTP_CHECKSUM: No
            TFTP_MACADDR: 30:37:a6:49:35:a8
                 FE_PORT: Fast Ethernet 0
           FE_SPEED_MODE: Auto
    Invoke this command for disaster recovery only.
    WARNING: all existing data in all partitions on flash: will be lost!
    Do you wish to continue? y/n:  [n]:  y
    ARP: address resolution for 10.0.0.2 timed out.
    ARP failed with failure code 1.  TFTP transfer aborted.
    TFTP: Operation terminated prematurely.
    rommon 16 >       " not found
    rommon 17 >FE_SPEED_MODE=2
    variable name contains illegal (non-printable) characters
    rommon
    rommon 18 > set
    PS1=rommon ! >
    FE_PORT=0
    WARM_REBOOT=
    RET_2_RTS=20:35:55 UTC Thu Sep 25 2014
    BSI=0
    RET_2_RCALTS=
    RANDOM_NUM=1600357627
    IP_ADDRESS=10.0.0.3
    IP_SUBNET_MASK=255.0.0.0
    DEFAULT_GATEWAY=10.0.0.1
    TFTP_SERVER=10.0.0.2
    TFTP_FILE=c2800nm-adventerprisek9-mz.124-24.T4
    TFTP_CHECKSUM=0
    ?=0
    rommon 19 > tftpdnld [ur]
    usage: tftpdnld [-hr]
      Use this command for disaster recovery only to recover an image via TFTP.
      Monitor variables are used to set up parameters for the transfer.
      (Syntax: "VARIABLE_NAME=value" and use "set" to show current variables.)
      "ctrl-c" or "break" stops the transfer before flash erase begins.
      The following variables are REQUIRED to be set for tftpdnld:
                IP_ADDRESS: The IP address for this unit
            IP_SUBNET_MASK: The subnet mask for this unit
           DEFAULT_GATEWAY: The default gateway for this unit
               TFTP_SERVER: The IP address of the server to fetch from
                 TFTP_FILE: The filename to fetch
      The following variables are OPTIONAL:
              TFTP_VERBOSE: Print setting. 0=quiet, 1=progress(default), 2=verbose
          TFTP_RETRY_COUNT: Retry count for ARP and TFTP (default=18)
              TFTP_TIMEOUT: Overall timeout of operation in seconds (default=7200)
             TFTP_CHECKSUM: Perform checksum test on image, 0=no, 1=yes (default=1)
              TFTP_MACADDR: The MAC address for this unit
                   FE_PORT: 0= (default), 1
             FE_SPEED_MODE: 0=10/hdx, 1=10/fdx, 2=100/hdx, 3=100/fdx,
                            5=Auto (default)
          TFTP_DESTINATION: The flash destination device for the file
                            flash:(default), usbflash0:, usbflash1:
      Command line options:
       -h: this help screen
       -r: do not write flash, load to DRAM only and launch image
    rommon 20 > tftpdnld
              IP_ADDRESS: 10.0.0.3
          IP_SUBNET_MASK: 255.0.0.0
         DEFAULT_GATEWAY: 10.0.0.1
             TFTP_SERVER: 10.0.0.2
               TFTP_FILE: c2800nm-adventerprisek9-mz.124-24.T4
            TFTP_VERBOSE: Progress
        TFTP_RETRY_COUNT: 18
            TFTP_TIMEOUT: 7200
           TFTP_CHECKSUM: No
            TFTP_MACADDR: 30:37:a6:49:35:a8
                 FE_PORT: Fast Ethernet 0
           FE_SPEED_MODE: Auto
    Invoke this command for disaster recovery only.
    WARNING: all existing data in all partitions on flash: will be lost!
    Do you wish to continue? y/n:  [n]:  y
    ARP: address resolution for 10.0.0.2 timed out.
    ARP failed with failure code 1.  TFTP transfer aborted.
    TFTP: Operation terminated prematurely.
    rommon 21 >

    What I notice in the original post is this error
    ARP: address resolution for 10.0.0.2 timed out.
    which says that the router is looking for the 10.0.0.2 server but not getting response to its arp request. Can the original poster clarify for us how the device that has the image file is connected to the router that has the problem? Also what kind of device is 10.0.0.2? Is it a PC running TFTP server software or is it something else?
    HTH
    Rick

  • High memory use when checking downloads folder through browser

    High memory use when checking downloads folder through browser.
    I have a total of 3 DDR2 Gbytes of ram. Pentium(R) Dual-Core CPU T4500 @ 2.30GHz Win 7 home pr. 64bit. Firefox 27.0 beta
    I right click on a file to "open containing folder" from the drop down menu in downloads.
    When the folder has been opened, explorer is trying to index the folder (which it never does completely or well after 5 minutes I close the folder and shut down the dllhost process cause laptop is blazing hot) and memory keeps increasing till no more is available.
    I checked task manager and see that dllhost is the particular process that is causing the spike in memory usage even after closing the folder I right click and stop the process and memory is restored after awhile.

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * On Windows you can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac you can open Firefox 4.0+ in Safe Mode by holding the '''option''' key while starting Firefox.
    * On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    [[Image:FirefoxSafeMode|width=520]]
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • HT4972 My iPhone 4 is using 4.3.3 and I want to update to iSO 6.1.  I can back it up and it starts to download it through iTunes but then I get an error message 0xE8000067.  Tried all the things on the apple support site.  None worked.

    My iPhone 4 is using 4.3.3 and I want to update to iSO 6.1.  I can back it up and it starts to download it through iTunes but then I get an error message 0xE8000067.
    Tried all the things on the apple support site (checked USB port, deleted the 3 exe files in Task Manager, tried a new cable).  None worked.  Got the same message on my old computer.
    Any ideas??

    Amazing help from apple support over the phone.  Restoring the computer fixed the problem.

  • How can I download content of wiki pages from Office 365 online Sharepoint site using c#?

    How can I download content of wiki pages from Office 365 online Sharepoint site using c#?
    Ratnesh[MSFT]

    Hi,
    According to your post, my understanding is that you want to download content of wiki pages on SharePoint Online.
    If just for getting the text of the page, I suggest you convert page to PDF file first and then download the PDF file via a Visual Web Part as a Sandboxed solution.
    A sample about export HTML to PDF:
    http://hamang.net/2008/08/14/html-to-pdf-in-net/
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • Probability Of Sending ME/SIM data through WAP enabled on SIM Using Applet

    Dear Friends,
    I am new to java card development.
    Is it possible or what is Probability Of Sending ME/SIM data through WAP enabled on SIM Using Applet?
    Is it feasible to do so? Suppose if we write one application using java card to do so and then will load the applet into Smart card(Java Card).
    Any sugestion will be highly appreciated and will of great help.
    Thanks in advance for the response.
    Regards,
    Sunil K

    Dear Friends,
    I am new to java card development.
    Is it possible or what is Probability Of Sending ME/SIM data through WAP enabled on SIM Using Applet?
    Is it feasible to do so? Suppose if we write one application using java card to do so and then will load the applet into Smart card(Java Card).
    Any sugestion will be highly appreciated and will of great help.
    Thanks in advance for the response.
    Regards,
    Sunil K

  • For downloading media contents wht to use:: Http or Socket or Stream??

    Hi frndz,
    I have developed an application which reads the XML file... for that I am using the HttpConnection.
    also I am downloading contents like Images and videos.... for that also I am using the HttpConnection.
    But I was asked a question by someone, why you are using HttpConnection ONLY??
    Why you have not used StreamConnection or SocketConnection???
    and I only had answer: HttpConnection is stateless protocol.
    I also know this question is raised no. of times but still I am not getting the points which distinguish between various connection classes.
    can anyone please help me out.
    thanking you,
    Alpesh

    these articles may help you to know why:
    http://www-128.ibm.com/developerworks/wireless/library/wi-jio/
    http://developers.sun.com/techtopics/mobility/midp/articles/midp2network/
    S.

  • Im trying to download muse through creative cloud using Windows 7

    Hi there
    everytime I try to download muse through creative cloud i get an error message that it won't download because the download manager/file may be corrupt. I've tried redownloading the adobe manager but still having probs. and I've tried turning off the virus protection in case its interferring. Nothing's helping. Hope u can assist.
    tks
    a

    Are your problems only limited to Muse or are you unable to download and install other Adobe applications through the Adobe Application Manager?

  • I am trying to store music for two different iPods on the same computer, against two different Apple IDs. When I try and download content from the Cloud I get an error message?

    I am trying to store music for two different iPods on the same Windows 8 computer, and when I try and download content from the Cloud I get an error message. Is it possible to have two different Apple IDs on the same computer?

    Unfortunately you've discovered too late how important it is to maintain an up-to-date backup of your iTunes library (and all other data of value).  You could, before wiping the drive, have considered making use of a commercial data recovery service that could (albeit at considerable cost) have extracted your library from the hard disk, even if virus infected.
    In the absence of that option, you will need to restore the content of your library from its original sources:
    Depending on your location, you may be able to re-download any iTunes Store purchases that are still available on the Store
    Likewise, most digital purchases from Amazon (including auto-rip copies of purchased CDs) should be available from the Amazon Cloud and via the Amazon Music application - the same may be true of other commercial sources for digital downloads
    Content imported from your CDs will have to imported again
    The specific situation that you describe regarding the music imported from your friend's external HDD suggests that either the source is badly organized and/or originates from a source other than iTunes (other media players may use alternative tags for information like artist, title, album, etc. that are not wholly consistent with how iTunes handle these).  Without details of the issues you're seeing it is difficult to suggest a remedy other than going through the media album-by-album, track-by-track, and correcting the inconsistencies.
    In the absence of a backup or access to the original library data there is no option other than painstakingly recreating your library as described above.  As you do so, you'll now realize how important creating and maintaining backups are - in my case I have at all times three separate duplicates of my library, in two different locations, where none is ever more than a week old compared to the content of my master library.

  • Extremely Urgent : Transport of KM Content through ICE Protocol

    Hello Friends,
    This is really urgent.
    I have been transporting XML content in KM folders through ICE protocol.
    But of late the problem is that I am able to download the KM foledrs in .zip format in my Desktop but of late when I am trying to upload it in the TEST Server through Content Exchange it gives me a Page cannot be dispalyed error in the Content Exchange Window.
    Please help me out. Initially I had problems in downloading contents but now there is problem with uploading.
    I need to transport the KM contents to TEST and PRODUCTION servers immediately. If there are any other methods of doing the same do tell me.
    Wating for ur reply.
    Sweta.

    Hi sweta,
    u cn refer to these links....its useful to u........
    How to Export KM Contents by ICE protocol using Offline Channel :
    How to Export KM Contents by ICE protocol using Offline Channel
    How To…Distribute KM content using the ICE protocol(both online & offline scenario):
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/38effdbf-0d01-0010-c3ad-9d9547a492af
    Getting started with ICE:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0883c3b-ca84-2910-c0ad-80f8e8756275
    Regards
    Bhargava
    award if it helps

  • TS5150 With certain movies I have downloaded digitally through Itunes or certain movies through Netflix played through Apple TV, I am only getting partial sound.  I am missing one or more sound tracks.  Am I missing something in the settings for Apple TV?

    With certain movies I have downloaded digitally through Itunes or certain movies through Netflix played through Apple TV, I am only getting partial sound.  I am missing one or more sound tracks.  Am I missing something in the settings for Apple TV?

    Are you using a stereo receiver or surround sound system for the audio by chance.  What you are describing sounds like a receiver that is not setup correctly, or does not have the speakers connected to it correctly to support Dolby surround, 5.1 or 7.1.  Which is why it is only happening on some content.  It would only be on the ones that are encoded to support Dolby audio.

  • I have downloaded Instagram through iTunes, but have no way to register.  When I login, it doesn't recognize me.

    Please help me to use Instagram.  I downloaded it through iTunes, but am unable to Login.  Somewhere I missed the opportunity to register.  I'm too old to know these things. 

    Copy the ENTIRE iTunes folder from the old computer to the new computer.

Maybe you are looking for

  • My husband has an iPhone.  I have iPad.  Can we have separate iTunes accounts on a PC?

    My husband has iPhone and an iTunes account.  I have iPad and also though I set up a separate iTunes account; however, my account never shows on our PC.  Is it possible to have 2 separate iTunes accounts on one PC?  Should we share an account?  Thank

  • MacBook Pro will not shut down

    A principal at my district has a MacBook Pro 15-inch Early 2008 (2.4/2X1GB/200-5400/256VRAM/AG) running OS 10.5.8 that will not shut down. When shut down is chosen, the computer restarts instead of shutting down. It does not matter how shut down is c

  • Need help Using Time Capsule As Media Server

    New time capsule owner was wondering if someone could help me set it where i can put all my digital media, Itunes, Dvd-rips on to the TC and use it as a Media Server. Thanks for your help fellas

  • XML file missing in numbers 08

    I have recently had to perform an erase and reinstall of snow leopard. On trying to get everything that was working fine before I find that I am now unable to open my numbers documents, this in spite of the fact that I wrote them in numbers 08 and ha

  • Updating optional regions

    I'm just starting to figure out how templates work, but I've run into an issue that I'm certain is easily solved. So far the template is just a logo, a picture and 5 buttons linked to 5 template using pages. Each of the buttons are defined as optiona