943,949 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 369
  • Java RSS
Aug 29th, 2009
0

creating, editing, modifying,viewing files

Expand Post »
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.
Similar Threads
Reputation Points: 2
Solved Threads: 0
Light Poster
and12 is offline Offline
37 posts
since Aug 2009
Aug 29th, 2009
1

Re: creating, editing, modifying,viewing files

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,
Reputation Points: 51
Solved Threads: 24
Junior Poster
puneetkay is offline Offline
122 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: .getImage returns -1
Next Thread in Java Forum Timeline: how to control the size of applet





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC