From 6ba99484b3f80a4c9f8956f0e7010257e741d9dc Mon Sep 17 00:00:00 2001 From: chiba Date: Fri, 2 Feb 2007 10:36:17 +0000 Subject: [PATCH] a minor bug fix git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@344 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/tools/web/Webserver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/javassist/tools/web/Webserver.java b/src/main/javassist/tools/web/Webserver.java index 769c88c5..79861d08 100644 --- a/src/main/javassist/tools/web/Webserver.java +++ b/src/main/javassist/tools/web/Webserver.java @@ -39,7 +39,6 @@ public class Webserver { protected Translator translator; private final static byte[] endofline = { 0x0d, 0x0a }; - private byte[] filebuffer = new byte[4096]; private final static int typeHtml = 1; private final static int typeClass = 2; @@ -273,6 +272,7 @@ public class Webserver { if (file.canRead()) { sendHeader(out, file.length(), fileType); FileInputStream fin = new FileInputStream(file); + byte[] filebuffer = new byte[4096]; for (;;) { len = fin.read(filebuffer); if (len <= 0) @@ -293,6 +293,7 @@ public class Webserver { = getClass().getResourceAsStream("/" + urlName); if (fin != null) { ByteArrayOutputStream barray = new ByteArrayOutputStream(); + byte[] filebuffer = new byte[4096]; for (;;) { len = fin.read(filebuffer); if (len <= 0) -- 2.39.5