uk.co.real_logic.artio.messages.AsciiStringDecoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of artio-codecs Show documentation
Show all versions of artio-codecs Show documentation
High-Performance FIX Gateway
/* Generated SBE (Simple Binary Encoding) message codec. */
package uk.co.real_logic.artio.messages;
import org.agrona.DirectBuffer;
@SuppressWarnings("all")
public final class AsciiStringDecoder
{
public static final int SCHEMA_ID = 666;
public static final int SCHEMA_VERSION = 25;
public static final String SEMANTIC_VERSION = "0.2";
public static final int ENCODED_LENGTH = -1;
public static final java.nio.ByteOrder BYTE_ORDER = java.nio.ByteOrder.LITTLE_ENDIAN;
private int offset;
private DirectBuffer buffer;
public AsciiStringDecoder wrap(final DirectBuffer buffer, final int offset)
{
if (buffer != this.buffer)
{
this.buffer = buffer;
}
this.offset = offset;
return this;
}
public DirectBuffer buffer()
{
return buffer;
}
public int offset()
{
return offset;
}
public int encodedLength()
{
return ENCODED_LENGTH;
}
public int sbeSchemaId()
{
return SCHEMA_ID;
}
public int sbeSchemaVersion()
{
return SCHEMA_VERSION;
}
public static int lengthEncodingOffset()
{
return 0;
}
public static int lengthEncodingLength()
{
return 4;
}
public static int lengthSinceVersion()
{
return 0;
}
public static long lengthNullValue()
{
return 4294967295L;
}
public static long lengthMinValue()
{
return 0L;
}
public static long lengthMaxValue()
{
return 2147483647L;
}
public long length()
{
return (buffer.getInt(offset + 0, BYTE_ORDER) & 0xFFFF_FFFFL);
}
public static int varDataEncodingOffset()
{
return 4;
}
public static int varDataEncodingLength()
{
return -1;
}
public static int varDataSinceVersion()
{
return 0;
}
public static byte varDataNullValue()
{
return (byte)0;
}
public static byte varDataMinValue()
{
return (byte)32;
}
public static byte varDataMaxValue()
{
return (byte)126;
}
public String toString()
{
if (null == buffer)
{
return "";
}
return appendTo(new StringBuilder()).toString();
}
public StringBuilder appendTo(final StringBuilder builder)
{
if (null == buffer)
{
return builder;
}
builder.append('(');
builder.append("length=");
builder.append(this.length());
builder.append('|');
builder.append(')');
return builder;
}
}