public class TRUtils
extends java.lang.Object
Modified by: Joseph A. Huwaldt
Constructor and Description |
---|
TRUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.StringBuffer |
addSpaces(int size,
java.lang.StringBuffer input)
Method that adds spaces to the start of the formatted number
(or any other string actually) until the string reaches the
specified length.
|
static void |
nextLine(java.io.StreamTokenizer tokenizer)
Skips to the start of the next line of the supplied input stream.
|
static double |
nextNumber(java.io.StreamTokenizer tokenizer)
Read in the next numeric value from a stream tokenizer.
|
static java.lang.String |
nextWord(java.io.StreamTokenizer tokenizer)
Read in the next string value from a stream tokenizer.
|
public static void nextLine(java.io.StreamTokenizer tokenizer) throws java.io.IOException
tokenizer
- A tokenizer for the input file stream.java.io.IOException
public static double nextNumber(java.io.StreamTokenizer tokenizer) throws java.io.IOException
tokenizer
- A tokenizer for the input file stream.java.io.IOException
public static java.lang.String nextWord(java.io.StreamTokenizer tokenizer) throws java.io.IOException
tokenizer
- A tokenizer for the input file stream.java.io.IOException
public static java.lang.StringBuffer addSpaces(int size, java.lang.StringBuffer input)
size
- The overall length of the resulting string. Spaces
will be added to the input string until it reaches
this length.input
- The input string buffer to have the spaces added onto.