* [bug] getBuffer should return the length writen to destBuffer