Class ByteArrayDataOutput
DataOutput backed by a byte array. WARNING: this class omits most low-level checks, so be sure to test heavily with assertions enabled.
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Store
Assembly: Lucene.Net.dll
Syntax
public class ByteArrayDataOutput : DataOutput
Constructors
ByteArrayDataOutput()
DataOutput backed by a byte array. WARNING: this class omits most low-level checks, so be sure to test heavily with assertions enabled.
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public ByteArrayDataOutput()
ByteArrayDataOutput(byte[])
DataOutput backed by a byte array. WARNING: this class omits most low-level checks, so be sure to test heavily with assertions enabled.
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public ByteArrayDataOutput(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
byte[] | bytes |
ByteArrayDataOutput(byte[], int, int)
DataOutput backed by a byte array. WARNING: this class omits most low-level checks, so be sure to test heavily with assertions enabled.
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public ByteArrayDataOutput(byte[] bytes, int offset, int len)
Parameters
Type | Name | Description |
---|---|---|
byte[] | bytes | |
int | offset | |
int | len |
Properties
Position
DataOutput backed by a byte array. WARNING: this class omits most low-level checks, so be sure to test heavily with assertions enabled.
Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public virtual int Position { get; }
Property Value
Type | Description |
---|---|
int |
Methods
Reset(byte[])
NOTE: When overriding this method, be aware that the constructor of this class calls a private method and not this virtual method. So if you need to override the behavior during the initialization, call your own private method from the constructor with whatever custom behavior you need.
Declaration
public virtual void Reset(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
byte[] | bytes |
Reset(byte[], int, int)
NOTE: When overriding this method, be aware that the constructor of this class calls a private method and not this virtual method. So if you need to override the behavior during the initialization, call your own private method from the constructor with whatever custom behavior you need.
Declaration
public virtual void Reset(byte[] bytes, int offset, int len)
Parameters
Type | Name | Description |
---|---|---|
byte[] | bytes | |
int | offset | |
int | len |
WriteByte(byte)
Writes a single byte.
The most primitive data type is an eight-bit byte. Files are accessed as sequences of bytes. All other data types are defined as sequences of bytes, so file formats are byte-order independent.Declaration
public override void WriteByte(byte b)
Parameters
Type | Name | Description |
---|---|---|
byte | b |
Overrides
See Also
WriteBytes(byte[], int, int)
Writes an array of bytes.
Declaration
public override void WriteBytes(byte[] b, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
byte[] | b | the bytes to write |
int | offset | the offset in the byte array |
int | length | the number of bytes to write |