Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TextStreamReader

Hierarchy

Index

Properties

AtEndOfLine

AtEndOfLine: boolean

Indicates whether the stream pointer position is at the end of a line.

AtEndOfStream

AtEndOfStream: boolean

Indicates whether the stream pointer position is at the end of a stream.

Column

Column: number

The column number of the current character position in an input stream.

Line

Line: number

The current line number in an input stream.

Methods

Close

  • Close(): void
  • Closes a text stream. It is not necessary to close standard streams; they close automatically when the process ends. If you close a standard stream, be aware that any other pointers to that standard stream become invalid.

    Returns void

Read

  • Read(characters: number): string
  • Returns a specified number of characters from an input stream, starting at the current pointer position. Does not return until the ENTER key is pressed. Can only be used on a stream in reading mode; causes an error in writing or appending mode.

    Parameters

    • characters: number

    Returns string

ReadAll

  • ReadAll(): string
  • Returns all characters from an input stream. Can only be used on a stream in reading mode; causes an error in writing or appending mode.

    Returns string

ReadLine

  • ReadLine(): string
  • Returns an entire line from an input stream. Although this method extracts the newline character, it does not add it to the returned string. Can only be used on a stream in reading mode; causes an error in writing or appending mode.

    Returns string

Skip

  • Skip(characters: number): void
  • Skips a specified number of characters when reading from an input text stream. Can only be used on a stream in reading mode; causes an error in writing or appending mode.

    Parameters

    • characters: number

      Positive number of characters to skip forward. (Backward skipping is not supported.)

    Returns void

SkipLine

  • SkipLine(): void
  • Skips the next line when reading from an input text stream. Can only be used on a stream in reading mode, not writing or appending mode.

    Returns void

Generated using TypeDoc