Class GenerateINI

java.lang.Object
games.stendhal.server.core.engine.GenerateINI

public class GenerateINI extends Object
generates a server.ini for Stendhal
Author:
hendrik
  • Constructor Details

    • GenerateINI

      public GenerateINI()
  • Method Details

    • getStringWithDefault

      public static String getStringWithDefault(BufferedReader input, String defaultValue)
      reads a String from the input. When no String is chosen the defaultValue is used.
      Parameters:
      input - the buffered input, usually System.in
      defaultValue - if no value is written.
      Returns:
      the string read or default if none was read.
    • getStringWithoutDefault

      public static String getStringWithoutDefault(BufferedReader input, String errorMessage)
      reads a String from the input. When no String is choosen the errorMessage is is displayed and the application is terminated.
      Parameters:
      input - the input stream, usually System.in
      errorMessage - the error message to print when failing
      Returns:
      string read from input
    • uppcaseFirstLetter

      public static String uppcaseFirstLetter(String source)
      Makes the first letter of the source uppercase.
      Parameters:
      source - the string
      Returns:
      *T*he string, with first letter is upper case.
    • main

      public static void main(String[] args, String serverIni) throws FileNotFoundException
      generates a server.ini for Stendhal
      Parameters:
      args - command line parameters
      serverIni - name of server.ini to write
      Throws:
      FileNotFoundException - in case the file cannot be written
    • main

      public static void main(String[] args) throws FileNotFoundException
      generates a server.ini for Stendhal
      Parameters:
      args - command line parameters
      Throws:
      FileNotFoundException - in case the file cannot be written
    • getDatabasePassword

      protected static String getDatabasePassword()
    • getDatabaseUsername

      protected static String getDatabaseUsername()
    • getDatabaseHost

      protected static String getDatabaseHost()
    • getDatabaseName

      protected static String getDatabaseName()