Command-line "avro-tools" utilities should implement this interface for delegation by Main.
| 26 | * delegation by {@link Main}. |
| 27 | */ |
| 28 | public interface Tool { |
| 29 | /** |
| 30 | * Runs the tool with supplied arguments. Input and output streams are |
| 31 | * customizable for easier testing. |
| 32 | * |
| 33 | * @param in Input stream to read data (typically System.in). |
| 34 | * @param out Output of tool (typically System.out). |
| 35 | * @param err Error stream (typically System.err). |
| 36 | * @param args Non-null list of arguments. |
| 37 | * @return result code (0 for success) |
| 38 | * @throws Exception Just like main(), tools may throw Exception. |
| 39 | */ |
| 40 | int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception; |
| 41 | |
| 42 | /** |
| 43 | * Name of tool, to be used in listings. |
| 44 | */ |
| 45 | String getName(); |
| 46 | |
| 47 | /** |
| 48 | * 1-line description to be used in command listings. |
| 49 | */ |
| 50 | String getShortDescription(); |
| 51 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…