Author: ggregory
Date: Mon Apr 16 13:28:49 2012
New Revision: 1326609

URL: http://svn.apache.org/viewvc?rev=1326609&view=rev
Log:
[IO-324] Add Charset sister APIs to method that take a String charset name.

Modified:
    commons/proper/io/trunk/src/changes/changes.xml
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java

Modified: commons/proper/io/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/io/trunk/src/changes/changes.xml?rev=1326609&r1=1326608&r2=1326609&view=diff
==============================================================================
--- commons/proper/io/trunk/src/changes/changes.xml (original)
+++ commons/proper/io/trunk/src/changes/changes.xml Mon Apr 16 13:28:49 2012
@@ -47,6 +47,9 @@ The <action> type attribute can be add,u
   <body>
     <!-- The release date is the date RC is cut -->
     <release version="2.4" date="2012-TDB-TDB" description="">
+      <action issue="IO-324" dev="ggregory" type="fix" due-to="raviprak">
+        Add missing Charset sister APIs to method that take a String charset 
name.
+      </action>            
       <action issue="IO-319" dev="ggregory" type="fix" due-to="raviprak">
         FileUtils.sizeOfDirectory follows symbolic links.
       </action>            

Modified: 
commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java
URL: 
http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java?rev=1326609&r1=1326608&r2=1326609&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java 
(original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java 
Mon Apr 16 13:28:49 2012
@@ -1821,6 +1821,23 @@ public class FileUtils {
      * @param encoding  the encoding to use, {@code null} means platform 
default
      * @throws IOException in case of an I/O error
      * @throws java.io.UnsupportedEncodingException if the encoding is not 
supported by the VM
+     * @since 2.4
+     */
+    public static void writeStringToFile(File file, String data, Charset 
encoding) throws IOException {
+        writeStringToFile(file, data, encoding, false);
+    }
+
+    /**
+     * Writes a String to a file creating the file if it does not exist.
+     *
+     * NOTE: As from v1.3, the parent directories of the file will be created
+     * if they do not exist.
+     *
+     * @param file  the file to write
+     * @param data  the content to write to the file
+     * @param encoding  the encoding to use, {@code null} means platform 
default
+     * @throws IOException in case of an I/O error
+     * @throws java.io.UnsupportedEncodingException if the encoding is not 
supported by the VM
      */
     public static void writeStringToFile(File file, String data, String 
encoding) throws IOException {
         writeStringToFile(file, data, encoding, false);


Reply via email to