@Override public void readFixed(byte[] bytes, int start, int length) throws IOException { doReadBytes(bytes, start, length); }
@Override public void readFixed(byte[] bytes, int start, int length) throws IOException { doReadBytes(bytes, start, length); }
@Override public ByteBuffer readBytes(ByteBuffer old) throws IOException { int length = readInt(); ByteBuffer result; if (old != null && length <= old.capacity()) { result = old; result.clear(); } else { result = ByteBuffer.allocate(length); } doReadBytes(result.array(), result.position(), length); result.limit(length); return result; }
@Override public ByteBuffer readBytes(ByteBuffer old) throws IOException { int length = readInt(); ByteBuffer result; if (old != null && length <= old.capacity()) { result = old; result.clear(); } else { result = ByteBuffer.allocate(length); } doReadBytes(result.array(), result.position(), length); result.limit(length); return result; }
@Override public Utf8 readString(Utf8 old) throws IOException { long length = readLong(); if (length > MAX_ARRAY_SIZE) { throw new UnsupportedOperationException("Cannot read strings longer than " + MAX_ARRAY_SIZE + " bytes"); } if (length < 0L) { throw new AvroRuntimeException("Malformed data. Length is negative: " + length); } Utf8 result = (old != null ? old : new Utf8()); result.setByteLength((int) length); if (0L != length) { doReadBytes(result.getBytes(), 0, (int) length); } return result; }
@Override public Utf8 readString(Utf8 old) throws IOException { int length = readInt(); Utf8 result = (old != null ? old : new Utf8()); result.setByteLength(length); if (0 != length) { doReadBytes(result.getBytes(), 0, length); } return result; }
@Override public void readFixed(byte[] bytes, int start, int length) throws IOException { doReadBytes(bytes, start, length); }
@Override public void readFixed(byte[] bytes, int start, int length) throws IOException { doReadBytes(bytes, start, length); }
@Override public void readFixed(byte[] bytes, int start, int length) throws IOException { doReadBytes(bytes, start, length); }
@Override public void readFixed(byte[] bytes, int start, int length) throws IOException { doReadBytes(bytes, start, length); }
@Override public ByteBuffer readBytes(ByteBuffer old) throws IOException { int length = readInt(); ByteBuffer result; if (old != null && length <= old.capacity()) { result = old; result.clear(); } else { result = ByteBuffer.allocate(length); } doReadBytes(result.array(), result.position(), length); result.limit(length); return result; }
@Override public ByteBuffer readBytes(ByteBuffer old) throws IOException { int length = readInt(); ByteBuffer result; if (old != null && length <= old.capacity()) { result = old; result.clear(); } else { result = ByteBuffer.allocate(length); } doReadBytes(result.array(), result.position(), length); result.limit(length); return result; }
@Override public ByteBuffer readBytes(ByteBuffer old) throws IOException { int length = readInt(); ByteBuffer result; if (old != null && length <= old.capacity()) { result = old; result.clear(); } else { result = ByteBuffer.allocate(length); } doReadBytes(result.array(), result.position(), length); result.limit(length); return result; }
@Override public ByteBuffer readBytes(ByteBuffer old) throws IOException { int length = readInt(); ByteBuffer result; if (old != null && length <= old.capacity()) { result = old; result.clear(); } else { result = ByteBuffer.allocate(length); } doReadBytes(result.array(), result.position(), length); result.limit(length); return result; }
@Override public Utf8 readString(Utf8 old) throws IOException { int length = readInt(); Utf8 result = (old != null ? old : new Utf8()); result.setLength(length); doReadBytes(result.getBytes(), 0, length); return result; }
@Override public Utf8 readString(Utf8 old) throws IOException { int length = readInt(); Utf8 result = (old != null ? old : new Utf8()); result.setByteLength(length); if (0 != length) { doReadBytes(result.getBytes(), 0, length); } return result; }
@Override public Utf8 readString(Utf8 old) throws IOException { int length = readInt(); Utf8 result = (old != null ? old : new Utf8()); result.setByteLength(length); if (0 != length) { doReadBytes(result.getBytes(), 0, length); } return result; }
@Override public Utf8 readString(Utf8 old) throws IOException { int length = readInt(); Utf8 result = (old != null ? old : new Utf8()); result.setLength(length); doReadBytes(result.getBytes(), 0, length); return result; }