edu.cmu.sphinx.util
Class BatchFile

java.lang.Object
  extended byedu.cmu.sphinx.util.BatchFile

public class BatchFile
extends java.lang.Object

Provides a set of utilities methods for manipulating batch files.


Constructor Summary
BatchFile()
           
 
Method Summary
static java.lang.String getFilename(java.lang.String batchFileLine)
          Returns the file name portion of a line in a batch file.
static java.util.List getLines(java.lang.String batchFile)
          Returns a List of the lines in a batch file.
static java.util.List getLines(java.lang.String batchFile, int skip)
          Returns a List of the lines in a batch file.
static java.lang.String getReference(java.lang.String batchFileLine)
          Returns the reference string portion of a line in a batch file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchFile

public BatchFile()
Method Detail

getLines

public static java.util.List getLines(java.lang.String batchFile)
                               throws java.io.IOException
Returns a List of the lines in a batch file.

Parameters:
batchFile - the batch file to read
Returns:
a List of the lines in a batch file
Throws:
java.io.IOException

getLines

public static java.util.List getLines(java.lang.String batchFile,
                                      int skip)
                               throws java.io.IOException
Returns a List of the lines in a batch file.

Parameters:
batchFile - the batch file to read
skip - the number of lines to skip between items
Returns:
a List of the lines in a batch file
Throws:
java.io.IOException

getFilename

public static java.lang.String getFilename(java.lang.String batchFileLine)
Returns the file name portion of a line in a batch file. This is the portion of the line before the first space.

Returns:
the file name portion of a line in a batch file.

getReference

public static java.lang.String getReference(java.lang.String batchFileLine)
Returns the reference string portion of a line in a batch file. This is the portion of the line after the first space

Returns:
the reference string portion of a line in a batch file.