Returns the payload data at the current term position. This is invalid until {@link #NextPosition()} is called for the first time. This method must not be called more than once after each call of {@link #NextPosition()}. However, payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons.

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

Syntax

C#
byte[] GetPayload(
	byte[] data,
	int offset
)
Visual Basic
Function GetPayload ( _
	data As Byte(), _
	offset As Integer _
) As Byte()
Visual C++
array<unsigned char>^ GetPayload(
	array<unsigned char>^ data, 
	int offset
)

Parameters

data
Type: array<System..::..Byte>[]()[][]
the array into which the data of this payload is to be stored, if it is big enough; otherwise, a new byte[] array is allocated for this purpose.
offset
Type: System..::..Int32
the offset in the array into which the data of this payload is to be stored.

Return Value

a byte[] array containing the data of this payload

See Also