Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class OfflineSorter.ByteSequencesWriter

    Utility class to emit length-prefixed byte[] entries to an output stream for sorting. Complementary to OfflineSorter.ByteSequencesReader.

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

    Constructors

    ByteSequencesWriter(BinaryWriter)

    Constructs a OfflineSorter.ByteSequencesWriter to the provided BinaryWriter. NOTE: To match Lucene, pass the writer's constructor the DEFAULT_ENCODING, which is UTF-8 without a byte order mark.

    Declaration
    public ByteSequencesWriter(BinaryWriter writer)
    Parameters
    Type Name Description
    BinaryWriter writer
    Exceptions
    Type Condition
    ArgumentNullException

    writer is null.

    ByteSequencesWriter(FileInfo)

    Constructs a OfflineSorter.ByteSequencesWriter to the provided FileInfo.

    Declaration
    public ByteSequencesWriter(FileInfo file)
    Parameters
    Type Name Description
    FileInfo file
    Exceptions
    Type Condition
    ArgumentNullException

    file is null.

    ByteSequencesWriter(FileStream)

    Constructs a OfflineSorter.ByteSequencesWriter to the provided FileStream.

    Declaration
    public ByteSequencesWriter(FileStream stream)
    Parameters
    Type Name Description
    FileStream stream
    Exceptions
    Type Condition
    ArgumentNullException

    stream is null.

    ByteSequencesWriter(FileStream, bool)

    Constructs a OfflineSorter.ByteSequencesWriter to the provided FileStream.

    Declaration
    public ByteSequencesWriter(FileStream stream, bool leaveOpen)
    Parameters
    Type Name Description
    FileStream stream
    bool leaveOpen
    Exceptions
    Type Condition
    ArgumentNullException

    stream is null.

    ByteSequencesWriter(string)

    Constructs a OfflineSorter.ByteSequencesWriter to the provided file path.

    Declaration
    public ByteSequencesWriter(string path)
    Parameters
    Type Name Description
    string path
    Exceptions
    Type Condition
    ArgumentNullException

    path is null.

    Methods

    Dispose()

    Disposes the provided DataOutput if it is IDisposable.

    Declaration
    public void Dispose()

    Dispose(bool)

    Disposes the provided DataOutput if it is IDisposable.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Write(BytesRef)

    Writes a BytesRef.

    Declaration
    public virtual void Write(BytesRef @ref)
    Parameters
    Type Name Description
    BytesRef ref
    Exceptions
    Type Condition
    ArgumentNullException

    ref is null.

    See Also
    Write(byte[], int, int)

    Write(byte[])

    Writes a byte array.

    Declaration
    public virtual void Write(byte[] bytes)
    Parameters
    Type Name Description
    byte[] bytes
    Exceptions
    Type Condition
    ArgumentNullException

    bytes is null.

    See Also
    Write(byte[], int, int)

    Write(byte[], int, int)

    Writes a byte array.

    The length is written as a short, followed by the bytes.
    Declaration
    public virtual void Write(byte[] bytes, int off, int len)
    Parameters
    Type Name Description
    byte[] bytes
    int off
    int len
    Exceptions
    Type Condition
    ArgumentNullException

    bytes is null.

    ArgumentOutOfRangeException

    off or len is less than 0.

    ArgumentException

    off and len refer to a position outside of the array.

    Implements

    IDisposable
    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.