blob: cfa47b0e48fa81f09b210841d92d78a62656e487 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
import scala.io.Source
import java.io.ByteArrayInputStream
object Test extends dotty.runtime.LegacyApp {
val txt = "abcdef"
val in = new ByteArrayInputStream(txt.getBytes());
val source = Source.fromInputStream(in);
println(source.toString) // forces the BufferedSource to look at the head of the input
println(source.mkString) // used to return "bcdef" ...
}
|