Class: ioNashorn

ioNashorn

new ioNashorn()

Implements:
Source:

Methods

exit(exitCodeopt)

Attempts to exit the entire process with the provided exit code if the platform supports doing so. Callers should also ensure that all functions exit appropriately if the platform does not support this feature.
Parameters:
Name Type Attributes Description
exitCode number <optional>
The exit code to use.
Implements:
Source:

read_all_input(optionsopt) → {string|void}

Reads input from the specified file or from standard input. If chunkCallback and/or endCallback are specified, the operation is asynchronous, and the function returns nothing. Otherwise, the operation is synchronous, and the function returns a string with the contents read from the file or from standard input.
Parameters:
Name Type Attributes Description
options string | function | ioOptions <optional>
If a string, the filename to read. If an object, has optional filename, chunkCallback, and endCallback properties. If a function, the callback function to execute for each chunk read from standard input.
Implements:
Source:
Returns:
When running synchronously, the text read from the file or standard input. When running asynchronously, returns nothing.
Type
string | void

read_template(optionsopt) → {string|void}

Reads the template file into which the parser code is inserted. If not specified, uses the default driver specified in jscc.global.DEFAULT_DRIVER.
Parameters:
Name Type Attributes Description
options string | function | ioOptions <optional>
If a string, specifies the template filename. If a function, specifies the callback function to be used when reading a file chunk has completed. If an object, specifies either or both. If omitted, causes the function to read jscc.global.DEFAULT_DRIVER synchronously.
Implements:
Source:
Returns:
When running synchronously, returns the contents of the template file as a string. When running asynchronously, returns nothing.
Type
string | void

write_debug(text)

Writes the provided text to a debugging output, provided that such an output exists in the implementation of this interface.
Parameters:
Name Type Description
text string The text to write to the debugging output.
Implements:
Source:

write_output(options)

Writes the provided text to the specified file or to standard output.
Parameters:
Name Type Description
options string | ioWriteOutputOptions When a string, the text to be written to standard output. When an object, contains text, destination, and callback properties.
Implements:
Source: