@Override
    public void getText(int offset, int length, Segment segment) {
      char[] s = getText(offset, length).toCharArray();
      segment.array = s;
      segment.offset = 0;
      segment.count = s.length;
    }
@Override
    public void getText(int offset, int length, Segment segment)