You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Process bz = new ProcessBuilder(new String[] { "bunzip2" }).start();
110
-
// // Start separate thread so we can consume output while sending input
111
-
// new Thread(() -> {
112
-
// try {
113
-
// bz.getOutputStream().write(bzIn);
114
-
// bz.getOutputStream().close();
115
-
// } catch (IOException ex) {
116
-
// ex.printStackTrace();
117
-
// }
118
-
// }).start();
119
-
120
-
// bzOut = bz.getInputStream().readAllBytes();
121
-
// bz.getInputStream().close();
122
-
// String bzError = new String(bz.getErrorStream().readAllBytes());
123
-
// bz.getErrorStream().close();
124
-
// System.err.println(bzError);
125
-
// if (bzError.toString().contains("bunzip2: Data integrity error when decompressing") || bzError.contains("bunzip2: Compressed file ends unexpectedly")) {
126
-
// // Corrupted replay, don't retry
127
-
// t.sendResponseHeaders(204, 0);
128
-
// t.getResponseBody().close();
129
-
// return;
130
-
// }
105
+
// BZip2CompressorInputStream bz = new BZip2CompressorInputStream(new ByteArrayInputStream(bzIn));
if (bzError.toString().contains("bunzip2: Data integrity error when decompressing") || bzError.contains("bunzip2: Compressed file ends unexpectedly")) {
0 commit comments