Reading and writing binary data should include the read and write methods. InputStream class defines the following methods for reading bytes:

OutputStream class defines the following methods for writing bytes: