Package 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 SummaryModifier and TypeMethodDescriptioncharcharAt(int index) Returns thebytevalue at the specified index.intgetECIValue(int index) Returns theintECI value at the specified index.booleanhaveNCharacters(int index, int n) booleanisECI(int index) Determines if a value is an ECIintlength()Returns the length of this input.subSequence(int start, int end) Returns aCharSequencethat is a subsequence of this sequence.
- 
Method Details- 
lengthint length()Returns the length of this input. The length is the number ofbytes in or ECIs in the sequence.- Returns:
- the number of chars in this sequence
 
- 
charAtchar charAt(int index) Returns thebytevalue at the specified index. An index ranges from zero tolength() - 1. The firstbytevalue 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- bytevalue to be returned
- Returns:
- the specified bytevalue as character or the FNC1 character
- Throws:
- IndexOutOfBoundsException- if the- indexargument is negative or not less than- length()
- IllegalArgumentException- if the value at the- indexargument is an ECI (@see #isECI)
 
- 
subSequenceReturns aCharSequencethat is a subsequence of this sequence. The subsequence starts with thecharvalue at the specified index and ends with thecharvalue at indexend - 1. The length (inchars) of the returned sequence isend - start, so ifstart == endthen an empty sequence is returned.- Parameters:
- start- the start index, inclusive
- end- the end index, exclusive
- Returns:
- the specified subsequence
- Throws:
- IndexOutOfBoundsException- if- startor- endare negative, if- endis greater than- length(), or if- startis greater than- end
- IllegalArgumentException- if a value in the range- start-- endis an ECI (@see #isECI)
 
- 
isECIboolean isECI(int index) Determines if a value is an ECI- Parameters:
- index- the index of the value
- Returns:
- true if the value at position indexis an ECI
- Throws:
- IndexOutOfBoundsException- if the- indexargument is negative or not less than- length()
 
- 
getECIValueint getECIValue(int index) Returns theintECI value at the specified index. An index ranges from zero tolength() - 1. The firstbytevalue 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- intvalue to be returned
- Returns:
- the specified intECI 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- indexargument is negative or not less than- length()
- IllegalArgumentException- if the value at the- indexargument is not an ECI (@see #isECI)
 
- 
haveNCharactersboolean haveNCharacters(int index, int n) 
 
-