org.apache.lucene.util.automaton

## Class ByteRunAutomaton

- java.lang.Object
- - org.apache.lucene.util.automaton.RunAutomaton
  - - org.apache.lucene.util.automaton.ByteRunAutomaton

-     public class ByteRunAutomaton
      extends RunAutomaton

  Automaton representation for matching UTF-8 byte[].

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ByteRunAutomaton(Automaton a)` Converts incoming automaton to byte-based (UTF32ToUTF8) first
    `ByteRunAutomaton(Automaton a, boolean isBinary, int maxDeterminizedStates)` expert: if isBinary is true, the input is already byte-based

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `run(byte[] s, int offset, int length)` Returns true if the given byte array is accepted by this automaton

    - ### Methods inherited from class org.apache.lucene.util.automaton.RunAutomaton

      `equals, getCharIntervals, getSize, hashCode, isAccept, step, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ByteRunAutomaton

          public ByteRunAutomaton(Automaton a)

      Converts incoming automaton to byte-based (UTF32ToUTF8) first

    - #### ByteRunAutomaton

          public ByteRunAutomaton(Automaton a,
                                  boolean isBinary,
                                  int maxDeterminizedStates)

      expert: if isBinary is true, the input is already byte-based

  - ### Method Detail

    - #### run

          public boolean run(byte[] s,
                             int offset,
                             int length)

      Returns true if the given byte array is accepted by this automaton

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.