Most data is shuffled around inside Vert.x using buffers.

A buffer is a sequence of zero or more bytes that can read from or written to and which expands automatically as necessary to accommodate any bytes written to it. You can perhaps think of a buffer as smart byte array.

Please consult the documentation for more information on buffers.

  • Buffer
    • Basic
      • Identifiable
      • Object
        • Anything

no subtypes hierarchy

Initializer
Buffer(Buffer unknown)
Attributes
stringshared actual default String string

A developer-friendly string representing the instance. Concatenates the name of the concrete class of the instance with the hash of the instance. Subclasses are encouraged to refine this implementation to produce a more meaningful representation.

Refines Object.string
Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
appendBuffershared default Buffer appendBuffer(Buffer buff)

Appends the specified Buffer to the end of this Buffer. The buffer will expand as necessary to accommodate any bytes written.

Returns a reference to this so multiple operations can be appended together.

appendBuffershared default Buffer appendBuffer(Buffer buff, Integer offset, Integer len)

Appends the specified Buffer starting at the offset using len to the end of this Buffer. The buffer will expand as necessary to accommodate any bytes written.

Returns a reference to this so multiple operations can be appended together.

appendByteshared default Buffer appendByte(Byte b)

Appends the specified byte 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.

appendDoubleshared default Buffer appendDouble(Float d)

Appends the specified double 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.

appendFloatshared default Buffer appendFloat(Float f)

Appends the specified float 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.

appendIntshared default Buffer appendInt(Integer i)

Appends the specified int 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.

appendIntLEshared default Buffer appendIntLE(Integer i)

Appends the specified int to the end of the Buffer in the Little Endian Byte Order. The buffer will expand as necessary to accommodate any bytes written.

Returns a reference to this so multiple operations can be appended together.

appendLongshared default Buffer appendLong(Integer l)

Appends the specified long 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.

appendLongLEshared default Buffer appendLongLE(Integer l)

Appends the specified long to the end of the Buffer in the Little Endian Byte Order. The buffer will expand as necessary to accommodate any bytes written.

Returns a reference to this so multiple operations can be appended together.

appendMediumshared default Buffer appendMedium(Integer i)

Appends the specified 24bit int 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.

appendMediumLEshared default Buffer appendMediumLE(Integer i)

Appends the specified 24bit int to the end of the Buffer in the Little Endian Byte Order. The buffer will expand as necessary to accommodate any bytes written.

Returns a reference to this so multiple operations can be appended together.

appendShortshared default Buffer appendShort(Integer 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.

appendShortLEshared default Buffer appendShortLE(Integer s)

Appends the specified short to the end of the Buffer in the Little Endian Byte Order.The buffer will expand as necessary to accommodate any bytes written.

Returns a reference to this so multiple operations can be appended together.

appendStringshared default 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

appendStringshared default 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.

appendUnsignedByteshared default Buffer appendUnsignedByte(Integer b)

Appends the specified unsigned byte 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.

appendUnsignedIntshared default Buffer appendUnsignedInt(Integer i)

Appends the specified unsigned int 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.

appendUnsignedIntLEshared default Buffer appendUnsignedIntLE(Integer i)

Appends the specified unsigned int to the end of the Buffer in the Little Endian Byte Order. The buffer will expand as necessary to accommodate any bytes written.

Returns a reference to this so multiple operations can be appended together.

appendUnsignedShortshared default Buffer appendUnsignedShort(Integer s)

Appends the specified unsigned 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.

appendUnsignedShortLEshared default Buffer appendUnsignedShortLE(Integer s)

Appends the specified unsigned short to the end of the Buffer in the Little Endian Byte Order.The buffer will expand as necessary to accommodate any bytes written.

Returns a reference to this so multiple operations can be appended together.

copyshared default Buffer copy()

Returns a copy of the entire Buffer.

getBuffershared default Buffer getBuffer(Integer start, Integer end)

Returns a copy of a sub-sequence the Buffer as a Buffer starting at position start and ending at position end - 1

getByteshared default Byte getByte(Integer pos)

Returns the byte at position pos in the Buffer.

getDoubleshared default Float getDouble(Integer pos)

Returns the double at position pos in the Buffer.

getFloatshared default Float getFloat(Integer pos)

Returns the float at position pos in the Buffer.

getIntshared default Integer getInt(Integer pos)

Returns the int at position pos in the Buffer.

getIntLEshared default Integer getIntLE(Integer pos)

Gets a 32-bit integer at the specified absolute index in this buffer with Little Endian Byte Order.

getLongshared default Integer getLong(Integer pos)

Returns the long at position pos in the Buffer.

getLongLEshared default Integer getLongLE(Integer pos)

Gets a 64-bit long integer at the specified absolute index in this buffer in Little Endian Byte Order.

getMediumshared default Integer getMedium(Integer pos)

Gets a 24-bit medium integer at the specified absolute index in this buffer.

getMediumLEshared default Integer getMediumLE(Integer pos)

Gets a 24-bit medium integer at the specified absolute index in this buffer in the Little Endian Byte Order.

getShortshared default Integer getShort(Integer pos)

Returns the short at position pos in the Buffer.

getShortLEshared default Integer getShortLE(Integer pos)

Gets a 16-bit short integer at the specified absolute index in this buffer in Little Endian Byte Order.

getStringshared default String getString(Integer start, Integer 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

getStringshared default String getString(Integer start, Integer 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

getUnsignedByteshared default Integer getUnsignedByte(Integer pos)

Returns the unsigned byte at position pos in the Buffer, as a short.

getUnsignedIntshared default Integer getUnsignedInt(Integer pos)

Returns the unsigned int at position pos in the Buffer, as a long.

getUnsignedIntLEshared default Integer getUnsignedIntLE(Integer pos)

Returns the unsigned int at position pos in the Buffer, as a long in Little Endian Byte Order.

getUnsignedMediumshared default Integer getUnsignedMedium(Integer pos)

Gets an unsigned 24-bit medium integer at the specified absolute index in this buffer.

getUnsignedMediumLEshared default Integer getUnsignedMediumLE(Integer pos)

Gets an unsigned 24-bit medium integer at the specified absolute index in this buffer in Little Endian Byte Order.

getUnsignedShortshared default Integer getUnsignedShort(Integer pos)

Returns the unsigned short at position pos in the Buffer, as an int.

getUnsignedShortLEshared default Integer getUnsignedShortLE(Integer pos)

Gets an unsigned 16-bit short integer at the specified absolute index in this buffer in Little Endian Byte Order.

lengthshared default Integer length()

Returns the length of the buffer, measured in bytes. All positions are indexed from zero.

setBuffershared default Buffer setBuffer(Integer pos, Buffer b)

Sets the bytes at position pos in the Buffer to the bytes represented by the Buffer b.

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

setBuffershared default Buffer setBuffer(Integer pos, Buffer b, Integer offset, Integer len)

Sets the bytes at position pos in the Buffer to the bytes represented by the Buffer b on the given offset and len.

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

setByteshared default Buffer setByte(Integer pos, Byte b)

Sets the byte at position pos in the Buffer to the value b.

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

setDoubleshared default Buffer setDouble(Integer pos, Float d)

Sets the double at position pos in the Buffer to the value d.

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

setFloatshared default Buffer setFloat(Integer pos, Float f)

Sets the float at position pos in the Buffer to the value f.

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

setIntshared default Buffer setInt(Integer pos, Integer 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.

setIntLEshared default Buffer setIntLE(Integer pos, Integer i)

Sets the int at position pos in the Buffer to the value i in the Little Endian Byte Order.

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

setLongshared default Buffer setLong(Integer pos, Integer l)

Sets the long at position pos in the Buffer to the value l.

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

setLongLEshared default Buffer setLongLE(Integer pos, Integer l)

Sets the long at position pos in the Buffer to the value l in the Little Endian Byte Order.

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

setMediumshared default Buffer setMedium(Integer pos, Integer i)

Sets the 24bit int at position pos in the Buffer to the value i.

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

setMediumLEshared default Buffer setMediumLE(Integer pos, Integer i)

Sets the 24bit int at position pos in the Buffer to the value i. in the Little Endian Byte Order

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

setShortshared default Buffer setShort(Integer pos, Integer s)

Sets the short at position pos in the Buffer to the value s.

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

setShortLEshared default Buffer setShortLE(Integer pos, Integer s)

Sets the short at position pos in the Buffer to the value s in the Little Endian Byte Order.

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

setStringshared default Buffer setString(Integer 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.

setStringshared default Buffer setString(Integer pos, String str, String enc)

Sets the bytes at position pos in the Buffer to the value of str encoded in encoding enc.

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

setUnsignedByteshared default Buffer setUnsignedByte(Integer pos, Integer 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.

setUnsignedIntshared default Buffer setUnsignedInt(Integer pos, Integer i)

Sets the unsigned int at position pos in the Buffer to the value i.

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

setUnsignedIntLEshared default Buffer setUnsignedIntLE(Integer pos, Integer i)

Sets the unsigned int at position pos in the Buffer to the value i in the Little Endian Byte Order.

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

setUnsignedShortshared default Buffer setUnsignedShort(Integer pos, Integer s)

Sets the unsigned short at position pos in the Buffer to the value s.

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

setUnsignedShortLEshared default Buffer setUnsignedShortLE(Integer pos, Integer s)

Sets the unsigned short at position pos in the Buffer to the value s in the Little Endian Byte Order.

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

sliceshared default Buffer slice()

Returns a slice of this buffer. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks.

sliceshared default Buffer slice(Integer start, Integer end)

Returns a slice of this buffer. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks.

toJsonArrayshared default Array toJsonArray()

Returns a Json array representation of the Buffer

toJsonObjectshared default Object toJsonObject()

Returns a Json object representation of the Buffer

toStringshared default String toString(String enc)

Returns a String representation of the Buffer with the encoding specified by enc

Inherited Methods
Methods inherited from: Object
equals