protected Radio(String argsString[])
{
// Handler zuerst sowohl f�r Kommandozeilen- als auch
// f�r GUI-Bedienung aktivieren, damit man alle Fehler
// w�hrend dem Starten sieht
Handler logHandler = new ConsoleLogHandler();
logHandler.setFilter(this);
logHandler.setFormatter(new LogFormatter());
Logger.getLogger().addHandler(logHandler);
// Parameter in einen Vektor kopieren
Vector args = new Vector();
for (int i=0; i < argsString.length; i++)
{
args.add(argsString[i]);
}
// Debug-Nachrichten anzeigen?
displayDebugMessages = parseBooleanArg(args, "debug", false); //$NON-NLS-1$
// Keine grafische Oberfl�che?
boolean noGUI = parseBooleanArg(args, "nogui", false); //$NON-NLS-1$
boolean consoleUI = parseBooleanArg(args, "consoleui", false); //$NON-NLS-1$
// Keine grafische Oberfl�che bei Konsolenbedienung anzeigen
if (consoleUI)
{
noGUI = true;
}
// Portnummern lesen
int port = -1;
boolean portSet = false;
try
{
port = parseIntArg(args, "port", port); //$NON-NLS-1$
portSet = (port != -1);
}
catch (IllegalArgumentException e)
{
exit(Messages.getString("Radio.INVALID_PORT_NUMBER"), noGUI); //$NON-NLS-1$
}
// Maximale Bandbreite lesen
int maxUploadBandwidth = 0;
boolean maxUploadBandwidthSet = false;
try
{
maxUploadBandwidth = parseIntArg(args, "maxbandwidth", maxUploadBandwidth); //$NON-NLS-1$
maxUploadBandwidthSet = (maxUploadBandwidth != 0);
}
catch (IllegalArgumentException e)
{
exit(Messages.getString("Radio.INVALID_BANDWIDTH_LIMIT"), noGUI); //$NON-NLS-1$
}
// Logdatei gew�nscht?
String logFileName = null;
logFileName = parseStringArg(args, "logfile", null); //$NON-NLS-1$
if (logFileName != null)
{
try
{
Handler logfileHandler = new FileLogHandler(logFileName);
logfileHandler.setFilter(this);
logfileHandler.setFormatter(new LogFormatter());
Logger.getLogger().addHandler(logfileHandler);
}
catch (IOException e)
{
exit(Messages.getString("Radio.INVALID_LOGFILE_NAME"), noGUI); //$NON-NLS-1$