MCPcopy Create free account
hub / github.com/ArtifexSoftware/mupdf / checkPassword

Method checkPassword

platform/java/example/ViewerCore.java:125–148  ·  view source on GitHub ↗
(final String password, final OnException onException)

Source from the content-addressed store, hash-verified

123 }
124
125 protected void checkPassword(final String password, final OnException onException) {
126 worker.add(new Worker.Task() {
127 boolean passwordOK = false;
128 public void work() {
129 passwordOK = doc.authenticatePassword(password);
130 }
131 public void run() {
132 if (!passwordOK) {
133 String password = callback.askPassword();
134 if (password != null)
135 checkPassword(password, onException);
136 }
137 else
138 loadDocument(onException);
139 }
140 public void exception(Throwable t) {
141 ViewerCore.this.documentPath = null;
142 ViewerCore.this.acceleratorPath = null;
143 ViewerCore.this.doc = null;
144 if (onException != null)
145 onException.run(t);
146 }
147 });
148 }
149
150 public void refreshMetadata(final OnException onException) {
151 worker.add(new Worker.Task() {

Callers 1

runMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected