Commit 6d16dddf authored by Syretta Man's avatar Syretta Man

modified pdf 6

parent 873d10f1
Pipeline #112987 passed with stages
in 51 seconds
......@@ -100,19 +100,19 @@ public class WebServer {
// String[] cm = {"pandoc", "-s", "-o", "sample.pdf", "answer.md"};
// pb.command(cm);
pb.start();
//
// try (InputStream in = new FileInputStream("answer.pdf");
// OutputStream out = resp.getOutputStream()) {
//
// byte[] buffer = new byte[1048];
//
// int numBytesRead;
// while ((numBytesRead = in.read(buffer)) > 0) {
// out.write(buffer, 0, numBytesRead);
// }
// }
//
// file.delete();
try (InputStream in = new FileInputStream("answer.pdf");
OutputStream out = resp.getOutputStream()) {
byte[] buffer = new byte[1048];
int numBytesRead;
while ((numBytesRead = in.read(buffer)) > 0) {
out.write(buffer, 0, numBytesRead);
}
}
file.delete();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment