Stream to bytes should be in a method in `Utils.java`.