|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.CommandLineParser
util.Toc
public class Toc
Writes a TOC to the file TOC or to the specified toc file
given with the -o switch. Two further command line switches are
recognized, -a for append to a toc file and -s to
name the wav file containing the wav data. If no -a switch is
given, the name of the wav file defaults to SIDE1, in the appending
case the default wav-file name is SIDE2. As parameters this
class expects the starting times in seconds for each track plus the ending
time of the last track, i.e. you must give one more time-tag than tracks.
Only the time-tag must be in correct order, command line switches can be
at arbitrary positions
Examples:
java util.Toc 6 174 373 654 840 1117
Read 5 tracks from the file SIDE1, create a new toc and write it to
TOC. The first song starts after 6 seconds and has a duration of
168 seconds.
java util.Toc -a -s uiuiui.wav 0 174 373 654 840 1117 -o out.toc
Read from the file uiuiui.wav, appends to the toc file
out.toc and uses track boundaries as specified, the first song
starting at the beginning of the wav file.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.CommandLineParser |
|---|
CommandLineParser.Test |
| Field Summary | |
|---|---|
private boolean |
append
True if toc should be appended. |
static String |
ONESWITCH
All command line switches recoginzed with a single parameter. |
private double |
pregap
The pregap prior to the first song. |
static double |
PREGAP
The default pregap . |
static String |
SIDE1
The default name of an A-side. |
static String |
SIDE2
The default name of a B-side. |
private File |
toc
The file to write out the toc. |
static String |
TOC
The default toc output file. |
private File |
wav
The wav file containing all tracks. |
static String |
ZEROSWITCH
All command line switches recoginzed without a parameter. |
| Constructor Summary | |
|---|---|
Toc()
Creates a new toc dumper. |
|
| Method Summary | |
|---|---|
protected void |
fill()
Fills all relevant data with the defaults, if not explicetly given. |
private static String |
getTocTime(double time)
Converts seconds into the toc-time format. |
static void |
main(String[] arg)
Reads in a command line and converts it to a toc file. |
boolean |
writeToc()
Writes the toc. |
| Methods inherited from class util.CommandLineParser |
|---|
getArguments, getCommandLine, getCommands, getRegisteredSwitches, hasAnySwitch, hasSwitch, hasSwitch, haveAllSwitches, parse, printCommandLine, registerLine, registerSwitches, setCommands, staticUsage, usage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ZEROSWITCH
public static final String ONESWITCH
public static final String SIDE1
public static final String SIDE2
public static final String TOC
public static final double PREGAP
private File wav
private File toc
private boolean append
private double pregap
| Constructor Detail |
|---|
public Toc()
| Method Detail |
|---|
public boolean writeToc()
throws IOException
CommandLineParser.parse(java.lang.String[]) and
fill() in succession.
IOExceptionprotected void fill()
private static final String getTocTime(double time)
public static void main(String[] arg)
throws ParseException
ParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||