0

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.

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by puneetkay
1

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,

Votes + Comments
thanks for tips
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.