code: public static void main( String[] args) throws Exception {
  		ReadableByteChannel in = Channels.newChannel( System.in);
  		new Scanner().run( new ReadableChannelWrapper( in));
  		FileOutputStream fout = new FileOutputStream( args[ 0]);
  		FileChannel out = fout.getChannel();
  		
  		long position = 0;
  		long read;
  		while (( read = out.transferFrom( in, position, 1024)) > 0) position += read;
  		fout.close();
  	}
docs: Dumps the contents of the payload for an RPM file to
  the provided file.  This method accepts an RPM file from
  standard input and dumps it's payload out to the file
  name provided as the first argument.
  @param args command line arguements
  @throws Exception an exception occurred