Liking cljdoc? Tell your friends :D

octet.buffer

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).
raw docstring

*byte-order*clj/s

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.
sourceraw docstring

allocateclj/smultimethod

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.

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.
sourceraw docstring

IBufferByteclj/s≠protocol

read-byteclj/s

(read-byte _ pos)

Read one byte from buffer.

Read one byte from buffer.

read-ubyteclj/s

(read-ubyte _ pos)

Read one unsigned byte from buffer.

Read one unsigned byte from buffer.

write-byteclj/s

(write-byte _ pos value)

Write one byte to the buffer.

Write one byte to the buffer.

write-ubyteclj/s

(write-ubyte _ pos value)

Write one unsigned byte to the buffer.

Write one unsigned byte to the buffer.
source

IBufferBytesclj/s≠protocol

read-bytesclj/s

(read-bytes _ pos size)

Read a byte array.

Read a byte array.

write-bytesclj/s

(write-bytes _ pos size data)

Write byte array.

Write byte array.
source

IBufferDoubleclj/s≠protocol

read-doubleclj/s

(read-double _ pos)

Read an double (64 bits) from buffer.

Read an double (64 bits) from buffer.

write-doubleclj/s

(write-double _ pos value)

Write a double to the buffer.

Write a double to the buffer.
source

IBufferFloatclj/s≠protocol

write-floatclj/s

(write-float _ pos value)

Write a float to the buffer.

Write a float to the buffer.

read-floatclj/s

(read-float _ pos)

Read an float (32 bits) from buffer.

Read an float (32 bits) from buffer.
source

IBufferIntclj/s≠protocol

read-intclj/s

(read-int _ pos)

Read an integer (32 bits) from buffer.

Read an integer (32 bits) from buffer.

read-uintclj/s

(read-uint _ pos)

Read an unsigned integer (32 bits) from buffer.

Read an unsigned integer (32 bits) from buffer.

write-intclj/s

(write-int _ pos value)

Write an integer to the buffer.

Write an integer to the buffer.

write-uintclj/s

(write-uint _ pos value)

Write an unsigned integer to the buffer.

Write an unsigned integer to the buffer.
source

IBufferLimitclj/s≠protocol

get-capacityclj/s

(get-capacity _)

Get the read/write capacity in bytes.

Get the read/write capacity in bytes.
source

IBufferLongclj/s≠protocol

read-longclj/s

(read-long _ pos)

Read an long (64 bits) from buffer.

Read an long (64 bits) from buffer.

read-ulongclj/s

(read-ulong _ pos)

Read an unsigned long (64 bits) from buffer.

Read an unsigned long (64 bits) from buffer.

write-longclj/s

(write-long _ pos value)

Write a long to the buffer.

Write a long to the buffer.

write-ulongclj/s

(write-ulong _ pos value)

Write an unsigned long to the buffer.

Write an unsigned long to the buffer.
source

IBufferShortclj/s≠protocol

read-shortclj/s

(read-short _ pos)

Read short integer (16 bits) from buffer.

Read short integer (16 bits) from buffer.

read-ushortclj/s

(read-ushort _ pos)

Read unsigned short integer (16 bits) from buffer.

Read unsigned short integer (16 bits) from buffer.

write-shortclj/s

(write-short _ pos value)

Write a short integer to the buffer.

Write a short integer to the buffer.

write-ushortclj/s

(write-ushort _ pos value)

Write a unsigned short integer to the buffer.

Write a unsigned short integer to the buffer.
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close