Subversion Repository Public Repository

litesoft

Diff Revisions 151 vs 804 for /trunk/Java/core/Server/src/org/litesoft/util/FileUtil.java

Diff revisions: vs.
  @@ -3,6 +3,8 @@
3 3
4 4 import java.io.*;
5 5
6 + import org.litesoft.core.typeutils.*;
7 +
6 8 public class FileUtil
7 9 {
8 10 public static final String UTF_8 = "UTF-8";
  @@ -10,14 +12,14 @@
10 12 public static BufferedWriter createWriter( File pFile, boolean pAppend )
11 13 throws IOException
12 14 {
13 - Utils.assertNotNull( "File", pFile );
15 + Objects.assertNotNull( "File", pFile );
14 16 return new BufferedWriter( new OutputStreamWriter( new FileOutputStream( DirectoryUtils.insureParentDirectory( pFile ), pAppend ), UTF_8 ) );
15 17 }
16 18
17 19 public static BufferedReader createReader( File pFile )
18 20 throws IOException
19 21 {
20 - Utils.assertNotNull( "File", pFile );
22 + Objects.assertNotNull( "File", pFile );
21 23 return new BufferedReader( new InputStreamReader( new FileInputStream( pFile ), UTF_8 ) );
22 24 }
23 25 }