Package io.vertx.mutiny.core.buffer
Class Buffer
java.lang.Object
io.vertx.mutiny.core.buffer.Buffer
- All Implemented Interfaces:
- MutinyDelegate,- io.vertx.core.shareddata.impl.ClusterSerializable
public class Buffer
extends Object
implements MutinyDelegate, io.vertx.core.shareddata.impl.ClusterSerializable
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.
NOTE: This class has been automatically generated from theoriginal non Mutiny-ified interface using Vert.x codegen.- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionappendBuffer(Buffer buff) appendBuffer(Buffer buff, int offset, int len) appendByte(byte b) appendBytes(byte[] bytes) appendBytes(byte[] bytes, int offset, int len) appendDouble(double d) appendFloat(float f) appendInt(int i) appendIntLE(int i) appendLong(long l) appendLongLE(long l) appendMedium(int i) appendMediumLE(int i) appendShort(short s) appendShortLE(short s) appendString(String str) appendString(String str, String enc) appendUnsignedByte(short b) appendUnsignedInt(long i) appendUnsignedIntLE(long i) appendUnsignedShort(int s) appendUnsignedShortLE(int s) static Bufferbuffer()static Bufferbuffer(byte[] bytes) static Bufferbuffer(int initialSizeHint) static Bufferbuffer(io.netty.buffer.ByteBuf byteBuf) Deprecated.removed from public API in Vert.x 5static Bufferstatic Buffercopy()booleangetBuffer(int start, int end) bytegetByte(int pos) io.netty.buffer.ByteBufDeprecated.removed from public API in Vert.x 5byte[]getBytes()getBytes(byte[] dst) getBytes(byte[] dst, int dstIndex) byte[]getBytes(int start, int end) getBytes(int start, int end, byte[] dst) getBytes(int start, int end, byte[] dst, int dstIndex) io.vertx.core.buffer.BufferdoublegetDouble(int pos) floatgetFloat(int pos) intgetInt(int pos) intgetIntLE(int pos) longgetLong(int pos) longgetLongLE(int pos) intgetMedium(int pos) intgetMediumLE(int pos) shortgetShort(int pos) shortgetShortLE(int pos) getString(int start, int end) shortgetUnsignedByte(int pos) longgetUnsignedInt(int pos) longgetUnsignedIntLE(int pos) intgetUnsignedMedium(int pos) intgetUnsignedMediumLE(int pos) intgetUnsignedShort(int pos) intgetUnsignedShortLE(int pos) inthashCode()intlength()static BuffernewInstance(io.vertx.core.buffer.Buffer arg) intreadFromBuffer(int pos, io.vertx.core.buffer.Buffer buffer) setByte(int pos, byte b) setBytes(int pos, byte[] b) setBytes(int pos, byte[] b, int offset, int len) setBytes(int pos, ByteBuffer b) setDouble(int pos, double d) setFloat(int pos, float f) setInt(int pos, int i) setIntLE(int pos, int i) setLong(int pos, long l) setLongLE(int pos, long l) setMedium(int pos, int i) setMediumLE(int pos, int i) setShort(int pos, short s) setShortLE(int pos, short s) setUnsignedByte(int pos, short b) setUnsignedInt(int pos, long i) setUnsignedIntLE(int pos, long i) setUnsignedShort(int pos, int s) setUnsignedShortLE(int pos, int s) slice()slice(int start, int end) toJson()Deprecated.instead usetoJsonValue()io.vertx.core.json.JsonArrayio.vertx.core.json.JsonObjecttoString()voidwriteToBuffer(io.vertx.core.buffer.Buffer buffer) 
- 
Field Details- 
__TYPE_ARG
 
- 
- 
Constructor Details- 
Bufferpublic Buffer(io.vertx.core.buffer.Buffer delegate) 
- 
Buffer
 
- 
- 
Method Details- 
getDelegatepublic io.vertx.core.buffer.Buffer getDelegate()- Specified by:
- getDelegatein interface- MutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
 
- 
writeToBufferpublic void writeToBuffer(io.vertx.core.buffer.Buffer buffer) - Specified by:
- writeToBufferin interface- io.vertx.core.shareddata.impl.ClusterSerializable
 
- 
readFromBufferpublic int readFromBuffer(int pos, io.vertx.core.buffer.Buffer buffer) - Specified by:
- readFromBufferin interface- io.vertx.core.shareddata.impl.ClusterSerializable
 
- 
equals
- 
hashCodepublic int hashCode()
- 
buffer- Returns:
- the buffer
 
- 
buffer- Parameters:
- initialSizeHint- the hint, in bytes
- Returns:
- the buffer
 
- 
buffer- Parameters:
- string- the string
- Returns:
- the buffer
 
- 
buffer- Parameters:
- string- the string
- enc-
- Returns:
- the buffer
 
- 
toString
- 
toString- Parameters:
- enc-
- Returns:
 
- 
toJsonObjectpublic io.vertx.core.json.JsonObject toJsonObject()- Returns:
 
- 
toJsonArraypublic io.vertx.core.json.JsonArray toJsonArray()- Returns:
 
- 
toJsonValue- Returns:
- a Json value which can be a , , String, ... if the buffer contains an array, object, string, ...etc
 
- 
toJsonDeprecated.instead usetoJsonValue()- Returns:
 
- 
getBytepublic byte getByte(int pos) - Parameters:
- pos-
- Returns:
 
- 
getUnsignedBytepublic short getUnsignedByte(int pos) - Parameters:
- pos-
- Returns:
 
- 
getIntpublic int getInt(int pos) - Parameters:
- pos-
- Returns:
 
- 
getIntLEpublic int getIntLE(int pos) - Parameters:
- pos-
- Returns:
 
- 
getUnsignedIntpublic long getUnsignedInt(int pos) - Parameters:
- pos-
- Returns:
 
- 
getUnsignedIntLEpublic long getUnsignedIntLE(int pos) - Parameters:
- pos-
- Returns:
 
- 
getLongpublic long getLong(int pos) - Parameters:
- pos-
- Returns:
 
- 
getLongLEpublic long getLongLE(int pos) - Parameters:
- pos-
- Returns:
 
- 
getDoublepublic double getDouble(int pos) - Parameters:
- pos-
- Returns:
 
- 
getFloatpublic float getFloat(int pos) - Parameters:
- pos-
- Returns:
 
- 
getShortpublic short getShort(int pos) - Parameters:
- pos-
- Returns:
 
- 
getShortLEpublic short getShortLE(int pos) - Parameters:
- pos-
- Returns:
 
- 
getUnsignedShortpublic int getUnsignedShort(int pos) - Parameters:
- pos-
- Returns:
 
- 
getUnsignedShortLEpublic int getUnsignedShortLE(int pos) - Parameters:
- pos-
- Returns:
 
- 
getMediumpublic int getMedium(int pos) - Parameters:
- pos-
- Returns:
 
- 
getMediumLEpublic int getMediumLE(int pos) - Parameters:
- pos-
- Returns:
 
- 
getUnsignedMediumpublic int getUnsignedMedium(int pos) - Parameters:
- pos-
- Returns:
 
- 
getUnsignedMediumLEpublic int getUnsignedMediumLE(int pos) - Parameters:
- pos-
- Returns:
 
- 
getBuffer- Parameters:
- start-
- end-
- Returns:
 
- 
getString- Parameters:
- start-
- end-
- enc-
- Returns:
 
- 
getString- Parameters:
- start-
- end-
- Returns:
 
- 
appendBuffer- Parameters:
- buff-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendBuffer- Parameters:
- buff-
- offset-
- len-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendByte- Parameters:
- b-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendUnsignedByte- Parameters:
- b-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendInt- Parameters:
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendIntLE- Parameters:
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendUnsignedInt- Parameters:
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendUnsignedIntLE- Parameters:
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendMedium- Parameters:
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendMediumLE- Parameters:
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendLong- Parameters:
- l-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendLongLE- Parameters:
- l-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendShort- Parameters:
- s-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendShortLE- Parameters:
- s-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendUnsignedShort- Parameters:
- s-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendUnsignedShortLE- Parameters:
- s-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendFloat- Parameters:
- f-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendDouble- Parameters:
- d-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendString- Parameters:
- str-
- enc-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendString- Parameters:
- str-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setByte- Parameters:
- pos-
- b-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setUnsignedByte- Parameters:
- pos-
- b-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setInt- Parameters:
- pos-
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setIntLE- Parameters:
- pos-
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setUnsignedInt- Parameters:
- pos-
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setUnsignedIntLE- Parameters:
- pos-
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setMedium- Parameters:
- pos-
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setMediumLE- Parameters:
- pos-
- i-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setLong- Parameters:
- pos-
- l-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setLongLE- Parameters:
- pos-
- l-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setDouble- Parameters:
- pos-
- d-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setFloat- Parameters:
- pos-
- f-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setShort- Parameters:
- pos-
- s-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setShortLE- Parameters:
- pos-
- s-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setUnsignedShort- Parameters:
- pos-
- s-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setUnsignedShortLE- Parameters:
- pos-
- s-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setBuffer- Parameters:
- pos-
- b-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setBuffer- Parameters:
- pos-
- b-
- offset-
- len-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setString- Parameters:
- pos-
- str-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setString- Parameters:
- pos-
- str-
- enc-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
lengthpublic int length()- Returns:
 
- 
copy- Returns:
 
- 
slice- Returns:
 
- 
slice- Parameters:
- start-
- end-
- Returns:
 
- 
buffer- Parameters:
- bytes- the byte array
- Returns:
- the buffer
 
- 
bufferDeprecated.removed from public API in Vert.x 5- Parameters:
- byteBuf- the Netty ByteBuf
- Returns:
- the buffer
 
- 
toString- Parameters:
- enc-
- Returns:
 
- 
getBytespublic byte[] getBytes()- Returns:
 
- 
getBytespublic byte[] getBytes(int start, int end) - Parameters:
- start-
- end-
- Returns:
 
- 
getBytes- Parameters:
- dst- the destination byte array
- Returns:
- the instance of Buffer to chain method calls.
 
- 
getBytes- Parameters:
- dst- the destination byte array
- dstIndex-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
getBytes- Parameters:
- start-
- end-
- dst- the destination byte array
- Returns:
- the instance of Buffer to chain method calls.
 
- 
getBytes- Parameters:
- start-
- end-
- dst- the destination byte array
- dstIndex-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendBytes- Parameters:
- bytes-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
appendBytes- Parameters:
- bytes-
- offset-
- len-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setBytes- Parameters:
- pos-
- b-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setBytes- Parameters:
- pos-
- b-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
setBytes- Parameters:
- pos-
- b-
- offset-
- len-
- Returns:
- the instance of Buffer to chain method calls.
 
- 
getByteBufDeprecated.removed from public API in Vert.x 5- Returns:
 
- 
newInstance
 
-