From 972b8ddd2a412281ff97a10b63579bf4868fde34 Mon Sep 17 00:00:00 2001 From: theli Date: Mon, 5 Dec 2005 09:18:47 +0000 Subject: [PATCH] *) minor changes: using constants properly git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1162 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/httpChunkedInputStream.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/de/anomic/http/httpChunkedInputStream.java b/source/de/anomic/http/httpChunkedInputStream.java index b669aa37f..e8bb30ab9 100644 --- a/source/de/anomic/http/httpChunkedInputStream.java +++ b/source/de/anomic/http/httpChunkedInputStream.java @@ -57,7 +57,7 @@ import de.anomic.server.serverByteBuffer; */ public final class httpChunkedInputStream extends InputStream { - //private static final int READ_CHUNK_STATE_NORMAL = 0; + private static final int READ_CHUNK_STATE_NORMAL = 0; private static final int READ_CHUNK_STATE_CR_READ = 1; private static final int READ_CHUNK_STATE_IN_EXT_CHUNK = 2; private static final int READ_CHUNK_STATE_FINISHED = -1; @@ -174,13 +174,13 @@ public final class httpChunkedInputStream extends InputStream { throws IOException { serverByteBuffer baos = new serverByteBuffer(); - int state = 0; + int state = READ_CHUNK_STATE_NORMAL; while (state != READ_CHUNK_STATE_FINISHED) { int b = in.read(); if (b == -1) throw new IOException("Malformed chunk. Unexpected end"); switch (state) { - case 0: + case READ_CHUNK_STATE_NORMAL: // 0 switch (b) { case CR: state = READ_CHUNK_STATE_CR_READ; @@ -195,7 +195,7 @@ public final class httpChunkedInputStream extends InputStream { } break; - case 1: + case READ_CHUNK_STATE_CR_READ: // 1 if (b == LF) { state = READ_CHUNK_STATE_FINISHED; } else { @@ -204,7 +204,7 @@ public final class httpChunkedInputStream extends InputStream { } break; - case 2: + case READ_CHUNK_STATE_IN_EXT_CHUNK: // 2 switch (b) { case CR: state = READ_CHUNK_STATE_CR_READ;