private static void encodeSchema(final ByteBuffer byteBuffer) throws Exception
    {
        final Path path = Paths.get("example-extension-schema.xml");
        try (InputStream in = new BufferedInputStream(Files.newInputStream(path)))
        {
            final MessageSchema schema = XmlSchemaParser.parse(in, ParserOptions.DEFAULT);
            final Ir ir = new IrGenerator().generate(schema);
            try (IrEncoder irEncoder = new IrEncoder(byteBuffer, ir))
            {
                irEncoder.encode();
            }
        }
    }
Main entry point for the example.

@param args which are ignored.
@throws Exception if an error occurs when parsing the XML or doing IO.
sbe-samples/src/main/java/uk/co/real_logic/sbe/examples/OtfExample.java