Reference for Processing version 1.5. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.
| Class | BufferedReader | ||
|---|---|---|---|
| Name | readLine() | ||
| Examples | BufferedReader reader;
String line;
 
void setup() {
  // Open the file from the createWriter() example
  reader = createReader("positions.txt");    
}
 
void draw() {
  try {
    line = reader.readLine();
  } catch (IOException e) {
    e.printStackTrace();
    line = null;
  }
  if (line == null) {
    // Stop reading because of an error or file is empty
    noLoop();  
  } else {
    String[] pieces = split(line, TAB);
    int x = int(pieces[0]);
    int y = int(pieces[1]);
    point(x, y);
  }
} | ||
| Description | Returns a String that is the current line in the BufferedReader. | ||
| Syntax | br.readLine() | ||
| Parameters | 
 | ||
| Returns | String | ||
| Usage | Web & Application | 

