reference.language.read.html Maven / Gradle / Ivy
Read expressions
Read expressions
Read expressions are used to read content from a resource such as a file or a web site.
A read expression is a code fragment which produces a Text value, which can then be used as an input for other operations: print, write, method call and so forth.
Reading the entire content of an inlined resource
Reading the entire content of a resource can be achieved using an inlined resource.
An inlined resource is initialized directly within a read expression.
This is very useful for small files or small messages received from incoming network connections.
Reading content line by line from a managed resource
Reading content line by line from a resource can be achieved using a managed resource.
A managed resource is initialized through a with clause followed by a list of statements.
The resource is said to be managed because Prompto will take care of resource cleanup when it exits
the statements controlled by with clause.
It is illegal to call write or read on a resource which is neither managed nor inlined.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy