code: public static <T> T withDataOutputStream(Path self, @ClosureParams(value = SimpleType.class, options = "java.io.DataOutputStream") Closure<T> closure) throws IOException {
          return IOGroovyMethods.withStream(newDataOutputStream(self), closure);
      }
docs: Create a new DataOutputStream for this file and passes it into the closure.
  This method ensures the stream is closed after the closure returns.
  
  @param self    a Path
  @param closure a closure
  @return the value returned by the closure
  @throws java.io.IOException if an IOException occurs.
  @see org.codehaus.groovy.runtime.IOGroovyMethods#withStream(java.io.OutputStream, groovy.lang.Closure)
  @since 2.3.0