view src/org/eclipse/jetty/http/HttpMethods.java @ 1027:6d17a257b03f

remove Buffer.asImmutableBuffer()
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 02 Nov 2016 23:58:37 -0600
parents f126d30e04a4
children
line wrap: on
line source

//
//  ========================================================================
//  Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
//  ------------------------------------------------------------------------
//  All rights reserved. This program and the accompanying materials
//  are made available under the terms of the Eclipse Public License v1.0
//  and Apache License v2.0 which accompanies this distribution.
//
//      The Eclipse Public License is available at
//      http://www.eclipse.org/legal/epl-v10.html
//
//      The Apache License v2.0 is available at
//      http://www.opensource.org/licenses/apache2.0.php
//
//  You may elect to redistribute this code under either of these licenses.
//  ========================================================================
//

package org.eclipse.jetty.http;

import org.eclipse.jetty.io.StringCache;


public final class HttpMethods
{
    public final static String GET= "GET",
        POST= "POST",
        HEAD= "HEAD",
        PUT= "PUT",
        OPTIONS= "OPTIONS",
        DELETE= "DELETE",
        TRACE= "TRACE",
        CONNECT= "CONNECT",
        MOVE= "MOVE";

    public final static int GET_ORDINAL= 1,
        POST_ORDINAL= 2,
        HEAD_ORDINAL= 3,
        PUT_ORDINAL= 4,
        OPTIONS_ORDINAL= 5,
        DELETE_ORDINAL= 6,
        TRACE_ORDINAL= 7,
        CONNECT_ORDINAL= 8,
        MOVE_ORDINAL= 9;

    public final static StringCache CACHE = new StringCache();

    public final static byte[] 
        GET_BYTES= CACHE.add(GET, GET_ORDINAL),
        POST_BYTES= CACHE.add(POST, POST_ORDINAL),
        HEAD_BYTES= CACHE.add(HEAD, HEAD_ORDINAL),
        PUT_BYTES= CACHE.add(PUT, PUT_ORDINAL),
        OPTIONS_BYTES= CACHE.add(OPTIONS, OPTIONS_ORDINAL),
        DELETE_BYTES= CACHE.add(DELETE, DELETE_ORDINAL),
        TRACE_BYTES= CACHE.add(TRACE, TRACE_ORDINAL),
        CONNECT_BYTES= CACHE.add(CONNECT, CONNECT_ORDINAL),
        MOVE_BYTES= CACHE.add(MOVE, MOVE_ORDINAL);

}