Révision 1563

tmp/org.txm.utils/src/org/txm/utils/io/IOUtils.java (revision 1563)
124 124
			} catch (IOException e) {
125 125
				e.printStackTrace();
126 126
			}
127
		return new BufferedReader(new InputStreamReader(input , UTF8));
127
		return new BufferedReader(new InputStreamReader(input , encoding));
128 128
	}
129 129

  
130 130
	public static BufferedReader getReader(String file) throws UnsupportedEncodingException, FileNotFoundException {
......
137 137

  
138 138
	public static BufferedReader getReader(URL url, String encoding) throws IOException {
139 139
		InputStream inputStream = url.openConnection().getInputStream();
140
		return new BufferedReader(new InputStreamReader(inputStream , UTF8));
140
		return new BufferedReader(new InputStreamReader(inputStream , encoding));
141 141
	}
142 142

  
143 143
	public static void setText(File file, String text, String encoding) throws IOException {
......
191 191
	}
192 192

  
193 193
	public static PrintWriter getWriter(File file, String encoding, boolean append) throws UnsupportedEncodingException, FileNotFoundException {
194
		return new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(file, append)) , UTF8));
194
		return new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(file, append)) , encoding));
195 195
	}
196 196

  
197 197
	public static PrintWriter getWriter(String file) throws UnsupportedEncodingException, FileNotFoundException {

Formats disponibles : Unified diff