Example usage for io.vertx.core.buffer Buffer setString

List of usage examples for io.vertx.core.buffer Buffer setString

Introduction

In this page you can find the example usage for io.vertx.core.buffer Buffer setString.

Prototype

@Fluent
Buffer setString(int pos, String str);

Source Link

Document

Sets the bytes at position pos in the Buffer to the value of str encoded in UTF-8.

The buffer will expand as necessary to accommodate any value written.

Usage

From source file:examples.BufferExamples.java

License:Open Source License

public void example7() {
    Buffer buff = Buffer.buffer();

    buff.setInt(1000, 123);
    buff.setString(0, "hello");
}