MarkLogic XCC/.Net Library |

# XdmBinary.AsBinaryData Method

Buffers the binary() item from the server and converts it to a Java byte array. This method may be invoked repeatedly. On subsequent invocations it will return the same array constructed by the first invocation.

NOTE: If the binary() item is large, it is possible that an OutOfMemory error could result when invoking this method, which could result in your program crashing. If you need to handle arbitrarily large binary() items, use the AsStream() method.

[Visual Basic]
Function AsBinaryData() As Byte()
[C#]
byte[] AsBinaryData();

#### Return Value

This item as a byte array.

#### See Also

XdmBinary Interface | Marklogic.Xcc.Types Namespace