Creating non editable data files using java

I am currently writing a program that accepts user input and creates comma - separated CSV file line I need a way to save this data in a way that users cannot easily edit it It doesn't need to be very secure, it just doesn't need to be accidentally edited I also need to create another file (or the same file?), Users can then easily access (in the file system) so that they can email the file to the system administrator, who can then open it CSV file If necessary, I can provide a conversion plan for the second person

If there are any advantages, the file I save data and the file to send can be two different files I'm currently considering using a file with a strange file extension, but save it as a text file so that users can open it only when they know what to try Another option is some kind of encryption, but I'm not sure if it's necessary, even if it's where I want to start

Thank you for your help:)

Edit: this file is used to store the actual data entered Currently, data is being collected on paper forms and sent to administrators to manually enter all data This applet is designed to let others enter data from paper forms and tell them if they have entered it correctly After they enter, they need to send the data to the administrator It's best to automatically process sending, but this application needs to be very simple and low budget. I don't want Internet connection to be a requirement

Solution

You can store and save data in serializable objects It resists arbitrary editing and can be easily read and written from your application This page should begin: http://java.sun.com/developer/technicalArticles/Programming/serialization/

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>