@Override public void fromBinary(final byte[] bytes) { indexNames = Arrays.asList(StringUtils.stringsFromBinary(bytes)); } }
@Override public void fromBinary(final byte[] bytes) { final ByteBuffer buf = ByteBuffer.wrap(bytes); adapterId = VarintUtils.readUnsignedShort(buf); final byte[] indexNamesBytes = new byte[buf.remaining()]; buf.get(indexNamesBytes); indexNames = StringUtils.stringsFromBinary(indexNamesBytes); } }
@Override public void fromBinary(final byte[] bytes) { final ByteBuffer buf = ByteBuffer.wrap(bytes); final byte[] typeNamesBytes = new byte[VarintUtils.readUnsignedInt(buf)]; if (typeNamesBytes.length <= 0) { typeNames = new String[0]; } else { buf.get(typeNamesBytes); typeNames = StringUtils.stringsFromBinary(typeNamesBytes); } final byte[] fieldNamesBytes = new byte[buf.remaining()]; if (fieldNamesBytes.length == 0) { fieldNames = null; } else { buf.get(fieldNamesBytes); fieldNames = StringUtils.stringsFromBinary(fieldNamesBytes); } }
@Override public void fromBinary(final byte[] bytes) { final ByteBuffer buf = ByteBuffer.wrap(bytes); final byte[] typeNamesBytes = new byte[VarintUtils.readUnsignedInt(buf)]; if (typeNamesBytes.length == 0) { typeNames = new String[0]; } else { buf.get(typeNamesBytes); typeNames = StringUtils.stringsFromBinary(typeNamesBytes); } final byte[] aggregationBytes = new byte[buf.remaining()]; if (aggregationBytes.length == 0) { aggregation = null; } else { buf.get(aggregationBytes); aggregation = (Aggregation<P, R, T>) PersistenceUtils.fromBinary(aggregationBytes); } }
authorizations = StringUtils.stringsFromBinary(authBytes); } else { authorizations = new String[0];
@Override public void fromBinary(final byte[] bytes) { final ByteBuffer buf = ByteBuffer.wrap(bytes); compareOperation = CompareOperation.values()[VarintUtils.readUnsignedInt(buf)]; final byte[] geometryBinary = new byte[VarintUtils.readUnsignedInt(buf)]; final byte[] geometryFieldNamesBytes = new byte[VarintUtils.readUnsignedInt(buf)]; buf.get(geometryBinary); buf.get(geometryFieldNamesBytes); geometryFieldNames = new HashSet<>(Arrays.asList(StringUtils.stringsFromBinary(geometryFieldNamesBytes))); final byte[] theRest = new byte[buf.remaining()]; buf.get(theRest); preparedGeometryImage = geometryImageInterner.intern(new GeometryImage(geometryBinary)); // build the the PreparedGeometry and underling Geometry if not // reconstituted yet; most likely occurs if this thread constructed the // image. preparedGeometryImage.init(); super.fromBinary(theRest); }
final byte[] visBytes = request.getVisLabels().toByteArray(); if (visBytes.length > 0) { authorizations = StringUtils.stringsFromBinary(visBytes); } else { authorizations = null;