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.
package |
Default |
---|
__construct()
appendBuffer( $arg0, $arg1 = null, $arg2 = null) : $this
param $buff [Buffer] appendBuffer($buff)
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.
param $buff [Buffer] param $offset [integer] param $len [integer] appendBuffer($buff, $offset, $len)
Buffer
integer
integer
$this
appendByte( $arg0) : $this
integer
$this
appendDouble( $arg0) : $this
float
$this
appendFloat( $arg0) : $this
float
$this
appendInt( $arg0) : $this
integer
$this
appendIntLE( $arg0) : $this
integer
$this
appendLong( $arg0) : $this
integer
$this
appendLongLE( $arg0) : $this
integer
$this
appendMedium( $arg0) : $this
integer
$this
appendMediumLE( $arg0) : $this
integer
$this
appendShort( $arg0) : $this
integer
$this
appendShortLE( $arg0) : $this
integer
$this
appendString( $arg0, $arg1 = null) : $this
param $str [string] appendString($str)
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.
param $str [string] param $enc [string] appendString($str, $enc)
string
string
$this
appendUnsignedByte( $arg0) : $this
integer
$this
appendUnsignedInt( $arg0) : $this
integer
$this
appendUnsignedIntLE( $arg0) : $this
integer
$this
appendUnsignedShort( $arg0) : $this
integer
$this
appendUnsignedShortLE( $arg0) : $this
integer
$this
buffer( $arg0 = null, $arg1 = null) : \io\vertx\jphp\core\buffer\Buffer
buffer()
Create a new buffer given the initial size hint.
If you know the buffer will require a certain size, providing the hint can prevent unnecessary re-allocations as the buffer is written to and resized. param $initialSizeHint [integer] the hint, in bytes buffer($initialSizeHint) Create a new buffer from a string. The string will be UTF-8 encoded into the buffer. param $string [string] the string buffer($string) Create a new buffer from a string and using the specified encoding. The string will be encoded into the buffer using the specified encoding. param $string [string] the string param $enc [string] buffer($string, $enc)
string | integer
string
\io\vertx\jphp\core\buffer\Buffer
the buffer
copy() : \io\vertx\jphp\core\buffer\Buffer
getBuffer( $arg0, $arg1) : \io\vertx\jphp\core\buffer\Buffer
getByte( $arg0) : integer
integer
integer
getDouble( $arg0) : float
integer
float
getFloat( $arg0) : float
integer
float
getInt( $arg0) : integer
integer
integer
getIntLE( $arg0) : integer
integer
integer
getLong( $arg0) : integer
integer
integer
getLongLE( $arg0) : integer
integer
integer
getMedium( $arg0) : integer
integer
integer
getMediumLE( $arg0) : integer
integer
integer
getShort( $arg0) : integer
integer
integer
getShortLE( $arg0) : integer
integer
integer
getString( $arg0, $arg1, $arg2 = null) : string
param $start [integer] param $end [integer] getString($start, $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 the specified encoding
param $start [integer] param $end [integer] param $enc [string] getString($start, $end, $enc)
integer
integer
string
string
getUnsignedByte( $arg0) : integer
integer
integer
getUnsignedInt( $arg0) : integer
integer
integer
getUnsignedIntLE( $arg0) : integer
integer
integer
getUnsignedMedium( $arg0) : integer
integer
integer
getUnsignedMediumLE( $arg0) : integer
integer
integer
getUnsignedShort( $arg0) : integer
integer
integer
getUnsignedShortLE( $arg0) : integer
integer
integer
length() : integer
All positions are indexed from zero.
integer
setBuffer( $arg0, $arg1, $arg2 = null, $arg3 = null) : $this
param $pos [integer] param $b [Buffer] setBuffer($pos, $b)
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.
param $pos [integer] param $b [Buffer] param $offset [integer] param $len [integer] setBuffer($pos, $b, $offset, $len)
integer
Buffer
integer
integer
$this
setByte( $arg0, $arg1) : $this
integer
integer
$this
setDouble( $arg0, $arg1) : $this
integer
float
$this
setFloat( $arg0, $arg1) : $this
integer
float
$this
setInt( $arg0, $arg1) : $this
integer
integer
$this
setIntLE( $arg0, $arg1) : $this
integer
integer
$this
setLong( $arg0, $arg1) : $this
integer
integer
$this
setLongLE( $arg0, $arg1) : $this
integer
integer
$this
setMedium( $arg0, $arg1) : $this
integer
integer
$this
setMediumLE( $arg0, $arg1) : $this
integer
integer
$this
setShort( $arg0, $arg1) : $this
integer
integer
$this
setShortLE( $arg0, $arg1) : $this
integer
integer
$this
setString( $arg0, $arg1, $arg2 = null) : $this
param $pos [integer] param $str [string] setString($pos, $str)
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.
param $pos [integer] param $str [string] param $enc [string] setString($pos, $str, $enc)
integer
string
string
$this
setUnsignedByte( $arg0, $arg1) : $this
integer
integer
$this
setUnsignedInt( $arg0, $arg1) : $this
integer
integer
$this
setUnsignedIntLE( $arg0, $arg1) : $this
integer
integer
$this
setUnsignedShort( $arg0, $arg1) : $this
integer
integer
$this
setUnsignedShortLE( $arg0, $arg1) : $this
integer
integer
$this
slice( $arg0 = null, $arg1 = null) : \io\vertx\jphp\core\buffer\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.
param $start [integer] param $end [integer] slice($start, $end)
integer
integer
\io\vertx\jphp\core\buffer\Buffer
toJsonArray() : array
array
toJsonObject() : array
array
toString( $arg0 = null) : string
toString()
Returns a String
representation of the Buffer with the encoding specified by enc
param $enc [string] toString($enc)
string
string