public class BinaryEncoder extends AbstactEncoder implements IEncoder
the decoder equivalent of this class.ctx| Constructor and Description |
|---|
BinaryEncoder(EncoderContext encoderContext,
byte[] buffer)
Creates
BinaryEncoder with the given EncoderContext that writes to the given
buffer. |
BinaryEncoder(EncoderContext encoderContext,
byte[] buffer,
int offset,
int length)
Creates
BinaryEncoder with the given EncoderContext that writes to the given
buffer starting from the given offset and only writing up-to the given length. |
BinaryEncoder(EncoderContext encoderContext,
ByteBuffer buf)
Creates
BinaryEncoder with the given EncoderContext that writes to the given
buffer. |
BinaryEncoder(EncoderContext encoderContext,
IBinaryWriteable out)
Creates
BinaryEncoder with the given EncoderContext that writes to the given
stream. |
BinaryEncoder(EncoderContext encoderContext,
OutputStream os)
Creates
BinaryEncoder with the given EncoderContext that writes to the given
stream. |
| Modifier and Type | Method and Description |
|---|---|
List<Locale> |
getLocales()
The current Locale preferences.
|
IBinaryWriteable |
getOutput()
Returns the output being written.
|
IBinaryWriteable |
getWriteable()
Returns the output being written.
|
void |
put(String fieldName,
Object value,
UaNodeId dataTypeId,
int dimensions)
Encodes the given field.
|
getEncoderContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEncoderContext, putBoolean, putBooleanArray, putBooleanArray, putByte, putByteArray, putByteArray, putByteString, putByteStringArray, putByteStringArray, putDataValue, putDataValueArray, putDataValueArray, putDateTime, putDateTimeArray, putDateTimeArray, putDiagnosticInfo, putDiagnosticInfoArray, putDiagnosticInfoArray, putDouble, putDouble, putDoubleArray, putDoubleArray, putExpandedNodeId, putExpandedNodeIdArray, putExpandedNodeIdArray, putExtensionObject, putExtensionObjectArray, putExtensionObjectArray, putFloat, putFloat, putFloatArray, putFloatArray, putGuid, putGuidArray, putGuidArray, putInt16, putInt16, putInt16Array, putInt16Array, putInt32, putInt32, putInt32Array, putInt32Array, putInt32Array, putInt64, putInt64, putInt64Array, putInt64Array, putLocalizedText, putLocalizedTextArray, putLocalizedTextArray, putNodeId, putNodeIdArray, putNodeIdArray, putQualifiedName, putQualifiedNameArray, putQualifiedNameArray, putSByte, putSByte, putSByte, putSByteArray, putSByteArray, putStatusCode, putStatusCodeArray, putStatusCodeArray, putString, putStringArray, putStringArray, putUInt16, putUInt16Array, putUInt16Array, putUInt32, putUInt32Array, putUInt32Array, putUInt64, putUInt64Array, putUInt64Array, putVariant, putVariantArray, putXmlElement, putXmlElementArray, putXmlElementArraypublic BinaryEncoder(EncoderContext encoderContext, byte[] buffer)
BinaryEncoder with the given EncoderContext that writes to the given
buffer.public BinaryEncoder(EncoderContext encoderContext, byte[] buffer, int offset, int length)
BinaryEncoder with the given EncoderContext that writes to the given
buffer starting from the given offset and only writing up-to the given length.public BinaryEncoder(EncoderContext encoderContext, ByteBuffer buf)
BinaryEncoder with the given EncoderContext that writes to the given
buffer.public BinaryEncoder(EncoderContext encoderContext, IBinaryWriteable out)
BinaryEncoder with the given EncoderContext that writes to the given
stream.public BinaryEncoder(EncoderContext encoderContext, OutputStream os)
BinaryEncoder with the given EncoderContext that writes to the given
stream.public List<Locale> getLocales()
IEncodergetLocales in interface IEncoderpublic IBinaryWriteable getOutput()
public IBinaryWriteable getWriteable()
public void put(String fieldName, Object value, UaNodeId dataTypeId, int dimensions) throws EncodingException
IEncoderput in interface IEncoderfieldName - the name of the field (not used in all encodings e.g. Binary encodings do not
typically use a name, but JSON does).value - the value for the field, possibly null.dataTypeId - the OPC UA DataType of the field, not null.dimensions - the dimensions of the field, 0 if scalar, 1 if 1-dim array, etc.).EncodingException - in case the value cannot be encoded. Possible errors are e.g. giving
wrong DataType for a given value, giving wrong dimensions or giving values that are too
large for limits of the IEncoder.getEncoderContext().Copyright © 2026. All rights reserved.