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

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

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

Buffer.peek介绍

[英]Get the byte at the current getIndex without incrementing the getIndex.
[中]获取当前getIndex处的字节,而不增加getIndex。

代码示例

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

/**
 * @return The result of calling {@link Buffer#peek(int, int)} on the underlying buffer
 */
@Override
public Buffer peek(int index, int length)
{
  return _buffer.peek(index, length);
}

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

/**
 * @return The result of calling {@link Buffer#peek(int, int)} on the underlying buffer
 */
@Override
public Buffer peek(int index, int length)
{
  return _buffer.peek(index, length);
}

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

/**
 * @return The result of calling {@link Buffer#peek(int, byte[], int, int)} on the underlying buffer
 */
public int peek(int index, byte[] b, int offset, int length)
{
  return _buffer.peek(index,b,offset,length);
}

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

/**
 * @return The result of calling {@link Buffer#peek(int, byte[], int, int)} on the underlying buffer
 */
public int peek(int index, byte[] b, int offset, int length)
{
  return _buffer.peek(index,b,offset,length);
}

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

/**
 * @return The result of calling {@link Buffer#peek(int, int)} on the underlying buffer
 */
@Override
public Buffer peek(int index, int length)
{
  return _buffer.peek(index, length);
}

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

/**
 * @return The result of calling {@link Buffer#peek(int)} on the underlying buffer
 */
public byte peek(int index)
{
  return _buffer.peek(index);
}

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

/**
 * @return The result of calling {@link Buffer#peek(int)} on the underlying buffer
 */
public byte peek(int index)
{
  return _buffer.peek(index);
}

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

/**
 * @return The result of calling {@link Buffer#peek(int, byte[], int, int)} on the underlying buffer
 */
public int peek(int index, byte[] b, int offset, int length)
{
  return _buffer.peek(index,b,offset,length);
}

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

/**
 * @return The result of calling {@link Buffer#peek(int)} on the underlying buffer
 */
public byte peek(int index)
{
  return _buffer.peek(index);
}

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

/**
 * @return The result of calling {@link Buffer#peek(int, int)} on the underlying buffer
 */
@Override
public Buffer peek(int index, int length)
{
  return _buffer.peek(index, length);
}

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

/**
 * @return The result of calling {@link Buffer#peek(int, byte[], int, int)} on the underlying buffer
 */
public int peek(int index, byte[] b, int offset, int length)
{
  return _buffer.peek(index,b,offset,length);
}

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

/**
 * @return The result of calling {@link Buffer#peek(int)} on the underlying buffer
 */
public byte peek(int index)
{
  return _buffer.peek(index);
}

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

public static boolean isPrefix(Buffer prefix,Buffer buffer)
{
  if (prefix.length()>buffer.length())
    return false;
  int bi=buffer.getIndex();
  for (int i=prefix.getIndex(); i<prefix.putIndex();i++)
    if (prefix.peek(i)!=buffer.peek(bi++))
      return false;
  return true;
}

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

public static boolean isPrefix(Buffer prefix,Buffer buffer)
{
  if (prefix.length()>buffer.length())
    return false;
  int bi=buffer.getIndex();
  for (int i=prefix.getIndex(); i<prefix.putIndex();i++)
    if (prefix.peek(i)!=buffer.peek(bi++))
      return false;
  return true;
}

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

public static boolean isPrefix(Buffer prefix,Buffer buffer)
{
  if (prefix.length()>buffer.length())
    return false;
  int bi=buffer.getIndex();
  for (int i=prefix.getIndex(); i<prefix.putIndex();i++)
    if (prefix.peek(i)!=buffer.peek(bi++))
      return false;
  return true;
}

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

public static boolean isPrefix(Buffer prefix,Buffer buffer)
{
  if (prefix.length()>buffer.length())
    return false;
  int bi=buffer.getIndex();
  for (int i=prefix.getIndex(); i<prefix.putIndex();i++)
    if (prefix.peek(i)!=buffer.peek(bi++))
      return false;
  return true;
}

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

public static Buffer getString(Buffer _buffer, View tok)
{
  int len=((_buffer.peek()&0xFF)<<8)|(_buffer.peek(_buffer.getIndex()+1)&0xFF);
  if (len==0xffff)
  {
    _buffer.skip(2);
    return null;
  }
  int start=_buffer.getIndex();
  tok.update(start+2,start+len+2);
  _buffer.skip(len+3);
  return tok;
}

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

public static Buffer getHeaderName(Buffer _buffer, View tok)
{
  int len=((_buffer.peek()&0xFF)<<8)|(_buffer.peek(_buffer.getIndex()+1)&0xFF);
  if ((0xFF00&len)==0xA000)
  {
    _buffer.skip(1);
    return Ajp13RequestHeaders.CACHE.get(_buffer.get());
  }
  int start=_buffer.getIndex();
  tok.update(start+2,start+len+2);
  _buffer.skip(len+3);
  return tok;
}

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

_bytes[index++]=src.peek(s++);

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

byte b2 = b.peek(--bi);
if (b1 != b2) return false;

相关文章