Thanks for the help (both Andy and Bruno). I am not sure why I had it
screwed up -- misread the docs I guess.
BTW what is the mailing list policy re thank-you messages? I don't want
to clutter up the mailing list with thank-yous, but at the same time I
really the friendly help.
graham
On 08/18/2018 07:55 AM, Andy Seaborne wrote:
On 18/08/18 07:12, Bruno P. Kinoshita wrote:
Hi Graham,
I think you have to use exactly what you have, an array of bytes
(i.e. byte[]). Here's a unit test in Jena for base64
https://github.com/apache/jena/blob/09994d2e2a7a9dd031f35e53ac79eb84f6927297/jena-core/src/test/java/org/apache/jena/graph/test/TestTypedLiterals.java#L967
Hope that helps
Bruno
Graham,
If you do want to add the type as well, it is XSDDatatype.XSDbase64Binary
.createTypedLiteral(bytes, XSDDatatype.XSDbase64Binary);
As Bruno says, XSDbase64Binary is the default type for byte[]. You
would need to add a datatype to get hex binary:
XSDDatatype.XSDhexBinary
Andy
________________________________
From: graham <[email protected]>
To: [email protected]
Sent: Saturday, 18 August 2018 5:32 PM
Subject: Base64 binary data
Hi
I have some base64 binary data in an array of bytes.
How do I store that in a typed literal. I guess I need something like
this
model.add(subject, predicate,
model.createTypedLiteral(bytes, new XSDbase64Binary("???")));
But what do I put in the ??? part?
thanks
graham