From 59f6b58cd07164e1f3a4b2f698ee8a16e5cfef23 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Tue, 5 May 2009 16:38:41 +0000 Subject: [PATCH] Fixed a compilation error. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17761 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/util/ChunkedOutputStream.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/hudson/util/ChunkedOutputStream.java b/core/src/main/java/hudson/util/ChunkedOutputStream.java index 2503be2b11..49a04bddde 100644 --- a/core/src/main/java/hudson/util/ChunkedOutputStream.java +++ b/core/src/main/java/hudson/util/ChunkedOutputStream.java @@ -33,8 +33,6 @@ package hudson.util; import java.io.IOException; import java.io.OutputStream; -import org.apache.commons.httpclient.util.EncodingUtil; - /** * Implements HTTP chunking support. Writes are buffered to an internal buffer (2048 default size). * Chunks are guaranteed to be at least as large as the buffer size (except for the last chunk). @@ -94,8 +92,7 @@ public class ChunkedOutputStream extends OutputStream { */ protected void flushCache() throws IOException { if (cachePosition > 0) { - byte chunkHeader[] = EncodingUtil.getAsciiBytes( - Integer.toHexString(cachePosition) + "\r\n"); + byte chunkHeader[] = (Integer.toHexString(cachePosition) + "\r\n").getBytes("US-ASCII"); stream.write(chunkHeader, 0, chunkHeader.length); stream.write(cache, 0, cachePosition); stream.write(ENDCHUNK, 0, ENDCHUNK.length); @@ -114,8 +111,7 @@ public class ChunkedOutputStream extends OutputStream { * @since 3.0 */ protected void flushCacheWithAppend(byte bufferToAppend[], int off, int len) throws IOException { - byte chunkHeader[] = EncodingUtil.getAsciiBytes( - Integer.toHexString(cachePosition + len) + "\r\n"); + byte chunkHeader[] = (Integer.toHexString(cachePosition + len) + "\r\n").getBytes("US-ASCII"); stream.write(chunkHeader, 0, chunkHeader.length); stream.write(cache, 0, cachePosition); stream.write(bufferToAppend, off, len);