Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class ByteArrayDataInput

    DataInput backed by a byte array. WARNING: this class omits all low-level checks.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    object
    DataInput
    ByteArrayDataInput
    Inherited Members
    DataInput.ReadBytes(byte[], int, int, bool)
    DataInput.ReadString()
    DataInput.Clone()
    DataInput.ReadStringStringMap()
    DataInput.ReadStringSet()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Store
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class ByteArrayDataInput : DataInput

    Constructors

    ByteArrayDataInput()

    DataInput backed by a byte array. WARNING: this class omits all low-level checks.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public ByteArrayDataInput()

    ByteArrayDataInput(byte[])

    DataInput backed by a byte array. WARNING: this class omits all low-level checks.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public ByteArrayDataInput(byte[] bytes)
    Parameters
    Type Name Description
    byte[] bytes

    ByteArrayDataInput(byte[], int, int)

    DataInput backed by a byte array. WARNING: this class omits all low-level checks.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public ByteArrayDataInput(byte[] bytes, int offset, int len)
    Parameters
    Type Name Description
    byte[] bytes
    int offset
    int len

    Properties

    Eof

    DataInput backed by a byte array. WARNING: this class omits all low-level checks.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public bool Eof { get; }
    Property Value
    Type Description
    bool

    Length

    DataInput backed by a byte array. WARNING: this class omits all low-level checks.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    int

    Position

    DataInput backed by a byte array. WARNING: this class omits all low-level checks.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public int Position { get; set; }
    Property Value
    Type Description
    int

    Methods

    ReadByte()

    Reads and returns a single byte.

    Declaration
    public override byte ReadByte()
    Returns
    Type Description
    byte
    Overrides
    DataInput.ReadByte()
    See Also
    WriteByte(byte)

    ReadBytes(byte[], int, int)

    Reads a specified number of bytes into an array at the specified offset.

    Declaration
    public override void ReadBytes(byte[] b, int offset, int len)
    Parameters
    Type Name Description
    byte[] b

    the array to read bytes into

    int offset

    the offset in the array to start storing bytes

    int len

    the number of bytes to read

    Overrides
    DataInput.ReadBytes(byte[], int, int)
    See Also
    WriteBytes(byte[], int)

    ReadInt16()

    LUCENENET NOTE: Important - always cast to ushort (System.UInt16) before using to ensure the value is positive!

    NOTE: this was readShort() in Lucene
    Declaration
    public override short ReadInt16()
    Returns
    Type Description
    short
    Overrides
    DataInput.ReadInt16()

    ReadInt32()

    NOTE: this was readInt() in Lucene

    Declaration
    public override int ReadInt32()
    Returns
    Type Description
    int
    Overrides
    DataInput.ReadInt32()

    ReadInt64()

    NOTE: this was readLong() in Lucene

    Declaration
    public override long ReadInt64()
    Returns
    Type Description
    long
    Overrides
    DataInput.ReadInt64()

    ReadVInt32()

    NOTE: this was readVInt() in Lucene

    Declaration
    public override int ReadVInt32()
    Returns
    Type Description
    int
    Overrides
    DataInput.ReadVInt32()

    ReadVInt64()

    NOTE: this was readVLong() in Lucene

    Declaration
    public override long ReadVInt64()
    Returns
    Type Description
    long
    Overrides
    DataInput.ReadVInt64()

    Reset(byte[])

    DataInput backed by a byte array. WARNING: this class omits all low-level checks.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public void Reset(byte[] bytes)
    Parameters
    Type Name Description
    byte[] bytes

    Reset(byte[], int, int)

    DataInput backed by a byte array. WARNING: this class omits all low-level checks.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public void Reset(byte[] bytes, int offset, int len)
    Parameters
    Type Name Description
    byte[] bytes
    int offset
    int len

    Rewind()

    NOTE: sets pos to 0, which is not right if you had called reset w/ non-zero offset!!

    Declaration
    public void Rewind()

    SkipBytes(long)

    Skip over numBytes bytes. The contract on this method is that it should have the same behavior as reading the same number of bytes into a buffer and discarding its content. Negative values of numBytes are not supported.

    Declaration
    public override void SkipBytes(long count)
    Parameters
    Type Name Description
    long count
    Overrides
    DataInput.SkipBytes(long)
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.