public void setEncodedSize(int size) {
        if (size < 0 || size > _bytes.length) {
            throw new IllegalArgumentException("Size " + size + " exceeds capacity");
        }
        _size = size;
        _depth = 0;
    }