Interface NormalizedNodeDataInput
- All Superinterfaces:
DataInput,QNameAwareDataInput
Interface for reading
NormalizedNodes, YangInstanceIdentifiers, YangInstanceIdentifier.PathArguments
and SchemaNodeIdentifiers.-
Method Summary
Modifier and TypeMethodDescription@NonNull NormalizedNodeStreamVersionReturn the version of the underlying input stream.static @NonNull NormalizedNodeDataInputnewDataInput(@NonNull DataInput input) Creates a newNormalizedNodeDataInputinstance that reads from the given input.static @NonNull NormalizedNodeDataInputnewDataInputWithoutValidation(@NonNull DataInput input) Deprecated, for removal: This API element is subject to removal in a future version.@NonNull Either<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument,LegacyPathArgument> Deprecated.default org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodeRead a normalized node from the reader.default org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodereadNormalizedNode(org.opendaylight.yangtools.yang.data.api.schema.stream.ReusableStreamReceiver receiver) Read a normalized node from the reader, using specified writer to construct the result.default Optional<org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode>@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgumentRead aYangInstanceIdentifier.PathArgumentfrom the reader.@NonNull SchemaNodeIdentifier@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifierRead aYangInstanceIdentifierfrom the reader.voidstreamNormalizedNode(org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter writer) Interpret current stream position as a NormalizedNode, stream its events into a NormalizedNodeStreamWriter.Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytesMethods inherited from interface org.opendaylight.yangtools.yang.common.QNameAwareDataInput
readQName
-
Method Details
-
streamNormalizedNode
void streamNormalizedNode(org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter writer) throws IOException Interpret current stream position as a NormalizedNode, stream its events into a NormalizedNodeStreamWriter.- Parameters:
writer- Writer to emit events to- Throws:
IOException- if an error occursIllegalStateException- if the dictionary has been detachedNullPointerException- ifwriterisnull
-
readNormalizedNode
default org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode readNormalizedNode() throws IOExceptionRead a normalized node from the reader.- Returns:
- Next node from the stream, or null if end of stream has been reached.
- Throws:
IOException- if an error occursIllegalStateException- if the dictionary has been detached
-
readNormalizedNode
default org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode readNormalizedNode(org.opendaylight.yangtools.yang.data.api.schema.stream.ReusableStreamReceiver receiver) throws IOException Read a normalized node from the reader, using specified writer to construct the result.- Parameters:
receiver- Reusable receiver to, expected to be reset- Returns:
- Next node from the stream, or null if end of stream has been reached.
- Throws:
IOException- if an error occursIllegalStateException- if the dictionary has been detachedNullPointerException- ifreceiverisnull
-
readYangInstanceIdentifier
@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier readYangInstanceIdentifier() throws IOExceptionRead aYangInstanceIdentifierfrom the reader.- Returns:
- A YangInstanceIdentifier
- Throws:
IOException- if an error occurs
-
readPathArgument
@NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument readPathArgument() throws IOExceptionRead aYangInstanceIdentifier.PathArgumentfrom the reader.- Returns:
- A PathArgument
- Throws:
IOException- if an error occurs
-
readLegacyPathArgument
@Deprecated(since="11.0.0") @NonNull Either<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument,LegacyPathArgument> readLegacyPathArgument() throws IOExceptionDeprecated.Read aYangInstanceIdentifier.PathArgumentor aLegacyPathArgumentfrom the reader.- Returns:
EitheraYangInstanceIdentifier.PathArgumentor aLegacyPathArgument- Throws:
IOException- if an error occurs
-
readSchemaNodeIdentifier
- Throws:
IOException
-
getVersion
Return the version of the underlying input stream.- Returns:
- Stream version
- Throws:
IOException- if the version cannot be ascertained
-
readOptionalNormalizedNode
default Optional<org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode> readOptionalNormalizedNode() throws IOException- Throws:
IOException
-
newDataInput
Creates a newNormalizedNodeDataInputinstance that reads from the given input. This method first reads and validates that the input contains a valid NormalizedNode stream.- Parameters:
input- the DataInput to read from- Returns:
- a new
NormalizedNodeDataInputinstance - Throws:
InvalidNormalizedNodeStreamException- if the stream version is not supportedIOException- if an error occurs reading from the inputNullPointerException- ifinputisnull
-
newDataInputWithoutValidation
@Deprecated(since="5.0.0", forRemoval=true) static @NonNull NormalizedNodeDataInput newDataInputWithoutValidation(@NonNull DataInput input) Deprecated, for removal: This API element is subject to removal in a future version.UsenewDataInput(DataInput)instead.Creates a newNormalizedNodeDataInputinstance that reads from the given input. This method does not perform any initial validation of the input stream.- Parameters:
input- the DataInput to read from- Returns:
- a new
NormalizedNodeDataInputinstance
-
newDataInput(DataInput)instead.