I know that this may seem like a re-occuring question, but I can't seem to find anyone who has asked this question in a very succinct manner. They always seem to beat around the bush, instead of clearly expressing themself.

Here is the situation:

I have an application called S.M.A.R.T. In this application it processes data(duh!). It stores data in both single and multi-dimensional arrays. I desire to store these data-filled arrays in a file, along with other elementary data types. And the file that I want to store it in, must end with the extension .smproj (as an example of course...it could be .happy for all I care :D).

I want my application to accomplish that, as well as to reopen the file and recognize the data in the file when it needs to retrieve it later, so that the data can be further processed.

I don't necessarily want code...just a heads up in the right direction please...Thank You

Recommended Answers

All 4 Replies

Oh..and the contents of my file: File.smproj, should not be readable in a text editor like Notepad. I looked up using serialization, but that requires using a .ser file extension, which is not permissable for me to do. Any further suggestions please?

Serialization is a good answer. Open an ObjectOutputStream to a file with any name and extension you want. Java IO won't care about the extension.

Okay, thank you, I'll give it a shot.

And so you are saying that basically..all I have to do is save the file with whatever extension I want it to be?

I have one more thought. As it relates to application and file association, namely triggering my application to open the file when it is opened...um..how would I accomplish this please?

I remember seeing something about Web Start is that a good lead to follow?

Yes, just avoid any extension that's already associated with a well-known application. Associating an application with an extension to trigger the app when a file is clicked: that's an OS function - details of how to depend on which version of which OS.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.