summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2007-02-02 10:36:17 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2007-02-02 10:36:17 +0000
commit6ba99484b3f80a4c9f8956f0e7010257e741d9dc (patch)
treec653230cdf137787113c648594bd0a8b9a8652df
parent57dcd65cab1449ee755c3e40007a66a23e1febfe (diff)
downloadjavassist-6ba99484b3f80a4c9f8956f0e7010257e741d9dc.tar.gz
javassist-6ba99484b3f80a4c9f8956f0e7010257e741d9dc.zip
a minor bug fix
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@344 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r--src/main/javassist/tools/web/Webserver.java3
1 files changed, 2 insertions, 1 deletions
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)