Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
class BaseBuffer
Re-export
import { BaseBuffer } from "https://deno.land/x/neo4j_lite_client@4.4.6/bolt-connection/buf/index.js";

Common base with default implementation for most buffer methods. Buffers are stateful - they track a current "position", this helps greatly when reading and writing from them incrementally. You can also ignore the stateful read/write methods. readXXX and writeXXX-methods move the inner position of the buffer. putXXX and getXXX-methods do not.

Constructors

new
BaseBuffer(size)

Create a instance with the injected size.

Methods

_updatePos(length)
getFloat64(position)
getInt8(position)
getSlice(start, length)

Get a slice of this buffer. This method does not copy any data, but simply provides a slice view of this buffer

getUInt8(position)

Has remaining

putBytes(position, other)
putFloat64(position, val)
putInt16(p, val)
putInt32(p, val)
putInt64(p, val)
putInt8(position, val)
putUInt16(p, val)
putUInt32(p, val)
putUInt8(position, val)

Read from state position.

Read from state position.

Read from state position.

Read from state position.

Read from state position.

readSlice(length)

Get a slice of this buffer. This method does not copy any data, but simply provides a slice view of this buffer

Read from state position.

Read from state position.

Read from state position.

Get remaining

Reset position state

Get string representation of buffer.

Get string representation of buffer and it's state.

Write to state position.

Write to state position.

Write to state position.

Write to state position.

Write to state position.

Write to state position.

Write to state position.

Write to state position.