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

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

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

Buffer.toString介绍

暂无

代码示例

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

public static String to8859_1_String(Buffer buffer)
  {
    if (buffer instanceof CachedBuffer)
      return buffer.toString();
    return buffer.toString(StringUtil.__ISO_8859_1_CHARSET);
  }
}

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

public static String to8859_1_String(Buffer buffer)
  {
    if (buffer instanceof CachedBuffer)
      return buffer.toString();
    return buffer.toString(StringUtil.__ISO_8859_1_CHARSET);
  }
}

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

public static String to8859_1_String(Buffer buffer)
  {
    if (buffer instanceof CachedBuffer)
      return buffer.toString();
    return buffer.toString(StringUtil.__ISO_8859_1_CHARSET);
  }
}

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

public static String to8859_1_String(Buffer buffer)
  {
    if (buffer instanceof CachedBuffer)
      return buffer.toString();
    return buffer.toString(StringUtil.__ISO_8859_1_CHARSET);
  }
}

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

@Override
protected void parsedHeader(Buffer name, Buffer value) throws IOException
{
  String headerName = name.toString("UTF-8").toLowerCase(Locale.ENGLISH);
  String headerValue = value.toString("UTF-8");
  switch (headerName)
  {
    case "host":
      headers.put(HTTPSPDYHeader.HOST.name(version), headerValue);
      break;
    default:
      headers.put(headerName, headerValue);
      break;
  }
}

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

@Override
protected void startRequest(Buffer method, Buffer uri, Buffer httpVersion) throws IOException
{
  SPDYServerConnector connector = (SPDYServerConnector)getConnector();
  String scheme = connector.getSslContextFactory() != null ? "https" : "http";
  headers.put(HTTPSPDYHeader.SCHEME.name(version), scheme);
  headers.put(HTTPSPDYHeader.METHOD.name(version), method.toString("UTF-8"));
  headers.put(HTTPSPDYHeader.URI.name(version), uri.toString("UTF-8"));
  headers.put(HTTPSPDYHeader.VERSION.name(version), httpVersion.toString("UTF-8"));
}

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

if (!quote && (';'==b || ' '==b )||
      (quote && '"'==b ))
      return CACHE.lookup(value.peek(start,i-start)).toString(StringUtil.__UTF8);
return CACHE.lookup(value.peek(start,i-start)).toString(StringUtil.__UTF8);

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

if (!quote && (';'==b || ' '==b )||
      (quote && '"'==b ))
      return CACHE.lookup(value.peek(start,i-start)).toString(StringUtil.__UTF8);
return CACHE.lookup(value.peek(start,i-start)).toString(StringUtil.__UTF8);

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

if (!quote && (';'==b || ' '==b )||
      (quote && '"'==b ))
      return CACHE.lookup(value.peek(start,i-start)).toString(StringUtil.__UTF8);
return CACHE.lookup(value.peek(start,i-start)).toString(StringUtil.__UTF8);

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

if (!quote && (';'==b || ' '==b )||
      (quote && '"'==b ))
      return CACHE.lookup(value.peek(start,i-start)).toString(StringUtil.__UTF8);
return CACHE.lookup(value.peek(start,i-start)).toString(StringUtil.__UTF8);

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

if (!quote && (';'==b || ' '==b )||
      (quote && '"'==b ))
      return CACHE.lookup(value.peek(start,i-start)).toString(StringUtil.__UTF8);
return CACHE.lookup(value.peek(start,i-start)).toString(StringUtil.__UTF8);

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

public void onFrame(byte flags, byte opcode, Buffer buffer)
{
  try
  {
    byte[] array=buffer.array();
    if (opcode==0)
    {
      if (_websocket instanceof WebSocket.OnTextMessage)
        ((WebSocket.OnTextMessage)_websocket).onMessage(buffer.toString(StringUtil.__UTF8));
    }
    else
    {
      if (_websocket instanceof WebSocket.OnBinaryMessage)
        ((WebSocket.OnBinaryMessage)_websocket).onMessage(array,buffer.getIndex(),buffer.length());
    }
  }
  catch(Throwable th)
  {
    LOG.warn(th);
  }
}

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

public void onFrame(byte flags, byte opcode, Buffer buffer)
{
  try
  {
    byte[] array=buffer.array();
    if (opcode==0)
    {
      if (_websocket instanceof WebSocket.OnTextMessage)
        ((WebSocket.OnTextMessage)_websocket).onMessage(buffer.toString(StringUtil.__UTF8));
    }
    else
    {
      if (_websocket instanceof WebSocket.OnBinaryMessage)
        ((WebSocket.OnBinaryMessage)_websocket).onMessage(array,buffer.getIndex(),buffer.length());
    }
  }
  catch(Throwable th)
  {
    LOG.warn(th);
  }
}

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

StringBuilder status = new StringBuilder().append(_status);
if (_reason != null)
  status.append(" ").append(_reason.toString("UTF-8"));
headers.put(HTTPSPDYHeader.STATUS.name(ServerHTTPSPDYAsyncConnection.this.version), status.toString());
logger.debug("HTTP < {} {}", version, status);

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

public void onFrame(byte flags, byte opcode, Buffer buffer)
{
  try
  {
    byte[] array=buffer.array();
    if (opcode==0)
    {
      if (_websocket instanceof WebSocket.OnTextMessage)
        ((WebSocket.OnTextMessage)_websocket).onMessage(buffer.toString(StringUtil.__UTF8));
    }
    else
    {
      if (_websocket instanceof WebSocket.OnBinaryMessage)
        ((WebSocket.OnBinaryMessage)_websocket).onMessage(array,buffer.getIndex(),buffer.length());
    }
  }
  catch(Throwable th)
  {
    LOG.warn(th);
  }
}

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

_onTextMessage.onMessage(buffer.toString(StringUtil.__UTF8));

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

_onTextMessage.onMessage(buffer.toString(StringUtil.__UTF8));

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

_onTextMessage.onMessage(buffer.toString(StringUtil.__UTF8));
else

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

_onTextMessage.onMessage(buffer.toString(StringUtil.__UTF8));
else

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

_onTextMessage.onMessage(buffer.toString(StringUtil.__UTF8));

相关文章