Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

loadStream()

   
Examples  
InputStream input = loadStream("sometextfile.txt"); 
InputStreamReader isr = new InputStreamReader(input); 
BufferedReader reader = new BufferedReader(isr); 
 
String line; 
while ((line = reader.readLine()) != null) { 
  println("next line is: " + line); 
} 

Description   Loads a file as a Java InputStream. Reads through a file sequentially as it is downloading or if the file is too large to read at once. The file must be located in the "data" directory or specified by a URL. The file can also be gzip compressed and if its name has a .gz extension it will automatically be decompressed while reading.
   
Syntax  
loadStream(filename)
   
Parameters  
filename   String: name of the file or url to load

   
Returns   InputStream
   
Usage   Web & Application
   
Related   loadStrings()
loadBytes()
saveStrings()
saveBytes()
   
© 2003- 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas