position property

int get position

Implementation

int get position => _position;
set position (int p)

Sets this reader's position. If new position is negative, it is treated as current_position() + new_position

p is the new position value return The current position of this writer

Implementation

set position(int p) {
  if (p < 0) {
    p += _position;
  }
  if (p < 0 || p >= _lengthInBytes) {
    throw ArgumentError(
        "illegal set position  : position = $_position, targetPosition = $p, total buffer length =$_lengthInBytes");
  }

  _position = p;
}