#676: extended logging for text import, imorpt logic moved to separated class, allow to ignore errors duting import

This commit is contained in:
honfika@gmail.com
2014-11-23 22:54:19 +01:00
parent abb3ec9dc7
commit 1cf0c28c74
61 changed files with 573 additions and 472 deletions

View File

@@ -412,8 +412,7 @@ public class Helper {
return ret;
}
public static ByteArrayInputStream getInputStream(byte[]
... data) {
public static ByteArrayInputStream getInputStream(byte[]... data) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
@@ -480,8 +479,7 @@ public class Helper {
}
}
public static void writeFile(String file, byte[]
... data) {
public static void writeFile(String file, byte[]... data) {
try (FileOutputStream fos = new FileOutputStream(file)) {
for (byte[] d : data) {
fos.write(d);
@@ -874,7 +872,7 @@ public class Helper {
}
return ret;
}
public static String byteCountStr(long bytes, boolean si) {
int unit = si ? 1000 : 1024;
if (bytes < unit) {
@@ -885,5 +883,4 @@ public class Helper {
return String.format("%.1f %sB", bytes / Math.pow(unit, exp), pre);
}
}