byte_array_input_stream

Creator: coderz1093

Last updated:

0 purchases

byte_array_input_stream Image
byte_array_input_stream Images

Languages

Categories

Add to Cart

Description:

byte array input stream

byte_array_input_stream #
Binary reader like Java's own ByteArrayInputStrem and DataInputStream.
Based on Tomonori Takao's work published on Pub.dev.
Add as a dependency #
dependencies:
byte_array_input_stream_like_java: ^1.0.0
copied to clipboard
Usage #
Given an instance l of Uint8List, one can use the main class of this package as follows:
final bais = ByteArrayInputStream(l, Endian.host);
copied to clipboard
with Endian.host specifying which endianness the machine Dart is running on is using.
With bais one can call the methods:

readInt8() to read one byte (8-bit integer ranging from -128 to 127)
readUInt8() to read one unsigned byte (8-bit integer ranging from 0 to 255)
readInt16() to read two bytes or a "short integer" (16-bit integer)
readUInt16() to read two unsigned bytes or a "short unsigned integer" (16-bit integer)
readInt32() to read four bytes or an "integer" (32-bit integer)
readUInt32() to read four unsigned bytes or an "unsigned integer" (32-bit integer)
readInt64() to read eight bytes or a "long integer" (64-bit integer)
readUInt64() to read eight unsigned bytes or a "unsigned long integer" (64-bit integer)
readFloat() to read four bytes interpreted as a "single-precision floating point" (32-bit floating point)
readDouble() to read eight bytes interpreted as a "double-precision floating point" (64-bit floating point)
readUint8List() to read the bytes and return them as they are but in the form of a list of integers;
readUint16List() to read the bytes in couples and return them as they are but in the form of a list of integers.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.