getSlice(at:length:)

    Returns a slice of size length bytes, starting at index. The ByteBuffer this is invoked on and the ByteBuffer returned will share the same underlying storage. However, the byte at index in this ByteBuffer will correspond to index 0 in the returned ByteBuffer. The readerIndex of the returned ByteBuffer will be 0, the writerIndex will be length.

    ByteBuffer-core.swift:804
    func getSlice(at index: Int, length: Int) -> ByteBuffer?

    Parameters

    index

    The index the requested slice starts at.

    length

    The length of the requested slice.

    Returns

    A ByteBuffer containing the selected bytes as readable bytes or nil if the selected bytes were not readable in the initial ByteBuffer.

    The selected bytes must be readable or else nil will be returned.

    Other members in extension

    Types

    Typealiases

    Show implementation details (2)

    Hide implementation details

    Type members

    Instance members

    Show obsolete interfaces (3)

    Hide obsolete interfaces