Le 2/24/14 6:20 PM, Raphaël Ouazana-Sustowski a écrit :
> Hi,
>
> I have a binary attribute (a byte[] or a BinaryValue if needed). I'd
> like to convert it to an escaped format, suitable for a filter.
> Is there any convenient method to do this?

Create a Value (in your case, a BinaryValue) and use the ExprNode class
you need to create a filter (EqualityNode, SubstringNode, ...).

For instance,

Value<byte[]> binValue = new BinaryValue( <your byte[]> );
Node filter = new EqualityNode( "MyBinaryAttr", binValue );

String escapedString = filter.toString();

the escapedString should be fine as a filter.


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to