Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/LineReader.java @ 590:8cbc2a883d95
Use requested encoding in LineReader
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 29 Apr 2013 17:04:51 +0200 |
parents | 9edfd5a223b8 |
children | 507602cb4fb3 |
comparison
equal
deleted
inserted
replaced
589:c18095eedde0 | 590:8cbc2a883d95 |
---|---|
104 // consumer.begin(file, paramObj); | 104 // consumer.begin(file, paramObj); |
105 Reader fileReader; | 105 Reader fileReader; |
106 if (encoding == null) { | 106 if (encoding == null) { |
107 fileReader = new FileReader(file); | 107 fileReader = new FileReader(file); |
108 } else { | 108 } else { |
109 fileReader = new InputStreamReader(new FileInputStream(file)); | 109 fileReader = new InputStreamReader(new FileInputStream(file), encoding); |
110 } | 110 } |
111 statusFileReader = new BufferedReader(fileReader); | 111 statusFileReader = new BufferedReader(fileReader); |
112 String line; | 112 String line; |
113 boolean ok = true; | 113 boolean ok = true; |
114 while (ok && (line = statusFileReader.readLine()) != null) { | 114 while (ok && (line = statusFileReader.readLine()) != null) { |