Reading/writing functions of stream and buffer for little-endian data.
Reading/writing functions of stream and buffer for little-endian data.
(gen-byte-buffer)
(gen-byte-buffer size)
Generates a new java.nio.ByteBuffer
instance with little-endian byte order.
The default buffer size is 8.
Generates a new `java.nio.ByteBuffer` instance with little-endian byte order. The default buffer size is 8.
Provides feature of reading little-endian values.
Provides feature of reading little-endian values.
(read-byte this)
Reads 1 byte. Returns a byte value.
Reads 1 byte. Returns a byte value.
(read-short this)
Reads 2 bytes. Returns a short value.
Reads 2 bytes. Returns a short value.
(read-null-terminated-string this)
Reads until next null character. Returns a String without the null.
Reads until next null character. Returns a String without the null.
(read-bytes this length)
(read-bytes this buffer offset length)
Reads 'length' bytes to buffer starting from offset bytes. Returns a new byte-array if called without buffer.
Reads 'length' bytes to buffer starting from offset bytes. Returns a new byte-array if called without buffer.
(skip this length)
Skips over 'length' bytes of data, discarding the skipped bytes.
Skips over 'length' bytes of data, discarding the skipped bytes.
(read-double this)
Reads 8 bytes. Returns a double value.
Reads 8 bytes. Returns a double value.
(read-int this)
Reads 4 bytes. Returns an int value.
Reads 4 bytes. Returns an int value.
(read-ushort this)
Reads 2 bytes. Returns an unsigned short value as long.
Reads 2 bytes. Returns an unsigned short value as long.
(read-string this length)
Reads 'length' bytes. Returns a String.
Reads 'length' bytes. Returns a String.
(read-ubyte this)
Reads 1 byte. Returns an unsigned byte value as long.
Reads 1 byte. Returns an unsigned byte value as long.
(read-long this)
Reads 8 bytes. Returns a long value.
Reads 8 bytes. Returns a long value.
(read-uint this)
Reads 4 bytes. Returns an unsigned int value as long.
Reads 4 bytes. Returns an unsigned int value as long.
(read-float this)
Reads 4 bytes. Returns a float value.
Reads 4 bytes. Returns a float value.
Provides feature of writing little-endian values.
Provides feature of writing little-endian values.
(write-ubyte this n)
Writes 1 byte.
Writes 1 byte.
(write-long this n)
Writes an 8-byte long value.
Writes an 8-byte long value.
(write-bytes this b)
Writes a byte-array.
Writes a byte-array.
(write-ushort this n)
Writes a 2-byte unsigned short value.
Writes a 2-byte unsigned short value.
(write-char this n)
Writes a 1-byte ascii character.
Writes a 1-byte ascii character.
(write-uint this n)
Writes a 4-byte unsigned integer value.
Writes a 4-byte unsigned integer value.
(write-string this s)
Writes a string as a sequence of ascii characters.
Writes a string as a sequence of ascii characters.
(write-float this n)
Writes a 4-byte float value.
Writes a 4-byte float value.
(write-short this n)
Writes a 2-byte short value.
Writes a 2-byte short value.
(write-int this n)
Writes a 4-byte integer value.
Writes a 4-byte integer value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close