All Superinterfaces:
DataInput, QNameAwareDataInput

public interface NormalizedNodeDataInput extends QNameAwareDataInput
Interface for reading NormalizedNodes, YangInstanceIdentifiers, YangInstanceIdentifier.PathArguments and SchemaNodeIdentifiers.
  • 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 occurs
      IllegalStateException - if the dictionary has been detached
      NullPointerException - if writer is null
    • readNormalizedNode

      default org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode readNormalizedNode() throws IOException
      Read 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 occurs
      IllegalStateException - 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 occurs
      IllegalStateException - if the dictionary has been detached
      NullPointerException - if receiver is null
    • readYangInstanceIdentifier

      @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier readYangInstanceIdentifier() throws IOException
      Read a YangInstanceIdentifier from the reader.
      Returns:
      A YangInstanceIdentifier
      Throws:
      IOException - if an error occurs
    • readPathArgument

      @NonNull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument readPathArgument() throws IOException
      Read a YangInstanceIdentifier.PathArgument from 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 IOException
      Deprecated.
      Read a YangInstanceIdentifier.PathArgument or a LegacyPathArgument from the reader.
      Returns:
      Either a YangInstanceIdentifier.PathArgument or a LegacyPathArgument
      Throws:
      IOException - if an error occurs
    • readSchemaNodeIdentifier

      @NonNull SchemaNodeIdentifier readSchemaNodeIdentifier() throws IOException
      Throws:
      IOException
    • getVersion

      @NonNull NormalizedNodeStreamVersion getVersion() throws IOException
      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

      static @NonNull NormalizedNodeDataInput newDataInput(@NonNull DataInput input) throws IOException
      Creates a new NormalizedNodeDataInput instance 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 NormalizedNodeDataInput instance
      Throws:
      InvalidNormalizedNodeStreamException - if the stream version is not supported
      IOException - if an error occurs reading from the input
      NullPointerException - if input is null
    • 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.
      Creates a new NormalizedNodeDataInput instance 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 NormalizedNodeDataInput instance