There are too many types of data streaming classes in the Java API. I would like to use a simple binary reading class that would allow for streaming a file locally or over a network.
I would also like to be able to read specific types of data, such as integer, double, etc. without constructing that data from bytes (that would make horribly unreadable code). Is there a class that exists to fit this need already? Or would I be better off extending an existing class?
Please bear in mind that I am initially going to read local files and extend its capability to read files over a network at a later time, hopefully with minimal code changes.
Thanks
Use a DataInputStream wrapping a BufferedInputStream wrapping a FileInputStream to read. Use a DataoutputStream wrapping a BufferedOutputStream wrapping the socket’s output stream to write.
Each has its responsibilities: