Package org.apache.sis.console
Class MimeTypeCommand
java.lang.Object
org.apache.sis.console.CommandRunner
org.apache.sis.console.MimeTypeCommand
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:
-
Field Summary
Fields inherited from class org.apache.sis.console.CommandRunner
colors, commandName, debug, encoding, err, files, instance, locale, options, out, outputBuffer, TEST, timezone
-
Constructor Summary
ConstructorsConstructorDescriptionMimeTypeCommand
(int commandIndex, String... arguments) Creates the"mime-type"
sub-command. -
Method Summary
Methods inherited from class org.apache.sis.console.CommandRunner
canNotOpen, error, hasContradictoryOptions, hasUnexpectedFileCount, help, useStandardInput
-
Constructor Details
-
MimeTypeCommand
MimeTypeCommand(int commandIndex, String... arguments) throws InvalidOptionException Creates the"mime-type"
sub-command.- Parameters:
commandIndex
- index of thearguments
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
Prints mime-type information.- Specified by:
run
in classCommandRunner
- 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.
-