*/
@Deprecated
public NormalizedNodeInputStreamReader(final InputStream stream) throws IOException {
- Preconditions.checkNotNull(stream);
- input = new DataInputStream(stream);
+ this((DataInput) new DataInputStream(Preconditions.checkNotNull(stream)));
}
/**
*/
@Deprecated
public NormalizedNodeInputStreamReader(final DataInput input) {
+ this(input, false);
+ }
+
+ NormalizedNodeInputStreamReader(final DataInput input, final boolean versionChecked) {
this.input = Preconditions.checkNotNull(input);
+ readSignatureMarker = !versionChecked;
}
@Override
return addLeafSetChildren(identifier.getNodeType(),
Builders.leafSetBuilder().withNodeIdentifier(identifier)).build();
+ case NodeTypes.ORDERED_LEAF_SET:
+ LOG.debug("Read leaf set node");
+ ListNodeBuilder<Object, LeafSetEntryNode<Object>> orderedLeafSetBuilder =
+ Builders.orderedLeafSetBuilder().withNodeIdentifier(identifier);
+ orderedLeafSetBuilder = addLeafSetChildren(identifier.getNodeType(), orderedLeafSetBuilder);
+ return orderedLeafSetBuilder.build();
+
default :
return null;
}
}
@Override
- public void readFully(byte[] b) throws IOException {
+ public void readFully(final byte[] b) throws IOException {
readSignatureMarkerAndVersionIfNeeded();
input.readFully(b);
}
@Override
- public void readFully(byte[] b, int off, int len) throws IOException {
+ public void readFully(final byte[] b, final int off, final int len) throws IOException {
readSignatureMarkerAndVersionIfNeeded();
input.readFully(b, off, len);
}
@Override
- public int skipBytes(int n) throws IOException {
+ public int skipBytes(final int n) throws IOException {
readSignatureMarkerAndVersionIfNeeded();
return input.skipBytes(n);
}