set the output type
12865
public function type($mimetype) {
		// if the type is correct
		if(in_array($mimetype, $this->Allowed)) {
			// set the type
			$this->Output = $mimetype;
		}
		// return self
		return($this);
	}
345101
def _output(self, file_like_object, path=None):
        """"""
        if not path:
            self._output_to_display(file_like_object)
        else:
            self._output_to_file(file_like_object, path)
1333074
public void setOutputFormat(String format) {
		try {
			runner.callMethod(engine, "setOutputFormat", format);
			outputFormat = format;
		} catch (ScriptRunnerException e) {
			throw new IllegalArgumentException("Could not set output format", e);
		}
	}
1293760
public static void setOutputCompressionType(JobConf conf, 
		                                          CompressionType style) {
    setCompressOutput(conf, true);
    conf.set("mapred.output.compression.type", style.toString());
  }
535858
@Deprecated
    public void setOutput(PrintWriter output) {
        if (output == null) {
            this.output = new PrintWriter(NullWriter.DEFAULT);
        } else {
            this.output = output;
        }
    }
1029402
public void setOutput(OutputStream os, String encoding) throws IOException {
		if (os == null)
			throw new IllegalArgumentException("output stream can not be null");
		reset();
		if (encoding != null) {
			out = new OutputStreamWriter(os, encoding);
		} else {
			out = new OutputStreamWriter(os);
		}
	}
652487
def output(self, context, *args, **kwargs):
        

        output_fields = self.output_fields
        output_type = self.output_type

        if output_fields and output_type:
            raise UnrecoverableError("Cannot specify both output_fields and output_type option.")

        if self.output_type:
            context.set_output_type(self.output_type)

        if self.output_fields:
            context.set_output_fields(self.output_fields)

        yield
1129874
@Override
	public void setOutputType(TypeInformation<OUT> outTypeInfo, ExecutionConfig executionConfig) {
		StreamingFunctionUtils.setOutputType(userFunction, outTypeInfo, executionConfig);
	}
876757
def setOutputObject(self, newOutput=output.CalcpkgOutput(True, True)):
		""""""
		self.output = newOutput
182974
def _set_types(self):
        """"""
        # If we given something that is not an int or a float we raise
        # a RuntimeError as we do not want to have to guess if the given
        # input should be interpreted as an int or a float, for example the
        # interpretation of the string "1" vs the interpretation of the string
        # "1.0".
        for c in (self.x, self.y):
            if not ( isinstance(c, int) or isinstance(c, float) ):
                raise(RuntimeError('x, y coords should be int or float'))

        if isinstance(self.x, int) and isinstance(self.y, int):
            self._dtype = "int"
        else:
            # At least one value is a float so promote both to float.
            self.x = float(self.x)
            self.y = float(self.y)
            self._dtype = "float"
1141078
void setDataType(Session session, Type type) {

        if (opType == OpTypes.VALUE) {
            valueData = type.convertToType(session, valueData, dataType);
        }

        dataType = type;
    }
286839
public function setOutputAs($type)
    {
        if (!in_array($type, [self::RAW, self::PLAIN, self::COLOR], true)) {
            throw new InvalidArgumentException(sprintf('Invalid output type "%s".', $type));
        }

        $this->_outputAs = $type;
    }
246845
public void setType(int type) throws IOException, ServerException {

        localServer.setTransferType(type);

        String typeStr = null;
        switch (type) {
        case Session.TYPE_IMAGE :
            typeStr = "I";
            break;
        case Session.TYPE_ASCII :
            typeStr = "A";
            break;
        case Session.TYPE_LOCAL :
            typeStr = "E";
            break;
        case Session.TYPE_EBCDIC :
            typeStr = "L";
            break;
        default :
            throw new IllegalArgumentException("Bad type: " + type);
        }

        Command cmd = new Command("TYPE", typeStr);
        try {
            controlChannel.execute(cmd);
        } catch (FTPReplyParseException rpe) {
            throw ServerException.embedFTPReplyParseException(rpe);
        } catch (UnexpectedReplyCodeException urce) {
            throw ServerException.embedUnexpectedReplyCodeException(
                                urce,
                                "Server refused changing transfer mode");
        }

        this.session.transferType = type;
    }
966232
def _put_output(self, output: Optional[str]) -> None:
        """"""
        if output is None:
            self._argv.extend(["-f", "null", "-"])
            return

        output_cmd = shlex.split(str(output))
        if len(output_cmd) > 1:
            self._argv.extend(output_cmd)
        else:
            self._argv.append(output)
705659
public Registration writeClass (Output output, Class type) {
		if (output == null) throw new IllegalArgumentException("output cannot be null.");
		try {
			return classResolver.writeClass(output, type);
		} finally {
			if (depth == 0 && autoReset) reset();
		}
	}
1092948
def setType(self, poiID, poiType):
        
        self._connection._beginMessage(
            tc.CMD_SET_POI_VARIABLE, tc.VAR_TYPE, poiID, 1 + 4 + len(poiType))
        self._connection._packString(poiType)
        self._connection._sendExact()
798735
public void setType(TYPE type) {
    if(type == null) {
      type = TYPE.UNSET;
    }
    this.type = type;
  }