Package uk.co.real_logic.sbe.ir
Class IrEncoder
java.lang.Object
uk.co.real_logic.sbe.ir.IrEncoder
- All Implemented Interfaces:
AutoCloseable
Encoder for
Ir representing an SBE schema which can be written to a buffer or file.-
Constructor Summary
ConstructorsConstructorDescriptionConstruct an encoder forIrto a file.IrEncoder(ByteBuffer buffer, Ir ir) Construct an encoder forIrto aByteBuffer. -
Method Summary
-
Constructor Details
-
IrEncoder
Construct an encoder forIrto a file. An existing file will be overwritten.- Parameters:
fileName- into which theIrwill be encoded.ir- to be encoded into the file.
-
IrEncoder
Construct an encoder forIrto aByteBuffer.- Parameters:
buffer- into which theIrwill be encoded.ir- to be encoded into the buffer.
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
encode
public int encode()Encode the providedIrand return the length in bytes encoded.- Returns:
- encode the provided
Irand return the length in bytes encoded.
-