Index: tmp/org.txm.utils/src/org/txm/utils/io/FileCopy.java
===================================================================
--- tmp/org.txm.utils/src/org/txm/utils/io/FileCopy.java	(revision 3163)
+++ tmp/org.txm.utils/src/org/txm/utils/io/FileCopy.java	(revision 3164)
@@ -55,6 +55,7 @@
 	 * @throws IOException
 	 */
 	public static boolean copy(File source, File dest) throws IOException {
+		
 		return copy(source, dest, true);
 	}
 
@@ -74,6 +75,7 @@
 	 *             Signals that an I/O exception has occurred.
 	 */
 	public static boolean copy(File source, File dest, boolean replace) throws IOException {
+		
 		if (dest.exists() && !replace)
 			return true; // don't replace file
 
@@ -159,6 +161,7 @@
 	 *             Signals that an I/O exception has occurred.
 	 */
 	public static void copyFiles(File src, File dest) throws IOException {
+		
 		copyFiles(src, dest, true);
 	}
 
Index: tmp/org.txm.utils/src/org/txm/utils/io/IOUtils.java
===================================================================
--- tmp/org.txm.utils/src/org/txm/utils/io/IOUtils.java	(revision 3163)
+++ tmp/org.txm.utils/src/org/txm/utils/io/IOUtils.java	(revision 3164)
@@ -16,6 +16,7 @@
 import java.io.UnsupportedEncodingException;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -31,14 +32,17 @@
 	public static final String UTF8 = "UTF-8"; //$NON-NLS-1$
 
 	public static ArrayList<String> findWithGroup(File file, String pattern) throws IOException {
+		
 		return findWithGroup(file, UTF8, pattern, false);
 	}
 
 	public static ArrayList<String> findWithGroup(File file, String pattern, boolean normalizeSeparators) throws IOException {
+		
 		return findWithGroup(file, UTF8, pattern, normalizeSeparators);
 	}
 
 	public static ArrayList<String> findWithGroup(File file, String encoding, String pattern) throws IOException {
+		
 		return findWithGroup(file, encoding, pattern, false);
 	}
 
@@ -57,6 +61,7 @@
 	 * @return a list containing the files not hidden
 	 */
 	public List<File> listFiles(File dir) {
+		
 		File[] files = dir.listFiles(HIDDENFILE_FILTER);
 		if (files == null)
 			return new ArrayList<File>();
@@ -65,6 +70,7 @@
 	}
 
 	public static ArrayList<String> findWithGroup(File file, String encoding, String pattern, boolean normalizeSeparators) throws IOException {
+		
 		ArrayList<String> matches = new ArrayList<String>();
 		String text = IOUtils.getText(file, encoding);
 		if (normalizeSeparators) {
@@ -83,18 +89,22 @@
 	}
 
 	public static ArrayList<String> find(File file, String pattern) throws IOException {
+		
 		return find(file, UTF8, pattern, false);
 	}
 
 	public static ArrayList<String> find(File file, String pattern, boolean normalizeSeparators) throws IOException {
+		
 		return findWithGroup(file, UTF8, pattern, normalizeSeparators);
 	}
 
 	public static ArrayList<String> find(File file, String encoding, String pattern) throws IOException {
+		
 		return find(file, encoding, pattern, false);
 	}
 
 	public static ArrayList<String> find(File file, String encoding, String pattern, boolean normalizeSeparators) throws IOException {
+		
 		ArrayList<String> matches = new ArrayList<String>();
 		String text = IOUtils.getText(file, encoding);
 		// System.out.println(text);
@@ -114,6 +124,7 @@
 	}
 
 	public static BufferedReader getReader(File file) throws UnsupportedEncodingException, FileNotFoundException {
+		
 		return getReader(file, UTF8);
 	}
 
@@ -127,40 +138,53 @@
 	 * @throws FileNotFoundException
 	 */
 	public static BufferedReader getReader(File file, String encoding) throws UnsupportedEncodingException, FileNotFoundException {
-		if (encoding == null)
-			encoding = "UTF-8"; // prevent null exception
-
+		
+		if (encoding == null) {
+			encoding = UTF8; // prevent null exception
+		}
+		
 		FileInputStream input = new FileInputStream(file);
 		DetectBOM db = new DetectBOM(file);
-		for (int ibom = 0; ibom < db.getBOMSize(); ibom++)
+		for (int ibom = 0; ibom < db.getBOMSize(); ibom++) {
 			try {
 				input.read();
 			} catch (IOException e) {
 				e.printStackTrace();
 			}
+		}
 		return new BufferedReader(new InputStreamReader(input, encoding));
 	}
 
 	public static BufferedReader getReader(String file) throws UnsupportedEncodingException, FileNotFoundException {
+		
 		return getReader(new File(file), UTF8);
 	}
 
 	public static BufferedReader getReader(URL url) throws IOException {
+
 		return getReader(url, UTF8);
 	}
 
 	public static BufferedReader getReader(URL url, String encoding) throws IOException {
-		InputStream inputStream = url.openConnection().getInputStream();
+
+		if (encoding == null) {
+			encoding = UTF8; // prevent null exception
+		}
+		
+		URLConnection conn = url.openConnection();
+		InputStream inputStream = conn.getInputStream();
 		return new BufferedReader(new InputStreamReader(inputStream, encoding));
 	}
 
 	public static void setText(File file, String text, String encoding) throws IOException {
+		
 		PrintWriter writer = getWriter(file, encoding);
 		writer.print(text);
 		writer.close();
 	}
 
 	public static String getText(URL url, String encoding) throws IOException {
+		
 		BufferedReader reader = getReader(url, encoding);
 		StringBuilder builder = new StringBuilder();
 		try {
@@ -178,10 +202,12 @@
 	}
 
 	public static String getText(File file) throws IOException {
+		
 		return getText(file, UTF8);
 	}
 
 	public static String getText(File file, String encoding) throws IOException {
+		
 		BufferedReader reader = getReader(file, encoding);
 		StringBuilder builder = new StringBuilder();
 		try {
@@ -199,26 +225,36 @@
 	}
 
 	public static PrintWriter getWriter(File file) throws UnsupportedEncodingException, FileNotFoundException {
+		
 		return getWriter(file, UTF8);
 	}
 
 	public static PrintWriter getWriter(File file, String encoding) throws UnsupportedEncodingException, FileNotFoundException {
+		
 		return getWriter(file, encoding, false);
 	}
 
 	public static PrintWriter getWriter(File file, boolean append) throws UnsupportedEncodingException, FileNotFoundException {
+		
 		return getWriter(file, UTF8, append);
 	}
 
 	public static PrintWriter getWriter(File file, String encoding, boolean append) throws UnsupportedEncodingException, FileNotFoundException {
+		
+		if (encoding == null) {
+			encoding = UTF8; // prevent null exception
+		}
+		
 		return new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(file, append)), encoding));
 	}
 
 	public static PrintWriter getWriter(String file) throws UnsupportedEncodingException, FileNotFoundException {
+		
 		return getWriter(new File(file), UTF8);
 	}
 
 	public static boolean write(File file, String str) {
+		
 		PrintWriter writer = null;
 		try {
 			writer = getWriter(file);
@@ -235,6 +271,7 @@
 	}
 
 	public static ArrayList<String> getLines(File file, String encoding) {
+		
 		ArrayList<String> lines = new ArrayList<String>();
 		try {
 			BufferedReader reader = IOUtils.getReader(file, encoding);
@@ -258,24 +295,29 @@
 	 * @throws IOException
 	 */
 	public static InputStream getInput(File file) throws MalformedURLException, IOException {
+		
 		return file.toURI().toURL().openStream();
 	}
 
 	public static OutputStream getOutputStream(File file) throws FileNotFoundException {
+		
 		return new BufferedOutputStream(new FileOutputStream(file, false));
 	}
 
 	public static OutputStream getOutputStream(File file, boolean append) throws FileNotFoundException {
+		
 		return new BufferedOutputStream(new FileOutputStream(file, append));
 	}
 
 	public static void replace(File file, String oldString, String newString) throws IOException {
+		
 		String text = getText(file, UTF8);
 		text = text.replace(oldString, newString);
 		IOUtils.write(file, text);
 	}
 
 	public static void replaceAll(File file, Pattern regex, String newString) throws IOException {
+		
 		String text = getText(file, UTF8);
 		text = regex.matcher(text).replaceAll(newString);
 		IOUtils.write(file, text);
