Ignore:
Timestamp:
07/18/11 10:56:36 (13 years ago)
Author:
luiz-fernando
Message:

Ticket #1771 - Refactoring, criadas novas classes para Pasta, Filtro, Pesquisa

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/common/IOUtil.java

    r4344 r4780  
    11package org.expressolivre.cte.common; 
    22 
     3import java.io.BufferedWriter; 
    34import java.io.File; 
    45import java.io.FileReader; 
     6import java.io.FileWriter; 
    57import java.io.IOException; 
    68import java.io.InputStream; 
     
    1618 */ 
    1719public class IOUtil { 
     20 
     21        /** 
     22         * Open and write contents to a file. 
     23         *  
     24         * @param fileName 
     25         *            the name of the file. 
     26         * @param contents 
     27         *            contents to be written. 
     28         * @param append 
     29         *            if <code>true</code> contents will be appended to previous 
     30         *            contents of the file. If <code>false</code> a brand new file 
     31         *            is created to write the contents. 
     32         * @throws IOException 
     33         *             Thrown whenever a problem in the underlying file system 
     34         *             happens. 
     35         */ 
     36        public static void writeFile(String fileName, String contents, 
     37                        Boolean append) throws IOException { 
     38                BufferedWriter out = new BufferedWriter( 
     39                                new FileWriter(fileName, append)); 
     40                out.write(contents); 
     41                out.close(); 
     42        } 
    1843 
    1944        /** 
Note: See TracChangeset for help on using the changeset viewer.