Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

import scala.collection.JavaConverters._
import scala.collection.JavaConverters._

BufferedSource

This object provides convenience methods to create an iterable representation of a source file. A BufferedSource object is iterable! Many of the collection methods apply to it.

val bs = scala.io.Source.fromFile("test.yaml")
non-empty iterator
bs.mkString
aa: - x - y bb: z

InputStream to BufferedSource

scala.io.Source.fromInputStream(is)