Class BufferViewBuilder


  • @NotThreadSafe
    public class BufferViewBuilder
    extends java.lang.Object
    Builder for BufferView instances.
    • Method Detail

      • add

        public BufferViewBuilder add​(@NonNull
                                     @NonNull BufferView bufferView)
        Includes the given BufferView in the builder.
        Parameters:
        bufferView - The BufferView to include. If empty, it will be ignored; if a CompositeBufferView, its components will be added; otherwise the buffer itself will be added. No data copies are being made as part of this process; the resulting BufferView after invoking build() will contain references to the BufferViews passed via this method and not contain copies of their data. Any modifications made to this BufferView will be reflected in the resulting BufferView and viceversa.
        Returns:
        This instance.
      • getLength

        public int getLength()
        The length, in bytes, of the accumulated BufferView.