org.tinygroup.weblayer.webcontext.buffered.impl
类 BufferedWebContextImpl

java.lang.Object
  继承者 org.tinygroup.context.impl.BaseContextImpl
      继承者 org.tinygroup.context.impl.ContextImpl
          继承者 org.tinygroup.weblayer.webcontext.AbstractWebContextWrapper
              继承者 org.tinygroup.weblayer.webcontext.buffered.impl.BufferedWebContextImpl
所有已实现的接口:
Serializable, org.tinygroup.context.BaseContext, org.tinygroup.context.Context, WebContext, BufferedWebContext

public class BufferedWebContextImpl
extends AbstractWebContextWrapper
implements BufferedWebContext

另请参见:
序列化表格

字段摘要
 
从类 org.tinygroup.context.impl.BaseContextImpl 继承的字段
itemMap
 
构造方法摘要
BufferedWebContextImpl(WebContext wrappedContext)
           
 
方法摘要
 BufferedResponseImpl getBufferedResponse()
          取得BufferedRunDataResponse实例。
 boolean isBuffering()
          设置是否将所有信息保存在内存中。
 org.tinygroup.commons.io.ByteArray peekByteBuffer()
          返回最上层的ByteArray
 String peekCharBuffer()
          返回最上层的buffer
 org.tinygroup.commons.io.ByteArray popByteBuffer()
          弹出最近的buffer,如果堆栈中只有一个buffer,则弹出后再创建一个新的。
 String popCharBuffer()
          弹出最近的buffer,如果堆栈中只有一个buffer,则弹出后再创建一个新的。
 void pushBuffer()
          创建新的buffer,保存老的buffer。
 void setBuffering(boolean buffering)
          设置buffer模式,如果设置成true,表示将所有信息保存在内存中,否则直接输出到原始response中。
 
从类 org.tinygroup.weblayer.webcontext.AbstractWebContextWrapper 继承的方法
get, getFromWrapperContext, getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, getWrappedWebContext, init, putSubWebContext, setObject, setRequest, setResponse, setServletContext
 
从类 org.tinygroup.context.impl.ContextImpl 继承的方法
clear, clearSubContext, createSubContext, findNodeMap, get, getParent, getSubContext, getSubContextMap, put, putContext, putSubContext, remove, removeSubContext, renameKey, renameKeyNodeMap, setParent
 
从类 org.tinygroup.context.impl.BaseContextImpl 继承的方法
exist, get, getItemMap, put, remove, size
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 org.tinygroup.weblayer.WebContext 继承的方法
getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, init, setObject, setRequest, setResponse, setServletContext
 
从接口 org.tinygroup.context.Context 继承的方法
clearSubContext, createSubContext, get, getParent, getSubContext, getSubContextMap, put, putSubContext, remove, removeSubContext, setParent
 
从接口 org.tinygroup.context.BaseContext 继承的方法
clear, exist, get, get, getItemMap, put, remove, renameKey, size
 

构造方法详细信息

BufferedWebContextImpl

public BufferedWebContextImpl(WebContext wrappedContext)
方法详细信息

isBuffering

public boolean isBuffering()
设置是否将所有信息保存在内存中。

指定者:
接口 BufferedWebContext 中的 isBuffering
返回:
如果是,则返回true

setBuffering

public void setBuffering(boolean buffering)
设置buffer模式,如果设置成true,表示将所有信息保存在内存中,否则直接输出到原始response中。

此方法必须在getOutputStreamgetWriter方法之前执行,否则将抛出 IllegalStateException

指定者:
接口 BufferedWebContext 中的 setBuffering
参数:
buffering - 是否buffer内容
抛出:
IllegalStateException - getOutputStreamgetWriter方法已经被执行

pushBuffer

public void pushBuffer()
创建新的buffer,保存老的buffer。

指定者:
接口 BufferedWebContext 中的 pushBuffer
抛出:
IllegalStateException - 如果不在buffer模式,或getWritergetOutputStream方法从未被调用

popByteBuffer

public org.tinygroup.commons.io.ByteArray popByteBuffer()
弹出最近的buffer,如果堆栈中只有一个buffer,则弹出后再创建一个新的。

指定者:
接口 BufferedWebContext 中的 popByteBuffer
返回:
最近的buffer内容
抛出:
IllegalStateException - 如果不在buffer模式,或getWriter 方法曾被调用,或 getOutputStream方法从未被调用

popCharBuffer

public String popCharBuffer()
弹出最近的buffer,如果堆栈中只有一个buffer,则弹出后再创建一个新的。

指定者:
接口 BufferedWebContext 中的 popCharBuffer
返回:
最近的buffer内容
抛出:
IllegalStateException - 如果不在buffer模式,或getOutputStream 方法曾被调用,或getWriter方法从未被调用

getBufferedResponse

public BufferedResponseImpl getBufferedResponse()
取得BufferedRunDataResponse实例。

返回:
BufferedRunDataResponse实例

peekByteBuffer

public org.tinygroup.commons.io.ByteArray peekByteBuffer()
从接口 BufferedWebContext 复制的描述
返回最上层的ByteArray

指定者:
接口 BufferedWebContext 中的 peekByteBuffer
返回:
最近的buffer内容

peekCharBuffer

public String peekCharBuffer()
从接口 BufferedWebContext 复制的描述
返回最上层的buffer

指定者:
接口 BufferedWebContext 中的 peekCharBuffer
返回:
最近的buffer内容


Copyright © 2006–2014 开源组织. All rights reserved.