2017-08-21 file contents to string in scala Scala Source.fromFileとか使う val fileContents = Source.fromFile(filename).getLines.mkString