Constructor BytesRef
BytesRef()
Create a BytesRef with EMPTY_BYTES
Declaration
public BytesRef()
BytesRef(Byte[], Int32, Int32)
This instance will directly reference bytes
w/o making a copy.
bytes
should not be null
.
Declaration
public BytesRef(byte[] bytes, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | |
System.Int32 | offset | |
System.Int32 | length |
BytesRef(Byte[])
This instance will directly reference bytes
w/o making a copy.
bytes
should not be null
.
Declaration
public BytesRef(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes |
BytesRef(Int32)
Create a BytesRef pointing to a new array of size capacity
.
Offset and length will both be zero.
Declaration
public BytesRef(int capacity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | capacity |
BytesRef(ICharSequence)
Initialize the byte[] from the UTF8 bytes for the provided ICharSequence.
Declaration
public BytesRef(ICharSequence text)
Parameters
Type | Name | Description |
---|---|---|
ICharSequence | text | This must be well-formed unicode text, with no unpaired surrogates. |
BytesRef(String)
Initialize the byte[] from the UTF8 bytes
for the provided
Declaration
public BytesRef(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | This must be well-formed unicode text, with no unpaired surrogates. |