DataInputStream and DataOutputStream are not compulsory - you can use any classes you like. Since you will be updating individual records in the file, you may want to look at RandomAccessFile which can be used for both reading and writing.
You should check your instructions for any mention of NIO. Some of the latest instructions specify that NIO may not be used. But if you don't have any such instruction, then you may use NIO if you like.