code: public static void string2Writer(String source, Writer out) throws IOException {
  
  		char[] buffer = source.toCharArray();
  		for (int i = 0; i < buffer.length; i++) {
  			out.append(buffer[i]);
  		}
  		out.flush();
  	}
docs: String 2 writer.
  
  @param source the source
  @param out the out
  @throws IOException Signals that an I/O exception has occurred.