
org.deeplearning4j.ui.model.stats.sbe.VarDataUTF8Decoder Maven / Gradle / Ivy
The newest version!
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NOTICE file distributed with this work for additional
* * information regarding copyright ownership.
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* * License for the specific language governing permissions and limitations
* * under the License.
* *
* * SPDX-License-Identifier: Apache-2.0
* *****************************************************************************
*/
package org.deeplearning4j.ui.model.stats.sbe;
import org.agrona.DirectBuffer;
@javax.annotation.Generated(value = {"org.deeplearning4j.ui.stats.sbe.VarDataUTF8Decoder"})
@SuppressWarnings("all")
public class VarDataUTF8Decoder {
public static final int ENCODED_LENGTH = -1;
private DirectBuffer buffer;
private int offset;
public VarDataUTF8Decoder wrap(final DirectBuffer buffer, final int offset) {
this.buffer = buffer;
this.offset = offset;
return this;
}
public int encodedLength() {
return ENCODED_LENGTH;
}
public static long lengthNullValue() {
return 4294967294L;
}
public static long lengthMinValue() {
return 0L;
}
public static long lengthMaxValue() {
return 1073741824L;
}
public long length() {
return (buffer.getInt(offset + 0, java.nio.ByteOrder.LITTLE_ENDIAN) & 0xFFFF_FFFFL);
}
public static short varDataNullValue() {
return (short) 255;
}
public static short varDataMinValue() {
return (short) 0;
}
public static short varDataMaxValue() {
return (short) 254;
}
public String toString() {
return appendTo(new StringBuilder(100)).toString();
}
public StringBuilder appendTo(final StringBuilder builder) {
builder.append('(');
//Token{signal=ENCODING, name='length', description='null', id=-1, version=0, encodedLength=4, offset=0, componentTokenCount=1, encoding=Encoding{presence=REQUIRED, primitiveType=UINT32, byteOrder=LITTLE_ENDIAN, minValue=null, maxValue=1073741824, nullValue=null, constValue=null, characterEncoding='UTF-8', epoch='unix', timeUnit=nanosecond, semanticType='null'}}
builder.append("length=");
builder.append(length());
builder.append('|');
//Token{signal=ENCODING, name='varData', description='null', id=-1, version=0, encodedLength=-1, offset=4, componentTokenCount=1, encoding=Encoding{presence=REQUIRED, primitiveType=UINT8, byteOrder=LITTLE_ENDIAN, minValue=null, maxValue=null, nullValue=null, constValue=null, characterEncoding='UTF-8', epoch='unix', timeUnit=nanosecond, semanticType='null'}}
builder.append(')');
return builder;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy