Class Swift_CharacterReader_GenericFixedWidthReader
Inheritance | Swift_CharacterReader_GenericFixedWidthReader |
---|---|
Implements | Swift_CharacterReader |
Provides fixed-width byte sizes for reading fixed-width character sets.
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Creates a new GenericFixedWidthReader using $width bytes per character. | Swift_CharacterReader_GenericFixedWidthReader |
getCharPositions() | Returns the complete character map. | Swift_CharacterReader_GenericFixedWidthReader |
getInitialByteSize() | Returns the number of bytes which should be read to start each character. | Swift_CharacterReader_GenericFixedWidthReader |
getMapType() | Returns the mapType. | Swift_CharacterReader_GenericFixedWidthReader |
validateByteSequence() | Returns an integer which specifies how many more bytes to read. | Swift_CharacterReader_GenericFixedWidthReader |
Method Details
Creates a new GenericFixedWidthReader using $width bytes per character.
public void __construct ( $width ) | ||
$width | int |
Returns the complete character map.
public 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.
public int getInitialByteSize ( ) |
Returns the mapType.
public 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 int validateByteSequence ( $bytes, $size ) | ||
$bytes | string | |
$size | int |