Class OfflineSorter.ByteSequencesWriter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected IndexOutput out  
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteSequencesWriter​(IndexOutput out)
      Constructs a ByteSequencesWriter to the provided DataOutput
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes the provided IndexOutput.
      void write​(byte[] bytes)
      Writes a byte array.
      void write​(byte[] bytes, int off, int len)
      Writes a byte array.
      void write​(BytesRef ref)
      Writes a BytesRef.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteSequencesWriter

        public ByteSequencesWriter​(IndexOutput out)
        Constructs a ByteSequencesWriter to the provided DataOutput
    • Method Detail

      • write

        public final void write​(BytesRef ref)
                         throws java.io.IOException
        Writes a BytesRef.
        Throws:
        java.io.IOException
        See Also:
        write(byte[], int, int)
      • write

        public final void write​(byte[] bytes)
                         throws java.io.IOException
        Writes a byte array.
        Throws:
        java.io.IOException
        See Also:
        write(byte[], int, int)
      • write

        public void write​(byte[] bytes,
                          int off,
                          int len)
                   throws java.io.IOException
        Writes a byte array.

        The length is written as a short, followed by the bytes.

        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Closes the provided IndexOutput.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException