public static void eachByte ( URL url , @ ClosureParams ( value = SimpleType . class , options = "byte" ) Closure closure ) throws IOException { InputStream is = url . openConnection ( ) . getInputStream ( ) ; IOGroovyMethods . eachByte ( is , closure ) ; }
Reads the InputStream from this URL passing each byte to the given closure . The URL stream will be closed before this method returns .