2022.2

Table Of Contents
Method Description
open(inStream,inEncoding) Createsareaderfromaninputstream.
Parameters:
l
inStream:theinputstreamtoread
l
inEncoding:theencodingtousewhenreadingthefile
open(inFileName,inEncoding) Createsareaderonthespecifiedfile.
Parameters:
l
inFilename:thepathofthefiletoread
l
inEncoding:theencodingtousewhenreadingthefile
parseCharset(inEncoding) Returnsacharacterset(Charset).Charactersetsareusedtoconvertabinarydatafileintoreadabletext.
Parameters:
l
inEncoding:theencodingtouse(e.g.ISO-8859-1,UTF-8)
read() Readsandreturnsthenextcharacter,or-1iftheendofthestreamhasbeenreached.
readLine() Readsandreturnsthenextline,ornulliftheendofthestreamhasbeenreached.
skip(offset) Skipsthespecifiednumberofcharacters.
Parameters:
l
offset:thenumberofcharacterstoskip
openTextWriter()
Thisfunctionopensafileasatextfileforwritingpurposes.Thefunctionreturnsa"TextWriter"onthe
facingpageobject.Thismustbeclosedattheend.
openTextWriter(filename, encoding, append)
filename
Stringthatrepresentsthenameofthefiletoopen.
encoding
Stringspecifyingtheencodingtouse(UTF-8,ISO-8859-1,etc.)..
append
Booleanparameterthatspecifieswhetherthefilepointershouldinitiallybepositionedattheendofthe
existingfile(appendmode)oratthebeginningofthefile(overwritemode).
Example
Inthefollowingexample,theopenTextWriter()functionisusedtoopenthenewlycreatedtem-
poraryfileforwriting:
Page 411