I want to create a program where i can create data files, either in text, binary: data or objects. Once the data files are created by the user they can be used to view them in all modes. They should view existing data files in the current or sub directory by having a drop down select list (but i don't know if Java can do a "dir" command).
I also want the view part to be able to tell what type of file it is. So i would be able to open the correct stream (DataInputStream, ObjectInputStream, etc.).
It would be nice to see how they look in all three views too.
If it's in binary, i still want to be able to see it text view to see what the contents are.
Also, i would like to convert text to binary and binary to text.

I would appreciate some tips for anyone who has tried any of the above.

Hello,

Study on File , ByteArrayInputStream, ByteArrayOutputStream, DataInputStream and DataOutputStream classes of java.io package. This is all you have to do. If you do a smart search, You will get code for this program as its really common.

use listFiles() method of java.io.File class to get list of all files in a specific folder.

For more info on java.io package

Regards,

commented: thanks for tips +1
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.