类 ContextBuffer

java.lang.Object
org.beetl.core.cache.ContextBuffer

public class ContextBuffer extends Object
一个缓存的字节和字符数组,用于减少beetl渲染各个过程中渲染字符数组
作者:
xiandafu
  • 构造器概要

    构造器
    构造器
    说明
    ContextBuffer(int maxSize)
    构造方法
    ContextBuffer(int maxSize, boolean inner)
    构造方法
  • 方法概要

    修饰符和类型
    方法
    说明
    @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,表示

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • 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)
      得到期望字节数组大小