Example usage for Java io.vertx.core.buffer Buffer fields, constructors, methods, implement or subclass
The text is from its open source code.
Buffer | appendBuffer(Buffer buff) Appends the specified Buffer to the end of this Buffer. |
Buffer | appendBuffer(Buffer buff, int offset, int len) Appends the specified Buffer starting at the offset using len to the end of this Buffer. |
Buffer | appendByte(byte b) Appends the specified byte to the end of the Buffer. |
Buffer | appendBytes(byte[] bytes) Appends the specified byte[] to the end of the Buffer. |
Buffer | appendBytes(byte[] bytes, int offset, int len) Appends the specified number of bytes from byte[] to the end of the Buffer, starting at the given offset. |
Buffer | appendInt(int i) Appends the specified int to the end of the Buffer. |
Buffer | appendLong(long l) Appends the specified long to the end of the Buffer. |
Buffer | appendShort(short s) Appends the specified short to the end of the Buffer.The buffer will expand as necessary to accommodate any bytes written. Returns a reference to this so multiple operations can be appended together. |
Buffer | appendString(String str) Appends the specified String str to the end of the Buffer with UTF-8 encoding. The buffer will expand as necessary to accommodate any bytes written. Returns a reference to this so multiple operations can be appended together
|
Buffer | appendString(String str, String enc) Appends the specified String to the end of the Buffer with the encoding as specified by enc . The buffer will expand as necessary to accommodate any bytes written. Returns a reference to this so multiple operations can be appended together.
|
Buffer | copy() Returns a copy of the entire Buffer. |
Buffer | getBuffer(int start, int end) Returns a copy of a sub-sequence the Buffer as a io.vertx.core.buffer.Buffer starting at position start and ending at position end - 1 |
byte | getByte(int pos) Returns the byte at position pos in the Buffer. |
ByteBuf | getByteBuf() Returns the Buffer as a Netty ByteBuf . The returned buffer is a duplicate. The returned ByteBuf might have its readerIndex > 0 This method is meant for internal use only.
|
byte[] | getBytes(int start, int end) Returns a copy of a sub-sequence the Buffer as a byte[] starting at position start and ending at position end - 1 |
Buffer | getBytes(byte[] dst, int dstIndex) Transfers the content of the Buffer into a byte[] at the specific destination. |
byte[] | getBytes() Returns a copy of the entire Buffer as a byte[] |
int | getInt(int pos) Returns the int at position pos in the Buffer. |
long | getLong(int pos) Returns the long at position pos in the Buffer. |
short | getShort(int pos) Returns the short at position pos in the Buffer. |
String | getString(int start, int end) Returns a copy of a sub-sequence the Buffer as a String starting at position start and ending at position end - 1 interpreted as a String in UTF-8 encoding |
String | getString(int start, int end, String enc) Returns a copy of a sub-sequence the Buffer as a String starting at position start and ending at position end - 1 interpreted as a String in the specified encoding |
short | getUnsignedByte(int pos) Returns the unsigned byte at position pos in the Buffer, as a short . |
int | length() Returns the length of the buffer, measured in bytes. |
Buffer | setBytes(int pos, ByteBuffer b) Sets the bytes at position pos in the Buffer to the bytes represented by the ByteBuffer b . The buffer will expand as necessary to accommodate any value written. |
Buffer | setBytes(int pos, byte[] b) Sets the bytes at position pos in the Buffer to the bytes represented by the byte[] b . The buffer will expand as necessary to accommodate any value written. |
Buffer | setInt(int pos, int i) Sets the int at position pos in the Buffer to the value i . The buffer will expand as necessary to accommodate any value written. |
Buffer | setString(int pos, String str) 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. |
Buffer | setUnsignedByte(int pos, short b) Sets the unsigned byte at position pos in the Buffer to the value b . The buffer will expand as necessary to accommodate any value written. |
Buffer | slice() Returns a slice of this buffer. |
Buffer | slice(int start, int end) Returns a slice of this buffer. |
JsonArray | toJsonArray() Returns a Json array representation of the Buffer. |
JsonObject | toJsonObject() Returns a Json object representation of the Buffer. |
String | toString(String enc) Returns a String representation of the Buffer with the encoding specified by enc |
String | toString(Charset enc) Returns a String representation of the Buffer with the encoding specified by enc |
String | toString() Returns a String representation of the Buffer with the UTF-8 encoding |