All Downloads are FREE. Search and download functionalities are using the official Maven repository.

vectorpipe.util.Resource.scala Maven / Gradle / Ivy

The newest version!
package vectorpipe.util

import java.io.InputStream

object Resource {
  def apply(name: String): String = {
    val stream: InputStream = getClass.getResourceAsStream(s"/$name")
    try {
      scala.io.Source.fromInputStream(stream).getLines.mkString(" ")
    } finally {
      stream.close()
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy