Clear the content.

            Args:
                size (int): The size. Value ``-1`` means all.

            Keyword Args:
                offset (int): The offset.
                chunk (bytes): The chunk to use repeatedly.
499173
def clear(self, size=-1, *, offset=0, chunk=None) -> None:
        '''
            
        '''

        self.mglo.clear(size, offset, chunk)
813267
void clear() {
        offset = intLen = 0;
        for (int index=0, n=value.length; index < n; index++)
            value[index] = 0;
    }
709671
@SuppressWarnings("unchecked")
	public void clear(final boolean shrink) {
		clearCache();
		if (elementCount > 0) {
			elementCount = 0;
		}
		if (shrink && (elementData.length > 1024) && (elementData.length > defaultSize)) {
			elementData = new IntEntry[defaultSize];
		} else {
			Arrays.fill(elementData, null);
		}
		computeMaxSize();
	}
297905
def skip(self, length):
        """"""
        if length >= self.__size:
            skip_amount = self.__size
            rem = length - skip_amount
            self.__segments.clear()
            self.__offset = 0
            self.__size = 0
            self.position += skip_amount
        else:
            rem = 0
            self.read(length, skip=True)
        return rem
1138514
def advance(self, size: int) -> None:
        
        assert 0 < size <= self._size
        self._size -= size
        pos = self._first_pos

        buffers = self._buffers
        while buffers and size > 0:
            is_large, b = buffers[0]
            b_remain = len(b) - size - pos
            if b_remain <= 0:
                buffers.popleft()
                size -= len(b) - pos
                pos = 0
            elif is_large:
                pos += size
                size = 0
            else:
                # Amortized O(1) shrink for Python 2
                pos += size
                if len(b) <= 2 * pos:
                    del typing.cast(bytearray, b)[:pos]
                    pos = 0
                size = 0

        assert size == 0
        self._first_pos = pos
447600
def __clear_in_buffer(self):
        
        self.__in_buffer.value = bytes(b'\0' * len(self.__in_buffer))
3202
def chunk(self, size=0):
        

        if size == 0:
            raise ValueError('Invalid chunk size')

        self.__prepare()
        _new_content = []

        while(len(self._json_data) > 0):
            _new_content.append(self._json_data[0:size])
            self._json_data = self._json_data[size:]

        self._json_data = _new_content

        return self._json_data
196899
public void cleanupParams(int size, long interval) {
		timer.cancel();
		timer.schedule(new Cleanup(content,size), interval, interval);
	}
1125726
def truncate(self, size):
        
        self.sftp._log(
            DEBUG, "truncate({}, {!r})".format(hexlify(self.handle), size)
        )
        attr = SFTPAttributes()
        attr.st_size = size
        self.sftp._request(CMD_FSETSTAT, self.handle, attr)
1294827
def clear(self):
        
        if self._bit_count == 0:
            return

        block = self._qpart.document().begin()
        while block.isValid():
            if self.getBlockValue(block):
                self.setBlockValue(block, 0)
            block = block.next()
894526
public static void discardStream(InputStream is,int size) throws IOException {
		byte[] buffer = new byte[size];
		while(is.read(buffer, 0, size) != -1) {
		}
	}
100922
private synchronized void trimHead() {
    if(offsets.size()<=1) {
      return;
    }
    FileOffset head = offsets.first();
    FileOffset head2 = offsets.higher(head);
    if( head.isNextOffset(head2) ) {
      offsets.pollFirst();
      trimHead();
    }
    return;
  }
775614
def truncate(self, size=0):
        
        if size == 0:
            self._buffer = StringIO()
            self._len_changed = True

            return

        cur_pos = self.tell()
        self.seek(0)
        buf = self.read(size)
        self._buffer = StringIO()

        self._buffer.write(buf)
        self.seek(cur_pos)
        self._len_changed = True
410620
public void clear() {
        final int capacity = keys.length;
        Arrays.fill(keys, 0);
        Arrays.fill(values, 0);
        Arrays.fill(states, FREE);
        size = 0;
        mask   = capacity - 1;
        count = 0;
    }
587591
def overwrite(self, text, size=None):
        
        self._io.overwrite(text, size=size)
1118786
def clear(self):
        """"""
        layout = self.layout()
        for index in reversed(range(layout.count())):
            item = layout.takeAt(index)
            try:
                item.widget().deleteLater()
            except AttributeError:
                item = None
946643
def skip(self, num_bytes):
        """"""
        if num_bytes is None:
            self._offset = len(self._data)
        else:
            self._offset += num_bytes