mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
adds comments
This commit is contained in:
parent
52845366bd
commit
16baa323cf
1 changed files with 4 additions and 1 deletions
|
@ -144,6 +144,8 @@ public class JSONTokener {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Checks if the end of the input has been reached.
|
||||||
|
*
|
||||||
* @return true if at the end of the file and we didn't step back
|
* @return true if at the end of the file and we didn't step back
|
||||||
*/
|
*/
|
||||||
public boolean end() {
|
public boolean end() {
|
||||||
|
@ -168,7 +170,8 @@ public class JSONTokener {
|
||||||
throw new JSONException("Unable to preserve stream position", e);
|
throw new JSONException("Unable to preserve stream position", e);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if(this.reader.read()<0) {
|
// -1 is EOF, but next() can not consume the null character '\0'
|
||||||
|
if(this.reader.read() <= 0) {
|
||||||
this.eof = true;
|
this.eof = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue