BytesBuilder: DartByteArrayOutputStream: Java| constructor bytes/ByteArray --growable/bool= | Constructs a new buffer, using the given bytes as backing array. |
|---|---|
| constructor | Constructs a new buffer. |
import io
main:
buffer := io.Buffer
buffer.big-endian.write-int32 0x12345678
// The most significant byte 0x12 is at index 0.
print buffer.bytes // => #[0x12, 0x34, 0x56, 0x78]
// The buffer version also supports 'put' operations
buffer.big-endian.put-int32 --at=0 0x11223344
import io
main:
buffer := io.Buffer
buffer.little-endian.write-int32 0x12345678
// The least significant byte 0x78 is at index 0.
print buffer.bytes // => #[0x78, 0x56, 0x34, 0x12]
// The buffer version also supports 'put' operations
buffer.little-endian.put-int32 --at=0 0x11223344
class Pin:
number/int
constructor .number:
operator == other:
if other is not Pin: return false
return number == other.number
hash-code method. That is, if a class has a hash-code member, then the equality and hash-code must agree. If two instances are equal (a == b), then their hash codes must also be equal (a.hash-code == b.hash-code).bytes.to-string.