Interface WritableComponent

    • Method Detail

      • hasWritableArray

        boolean hasWritableArray()
        Check if this component is backed by a cached byte array that can be accessed cheaply.
        Returns:
        true if writableArray() is a cheap operation, otherwise false.
      • writableNativeAddress

        long writableNativeAddress()
        Give the native memory address backing this buffer, or return 0 if this buffer has no native memory address.
        Returns:
        The native memory address, if any, otherwise 0.
      • writableBytes

        int writableBytes()
        Get the space available to be written to this component, as a number of bytes.
        Returns:
        The maximum number of bytes that can be written to this component.
      • writableBuffer

        ByteBuffer writableBuffer()
        Get a ByteBuffer instance for this memory component, which can be used for modifying the buffer contents.
        Returns:
        A new ByteBuffer, with its own position and limit, for this memory component.
      • skipWritableBytes

        WritableComponent skipWritableBytes​(int byteCount)
        Move the write-offset to indicate that the given number of bytes were written to this component.
        Parameters:
        byteCount - The number of bytes written to this component.
        Returns:
        itself.
        See Also:
        Buffer.skipWritableBytes(int)