DebugHexEncoder class
Converts bytes into a formatted hex-dump for debugging.
By default, outputs rows of 16 bytes grouped visually:
0x0000: 0123 4567 89ab cdef 0123 4567 89ab cdef
(0)
0x0010: 0123 4567 89ab cdef 0123 4567 89ab cdef
(16)
When expected is provided, differences are shown with markers:
0x0000: 0123 5555 89ab cdef 0123 4567 89ab cdef
(0) ^ ^^ <-- index of the first error: 0x02 (decimal: 2)
4 67
0x0010: 0123 4567 89ab cdef 0123 4567 89
(16) ^^ ^^^^ <-- index of the first error: 0x0D (decimal: 13)
ab cdef
Constructors
-
DebugHexEncoder({int bytesPerRow = 16, List<
int> groups = const [2, 4]}) -
const
Properties
- bytesPerRow → int
-
final
-
groups
→ List<
int> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bind(
Stream< Iterable< stream) → Stream<int> >String> -
Transforms the provided
stream.inherited -
cast<
RS, RT> () → Converter< RS, RT> -
Provides a
Converter<RS, RT>view of this stream transformer.inherited -
convert(
Iterable< int> iterable, {List<int> ? expected}) → String -
Converts
inputand returns the result of the conversion.override -
fuse<
TT> (Converter< String, TT> other) → Converter<Iterable< int> , TT> -
Fuses
thiswithother.inherited -
getSpaceBefore(
int i) → String - Returns the spacing before each byte according to groups and bytesPerRow.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startChunkedConversion(
Sink< String> sink) → Sink<Iterable< int> > -
Starts a chunked conversion.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited