Advertisement

03.20.2008 at 10:08AM PDT, ID: 23257634 | Points: 500
[x]
Attachment Details

Download content of an URL with J2ME

Tags: J2ME
Download content of an URL with J2ME

How can I download and save as a txt file only javascript and java applet part from any URL with J2ME (no html code). Code pls&thanks in advance


Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: arifdgr8
Question Asked On: 03.20.2008
Participating Experts: 3
Points: 500
Views: 0
Translate:
Loading Advertisement...
03.22.2008 at 02:43PM PDT, ID: 21187845

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.23.2008 at 05:25AM PDT, ID: 21189352

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.28.2008 at 03:12AM PDT, ID: 21229066

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.28.2008 at 03:37AM PDT, ID: 21229141

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.28.2008 at 03:38AM PDT, ID: 21229146

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.28.2008 at 09:12AM PDT, ID: 21231690

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • Automotive
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Displays / Monitors
  • Handhelds / PDAs
  • Components
  • Peripherals
  • Laptops/Notebooks
  • Servers
  • Misc
  • Apple
  • Embedded Hardware
  • Networking Hardware
  • Storage
  • Desktops
  • New Users
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMware
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Virtualization
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • Web Computing
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Consulting
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMware
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Automation
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Web Services
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Web Computing
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Lounge
  • Business Travel
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
  • Automotive
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
03.22.2008 at 02:43PM PDT, ID: 21187845

Rank: Master

I cannot find the urlhttpconnection in the j2me api...
If you have the docs, look for that.
 
03.23.2008 at 05:25AM PDT, ID: 21189352

Rank: Master

http://www.onjava.com/pub/a/onjava/2002/04/17/j2me.html

Should show you how to fetch the data from the URL

Saving it as a text file is another matter however, as I don't thin pure J2ME gives you access to a filesystem on the device
 
03.28.2008 at 03:12AM PDT, ID: 21229066
First you need to open the HTTP connection:
HttpConnection httpConn = (HttpConnection) Connector.open(url, Connector.READ_WRITE, true);
and read the content:
InputStream in = httpConn.openInputStream();
...
Second you need to save the content in a file:
FileConnection cfile = (FileConnection) Connector.open("yourfilepath", Connector.WRITE);
FileConnection API support is required.

 
03.28.2008 at 03:37AM PDT, ID: 21229141

Rank: Master

 
03.28.2008 at 09:12AM PDT, ID: 21231690
Hi dereck2008

Thank you for your code. But I want to download some part from web source code. Like 

document.writeln('<applet archive="/external/crossword/java/puzzle.jar" name="puzzle" code="crossword/Crossword.class" width="640" height="324">');
      document.writeln('<param name="pixels" value="21">');
      document.writeln('<param name="gridwidth" value="15">');
document.writeln('<param name="clue20" value="194371|7|0|7|A newspaper\'s deadlines? |10|">');      
document.writeln('<param name="clue21" value="194372|8|0|8|A terrible mess follows a meal |4,6|">');
      &&&&&&&&&&&&&&
      &&&&&&&&&&&&.
      &&&&&&&&&&&&&&&..
      (lines are not fixed)

document.writeln('</applet>');

some JavaScript tags as well

<script type="text/javascript" language="JavaScript">
<!--
function build_ad() {
      var theseCookies = document.cookie;

      var pos = theseCookies.indexOf('GUDHTMLAds=');
            
var      intrusad = '<' + 'script type="text/javascript" language="JavaScript" src="http://ads.guardian.co.uk/js.ng/spacedesc=01&amp;location=bottom&amp;site=Guardian&amp;navsection=1720&amp;section=114000&amp;country=(none)&amp;region=(none)&amp;city=(none)&amp;bandwidth=(none)&amp;rand=5355087&amp;tile=5355087' + videoParameter + '">' + '</' + 'script>';
document.write(intrusad);
document.close();

      }
}
build_ad();
// -->
</script>

<script type="text/javascript" src="/external/revenue_science/0,,,00.js"></script>


Please can you tell me how I will do this? Code please.

Thanks in advance

 
 
20080236-EE-VQP-29 / EE_QW_2_20070628