can avoid using trim (/an array copy) here by using RateLimitedOutputStream#write(bytes, offset, length)