src/org/kocakosm/pitaya/io/XFiles.java
public static void cp(InputStream src, File dst) throws IOException
	{
		OutputStream out = newOutputStream(dst);
		try {
			ByteStreams.copy(src, out);
		} finally {
			IO.close(out);
		}
	}
public static void cp(InputStream src, File dst) throws IOException
	{
		OutputStream out = newOutputStream(dst);
		try {
			ByteStreams.copy(src, out);
		} finally {
			IO.close(out);
		}
	}
Copies the contents of the given {@code InputStream} to the given
output {@code File}. Named after the Unix command of the same name.

@param src the stream to read from.
@param dst the file to write to.

@throws NullPointerException if one of the arguments is {@code null}.
@throws IOException if {@code dst} exists but is a directory rather
than a regular file, or if it does not exist but cannot be
created, or if an I/O error occurs during the process.
@throws SecurityException if a security manager exists denies write
access to {@code dst}.