Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.42 KB

BinaryReader.new.md

File metadata and controls

30 lines (24 loc) · 1.42 KB

new BinaryReader

The constructor function is established to create a BinaryReader object.

Sample

//The content of the test.txt file is 
//"123456789012345678901111122222333334444499999777777777722222"
var binaryReader = new BinaryReader("input/test.txt", [5,10,5], ["MS932","MS932","MS932"], 20); 

API

CallingReturning
new binaryReader (path, aryFieldsDef, aryEncoding, rowSize)binaryReader
new binaryReader (path, regFieldsDef, aryEncoding, rowSize, skipRows)binaryReader
new binaryReader (path, regFieldsDef, aryEncoding, rowSize, skipRows, rowsToRead)binaryReader
ParametersTypeDescription
pathStringThe relative file or folder path to the storage.
aryFieldsDefArrayAn array that defines all field length.
aryEncodingArrayAn array that defines all field charset names.
rowSizeNumberThe binary size of a record.
skipRowsNumberThe count of rows to be skipped without reading. The default value is -1 means undefined.
rowsToReadNumberThe count of rows to be read. The default value is -1 means undefined.