Q:

What is the best way to store data when a database could not be used?

I am designing a e-Diary application in which the user can store textual data EVERY DAY. 
I thought of using a database but now I am looking for other alternatives ,  thought of encrypted files , but what if they get deleted ? 
Could someone provide me ways of doing this.
BTW, I am using Java.(If this is important).
EDIT: Currently I am using files for acheiving this, for login I am using a file in which the username, password are stored in the format username:password, This is not a good approach, so I am looking for some secure approaches.

A:

Serialize your Data and store it using flatfiles.
But why dont you want to use SQlite?
Serializing and storing to the disk is a database aswell.
If you want to serialize it there are a few tutorials and code examples around.
check How to serialize an object into a string 
for example.
If you want to use a proper database (which is recommend!) you may check different databases and examples at Java and SQLite

