C# Class Lucene.Net.Index.Payload

Inheritance: System.ICloneable
Show file Open project: synhershko/lucene.net Class Usage Examples

Protected Properties

Property Type Description
data byte[]
internalLength int
internalOffset int

Public Methods

Method Description
ByteAt ( int index ) : byte

Returns the byte at the given index.

Clone ( ) : Object

Clones this payload by creating a copy of the underlying byte array.

CopyTo ( byte target, int targetOffset ) : void

Copies the payload data to a byte array.

Equals ( System obj ) : bool
GetData ( ) : byte[]

Gets or sets a reference to the underlying byte array that holds this payloads data. Data is not copied.

GetHashCode ( ) : int
Payload ( ) : System

Creates an empty payload and does not allocate a byte array.

Payload ( byte data ) : System

Creates a new payload with the the given array as data. A reference to the passed-in array is held, i. e. no copy is made.

Payload ( byte data, int offset, int length ) : System

Creates a new payload with the the given array as data. A reference to the passed-in array is held, i. e. no copy is made.

SetData ( byte value ) : void

Gets or sets a reference to the underlying byte array that holds this payloads data. Data is not copied.

SetData ( byte value, int offset, int length ) : void

Sets this payloads data. A reference to the passed-in array is held, i. e. no copy is made.

ToByteArray ( ) : byte[]

Allocates a new byte array, copies the payload data into it and returns it.

Method Details

ByteAt() public method

Returns the byte at the given index.
public ByteAt ( int index ) : byte
index int
return byte

Clone() public method

Clones this payload by creating a copy of the underlying byte array.
public Clone ( ) : Object
return System.Object

CopyTo() public method

Copies the payload data to a byte array.
public CopyTo ( byte target, int targetOffset ) : void
target byte the target byte array ///
targetOffset int the offset in the target byte array ///
return void

Equals() public method

public Equals ( System obj ) : bool
obj System
return bool

GetData() public method

Gets or sets a reference to the underlying byte array that holds this payloads data. Data is not copied.
public GetData ( ) : byte[]
return byte[]

GetHashCode() public method

public GetHashCode ( ) : int
return int

Payload() public method

Creates an empty payload and does not allocate a byte array.
public Payload ( ) : System
return System

Payload() public method

Creates a new payload with the the given array as data. A reference to the passed-in array is held, i. e. no copy is made.
public Payload ( byte data ) : System
data byte the data of this payload ///
return System

Payload() public method

Creates a new payload with the the given array as data. A reference to the passed-in array is held, i. e. no copy is made.
public Payload ( byte data, int offset, int length ) : System
data byte the data of this payload ///
offset int the offset in the data byte array ///
length int the length of the data ///
return System

SetData() public method

Gets or sets a reference to the underlying byte array that holds this payloads data. Data is not copied.
public SetData ( byte value ) : void
value byte
return void

SetData() public method

Sets this payloads data. A reference to the passed-in array is held, i. e. no copy is made.
public SetData ( byte value, int offset, int length ) : void
value byte
offset int
length int
return void

ToByteArray() public method

Allocates a new byte array, copies the payload data into it and returns it.
public ToByteArray ( ) : byte[]
return byte[]

Property Details

data protected property

the byte array containing the payload data
protected byte[] data
return byte[]

internalLength protected property

the length of the payload data
protected int internalLength
return int

internalOffset protected property

the offset within the byte array
protected int internalOffset
return int