ECIInput (ZXing 3.5.0 API)

com.google.zxing.common

## Interface ECIInput

- All Known Implementing Classes:
    MinimalECIInput

      public interface ECIInput

  Interface to navigate a sequence of ECIs and bytes.
  Author:
    Alex Geller

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `char` | `charAt(int index)` Returns the `byte` value at the specified index.
    `int` | `getECIValue(int index)` Returns the `int` ECI value at the specified index.
    `boolean` | `haveNCharacters(int index, int n)`
    `boolean` | `isECI(int index)` Determines if a value is an ECI
    `int` | `length()` Returns the length of this input.
    `CharSequence` | `subSequence(int start, int end)` Returns a `CharSequence` that is a subsequence of this sequence.

- - ### Method Detail

    - #### length

          int length()

      Returns the length of this input. The length is the number of `byte`s in or ECIs in the sequence.
      Returns:
        the number of `char`s in this sequence

    - #### charAt

          char charAt(int index)

      Returns the `byte` value at the specified index. An index ranges from zero to `length() - 1`. The first `byte` value of the sequence is at index zero, the next at index one, and so on, as for array indexing.
      Parameters:
        `index` - the index of the `byte` value to be returned
      Returns:
        the specified `byte` value as character or the FNC1 character
      Throws:
        `IndexOutOfBoundsException` - if the `index` argument is negative or not less than `length()`
        `IllegalArgumentException` - if the value at the `index` argument is an ECI (@see #isECI)

    - #### subSequence

          CharSequence subSequence(int start,
                                   int end)

      Returns a `CharSequence` that is a subsequence of this sequence. The subsequence starts with the `char` value at the specified index and ends with the `char` value at index `end - 1`. The length (in `char`s) of the returned sequence is `end - start`, so if `start == end` then an empty sequence is returned.
      Parameters:
        `start` - the start index, inclusive
        `end` - the end index, exclusive
      Returns:
        the specified subsequence
      Throws:
        `IndexOutOfBoundsException` - if `start` or `end` are negative, if `end` is greater than `length()`, or if `start` is greater than `end`
        `IllegalArgumentException` - if a value in the range `start`-`end` is an ECI (@see #isECI)

    - #### isECI

          boolean isECI(int index)

      Determines if a value is an ECI
      Parameters:
        `index` - the index of the value
      Returns:
        true if the value at position `index` is an ECI
      Throws:
        `IndexOutOfBoundsException` - if the `index` argument is negative or not less than `length()`

    - #### getECIValue

          int getECIValue(int index)

      Returns the `int` ECI value at the specified index. An index ranges from zero to `length() - 1`. The first `byte` value of the sequence is at index zero, the next at index one, and so on, as for array indexing.
      Parameters:
        `index` - the index of the `int` value to be returned
      Returns:
        the specified `int` ECI value. The ECI specified the encoding of all bytes with a higher index until the next ECI or until the end of the input if no other ECI follows.
      Throws:
        `IndexOutOfBoundsException` - if the `index` argument is negative or not less than `length()`
        `IllegalArgumentException` - if the value at the `index` argument is not an ECI (@see #isECI)

    - #### haveNCharacters

          boolean haveNCharacters(int index,
                                  int n)

Copyright © 2007–2022. All rights reserved.