Subversion Repository Public Repository

litesoft

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

Diff revisions: vs.
  @@ -1,24 +1,21 @@
1 1 // This Source Code is in the Public Domain per: http://unlicense.org
2 2 package org.litesoft.util;
3 3
4 - import java.io.*;
5 -
6 4 import org.litesoft.commonfoundation.typeutils.*;
7 5
8 - public class FileUtil
9 - {
6 + import java.io.*;
7 +
8 + public class FileUtil {
10 9 public static final String UTF_8 = "UTF-8";
11 10
12 11 public static BufferedWriter createWriter( File pFile, boolean pAppend )
13 - throws IOException
14 - {
12 + throws IOException {
15 13 Objects.assertNotNull( "File", pFile );
16 14 return new BufferedWriter( new OutputStreamWriter( new FileOutputStream( Directories.insureParent( pFile ), pAppend ), UTF_8 ) );
17 15 }
18 16
19 17 public static BufferedReader createReader( File pFile )
20 - throws IOException
21 - {
18 + throws IOException {
22 19 Objects.assertNotNull( "File", pFile );
23 20 return new BufferedReader( new InputStreamReader( new FileInputStream( pFile ), UTF_8 ) );
24 21 }