本文整理了Java中org.eclipse.jetty.io.Buffer.clear()
方法的一些代码示例,展示了Buffer.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.clear()
方法的具体详情如下:
包路径:org.eclipse.jetty.io.Buffer
类名称:Buffer
方法名:clear
[英]Clear the buffer. getIndex=0, putIndex=0.
[中]清除缓冲区。getIndex=0,putIndex=0。
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
public void returnBuffer(Buffer buffer)
{
synchronized(this)
{
buffer.clear();
if (buffer==_header)
_headerOut=false;
if (buffer==_buffer)
_bufferOut=false;
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public void returnBuffer(Buffer buffer)
{
synchronized(this)
{
buffer.clear();
if (buffer==_header)
_headerOut=false;
if (buffer==_buffer)
_bufferOut=false;
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
public void returnBuffer(Buffer buffer)
{
synchronized(this)
{
buffer.clear();
if (buffer==_header)
_headerOut=false;
if (buffer==_buffer)
_bufferOut=false;
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
public void resetBuffer()
{
if(_state>=STATE_FLUSHING)
throw new IllegalStateException("Flushed");
_last = false;
_persistent=null;
_contentWritten = 0;
_contentLength = HttpTokens.UNKNOWN_CONTENT;
_content=null;
if (_buffer!=null)
_buffer.clear();
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
public void resetBuffer()
{
if(_state>=STATE_FLUSHING)
throw new IllegalStateException("Flushed");
_last = false;
_persistent=null;
_contentWritten = 0;
_contentLength = HttpTokens.UNKNOWN_CONTENT;
_content=null;
if (_buffer!=null)
_buffer.clear();
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
public void resetBuffer()
{
if(_state>=STATE_FLUSHING)
throw new IllegalStateException("Flushed");
_last = false;
_persistent=null;
_contentWritten = 0;
_contentLength = HttpTokens.UNKNOWN_CONTENT;
_content=null;
if (_buffer!=null)
_buffer.clear();
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public void resetBuffer()
{
if(_state>=STATE_FLUSHING)
throw new IllegalStateException("Flushed");
_last = false;
_persistent=null;
_contentWritten = 0;
_contentLength = HttpTokens.UNKNOWN_CONTENT;
_content=null;
if (_buffer!=null)
_buffer.clear();
}
代码示例来源:origin: org.eclipse.jetty/jetty-websocket
public void fill(Buffer buffer)
{
if (buffer!=null && buffer.length()>0)
{
if (_buffer==null)
_buffer=_buffers.getBuffer();
_buffer.put(buffer);
buffer.clear();
}
}
代码示例来源:origin: org.eclipse.jetty/jetty-websocket
public void fill(Buffer buffer)
{
if (buffer!=null && buffer.length()>0)
{
if (_buffer==null)
_buffer=_buffers.getBuffer();
_buffer.put(buffer);
buffer.clear();
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public void fill(Buffer buffer)
{
if (buffer!=null && buffer.length()>0)
{
if (_buffer==null)
_buffer=_buffers.getBuffer();
_buffer.put(buffer);
buffer.clear();
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
public void fill(Buffer buffer)
{
if (buffer!=null && buffer.length()>0)
{
if (_buffer==null)
_buffer=_buffers.getBuffer();
_buffer.put(buffer);
buffer.clear();
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
public void fill(Buffer buffer)
{
if (buffer!=null && buffer.length()>0)
{
if (_buffer==null)
_buffer=_buffers.getBuffer();
_buffer.put(buffer);
buffer.clear();
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public void fill(Buffer buffer)
{
if (buffer!=null && buffer.length()>0)
{
if (_buffer==null)
_buffer=_buffers.getBuffer();
_buffer.put(buffer);
buffer.clear();
}
}
代码示例来源:origin: org.eclipse.jetty/jetty-websocket
public void fill(Buffer buffer)
{
if (buffer!=null && buffer.length()>0)
{
if (_buffer==null)
_buffer=_buffers.getBuffer();
_buffer.put(buffer);
buffer.clear();
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
public int flush(Buffer buffer) throws IOException
{
if (_oshut)
return -1;
if (_out==null)
return 0;
int length=buffer.length();
if (length>0)
buffer.writeTo(_out);
if (!buffer.isImmutable())
buffer.clear();
return length;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
public void returnBuffer(Buffer buffer)
{
buffer.clear();
if (buffer.isVolatile() || buffer.isImmutable())
return;
ThreadBuffers buffers = _buffers.get();
if (buffers._header==null && isHeader(buffer))
buffers._header=buffer;
else if (buffers._buffer==null && isBuffer(buffer))
buffers._buffer=buffer;
else
buffers._other=buffer;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public int flush(Buffer buffer) throws IOException
{
if (_oshut)
return -1;
if (_out==null)
return 0;
int length=buffer.length();
if (length>0)
buffer.writeTo(_out);
if (!buffer.isImmutable())
buffer.clear();
return length;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
public void fill(Buffer buffer)
{
if (buffer!=null && buffer.length()>0)
{
if (_buffer==null)
_buffer=_buffers.getBuffer();
_buffer.put(buffer);
buffer.clear();
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public void fill(Buffer buffer)
{
if (buffer!=null && buffer.length()>0)
{
if (_buffer==null)
_buffer=_buffers.getBuffer();
_buffer.put(buffer);
buffer.clear();
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public void fill(Buffer buffer)
{
if (buffer!=null && buffer.length()>0)
{
if (_buffer==null)
_buffer=_buffers.getBuffer();
_buffer.put(buffer);
buffer.clear();
}
}
内容来源于网络,如有侵权,请联系作者删除!