Buffer.put
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.mortbay.io.Buffer.put(Showing top 15 results out of 315)

  • Common ways to obtain Buffer
private void myMethod () {
Buffer b =
  • MimeTypes mimeTypes;mimeTypes.getMimeByExtension(filename)
  • Smart code suggestions by Codota
}
origin: org.mortbay.jetty/jetty

public static void putCRLF(Buffer buffer)
{
  buffer.put((byte)13);
  buffer.put((byte)10);
}

origin: org.mortbay.jetty/jetty

public int fill(Buffer buffer) throws IOException
{
  if (_closed)
    throw new IOException("CLOSED");
  if (_in==null)
    return -1;
  if (_in.length()<=0)
    return _nonBlocking?0:-1;
  int len = buffer.put(_in);
  _in.skip(len);
  return len;
}
origin: org.mortbay.jetty/jetty

/**
 * @param contentBufferSize The contentBufferSize to set.
 */
public void increaseContentBufferSize(int contentBufferSize)
{
  if (contentBufferSize > _contentBufferSize)
  {
    _contentBufferSize = contentBufferSize;
    if (_buffer != null)
    {
      Buffer nb = _buffers.getBuffer(_contentBufferSize);
      nb.put(_buffer);
      _buffers.returnBuffer(_buffer);
      _buffer = nb;
    }
  }
}

origin: org.mortbay.jetty/jetty

_buffer.put(b);
origin: org.mortbay.jetty/jetty

  buffer.put(_name);
else
        continue;
      default:
        buffer.put(b);
buffer.put((byte) ':');
buffer.put((byte) ' ');
  buffer.put(_value);
else
        continue;
      default:
        buffer.put(b);
origin: org.mortbay.jetty/jetty

_header.compact();
_body.skip(_header.put(_body));
origin: org.mortbay.jetty/jetty

int len=_buffer.put(_content);
_content.skip(len);
if (_content.length() == 0) 
origin: org.mortbay.jetty/jetty

void uncheckedAddContent(int b)
{
  _buffer.put((byte)b);
}
origin: org.mortbay.jetty/jetty

int len = _buffer.put(_content);
_content.skip(len);
if (_content.length() == 0) 
      _header.put(HttpTokens.CRLF);
      _needCRLF = false;
    _header.put(HttpTokens.CRLF);
    _buffer.put(HttpTokens.CRLF);
  else
    _needCRLF = true;
      _header.put(HttpTokens.CRLF);
      _needCRLF = false;
      _buffer.put(HttpTokens.CRLF);
      _needCRLF = false;
        _header.put(LAST_CHUNK);
        _bufferChunked=true;
        _buffer.put(LAST_CHUNK);
        _bufferChunked=true;
origin: org.mortbay.jetty/jetty

  _buffer.put(HttpTokens.CRLF);
if (_needEOC && _buffer!=null && !_head) 
  _buffer.put(LAST_CHUNK);
_needCRLF=false;
_needEOC=false;
          _buffer.put(_content);
          _content.clear();
          _content = null;
origin: org.mortbay.jetty/jetty

buffer.put((byte)'-');
  buffer.put((byte)(0x7f&'8'));
  buffer.put((byte)(0x7f&'0'));
  buffer.put((byte)(0x7f&'0'));
  buffer.put((byte)(0x7f&'0'));
  buffer.put((byte)(0x7f&'0'));
  buffer.put((byte)(0x7f&'0'));
  buffer.put((byte)(0x7f&'0'));
  buffer.put((byte)(0x7f&'0'));
buffer.put(DIGIT[n]);
      buffer.put((byte)'0');
    continue;
  buffer.put(DIGIT[d]);
  n= n - d * hexDivisors[i];
origin: org.mortbay.jetty/jetty

_header.put(_method);
_header.put((byte)' ');
_header.put(_uri.getBytes("utf-8")); // TODO WRONG!
_header.put(HttpTokens.CRLF);
_state = STATE_FLUSHING;
_noContent=true;
_header.put(_method);
_header.put((byte)' ');
_header.put(_uri.getBytes("utf-8")); // TODO WRONG!
_header.put((byte)' ');
_header.put(_version==HttpVersions.HTTP_1_0_ORDINAL?HttpVersions.HTTP_1_0_BUFFER:HttpVersions.HTTP_1_1_BUFFER);
_header.put(HttpTokens.CRLF);
  _header.put(HttpVersions.HTTP_1_1_BUFFER);
  _header.put((byte) ' ');
  _header.put((byte) ('0' + _status / 100));
  _header.put((byte) ('0' + (_status % 100) / 10));
  _header.put((byte) ('0' + (_status % 10)));
  _header.put((byte) ' ');
  if (_reason==null)
    _header.put((byte) ('0' + _status / 100));
    _header.put((byte) ('0' + (_status % 100) / 10));
    _header.put((byte) ('0' + (_status % 10)));
    _header.put(_reason);
  _header.put(HttpTokens.CRLF);
origin: org.mortbay.jetty/jetty

/**
 * @param status The status code to send.
 * @param reason the status message to send.
 */
public void setResponse(int status, String reason)
{
  if (_state != STATE_HEADER) throw new IllegalStateException("STATE!=START");
  _method=null;
  _status = status;
  if (reason!=null)
  {
    int len=reason.length();
    if (len>_headerBufferSize/2)
      len=_headerBufferSize/2;
    _reason=new ByteArrayBuffer(len);
    for (int i=0;i<len;i++)
    {
      char ch = reason.charAt(i);
      if (ch!='\r'&&ch!='\n')
        _reason.put((byte)ch);
      else
        _reason.put((byte)' ');
    }
  }
}
origin: org.mortbay.jetty/jetty

buffer.put((byte)'-');
  buffer.put((byte)'9');
  n= 223372036854775808L;
buffer.put(DIGIT[(int)n]);
      buffer.put((byte)'0');
    continue;
  buffer.put(DIGIT[(int)d]);
  n= n - d * decDivisors[i];
origin: org.mortbay.jetty/jetty

buffer.put((byte)'-');
  buffer.put((byte)'2');
  n= 147483648;
buffer.put(DIGIT[n]);
      buffer.put((byte)'0');
    continue;
  buffer.put(DIGIT[d]);
  n= n - d * decDivisors[i];
org.mortbay.ioBufferput

Javadoc

Put a byte to the current getIndex and increment the getIndex.

Popular methods of Buffer

  • capacity
    The capacity of the buffer. This is the maximum putIndex that may be set.
  • clear
    Clear the buffer. getIndex=0, putIndex=0.
  • length
    The number of bytes from the getIndex to the putIndex
  • setPutIndex
  • array
    Get the underlying array, if one exists.
  • getIndex
    The index within the buffer that will next be read or written.
  • putIndex
    The index of the first element that should not be read.
  • skip
    Skip _content. The getIndex is updated by min(remaining(), n)
  • buffer
    Get the unerlying buffer. If this buffer wraps a backing buffer.
  • hasContent
  • compact
    Compact the buffer by discarding bytes before the postion (or mark if set). Bytes from the getIndex
  • equalsIgnoreCase
  • compact,
  • equalsIgnoreCase,
  • get,
  • isImmutable,
  • markIndex,
  • peek,
  • poke,
  • setGetIndex,
  • setMarkIndex

Popular classes and methods

  • findViewById (Activity)
  • runOnUiThread (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Connection (java.sql)
    A connection (session) with a specific database. SQL statements are executed and results are returne
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)