Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

JScript TextStream Object

The TextStream object facilitates sequential access to file.

Methods: JScript TextStream Object

JScript TextStream Object TextStream Close Method

Closes an open TextStream file.

JScript TextStream Object TextStream Read Method

Reads a specified number of characters.

JScript TextStream Object ReadAll Method

Reads an entire TextStream.

JScript TextStream Object ReadLine Method

Reads an entire line.

JScript TextStream Object Skip Method

Skips a specified number of characters.

JScript TextStream Object SkipLine Method

Skips the next line.

JScript TextStream Object Write Method

Writes a specified string.

JScript TextStream Object WriteBlankLines Method

Writes a specified number of newline characters.

JScript TextStream Object WriteLine Method

Writes a specified string and newline character.

Properties: JScript TextStream Object

JScript TextStream Object AtEndOfLine Property

True if the file pointer is before the end-of-line marker.

JScript TextStream Object AtEndOfStream Property

True if the file pointer is at the end of a file.

JScript TextStream Object Column Property

The column number of the current character position.

JScript TextStream Object Line Property

The current line number.

Syntax: JScript TextStream Object

TextStream.{property | method( )}

Arguments: JScript TextStream Object

The property and method arguments can be any of the properties and methods associated with the TextStream object.

Note

In actual usage, TextStream is replaced by a variable placeholder representing the TextStream object returned from the FileSystemObject.

Remarks: JScript TextStream Object

In the following code, a is the TextStream object returned by the CreateTextFile method on the FileSystemObject:

var fs = new ActiveXObject("Scripting.FileSystemObject")

var a = fs.CreateTextFile("c:\\testfile.txt", true)

a.WriteLine("This is a test.")

a.Close

WriteLine and Close are two methods of the TextStream object.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.