Renamed method toByteArray.