handling of Missing byte-order mark exception

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2842 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent ac13fa763a
commit 2d3f1a53fd

@ -175,9 +175,14 @@ public final class serverFileUtils {
char[] buffer = new char[4096];
int count = 0;
int n = 0;
while (-1 != (n = source.read(buffer))) {
dest.write(buffer, 0, n);
count += n;
try {
while (-1 != (n = source.read(buffer))) {
dest.write(buffer, 0, n);
count += n;
}
} catch (Exception e) {
// an "sun.io.MalformedInputException: Missing byte-order mark" - exception may occur here
throw new IOException(e.getMessage());
}
return count;
}

Loading…
Cancel
Save