Found ByteArray read/write error and refactored method names.