mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Catch OutOfMemoryError when writing
This commit is contained in:
@@ -52,9 +52,13 @@ public class Util {
|
||||
public static void copyStream(InputStream in, OutputStream out) throws IOException {
|
||||
byte[] buf = new byte[1024];
|
||||
int read;
|
||||
while ((read = in.read(buf)) != -1) {
|
||||
out.write(buf, 0, read);
|
||||
}
|
||||
try {
|
||||
while ((read = in.read(buf)) != -1) {
|
||||
out.write(buf, 0, read);
|
||||
}
|
||||
} catch (OutOfMemoryError error) {
|
||||
throw new IOException(error);
|
||||
}
|
||||
}
|
||||
|
||||
private final static String stringToStrikeThrough = "0";
|
||||
|
||||
Reference in New Issue
Block a user