Class MimeTypeCommand

java.lang.Object
org.apache.sis.console.CommandRunner
org.apache.sis.console.MimeTypeCommand

final class MimeTypeCommand extends CommandRunner
The "mime-type" subcommand. This sub-command reproduces the functionality of the following Unix command, except that MimeTypeCommand uses the SIS detection mechanism instead of the OS one.
Since:
0.4
Version:
0.8
See Also:
  • Constructor Details

    • MimeTypeCommand

      MimeTypeCommand(int commandIndex, String... arguments) throws InvalidOptionException
      Creates the "mime-type" sub-command.
      Parameters:
      commandIndex - index of the arguments element containing the "mime-type" command name, or -1 if none.
      arguments - the command-line arguments provided by the user.
      Throws:
      InvalidOptionException - if an illegal option has been provided, or the option has an illegal value.
  • Method Details

    • run

      public int run() throws Exception
      Prints mime-type information.
      Specified by:
      run in class CommandRunner
      Returns:
      0 on success, or an exit code if the command failed for a reason other than an uncaught Java exception.
      Throws:
      Exception - if an error occurred while executing the sub-command.