org.apache.avro.tool

## Interface Tool

All Known Implementing Classes:
  BinaryFragmentToJsonTool, CatTool, ConcatTool, CreateRandomFileTool, DataFileGetMetaTool, DataFileGetSchemaTool, DataFileReadTool, DataFileRepairTool, DataFileWriteTool, FromTextTool, IdlTool, IdlToSchemataTool, InduceSchemaTool, JsonToBinaryFragmentTool, RecodecTool, RecordCountTool, RpcProtocolTool, RpcReceiveTool, RpcSendTool, SchemaFingerprintTool, SchemaNormalizationTool, SpecificCompilerTool, TetherTool, ToTextTool, ToTrevniTool, TrevniCreateRandomTool, TrevniMetadataTool, TrevniToJsonTool

    public interface Tool

Command-line "avro-tools" utilities should implement this interface for delegation by `Main`.

### Method Summary

All Methods Instance Methods Abstract Methods
`String` `getName()` Name of tool, to be used in listings.
`String` `getShortDescription()` 1-line description to be used in command listings.
`int` `run(InputStream in, PrintStream out, PrintStream err, List<String> args)` Runs the tool with supplied arguments.

### Method Detail

#### run

    int run(InputStream in,
            PrintStream out,
            PrintStream err,
            List<String> args)
     throws Exception

Runs the tool with supplied arguments. Input and output streams are customizable for easier testing.

Parameters:
  `in` - Input stream to read data (typically System.in).
  `out` - Output of tool (typically System.out).
  `err` - Error stream (typically System.err).
  `args` - Non-null list of arguments.
Returns:
  result code (0 for success)
Throws:
  `Exception` - Just like main(), tools may throw Exception.

#### getName

    String getName()

Name of tool, to be used in listings.

#### getShortDescription

    String getShortDescription()

1-line description to be used in command listings.