Returns true if a JsonElement is available on the input for consumption @return true if a JsonElement is available on the input, false otherwise @since 1.4
()
| 100 | * @since 1.4 |
| 101 | */ |
| 102 | public boolean hasNext() { |
| 103 | synchronized (lock) { |
| 104 | try { |
| 105 | return parser.peek() != JsonToken.END_DOCUMENT; |
| 106 | } catch (MalformedJsonException e) { |
| 107 | throw new JsonSyntaxException(e); |
| 108 | } catch (IOException e) { |
| 109 | throw new JsonIOException(e); |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * This optional {@link Iterator} method is not relevant for stream parsing and hence is not |