Package org.eclipse.jetty.io.BufferCache

Examples of org.eclipse.jetty.io.BufferCache.CachedBuffer


    {
      for (Entry<String, List<String>> entry : headerMap.entrySet())
      {
        String s = entry.getKey();
       
        CachedBuffer name = SipHeaders.getCachedName(s);
        HeaderInfo hi = SipHeaders.getType(name);
        int ordinal = hi.getOrdinal();
       
        if (hi.isSystem())
        {
View Full Code Here


 
  public static Buffer getCompact(Buffer buffer)
  {
    if (buffer instanceof CachedBuffer)
    {
      CachedBuffer cachedBuffer = (CachedBuffer) buffer;
   
      Buffer compact = COMPACT_CACHE.get(cachedBuffer.getOrdinal());
      if (compact != null)
        return compact;
    }
    return buffer;
  }
View Full Code Here

    return buffer;
  }
 
  public static CachedBuffer getCachedName(String s)
  {
    CachedBuffer name = null;
   
    if (s.length() == 1)
      name = getCompact(s.charAt(0));
   
    if (name == null)
View Full Code Here

    return SipMethods.UPDATE.equalsIgnoreCase(getMethod());
  }
 
  protected boolean isSystemHeader(String name)
  {
    CachedBuffer buffer = SipHeaders.CACHE.get(name);
    if (buffer == null)
      return false;
   
    SipHeaders.HeaderInfo type = SipHeaders.__types[buffer.getOrdinal()];
    return (type.isSystem() ||
        (buffer.getOrdinal() == SipHeaders.CONTACT_ORDINAL && !canSetContact()));
  }
View Full Code Here

  }
 
 
  public void setParameter(String name, String value)
  { 
    CachedBuffer buffer = CACHE.get(name);
    if (buffer == null)
    {
      if (_unknwonParams == null)
        _unknwonParams = new HashMap<String, String>();
      _unknwonParams.put(name, value);
    }
    else
      _params[buffer.getOrdinal()] = value;
  }
View Full Code Here

    }
  }
 
  public String getParameter(String name)
  {
    CachedBuffer buffer = CACHE.get(name);
    if (buffer == null)
    {
      if (_unknwonParams == null)
        return null;
      return _unknwonParams.get(name);
    }
    return _params[buffer.getOrdinal()];
  }
View Full Code Here

    return _params[buffer.getOrdinal()];
  }
 
  public void setParameter(String name, String value)
  { 
    CachedBuffer buffer = CACHE.get(name);
    if (buffer == null)
    {
      if (_unknwonParams == null)
        _unknwonParams = new HashMap<String, String>();
      _unknwonParams.put(name, value);
    }
    else
      _params[buffer.getOrdinal()] = value;
  }
View Full Code Here

        if (connection!=null)
        {
            String[] values = connection.split(",");
            for  (int i=0;values!=null && i<values.length;i++)
            {
                CachedBuffer cb = HttpHeaderValues.CACHE.get(values[0].trim());

                if (cb!=null)
                {
                    switch(cb.getOrdinal())
                    {
                        case HttpHeaderValues.CLOSE_ORDINAL:
                            response_fields.put(HttpHeaders.CONNECTION_BUFFER,HttpHeaderValues.CLOSE_BUFFER);
                            break;
View Full Code Here

                    default:
                        String[] values = value.toString().split(",");
                        for  (int i=0;values!=null && i<values.length;i++)
                        {
                            CachedBuffer cb=HttpHeaderValues.CACHE.get(values[i].trim());
                            if (cb==null)
                                _expect=true;
                            else
                            {
                                switch(cb.getOrdinal())
                                {
                                    case HttpHeaderValues.CONTINUE_ORDINAL:
                                        _expect100Continue=_generator instanceof HttpGenerator;
                                        break;
                                    case HttpHeaderValues.PROCESSING_ORDINAL:
View Full Code Here

                        _responseFields.add(HttpHeaders.CONTENT_TYPE_BUFFER, contentType);
                    else
                    {
                        if(contentType instanceof CachedBuffer)
                        {
                            CachedBuffer content_type = ((CachedBuffer)contentType).getAssociate(enc);
                            if(content_type!=null)
                                _responseFields.put(HttpHeaders.CONTENT_TYPE_BUFFER, content_type);
                            else
                            {
                                _responseFields.put(HttpHeaders.CONTENT_TYPE_BUFFER,
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.io.BufferCache.CachedBuffer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.