fix bug: if data not wrapped, it will be truncated if data is char *
fix bug: do not treat the begin and the end of buffer as out of range error
fix bug: after reset SegmentalByteBuffer, push the fake segment 0 again
fix bug: remove the already consumed data