Add the ability to set byte[] buf