Package org.apache.avro.idl
Class IdlUtils
java.lang.Object
org.apache.avro.idl.IdlUtils
Utils for IDL
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
uncheckExceptions
(Callable<T> callable) Calls the given callable, wrapping any checked exception in anAvroRuntimeException
.static void
writeIdlProtocol
(Writer writer, JsonProperties properties, String protocolNameSpace, String protocolName, Collection<Schema> schemas, Collection<Protocol.Message> messages) static void
writeIdlProtocol
(Writer writer, Protocol protocol) static void
writeIdlProtocol
(Writer writer, Schema schema) static void
writeIdlSchema
(Writer writer, Schema schema) static void
writeIdlSchemas
(Writer writer, String namespace, Collection<Schema> schemas)
-
Method Details
-
uncheckExceptions
Calls the given callable, wrapping any checked exception in anAvroRuntimeException
.- Parameters:
callable
- the callable to call- Returns:
- the result of the callable
-
writeIdlSchema
- Throws:
IOException
-
writeIdlSchemas
public static void writeIdlSchemas(Writer writer, String namespace, Collection<Schema> schemas) throws IOException - Throws:
IOException
-
writeIdlProtocol
- Throws:
IOException
-
writeIdlProtocol
- Throws:
IOException
-
writeIdlProtocol
public static void writeIdlProtocol(Writer writer, JsonProperties properties, String protocolNameSpace, String protocolName, Collection<Schema> schemas, Collection<Protocol.Message> messages) throws IOException - Throws:
IOException
-