org.custommonkey.xmlunit

## Class NodeInputStream

- java.lang.Object
- - java.io.InputStream
  - - org.custommonkey.xmlunit.NodeInputStream

All Implemented Interfaces:
  java.io.Closeable, java.lang.AutoCloseable

    public class NodeInputStream
    extends java.io.InputStream

Adapter class to present the content of a DOM Node (e.g. a Document) as an InputStream using a DOM to Stream transformation.
Examples and more at xmlunit.sourceforge.net

### Constructor Summary

Constructors
Constructor and Description
`NodeInputStream(org.w3c.dom.Node rootNode)` Simple constructor
`NodeInputStream(org.w3c.dom.Node rootNode, java.util.Properties outputProperties)` Simple constructor

### Method Summary

Methods
`int` `available()` InputStream method
`void` `close()` InputStream method Note that calling close allows a repeated read of the content
`int` `read()` InputStream method

### Methods inherited from class java.io.InputStream

`mark, markSupported, read, read, reset, skip`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### NodeInputStream

    public NodeInputStream(org.w3c.dom.Node rootNode)

Simple constructor

Parameters:
  `rootNode` - the node to be presented as an input stream

#### NodeInputStream

    public NodeInputStream(org.w3c.dom.Node rootNode,
                   java.util.Properties outputProperties)

Simple constructor

Parameters:
  `rootNode` - the node to be presented as an input stream

### Method Detail

#### read

    public int read()
             throws java.io.IOException

InputStream method

Specified by:
  `read` in class `java.io.InputStream`
Returns:
  byte as read
Throws:
  `java.io.IOException`

#### close

    public void close()
               throws java.io.IOException

InputStream method Note that calling close allows a repeated read of the content

Specified by:
  `close` in interface `java.io.Closeable`
Specified by:
  `close` in interface `java.lang.AutoCloseable`
Overrides:
  `close` in class `java.io.InputStream`
Throws:
  `java.io.IOException`

#### available

    public int available()
                  throws java.io.IOException

InputStream method

Overrides:
  `available` in class `java.io.InputStream`
Returns:
  number of bytes available
Throws:
  `java.io.IOException`