Java: convert a file to a byte array, then convert byte array to a file.

Example of Searching Arrays and Collections