I want to convert a text file into a binary file. The text file has a format like this where "-Student" is the flag in one line: -Student Tom 100 -String This is an example of a text file -Student John 99
posted 13 years ago
Welcome to JavaRanch!
You haven't really given enough information to get a quality response but I'll have a go. I'm assuming that the "student" entries are supposed to be objects. It looks to me like you want to read in the text file, create Java objects from the entries that you find and then look at using java.io.ObjectOutputStream to serialize them to a file.
By the way, if you're expecting people here to do your homework for you you're gonna be disappointed. We're happy to help, however.