类 ContextBuffer
java.lang.Object
org.beetl.core.cache.ContextBuffer
一个缓存的字节和字符数组,用于减少beetl渲染各个过程中渲染字符数组
- 作者:
- xiandafu
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明@org.jetbrains.annotations.NotNull byte[]获取字节数组缓存@org.jetbrains.annotations.NotNull byte[]getByteBuffer(int expected) 得到期望字节数组大小@org.jetbrains.annotations.NotNull char[]获取字符数组缓存@org.jetbrains.annotations.NotNull char[]getCharBuffer(int expected) 得到一个期望长度的buffer,调用者应该检测是否返回null,表示
-
构造器详细资料
-
ContextBuffer
public ContextBuffer(int maxSize, boolean inner) 构造方法- 参数:
maxSize- 最大容量inner- 是否为临时 buffer
-
ContextBuffer
public ContextBuffer(int maxSize) 构造方法- 参数:
maxSize- 最大容量
-
-
方法详细资料
-
getCharBuffer
@NotNull public @org.jetbrains.annotations.NotNull char[] getCharBuffer()获取字符数组缓存- 返回:
- 上下文中缓存的字符数组
-
getByteBuffer
@NotNull public @org.jetbrains.annotations.NotNull byte[] getByteBuffer()获取字节数组缓存- 返回:
- 上下文中缓存的字节数组
-
getCharBuffer
@NotNull public @org.jetbrains.annotations.NotNull char[] getCharBuffer(int expected) 得到一个期望长度的buffer,调用者应该检测是否返回null,表示 -
getByteBuffer
@NotNull public @org.jetbrains.annotations.NotNull byte[] getByteBuffer(int expected) 得到期望字节数组大小
-