Interface Swift_CharacterReader
| Implemented by | Swift_CharacterReader_GenericFixedWidthReader, Swift_CharacterReader_UsAsciiReader, Swift_CharacterReader_Utf8Reader |
|---|
Analyzes characters for a specific character set.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getCharPositions() | Returns the complete character map. | Swift_CharacterReader |
| getInitialByteSize() | Returns the number of bytes which should be read to start each character. | Swift_CharacterReader |
| getMapType() | Returns the mapType, see constants. | Swift_CharacterReader |
| validateByteSequence() | Returns an integer which specifies how many more bytes to read. | Swift_CharacterReader |
Method Details
Returns the complete character map.
| public abstract int getCharPositions ( $string, $startOffset, <b>&</b>$currentMap, <b>&</b>$ignoredChars ) | ||
| $string | string | |
| $startOffset | int | |
| $currentMap | array | |
| $ignoredChars | mixed | |
Returns the number of bytes which should be read to start each character.
For fixed width character sets this should be the number of octets-per-character. For multibyte character sets this will probably be 1.
| public abstract int getInitialByteSize ( ) |
Returns the mapType, see constants.
| public abstract int getMapType ( ) |
Returns an integer which specifies how many more bytes to read.
A positive integer indicates the number of more bytes to fetch before invoking this method again.
A value of zero means this is already a valid character. A value of -1 means this cannot possibly be a valid character.
| public abstract int validateByteSequence ( $bytes, $size ) | ||
| $bytes | integer[] | |
| $size | int | |