@Override public byte[] toBinary() { return StringUtils.stringsToBinary(indexNames.toArray(new String[0])); }
@Override public byte[] toBinary() { final byte[] indexIdBytes = StringUtils.stringsToBinary(indexNames); final ByteBuffer buf = ByteBuffer.allocate(VarintUtils.unsignedShortByteLength(adapterId) + indexIdBytes.length); VarintUtils.writeUnsignedShort(adapterId, buf); buf.put(indexIdBytes); return buf.array(); }
@Override public byte[] toBinary() { byte[] typeNamesBinary, fieldNamesBinary; if ((typeNames != null) && (typeNames.length > 0)) { typeNamesBinary = StringUtils.stringsToBinary(typeNames); } else { typeNamesBinary = new byte[0]; } if ((fieldNames != null) && (fieldNames.length > 0)) { fieldNamesBinary = StringUtils.stringsToBinary(fieldNames); } else { fieldNamesBinary = new byte[0]; } final ByteBuffer buf = ByteBuffer.allocate( VarintUtils.unsignedIntByteLength(typeNamesBinary.length) + fieldNamesBinary.length + typeNamesBinary.length); VarintUtils.writeUnsignedInt(typeNamesBinary.length, buf); buf.put(typeNamesBinary); buf.put(fieldNamesBinary); return buf.array(); }
@Override public byte[] toBinary() { byte[] typeNamesBinary, aggregationBinary; if ((typeNames != null) && (typeNames.length > 0)) { typeNamesBinary = StringUtils.stringsToBinary(typeNames); } else { typeNamesBinary = new byte[0]; } if (aggregation != null) { aggregationBinary = PersistenceUtils.toBinary(aggregation); } else { aggregationBinary = new byte[0]; } final ByteBuffer buf = ByteBuffer.allocate( VarintUtils.unsignedIntByteLength(typeNamesBinary.length) + aggregationBinary.length + typeNamesBinary.length); VarintUtils.writeUnsignedInt(typeNamesBinary.length, buf); buf.put(typeNamesBinary); buf.put(aggregationBinary); return buf.array(); }
@Override public byte[] toBinary() { final byte[] geometryBinary = preparedGeometryImage.geometryBinary; final byte[] geometryFieldNamesBytes = StringUtils.stringsToBinary(geometryFieldNames.toArray(new String[0])); final byte[] theRest = super.toBinary(); final ByteBuffer buf = ByteBuffer.allocate( VarintUtils.unsignedIntByteLength(compareOperation.ordinal()) + VarintUtils.unsignedIntByteLength(geometryBinary.length) + VarintUtils.unsignedIntByteLength(geometryFieldNamesBytes.length) + geometryBinary.length + geometryFieldNamesBytes.length + theRest.length); VarintUtils.writeUnsignedInt(compareOperation.ordinal(), buf); VarintUtils.writeUnsignedInt(geometryBinary.length, buf); VarintUtils.writeUnsignedInt(geometryFieldNamesBytes.length, buf); buf.put(geometryBinary); buf.put(geometryFieldNamesBytes); buf.put(theRest); return buf.array(); }
authsBinary = new byte[0]; } else { authsBinary = StringUtils.stringsToBinary(authorizations);
requestBuilder.setVisLabels( ByteString.copyFrom( StringUtils.stringsToBinary(readerParams.getAdditionalAuthorizations())));