You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Renamed OutOfBoundsError to EndOfStreamError Added separate eslint configuration for tests that disables `no-explicit-any` requirement Added out of bounds checking for some of `BinaryWriter` methods + corresponding tests Reworked BinaryWriter magic numbers to use defined constants instead Reworked BinaryWriter tests to use number constants for number range Added more tests and filled in missing functionalities in `BinaryWriter` Wrapped up functionality and tests for BinaryWriter
* @returns {number} Number between -65,536 and 32,767.
167
-
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
167
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
189
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
* @returns {number} Number between -2,147,483,648 and 2,147,483,647.
207
-
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
207
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
* @returns {number} Number between 0 and 4,294,967,296.
234
-
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
234
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
* @returns {string} String representing a number between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807
266
-
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
266
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
* @returns {number} Number between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807
303
-
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
303
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
* @returns {string} String representing a number between 0 and 18,446,744,073,709,551,615.
318
-
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
318
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
* @returns {number} Number between 0 and 18,446,744,073,709,551,615.
353
-
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
353
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
367
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
387
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
388
388
*/
389
389
publicreadDouble(): number
390
390
{
@@ -406,7 +406,7 @@ export class BinaryReader
406
406
* @param {Encoding} encoding The encoding to use when reading the chars.
407
407
* @returns {string} A single character read from the stream
408
408
* @throws `EncodingError` Thrown when an unknown encoding is provided as the argument.
409
-
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
409
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
410
410
* @throws `InvalidUtf8CharacterError` Thrown when using UTF-8 encoding when an incorrect UTF-8 character sequence is encountered.
* @returns {string} A string read from the stream.
434
434
* @throws `InvalidArgumentError` Thrown when `charactersToRead` is not a number nor numeric string or when it is less than 1.
435
435
* @throws `EncodingError` Thrown when an unknown encoding is provided as the argument.
436
-
* @throws `OutOfBoundsError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
436
+
* @throws `EndOfStreamError` Thrown when there are not enough bytes left in the stream. Position of the stream does not change if this exception is thrown.
437
437
* @throws `InvalidUtf8CharacterError` Thrown when using UTF-8 encoding when an incorrect UTF-8 character sequence is encountered.
0 commit comments