binaryGraphCodec method
RdfBinaryGraphCodec
binaryGraphCodec({
- String? contentType,
- RdfBinaryEncoderOptions? encoderOptions,
- RdfBinaryDecoderOptions? decoderOptions,
Get a binary graph codec for a specific content type.
Returns a binary codec that can handle the specified content type. If no content type is specified, returns an auto-detecting codec.
Throws CodecNotSupportedException if no binary codec matches.
Implementation
RdfBinaryGraphCodec binaryGraphCodec({
String? contentType,
RdfBinaryEncoderOptions? encoderOptions,
RdfBinaryDecoderOptions? decoderOptions,
}) {
final codec = _binaryGraphRegistry.getCodec(contentType);
if (encoderOptions != null || decoderOptions != null) {
return codec.withOptions(
encoder: encoderOptions,
decoder: decoderOptions,
);
}
return codec;
}