Java io.vertx.core.buffer Buffer fields, constructors, methods, implement or subclass

Example usage for Java io.vertx.core.buffer Buffer fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for io.vertx.core.buffer Buffer.

The text is from its open source code.

Constructor

Method

BufferappendBuffer(Buffer buff)
Appends the specified Buffer to the end of this Buffer.
BufferappendBuffer(Buffer buff, int offset, int len)
Appends the specified Buffer starting at the offset using len to the end of this Buffer.
BufferappendByte(byte b)
Appends the specified byte to the end of the Buffer.
BufferappendBytes(byte[] bytes)
Appends the specified byte[] to the end of the Buffer.
BufferappendBytes(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.
BufferappendInt(int i)
Appends the specified int to the end of the Buffer.
BufferappendLong(long l)
Appends the specified long to the end of the Buffer.
BufferappendShort(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.

BufferappendString(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

BufferappendString(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.

Buffercopy()
Returns a copy of the entire Buffer.
BuffergetBuffer(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
bytegetByte(int pos)
Returns the byte at position pos in the Buffer.
ByteBufgetByteBuf()
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
BuffergetBytes(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[]
intgetInt(int pos)
Returns the int at position pos in the Buffer.
longgetLong(int pos)
Returns the long at position pos in the Buffer.
shortgetShort(int pos)
Returns the short at position pos in the Buffer.
StringgetString(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
StringgetString(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
shortgetUnsignedByte(int pos)
Returns the unsigned byte at position pos in the Buffer, as a short .
intlength()
Returns the length of the buffer, measured in bytes.
BuffersetBytes(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.

BuffersetBytes(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.

BuffersetInt(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.

BuffersetString(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.

BuffersetUnsignedByte(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.

Bufferslice()
Returns a slice of this buffer.
Bufferslice(int start, int end)
Returns a slice of this buffer.
JsonArraytoJsonArray()
Returns a Json array representation of the Buffer.
JsonObjecttoJsonObject()
Returns a Json object representation of the Buffer.
StringtoString(String enc)
Returns a String representation of the Buffer with the encoding specified by enc
StringtoString(Charset enc)
Returns a String representation of the Buffer with the encoding specified by enc
StringtoString()
Returns a String representation of the Buffer with the UTF-8 encoding