@Override public void close() throws IOException { in.close(); } }
@Override public void close() throws IOException { in.close(); } }
@Override public void close() throws IOException { in.close(); } }
@Override public void parsePayload(BytesRef payload, SuggestPayload ref) throws IOException { ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(payload.bytes, payload.offset, payload.length); InputStreamDataInput input = new InputStreamDataInput(byteArrayInputStream); ref.weight = input.readVLong() - 1; int len = input.readVInt(); ref.surfaceForm.grow(len); ref.surfaceForm.setLength(len); input.readBytes(ref.surfaceForm.bytes(), 0, ref.surfaceForm.length()); len = input.readVInt(); ref.payload.grow(len); ref.payload.setLength(len); input.readBytes(ref.payload.bytes(), 0, ref.payload.length()); input.close(); } }
@Override public void parsePayload(BytesRef payload, SuggestPayload ref) throws IOException { ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(payload.bytes, payload.offset, payload.length); InputStreamDataInput input = new InputStreamDataInput(byteArrayInputStream); ref.weight = input.readVLong() - 1; int len = input.readVInt(); ref.surfaceForm.grow(len); ref.surfaceForm.setLength(len); input.readBytes(ref.surfaceForm.bytes(), 0, ref.surfaceForm.length()); len = input.readVInt(); ref.payload.grow(len); ref.payload.setLength(len); input.readBytes(ref.payload.bytes(), 0, ref.payload.length()); input.close(); } }
@Override public void parsePayload(BytesRef payload, SuggestPayload ref) throws IOException { ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(payload.bytes, payload.offset, payload.length); InputStreamDataInput input = new InputStreamDataInput(byteArrayInputStream); ref.weight = input.readVLong() - 1; int len = input.readVInt(); ref.surfaceForm.grow(len); ref.surfaceForm.setLength(len); input.readBytes(ref.surfaceForm.bytes(), 0, ref.surfaceForm.length()); len = input.readVInt(); ref.payload.grow(len); ref.payload.setLength(len); input.readBytes(ref.payload.bytes(), 0, ref.payload.length()); input.close(); } }