Show / Hide Table of Contents

    Class OfflineSorter.ByteSequencesReader

    Utility class to read length-prefixed byte[] entries from an input. Complementary to OfflineSorter.ByteSequencesWriter.

    Inheritance
    System.Object
    OfflineSorter.ByteSequencesReader
    Implements
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public class ByteSequencesReader : IDisposable

    Constructors

    | Improve this Doc View Source

    ByteSequencesReader(DataInput)

    Constructs a OfflineSorter.ByteSequencesReader from the provided DataInput.

    Declaration
    public ByteSequencesReader(DataInput inputStream)
    Parameters
    Type Name Description
    DataInput inputStream
    | Improve this Doc View Source

    ByteSequencesReader(FileInfo)

    Constructs a OfflineSorter.ByteSequencesReader from the provided System.IO.FileInfo.

    Declaration
    public ByteSequencesReader(FileInfo file)
    Parameters
    Type Name Description
    System.IO.FileInfo file

    Methods

    | Improve this Doc View Source

    Dispose()

    Disposes the provided DataInput if it is System.IDisposable.

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Read()

    Reads the next entry and returns it if successful.

    Declaration
    public virtual byte[] Read()
    Returns
    Type Description
    System.Byte[]

    Returns null if EOF occurred before the next entry could be read.

    Exceptions
    Type Condition
    System.IO.EndOfStreamException

    If the file ends before the full sequence is read.

    See Also
    Read(BytesRef)
    | Improve this Doc View Source

    Read(BytesRef)

    Reads the next entry into the provided BytesRef. The internal storage is resized if needed.

    Declaration
    public virtual bool Read(BytesRef ref)
    Parameters
    Type Name Description
    BytesRef ref
    Returns
    Type Description
    System.Boolean

    Returns false if EOF occurred when trying to read the header of the next sequence. Returns true otherwise.

    Exceptions
    Type Condition
    System.IO.EndOfStreamException

    If the file ends before the full sequence is read.

    Implements

    System.IDisposable

    Extension Methods

    Number.IsNumber(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Licensed to the Apache Software Foundation (ASF)