use of uk.co.real_logic.sbe.xml.MessageSchema in project simple-binary-encoding by real-logic.
the class OtfExample method encodeSchema.
private static void encodeSchema(final ByteBuffer byteBuffer) throws Exception {
final Path path = Paths.get("src/main/resources/example-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();
}
}
}
Aggregations