- public static WriteModification fromStream(ObjectInput in, short version) {
- WriteModification mod = new WriteModification(version);
- mod.readExternal(in);
- return mod;
+ public static WriteModification fromStream(final NormalizedNodeDataInput in, final short version)
+ throws IOException {
+ final NormalizedNode<?, ?> node = in.readNormalizedNode();
+ final YangInstanceIdentifier path = in.readYangInstanceIdentifier();
+ return new WriteModification(version, path, node);
+ }
+
+ public void writeTo(final NormalizedNodeDataOutput out) throws IOException {
+ // FIXME: this should be inverted, as the path helps receivers in establishment of context
+ out.writeNormalizedNode(data);
+ out.writeYangInstanceIdentifier(getPath());