Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6.3
-
None
-
None
Description
An exception is thrown when trying to encode bytes backed by a file.
java.lang.UnsupportedOperationException: null
at java.nio.ByteBuffer.arrayOffset(ByteBuffer.java:968) ~[na:1.6.0_31]
at org.apache.avro.io.BinaryEncoder.writeBytes(BinaryEncoder.java:61) ~[avro-1.6.3.jar:1.6.3]
Note arrayOffset is an optional method, see:
http://docs.oracle.com/javase/6/docs/api/java/nio/ByteBuffer.html#arrayOffset%28%29
FileChannel returns native ByteBuffer not HeapedByteBuffer