Interface WrapperAware

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Buffer wrap​(byte[] data)
      Returns Buffer, which wraps the byte array.
      Buffer wrap​(byte[] data, int offset, int length)
      Returns Buffer, which wraps the part of byte array with specific offset and length.
      Buffer wrap​(java.lang.String s)
      Returns Buffer, which wraps the String.
      Buffer wrap​(java.lang.String s, java.nio.charset.Charset charset)
      Returns Buffer, which wraps the String with the specific Charset.
      Buffer wrap​(java.nio.ByteBuffer byteBuffer)
      Returns Buffer, which wraps the ByteBuffer.
    • Method Detail

      • wrap

        Buffer wrap​(byte[] data)
        Returns Buffer, which wraps the byte array.
        Parameters:
        data - byte array to wrap
        Returns:
        Buffer wrapper on top of passed byte array.
      • wrap

        Buffer wrap​(byte[] data,
                    int offset,
                    int length)
        Returns Buffer, which wraps the part of byte array with specific offset and length.
        Parameters:
        data - byte array to wrap
        offset - byte buffer offset
        length - byte buffer length
        Returns:
        Buffer wrapper on top of passed byte array.
      • wrap

        Buffer wrap​(java.lang.String s)
        Returns Buffer, which wraps the String.
        Parameters:
        s - String
        Returns:
        Buffer wrapper on top of passed String.
      • wrap

        Buffer wrap​(java.lang.String s,
                    java.nio.charset.Charset charset)
        Returns Buffer, which wraps the String with the specific Charset.
        Parameters:
        s - String
        charset - Charset, which will be used, when converting String to byte array.
        Returns:
        Buffer wrapper on top of passed String.
      • wrap

        Buffer wrap​(java.nio.ByteBuffer byteBuffer)
        Returns Buffer, which wraps the ByteBuffer.
        Parameters:
        byteBuffer - ByteBuffer to wrap
        Returns:
        Buffer wrapper on top of passed ByteBuffer.