in java/cose/CborUtil.java [83:89]
public static ByteString asByteString(DataItem dataItem) throws CborException {
if (dataItem.getMajorType() != MajorType.BYTE_STRING) {
throw new CborException(
String.format("Expected a byte string, got %s", dataItem.getMajorType().name()));
}
return (ByteString) dataItem;
}