netkit.graph.io
Class NodeWriter

java.lang.Object
  extended by netkit.graph.io.NodeWriter

public final class NodeWriter
extends java.lang.Object

This class writes Node instance data to a Writer object. The output format corresponds to that read by the NodeReader class.

Author:
Kaveh R. Ghazi
See Also:
SchemaReader, NodeReader, SchemaWriter, EdgeWriterRN, Graph

Constructor Summary
NodeWriter()
           
 
Method Summary
static void writeNodes(Node[] nodes, java.io.Writer writer)
          This static method does the work of writing output data for the class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeWriter

public NodeWriter()
Method Detail

writeNodes

public static void writeNodes(Node[] nodes,
                              java.io.Writer writer)
This static method does the work of writing output data for the class.

Parameters:
nodes - an array of Node objects. All of the supplied Nodes must share the same Attributes object reference (AKA their NodeType).
writer - a Writer object where the Node output will go. The Writer is flushed but not closed.
Throws:
java.lang.RuntimeException - if any constraints are violated.