createInput() \ Language (API) \ Processing 1.0
Search processing.org:
Language (A-Z) \
Libraries \
Tools \
Environment \
Compare \
Troubleshooting
Reference for Processing version 1.0+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.
Name
createInput()
Description
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.
If the requested item doesn't exist, null is returned.
In earlier releases, this method was called openStream().
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.
The filename passed in can be:
- A URL, for instance openStream("http://processing.org/");
- A file in the sketch's data folder
- The full path to a file to be opened locally (when running as an application)
If the file ends with .gz, the stream will automatically be gzip decompressed. If you don't want the automatic decompression, use the related function createInputRaw().
Syntax
createInput(filename)
Parameters
filename
String: the name of the file to use as input
Returns
InputStream or null
Usage
Application & Web
Related
createOutput()selectOutput()selectInput()
Updated on November 22, 2008 08:39:25pm PST
Processing was initiated by Ben Fry and Casey Reas. It is developed by a small team of volunteers.
© Info \
Site hosted by Media Temple!
Wyszukiwarka
Podobne podstrony:
create?tor report^E0EC2Ccreate branchsql createtableCreate & Burn ISOcreateHRpackfunction msession createsql createviewcreatemultiplecreate project configuration management cm environmentsAB92128function stream context createcreate?cessible contentcreate videocdLabB CreateCalculationspostcard createcreatemultipleLabB CreateCubewięcej podobnych podstron