Package org.apache.avro.io
Class OptimizedBinaryDecoder
- java.lang.Object
-
- org.apache.avro.io.Decoder
-
- org.apache.avro.io.BinaryDecoder
-
- org.apache.avro.io.OptimizedBinaryDecoder
-
public class OptimizedBinaryDecoder extends org.apache.avro.io.BinaryDecoderThis class is used to optimize bytes field decoding. It will wrap the original byte array as a byte buffer if the field type is 'bytes'(the default behavior inis to create a new byte array copy, which is not efficient. The reason to use package name: org.apache.avro.io sinceBinaryDecoder(byte[], int, int)is package-visible.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffergetRawBytes()java.nio.ByteBufferreadBytes(java.nio.ByteBuffer old)floatreadFloat()-
Methods inherited from class org.apache.avro.io.BinaryDecoder
arrayNext, doReadBytes, doReadItemCount, doSkipBytes, inputStream, isEnd, mapNext, readArrayStart, readBoolean, readDouble, readEnum, readFixed, readIndex, readInt, readLong, readMapStart, readNull, readString, readString, skipArray, skipBytes, skipFixed, skipMap, skipString
-
-
-
-
Method Detail
-
readBytes
public java.nio.ByteBuffer readBytes(java.nio.ByteBuffer old) throws java.io.IOException- Overrides:
readBytesin classorg.apache.avro.io.BinaryDecoder- Throws:
java.io.IOException
-
readFloat
public float readFloat() throws java.io.IOException- Overrides:
readFloatin classorg.apache.avro.io.BinaryDecoder- Throws:
java.io.IOException
-
getRawBytes
public java.nio.ByteBuffer getRawBytes()
-
-