org.eclipse.jetty.io.Buffer.hasContent()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中org.eclipse.jetty.io.Buffer.hasContent()方法的一些代码示例,展示了Buffer.hasContent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.hasContent()方法的具体详情如下:
包路径:org.eclipse.jetty.io.Buffer
类名称:Buffer
方法名:hasContent

Buffer.hasContent介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

public boolean isMoreInBuffer()
throws IOException
{
  return ( _header!=null && _header.hasContent() ||
     _body!=null && _body.hasContent());
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

public boolean isMoreInBuffer()
throws IOException
{
  return ( _header!=null && _header.hasContent() ||
     _body!=null && _body.hasContent());
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

public boolean isMoreInBuffer()
throws IOException
{
  return ( _header!=null && _header.hasContent() ||
     _body!=null && _body.hasContent());
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

public boolean isMoreInBuffer()
{
  if (_header != null && _header.hasContent() || _body != null && _body.hasContent())
    return true;
  return false;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

public boolean isMoreInBuffer()
throws IOException
{
  return ( _header!=null && _header.hasContent() ||
     _body!=null && _body.hasContent());
}

代码示例来源:origin: org.eclipse.jetty/http

public boolean isMoreInBuffer()
throws IOException
{
  return ( _header!=null && _header.hasContent() ||
     _body!=null && _body.hasContent());
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException
{
  if (header!=null && header.hasContent())
    return flush(header);
  if (buffer!=null && buffer.hasContent())
    return flush(buffer);
  if (trailer!=null && trailer.hasContent())
    return flush(trailer);
  return 0;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException
{
  if (header!=null && header.hasContent())
    return flush(header);
  if (buffer!=null && buffer.hasContent())
    return flush(buffer);
  if (trailer!=null && trailer.hasContent())
    return flush(trailer);
  return 0;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException
{
  if (header!=null && header.hasContent())
    return flush(header);
  if (buffer!=null && buffer.hasContent())
    return flush(buffer);
  if (trailer!=null && trailer.hasContent())
    return flush(trailer);
  return 0;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException
{
  if (header!=null && header.hasContent())
    return flush(header);
  if (buffer!=null && buffer.hasContent())
    return flush(buffer);
  if (trailer!=null && trailer.hasContent())
    return flush(trailer);
  return 0;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

@Override
public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException
{
  int l = super.flush(header, buffer, trailer);
  // If there was something to write and it wasn't written, then we are not writable.
  if (l==0 && ( header!=null && header.hasContent() || buffer!=null && buffer.hasContent() || trailer!=null && trailer.hasContent()))
  {
    synchronized (this)
    {   
      _writable=false;
      if (_state<STATE_DISPATCHED)
        updateKey();
    }
  }
  else if (l>0)
  {
    _writable=true;
    notIdle();
  }
  return l;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

public void returnBuffers()
{
  if (_body!=null && !_body.hasContent() && _body.markIndex()==-1 && _buffers!=null)
  {
    if (_buffer==_body)
      _buffer=_header;
    if (_buffers!=null)
      _buffers.returnBuffer(_body);
    _body=null;
  }
  if (_header!=null && !_header.hasContent() && _header.markIndex()==-1 && _buffers!=null)
  {
    if (_buffer==_header)
      _buffer=null;
    _buffers.returnBuffer(_header);
    _header=null;
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

public void returnBuffers()
{
  if (_body!=null && !_body.hasContent() && _body.markIndex()==-1 && _buffers!=null)
  {
    if (_buffer==_body)
      _buffer=_header;
    if (_buffers!=null)
      _buffers.returnBuffer(_body);
    _body=null;
  }
  if (_header!=null && !_header.hasContent() && _header.markIndex()==-1 && _buffers!=null)
  {
    if (_buffer==_header)
      _buffer=null;
    _buffers.returnBuffer(_header);
    _header=null;
  }
}

代码示例来源:origin: org.eclipse.jetty/http

public void returnBuffers()
{
  if (_body!=null && !_body.hasContent() && _body.markIndex()==-1 && _buffers!=null)
  {
    if (_buffer==_body)
      _buffer=_header;
    if (_buffers!=null)
      _buffers.returnBuffer(_body);
    _body=null;
  }
  if (_header!=null && !_header.hasContent() && _header.markIndex()==-1 && _buffers!=null)
  {
    if (_buffer==_header)
      _buffer=null;
    _buffers.returnBuffer(_header);
    _header=null;
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

public void returnBuffers()
{
  if (_body!=null && !_body.hasContent() && _body.markIndex()==-1 && _buffers!=null)
  {
    if (_buffer==_body)
      _buffer=_header;
    if (_buffers!=null)
      _buffers.returnBuffer(_body);
    _body=null;
  }
  if (_header!=null && !_header.hasContent() && _header.markIndex()==-1 && _buffers!=null)
  {
    if (_buffer==_header)
      _buffer=null;
    _buffers.returnBuffer(_header);
    _header=null;
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

public void returnBuffers()
{
  if (_body!=null && !_body.hasContent() && _body.markIndex()==-1)
  {   
    if (_buffer==_body)
      _buffer=_header;
    if (_buffers!=null)
      _buffers.returnBuffer(_body);
    _body=null; 
  }
  if (_header!=null && !_header.hasContent() && _header.markIndex()==-1)
  {
    if (_buffer==_header)
      _buffer=null;
    _buffers.returnBuffer(_header);
    _header=null;
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

public void returnBuffers()
{
  if (_body!=null && !_body.hasContent() && _body.markIndex()==-1 && _buffers!=null)
  {
    if (_buffer==_body)
      _buffer=_header;
    if (_buffers!=null)
      _buffers.returnBuffer(_body);
    _body=null;
  }
  if (_header!=null && !_header.hasContent() && _header.markIndex()==-1 && _buffers!=null)
  {
    if (_buffer==_header)
      _buffer=null;
    _buffers.returnBuffer(_header);
    _header=null;
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

private synchronized int flushBuffer() throws IOException
{
  if (!_endp.isOpen())
    throw new EofException();
  if (_buffer!=null && _buffer.hasContent())
    return _endp.flush(_buffer);
  return 0;
}

代码示例来源:origin: org.eclipse.jetty/jetty-websocket

private synchronized int flushBuffer() throws IOException
{
  if (!_endp.isOpen())
    throw new EofException();
  if (_buffer!=null && _buffer.hasContent())
    return _endp.flush(_buffer);
  return 0;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

private synchronized int flushBuffer() throws IOException
{
  if (!_endp.isOpen())
    throw new EofException();
  if (_buffer!=null && _buffer.hasContent())
    return _endp.flush(_buffer);
  return 0;
}

相关文章