public class UaBinaryFile extends Object
UABinaryFileDataType from file. The result of the parsing is
the UABinaryFileDataType and an EncoderContext that contains the custom DataTypes
defined in the header.| Modifier and Type | Method and Description |
|---|---|
static UaBinaryFile |
from(EncoderContext context,
Object body,
String schemaLocation,
KeyValuePair... fileHeader)
Creates
UaBinaryFile based on the given data. |
static UaBinaryFile |
from(EncoderContext context,
UABinaryFileDataType data)
Returns
UaBinaryFile that wraps the given data and context. |
Object |
getBody()
Convenience method for
getData() and then UABinaryFileDataType.getBody(). |
EncoderContext |
getContext()
Returns the
EncoderContext that was used to decode the getBody() part of the
UABinaryFileDataType, the header of the UABinaryFileDataType defines custom
types, the core NamespaceTable.OPCUA_NAMESPACE types are always included. |
UABinaryFileDataType |
getData()
Returns the parsed
UABinaryFileDataType. |
static UaBinaryFile |
parse(InputStream inputStream)
Parses the given
InputStream, throws DecodingException on failure. |
ByteString |
toBinary()
Returns the encoded contents, which should be written to a filename.uabinary file.
|
public static UaBinaryFile from(EncoderContext context, Object body, String schemaLocation, KeyValuePair... fileHeader)
UaBinaryFile based on the given data. Note that custom datatypes are not yet
supported, thus the given body shall be a type that can be put into Variant and be of
DataType(s) that belong to the core UA Namespace.public static UaBinaryFile from(EncoderContext context, UABinaryFileDataType data)
UaBinaryFile that wraps the given data and context. The given
EncoderContext shall contain all type definitions used by the data and the same types
must also be present in the UABinaryFileDataType's DataTypeSchemaHeader part.public static UaBinaryFile parse(InputStream inputStream) throws DecodingException
InputStream, throws DecodingException on failure.DecodingExceptionpublic Object getBody()
getData() and then UABinaryFileDataType.getBody().public EncoderContext getContext()
EncoderContext that was used to decode the getBody() part of the
UABinaryFileDataType, the header of the UABinaryFileDataType defines custom
types, the core NamespaceTable.OPCUA_NAMESPACE types are always included.public UABinaryFileDataType getData()
UABinaryFileDataType.public ByteString toBinary() throws EncodingException
EncodingException if the data cannot be encoded.EncodingExceptionCopyright © 2026. All rights reserved.