readHexString method

String readHexString({
  1. int bytes = 0,
  2. int bits = 0,
})

Reads a HEX string from the stream of length bytes and bits

Implementation

String readHexString({int bytes = 0, int bits = 0}) {
  try {
    return hex.encode(readBytes(bytes: bytes, bits: bits));
  } on Exception {}
  return "";
}