aspose file tools*
The moose likes Java Micro Edition and the fly likes downloading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "downloading" Watch "downloading" New topic
Author

downloading

Shierley Kencana
Greenhorn

Joined: May 07, 2003
Posts: 10
How to download file from a server to mobile phone using http connection?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Shierley Kencana:
How to download file from a server to mobile phone using http connection?



Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Shierley Kencana
Greenhorn

Joined: May 07, 2003
Posts: 10
Thanks for the answer. But I'm still confused. With that code is the file automatically saved to the phone?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Shierley Kencana:
With that code is the file automatically saved to the phone?

No, you only get an InputStream to read bytes from (into memory). You have to deal with writing the byte[] into RMS (persistent storage) yourself.
I'd suggest investing into a J2ME book, but if you're not excited about spending $, you should browse the Web for specific articles. Good places to start would be at least:
  • http://www.microjava.com/articles (especially this for using RMS)
  • http://www.enterprisej2me.com/articles.php
  • Lasse Koskela
    author
    Sheriff

    Joined: Jan 23, 2002
    Posts: 11962
        
        5
    Oh, forgot to add this article about J2ME networking from my bookmarks...
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: downloading