示例#1
0
 /**
  * Write the entire contents of the supplied string to the given writer. This method always
  * flushes and closes the writer when finished.
  *
  * @param content the content to write to the writer; may be null
  * @param writer the writer to which the content is to be written
  * @throws IOException
  * @throws IllegalArgumentException if the writer is null
  */
 public static void write(String content, Writer writer) throws IOException {
   IoUtil.write(content, writer);
 }
示例#2
0
 /**
  * Write the entire contents of the supplied string to the given stream. This method always
  * flushes and closes the stream when finished.
  *
  * @param content the content to write to the stream; may be null
  * @param stream the stream to which the content is to be written
  * @throws IOException
  * @throws IllegalArgumentException if the stream is null
  */
 public static void write(String content, OutputStream stream) throws IOException {
   IoUtil.write(content, stream);
 }