Skip to content

Commit c108dbd

Browse files
committed
Update to createReader() and small correction for nfc()
1 parent 0cdb056 commit c108dbd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

content/api_en/createReader.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ void draw() {
2929
if (line == null) {
3030
// Stop reading because of an error or file is empty
3131
noLoop();
32+
reader.close();
3233
} else {
3334
String[] pieces = split(line, TAB);
3435
int x = int(pieces[0]);
@@ -40,8 +41,8 @@ void draw() {
4041
</example>
4142

4243
<description><![CDATA[
43-
Creates a <b>BufferedReader</b> object that can be used to read files line-by-line as individual <b>String</b> objects. This is the complement to the <b>createWriter()</b> function.
44-
<br /> <br />
44+
Creates a <b>BufferedReader</b> object that can be used to read files line-by-line as individual <b>String</b> objects. This is the complement to the <b>createWriter()</b> function. For more information about the <b>BufferedReader</b> class and its methods like <b>readLine()</b> and <b>close</b> used in the above example, please consult a Java reference.<br />
45+
<br />
4546
Starting with Processing release 0134, all files loaded and saved by the Processing API use UTF-8 encoding. In previous releases, the default encoding for your platform was used, which causes problems when files are moved to other platforms.
4647
]]></description>
4748

content/api_en/nfc.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ println(fi); // Prints "42,525.34"
2424
<example>
2525
<image></image>
2626
<code><![CDATA[
27-
int[] i = {500000, 4000 };
27+
int[] i = { 500000, 4000 };
2828
String[] si = nfc(i);
2929
println(si); // Prints "500,000 4,000"
30-
float[] f = {42525.34343, 3.14159};
30+
float[] f = { 42525.34343, 3.14159 };
3131
String[] fi = nfc(f, 2);
3232
println(fi); // Prints "42,525.34 3.14"
3333

0 commit comments

Comments
 (0)