Skip to content

Commit

Permalink
remove Java 1.6 dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
darkv committed Jan 15, 2014
1 parent 5324810 commit cb6669b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public static void stringToGZippedFile(String s, File f) throws IOException {
if (s == null) throw new NullPointerException("string argument cannot be null");
if (f == null) throw new NullPointerException("file argument cannot be null");

byte[] bytes = s.getBytes(charset());
byte[] bytes = s.getBytes(charset().name());
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
writeInputStreamToGZippedFile(bais, f);
}
Expand Down Expand Up @@ -536,7 +536,7 @@ public static void remoteCopyFile(String srcHost, String srcPath, File dstFile)
* @throws IOException if things go wrong
*/
public static String stringFromGZippedFile(File f) throws IOException {
return new String(bytesFromGZippedFile(f), charset());
return new String(bytesFromGZippedFile(f), charset().name());
}

/**
Expand All @@ -547,7 +547,7 @@ public static String stringFromGZippedFile(File f) throws IOException {
* @throws IOException if things go wrong
*/
public static String stringFromFile(File f) throws IOException {
return new String(bytesFromFile(f), charset());
return new String(bytesFromFile(f), charset().name());
}

/**
Expand All @@ -560,7 +560,7 @@ public static String stringFromFile(File f) throws IOException {
*/
public static String stringFromFile(File f, String encoding) throws IOException {
if (encoding == null) {
return new String(bytesFromFile(f), charset());
return new String(bytesFromFile(f), charset().name());
}
return new String(bytesFromFile(f), encoding);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,8 @@ public File file() {
return reportFile;
}



@Override
public Double percentComplete() {
// TODO Auto-generated method stub
return null;
}



}

0 comments on commit cb6669b

Please sign in to comment.