MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / read

Method read

lib/readers.js:104–112  ·  view source on GitHub ↗

* Reads any number of bytes and moves the offset. * if length not provided or it's larger than the remaining bytes, reads to end. * @param length * @returns {Buffer}

(length)

Source from the content-addressed store, hash-verified

102 * @returns {Buffer}
103 */
104 read(length) {
105 let end = this.buf.length;
106 if (typeof length !== 'undefined' && this.offset + length < this.buf.length) {
107 end = this.offset + length;
108 }
109 const bytes = this.slice(this.offset, end);
110 this.offset = end;
111 return bytes;
112 }
113
114 /**
115 * Moves the reader cursor to the end

Callers 11

readBytesMethod · 0.95
readShortBytesMethod · 0.95
readInetMethod · 0.95
readInetAddressMethod · 0.95
readFlagsInfoMethod · 0.95
parser-tests.jsFile · 0.45
buildParserAndExpectFunction · 0.45
basic-tests.jsFile · 0.45
graphson-tests.jsFile · 0.45

Calls 1

sliceMethod · 0.95

Tested by

no test coverage detected