Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make resource file secured

 
Girish Nagaraj
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,

Background:
I am using text file in my project to store related data, text file will be part of JAR file.

Program fetches data from text file and displays to user when application is run.

Problem:
My concern is user should not be able to view the text file data directly in any way, the only way to access text file should be through Application that is through MIDlet/java classes in the JAR file.

Thought possible loophole could be transferring JAR to PC and accesing text file.

How to achieve this?

Thanks in advance..

Girish N
SCJP 1.4, SCMAD 1.0
 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Girish,

I am not aware of the context in which you want to use the data saved in a textfile withing JAR...

But it can be achieved through the program as well technically eliminating your problem..

For instance you wanna save data about port number...

This can be done at the first invocation of the MIDlet and subsequently save to RMS...

This might not be applicable to every context...

We will let the Ranchers also suggest something safe to play with..!
 
Girish Nagaraj
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Saving data in the RMS will not serve my purpose.
 
Eduardo Marques
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that a MIDlet can only access resources from its own JAR file.

A file to be used by a MIDlet must either be bundled inside the JAR file (and is accessible by getResourceAsStream())or downloaded when the MIDlet is online (which means you need to save it using RMS or, if the device supports it, the File API).

The possible security breach is that the user itself has access to the MIDlet JAR files eg through manufacturer supplied programs running on a PC.
 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marques..

Please correct me if i am wrong...

When you say, user too has access to the Jarred files, are you meaning about softwares like, FExplorer...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic