forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateInput.xml
More file actions
61 lines (44 loc) · 2 KB
/
Copy pathcreateInput.xml
File metadata and controls
61 lines (44 loc) · 2 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
52
53
54
55
56
57
58
59
60
61
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>createInput()</name>
<category>Input</category>
<subcategory>Files</subcategory>
<usage>Application & Web</usage>
<example>
<image></image>
<code></code>
</example>
<description><![CDATA[
This is a method for advanced programmers to open a Java InputStream. The method is useful if you want to use the facilities provided by PApplet to easily open files from the data folder or from a URL, but want an InputStream object so that you can use other Java methods to take more control of how the stream is read.
<br /><br />
If the requested item doesn't exist, null is returned.
<br /><br />
In earlier releases, this method was called <b>openStream()</b>.
<br /><br />
If not online, this will also check to see if the user is asking for a file whose name isn't properly capitalized. If capitalization is different an error will be printed to the console. This helps prevent issues that appear when a sketch is exported to the web, where case sensitivity matters, as opposed to running from inside the Processing Development Environment on Windows or Mac OS, where case sensitivity is preserved but ignored.
<br /><br />
The filename passed in can be:<br />
- A URL, for instance openStream("http://processing.org/");<br />
- A file in the sketch's data folder<br />
- The full path to a file to be opened locally (when running as an application)
<br /><br />
If the file ends with <b>.gz</b>, the stream will automatically be gzip decompressed. If you don't want the automatic decompression, use the related function <b>createInputRaw()</b>.
]]></description>
<syntax><![CDATA[
createInput(filename)
]]></syntax>
<parameter>
<label>filename</label>
<description><![CDATA[String: the name of the file to use as input]]></description>
</parameter>
<returns>InputStream or null</returns>
<related>
createOutput()
selectOutput()
selectInput()
</related>
<availability>1.0</availability>
<type>function</type>
<partof>Core</partof>
<level>Extended</level>
</root>