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

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

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

Buffer.markIndex介绍

[英]The current index of the mark.
[中]标记的当前索引。

代码示例

代码示例来源: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

public View(Buffer buffer)
{
  super(READWRITE,!buffer.isImmutable());
  _buffer=buffer.buffer();
  setPutIndex(buffer.putIndex());
  setGetIndex(buffer.getIndex());
  setMarkIndex(buffer.markIndex());
  _access=buffer.isReadOnly()?READONLY:READWRITE;
}

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

public View(Buffer buffer)
{
  super(READWRITE,!buffer.isImmutable());
  _buffer=buffer.buffer();
  setPutIndex(buffer.putIndex());
  setGetIndex(buffer.getIndex());
  setMarkIndex(buffer.markIndex());
  _access=buffer.isReadOnly()?READONLY:READWRITE;
}

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

public View(Buffer buffer)
{
  super(READWRITE,!buffer.isImmutable());
  _buffer=buffer.buffer();
  setPutIndex(buffer.putIndex());
  setGetIndex(buffer.getIndex());
  setMarkIndex(buffer.markIndex());
  _access=buffer.isReadOnly()?READONLY:READWRITE;
}

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

public View(Buffer buffer)
{
  super(READWRITE,!buffer.isImmutable());
  _buffer=buffer.buffer();
  setPutIndex(buffer.putIndex());
  setGetIndex(buffer.getIndex());
  setMarkIndex(buffer.markIndex());
  _access=buffer.isReadOnly()?READONLY:READWRITE;
}

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

/**
 * Update view to buffer
 */
public void update(Buffer buffer)
{
  _access=READWRITE;
  _buffer=buffer.buffer();
  setGetIndex(0);
  setPutIndex(buffer.putIndex());
  setGetIndex(buffer.getIndex());
  setMarkIndex(buffer.markIndex());
  _access=buffer.isReadOnly()?READONLY:READWRITE;
}

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

/**
 * Update view to buffer
 */
public void update(Buffer buffer)
{
  _access=READWRITE;
  _buffer=buffer.buffer();
  setGetIndex(0);
  setPutIndex(buffer.putIndex());
  setGetIndex(buffer.getIndex());
  setMarkIndex(buffer.markIndex());
  _access=buffer.isReadOnly()?READONLY:READWRITE;
}

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

/**
 * Update view to buffer
 */
public void update(Buffer buffer)
{
  _access=READWRITE;
  _buffer=buffer.buffer();
  setGetIndex(0);
  setPutIndex(buffer.putIndex());
  setGetIndex(buffer.getIndex());
  setMarkIndex(buffer.markIndex());
  _access=buffer.isReadOnly()?READONLY:READWRITE;
}

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

/**
 * Update view to buffer
 */
public void update(Buffer buffer)
{
  _access=READWRITE;
  _buffer=buffer.buffer();
  setGetIndex(0);
  setPutIndex(buffer.putIndex());
  setGetIndex(buffer.getIndex());
  setMarkIndex(buffer.markIndex());
  _access=buffer.isReadOnly()?READONLY:READWRITE;
}

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

if (_buffer.markIndex() == 0 && _buffer.putIndex() == _buffer.capacity())
  throw new IOException("FULL");
if (_endp != null && filled <= 0)

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

_tok0.update(_buffer.markIndex(), _buffer.getIndex() - 1);
_responseStatus=HttpVersions.CACHE.get(_tok0)==null?-1:0;
_state=STATE_SPACE1;
_tok1.update(_buffer.markIndex(), _buffer.getIndex() - 1);
_state=STATE_SPACE2;
continue;
_tok1.update(_buffer.markIndex(), _buffer.getIndex() - 1);
_state=STATE_SPACE2;
continue;
      _cached=HttpHeaders.CACHE.getBest(array, _buffer.markIndex(), length+1);
        _buffer.setGetIndex(_buffer.markIndex()+_length);
        length=_buffer.length();
case HttpTokens.LINE_FEED:
  if (_length > 0)
    _tok0.update(_buffer.markIndex(), _buffer.markIndex() + _length);
  _eol=ch;
  _state=STATE_HEADER;
case HttpTokens.COLON:
  if (_length > 0 && _cached==null)
    _tok0.update(_buffer.markIndex(), _buffer.markIndex() + _length);
  _length=-1;
  _state=STATE_HEADER_VALUE;

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

_tok0.update(_buffer.markIndex(), _buffer.getIndex() - 1);
_responseStatus=HttpVersions.CACHE.get(_tok0)==null?-1:0;
_state=STATE_SPACE1;
_tok1.update(_buffer.markIndex(), _buffer.getIndex() - 1);
_state=STATE_SPACE2;
continue;
_tok1.update(_buffer.markIndex(), _buffer.getIndex() - 1);
_state=STATE_SPACE2;
continue;
      _cached=HttpHeaders.CACHE.getBest(array, _buffer.markIndex(), length+1);
        _buffer.setGetIndex(_buffer.markIndex()+_length);
        length=_buffer.length();
case HttpTokens.LINE_FEED:
  if (_length > 0)
    _tok0.update(_buffer.markIndex(), _buffer.markIndex() + _length);
  _eol=ch;
  _state=STATE_HEADER;
case HttpTokens.COLON:
  if (_length > 0 && _cached==null)
    _tok0.update(_buffer.markIndex(), _buffer.markIndex() + _length);
  _length=-1;
  _state=STATE_HEADER_VALUE;

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

int l=_buffer.getIndex()-_buffer.markIndex()-1;
  progress++;
  _handler.onFrame((byte)0,_opcode,_buffer.sliceFromMark(l));
if (_buffer.markIndex()<0)
if (_buffer.length()<_length)
  break charloop;

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

int l=_buffer.getIndex()-_buffer.markIndex()-1;
  progress++;
  _handler.onFrame((byte)0,_opcode,_buffer.sliceFromMark(l));
if (_buffer.markIndex()<0)
if (_buffer.length()<_length)
  break charloop;

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

int l=_buffer.getIndex()-_buffer.markIndex()-1;
  progress++;
  _handler.onFrame((byte)0,_opcode,_buffer.sliceFromMark(l));
if (_buffer.markIndex()<0)
if (_buffer.length()<_length)
  break charloop;

相关文章