forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateOutput.xml
More file actions
51 lines (36 loc) · 1.42 KB
/
Copy pathcreateOutput.xml
File metadata and controls
51 lines (36 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>createOutput()</name>
<category>Output</category>
<subcategory>Files</subcategory>
<usage>Application</usage>
<example>
<image></image>
<code></code>
</example>
<description><![CDATA[
Similar to <b>createInput()</b>, this creates a Java <b>OutputStream</b> for a given filename or path. The file will be created in the sketch folder, or in the same folder as an exported application.
<br /><br />
If the path does not exist, intermediate folders will be created. If an exception occurs, it will be printed to the console, and <b>null</b> will be returned.
<br /><br />
This method is a convenience over the Java approach that requires you to 1) create a FileOutputStream object, 2) determine the exact file location, and 3) handle exceptions. Exceptions are handled internally by the function, which is more appropriate for "sketch" projects.
<br /><br />
If the output filename ends with <b>.gz</b>, the output will be automatically GZIP compressed as it is written.
]]></description>
<syntax><![CDATA[
createOutput(<kbd>filename</kbd>)
]]></syntax>
<parameter>
<label>filename</label>
<description><![CDATA[String: name of the file to open]]></description>
</parameter>
<returns>OutputStream or null</returns>
<related>
createInput()
selectOutput()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
<level>Extended</level>
</root>