/** * Deserializes a {@link Binding} by reading bytes from the specified input * stream. It assumes the output is not compressed. * * @param in * the input stream to read from. * * @return the {@link Binding} read from the input stream. */ public static Binding deserializeBinding(InputStream in) { return deserializeBinding(in, false); }
/** * {@inheritDoc} */ @Override protected void internalReadObject(ObjectInputStream in) throws IOException, ClassNotFoundException { super.object = SparqlResultSerializer.deserializeBinding( in, EventCloudProperties.COMPRESSION.getValue()); }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); Binding binding = SparqlResultSerializer.deserializeBinding( in, EventCloudProperties.COMPRESSION.getValue()); this.content = new HashMap<Var, Node>(); Iterator<Var> it = binding.vars(); while (it.hasNext()) { Var var = it.next(); this.content.put(var, binding.get(var)); } } }