@Override public byte[] readByteArray() throws IOException { return input.readByteArray(); }
@Override public byte[] readFrom(Input input) throws IOException { return input.readByteArray(); }
@Override public byte[] readFrom(Input input) throws IOException { return input.readByteArray(); }
@Override public byte[] readFrom(Input input) throws IOException { return input.readByteArray(); }
@Override public BigInteger readFrom(Input input) throws IOException { return new BigInteger(input.readByteArray()); }
@Override public BigInteger readFrom(Input input) throws IOException { return new BigInteger(input.readByteArray()); }
@Override public BigInteger readFrom(Input input) throws IOException { return new BigInteger(input.readByteArray()); }
@Override public short[] readFrom(Input input) throws IOException { reads++; byte[] buffer = input.readByteArray(); short[] s = new short[buffer.length / 2]; for (int i = 0, offset = 0; i < s.length; i++) { s[i] = (short) ((buffer[offset++] & 0xFF) << 8 | (buffer[offset++] & 0xFF)); } return s; }
static HasBar readHasBar(Input input) throws IOException { ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream( input.readByteArray())); try { return (HasBar) ois.readObject(); } catch (Exception e) { throw new RuntimeException(e); } finally { ois.close(); } }
@Override public Object readFrom(Input input, Object owner) throws IOException { if (ID_ARRAY_LEN != input.readFieldNumber(this)) throw new ProtostuffException("Corrupt input."); final int len = input.readInt32(); BigInteger[] array = new BigInteger[len]; if (input instanceof GraphInput) { // update the actual reference. ((GraphInput) input).updateLast(array, owner); } for (int i = 0; i < len;) { switch (input.readFieldNumber(this)) { case ID_ARRAY_DATA: array[i++] = new BigInteger(input.readByteArray()); break; case ID_ARRAY_NULLCOUNT: i += input.readUInt32(); break; default: throw new ProtostuffException("Corrupt input."); } } if (0 != input.readFieldNumber(this)) throw new ProtostuffException("Corrupt input."); return array; }
@Override public Object readFrom(Input input, Object owner) throws IOException { if (ID_ARRAY_LEN != input.readFieldNumber(this)) throw new ProtostuffException("Corrupt input."); final int len = input.readInt32(); BigInteger[] array = new BigInteger[len]; if (input instanceof GraphInput) { // update the actual reference. ((GraphInput) input).updateLast(array, owner); } for (int i = 0; i < len;) { switch (input.readFieldNumber(this)) { case ID_ARRAY_DATA: array[i++] = new BigInteger(input.readByteArray()); break; case ID_ARRAY_NULLCOUNT: i += input.readUInt32(); break; default: throw new ProtostuffException("Corrupt input."); } } if (0 != input.readFieldNumber(this)) throw new ProtostuffException("Corrupt input."); return array; }
@Override public Object readFrom(Input input, Object owner) throws IOException { if (ID_ARRAY_LEN != input.readFieldNumber(this)) throw new ProtostuffException("Corrupt input."); final int len = input.readInt32(); byte[][] array = new byte[len][]; if (input instanceof GraphInput) { // update the actual reference. ((GraphInput) input).updateLast(array, owner); } for (int i = 0; i < len;) { switch (input.readFieldNumber(this)) { case ID_ARRAY_DATA: array[i++] = input.readByteArray(); break; case ID_ARRAY_NULLCOUNT: i += input.readUInt32(); break; default: throw new ProtostuffException("Corrupt input."); } } if (0 != input.readFieldNumber(this)) throw new ProtostuffException("Corrupt input."); return array; }
@Override public Object readFrom(Input input, Object owner) throws IOException { if (ID_ARRAY_LEN != input.readFieldNumber(this)) throw new ProtostuffException("Corrupt input."); final int len = input.readInt32(); byte[][] array = new byte[len][]; if (input instanceof GraphInput) { // update the actual reference. ((GraphInput) input).updateLast(array, owner); } for (int i = 0; i < len;) { switch (input.readFieldNumber(this)) { case ID_ARRAY_DATA: array[i++] = input.readByteArray(); break; case ID_ARRAY_NULLCOUNT: i += input.readUInt32(); break; default: throw new ProtostuffException("Corrupt input."); } } if (0 != input.readFieldNumber(this)) throw new ProtostuffException("Corrupt input."); return array; }
@Override public void mergeFrom(Input input, PojoWithBiggerByteArray message) throws IOException { for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this)) { switch (number) { case 0: return; case 1: message.id = input.readInt32(); break; case 2: message.b = input.readByteArray(); break; case 3: message.ts = input.readInt64(); break; default: input.handleUnknownField(number, this); } } }
@Override public Object readFrom(Input input) throws IOException { return JsonUtils.readValue(input.readByteArray(), Object.class); }
@Override public Object readFrom(Input input) throws IOException { return input.readByteArray(); }
@Override public Object readFrom(Input input) throws IOException { return JsonUtils.readValue(input.readByteArray(), Object.class); }
@Override public void mergeFrom(Input input, Object message) throws IOException { setter.set(message, input.readByteArray()); }
public void mergeFrom(io.protostuff.Input input, com.dremio.exec.proto.UserProtos.PreparedStatementHandle.Builder builder) throws java.io.IOException { for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this)) { switch(number) { case 0: return; case 1: builder.setServerInfo(com.google.protobuf.ByteString.copyFrom(input.readByteArray())); break; default: input.handleUnknownField(number, this); } } } public boolean isInitialized(com.dremio.exec.proto.UserProtos.PreparedStatementHandle.Builder builder)
@Override public void mergeFrom(Input input, Object message) throws IOException { input.readFieldNumber(null); String typeUrl = input.readString(); input.readFieldNumber(null); byte[] bytes = input.readByteArray(); input.readFieldNumber(null); AnyEntry anyEntry = (AnyEntry) message; anyEntry.setTypeUrl(typeUrl); anyEntry.setValue(bytes); }