Fix 3 findbugs encoding warnings Vmdk descriptor files used by ESX should be UTF-8 encoded

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rafael da Fonseca 2015-06-14 12:09:01 +02:00 committed by Rohit Yadav
parent f5f93884d1
commit 333d0e2069
1 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ public class VmdkFileDescriptor {
public void parse(byte[] vmdkFileContent) throws IOException {
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(vmdkFileContent)));
in = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(vmdkFileContent),"UTF-8"));
String line;
while ((line = in.readLine()) != null) {
// ignore empty and comment lines
@ -93,8 +93,8 @@ public class VmdkFileDescriptor {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
in = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(vmdkContent)));
out = new BufferedWriter(new OutputStreamWriter(bos));
in = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(vmdkContent),"UTF-8"));
out = new BufferedWriter(new OutputStreamWriter(bos,"UTF-8"));
String line;
while ((line = in.readLine()) != null) {
// ignore empty and comment lines