modify interface for append, use ByteBuffer to replace byte[] for zero copy