io.g96.out
Class G96GenericFormatter

java.lang.Object
  extended byio.g96.out.G96GenericFormatter

public class G96GenericFormatter
extends java.lang.Object

A class for writing generic block contents. Write blocks with names, terminators and numbered lines.

Author:
vincent

Field Summary
(package private) static PrintfFormat commentFormat
           
 
Constructor Summary
G96GenericFormatter()
           
 
Method Summary
static java.lang.String format(java.lang.String blockName, java.lang.String[] lines)
           
static java.lang.String format(java.lang.String blockName, java.lang.String[] lines, java.lang.String lineFormatString)
          Generate a GROMOS block from an array of Strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commentFormat

static final PrintfFormat commentFormat
Constructor Detail

G96GenericFormatter

public G96GenericFormatter()
Method Detail

format

public static java.lang.String format(java.lang.String blockName,
                                      java.lang.String[] lines)
                               throws java.io.IOException
Throws:
java.io.IOException

format

public static java.lang.String format(java.lang.String blockName,
                                      java.lang.String[] lines,
                                      java.lang.String lineFormatString)
                               throws java.io.IOException
Generate a GROMOS block from an array of Strings. If you want fancy line treatment, you can do that by supplying a lineFormatString.

Parameters:
blockName -
lines -
lineFormatString -
Returns:
a GROMOS block as one String
Throws:
java.io.IOException
See Also:
format(java.lang.String, java.lang.String[])