Buffer abstractions.
This includes a common, plataform agnostic abstractions defined with clojure protocols for treat with different bytebuffers implementations.
Also inclues a polymorphic methods for allocate new bytebuffers with support for nio bytebuffers, netty41 bytebuffers and es6 typed arrays (from javascript environments).
Buffer abstractions. This includes a common, plataform agnostic abstractions defined with clojure protocols for treat with different bytebuffers implementations. Also inclues a polymorphic methods for allocate new bytebuffers with support for nio bytebuffers, netty41 bytebuffers and es6 typed arrays (from javascript environments).
Defines the default byte order used for the write and read operations on the byte buffers.
Defines the default byte order used for the write and read operations on the byte buffers.
Polymorphic function for allocate new bytebuffers.
It allows allocate using different implementation of bytebuffers and different types of them.
As example, you may want allocate nio direct buffer of 4 bytes:
(allocate 4 {:type :direct :impl :nio})
The supported options pairs are:
:heap
, impl: :nio
(default):direct
, impl: :nio
:heap
, impl: :netty
:direct
, impl: :netty
:es6
(clojurescript) (default)This function is defined as multimethod and you can extend it with your own bytebuffer implementations if you want or need it.
Polymorphic function for allocate new bytebuffers. It allows allocate using different implementation of bytebuffers and different types of them. As example, you may want allocate nio direct buffer of 4 bytes: (allocate 4 {:type :direct :impl :nio}) The supported options pairs are: - type: `:heap`, impl: `:nio` (default) - type: `:direct`, impl: `:nio` - type: `:heap`, impl: `:netty` - type: `:direct`, impl: `:netty` - impl: `:es6` (clojurescript) (default) This function is defined as multimethod and you can extend it with your own bytebuffer implementations if you want or need it.
(read-byte _ pos)
Read one byte from buffer.
Read one byte from buffer.
(read-ubyte _ pos)
Read one unsigned byte from buffer.
Read one unsigned byte from buffer.
(write-byte _ pos value)
Write one byte to the buffer.
Write one byte to the buffer.
(write-ubyte _ pos value)
Write one unsigned byte to the buffer.
Write one unsigned byte to the buffer.
(read-bytes _ pos size)
Read a byte array.
Read a byte array.
(write-bytes _ pos size data)
Write byte array.
Write byte array.
(read-double _ pos)
Read an double (64 bits) from buffer.
Read an double (64 bits) from buffer.
(write-double _ pos value)
Write a double to the buffer.
Write a double to the buffer.
(write-float _ pos value)
Write a float to the buffer.
Write a float to the buffer.
(read-float _ pos)
Read an float (32 bits) from buffer.
Read an float (32 bits) from buffer.
(read-int _ pos)
Read an integer (32 bits) from buffer.
Read an integer (32 bits) from buffer.
(read-uint _ pos)
Read an unsigned integer (32 bits) from buffer.
Read an unsigned integer (32 bits) from buffer.
(write-int _ pos value)
Write an integer to the buffer.
Write an integer to the buffer.
(write-uint _ pos value)
Write an unsigned integer to the buffer.
Write an unsigned integer to the buffer.
(get-capacity _)
Get the read/write capacity in bytes.
Get the read/write capacity in bytes.
(read-long _ pos)
Read an long (64 bits) from buffer.
Read an long (64 bits) from buffer.
(read-ulong _ pos)
Read an unsigned long (64 bits) from buffer.
Read an unsigned long (64 bits) from buffer.
(write-long _ pos value)
Write a long to the buffer.
Write a long to the buffer.
(write-ulong _ pos value)
Write an unsigned long to the buffer.
Write an unsigned long to the buffer.
(read-short _ pos)
Read short integer (16 bits) from buffer.
Read short integer (16 bits) from buffer.
(read-ushort _ pos)
Read unsigned short integer (16 bits) from buffer.
Read unsigned short integer (16 bits) from buffer.
(write-short _ pos value)
Write a short integer to the buffer.
Write a short integer to the buffer.
(write-ushort _ pos value)
Write a unsigned short integer to the buffer.
Write a unsigned short integer to the buffer.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close