org.custommonkey.xmlunit

Class NodeInputStream

public class NodeInputStream extends 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
NodeInputStream(Node rootNode)
Simple constructor
NodeInputStream(Node rootNode, Properties outputProperties)
Simple constructor
Method Summary
intavailable()
InputStream method
voidclose()
InputStream method Note that calling close allows a repeated read of the content
intread()
InputStream method

Constructor Detail

NodeInputStream

public NodeInputStream(Node rootNode)
Simple constructor

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

NodeInputStream

public NodeInputStream(Node rootNode, Properties outputProperties)
Simple constructor

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

Method Detail

available

public int available()
InputStream method

Returns: number of bytes available

close

public void close()
InputStream method Note that calling close allows a repeated read of the content

Throws: IOException

read

public int read()
InputStream method

Returns: byte as read

Throws: IOException