MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / close

Method close

java/src/org/openqa/selenium/json/JsonOutput.java:443–456  ·  view source on GitHub ↗

{@inheritDoc} @throws JsonException if JSON stream isn't empty or an I/O exception is encountered @throws java.util.NoSuchElementException if serialization object stack is empty

()

Source from the content-addressed store, hash-verified

441 * @throws java.util.NoSuchElementException if serialization object stack is empty
442 */
443 @Override
444 public void close() {
445 if (appendable instanceof Closeable) {
446 try {
447 ((Closeable) appendable).close();
448 } catch (IOException e) {
449 throw new JsonException(e);
450 }
451 }
452
453 if (!(stack.getFirst() instanceof Root)) {
454 throw new JsonException("Attempting to close incomplete json stream");
455 }
456 }
457
458 private JsonOutput append(String text) {
459 stack.getFirst().write(text);

Callers

nothing calls this directly

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected