Class Swift_CharacterReader_GenericFixedWidthReader

InheritanceSwift_CharacterReader_GenericFixedWidthReader
ImplementsSwift_CharacterReader

Provides fixed-width byte sizes for reading fixed-width character sets.

Public Methods

Hide inherited methods

MethodDescriptionDefined 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

__construct() public method

Creates a new GenericFixedWidthReader using $width bytes per character.

public void __construct ( $width )
$width int
getCharPositions() public method

Returns the complete character map.

public int getCharPositions ( $string, $startOffset, <b>&</b>$currentMap, <b>&</b>$ignoredChars )
$string string
$startOffset int
$currentMap array
$ignoredChars mixed
getInitialByteSize() public method

Returns the number of bytes which should be read to start each character.

public int getInitialByteSize ( )
getMapType() public method

Returns the mapType.

public int getMapType ( )
validateByteSequence() public method

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