Skip to content

Instantly share code, notes, and snippets.

@pushmon

pushmon/scala

Last active Aug 29, 2015
Embed
What would you like to do?
Scala
<#if filename>
scala_.txt
<#elseif title>
Scala
<#elseif logo>
//dmnv44fd3imdv.cloudfront.net/www.pushmon.com/img/code/java.gif
<#elseif code>
package com.teamextension.ping;
import java.net.URL
import java.io.File
object UrlPing {
def main(args: Array[String]) {
val urlString = "${urlstring}"
try {
val url = new URL(urlString)
val is = url.openStream
println(is.read)
is.close
} catch {
case e: Exception => e.printStackTrace
}
}
}
</#if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.