comparison src/org/eclipse/jetty/http/HttpVersions.java @ 1019:f126d30e04a4

start replacing BufferCache with StringCache
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 31 Oct 2016 03:33:42 -0600
parents 3428c60d7cfc
children
comparison
equal deleted inserted replaced
1018:4dc1e1a18661 1019:f126d30e04a4
16 // ======================================================================== 16 // ========================================================================
17 // 17 //
18 18
19 package org.eclipse.jetty.http; 19 package org.eclipse.jetty.http;
20 20
21 import org.eclipse.jetty.io.Buffer; 21 import org.eclipse.jetty.io.StringCache;
22 import org.eclipse.jetty.io.BufferCache;
23 22
24 /* ------------------------------------------------------------------------------- */ 23
25 /** 24 public final class HttpVersions
26 *
27 *
28 */
29 public class HttpVersions
30 { 25 {
31 public final static String 26 public final static String
32 HTTP_0_9 = "", 27 HTTP_0_9 = "",
33 HTTP_1_0 = "HTTP/1.0", 28 HTTP_1_0 = "HTTP/1.0",
34 HTTP_1_1 = "HTTP/1.1"; 29 HTTP_1_1 = "HTTP/1.1";
36 public final static int 31 public final static int
37 HTTP_0_9_ORDINAL=9, 32 HTTP_0_9_ORDINAL=9,
38 HTTP_1_0_ORDINAL=10, 33 HTTP_1_0_ORDINAL=10,
39 HTTP_1_1_ORDINAL=11; 34 HTTP_1_1_ORDINAL=11;
40 35
41 public final static BufferCache CACHE = new BufferCache(); 36 public final static StringCache CACHE = new StringCache();
42 37
43 public final static Buffer 38 public final static byte[]
44 HTTP_0_9_BUFFER=CACHE.add(HTTP_0_9,HTTP_0_9_ORDINAL), 39 HTTP_0_9_BYTES=CACHE.add(HTTP_0_9,HTTP_0_9_ORDINAL),
45 HTTP_1_0_BUFFER=CACHE.add(HTTP_1_0,HTTP_1_0_ORDINAL), 40 HTTP_1_0_BYTES=CACHE.add(HTTP_1_0,HTTP_1_0_ORDINAL),
46 HTTP_1_1_BUFFER=CACHE.add(HTTP_1_1,HTTP_1_1_ORDINAL); 41 HTTP_1_1_BYTES=CACHE.add(HTTP_1_1,HTTP_1_1_ORDINAL);
47 } 42 }