binaryDatasetCodec method
RdfBinaryCodec<RdfDataset>
binaryDatasetCodec({
- String? contentType,
- RdfBinaryEncoderOptions? encoderOptions,
- RdfBinaryDecoderOptions? decoderOptions,
Get a binary dataset codec for a specific content type.
Returns a binary dataset 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
RdfBinaryCodec<RdfDataset> binaryDatasetCodec({
String? contentType,
RdfBinaryEncoderOptions? encoderOptions,
RdfBinaryDecoderOptions? decoderOptions,
}) {
final codec = _binaryDatasetRegistry.getCodec(contentType);
if (encoderOptions != null || decoderOptions != null) {
return codec.withOptions(
encoder: encoderOptions,
decoder: decoderOptions,
);
}
return codec;
}