## org.apache.lucene.search.suggest.fst
Class Sort.ByteSequencesWriter

    java.lang.Object
      org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter

All Implemented Interfaces:
  Closeable

Enclosing class:
  Sort

    public static class Sort.ByteSequencesWriter

extends Object
implements Closeable

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

Constructor Summary
`Sort.ByteSequencesWriter(DataOutput os)`
`Sort.ByteSequencesWriter(File file)`

Method Summary
`void` `close()` Closes the provided `DataOutput` if it is `Closeable`.
`void` `write(byte[] bytes)`
`void` `write(byte[] bytes, int off, int len)`
`void` `write(BytesRef ref)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Sort.ByteSequencesWriter

    public Sort.ByteSequencesWriter(File file)
                             throws IOException

Throws:
  `IOException`

### Sort.ByteSequencesWriter

    public Sort.ByteSequencesWriter(DataOutput os)

Method Detail

### write

    public void write(BytesRef ref)
               throws IOException

  Throws:
    `IOException`

### write

    public void write(byte[] bytes)
               throws IOException

  Throws:
    `IOException`

### write

    public void write(byte[] bytes,
                      int off,
                      int len)
               throws IOException

  Throws:
    `IOException`

### close

    public void close()
               throws IOException

  Closes the provided `DataOutput` if it is `Closeable`.

  Specified by:
    `close` in interface `Closeable`
  Throws:
    `IOException`