.version(tokenDecoder.tokenVersion()) .componentTokenCount(tokenDecoder.componentTokenCount()) .signal(mapSignal(tokenDecoder.signal())); final PrimitiveType type = mapPrimitiveType(tokenDecoder.primitiveType()); .primitiveType(mapPrimitiveType(tokenDecoder.primitiveType())) .byteOrder(mapByteOrder(tokenDecoder.byteOrder())) .presence(mapPresence(tokenDecoder.presence())); encBuilder.constValue(get(valBuffer, type, tokenDecoder.getConstValue(valArray, 0, valArray.length))); encBuilder.minValue(get(valBuffer, type, tokenDecoder.getMinValue(valArray, 0, valArray.length))); encBuilder.maxValue(get(valBuffer, type, tokenDecoder.getMaxValue(valArray, 0, valArray.length))); encBuilder.nullValue(get(valBuffer, type, tokenDecoder.getNullValue(valArray, 0, valArray.length)));
.tokenVersion(token.version()) .componentTokenCount(token.componentTokenCount()) .signal(mapSignal(token.signal())) .primitiveType(mapPrimitiveType(type)) .byteOrder(mapByteOrder(encoding.byteOrder())) .presence(mapPresence(encoding.presence())); tokenEncoder.putConstValue(valArray, 0, put(valBuffer, encoding.constValue(), type)); tokenEncoder.putMinValue(valArray, 0, put(valBuffer, encoding.minValue(), type)); tokenEncoder.putMaxValue(valArray, 0, put(valBuffer, encoding.maxValue(), type)); tokenEncoder.putNullValue(valArray, 0, put(valBuffer, encoding.nullValue(), type)); final byte[] charEncodingBytes = getBytes( encoding.characterEncoding(), characterEncodingCharacterEncoding()); tokenEncoder.putCharacterEncoding(charEncodingBytes, 0, charEncodingBytes.length); final byte[] epochBytes = getBytes(encoding.epoch(), epochCharacterEncoding()); tokenEncoder.putEpoch(epochBytes, 0, epochBytes.length); final byte[] timeUnitBytes = getBytes(encoding.timeUnit(), timeUnitCharacterEncoding()); tokenEncoder.putTimeUnit(timeUnitBytes, 0, timeUnitBytes.length); final byte[] semanticTypeBytes = getBytes(encoding.semanticType(), semanticTypeCharacterEncoding()); tokenEncoder.putSemanticType(semanticTypeBytes, 0, semanticTypeBytes.length); final byte[] descriptionBytes = getBytes(token.description(), descriptionCharacterEncoding()); tokenEncoder.putDescription(descriptionBytes, 0, descriptionBytes.length); final byte[] referencedNameBytes = getBytes(token.referencedName(), referencedNameCharacterEncoding());
private int encodeFrame() { frameEncoder .wrap(directBuffer, 0) .irId(ir.id()) .irVersion(0) .schemaVersion(ir.version()); try { final byte[] packageBytes = ir.packageName().getBytes(packageNameCharacterEncoding()); frameEncoder.putPackageName(packageBytes, 0, packageBytes.length); final byte[] namespaceBytes = getBytes(ir.namespaceName(), namespaceNameCharacterEncoding()); frameEncoder.putNamespaceName(namespaceBytes, 0, namespaceBytes.length); final byte[] semanticVersionBytes = getBytes(ir.semanticVersion(), semanticVersionCharacterEncoding()); frameEncoder.putSemanticVersion(semanticVersionBytes, 0, semanticVersionBytes.length); } catch (final UnsupportedEncodingException ex) { LangUtil.rethrowUnchecked(ex); } return frameEncoder.encodedLength(); }
private int encodeFrame() { frameEncoder .wrap(directBuffer, 0) .irId(ir.id()) .irVersion(0) .schemaVersion(ir.version()); try { final byte[] packageBytes = ir.packageName().getBytes(packageNameCharacterEncoding()); frameEncoder.putPackageName(packageBytes, 0, packageBytes.length); final byte[] namespaceBytes = getBytes(ir.namespaceName(), namespaceNameCharacterEncoding()); frameEncoder.putNamespaceName(namespaceBytes, 0, namespaceBytes.length); final byte[] semanticVersionBytes = getBytes(ir.semanticVersion(), semanticVersionCharacterEncoding()); frameEncoder.putSemanticVersion(semanticVersionBytes, 0, semanticVersionBytes.length); } catch (final UnsupportedEncodingException ex) { LangUtil.rethrowUnchecked(ex); } return frameEncoder.encodedLength(); }
.tokenVersion(token.version()) .componentTokenCount(token.componentTokenCount()) .signal(mapSignal(token.signal())) .primitiveType(mapPrimitiveType(type)) .byteOrder(mapByteOrder(encoding.byteOrder())) .presence(mapPresence(encoding.presence())); tokenEncoder.putConstValue(valArray, 0, put(valBuffer, encoding.constValue(), type)); tokenEncoder.putMinValue(valArray, 0, put(valBuffer, encoding.minValue(), type)); tokenEncoder.putMaxValue(valArray, 0, put(valBuffer, encoding.maxValue(), type)); tokenEncoder.putNullValue(valArray, 0, put(valBuffer, encoding.nullValue(), type)); final byte[] charEncodingBytes = getBytes( encoding.characterEncoding(), characterEncodingCharacterEncoding()); tokenEncoder.putCharacterEncoding(charEncodingBytes, 0, charEncodingBytes.length); final byte[] epochBytes = getBytes(encoding.epoch(), epochCharacterEncoding()); tokenEncoder.putEpoch(epochBytes, 0, epochBytes.length); final byte[] timeUnitBytes = getBytes(encoding.timeUnit(), timeUnitCharacterEncoding()); tokenEncoder.putTimeUnit(timeUnitBytes, 0, timeUnitBytes.length); final byte[] semanticTypeBytes = getBytes(encoding.semanticType(), semanticTypeCharacterEncoding()); tokenEncoder.putSemanticType(semanticTypeBytes, 0, semanticTypeBytes.length); final byte[] descriptionBytes = getBytes(token.description(), descriptionCharacterEncoding()); tokenEncoder.putDescription(descriptionBytes, 0, descriptionBytes.length); final byte[] referencedNameBytes = getBytes(token.referencedName(), referencedNameCharacterEncoding());
.id(tokenDecoder.fieldId()) .version(tokenDecoder.tokenVersion()) .signal(mapSignal(tokenDecoder.signal())); final PrimitiveType type = mapPrimitiveType(tokenDecoder.primitiveType()); .primitiveType(mapPrimitiveType(tokenDecoder.primitiveType())) .byteOrder(mapByteOrder(tokenDecoder.byteOrder())) .presence(mapPresence(tokenDecoder.presence())); encBuilder.constValue(get(valBuffer, type, tokenDecoder.getConstValue(valArray, 0, valArray.length))); encBuilder.minValue(get(valBuffer, type, tokenDecoder.getMinValue(valArray, 0, valArray.length))); encBuilder.maxValue(get(valBuffer, type, tokenDecoder.getMaxValue(valArray, 0, valArray.length))); encBuilder.nullValue(get(valBuffer, type, tokenDecoder.getNullValue(valArray, 0, valArray.length)));
private int encodeFrame() { frameEncoder .wrap(directBuffer, 0) .irId(ir.id()) .irVersion(0) .schemaVersion(ir.version()); try { final byte[] packageBytes = ir.packageName().getBytes(packageNameCharacterEncoding()); frameEncoder.putPackageName(packageBytes, 0, packageBytes.length); final byte[] namespaceBytes = getBytes(ir.namespaceName(), namespaceNameCharacterEncoding()); frameEncoder.putNamespaceName(namespaceBytes, 0, namespaceBytes.length); final byte[] semanticVersionBytes = getBytes(ir.semanticVersion(), semanticVersionCharacterEncoding()); frameEncoder.putSemanticVersion(semanticVersionBytes, 0, semanticVersionBytes.length); } catch (final UnsupportedEncodingException ex) { LangUtil.rethrowUnchecked(ex); } return frameEncoder.encodedLength(); }
.tokenVersion(token.version()) .componentTokenCount(token.componentTokenCount()) .signal(mapSignal(token.signal())) .primitiveType(mapPrimitiveType(type)) .byteOrder(mapByteOrder(encoding.byteOrder())) .presence(mapPresence(encoding.presence())); tokenEncoder.putConstValue(valArray, 0, put(valBuffer, encoding.constValue(), type)); tokenEncoder.putMinValue(valArray, 0, put(valBuffer, encoding.minValue(), type)); tokenEncoder.putMaxValue(valArray, 0, put(valBuffer, encoding.maxValue(), type)); tokenEncoder.putNullValue(valArray, 0, put(valBuffer, encoding.nullValue(), type)); final byte[] charEncodingBytes = getBytes( encoding.characterEncoding(), characterEncodingCharacterEncoding()); tokenEncoder.putCharacterEncoding(charEncodingBytes, 0, charEncodingBytes.length); final byte[] epochBytes = getBytes(encoding.epoch(), epochCharacterEncoding()); tokenEncoder.putEpoch(epochBytes, 0, epochBytes.length); final byte[] timeUnitBytes = getBytes(encoding.timeUnit(), timeUnitCharacterEncoding()); tokenEncoder.putTimeUnit(timeUnitBytes, 0, timeUnitBytes.length); final byte[] semanticTypeBytes = getBytes(encoding.semanticType(), semanticTypeCharacterEncoding()); tokenEncoder.putSemanticType(semanticTypeBytes, 0, semanticTypeBytes.length); final byte[] descriptionBytes = getBytes(token.description(), descriptionCharacterEncoding()); tokenEncoder.putDescription(descriptionBytes, 0, descriptionBytes.length); final byte[] referencedNameBytes = getBytes(token.referencedName(), referencedNameCharacterEncoding());
.version(tokenDecoder.tokenVersion()) .componentTokenCount(tokenDecoder.componentTokenCount()) .signal(mapSignal(tokenDecoder.signal())); final PrimitiveType type = mapPrimitiveType(tokenDecoder.primitiveType()); .primitiveType(mapPrimitiveType(tokenDecoder.primitiveType())) .byteOrder(mapByteOrder(tokenDecoder.byteOrder())) .presence(mapPresence(tokenDecoder.presence())); encBuilder.constValue(get(valBuffer, type, tokenDecoder.getConstValue(valArray, 0, valArray.length))); encBuilder.minValue(get(valBuffer, type, tokenDecoder.getMinValue(valArray, 0, valArray.length))); encBuilder.maxValue(get(valBuffer, type, tokenDecoder.getMaxValue(valArray, 0, valArray.length))); encBuilder.nullValue(get(valBuffer, type, tokenDecoder.getNullValue(valArray, 0, valArray.length)));
private int encodeFrame() { frameEncoder .wrap(directBuffer, 0) .irId(ir.id()) .irVersion(0) .schemaVersion(ir.version()); try { final byte[] packageBytes = ir.packageName().getBytes(packageNameCharacterEncoding()); frameEncoder.putPackageName(packageBytes, 0, packageBytes.length); final byte[] namespaceBytes = getBytes(ir.namespaceName(), namespaceNameCharacterEncoding()); frameEncoder.putNamespaceName(namespaceBytes, 0, namespaceBytes.length); final byte[] semanticVersionBytes = getBytes(ir.semanticVersion(), semanticVersionCharacterEncoding()); frameEncoder.putSemanticVersion(semanticVersionBytes, 0, semanticVersionBytes.length); } catch (final UnsupportedEncodingException ex) { LangUtil.rethrowUnchecked(ex); } return frameEncoder.encodedLength(); }
.fieldId(token.id()) .tokenVersion(token.version()) .signal(mapSignal(token.signal())) .primitiveType(mapPrimitiveType(type)) .byteOrder(mapByteOrder(encoding.byteOrder())) .presence(mapPresence(encoding.presence())); tokenEncoder.putName(nameBytes, 0, nameBytes.length); tokenEncoder.putConstValue(valArray, 0, put(valBuffer, encoding.constValue(), type)); tokenEncoder.putMinValue(valArray, 0, put(valBuffer, encoding.minValue(), type)); tokenEncoder.putMaxValue(valArray, 0, put(valBuffer, encoding.maxValue(), type)); tokenEncoder.putNullValue(valArray, 0, put(valBuffer, encoding.nullValue(), type)); final byte[] charEncodingBytes = getBytes(encoding.characterEncoding(), characterEncodingCharacterEncoding()); tokenEncoder.putCharacterEncoding(charEncodingBytes, 0, charEncodingBytes.length); final byte[] epochBytes = getBytes(encoding.epoch(), epochCharacterEncoding()); tokenEncoder.putEpoch(epochBytes, 0, epochBytes.length); final byte[] timeUnitBytes = getBytes(encoding.timeUnit(), timeUnitCharacterEncoding()); tokenEncoder.putTimeUnit(timeUnitBytes, 0, timeUnitBytes.length); final byte[] semanticTypeBytes = getBytes(encoding.semanticType(), semanticTypeCharacterEncoding()); tokenEncoder.putSemanticType(semanticTypeBytes, 0, semanticTypeBytes.length);
.version(tokenDecoder.tokenVersion()) .componentTokenCount(tokenDecoder.componentTokenCount()) .signal(mapSignal(tokenDecoder.signal())); final PrimitiveType type = mapPrimitiveType(tokenDecoder.primitiveType()); .primitiveType(mapPrimitiveType(tokenDecoder.primitiveType())) .byteOrder(mapByteOrder(tokenDecoder.byteOrder())) .presence(mapPresence(tokenDecoder.presence())); encBuilder.constValue(get(valBuffer, type, tokenDecoder.getConstValue(valArray, 0, valArray.length))); encBuilder.minValue(get(valBuffer, type, tokenDecoder.getMinValue(valArray, 0, valArray.length))); encBuilder.maxValue(get(valBuffer, type, tokenDecoder.getMaxValue(valArray, 0, valArray.length))); encBuilder.nullValue(get(valBuffer, type, tokenDecoder.getNullValue(valArray, 0, valArray.length)));