Sets this instance's content from the input.
437543
@Override
    public void readFields(DataInput in)
            throws IOException {
        // Read the length as a variable int
        int length = WritableUtils.readVInt(in);
        // If necessary increase the buffer capacity
        if (length > _text.capacity()) {
            _text = ByteBuffer.allocate(length);
        }
        // For efficiency read directly into the buffer's array
        in.readFully(_text.array(), 0, length);
        // Since we bypassed putting into the buffer set the position and limit directly
        _text.position(0);
        _text.limit(length);
        // Set the map to null since the contents may have changed.
        _map = null;
    }
872722
public function setContentInset($value) {
    if (is_object($value) && !$value instanceof ContentInset) {
      $this->triggerError('Object not of type ContentInset');
    }
    else {
      $this->contentInset = $value;
    }
    return $this;
  }
503277
public void setContent(PaperContent content)
	{
		if (myContent != content)
		{
			if (null != myContent)
			{
				myContent.unattach();
			}
			myContent = content;
		}
		if (null != myContent)
		{
			myContent.attachTo(this);
		}
	}
1111911
def set(self, value, metadata=dict(), content_type=None):
        """"""
        return self._boto_object.put(Body=value, Metadata=metadata, ContentType=content_type)
1330027
public void setContent(final WComponent content) {
		WindowModel model = getOrCreateComponentModel();

		// If the previous content had been wrapped, then remove it from the wrapping WApplication.
		if (model.wrappedContent != null && model.wrappedContent != model.content) {
			model.wrappedContent.removeAll();
		}

		model.content = content;

		// Wrap content in a WApplication
		if (content instanceof WApplication) {
			model.wrappedContent = (WApplication) content;
		} else {
			model.wrappedContent = new WApplication();
			model.wrappedContent.add(content);
		}

		// There should only be one content.
		holder.removeAll();
		holder.add(model.wrappedContent);
	}
71455
def _mock_input(self, target, content):
        
        content = helper.to_str(content)
        for w in content:
            target.send_keys(w)
            rand_block(0.01, 0.01)
966336
def set(self, value):
        

        if not isinstance(value, str_cls):
            raise TypeError(unwrap(
                '''
                %s value must be a unicode string, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        self._unicode = value
        self.contents = value.encode(self._encoding)
        self._header = None
        if self._indefinite:
            self._indefinite = False
            self.method = 0
        if self._trailer != b'':
            self._trailer = b''
457550
private function setInput()
    {
        $this->input = file_get_contents("php://input");
        if (!empty($this->input)) {
            $this->input = gzinflate($this->input);
            $this->input = json_decode($this->input, true);
        }
    }
420367
def put_content(self, content):
        

        self.blob.content_encoding = self.content_encoding
        self.blob.metadata = self.metadata
        return self.blob.upload_from_string(content, content_type=self.content_type)
1013611
public final void setContent(String content)
    {
        //clear non relevant flags
        this.contentBinary=null;
        this.contentParts=null;
        this.contentType=ContentType.STRING;

        this.contentString=content;
    }
930266
public void setContent(IContent content)
	{
		this.content = content;
		content.setParent(this);
		content.setPosition(Position.middleCenter(content));
		contentSize = content.size().plus(Size.of(6, 6));
	}
1371381
def set_content(self, content):
        

        cursor = self.textCursor()
        cursor.movePosition(QTextCursor.Start, QTextCursor.MoveAnchor)
        cursor.movePosition(QTextCursor.End, QTextCursor.KeepAnchor)
        cursor.removeSelectedText()
        for line in content:
            self.moveCursor(QTextCursor.End)
            self.insertPlainText(line)
        return True
567927
def _set_contents(self, force=False):
        

        if self.children is None:
            self._parse_children()

        contents = BytesIO()
        for index, info in enumerate(self._fields):
            child = self.children[index]
            if child is None:
                child_dump = b''
            elif child.__class__ == tuple:
                if force:
                    child_dump = self._lazy_child(index).dump(force=force)
                else:
                    child_dump = child[3] + child[4] + child[5]
            else:
                child_dump = child.dump(force=force)
            # Skip values that are the same as the default
            if info[2] and 'default' in info[2]:
                default_value = info[1](**info[2])
                if default_value.dump() == child_dump:
                    continue
            contents.write(child_dump)
        self._contents = contents.getvalue()

        self._header = None
        if self._trailer != b'':
            self._trailer = b''
1011713
def set(self, value):
        

        if not isinstance(value, str_cls):
            raise TypeError(unwrap(
                '''
                %s value must be a unicode string, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        if value.startswith('.'):
            encoded_value = b'.' + value[1:].encode(self._encoding)
        else:
            encoded_value = value.encode(self._encoding)

        self._unicode = value
        self.contents = encoded_value
        self._header = None
        if self._trailer != b'':
            self._trailer = b''
477221
def content(self, contents):
        
        if isinstance(contents, list):
            for c in contents:
                self.add_content(c)
        else:
            self.add_content(contents)
702966
def init_contents
      self[:Contents] = self[:Contents][:referenced_object][:indirect_without_dictionary] if self[:Contents].is_a?(Hash) && self[:Contents][:referenced_object] && self[:Contents][:referenced_object].is_a?(Hash) && self[:Contents][:referenced_object][:indirect_without_dictionary]
      self[:Contents] = [self[:Contents]] unless self[:Contents].is_a?(Array)
      self[:Contents].delete(is_reference_only: true, referenced_object: { indirect_reference_id: 0, raw_stream_content: '' })
      # un-nest any referenced arrays
      self[:Contents].map! { |s| actual_value(s).is_a?(Array) ? actual_value(s) : s }
      self[:Contents].flatten!
      self[:Contents].compact!
      # wrap content streams
      insert_content 'q', 0
      insert_content 'Q'

      # Prep content
      @contents = ''
      insert_content @contents
      @contents
    end
1271994
public static void setContnent(String content) {
        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        try {
            StringSelection selection = new StringSelection( content );
            clipboard.setContents(selection, selection);
        } catch (Exception ex) {
            //noop
        }
    }