Return the raw byte[] for the binary field. Note that you must also call {@link #getBinaryLength} and {@link #getBinaryOffset} to know which range of bytes in this returned array belong to the field.

About reuse: if you pass in the result byte[] and it is used, likely the underlying implementation will hold onto this byte[] and return it in future calls to {@link #BinaryValue()} or {@link #GetBinaryValue()}. So if you subsequently re-use the same byte[] elsewhere it will alter this Fieldable's value.

Namespace: Lucene.Net.Documents
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
byte[] GetBinaryValue(
	byte[] result
)
Visual Basic
Function GetBinaryValue ( _
	result As Byte() _
) As Byte()
Visual C++
array<unsigned char>^ GetBinaryValue(
	array<unsigned char>^ result
)

Parameters

result
Type: array<System..::..Byte>[]()[][]
User defined buffer that will be used if possible. If this is null or not large enough, a new buffer is allocated

Return Value

reference to the Field value as byte[].

See Also