var capacity: IntThe current capacity of the storage of this ByteBuffer, this is not constant and does not signify the number of bytes that have been written to this ByteBuffer.
var debugDescription: Stringvar description: StringA String describing this ByteBuffer including length and the bytes it contains (partially).
var readableBytes: IntThe number of bytes readable (readableBytes = writerIndex - readerIndex).
var readableBytesView: ByteBufferViewA view into the readable bytes of the ByteBuffer.
var readerIndex: IntThe reader index or the number of bytes previously read from this ByteBuffer. readerIndex is 0 for a newly allocated ByteBuffer.
var storageCapacity: IntThe current capacity of the underlying storage of this ByteBuffer. A COW slice of the buffer (e.g. readSlice(length: x)) will posses the same storageCapacity as the original buffer until new data is written.
var writableBytes: IntThe number of bytes writable until ByteBuffer will need to grow its underlying storage which will likely trigger a copy of the bytes.
var writerIndex: IntThe write index or the number of bytes previously written to this ByteBuffer. writerIndex is 0 for a newly allocated ByteBuffer.
func clear()Set both reader index and writer index to 0. This will reset the state of this ByteBuffer to the state of a freshly allocated one, if possible without allocations. This is the cheapest way to recycle a ByteBuffer for a new use-case.
func clear(minimumCapacity: Int)Set both reader index and writer index to 0. This will reset the state of this ByteBuffer to the state of a freshly allocated one, if possible without allocations. This is the cheapest way to recycle a ByteBuffer for a new use-case.
func copyBytes(at: Int, to: Int, length: Int) throws -> IntCopies length bytes starting at the fromIndex to toIndex. Does not move the writer index.
func discardReadBytes() -> BoolDiscard the bytes before the reader index. The byte at index readerIndex before calling this method will be at index 0 after the call returns.
func encode(to: any Encoder) throwsEncodes this buffer as a base64 string in a single value container.
func getBytes(at: Int, length: Int) -> [UInt8]?Get length bytes starting at index and return the result as [UInt8]. This will not change the reader index. The selected bytes must be readable or else nil will be returned.
func getDispatchData(at: Int, length: Int) -> DispatchData?Get the bytes at index from this ByteBuffer as a DispatchData. Does not move the reader index. The selected bytes must be readable or else nil will be returned.
func getInteger<T>(at: Int, endianness: Endianness, as: T.Type) -> T?Get the integer at index from this ByteBuffer. Does not move the reader index. The selected bytes must be readable or else nil will be returned.
func getLengthPrefixedSlice<Integer>(at: Int, endianness: Endianness, as: Integer.Type) -> ByteBuffer?Gets an Integer from self and gets a slice of that length from self and returns it.
func getNullTerminatedString(at: Int) -> String?Get the string at index from this ByteBuffer decoding using the UTF-8 encoding. Does not move the reader index. The selected bytes must be readable or else nil will be returned.
func getSlice(at: Int, length: Int) -> ByteBuffer?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.
func getString(at: Int, length: Int) -> String?Get the string at index from this ByteBuffer decoding using the UTF-8 encoding. Does not move the reader index. The selected bytes must be readable or else nil will be returned.
func getUTF8ValidatedString(at: Int, length: Int) throws -> String?Get the string at index from this ByteBuffer decoding using the UTF-8 encoding. Does not move the reader index. The selected bytes must be readable or else nil will be returned.
func hash(into: inout Hasher)The hash value for the readable bytes.
func hexDump(format: ByteBuffer.HexDumpFormat) -> StringReturns a hex dump of this ByteBuffer in a preferred HexDumpFormat.
func moveReaderIndex(forwardBy: Int)Move the reader index forward by offset bytes.
func moveReaderIndex(to: Int)Set the reader index to offset.
func moveWriterIndex(forwardBy: Int)Move the writer index forward by offset bytes.
func moveWriterIndex(to: Int)Set the writer index to offset.
func peekBytes(length: Int) -> [UInt8]?Returns the Bytes at the current reader index without advancing it.
func peekDispatchData(length: Int) -> DispatchData?Return a DispatchData object containing the bytes at the current reader index.
func peekInteger<T>(endianness: Endianness, as: T.Type) -> T?Returns the integer at the current reader index without advancing it.
func peekLengthPrefixedSlice<Integer>(endianness: Endianness, as: Integer.Type) -> ByteBuffer?Reads an integer length prefix at the current readerIndex, then returns a ByteBuffer slice of that length without advancing the reader index.
func peekMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)?func peekMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)?func peekMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)?func peekMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)?func peekMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)?func peekMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)?func peekMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9)?func peekMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8)?func peekMultipleIntegers<T1, T2, T3, T4, T5, T6, T7>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7).Type) -> (T1, T2, T3, T4, T5, T6, T7)?func peekMultipleIntegers<T1, T2, T3, T4, T5, T6>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6).Type) -> (T1, T2, T3, T4, T5, T6)?func peekMultipleIntegers<T1, T2, T3, T4, T5>(endianness: Endianness, as: (T1, T2, T3, T4, T5).Type) -> (T1, T2, T3, T4, T5)?func peekMultipleIntegers<T1, T2, T3, T4>(endianness: Endianness, as: (T1, T2, T3, T4).Type) -> (T1, T2, T3, T4)?func peekMultipleIntegers<T1, T2, T3>(endianness: Endianness, as: (T1, T2, T3).Type) -> (T1, T2, T3)?func peekMultipleIntegers<T1, T2>(endianness: Endianness, as: (T1, T2).Type) -> (T1, T2)?func peekNullTerminatedString() -> String?Return a null-terminated String starting at the current reader index.
func peekSlice(length: Int) -> ByteBuffer?Returns a slice of size length bytes, starting at the current readerIndex. The ByteBuffer this is invoked on and the ByteBuffer returned will share the same underlying storage. However, the byte at readerIndex 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.
func peekString(length: Int) -> String?Return a String decoded from the bytes at the current reader index using UTF-8 encoding.
func peekUTF8ValidatedString(length: Int) throws -> String?Return a UTF-8 validated String decoded from the bytes at the current reader index.
func readBytes(length: Int) -> [UInt8]?Read length bytes off this ByteBuffer, move the reader index forward by length bytes and return the result as [UInt8].
func readDispatchData(length: Int) -> DispatchData?Read length bytes off this ByteBuffer and return them as a DispatchData. Move the reader index forward by length.
func readEncodedInteger<Strategy, Integer>(as: Integer.Type, strategy: Strategy) -> Integer?Read a binary encoded integer, moving the readerIndex appropriately. If there are not enough bytes, nil is returned.
func readInteger<T>(endianness: Endianness, as: T.Type) -> T?Read an integer off this ByteBuffer, move the reader index forward by the integer’s byte size and return the result.
func readLengthPrefixed<Integer, Result>(endianness: Endianness, as: Integer.Type, readMessage: (ByteBuffer) throws -> Result?) throws -> Result?Reads an Integer from self, reads a slice of that length and passes it to readMessage. It is checked that readMessage returns a non-nil value.
func readLengthPrefixedSlice<Integer>(endianness: Endianness, as: Integer.Type) -> ByteBuffer?Reads an Integer from self and reads a slice of that length from self and returns it.
func readLengthPrefixedSlice<Strategy>(strategy: Strategy) -> ByteBuffer?Reads a slice which is prefixed with a length. The length will be read using strategy, and then that many bytes will be read to create a slice.
func readMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)?func readMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)?func readMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)?func readMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)?func readMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)?func readMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)?func readMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8, T9)?func readMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8).Type) -> (T1, T2, T3, T4, T5, T6, T7, T8)?func readMultipleIntegers<T1, T2, T3, T4, T5, T6, T7>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7).Type) -> (T1, T2, T3, T4, T5, T6, T7)?func readMultipleIntegers<T1, T2, T3, T4, T5, T6>(endianness: Endianness, as: (T1, T2, T3, T4, T5, T6).Type) -> (T1, T2, T3, T4, T5, T6)?func readMultipleIntegers<T1, T2, T3, T4, T5>(endianness: Endianness, as: (T1, T2, T3, T4, T5).Type) -> (T1, T2, T3, T4, T5)?func readMultipleIntegers<T1, T2, T3, T4>(endianness: Endianness, as: (T1, T2, T3, T4).Type) -> (T1, T2, T3, T4)?func readMultipleIntegers<T1, T2, T3>(endianness: Endianness, as: (T1, T2, T3).Type) -> (T1, T2, T3)?func readMultipleIntegers<T1, T2>(endianness: Endianness, as: (T1, T2).Type) -> (T1, T2)?func readNullTerminatedString() -> String?Read a null terminated string off this ByteBuffer, decoding it as String using the UTF-8 encoding. Move the reader index forward by the string’s length and its null terminator.
func readSlice(length: Int) -> ByteBuffer?Slice length bytes off this ByteBuffer and move the reader index forward by length. If enough bytes are readable the ByteBuffer returned by this method will share the underlying storage with the ByteBuffer the method was invoked on. The returned ByteBuffer will contain the bytes in the range readerIndex..<(readerIndex + length) of the original ByteBuffer. The readerIndex of the returned ByteBuffer will be 0, the writerIndex will be length.
func readString(length: Int) -> String?Read length bytes off this ByteBuffer, decoding it as String using the UTF-8 encoding. Move the reader index forward by length.
func readUTF8ValidatedString(length: Int) throws -> String?Read length bytes off this ByteBuffer, decoding it as String using the UTF-8 encoding. Move the reader index forward by length.
func readWithUnsafeMutableReadableBytes((UnsafeMutableRawBufferPointer) throws -> Int) rethrows -> IntYields a mutable buffer pointer containing this ByteBuffer’s readable bytes. You may modify the yielded bytes. Will move the reader index by the number of bytes returned by body but leave writer index as it was.
func readWithUnsafeMutableReadableBytes<T>((UnsafeMutableRawBufferPointer) throws -> (Int, T)) rethrows -> TYields a mutable buffer pointer containing this ByteBuffer’s readable bytes. You may modify the yielded bytes. Will move the reader index by the number of bytes body returns in the first tuple component but leave writer index as it was.
func readWithUnsafeReadableBytes((UnsafeRawBufferPointer) throws -> Int) rethrows -> IntYields an immutable buffer pointer containing this ByteBuffer’s readable bytes. Will move the reader index by the number of bytes returned by body.
func readWithUnsafeReadableBytes<T>((UnsafeRawBufferPointer) throws -> (Int, T)) rethrows -> TYields an immutable buffer pointer containing this ByteBuffer’s readable bytes. Will move the reader index by the number of bytes body returns in the first tuple component.
func reserveCapacity(Int)Reserves enough space to store the specified number of bytes.
func reserveCapacity(minimumWritableBytes: Int)Reserves enough space to write at least the specified number of bytes.
func setBuffer(ByteBuffer, at: Int) -> IntCopy buffer’s readable bytes into this ByteBuffer starting at index. Does not move any of the reader or writer indices.
func setBytes(UnsafeRawBufferPointer, at: Int) -> IntCopy bytes into the ByteBuffer at index. Does not move the writer index.
func setBytes<Bytes>(Bytes, at: Int) -> IntCopy the collection of bytes into the ByteBuffer at index. Does not move the writer index.
func setDispatchData(DispatchData, at: Int) -> IntWrite dispatchData into this ByteBuffer at index. Does not move the writer index.
func setInteger<T>(T, at: Int, endianness: Endianness, as: T.Type) -> IntWrite integer into this ByteBuffer starting at index. This does not alter the writer index.
func setNullTerminatedString(String, at: Int) -> IntWrite string null terminated into this ByteBuffer at index using UTF-8 encoding. Does not move the writer index.
func setRepeatingByte(UInt8, count: Int, at: Int) -> IntSets the given byte count times at the given index. Will reserve more memory if necessary. Does not move the writer index.
func setStaticString(StaticString, at: Int) -> IntWrite the static string into this ByteBuffer at index using UTF-8 encoding, moving the writer index forward appropriately.
func setString(String, at: Int) -> IntWrite string into this ByteBuffer at index using UTF-8 encoding. Does not move the writer index.
func setSubstring(Substring, at: Int) -> IntWrite substring into this ByteBuffer at index using UTF-8 encoding. Does not move the writer index.
func shrinkBufferCapacity(to: Int) -> BoolThe ByteBuffer will successfully be shrunk if the requested capacity is less than the current capacity, and the requested capacity is greater than or equal to the number of readable bytes in the buffer. If either condition is not true, the buffer will not be shrunk.
func slice() -> ByteBufferSlice the readable bytes off this ByteBuffer without modifying the reader index. This method will return a ByteBuffer sharing the underlying storage with the ByteBuffer the method was invoked on. The returned ByteBuffer will contain the bytes in the range readerIndex..<writerIndex of the original ByteBuffer.
func viewBytes(at: Int, length: Int) -> ByteBufferView?Returns a view into some portion of the readable bytes of a ByteBuffer.
func withUnsafeMutableReadableBytes<T>((UnsafeMutableRawBufferPointer) throws -> T) rethrows -> TYields a mutable buffer pointer containing this ByteBuffer’s readable bytes. You may modify those bytes.
func withUnsafeMutableWritableBytes<T>((UnsafeMutableRawBufferPointer) throws -> T) rethrows -> TYields the bytes currently writable (bytesWritable = capacity - writerIndex). Before reading those bytes you must first write to them otherwise you will trigger undefined behaviour. The writer index will remain unchanged.
func withUnsafeReadableBytes<T>((UnsafeRawBufferPointer) throws -> T) rethrows -> TYields a buffer pointer containing this ByteBuffer’s readable bytes.
func withUnsafeReadableBytesWithStorageManagement<T>((UnsafeRawBufferPointer, Unmanaged<AnyObject>) throws -> T) rethrows -> TYields a buffer pointer containing this ByteBuffer‘s readable bytes. You may hold a pointer to those bytes even after the closure returned iff you model the lifetime of those bytes correctly using the Unmanaged instance. If you don’t require the pointer after the closure returns, use withUnsafeReadableBytes.
func withVeryUnsafeBytes<T>((UnsafeRawBufferPointer) throws -> T) rethrows -> TThis vends a pointer to the storage of the ByteBuffer. It’s marked as very unsafe because it might contain uninitialised memory and it’s undefined behaviour to read it. In most cases you should use withUnsafeReadableBytes.
func withVeryUnsafeBytesWithStorageManagement<T>((UnsafeRawBufferPointer, Unmanaged<AnyObject>) throws -> T) rethrows -> TSee withUnsafeReadableBytesWithStorageManagement and withVeryUnsafeBytes.
func withVeryUnsafeMutableBytes<T>((UnsafeMutableRawBufferPointer) throws -> T) rethrows -> TThis vends a pointer to the storage of the ByteBuffer. It’s marked as very unsafe because it might contain uninitialised memory and it’s undefined behaviour to read it. In most cases you should use withUnsafeMutableWritableBytes.
func writeBuffer(inout ByteBuffer) -> IntWrite buffer’s readable bytes into this ByteBuffer starting at writerIndex. This will move both this ByteBuffer’s writer index as well as buffer’s reader index by the number of bytes readable in buffer.
func writeBytes(UnsafeRawBufferPointer) -> IntWrite bytes into this ByteBuffer. Moves the writer index forward by the number of bytes written.
func writeBytes<Bytes>(Bytes) -> IntWrite bytes, a Sequence of UInt8 into this ByteBuffer. Moves the writer index forward by the number of bytes written.
func writeDispatchData(DispatchData) -> IntWrite dispatchData into this ByteBuffer, moving the writer index forward appropriately.
func writeEncodedInteger<Integer, Strategy>(Integer, strategy: Strategy) -> IntWrite a binary encoded integer.
func writeImmutableBuffer(ByteBuffer) -> Intfunc writeInteger<T>(T, endianness: Endianness, as: T.Type) -> IntWrite integer into this ByteBuffer, moving the writer index forward appropriately.
func writeLengthPrefixed<Integer>(endianness: Endianness, as: Integer.Type, writeMessage: (inout ByteBuffer) throws -> Int) throws -> IntPrefixes a message written by writeMessage with the number of bytes written as an Integer.
func writeLengthPrefixed<Strategy>(strategy: Strategy, writeData: (inout ByteBuffer) throws -> Int) rethrows -> IntPrefixes bytes written by writeData with the number of bytes written. The number of bytes written is encoded using strategy.
func writeLengthPrefixedBuffer<Strategy>(ByteBuffer, strategy: Strategy) -> IntWrite the length of buffer using strategy. Then write the buffer.
func writeLengthPrefixedBytes<Bytes, Strategy>(Bytes, strategy: Strategy) -> IntWrite the length of bytes using strategy. Then write the bytes.
func writeLengthPrefixedString<Strategy>(String, strategy: Strategy) -> IntWrite the length of string using strategy. Then write the string.
func writeMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8, T9>(T1, T2, T3, T4, T5, T6, T7, T8, T9, endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8, T9).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3, T4, T5, T6, T7, T8>(T1, T2, T3, T4, T5, T6, T7, T8, endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7, T8).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3, T4, T5, T6, T7>(T1, T2, T3, T4, T5, T6, T7, endianness: Endianness, as: (T1, T2, T3, T4, T5, T6, T7).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3, T4, T5, T6>(T1, T2, T3, T4, T5, T6, endianness: Endianness, as: (T1, T2, T3, T4, T5, T6).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3, T4, T5>(T1, T2, T3, T4, T5, endianness: Endianness, as: (T1, T2, T3, T4, T5).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3, T4>(T1, T2, T3, T4, endianness: Endianness, as: (T1, T2, T3, T4).Type) -> Intfunc writeMultipleIntegers<T1, T2, T3>(T1, T2, T3, endianness: Endianness, as: (T1, T2, T3).Type) -> Intfunc writeMultipleIntegers<T1, T2>(T1, T2, endianness: Endianness, as: (T1, T2).Type) -> Intfunc writeNullTerminatedString(String) -> IntWrite string into this ByteBuffer null terminated using UTF-8 encoding, moving the writer index forward appropriately.
func writePlainHexEncodedBytes(String) throws -> IntWrite ASCII hexadecimal string into this ByteBuffer as raw bytes, decoding the hexadecimal & moving the writer index forward appropriately. This method will throw if the string input is not of the “plain” hex encoded format.
func writeRepeatingByte(UInt8, count: Int) -> IntWrites byte count times. Moves the writer index forward by the number of bytes written.
func writeStaticString(StaticString) -> IntWrite the static string into this ByteBuffer using UTF-8 encoding, moving the writer index forward appropriately.
func writeString(String) -> IntWrite string into this ByteBuffer using UTF-8 encoding, moving the writer index forward appropriately.
func writeSubstring(Substring) -> IntWrite substring into this ByteBuffer using UTF-8 encoding, moving the writer index forward appropriately.
func writeWithUnsafeMutableBytes(minimumWritableBytes: Int, (UnsafeMutableRawBufferPointer) throws -> Int) rethrows -> IntThis vends a pointer of the ByteBuffer at the writerIndex after ensuring that the buffer has at least minimumWritableBytes of writable bytes available.