diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2.zip b/Prova Webserver con Keycloak (altro modo)/WebServer2.zip new file mode 100644 index 0000000000000000000000000000000000000000..822b93edaf4d6988d7e2c09b7cfbf39e7d6bc546 Binary files /dev/null and b/Prova Webserver con Keycloak (altro modo)/WebServer2.zip differ diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/.classpath b/Prova Webserver con Keycloak (altro modo)/WebServer2/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..cb7cd96fe41590e9045c3d6712eb94ab9dcc1486 --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="lib" path="org.json-1.0.0.v201011060100.jar"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/.project b/Prova Webserver con Keycloak (altro modo)/WebServer2/.project new file mode 100644 index 0000000000000000000000000000000000000000..193e0c6a21bba6ecbe4478b901b61bc5673ac40f --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>pissirsmarthome_WebServer</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> + <filteredResources> + <filter> + <id>1658153304390</id> + <name></name> + <type>30</type> + <matcher> + <id>org.eclipse.core.resources.regexFilterMatcher</id> + <arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> + </matcher> + </filter> + </filteredResources> +</projectDescription> diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/cert.pem b/Prova Webserver con Keycloak (altro modo)/WebServer2/cert.pem new file mode 100644 index 0000000000000000000000000000000000000000..c2b2907814c0b83892535fe2e9802b2066f6c715 --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/cert.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx +EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT +EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp +ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIz +NTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH +EwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8GA1UE +AxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD +E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH +/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD+qK+ihVqf94Lw7YZFAXK6sOoBJQ7Rnwy +DfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutdfMh8+7ArU6SSYmlRJQVh +GkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMlNAJWJwGR +tDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEA +AaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE +FDqahQcQZyi27/a9BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmX +WWcDYfF+OwYxdS2hII5PZYe096acvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu +9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr +gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo +2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO +LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI +4uJEvlz36hz1 +-----END CERTIFICATE----- diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/curlCalls.txt b/Prova Webserver con Keycloak (altro modo)/WebServer2/curlCalls.txt new file mode 100644 index 0000000000000000000000000000000000000000..f404ea34bbc2c1801a9c2dc29e2d4c393aa0d074 --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/curlCalls.txt @@ -0,0 +1,33 @@ +GET + +curl localhost:3000 + +POST + +curl -X POST -H "Content-Type: application/json" -d "{JSON}" localhost:3000 + +curl -X POST "YOUR_URI" -F 'file=@/file-path.csv' + + +PUT + +curl -X PUT -H "Content-Type: application/json" -d "{JSON}" -d "{newJSON}" localhost:3000 + +curl -X PUT -H "Content-Type: multipart/form-data;" -F "key1=val1" localhost:3000 + +curl -X PUT -H "Content-Type: application/json" -d "{'email': 'text@mail.com'}" localhost:3000/bulloni?email=linuxize@example.com + + +DELETE + + +curl -X DELETE -d "{JSON}" localhost:3000 + +curl -X DELETE localhost:3000/bulloni?email=linuxize@example.com + zsh: no matches found: localhost:3000/bulloni?email=linuxize@example.com + + + +HTTPS + +curl --cacert cert.pem -k -H "version: 1.0" https://localhost/ \ No newline at end of file diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/gencert.bash b/Prova Webserver con Keycloak (altro modo)/WebServer2/gencert.bash new file mode 100644 index 0000000000000000000000000000000000000000..04edfc14bf0f2ae308545ba85781d5307aeda4aa --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/gencert.bash @@ -0,0 +1 @@ +keytool -genkeypair -keyalg RSA -alias self_signed -keypass miapasswd -keystore lig.keystore -storepass miapasswd diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/gson-2.8.2.jar b/Prova Webserver con Keycloak (altro modo)/WebServer2/gson-2.8.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..d0d030c6371cb44e7caee238f7bf148c7732ce28 Binary files /dev/null and b/Prova Webserver con Keycloak (altro modo)/WebServer2/gson-2.8.2.jar differ diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/org.apache.commons.io.jar b/Prova Webserver con Keycloak (altro modo)/WebServer2/org.apache.commons.io.jar new file mode 100644 index 0000000000000000000000000000000000000000..7affdefcd2747f924d078dbe5e85bb1503532a4f Binary files /dev/null and b/Prova Webserver con Keycloak (altro modo)/WebServer2/org.apache.commons.io.jar differ diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/org.json-1.0.0.v201011060100.jar b/Prova Webserver con Keycloak (altro modo)/WebServer2/org.json-1.0.0.v201011060100.jar new file mode 100644 index 0000000000000000000000000000000000000000..2aa70fdf80f4cc14a2063a8f118c847506c6c579 Binary files /dev/null and b/Prova Webserver con Keycloak (altro modo)/WebServer2/org.json-1.0.0.v201011060100.jar differ diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/server.bash b/Prova Webserver con Keycloak (altro modo)/WebServer2/server.bash new file mode 100755 index 0000000000000000000000000000000000000000..62b8300a700d6e60764ef37751a8b7ee05c82bec --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/server.bash @@ -0,0 +1,5 @@ +#!/bin/bash +javac -cp .:./org.json-1.0.0.v201011060100.jar -d bin src/code/* +echo 'server compiled' +cd bin +java -classpath .:../org.json-1.0.0.v201011060100.jar code.Server $1 diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Antifurto.java b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Antifurto.java new file mode 100644 index 0000000000000000000000000000000000000000..285f85061617e451116d6f3757f58c372bfe66ea --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Antifurto.java @@ -0,0 +1,146 @@ +package code; + +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class Antifurto implements HttpHandler { + + private boolean statoAntifurto = true; + private boolean statoAllarme = false; + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + String path[] = requestURI.toString().split("/"); + String lastfile = path[path.length - 1]; + + String requestMethod = exchange.getRequestMethod(); + List<String> strlist = new ArrayList<>(); //serve List<String> a causa di .put("content-type", strlist); + strlist.add("text/json"); + exchange.getResponseHeaders().put("content-type", strlist);//opzionale, per dire cosa c'e' nel body + + if(Helper.compareText(lastfile,"antifurto")) {//get {stato, allarme, attenzione, soglia, sensori} + if(Helper.compareText(requestMethod,"GET")) { + String response = "{\"stato\":true,\"soglia\":43,\"attenzione\":21,\"allarme\":false,\"sensori\":[{\"in0\":8},{\"in2\":3}]}"; + statoAntifurto = true; + statoAllarme = false; + Helper.sendResponse(response,exchange); + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + if(Helper.compareText(lastfile,"stato")) {//get, put {se l'antifurto e' attivo + aggiornamento} + if(Helper.compareText(requestMethod,"GET")) { + String response = "{\"stato\":true}"; + Helper.sendResponse(response,exchange); + } else if(Helper.compareText(requestMethod,"PUT")) { + String body = Helper.readBody(exchange.getRequestBody()); + if(!Helper.checkJSON(body) || !body.contains("\"stato\"")) { + Helper.badRequest(exchange); + return; + } + String stato = body.split("\"stato\"",2)[1].split(":",2)[1].split(",",2)[0].split("}",2)[0].trim(); + + try { + boolean exStato = statoAntifurto; + statoAntifurto = Boolean.parseBoolean(stato); + if(exStato == statoAntifurto) + System.out.println("\tRicevuto stato antifurto gia' assegnato"); + if(statoAllarme && !statoAntifurto) { + Helper.badRequest(exchange); + return; + } + + String response = "{\"antifurto\":\"ok\",\"stato\":"+statoAntifurto+"}"; + Helper.sendResponse(response,exchange); + } catch (Exception e) { + System.out.println("Conversion error.\t"+stato); + e.printStackTrace(); + Helper.badRequest(exchange); + } + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + if(Helper.compareText(lastfile,"allarme")) {//get, put {se l'allarme sta suonando + aggiornamento} + if(Helper.compareText(requestMethod,"GET")) { + String response = "{\"dati\":\"ecco l'allarme\"}"; + Helper.sendResponse(response,exchange); + } else if(Helper.compareText(requestMethod,"PUT")) { + String body = Helper.readBody(exchange.getRequestBody()); + if(!Helper.checkJSON(body) || !body.contains("\"stato\"")) { + Helper.badRequest(exchange); + return; + } + String stato = body.split("\"stato\"",2)[1].split(":",2)[1].split(",",2)[0].split("}",2)[0].trim(); + + try { + boolean exStato = statoAllarme; + statoAllarme = Boolean.parseBoolean(stato); + if(exStato == statoAllarme) + System.out.println("\tRicevuto stato allarme gia' assegnato"); + if(statoAllarme && !statoAntifurto) { + Helper.badRequest(exchange); + return; + } + String response = "{\"allarme\":\"ok\",\"stato\":"+statoAllarme+"}"; + Helper.sendResponse(response,exchange); + } catch (Exception e) { + System.out.println("Conversion error.\t"+stato); + e.printStackTrace(); + Helper.badRequest(exchange); + } + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + if(Helper.compareText(lastfile,"attenzione")) {//put {valore della progress bar} + if(Helper.compareText(requestMethod,"PUT")) { + String body = Helper.readBody(exchange.getRequestBody()); + if(!Helper.checkJSON(body) || !body.contains("\"attenzione\"")) { + Helper.badRequest(exchange); + return; + } + String valore = body.split("\"attenzione\"",2)[1].split(":",2)[1].split(",",2)[0].split("}",2)[0].trim(); + try { + int val = Integer.parseInt(valore); + + String response = "{\"attenzione\":"+val+"}"; + Helper.sendResponse(response,exchange); + } catch (Exception e) { + System.out.println("Conversion error.\t"+valore); + e.printStackTrace(); + Helper.badRequest(exchange); + } + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + if(Helper.compareText(lastfile,"soglia")) {//put {valore scelto dall'utente per la soglia} + if(Helper.compareText(requestMethod,"PUT")) { + System.out.println(Helper.readBody(exchange.getRequestBody())); + String response = "{\"dati\":\"soglia aggiornata\"}"; + Helper.sendResponse(response,exchange); + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + Helper.pageNotFound(exchange); + } + +} diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Helper.java b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Helper.java new file mode 100644 index 0000000000000000000000000000000000000000..85699ce101f361a52056d6f9b37f8ba76f50e7db --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Helper.java @@ -0,0 +1,76 @@ +package code; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.json.JSONException; +import org.json.JSONObject; + +import com.sun.net.httpserver.HttpExchange; + +public class Helper { + + public static void sendResponse(String response, HttpExchange exchange) throws IOException { + System.out.println(response); + exchange.sendResponseHeaders(200, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static void badRequest(HttpExchange exchange) throws IOException { + System.out.println("Errors in the request!"); +// exchange.getResponseHeaders().remove("content-type"); + String response = "{\"message\":\"Errors in the request!\"}"; + exchange.sendResponseHeaders(400, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static void pageNotFound(HttpExchange exchange) throws IOException { + System.out.println("Page not found!"); +// exchange.getResponseHeaders().remove("content-type"); + String response = "{\"message\":\"Page not found!\"}"; + exchange.sendResponseHeaders(404, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static void methodNotAllowed(HttpExchange exchange) throws IOException { + System.out.println("Method not allowed!"); +// exchange.getResponseHeaders().remove("content-type"); + String response = "{\"message\":\"Method not allowed!\"}"; + exchange.sendResponseHeaders(405, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static boolean compareText(String a, String b){ + return a.compareToIgnoreCase(b) == 0; + } + + public static String readBody(InputStream requestBody) { + int req; + StringBuffer sb = new StringBuffer(); + try { + while((req = requestBody.read()) != -1) + sb.append(Character.toString((char)req)); + } catch (IOException e) { + e.printStackTrace(); + } + return sb.toString(); + } + + public static boolean checkJSON(String body) { + try { + new JSONObject(body); + return true; + } catch (JSONException e) { + return false; + } + } +} diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Home.java b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Home.java new file mode 100644 index 0000000000000000000000000000000000000000..e7ad3fa7077b9932ddc954e030a6861b895290e5 --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Home.java @@ -0,0 +1,157 @@ +package code; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONException; +import org.json.JSONObject; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class Home implements HttpHandler { + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + boolean wantsHome = Helper.compareText(requestURI.toString(),URI.create("/").toString()); + boolean wantsKeycloak = Helper.compareText(requestURI.toString(),URI.create("/keycloak.json").toString()); + if(!wantsHome && !wantsKeycloak) { + String error = "Invalid URI"; + OutputStream os = exchange.getResponseBody(); + exchange.sendResponseHeaders(400, error.getBytes().length); + os.write(error.getBytes()); + os.close(); + return; + } + + String requestMethod = exchange.getRequestMethod(); + if (Helper.compareText(requestMethod, "GET")) { + List<String> strlist = new ArrayList<>(); + String response = null; + if(wantsHome){ + response = getHomePage(); + strlist.add("text/html"); + } else if (wantsKeycloak){ + response = getKeycloak(); + strlist.add("text/json"); + } + if(response != null && !Helper.compareText(response, "fail")){ + exchange.getResponseHeaders().put("content-type", strlist); + exchange.sendResponseHeaders(200, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } else { + exchange.sendResponseHeaders(500, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + } else { + Helper.methodNotAllowed(exchange); + } + } + + private static String getHomePage() { + String line; +// String pageIDString = pageid.toString(); + String page = Server.CLIENT_PATH+"/index.html";// + pageIDString.substring(0, pageIDString.length() - 1) + ".txt";// entro nella cartella + // html e leggo il file + // txt + + StringBuilder answer = new StringBuilder(); + if (getExtension(page).length() == 0) + page += ".html"; + + BufferedReader bufferedReader = null; + try { + FileReader fileReader = new FileReader(page); + + bufferedReader = new BufferedReader(fileReader); + boolean isComment = false; + while ((line = bufferedReader.readLine()) != null) { + line = line.trim(); + + if(line.startsWith("<!--") && line.endsWith("-->")) { + continue; + } + if(line.startsWith("<!--")) { + isComment = true; + continue; + } + if(line.endsWith("-->")) { + isComment = false; + continue; + } + + if(!isComment && line.length()>0) + answer.append(line).append("\n"); + } + } catch (FileNotFoundException ex) { + System.out.println("Unable to open file '" + page + "'"); + return "fail"; + } catch (IOException ex) { + System.out.println("Error reading file '" + page + "'"); + return "fail"; + } finally { + try{ + if(bufferedReader != null) + bufferedReader.close(); + } catch (IOException ex){ + System.out.println("Error closing bufferedReader"); + } + } + return answer.toString(); + } + + private static String getKeycloak(){ + String page = Server.CLIENT_PATH+"/keycloak.json"; + BufferedReader bufferedReader = null; + StringBuilder answer = new StringBuilder(); + try { + FileReader fileReader = new FileReader(page); + bufferedReader = new BufferedReader(fileReader); + String line; + while ((line = bufferedReader.readLine()) != null) { + answer.append(line.trim()); + } + + JSONObject js = new JSONObject(answer.toString()); + return js.toString(); + } catch (FileNotFoundException ex) { + System.out.println("Unable to open file '" + page + "'"); + return "fail"; + } catch (IOException ex) { + System.out.println("Error reading file '" + page + "'"); + return "fail"; + } catch (JSONException e) { + System.out.println("The file doesn't contain a JSON '" + page + "'"); + return "fail"; + } finally { + try{ + if(bufferedReader != null) + bufferedReader.close(); + } catch (IOException ex){ + System.out.println("Error closing bufferedReader"); + } + } + } + + private static String getExtension(String file) { + int i = file.length() - 1; + while (i > 0 && file.charAt(i) != '.' && file.charAt(i) != '/') + i--; + if (file.charAt(i) == '.') + return file.substring(i + 1); + else + return ""; + } + +} \ No newline at end of file diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/ImageRes.java b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/ImageRes.java new file mode 100644 index 0000000000000000000000000000000000000000..87b766aed14e7d52f905aee13caa74a39d4d724f --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/ImageRes.java @@ -0,0 +1,56 @@ +package code; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import javax.imageio.ImageIO; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class ImageRes implements HttpHandler { + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + + String requestMethod = exchange.getRequestMethod(); + if (Helper.compareText(requestMethod, "GET")) { + BufferedImage image = getLocalImage(requestURI.toASCIIString()); + if (image == null) + Helper.pageNotFound(exchange); + List<String> strlist = new ArrayList<>(); + strlist.add("image/png"); + OutputStream os = exchange.getResponseBody(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageIO.write(image, "png", baos); + baos.flush(); + byte[] imageInByte = baos.toByteArray(); + exchange.getResponseHeaders().put("content-type", strlist); + exchange.sendResponseHeaders(200, imageInByte.length); + os.write(imageInByte); + os.close(); + } else { + Helper.methodNotAllowed(exchange); + } + } + + private BufferedImage getLocalImage(String uri) { + String page = Server.CLIENT_PATH + uri; + try { + File f = new File(page); + BufferedImage image = ImageIO.read(f); + return image; + } catch (IOException e) { + System.out.println("Error reading file '" + page + "'"); + return null; + } + } + +} diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/KeyCloak.java b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/KeyCloak.java new file mode 100644 index 0000000000000000000000000000000000000000..344a333d90bbeb581bdc1b46a161e03a34cf8fda --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/KeyCloak.java @@ -0,0 +1,75 @@ +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.io.*; +import java.util.HashMap; +import java.util.Arrays; + +import org.apache.commons.io.IOUtils; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; + +public class KeyCloak extends HashMap<String,String> { + + public String extraBody() { + return get("extrabodyTemplate").replace("$CLIENTID",get("client-id")); + } + + public String authServer() { + String val = get("auth-server-url"); + int i = val.length()-2; + while(i>0 && val.charAt(i)!='/') i--; + return val.substring(0,i); + } + + public String codeRQ () { + String val = get("coderq").replace("$CLIENTID",get("client-id")); + return val.replace("$REALM", get("realm")); + } + + + public String tokenRQ () { + String val = get("tokenrq").replace("$CLIENTID",get("client-id")); + return val.replace("$REALM", get("realm")); + } + + public void print() { + System.out.println(Arrays.asList(this)); + } + + public KeyCloak(String keycloakpath, String params) throws MalformedURLException, IOException { + BufferedReader data; + String json = ""; + String line; + data = new BufferedReader(new FileReader(keycloakpath)); + while((line = data.readLine())!=null) json += line; + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(json); + if (element.isJsonObject()) { + JsonObject keycloak = element.getAsJsonObject(); + put("realm", keycloak.get("realm").getAsString()); + put("auth-server-url", keycloak.get("auth-server-url").getAsString()); + put("ssl-required", keycloak.get("ssl-required").getAsString()); + put("resouce", keycloak.get("resource").getAsString()); + put("client-id", keycloak.get("resource").getAsString()); + put("public-client", keycloak.get("public-client").getAsString()); + put("confidential-port", keycloak.get("confidential-port").getAsString()); + } + data = new BufferedReader(new FileReader(params)); + json = ""; + while((line = data.readLine())!=null) json += line; + element = parser.parse(json); + if (element.isJsonObject()) { + JsonObject parameters = element.getAsJsonObject(); + put("coderq", parameters.get("coderq").getAsString()); + put("tokenrq", parameters.get("tokenrq").getAsString()); + put("extrabodyTemplate", parameters.get("extrabody").getAsString()); + } + + } +} + + diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Luci.java b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Luci.java new file mode 100644 index 0000000000000000000000000000000000000000..b3844908021496b5b91254b729805788fc900099 --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Luci.java @@ -0,0 +1,78 @@ +package code; + +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class Luci implements HttpHandler { + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + String path[] = requestURI.getPath().split("/"); + String lastfile = path[path.length - 1]; + + String requestMethod = exchange.getRequestMethod(); + List<String> strlist = new ArrayList<>(); //serve List<String> a causa di .put("content-type", strlist); + strlist.add("text/json"); + exchange.getResponseHeaders().put("content-type", strlist);//opzionale, per dire cosa c'e' nel body + + if(Helper.compareText(lastfile,"luci")) {//post, get [put, delete] {luogo e stato di tutte luci} + if(Helper.compareText(requestMethod,"GET")) { + String response = "[{\"luogo\":\"ingresso\",\"stato\":true,\"in\":\"in2\",\"out\":\"out2\"},{\"luogo\":\"cucina\",\"stato\":false,\"in\":\"in3\",\"out\":\"out3\"}]"; + Helper.sendResponse(response,exchange); +// Helper.methodNotAllowed(exchange); + } else if(Helper.compareText(requestMethod,"POST")) { + String body = Helper.readBody(exchange.getRequestBody()); + //check body is json or xml + if(!Helper.checkJSON(body) || !body.contains("\"luogo\"")) { + Helper.badRequest(exchange); + return; + } + String luogo = body.split("\"luogo\"",2)[1].split("\"",3)[1].trim(); + + String response = "{\"luogo\":\""+luogo+"\"}"; + Helper.sendResponse(response,exchange); + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + if(Helper.compareText(lastfile,"stato")) {//put {aggiorna lo stato di una luce} + if(Helper.compareText(requestMethod,"PUT")) { + String body = Helper.readBody(exchange.getRequestBody()); + //check body is json or xml + if(!Helper.checkJSON(body) || !body.contains("\"luogo\"")) { + Helper.badRequest(exchange); + return; + } + String stato = body.split("\"stato\"",2)[1].split(":",3)[1].split(",",2)[0].split("}",2)[0].trim(); + try { + boolean st = Boolean.parseBoolean(stato); + + String response = "{\"luce\":\"ok\",\"stato\":"+st+"}"; + Helper.sendResponse(response,exchange); + } catch (Exception e) { + System.out.println("Conversion error.\t"+stato); + e.printStackTrace(); + Helper.badRequest(exchange); + } + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + Helper.pageNotFound(exchange); + } + + + + + +} diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/MissingPage.java b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/MissingPage.java new file mode 100644 index 0000000000000000000000000000000000000000..854ed4f771c59758f4163bae8d7f549b463f4f50 --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/MissingPage.java @@ -0,0 +1,15 @@ +package code; + +import java.io.IOException; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class MissingPage implements HttpHandler { + + @Override + public void handle(HttpExchange exchange) throws IOException { + Helper.pageNotFound(exchange); + } + +} diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Resources.java b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Resources.java new file mode 100644 index 0000000000000000000000000000000000000000..4792161b8834f5de4d56ae39722ae2ee1a163826 --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Resources.java @@ -0,0 +1,97 @@ +package code; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class Resources implements HttpHandler { + + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + + String requestMethod = exchange.getRequestMethod(); + if (Helper.compareText(requestMethod, "GET")) { + String response = getLocalPage(requestURI.toASCIIString()); + if(response.equals("fail")){ + //nel caso in cui non ci sia il file (perche non stato scaricato), allora creo un file fittizzio per non far crashare tutto il resto + String[] requestedPath = requestURI.toASCIIString().split("/"); + // get the last element of requestedPath and remove .js + String[] requestedPage = requestedPath[requestedPath.length-1].split("\\."); + String className = requestedPage[0]; + // make requested page with the first letter capitalized + className = className.substring(0, 1).toUpperCase() + className.substring(1); + response = "class "+className+"{}\nexport default " +className; + } + List<String> strlist = new ArrayList<>(); + switch (requestURI.toASCIIString().substring(1, 4)) { + case "js/" : strlist.add("text/javascript"); break; + case "css" : strlist.add("text/css"); break; + default : strlist.add("text"); break; + } + exchange.getResponseHeaders().put("content-type", strlist); + exchange.sendResponseHeaders(200, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } else { + Helper.methodNotAllowed(exchange); + } + } + + private static String getLocalPage(String uri) { + String page = Server.CLIENT_PATH+uri; + StringBuilder answer = new StringBuilder(); + BufferedReader bufferedReader = null; + + try { + FileReader fileReader = new FileReader(page); + + bufferedReader = new BufferedReader(fileReader); + boolean isComment = false; + String line; + while ((line = bufferedReader.readLine()) != null) { + line = line.trim(); + if((line.startsWith("/*") && line.endsWith("*/")) || line.startsWith("//")) { + continue; + } + if(line.startsWith("/*")) { + isComment = true; + continue; + } + if(line.endsWith("*/")) { + isComment = false; + continue; + } + if(!isComment && line.length()>0) + answer.append(line).append("\n"); + } + } catch (FileNotFoundException ex) { + System.out.println("Unable to open file '" + page + "'"); + return "fail"; + } catch (IOException ex) { + System.out.println("Error reading file '" + page + "'"); + return "fail"; + } finally { + try{ + if(bufferedReader != null) + bufferedReader.close(); + } catch (IOException ex){ + System.out.println("Error closing bufferedReader"); + } + } + return answer.substring(0,answer.length()-1); + } + + + +} diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Server.java b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Server.java new file mode 100644 index 0000000000000000000000000000000000000000..8df0ca64d4d414f26597163cf764ed871b548bc4 --- /dev/null +++ b/Prova Webserver con Keycloak (altro modo)/WebServer2/src/code/Server.java @@ -0,0 +1,112 @@ +package code; + +/*import java.io.FileInputStream; +import java.security.KeyStore; + +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLParameters; +import javax.net.ssl.TrustManagerFactory; + +import com.sun.net.httpserver.HttpsConfigurator; +import com.sun.net.httpserver.HttpsParameters; +import com.sun.net.httpserver.HttpsServer;*/ +import java.io.IOException; +import java.net.InetSocketAddress; +import java.util.concurrent.Executors; +import com.sun.net.httpserver.HttpServer; + +public class Server { + +// private static int port = 443; + private static int port = 3000; + public static String CLIENT_PATH = "./../../webapp/public"; + + public static void main(String[] args) throws IOException { + if (args.length > 1 && args[0].equals("-port")) + try { + port = Integer.parseInt(args[1]); + } catch (Exception e) { + e.printStackTrace(); + } +// HttpsServer server = HttpsServer.create(new InetSocketAddress(port), 0); + HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); + + // initialise the HTTPS server + /*try { + SSLContext sslContext = SSLContext.getInstance("TLS"); + + // initialise the keystore + char[] password = "simulator".toCharArray(); + KeyStore ks = KeyStore.getInstance("JKS"); + FileInputStream fis = new FileInputStream("testkey.jks"); + ks.load(fis, password); + + // setup the key manager factory + KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); + kmf.init(ks, password); + + // setup the trust manager factory + TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); + tmf.init(ks); + + // setup the HTTPS context and parameters + sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); + server.setHttpsConfigurator(new HttpsConfigurator(sslContext) { + @Override + public void configure(HttpsParameters params) { + try { + // initialise the SSL context + SSLContext context = getSSLContext(); + SSLEngine engine = context.createSSLEngine(); + params.setNeedClientAuth(false); + params.setCipherSuites(engine.getEnabledCipherSuites()); + params.setProtocols(engine.getEnabledProtocols()); + + // Set the SSL parameters + SSLParameters sslParameters = context.getSupportedSSLParameters(); + params.setSSLParameters(sslParameters); + + } catch (Exception ex) { + System.out.println("Failed to create HTTPS port"); + } + } + }); + + //API del server + server.createContext("/js/",new Resources()); + server.createContext("/css/",new Resources()); + server.createContext("/res/",new ImageRes()); + server.createContext("/",new Home()); + +// server.setExecutor(Executors.newFixedThreadPool(11)); + server.setExecutor(Executors.newCachedThreadPool()); + server.start(); + System.out.println("webserver running on localhost:"+port); + } catch (Exception e) { + System.out.println("Failed to create HTTPS server on port " + port + " of localhost"); + e.printStackTrace(); + }*/ + //API del server +// server.createContext("/api/luci/",new Luci());//post, get [put, delete] {luogo e stato di tutte luci} +// server.createContext("/api/luci/stato/",new Luci());//put {aggiorna lo stato di una luce} +// server.createContext("/api/scenari/",new Scenari());//get {nome e data di tutti gli scenari} +// server.createContext("/api/scenari/attiva/",new Scenari());//put {attiva/disattiva} +// server.createContext("/api/scenari/registra/",new Scenari());//put {registra/termina} +// server.createContext("/api/scenari/salva/",new Scenari());//post {conferma salvataggio, altrimenti cancella dopo timer; ritorna i valori dello scenario} +// server.createContext("/api/antifurto/",new Antifurto());//get {stato, allarme, attenzione, soglia, sensori} +// server.createContext("/api/antifurto/stato/",new Antifurto());//get, put {se l'antifurto e' attivo + aggiornamento} +// server.createContext("/api/antifurto/allarme/",new Antifurto());//get, put {se l'allarme sta suonando + aggiornamento} +// server.createContext("/api/antifurto/attenzione/",new Antifurto());//put {valore della progress bar} +// server.createContext("/api/antifurto/soglia/",new Antifurto());//put {valore scelto dall'utente per la soglia} + server.createContext("/js/",new Resources()); + server.createContext("/css/",new Resources()); + server.createContext("/res/",new ImageRes()); + server.createContext("/",new Home()); + server.setExecutor(Executors.newCachedThreadPool()); + server.start(); + System.out.println("webserver running on localhost:"+port); + } + +} diff --git a/Prova Webserver con Keycloak (altro modo)/WebServer2/testkey.jks b/Prova Webserver con Keycloak (altro modo)/WebServer2/testkey.jks new file mode 100644 index 0000000000000000000000000000000000000000..a709bb78edd1ec288e9fcd7373a38346f27d2cbc Binary files /dev/null and b/Prova Webserver con Keycloak (altro modo)/WebServer2/testkey.jks differ diff --git a/WebServer/.classpath b/WebServer/.classpath index cb7cd96fe41590e9045c3d6712eb94ab9dcc1486..ecde273104411c82ac4acc216117691802ea2e55 100644 --- a/WebServer/.classpath +++ b/WebServer/.classpath @@ -1,7 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> + <attributes> + <attribute name="module" value="true"/> + </attributes> + </classpathentry> <classpathentry kind="lib" path="org.json-1.0.0.v201011060100.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/gson-2.8.2.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/org.apache.commons.io.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/commons-codec-1.15/commons-codec-1.15.jar"> + <attributes> + <attribute name="javadoc_location" value="jar:file:/home/elisa/Documenti/Reti%202/GitLab/pissirsmarthome/WebServer/commons-codec-1.15/commons-codec-1.15-javadoc.jar!/"/> + </attributes> + </classpathentry> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/WebServer/bin/code/Antifurto.class b/WebServer/bin/code/Antifurto.class new file mode 100644 index 0000000000000000000000000000000000000000..f871b0867c473ce9730206f1a112d9068e1b7959 Binary files /dev/null and b/WebServer/bin/code/Antifurto.class differ diff --git a/WebServer/bin/code/Helper.class b/WebServer/bin/code/Helper.class new file mode 100644 index 0000000000000000000000000000000000000000..bb0f1d6d7685bd3bb13df1db55da9a7b001bf1c3 Binary files /dev/null and b/WebServer/bin/code/Helper.class differ diff --git a/WebServer/bin/code/Home.class b/WebServer/bin/code/Home.class new file mode 100644 index 0000000000000000000000000000000000000000..e33c4154fd4f5d657f6be2e6480fa51815499a38 Binary files /dev/null and b/WebServer/bin/code/Home.class differ diff --git a/WebServer/bin/code/ImageRes.class b/WebServer/bin/code/ImageRes.class new file mode 100644 index 0000000000000000000000000000000000000000..e931cad64e34e10c8a3445078606353f133a0f6f Binary files /dev/null and b/WebServer/bin/code/ImageRes.class differ diff --git a/WebServer/bin/code/KeyCloak.class b/WebServer/bin/code/KeyCloak.class new file mode 100644 index 0000000000000000000000000000000000000000..89645808b1d7a66be97a203a13c4813798474fbf Binary files /dev/null and b/WebServer/bin/code/KeyCloak.class differ diff --git a/WebServer/bin/code/Luci.class b/WebServer/bin/code/Luci.class new file mode 100644 index 0000000000000000000000000000000000000000..66ed0d2ba7c80cf7a72091952eb6039a0ffbd35a Binary files /dev/null and b/WebServer/bin/code/Luci.class differ diff --git a/WebServer/bin/code/MissingPage.class b/WebServer/bin/code/MissingPage.class new file mode 100644 index 0000000000000000000000000000000000000000..22370e28580b139b3ff860fe5f3a479108e7f23d Binary files /dev/null and b/WebServer/bin/code/MissingPage.class differ diff --git a/WebServer/bin/code/Resources.class b/WebServer/bin/code/Resources.class new file mode 100644 index 0000000000000000000000000000000000000000..b45b5330a8226b0a8fe5878b1687b46735b21398 Binary files /dev/null and b/WebServer/bin/code/Resources.class differ diff --git a/WebServer/bin/code/Server.class b/WebServer/bin/code/Server.class new file mode 100644 index 0000000000000000000000000000000000000000..7c809cd5b2ee119705a01d9ff601d928a28fe102 Binary files /dev/null and b/WebServer/bin/code/Server.class differ diff --git a/WebServer/commons-codec-1.15/LICENSE.txt b/WebServer/commons-codec-1.15/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7 --- /dev/null +++ b/WebServer/commons-codec-1.15/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/WebServer/commons-codec-1.15/NOTICE.txt b/WebServer/commons-codec-1.15/NOTICE.txt new file mode 100644 index 0000000000000000000000000000000000000000..9899d2108a8476d595531d01047844c15d82f83f --- /dev/null +++ b/WebServer/commons-codec-1.15/NOTICE.txt @@ -0,0 +1,17 @@ +Apache Commons Codec +Copyright 2002-2020 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (https://www.apache.org/). + +src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.java +contains test data from http://aspell.net/test/orig/batch0.tab. +Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org) + +=============================================================================== + +The content of package org.apache.commons.codec.language.bm has been translated +from the original php source code available at http://stevemorse.org/phoneticinfo.htm +with permission from the original authors. +Original source copyright: +Copyright (c) 2008 Alexander Beider & Stephen P. Morse. diff --git a/WebServer/commons-codec-1.15/RELEASE-NOTES.txt b/WebServer/commons-codec-1.15/RELEASE-NOTES.txt new file mode 100644 index 0000000000000000000000000000000000000000..00abff1d6fee94f89ad0e5ffbc4c519dd241e8dc --- /dev/null +++ b/WebServer/commons-codec-1.15/RELEASE-NOTES.txt @@ -0,0 +1,287 @@ + Apache Commons Codec 1.15 RELEASE NOTES + September 1 2020 + +The Apache Commons Codec package contains simple encoder and decoders for +various formats such as Base64 and Hexadecimal. In addition to these +widely used encoders and decoders, the codec package also maintains a +collection of phonetic encoding utilities. + +Feature and fix release. + +Changes in this version include: + +New features: +o CODEC-290: Base16Codec and Base16Input/OutputStream. Thanks to Adam Retter. +o CODEC-291: Hex encode/decode with existing arrays. Thanks to Adam Retter. + +Fixed Bugs: +o CODEC-264: MurmurHash3: Ensure hash128 maintains the sign extension bug. + Thanks to Andy Seaborne. + +Changes: +o CODEC-280: Base32/Base64/BCodec: Added strict decoding property to control + handling of trailing bits. Default lenient mode discards them + without error. Strict mode raise an exception. +o CODEC-289: Base32/Base64 Input/OutputStream: Added strict decoding property + to control handling of trailing bits. Default lenient mode + discards them without error. Strict mode raise an exception. +o Update tests from JUnit 4.12 to 4.13. Thanks to Gary Gregory. +o Update actions/checkout from v1 to v2.3.2 #50, #56. + Thanks to Dependabot. +o Update actions/setup-java from v1.4.0 to v1.4.1 #57. + Thanks to Dependabot. + + +For complete information on Apache Commons Codec, including instructions on how +to submit bug reports, patches, or suggestions for improvement, see the +Apache Commons Codec website: + +https://commons.apache.org/proper/commons-codec/ + +Download page: https://commons.apache.org/proper/commons-codec/download_codec.cgi + +------------------------------------------------------------------------------- + + Apache Commons Codec 1.14 RELEASE NOTES + December 30 2019 + +The Apache Commons Codec package contains simple encoder and decoders for +various formats such as Base64 and Hexadecimal. In addition to these +widely used encoders and decoders, the codec package also maintains a +collection of phonetic encoding utilities. + +Feature and fix release. + +Changes in this version include: + +New features: +o CODEC-264: Add MurmurHash3.hash128x64 methods to fix sign extension error during seeding in hash128 methods. Thanks to Claude Warren. +o CODEC-267: Add MurmurHash3.hash32x86 methods and IncrementalHash32x86 to fix sign extension error in hash32 methods. Thanks to Claude Warren. +o CODEC-272: Add RandomAccessFile digest methods #31. Thanks to Behrang, Alex Herbert, Gary Gregory. +o CODEC-273: Add Path APIs to org.apache.commons.codec.digest.DigestUtils similar to File APIs. Thanks to Gary Gregory. +o CODEC-274: Add SHA-512/224 and SHA-512/256 to DigestUtils for Java 9 and up. Thanks to Gary Gregory. +o CODEC-275: Add missing note in javadoc when sign extension error is present #34. Thanks to Claude Warren. + +Fixed Bugs: +o CODEC-261: Hex: Allow encoding read-only ByteBuffer. +o CODEC-259: Hex: Only use an available ByteBuffer backing array if the length equals the remaining byte count. +o CODEC-265: BaseNCodec to expand buffer using overflow conscious code. +o CODEC-270: Base32/64: Fixed decoding check that all the final trailing bits to discard are zero. +o CODEC-269: Allow repeat calls to MurmurHash3.IncrementalHash32.end() to generate the same value. +o CODEC-276: Reliance on default encoding in MurmurHash2 and MurmurHash3. Thanks to Gary Gregory. + +Changes: +o CODEC-268: MurmurHash3: Deprecate hash64 methods and hash methods accepting a String that use the default encoding. +o CODEC-277: Don't reload standard Charsets in org.apache.commons.codec.Charsets. Thanks to Gary Gregory. +o CODEC-278: Deprecate Charset constants in org.apache.commons.codec.Charsets in favor of java.nio.charset.StandardCharsets. Thanks to Gary Gregory. + + +For complete information on Apache Commons Codec, including instructions on how to submit bug reports, +patches, or suggestions for improvement, see the Apache Commons Codec website: + +https://commons.apache.org/proper/commons-codec/ + +Download page: https://commons.apache.org/proper/commons-codec/download_codec.cgi + +------------------------------------------------------------------------------- + + Apache Commons Codec 1.13 RELEASE NOTES + +The Apache Commons Codec package contains simple encoder and decoders for +various formats such as Base64 and Hexadecimal. In addition to these +widely used encoders and decoders, the codec package also maintains a +collection of phonetic encoding utilities. + +Feature and fix release. + +Changes in this version include: + +New features: +o CODEC-236: MurmurHash2 for 32-bit or 64-bit value. Thanks to Viliam Holub. +o CODEC-236: MurmurHash3 for 32-bit or 128-bit value. Thanks to Austin Appleby. + +Fixed Bugs: +o CODEC-255: ColognePhonetic handles x incorrectly Thanks to Holger Grote. +o CODEC-254: ColognePhonetic does not treat the letter H correctly Thanks to Holger Grote. +o CODEC-134: Reject any decode request for a value that is impossible to encode to for Base32/Base64 rather than blindly decoding. + +Changes: +o CODEC-236: Broken direct java.nio.ByteBuffer support in org.apache.commons.codec.binary.Hex. Thanks to Tomas Shestakov, Gary Gregory. + + +For complete information on Apache Commons Codec, including instructions on how to submit bug reports, +patches, or suggestions for improvement, see the Apache Commons Codec website: + +Visit https://commons.apache.org/proper/commons-codec/ +Download from https://commons.apache.org/proper/commons-codec/download_codec.cgi + +------------------------------------------------------------------------------- + + Apache Commons Codec 1.12 RELEASE NOTES + +The Apache Commons Codec team is pleased to announce the commons-codec-1.12 release! + +The Apache Commons Codec package contains simple encoder and decoders for + various formats such as Base64 and Hexadecimal. In addition to these + widely used encoders and decoders, the codec package also maintains a + collection of phonetic encoding utilities. + +Changes in this version include: + +New features: +o Add Percent-Encoding Codec (described in RFC3986 and RFC7578) Issue: CODEC-240. Thanks to Ioannis Sermetziadis. +o Add SHA-3 methods in DigestUtils Issue: CODEC-251. Thanks to Gary Gregory. + +Fixed Bugs: +o B64 salt generator: Random -> ThreadLocalRandom Issue: CODEC-252. +o Wrong value calculated by Cologne Phonetic if a special character is placed between equal letters Issue: CODEC-250. Thanks to Alex Volodko. +o ColognePhoneticTest.testIsEncodeEquals missing assertions Issue: CODEC-246. Thanks to Oscar Luis Vera Pérez. + +Changes: +o Update from Java 7 to Java 8 Issue: CODEC-253. + + +Have fun! +-Apache Commons Codec team + + +------------------------------------------------------------------------------- + + Apache Commons Codec 1.11 RELEASE NOTES + +The Apache Commons Codec team is pleased to announce the commons-codec-1.11 release! + +The Apache Commons Codec package contains simple encoder and decoders for + various formats such as Base64 and Hexadecimal. In addition to these + widely used encoders and decoders, the codec package also maintains a + collection of phonetic encoding utilities. + +Changes in this version include: + +New features: +o Add support for XXHash32 Issue: CODEC-241. +o Fluent interface for DigestUtils Issue: CODEC-220. +o Fluent interface for HmacUtils Issue: CODEC-222. +o Add support for CRC32-C Issue: CODEC-171. Thanks to Brett Okken. +o Add HmacAlgorithms.HMAC_SHA_224 (Java 8 only) Issue: CODEC-217. Thanks to Gary Gregory. +o Support JEP 287: SHA-3 Hash Algorithms Issue: CODEC-213. Thanks to Gary Gregory. +o Create a minimal Digest command line utility: org.apache.commons.codec.digest.Digest Issue: CODEC-212. Thanks to Gary Gregory. +o Add DigestUtils.getDigest(String, MessageDigest) Issue: CODEC-210. Thanks to Gary Gregory. +o Make some DigestUtils APIs public Issue: CODEC-208. Thanks to Gary Gregory. +o Add java.io.File APIs to MessageDigestAlgorithm Issue: CODEC-206. Thanks to Gary Gregory. +o BaseNCodecOutputStream only supports writing EOF on close() Issue: CODEC-183. Thanks to Steven Wurster. +o Support SHA-224 in DigestUtils on Java 8 Issue: CODEC-195. Thanks to Gary Gregory. +o Support java.nio.ByteBuffer in org.apache.commons.codec.binary.Hex Issue: CODEC-194. Thanks to Gary Gregory. +o Support java.nio.ByteBuffer in DigestUtils Issue: CODEC-193. Thanks to Michael Donaghy. +o Add BaseNCodec.encode(byte[], int, int) input with offset and length parameters for Base64 and Base32. Issue: CODEC-202. Thanks to Oleg Kalnichevski. +o Add convenience method decodeHex(String). Issue: CODEC-203. Thanks to Gary Gregory. +o Add faster CRC32 implementation. Issue: CODEC-205. Thanks to Gary Gregory. +o Add convenience API org.apache.commons.codec.binary.Hex.encodeHexString(byte[]|ByteBuffer, boolean). Issue: CODEC-224. Thanks to Gary Gregory. +o Add Automatic-Module-Name manifest entry for Java 9. Issue: CODEC-242. Thanks to Gary Gregory. + +Fixed Bugs: +o Base64.encodeBase64String could better use newStringUsAscii (ditto encodeBase64URLSafeString) Issue: CODEC-145. Thanks to Jesse Glick. +o BaseNCodec: encodeToString and encodeAsString methods are identical Issue: CODEC-144. +o URLCodec is neither immutable nor threadsafe Issue: CODEC-232. +o StringUtils.equals(CharSequence cs1, CharSequence cs2) can fail with String Index OBE Issue: CODEC-231. +o URLCodec.WWW_FORM_URL should be private Issue: CODEC-230. +o StringUtils.newStringxxx(null) should return null, not NPE Issue: CODEC-229. +o Fix minor resource leaks Issue: CODEC-225. Thanks to Svetlin Zarev. +o Base32.HEX_DECODE_TABLE contains the wrong value 32 Issue: CODEC-200. Thanks to Luciano Vernaschi. +o Charsets Javadoc breaks build when using Java 8 Issue: CODEC-207. Thanks to Gary Gregory. +o Bug in HW rule in Soundex Issue: CODEC-199. Thanks to Yossi Tamari. +o Javadoc for SHA-224 DigestUtils methods should mention Java 1.8.0 restriction instead of 1.4.0. Issue: CODEC-209. Thanks to Gary Gregory. +o Don't deprecate Charsets Charset constants in favor of Java 7's java.nio.charset.StandardCharsets Issue: CODEC-219. Thanks to Gary Gregory, Sebb. + +Changes: +o Base32.decode should support lowercase letters Issue: CODEC-234. Thanks to Christopher Schultz, Sebb. +o Soundex should support more algorithm variants Issue: CODEC-233. Thanks to Yossi Tamari. +o HmacUtils.updateHmac calls reset() unnecessarily Issue: CODEC-221. + +Removed: +o Drop obsolete Ant build Issue: CODEC-223. + +Have fun! +-Apache Commons Codec team + + +------------------------------------------------------------------------------- + + Apache Commons Codec 1.10 RELEASE NOTES + +The Apache Commons Codec team is pleased to announce the commons-codec-1.10 release! + +The Apache Commons Codec package contains simple encoder and decoders for + various formats such as Base64 and Hexadecimal. In addition to these + widely used encoders and decoders, the codec package also maintains a + collection of phonetic encoding utilities. + +This feature and fix release requires a minimum of Java 1.6, same as 1.9. + +Changes in this version include: + +New features: + +o Add Daitch-Mokotoff Soundex + Issue: CODEC-192. Thanks to Thomas Neidhart. +o QuotedPrintableCodec does not support soft line break per the 'quoted-printable' example on Wikipedia + Issue: CODEC-121. Thanks to Thomas Neidhart, Java John. +o Make possible to provide padding byte to BaseNCodec in constructor + Issue: CODEC-181. Thanks to Ivan Martinez-Ortiz. + +Fixed Bugs: + +o Added clarification to Javadoc of Base64 concerning the use of the urlSafe parameter + Issue: CODEC-185. Thanks to Sean Busbey. +o Added clarification to the Javadoc of Base[32|64]OutputStream that it is mandatory to call close() + Issue: CODEC-191. Thanks to Igor Savin. +o Add support for HMAC Message Authentication Code (MAC) digests + Issue: CODEC-188. Thanks to Hendrik Saly. +o Beider Morse Phonetic Matching producing incorrect tokens + Issue: CODEC-187. Thanks to Michael Tobias, Thomas Neidhart. +o NullPointerException in DoubleMetaPhone.isDoubleMetaphoneEqual when using empty strings + Issue: CODEC-184. Thanks to Cyrille Artho. +o Fix Javadoc 1.8.0 errors + Issue: CODEC-180. Thanks to Ville Skyttä. +o Fix Java 8 build Javadoc errors + Issue: CODEC-189. + +Changes: + +o Deprecate Charsets Charset constants in favor of Java 7's java.nio.charset.StandardCharsets + Issue: CODEC-178. +o Update from commons-parent 34 to 35 + Issue: CODEC-190. + + +Have fun! +-Apache Commons Codec team + + +------------------------------------------------------------------------------- + + Apache Commons Codec 1.9 RELEASE NOTES + +The codec package contains simple encoder and decoders for +various formats such as Base64 and Hexadecimal. In addition to these +widely used encoders and decoders, the codec package also maintains a +collection of phonetic encoding utilities. + +This feature and fix release requires a minimum of Java 1.6, same as 1.8. + +Changes in this version include: + +Performance: +o CODEC-174: Improve performance of Beider Morse encoder. Thanks to Thomas Champagne. + +Fixed Bugs: +o CODEC-175: Beider Morse does not close Scanners used to read config files. +o CODEC-172: Base32 decode table has spurious value. Thanks to Matt Bishop. +o CODEC-170: Link broken in Metaphone Javadoc. Thanks to Ron Wheeler, Henri Yandell. +o CODEC-176: Spelling fixes in Javadoc and comments. Thanks to Ville Skyttä. + + +For complete information on Apache Commons Codec, including instructions on how to submit bug reports, +patches, or suggestions for improvement, see the Apache Commons Codec website: + +https://commons.apache.org/proper/commons-codec/ diff --git a/WebServer/commons-codec-1.15/apidocs/allclasses-frame.html b/WebServer/commons-codec-1.15/apidocs/allclasses-frame.html new file mode 100644 index 0000000000000000000000000000000000000000..7a6119cde67c116eddd71a726f6a755db6fea518 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/allclasses-frame.html @@ -0,0 +1,93 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>All Classes (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> +<script type="text/javascript" src="script.js"></script> +</head> +<body> +<h1 class="bar">All Classes</h1> +<div class="indexContainer"> +<ul> +<li><a href="org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language" target="classFrame">AbstractCaverphone</a></li> +<li><a href="org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base16</a></li> +<li><a href="org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base16InputStream</a></li> +<li><a href="org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base16OutputStream</a></li> +<li><a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base32</a></li> +<li><a href="org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base32InputStream</a></li> +<li><a href="org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base32OutputStream</a></li> +<li><a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base64</a></li> +<li><a href="org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base64InputStream</a></li> +<li><a href="org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base64OutputStream</a></li> +<li><a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary" target="classFrame">BaseNCodec</a></li> +<li><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">BaseNCodecInputStream</a></li> +<li><a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">BaseNCodecOutputStream</a></li> +<li><a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net" target="classFrame">BCodec</a></li> +<li><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">BeiderMorseEncoder</a></li> +<li><a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary" target="classFrame">BinaryCodec</a></li> +<li><a href="org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">BinaryDecoder</span></a></li> +<li><a href="org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">BinaryEncoder</span></a></li> +<li><a href="org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language" target="classFrame">Caverphone</a></li> +<li><a href="org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language" target="classFrame">Caverphone1</a></li> +<li><a href="org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language" target="classFrame">Caverphone2</a></li> +<li><a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec" target="classFrame">CharEncoding</a></li> +<li><a href="org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary" target="classFrame">CharSequenceUtils</a></li> +<li><a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec" target="classFrame">Charsets</a></li> +<li><a href="org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec" target="classFrame">CodecPolicy</a></li> +<li><a href="org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language" target="classFrame">ColognePhonetic</a></li> +<li><a href="org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest" target="classFrame">Crypt</a></li> +<li><a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language" target="classFrame">DaitchMokotoffSoundex</a></li> +<li><a href="org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">Decoder</span></a></li> +<li><a href="org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec" target="classFrame">DecoderException</a></li> +<li><a href="org/apache/commons/codec/cli/Digest.html" title="class in org.apache.commons.codec.cli" target="classFrame">Digest</a></li> +<li><a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest" target="classFrame">DigestUtils</a></li> +<li><a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language" target="classFrame">DoubleMetaphone</a></li> +<li><a href="org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">Encoder</span></a></li> +<li><a href="org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec" target="classFrame">EncoderException</a></li> +<li><a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary" target="classFrame">Hex</a></li> +<li><a href="org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest" target="classFrame">HmacAlgorithms</a></li> +<li><a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest" target="classFrame">HmacUtils</a></li> +<li><a href="org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Lang</a></li> +<li><a href="org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Languages</a></li> +<li><a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Languages.LanguageSet</a></li> +<li><a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Languages.SomeLanguages</a></li> +<li><a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language" target="classFrame">MatchRatingApproachEncoder</a></li> +<li><a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest" target="classFrame">Md5Crypt</a></li> +<li><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest" target="classFrame">MessageDigestAlgorithms</a></li> +<li><a href="org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language" target="classFrame">Metaphone</a></li> +<li><a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest" target="classFrame">MurmurHash2</a></li> +<li><a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest" target="classFrame">MurmurHash3</a></li> +<li><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest" target="classFrame">MurmurHash3.IncrementalHash32</a></li> +<li><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest" target="classFrame">MurmurHash3.IncrementalHash32x86</a></li> +<li><a href="org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm" target="classFrame">NameType</a></li> +<li><a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language" target="classFrame">Nysiis</a></li> +<li><a href="org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net" target="classFrame">PercentCodec</a></li> +<li><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">PhoneticEngine</a></li> +<li><a href="org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest" target="classFrame">PureJavaCrc32</a></li> +<li><a href="org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest" target="classFrame">PureJavaCrc32C</a></li> +<li><a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net" target="classFrame">QCodec</a></li> +<li><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net" target="classFrame">QuotedPrintableCodec</a></li> +<li><a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language" target="classFrame">RefinedSoundex</a></li> +<li><a href="org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec" target="classFrame">Resources</a></li> +<li><a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Rule</a></li> +<li><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Rule.Phoneme</a></li> +<li><a href="org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm" target="classFrame"><span class="interfaceName">Rule.PhonemeExpr</span></a></li> +<li><a href="org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Rule.PhonemeList</a></li> +<li><a href="org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm" target="classFrame"><span class="interfaceName">Rule.RPattern</span></a></li> +<li><a href="org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm" target="classFrame">RuleType</a></li> +<li><a href="org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest" target="classFrame">Sha2Crypt</a></li> +<li><a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language" target="classFrame">Soundex</a></li> +<li><a href="org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">StringDecoder</span></a></li> +<li><a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">StringEncoder</span></a></li> +<li><a href="org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec" target="classFrame">StringEncoderComparator</a></li> +<li><a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary" target="classFrame">StringUtils</a></li> +<li><a href="org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest" target="classFrame">UnixCrypt</a></li> +<li><a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net" target="classFrame">URLCodec</a></li> +<li><a href="org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest" target="classFrame">XXHash32</a></li> +</ul> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/allclasses-noframe.html b/WebServer/commons-codec-1.15/apidocs/allclasses-noframe.html new file mode 100644 index 0000000000000000000000000000000000000000..a778b1fae5c4aac61a9f23211ea40a0d6d32cd6a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/allclasses-noframe.html @@ -0,0 +1,93 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>All Classes (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> +<script type="text/javascript" src="script.js"></script> +</head> +<body> +<h1 class="bar">All Classes</h1> +<div class="indexContainer"> +<ul> +<li><a href="org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></li> +<li><a href="org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a></li> +<li><a href="org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary">Base16InputStream</a></li> +<li><a href="org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary">Base16OutputStream</a></li> +<li><a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></li> +<li><a href="org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary">Base32InputStream</a></li> +<li><a href="org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary">Base32OutputStream</a></li> +<li><a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></li> +<li><a href="org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary">Base64InputStream</a></li> +<li><a href="org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary">Base64OutputStream</a></li> +<li><a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></li> +<li><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></li> +<li><a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></li> +<li><a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></li> +<li><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></li> +<li><a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></li> +<li><a href="org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec"><span class="interfaceName">BinaryDecoder</span></a></li> +<li><a href="org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec"><span class="interfaceName">BinaryEncoder</span></a></li> +<li><a href="org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Caverphone</a></li> +<li><a href="org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Caverphone1</a></li> +<li><a href="org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Caverphone2</a></li> +<li><a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">CharEncoding</a></li> +<li><a href="org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary">CharSequenceUtils</a></li> +<li><a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Charsets</a></li> +<li><a href="org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></li> +<li><a href="org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">ColognePhonetic</a></li> +<li><a href="org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest">Crypt</a></li> +<li><a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">DaitchMokotoffSoundex</a></li> +<li><a href="org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><span class="interfaceName">Decoder</span></a></li> +<li><a href="org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></li> +<li><a href="org/apache/commons/codec/cli/Digest.html" title="class in org.apache.commons.codec.cli">Digest</a></li> +<li><a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></li> +<li><a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></li> +<li><a href="org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec"><span class="interfaceName">Encoder</span></a></li> +<li><a href="org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></li> +<li><a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></li> +<li><a href="org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></li> +<li><a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></li> +<li><a href="org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></li> +<li><a href="org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></li> +<li><a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></li> +<li><a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></li> +<li><a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">MatchRatingApproachEncoder</a></li> +<li><a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></li> +<li><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></li> +<li><a href="org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a></li> +<li><a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">MurmurHash2</a></li> +<li><a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></li> +<li><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32</a></li> +<li><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a></li> +<li><a href="org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></li> +<li><a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a></li> +<li><a href="org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></li> +<li><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">PhoneticEngine</a></li> +<li><a href="org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32</a></li> +<li><a href="org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32C</a></li> +<li><a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></li> +<li><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></li> +<li><a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></li> +<li><a href="org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec">Resources</a></li> +<li><a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></li> +<li><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></li> +<li><a href="org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm"><span class="interfaceName">Rule.PhonemeExpr</span></a></li> +<li><a href="org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm">Rule.PhonemeList</a></li> +<li><a href="org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm"><span class="interfaceName">Rule.RPattern</span></a></li> +<li><a href="org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></li> +<li><a href="org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest">Sha2Crypt</a></li> +<li><a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></li> +<li><a href="org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec"><span class="interfaceName">StringDecoder</span></a></li> +<li><a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><span class="interfaceName">StringEncoder</span></a></li> +<li><a href="org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec">StringEncoderComparator</a></li> +<li><a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></li> +<li><a href="org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest">UnixCrypt</a></li> +<li><a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></li> +<li><a href="org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest">XXHash32</a></li> +</ul> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/constant-values.html b/WebServer/commons-codec-1.15/apidocs/constant-values.html new file mode 100644 index 0000000000000000000000000000000000000000..ee135a0e3266e55d1c4f72af63209f1e37149782 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/constant-values.html @@ -0,0 +1,562 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Constant Field Values (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> +<script type="text/javascript" src="script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Constant Field Values (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li><a href="index-all.html">Index</a></li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?constant-values.html" target="_top">Frames</a></li> +<li><a href="constant-values.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Constant Field Values" class="title">Constant Field Values</h1> +<h2 title="Contents">Contents</h2> +<ul> +<li><a href="#org.apache">org.apache.*</a></li> +</ul> +</div> +<div class="constantValuesContainer"><a name="org.apache"> +<!-- --> +</a> +<h2 title="org.apache">org.apache.*</h2> +<ul class="blockList"> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.<a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">CharEncoding</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.CharEncoding.ISO_8859_1"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/CharEncoding.html#ISO_8859_1">ISO_8859_1</a></code></td> +<td class="colLast"><code>"ISO-8859-1"</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.CharEncoding.US_ASCII"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/CharEncoding.html#US_ASCII">US_ASCII</a></code></td> +<td class="colLast"><code>"US-ASCII"</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.CharEncoding.UTF_16"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/CharEncoding.html#UTF_16">UTF_16</a></code></td> +<td class="colLast"><code>"UTF-16"</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.CharEncoding.UTF_16BE"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/CharEncoding.html#UTF_16BE">UTF_16BE</a></code></td> +<td class="colLast"><code>"UTF-16BE"</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.CharEncoding.UTF_16LE"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/CharEncoding.html#UTF_16LE">UTF_16LE</a></code></td> +<td class="colLast"><code>"UTF-16LE"</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.CharEncoding.UTF_8"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/CharEncoding.html#UTF_8">UTF_8</a></code></td> +<td class="colLast"><code>"UTF-8"</code></td> +</tr> +</tbody> +</table> +</li> +</ul> +<ul class="blockList"> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.binary.BaseNCodec.MASK_8BITS"> +<!-- --> +</a><code>protected static final int</code></td> +<td><code><a href="org/apache/commons/codec/binary/BaseNCodec.html#MASK_8BITS">MASK_8BITS</a></code></td> +<td class="colLast"><code>255</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.binary.BaseNCodec.MIME_CHUNK_SIZE"> +<!-- --> +</a><code>public static final int</code></td> +<td><code><a href="org/apache/commons/codec/binary/BaseNCodec.html#MIME_CHUNK_SIZE">MIME_CHUNK_SIZE</a></code></td> +<td class="colLast"><code>76</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.binary.BaseNCodec.PAD"> +<!-- --> +</a><code>protected final byte</code></td> +<td><code><a href="org/apache/commons/codec/binary/BaseNCodec.html#PAD">PAD</a></code></td> +<td class="colLast"><code>61</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.binary.BaseNCodec.PAD_DEFAULT"> +<!-- --> +</a><code>protected static final byte</code></td> +<td><code><a href="org/apache/commons/codec/binary/BaseNCodec.html#PAD_DEFAULT">PAD_DEFAULT</a></code></td> +<td class="colLast"><code>61</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.binary.BaseNCodec.PEM_CHUNK_SIZE"> +<!-- --> +</a><code>public static final int</code></td> +<td><code><a href="org/apache/commons/codec/binary/BaseNCodec.html#PEM_CHUNK_SIZE">PEM_CHUNK_SIZE</a></code></td> +<td class="colLast"><code>64</code></td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.binary.Hex.DEFAULT_CHARSET_NAME"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/binary/Hex.html#DEFAULT_CHARSET_NAME">DEFAULT_CHARSET_NAME</a></code></td> +<td class="colLast"><code>"UTF-8"</code></td> +</tr> +</tbody> +</table> +</li> +</ul> +<ul class="blockList"> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.MD2"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#MD2">MD2</a></code></td> +<td class="colLast"><code>"MD2"</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.MD5"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#MD5">MD5</a></code></td> +<td class="colLast"><code>"MD5"</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_1"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_1">SHA_1</a></code></td> +<td class="colLast"><code>"SHA-1"</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_224"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_224">SHA_224</a></code></td> +<td class="colLast"><code>"SHA-224"</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_256"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_256">SHA_256</a></code></td> +<td class="colLast"><code>"SHA-256"</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_384"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_384">SHA_384</a></code></td> +<td class="colLast"><code>"SHA-384"</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_512"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512">SHA_512</a></code></td> +<td class="colLast"><code>"SHA-512"</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_512_224"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512_224">SHA_512_224</a></code></td> +<td class="colLast"><code>"SHA-512/224"</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_512_256"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512_256">SHA_512_256</a></code></td> +<td class="colLast"><code>"SHA-512/256"</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA3_224"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_224">SHA3_224</a></code></td> +<td class="colLast"><code>"SHA3-224"</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA3_256"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_256">SHA3_256</a></code></td> +<td class="colLast"><code>"SHA3-256"</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA3_384"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_384">SHA3_384</a></code></td> +<td class="colLast"><code>"SHA3-384"</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA3_512"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_512">SHA3_512</a></code></td> +<td class="colLast"><code>"SHA3-512"</code></td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MurmurHash3.DEFAULT_SEED"> +<!-- --> +</a><code>public static final int</code></td> +<td><code><a href="org/apache/commons/codec/digest/MurmurHash3.html#DEFAULT_SEED">DEFAULT_SEED</a></code></td> +<td class="colLast"><code>104729</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.digest.MurmurHash3.NULL_HASHCODE"> +<!-- --> +</a><code>public static final long</code></td> +<td><code><a href="org/apache/commons/codec/digest/MurmurHash3.html#NULL_HASHCODE">NULL_HASHCODE</a></code></td> +<td class="colLast"><code>2862933555777941757L</code></td> +</tr> +</tbody> +</table> +</li> +</ul> +<ul class="blockList"> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.language.RefinedSoundex.US_ENGLISH_MAPPING_STRING"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/language/RefinedSoundex.html#US_ENGLISH_MAPPING_STRING">US_ENGLISH_MAPPING_STRING</a></code></td> +<td class="colLast"><code>"01360240043788015936020505"</code></td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.language.Soundex.SILENT_MARKER"> +<!-- --> +</a><code>public static final char</code></td> +<td><code><a href="org/apache/commons/codec/language/Soundex.html#SILENT_MARKER">SILENT_MARKER</a></code></td> +<td class="colLast"><code>45</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.language.Soundex.US_ENGLISH_MAPPING_STRING"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING_STRING">US_ENGLISH_MAPPING_STRING</a></code></td> +<td class="colLast"><code>"01230120022455012623010202"</code></td> +</tr> +</tbody> +</table> +</li> +</ul> +<ul class="blockList"> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.language.bm.Languages.ANY"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/language/bm/Languages.html#ANY">ANY</a></code></td> +<td class="colLast"><code>"any"</code></td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.language.bm.Rule.ALL"> +<!-- --> +</a><code>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code><a href="org/apache/commons/codec/language/bm/Rule.html#ALL">ALL</a></code></td> +<td class="colLast"><code>"ALL"</code></td> +</tr> +</tbody> +</table> +</li> +</ul> +<ul class="blockList"> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.net.BCodec.POSTFIX"> +<!-- --> +</a><code>protected static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code>POSTFIX</code></td> +<td class="colLast"><code>"?="</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.net.BCodec.PREFIX"> +<!-- --> +</a><code>protected static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code>PREFIX</code></td> +<td class="colLast"><code>"=?"</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.net.BCodec.SEP"> +<!-- --> +</a><code>protected static final char</code></td> +<td><code>SEP</code></td> +<td class="colLast"><code>63</code></td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.net.QCodec.POSTFIX"> +<!-- --> +</a><code>protected static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code>POSTFIX</code></td> +<td class="colLast"><code>"?="</code></td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a name="org.apache.commons.codec.net.QCodec.PREFIX"> +<!-- --> +</a><code>protected static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td><code>PREFIX</code></td> +<td class="colLast"><code>"=?"</code></td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.net.QCodec.SEP"> +<!-- --> +</a><code>protected static final char</code></td> +<td><code>SEP</code></td> +<td class="colLast"><code>63</code></td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values"> +<caption><span>org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th scope="col">Constant Field</th> +<th class="colLast" scope="col">Value</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a name="org.apache.commons.codec.net.URLCodec.ESCAPE_CHAR"> +<!-- --> +</a><code>protected static final byte</code></td> +<td><code><a href="org/apache/commons/codec/net/URLCodec.html#ESCAPE_CHAR">ESCAPE_CHAR</a></code></td> +<td class="colLast"><code>37</code></td> +</tr> +</tbody> +</table> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li><a href="index-all.html">Index</a></li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?constant-values.html" target="_top">Frames</a></li> +<li><a href="constant-values.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/deprecated-list.html b/WebServer/commons-codec-1.15/apidocs/deprecated-list.html new file mode 100644 index 0000000000000000000000000000000000000000..a43df97bc54d611ba93d58a93fc63a971823b47e --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/deprecated-list.html @@ -0,0 +1,576 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Deprecated List (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> +<script type="text/javascript" src="script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Deprecated List (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li class="navBarCell1Rev">Deprecated</li> +<li><a href="index-all.html">Index</a></li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li> +<li><a href="deprecated-list.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Deprecated API" class="title">Deprecated API</h1> +<h2 title="Contents">Contents</h2> +<ul> +<li><a href="#class">Deprecated Classes</a></li> +<li><a href="#field">Deprecated Fields</a></li> +<li><a href="#method">Deprecated Methods</a></li> +<li><a href="#constructor">Deprecated Constructors</a></li> +</ul> +</div> +<div class="contentContainer"><a name="class"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<table class="deprecatedSummary" border="0" cellpadding="3" cellspacing="0" summary="Deprecated Classes table, listing deprecated classes, and an explanation"> +<caption><span>Deprecated Classes</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">org.apache.commons.codec.language.Caverphone</a> +<div class="block"><span class="deprecationComment">1.5 Replaced by <a href="org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><code>Caverphone2</code></a>, will be removed in 2.0.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest">org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32</a> +<div class="block"><span class="deprecationComment">Use IncrementalHash32x86. This corrects the processing of trailing bytes.</span></div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +<a name="field"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<table class="deprecatedSummary" border="0" cellpadding="3" cellspacing="0" summary="Deprecated Fields table, listing deprecated fields, and an explanation"> +<caption><span>Deprecated Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Field and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/net/URLCodec.html#charset">org.apache.commons.codec.net.URLCodec.charset</a> +<div class="block"><span class="deprecationComment">TODO: This field will be changed to a private final Charset in 2.0. (CODEC-126)</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/Charsets.html#ISO_8859_1">org.apache.commons.codec.Charsets.ISO_8859_1</a> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#ISO_8859_1" title="class or interface in java.nio.charset"><code>StandardCharsets.ISO_8859_1</code></a> instead.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#NULL_HASHCODE">org.apache.commons.codec.digest.MurmurHash3.NULL_HASHCODE</a> +<div class="block"><span class="deprecationComment">This is not used internally and will be removed in a future release.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/binary/BaseNCodec.html#PAD">org.apache.commons.codec.binary.BaseNCodec.PAD</a> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/binary/BaseNCodec.html#pad"><code>BaseNCodec.pad</code></a>. Will be removed in 2.0.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/Charsets.html#US_ASCII">org.apache.commons.codec.Charsets.US_ASCII</a> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#US_ASCII" title="class or interface in java.nio.charset"><code>StandardCharsets.US_ASCII</code></a> instead.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/Charsets.html#UTF_16">org.apache.commons.codec.Charsets.UTF_16</a> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16</code></a> instead.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/Charsets.html#UTF_16BE">org.apache.commons.codec.Charsets.UTF_16BE</a> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16BE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16BE</code></a> instead.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/Charsets.html#UTF_16LE">org.apache.commons.codec.Charsets.UTF_16LE</a> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16LE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16LE</code></a> instead.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/Charsets.html#UTF_8">org.apache.commons.codec.Charsets.UTF_8</a> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a> instead.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/net/URLCodec.html#WWW_FORM_URL">org.apache.commons.codec.net.URLCodec.WWW_FORM_URL</a> +<div class="block"><span class="deprecationComment">1.11 Will be removed in 2.0 (CODEC-230)</span></div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +<a name="method"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<table class="deprecatedSummary" border="0" cellpadding="3" cellspacing="0" summary="Deprecated Methods table, listing deprecated methods, and an explanation"> +<caption><span>Deprecated Methods</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/net/URLCodec.html#getEncoding--">org.apache.commons.codec.net.URLCodec.getEncoding()</a> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/net/URLCodec.html#getDefaultCharset--"><code>URLCodec.getDefaultCharset()</code></a>, will be removed in 2.0.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#getHmacMd5-byte:A-">org.apache.commons.codec.digest.HmacUtils.getHmacMd5(byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_MD5, byte[])</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#getHmacSha1-byte:A-">org.apache.commons.codec.digest.HmacUtils.getHmacSha1(byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_1, byte[])</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#getHmacSha256-byte:A-">org.apache.commons.codec.digest.HmacUtils.getHmacSha256(byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_256, byte[])</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#getHmacSha384-byte:A-">org.apache.commons.codec.digest.HmacUtils.getHmacSha384(byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_384, byte[])</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#getHmacSha512-byte:A-">org.apache.commons.codec.digest.HmacUtils.getHmacSha512(byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_512, byte[])</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/language/Soundex.html#getMaxLength--">org.apache.commons.codec.language.Soundex.getMaxLength()</a> +<div class="block"><span class="deprecationComment">This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/DigestUtils.html#getShaDigest--">org.apache.commons.codec.digest.DigestUtils.getShaDigest()</a> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#getSha1Digest--"><code>DigestUtils.getSha1Digest()</code></a></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-">org.apache.commons.codec.digest.MurmurHash3.hash128(byte[], int, int, int)</a> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>MurmurHash3.hash128x64(byte[], int, int, int)</code></a>. This corrects the seed initialization.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128-java.lang.String-">org.apache.commons.codec.digest.MurmurHash3.hash128(String)</a> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>MurmurHash3.hash128x64(byte[])</code></a> using the bytes returned from + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-">org.apache.commons.codec.digest.MurmurHash3.hash32(byte[])</a> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>MurmurHash3.hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-">org.apache.commons.codec.digest.MurmurHash3.hash32(byte[], int)</a> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>MurmurHash3.hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-">org.apache.commons.codec.digest.MurmurHash3.hash32(byte[], int, int)</a> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>MurmurHash3.hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-">org.apache.commons.codec.digest.MurmurHash3.hash32(byte[], int, int, int)</a> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>MurmurHash3.hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-java.lang.String-">org.apache.commons.codec.digest.MurmurHash3.hash32(String)</a> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>MurmurHash3.hash32x86(byte[], int, int, int)</code></a> with the bytes returned from + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>. This corrects the processing of trailing bytes.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-">org.apache.commons.codec.digest.MurmurHash3.hash64(byte[])</a> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>MurmurHash3.hash128x64(byte[])</code></a>.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-">org.apache.commons.codec.digest.MurmurHash3.hash64(byte[], int, int)</a> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>MurmurHash3.hash128x64(byte[], int, int, int)</code></a>.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-">org.apache.commons.codec.digest.MurmurHash3.hash64(byte[], int, int, int)</a> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>MurmurHash3.hash128x64(byte[], int, int, int)</code></a>.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-int-">org.apache.commons.codec.digest.MurmurHash3.hash64(int)</a> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>MurmurHash3.hash128x64(byte[])</code></a> with the bytes from the <code>int</code>.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-long-">org.apache.commons.codec.digest.MurmurHash3.hash64(long)</a> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>MurmurHash3.hash128x64(byte[])</code></a> with the bytes from the <code>long</code>.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-short-">org.apache.commons.codec.digest.MurmurHash3.hash64(short)</a> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>MurmurHash3.hash128x64(byte[])</code></a> with the bytes from the <code>short</code>.</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5-byte:A-byte:A-">org.apache.commons.codec.digest.HmacUtils.hmacMd5(byte[], byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmac(byte[])</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5-byte:A-java.io.InputStream-">org.apache.commons.codec.digest.HmacUtils.hmacMd5(byte[], InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmac(InputStream)</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5-java.lang.String-java.lang.String-">org.apache.commons.codec.digest.HmacUtils.hmacMd5(String, String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, String).hmac(String)</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5Hex-byte:A-byte:A-">org.apache.commons.codec.digest.HmacUtils.hmacMd5Hex(byte[], byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmacHex(byte[])</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5Hex-byte:A-java.io.InputStream-">org.apache.commons.codec.digest.HmacUtils.hmacMd5Hex(byte[], InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmacHex(InputStream)</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5Hex-java.lang.String-java.lang.String-">org.apache.commons.codec.digest.HmacUtils.hmacMd5Hex(String, String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, String).hmacHex(String)</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1-byte:A-byte:A-">org.apache.commons.codec.digest.HmacUtils.hmacSha1(byte[], byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmac(byte[])</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1-byte:A-java.io.InputStream-">org.apache.commons.codec.digest.HmacUtils.hmacSha1(byte[], InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmac(InputStream)</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1-java.lang.String-java.lang.String-">org.apache.commons.codec.digest.HmacUtils.hmacSha1(String, String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, String).hmac(String)</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1Hex-byte:A-byte:A-">org.apache.commons.codec.digest.HmacUtils.hmacSha1Hex(byte[], byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmacHex(byte[])</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1Hex-byte:A-java.io.InputStream-">org.apache.commons.codec.digest.HmacUtils.hmacSha1Hex(byte[], InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmacHex(InputStream)</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1Hex-java.lang.String-java.lang.String-">org.apache.commons.codec.digest.HmacUtils.hmacSha1Hex(String, String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, String).hmacHex(String)</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256-byte:A-byte:A-">org.apache.commons.codec.digest.HmacUtils.hmacSha256(byte[], byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmac(byte[])</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256-byte:A-java.io.InputStream-">org.apache.commons.codec.digest.HmacUtils.hmacSha256(byte[], InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmac(InputStream)</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256-java.lang.String-java.lang.String-">org.apache.commons.codec.digest.HmacUtils.hmacSha256(String, String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, String).hmac(String)</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256Hex-byte:A-byte:A-">org.apache.commons.codec.digest.HmacUtils.hmacSha256Hex(byte[], byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmacHex(byte[])</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256Hex-byte:A-java.io.InputStream-">org.apache.commons.codec.digest.HmacUtils.hmacSha256Hex(byte[], InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmacHex(InputStream)</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256Hex-java.lang.String-java.lang.String-">org.apache.commons.codec.digest.HmacUtils.hmacSha256Hex(String, String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, String).hmacHex(String)</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384-byte:A-byte:A-">org.apache.commons.codec.digest.HmacUtils.hmacSha384(byte[], byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmac(byte[])</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384-byte:A-java.io.InputStream-">org.apache.commons.codec.digest.HmacUtils.hmacSha384(byte[], InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmac(InputStream)</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384-java.lang.String-java.lang.String-">org.apache.commons.codec.digest.HmacUtils.hmacSha384(String, String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, String).hmac(String)</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384Hex-byte:A-byte:A-">org.apache.commons.codec.digest.HmacUtils.hmacSha384Hex(byte[], byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmacHex(byte[])</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384Hex-byte:A-java.io.InputStream-">org.apache.commons.codec.digest.HmacUtils.hmacSha384Hex(byte[], InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmacHex(InputStream)</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384Hex-java.lang.String-java.lang.String-">org.apache.commons.codec.digest.HmacUtils.hmacSha384Hex(String, String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, String).hmacHex(String)</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512-byte:A-byte:A-">org.apache.commons.codec.digest.HmacUtils.hmacSha512(byte[], byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmac(byte[])</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512-byte:A-java.io.InputStream-">org.apache.commons.codec.digest.HmacUtils.hmacSha512(byte[], InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmac(InputStream)</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512-java.lang.String-java.lang.String-">org.apache.commons.codec.digest.HmacUtils.hmacSha512(String, String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, String).hmac(String)</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512Hex-byte:A-byte:A-">org.apache.commons.codec.digest.HmacUtils.hmacSha512Hex(byte[], byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmacHex(byte[])</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512Hex-byte:A-java.io.InputStream-">org.apache.commons.codec.digest.HmacUtils.hmacSha512Hex(byte[], InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmacHex(InputStream)</code></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512Hex-java.lang.String-java.lang.String-">org.apache.commons.codec.digest.HmacUtils.hmacSha512Hex(String, String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, String).hmacHex(String)</code></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/binary/Base64.html#isArrayByteBase64-byte:A-">org.apache.commons.codec.binary.Base64.isArrayByteBase64(byte[])</a> +<div class="block"><span class="deprecationComment">1.5 Use <a href="org/apache/commons/codec/binary/Base64.html#isBase64-byte:A-"><code>Base64.isBase64(byte[])</code></a>, will be removed in 2.0.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#join-org.apache.commons.codec.language.bm.Rule.Phoneme-">org.apache.commons.codec.language.bm.Rule.Phoneme.join(Rule.Phoneme)</a> +<div class="block"><span class="deprecationComment">since 1.9</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/language/Soundex.html#setMaxLength-int-">org.apache.commons.codec.language.Soundex.setMaxLength(int)</a> +<div class="block"><span class="deprecationComment">This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha-byte:A-">org.apache.commons.codec.digest.DigestUtils.sha(byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1-byte:A-"><code>DigestUtils.sha1(byte[])</code></a></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha-java.io.InputStream-">org.apache.commons.codec.digest.DigestUtils.sha(InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1-java.io.InputStream-"><code>DigestUtils.sha1(InputStream)</code></a></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha-java.lang.String-">org.apache.commons.codec.digest.DigestUtils.sha(String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1-java.lang.String-"><code>DigestUtils.sha1(String)</code></a></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/DigestUtils.html#shaHex-byte:A-">org.apache.commons.codec.digest.DigestUtils.shaHex(byte[])</a> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-byte:A-"><code>DigestUtils.sha1Hex(byte[])</code></a></span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/DigestUtils.html#shaHex-java.io.InputStream-">org.apache.commons.codec.digest.DigestUtils.shaHex(InputStream)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.io.InputStream-"><code>DigestUtils.sha1Hex(InputStream)</code></a></span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/DigestUtils.html#shaHex-java.lang.String-">org.apache.commons.codec.digest.DigestUtils.shaHex(String)</a> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.lang.String-"><code>DigestUtils.sha1Hex(String)</code></a></span></div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +<a name="constructor"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<table class="deprecatedSummary" border="0" cellpadding="3" cellspacing="0" summary="Deprecated Constructors table, listing deprecated constructors, and an explanation"> +<caption><span>Deprecated Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/DigestUtils.html#DigestUtils--">org.apache.commons.codec.digest.DigestUtils()</a> +<div class="block"><span class="deprecationComment">since 1.11; only useful to preserve binary compatibility</span></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="org/apache/commons/codec/digest/HmacUtils.html#HmacUtils--">org.apache.commons.codec.digest.HmacUtils()</a> +<div class="block"><span class="deprecationComment">since 1.11; only useful to preserve binary compatibility</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="org/apache/commons/codec/StringEncoderComparator.html#StringEncoderComparator--">org.apache.commons.codec.StringEncoderComparator()</a> +<div class="block"><span class="deprecationComment">Creating an instance without a <a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><code>StringEncoder</code></a> leads to a <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a>. Will be + removed in 2.0.</span></div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li class="navBarCell1Rev">Deprecated</li> +<li><a href="index-all.html">Index</a></li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li> +<li><a href="deprecated-list.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/help-doc.html b/WebServer/commons-codec-1.15/apidocs/help-doc.html new file mode 100644 index 0000000000000000000000000000000000000000..61b257f0f4b570525a09dd0dcf3eca10fe217d1d --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/help-doc.html @@ -0,0 +1,230 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>API Help (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> +<script type="text/javascript" src="script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="API Help (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li><a href="index-all.html">Index</a></li> +<li class="navBarCell1Rev">Help</li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?help-doc.html" target="_top">Frames</a></li> +<li><a href="help-doc.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 class="title">How This API Document Is Organized</h1> +<div class="subTitle">This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.</div> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<h2>Overview</h2> +<p>The <a href="overview-summary.html">Overview</a> page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.</p> +</li> +<li class="blockList"> +<h2>Package</h2> +<p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:</p> +<ul> +<li>Interfaces (italic)</li> +<li>Classes</li> +<li>Enums</li> +<li>Exceptions</li> +<li>Errors</li> +<li>Annotation Types</li> +</ul> +</li> +<li class="blockList"> +<h2>Class/Interface</h2> +<p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:</p> +<ul> +<li>Class inheritance diagram</li> +<li>Direct Subclasses</li> +<li>All Known Subinterfaces</li> +<li>All Known Implementing Classes</li> +<li>Class/interface declaration</li> +<li>Class/interface description</li> +</ul> +<ul> +<li>Nested Class Summary</li> +<li>Field Summary</li> +<li>Constructor Summary</li> +<li>Method Summary</li> +</ul> +<ul> +<li>Field Detail</li> +<li>Constructor Detail</li> +<li>Method Detail</li> +</ul> +<p>Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p> +</li> +<li class="blockList"> +<h2>Annotation Type</h2> +<p>Each annotation type has its own separate page with the following sections:</p> +<ul> +<li>Annotation Type declaration</li> +<li>Annotation Type description</li> +<li>Required Element Summary</li> +<li>Optional Element Summary</li> +<li>Element Detail</li> +</ul> +</li> +<li class="blockList"> +<h2>Enum</h2> +<p>Each enum has its own separate page with the following sections:</p> +<ul> +<li>Enum declaration</li> +<li>Enum description</li> +<li>Enum Constant Summary</li> +<li>Enum Constant Detail</li> +</ul> +</li> +<li class="blockList"> +<h2>Use</h2> +<p>Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.</p> +</li> +<li class="blockList"> +<h2>Tree (Class Hierarchy)</h2> +<p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.</p> +<ul> +<li>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.</li> +<li>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</li> +</ul> +</li> +<li class="blockList"> +<h2>Deprecated API</h2> +<p>The <a href="deprecated-list.html">Deprecated API</a> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</p> +</li> +<li class="blockList"> +<h2>Index</h2> +<p>The <a href="index-all.html">Index</a> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</p> +</li> +<li class="blockList"> +<h2>Prev/Next</h2> +<p>These links take you to the next or previous class, interface, package, or related page.</p> +</li> +<li class="blockList"> +<h2>Frames/No Frames</h2> +<p>These links show and hide the HTML frames. All pages are available with or without frames.</p> +</li> +<li class="blockList"> +<h2>All Classes</h2> +<p>The <a href="allclasses-noframe.html">All Classes</a> link shows all classes and interfaces except non-static nested types.</p> +</li> +<li class="blockList"> +<h2>Serialized Form</h2> +<p>Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.</p> +</li> +<li class="blockList"> +<h2>Constant Field Values</h2> +<p>The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.</p> +</li> +</ul> +<span class="emphasizedPhrase">This help file applies to API documentation generated using the standard doclet.</span></div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li><a href="index-all.html">Index</a></li> +<li class="navBarCell1Rev">Help</li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?help-doc.html" target="_top">Frames</a></li> +<li><a href="help-doc.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/index-all.html b/WebServer/commons-codec-1.15/apidocs/index-all.html new file mode 100644 index 0000000000000000000000000000000000000000..1468720fec08bc16a7875a8de893c21ed504a088 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/index-all.html @@ -0,0 +1,3533 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Index (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> +<script type="text/javascript" src="script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Index (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li class="navBarCell1Rev">Index</li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?index-all.html" target="_top">Frames</a></li> +<li><a href="index-all.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="contentContainer"><a href="#I:A">A</a> <a href="#I:B">B</a> <a href="#I:C">C</a> <a href="#I:D">D</a> <a href="#I:E">E</a> <a href="#I:F">F</a> <a href="#I:G">G</a> <a href="#I:H">H</a> <a href="#I:I">I</a> <a href="#I:J">J</a> <a href="#I:L">L</a> <a href="#I:M">M</a> <a href="#I:N">N</a> <a href="#I:O">O</a> <a href="#I:P">P</a> <a href="#I:Q">Q</a> <a href="#I:R">R</a> <a href="#I:S">S</a> <a href="#I:T">T</a> <a href="#I:U">U</a> <a href="#I:V">V</a> <a href="#I:W">W</a> <a href="#I:X">X</a> <a name="I:A"> +<!-- --> +</a> +<h2 class="title">A</h2> +<dl> +<dt><a href="org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">AbstractCaverphone</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Encodes a string into a Caverphone value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/AbstractCaverphone.html#AbstractCaverphone--">AbstractCaverphone()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></dt> +<dd> +<div class="block">Creates an instance of the Caverphone encoder</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html#add-byte:A-int-int-">add(byte[], int, int)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a></dt> +<dd> +<div class="block">Adds the byte array to the current incremental hash.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#ALL">ALL</a></span> - Static variable in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#ALL_STRINGS_RMATCHER">ALL_STRINGS_RMATCHER</a></span> - Static variable in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.html#ANY">ANY</a></span> - Static variable in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.html#ANY_LANGUAGE">ANY_LANGUAGE</a></span> - Static variable in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></dt> +<dd> +<div class="block">Any/all languages.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#append-java.lang.CharSequence-">append(CharSequence)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#append-char-">append(char)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#append-char-char-">append(char, char)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#append-java.lang.String-">append(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#append-java.lang.String-java.lang.String-">append(String, String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#appendAlternate-char-">appendAlternate(char)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#appendAlternate-java.lang.String-">appendAlternate(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#appendPrimary-char-">appendPrimary(char)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#appendPrimary-java.lang.String-">appendPrimary(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-">apr1Crypt(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></dt> +<dd> +<div class="block">See <a href="org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-"><code>Md5Crypt.apr1Crypt(byte[], String)</code></a> for details.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.util.Random-">apr1Crypt(byte[], Random)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></dt> +<dd> +<div class="block">See <a href="org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-"><code>Md5Crypt.apr1Crypt(byte[], String)</code></a> for details.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-">apr1Crypt(byte[], String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></dt> +<dd> +<div class="block">See <a href="org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-java.lang.String-"><code>Md5Crypt.apr1Crypt(String, String)</code></a> for details.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-">apr1Crypt(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></dt> +<dd> +<div class="block">See <a href="org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-java.lang.String-"><code>Md5Crypt.apr1Crypt(String, String)</code></a> for details.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-java.lang.String-">apr1Crypt(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></dt> +<dd> +<div class="block">Generates an Apache htpasswd compatible "$apr1$" MD5 based hash value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html#available--">available()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></dt> +</dl> +<a name="I:B"> +<!-- --> +</a> +<h2 class="title">B</h2> +<dl> +<dt><a href="org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base16</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Provides Base16 encoding and decoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16.html#Base16--">Base16()</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a></dt> +<dd> +<div class="block">Creates a Base16 codec used for decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16.html#Base16-boolean-">Base16(boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a></dt> +<dd> +<div class="block">Creates a Base16 codec used for decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16.html#Base16-boolean-org.apache.commons.codec.CodecPolicy-">Base16(boolean, CodecPolicy)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a></dt> +<dd> +<div class="block">Creates a Base16 codec used for decoding and encoding.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base16InputStream</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Provides Base16 encoding and decoding in a streaming fashion (unlimited size).</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16InputStream.html#Base16InputStream-java.io.InputStream-">Base16InputStream(InputStream)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary">Base16InputStream</a></dt> +<dd> +<div class="block">Creates a Base16InputStream such that all data read is Base16-decoded from the original provided InputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16InputStream.html#Base16InputStream-java.io.InputStream-boolean-">Base16InputStream(InputStream, boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary">Base16InputStream</a></dt> +<dd> +<div class="block">Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + provided InputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16InputStream.html#Base16InputStream-java.io.InputStream-boolean-boolean-">Base16InputStream(InputStream, boolean, boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary">Base16InputStream</a></dt> +<dd> +<div class="block">Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + provided InputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16InputStream.html#Base16InputStream-java.io.InputStream-boolean-boolean-org.apache.commons.codec.CodecPolicy-">Base16InputStream(InputStream, boolean, boolean, CodecPolicy)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary">Base16InputStream</a></dt> +<dd> +<div class="block">Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + provided InputStream.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base16OutputStream</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Provides Hex encoding and decoding in a streaming fashion (unlimited size).</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16OutputStream.html#Base16OutputStream-java.io.OutputStream-">Base16OutputStream(OutputStream)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary">Base16OutputStream</a></dt> +<dd> +<div class="block">Creates a Base16OutputStream such that all data written is Hex-encoded to the original provided OutputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16OutputStream.html#Base16OutputStream-java.io.OutputStream-boolean-">Base16OutputStream(OutputStream, boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary">Base16OutputStream</a></dt> +<dd> +<div class="block">Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + original provided OutputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16OutputStream.html#Base16OutputStream-java.io.OutputStream-boolean-boolean-">Base16OutputStream(OutputStream, boolean, boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary">Base16OutputStream</a></dt> +<dd> +<div class="block">Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + original provided OutputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16OutputStream.html#Base16OutputStream-java.io.OutputStream-boolean-boolean-org.apache.commons.codec.CodecPolicy-">Base16OutputStream(OutputStream, boolean, boolean, CodecPolicy)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary">Base16OutputStream</a></dt> +<dd> +<div class="block">Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + original provided OutputStream.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base32</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Provides Base32 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32.html#Base32--">Base32()</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></dt> +<dd> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32.html#Base32-boolean-">Base32(boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></dt> +<dd> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32.html#Base32-boolean-byte-">Base32(boolean, byte)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></dt> +<dd> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32.html#Base32-byte-">Base32(byte)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></dt> +<dd> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32.html#Base32-int-">Base32(int)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></dt> +<dd> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32.html#Base32-int-byte:A-">Base32(int, byte[])</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></dt> +<dd> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32.html#Base32-int-byte:A-boolean-">Base32(int, byte[], boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></dt> +<dd> +<div class="block">Creates a Base32 / Base32 Hex codec used for decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32.html#Base32-int-byte:A-boolean-byte-">Base32(int, byte[], boolean, byte)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></dt> +<dd> +<div class="block">Creates a Base32 / Base32 Hex codec used for decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32.html#Base32-int-byte:A-boolean-byte-org.apache.commons.codec.CodecPolicy-">Base32(int, byte[], boolean, byte, CodecPolicy)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></dt> +<dd> +<div class="block">Creates a Base32 / Base32 Hex codec used for decoding and encoding.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base32InputStream</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Provides Base32 encoding and decoding in a streaming fashion (unlimited size).</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32InputStream.html#Base32InputStream-java.io.InputStream-">Base32InputStream(InputStream)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary">Base32InputStream</a></dt> +<dd> +<div class="block">Creates a Base32InputStream such that all data read is Base32-decoded from the original provided InputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32InputStream.html#Base32InputStream-java.io.InputStream-boolean-">Base32InputStream(InputStream, boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary">Base32InputStream</a></dt> +<dd> +<div class="block">Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + provided InputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32InputStream.html#Base32InputStream-java.io.InputStream-boolean-int-byte:A-">Base32InputStream(InputStream, boolean, int, byte[])</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary">Base32InputStream</a></dt> +<dd> +<div class="block">Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + provided InputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32InputStream.html#Base32InputStream-java.io.InputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base32InputStream(InputStream, boolean, int, byte[], CodecPolicy)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary">Base32InputStream</a></dt> +<dd> +<div class="block">Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + provided InputStream.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base32OutputStream</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Provides Base32 encoding and decoding in a streaming fashion (unlimited size).</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32OutputStream.html#Base32OutputStream-java.io.OutputStream-">Base32OutputStream(OutputStream)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary">Base32OutputStream</a></dt> +<dd> +<div class="block">Creates a Base32OutputStream such that all data written is Base32-encoded to the original provided OutputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32OutputStream.html#Base32OutputStream-java.io.OutputStream-boolean-">Base32OutputStream(OutputStream, boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary">Base32OutputStream</a></dt> +<dd> +<div class="block">Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + original provided OutputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32OutputStream.html#Base32OutputStream-java.io.OutputStream-boolean-int-byte:A-">Base32OutputStream(OutputStream, boolean, int, byte[])</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary">Base32OutputStream</a></dt> +<dd> +<div class="block">Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + original provided OutputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32OutputStream.html#Base32OutputStream-java.io.OutputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base32OutputStream(OutputStream, boolean, int, byte[], CodecPolicy)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary">Base32OutputStream</a></dt> +<dd> +<div class="block">Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + original provided OutputStream.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base64</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Provides Base64 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#Base64--">Base64()</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#Base64-boolean-">Base64(boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in the given URL-safe mode.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#Base64-int-">Base64(int)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#Base64-int-byte:A-">Base64(int, byte[])</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#Base64-int-byte:A-boolean-">Base64(int, byte[], boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#Base64-int-byte:A-boolean-org.apache.commons.codec.CodecPolicy-">Base64(int, byte[], boolean, CodecPolicy)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base64InputStream</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Provides Base64 encoding and decoding in a streaming fashion (unlimited size).</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64InputStream.html#Base64InputStream-java.io.InputStream-">Base64InputStream(InputStream)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary">Base64InputStream</a></dt> +<dd> +<div class="block">Creates a Base64InputStream such that all data read is Base64-decoded from the original provided InputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64InputStream.html#Base64InputStream-java.io.InputStream-boolean-">Base64InputStream(InputStream, boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary">Base64InputStream</a></dt> +<dd> +<div class="block">Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + provided InputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64InputStream.html#Base64InputStream-java.io.InputStream-boolean-int-byte:A-">Base64InputStream(InputStream, boolean, int, byte[])</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary">Base64InputStream</a></dt> +<dd> +<div class="block">Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + provided InputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64InputStream.html#Base64InputStream-java.io.InputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base64InputStream(InputStream, boolean, int, byte[], CodecPolicy)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary">Base64InputStream</a></dt> +<dd> +<div class="block">Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + provided InputStream.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base64OutputStream</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Provides Base64 encoding and decoding in a streaming fashion (unlimited size).</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64OutputStream.html#Base64OutputStream-java.io.OutputStream-">Base64OutputStream(OutputStream)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary">Base64OutputStream</a></dt> +<dd> +<div class="block">Creates a Base64OutputStream such that all data written is Base64-encoded to the original provided OutputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64OutputStream.html#Base64OutputStream-java.io.OutputStream-boolean-">Base64OutputStream(OutputStream, boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary">Base64OutputStream</a></dt> +<dd> +<div class="block">Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + original provided OutputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64OutputStream.html#Base64OutputStream-java.io.OutputStream-boolean-int-byte:A-">Base64OutputStream(OutputStream, boolean, int, byte[])</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary">Base64OutputStream</a></dt> +<dd> +<div class="block">Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + original provided OutputStream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64OutputStream.html#Base64OutputStream-java.io.OutputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base64OutputStream(OutputStream, boolean, int, byte[], CodecPolicy)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary">Base64OutputStream</a></dt> +<dd> +<div class="block">Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + original provided OutputStream.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BaseNCodec</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Abstract superclass for Base-N encoders and decoders.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#BaseNCodec-int-int-int-int-">BaseNCodec(int, int, int, int)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Note <code>lineLength</code> is rounded down to the nearest multiple of the encoded block size.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#BaseNCodec-int-int-int-int-byte-">BaseNCodec(int, int, int, int, byte)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Note <code>lineLength</code> is rounded down to the nearest multiple of the encoded block size.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#BaseNCodec-int-int-int-int-byte-org.apache.commons.codec.CodecPolicy-">BaseNCodec(int, int, int, int, byte, CodecPolicy)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Note <code>lineLength</code> is rounded down to the nearest multiple of the encoded block size.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BaseNCodecInputStream</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Abstract superclass for Base-N input streams.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html#BaseNCodecInputStream-java.io.InputStream-org.apache.commons.codec.binary.BaseNCodec-boolean-">BaseNCodecInputStream(InputStream, BaseNCodec, boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BaseNCodecOutputStream</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Abstract superclass for Base-N output streams.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html#BaseNCodecOutputStream-java.io.OutputStream-org.apache.commons.codec.binary.BaseNCodec-boolean-">BaseNCodecOutputStream(OutputStream, BaseNCodec, boolean)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></dt> +<dd> +<div class="block">TODO should this be protected?</div> +</dd> +<dt><a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">BCodec</span></a> - Class in <a href="org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></dt> +<dd> +<div class="block">Identical to the Base64 encoding defined by <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> + and allows a character set to be specified.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#BCodec--">BCodec()</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Default constructor.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#BCodec-java.nio.charset.Charset-">BCodec(Charset)</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Constructor which allows for the selection of a default Charset</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#BCodec-java.nio.charset.Charset-org.apache.commons.codec.CodecPolicy-">BCodec(Charset, CodecPolicy)</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#BCodec-java.lang.String-">BCodec(String)</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Constructor which allows for the selection of a default Charset</div> +</dd> +<dt><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">BeiderMorseEncoder</span></a> - Class in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> +<div class="block">Encodes strings into their Beider-Morse phonetic encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#BeiderMorseEncoder--">BeiderMorseEncoder()</a></span> - Constructor for class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BinaryCodec</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Converts between byte arrays and strings of "0"s and "1"s.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BinaryCodec.html#BinaryCodec--">BinaryCodec()</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">BinaryDecoder</span></a> - Interface in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Defines common decoding methods for byte array decoders.</div> +</dd> +<dt><a href="org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">BinaryEncoder</span></a> - Interface in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Defines common encoding methods for byte array encoders.</div> +</dd> +</dl> +<a name="I:C"> +<!-- --> +</a> +<h2 class="title">C</h2> +<dl> +<dt><a href="org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Caverphone</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">1.5 Replaced by <a href="org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><code>Caverphone2</code></a>, will be removed in 2.0.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Caverphone.html#Caverphone--">Caverphone()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Caverphone</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> +<div class="block">Creates an instance of the Caverphone encoder</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Caverphone.html#caverphone-java.lang.String-">caverphone(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Caverphone</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> +<div class="block">Encodes the given String into a Caverphone value.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Caverphone1</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Encodes a string into a Caverphone 1.0 value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Caverphone1.html#Caverphone1--">Caverphone1()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Caverphone1</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Caverphone2</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Encodes a string into a Caverphone 2.0 value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Caverphone2.html#Caverphone2--">Caverphone2()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Caverphone2</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.html#charAt-java.lang.String-int-">charAt(String, int)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec"><span class="typeNameLink">CharEncoding</span></a> - Class in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Character encoding names required of every implementation of the Java platform.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/CharEncoding.html#CharEncoding--">CharEncoding()</a></span> - Constructor for class org.apache.commons.codec.<a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">CharEncoding</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">CharSequenceUtils</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block"> + Operations on <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang"><code>CharSequence</code></a> that are <code>null</code> safe.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/CharSequenceUtils.html#CharSequenceUtils--">CharSequenceUtils()</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary">CharSequenceUtils</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#charset">charset</a></span> - Variable in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">TODO: This field will be changed to a private final Charset in 2.0. (CODEC-126)</span></div> +</div> +</dd> +<dt><a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Charsets</span></a> - Class in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Charsets required of every implementation of the Java platform.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Charsets.html#Charsets--">Charsets()</a></span> - Constructor for class org.apache.commons.codec.<a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Charsets</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html#close--">close()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></dt> +<dd> +<div class="block">Closes this output stream and releases any system resources associated with the stream.</div> +</dd> +<dt><a href="org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec"><span class="typeNameLink">CodecPolicy</span></a> - Enum in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Defines encoding and decoding policies.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">ColognePhonetic</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Encodes a string into a Cologne Phonetic value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/ColognePhonetic.html#ColognePhonetic--">ColognePhonetic()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">ColognePhonetic</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/ColognePhonetic.html#colognePhonetic-java.lang.String-">colognePhonetic(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">ColognePhonetic</a></dt> +<dd> +<div class="block"> + Implements the <i>Kölner Phonetik</i> algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#COMPARATOR">COMPARATOR</a></span> - Static variable in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/StringEncoderComparator.html#compare-java.lang.Object-java.lang.Object-">compare(Object, Object)</a></span> - Method in class org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec">StringEncoderComparator</a></dt> +<dd> +<div class="block">Compares two strings based not on the strings themselves, but on an encoding of the two strings using the + StringEncoder this Comparator was created with.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html#contains-java.lang.String-">contains(String)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#contains-java.lang.String-">contains(String)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.html#contains-java.lang.String-int-int-java.lang.String...-">contains(String, int, int, String...)</a></span> - Static method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#containsAlphabetOrPad-byte:A-">containsAlphabetOrPad(byte[])</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Tests a given byte array to see if it contains any characters within the alphabet or PAD.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Crypt</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">GNU libc crypt(3) compatible hash method.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Crypt.html#Crypt--">Crypt()</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest">Crypt</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Crypt.html#crypt-byte:A-">crypt(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest">Crypt</a></dt> +<dd> +<div class="block">Encrypts a password in a crypt(3) compatible way.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Crypt.html#crypt-byte:A-java.lang.String-">crypt(byte[], String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest">Crypt</a></dt> +<dd> +<div class="block">Encrypts a password in a crypt(3) compatible way.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-">crypt(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest">Crypt</a></dt> +<dd> +<div class="block">Calculates the digest using the strongest crypt(3) algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-">crypt(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest">Crypt</a></dt> +<dd> +<div class="block">Encrypts a password in a crypt(3) compatible way.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/UnixCrypt.html#crypt-byte:A-">crypt(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest">UnixCrypt</a></dt> +<dd> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/UnixCrypt.html#crypt-byte:A-java.lang.String-">crypt(byte[], String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest">UnixCrypt</a></dt> +<dd> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/UnixCrypt.html#crypt-java.lang.String-">crypt(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest">UnixCrypt</a></dt> +<dd> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/UnixCrypt.html#crypt-java.lang.String-java.lang.String-">crypt(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest">UnixCrypt</a></dt> +<dd> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm.</div> +</dd> +</dl> +<a name="I:D"> +<!-- --> +</a> +<h2 class="title">D</h2> +<dl> +<dt><a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">DaitchMokotoffSoundex</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Encodes a string into a Daitch-Mokotoff Soundex value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html#DaitchMokotoffSoundex--">DaitchMokotoffSoundex()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">DaitchMokotoffSoundex</a></dt> +<dd> +<div class="block">Creates a new instance with ASCII-folding enabled.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html#DaitchMokotoffSoundex-boolean-">DaitchMokotoffSoundex(boolean)</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">DaitchMokotoffSoundex</a></dt> +<dd> +<div class="block">Creates a new instance.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#decode-byte:A-">decode(byte[])</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Decodes a byte[] containing characters in the Base-N alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#decode-java.lang.Object-">decode(Object)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Decodes an Object using the Base-N algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#decode-java.lang.String-">decode(String)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Decodes a String containing characters in the Base-N alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BinaryCodec.html#decode-byte:A-">decode(byte[])</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></dt> +<dd> +<div class="block">Decodes a byte array where each byte represents an ASCII '0' or '1'.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BinaryCodec.html#decode-java.lang.Object-">decode(Object)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></dt> +<dd> +<div class="block">Decodes a byte array where each byte represents an ASCII '0' or '1'.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#decode-byte:A-">decode(byte[])</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts an array of character bytes representing hexadecimal values into an array of bytes of those same values.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#decode-java.nio.ByteBuffer-">decode(ByteBuffer)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts a buffer of character bytes representing hexadecimal values into an array of bytes of those same values.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#decode-java.lang.Object-">decode(Object)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts a String or an array of character bytes representing hexadecimal values into an array of bytes of those + same values.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/BinaryDecoder.html#decode-byte:A-">decode(byte[])</a></span> - Method in interface org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></dt> +<dd> +<div class="block">Decodes a byte array and returns the results as a byte array.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode(Object)</a></span> - Method in interface org.apache.commons.codec.<a href="org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></dt> +<dd> +<div class="block">Decodes an "encoded" Object and returns a "decoded" Object.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#decode-java.lang.String-">decode(String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Decodes a Base64 string into its original form.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#decode-java.lang.Object-">decode(Object)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Decodes a Base64 object into its original form.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/PercentCodec.html#decode-byte:A-">decode(byte[])</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></dt> +<dd> +<div class="block">Decode bytes encoded with Percent-Encoding based on RFC 3986.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/PercentCodec.html#decode-java.lang.Object-">decode(Object)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></dt> +<dd> +<div class="block">Decodes a byte[] Object, whose bytes are encoded with Percent-Encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#decode-java.lang.String-">decode(String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Decodes a quoted-printable string into its original form.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#decode-java.lang.Object-">decode(Object)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Decodes a quoted-printable object into its original form.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-byte:A-">decode(byte[])</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Decodes an array of quoted-printable characters into an array of original bytes.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.String-java.nio.charset.Charset-">decode(String, Charset)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Decodes a quoted-printable string into its original form using the specified string Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.String-java.lang.String-">decode(String, String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Decodes a quoted-printable string into its original form using the specified string Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.String-">decode(String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Decodes a quoted-printable string into its original form using the default string Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.Object-">decode(Object)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Decodes a quoted-printable object into its original form.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#decode-byte:A-">decode(byte[])</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Decodes an array of URL safe 7-bit characters into an array of original bytes.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#decode-java.lang.String-java.lang.String-">decode(String, String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Decodes a URL safe string into its original form using the specified encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#decode-java.lang.String-">decode(String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Decodes a URL safe string into its original form using the default string charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#decode-java.lang.Object-">decode(Object)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Decodes a URL safe object into its original form.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/StringDecoder.html#decode-java.lang.String-">decode(String)</a></span> - Method in interface org.apache.commons.codec.<a href="org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></dt> +<dd> +<div class="block">Decodes a String and returns a String.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#decodeBase64-byte:A-">decodeBase64(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Decodes Base64 data into octets.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#decodeBase64-java.lang.String-">decodeBase64(String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Decodes a Base64 String into octets.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#decodeHex-char:A-">decodeHex(char[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts an array of characters representing hexadecimal values into an array of bytes of those same values.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#decodeHex-char:A-byte:A-int-">decodeHex(char[], byte[], int)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts an array of characters representing hexadecimal values into an array of bytes of those same values.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#decodeHex-java.lang.String-">decodeHex(String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts a String representing hexadecimal values into an array of bytes of those same values.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#decodeInteger-byte:A-">decodeInteger(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Decodes a byte64-encoded integer according to crypto standards such as W3C's XML-Signature.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#decodeQuotedPrintable-byte:A-">decodeQuotedPrintable(byte[])</a></span> - Static method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Decodes an array quoted-printable characters into an array of original bytes.</div> +</dd> +<dt><a href="org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Decoder</span></a> - Interface in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Provides the highest level of abstraction for Decoders.</div> +</dd> +<dt><a href="org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">DecoderException</span></a> - Exception in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Thrown when there is a failure condition during the decoding process.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/DecoderException.html#DecoderException--">DecoderException()</a></span> - Constructor for exception org.apache.commons.codec.<a href="org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></dt> +<dd> +<div class="block">Constructs a new exception with <code>null</code> as its detail message.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/DecoderException.html#DecoderException-java.lang.String-">DecoderException(String)</a></span> - Constructor for exception org.apache.commons.codec.<a href="org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></dt> +<dd> +<div class="block">Constructs a new exception with the specified detail message.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/DecoderException.html#DecoderException-java.lang.String-java.lang.Throwable-">DecoderException(String, Throwable)</a></span> - Constructor for exception org.apache.commons.codec.<a href="org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></dt> +<dd> +<div class="block">Constructs a new exception with the specified detail message and cause.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/DecoderException.html#DecoderException-java.lang.Throwable-">DecoderException(Throwable)</a></span> - Constructor for exception org.apache.commons.codec.<a href="org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></dt> +<dd> +<div class="block">Constructs a new exception with the specified cause and a detail message of <code>(cause==null ? + null : cause.toString())</code> (which typically contains the class and detail message of <code>cause</code>).</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#decodeUrl-byte:A-">decodeUrl(byte[])</a></span> - Static method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Decodes an array of URL safe 7-bit characters into an array of original bytes.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#DECODING_POLICY_DEFAULT">DECODING_POLICY_DEFAULT</a></span> - Static variable in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">The default decoding policy.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#DEFAULT_CHARSET">DEFAULT_CHARSET</a></span> - Static variable in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Default charset is <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#DEFAULT_CHARSET_NAME">DEFAULT_CHARSET_NAME</a></span> - Static variable in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Default charset name is <a href="org/apache/commons/codec/CharEncoding.html#UTF_8"><code>CharEncoding.UTF_8</code></a>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#DEFAULT_SEED">DEFAULT_SEED</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block">A default seed to use for the murmur hash algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/RefinedSoundex.html#difference-java.lang.String-java.lang.String-">difference(String, String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></dt> +<dd> +<div class="block">Returns the number of characters in the two encoded Strings that are the + same.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#difference-java.lang.String-java.lang.String-">difference(String, String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">Encodes the Strings and returns the number of characters in the two encoded Strings that are the same.</div> +</dd> +<dt><a href="org/apache/commons/codec/cli/Digest.html" title="class in org.apache.commons.codec.cli"><span class="typeNameLink">Digest</span></a> - Class in <a href="org/apache/commons/codec/cli/package-summary.html">org.apache.commons.codec.cli</a></dt> +<dd> +<div class="block">A minimal command line to run digest over files, directories or a string</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-byte:A-">digest(MessageDigest, byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-java.nio.ByteBuffer-">digest(MessageDigest, ByteBuffer)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a ByteBuffer and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-java.io.File-">digest(MessageDigest, File)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a File and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-java.io.InputStream-">digest(MessageDigest, InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through an InputStream and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-java.nio.file.Path-java.nio.file.OpenOption...-">digest(MessageDigest, Path, OpenOption...)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a File and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-java.io.RandomAccessFile-">digest(MessageDigest, RandomAccessFile)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a RandomAccessFile using non-blocking-io (NIO) and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-byte:A-">digest(byte[])</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-java.nio.ByteBuffer-">digest(ByteBuffer)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a ByteBuffer and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-java.io.File-">digest(File)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a File and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-java.io.InputStream-">digest(InputStream)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through an InputStream and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-java.nio.file.Path-java.nio.file.OpenOption...-">digest(Path, OpenOption...)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a File and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digest-java.lang.String-">digest(String)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-byte:A-">digestAsHex(byte[])</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.nio.ByteBuffer-">digestAsHex(ByteBuffer)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a ByteBuffer and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.io.File-">digestAsHex(File)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a File and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.io.InputStream-">digestAsHex(InputStream)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through an InputStream and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.nio.file.Path-java.nio.file.OpenOption...-">digestAsHex(Path, OpenOption...)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a File and returns the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.lang.String-">digestAsHex(String)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">DigestUtils</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">Operations to simplify common <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> tasks.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#DigestUtils--">DigestUtils()</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">since 1.11; only useful to preserve binary compatibility</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#DigestUtils-java.security.MessageDigest-">DigestUtils(MessageDigest)</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Creates an instance using the provided <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> parameter.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#DigestUtils-java.lang.String-">DigestUtils(String)</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Creates an instance using the provided <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> parameter.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#doDecoding-byte:A-">doDecoding(byte[])</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#doDecoding-byte:A-">doDecoding(byte[])</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#doEncoding-byte:A-">doEncoding(byte[])</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#doEncoding-byte:A-">doEncoding(byte[])</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">DoubleMetaphone</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Encodes a string into a double metaphone value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.html#DoubleMetaphone--">DoubleMetaphone()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dt> +<dd> +<div class="block">Creates an instance of this DoubleMetaphone encoder</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.html#doubleMetaphone-java.lang.String-">doubleMetaphone(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dt> +<dd> +<div class="block">Encode a value with Double Metaphone.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.html#doubleMetaphone-java.lang.String-boolean-">doubleMetaphone(String, boolean)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dt> +<dd> +<div class="block">Encode a value with Double Metaphone, optionally using the alternate encoding.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">DoubleMetaphone.DoubleMetaphoneResult</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Inner class for storing results, since there is the optional alternate encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#DoubleMetaphoneResult-int-">DoubleMetaphoneResult(int)</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +</dl> +<a name="I:E"> +<!-- --> +</a> +<h2 class="title">E</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#encode-byte:A-">encode(byte[])</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Encodes a byte[] containing binary data, into a byte[] containing characters in the alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#encode-byte:A-int-int-">encode(byte[], int, int)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Encodes a byte[] containing binary data, into a byte[] containing + characters in the alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Encodes an Object using the Base-N algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BinaryCodec.html#encode-byte:A-">encode(byte[])</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></dt> +<dd> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 characters.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BinaryCodec.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></dt> +<dd> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 chars.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encode-byte:A-">encode(byte[])</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts an array of bytes into an array of bytes for the characters representing the hexadecimal values of each + byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encode-java.nio.ByteBuffer-">encode(ByteBuffer)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts byte buffer into an array of bytes for the characters representing the hexadecimal values of each byte + in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts a String or an array of bytes into an array of characters representing the hexadecimal values of each + byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-">encode(byte[])</a></span> - Method in interface org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></dt> +<dd> +<div class="block">Encodes a byte array and return the encoded data as a byte array.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in interface org.apache.commons.codec.<a href="org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></dt> +<dd> +<div class="block">Encodes an "Object" and returns the encoded content as an Object.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/AbstractCaverphone.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></dt> +<dd> +<div class="block">Encodes an Object using the caverphone algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">PhoneticEngine</a></dt> +<dd> +<div class="block">Encodes a string to its phonetic representation.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html#encode-java.lang.String-org.apache.commons.codec.language.bm.Languages.LanguageSet-">encode(String, Languages.LanguageSet)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">PhoneticEngine</a></dt> +<dd> +<div class="block">Encodes an input string into an output phonetic representation, given a set of possible origin languages.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Caverphone.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Caverphone</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> +<div class="block">Encodes an Object using the caverphone algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Caverphone.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Caverphone</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> +<div class="block">Encodes a String using the Caverphone algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Caverphone1.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Caverphone1</a></dt> +<dd> +<div class="block">Encodes the given String into a Caverphone value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Caverphone2.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Caverphone2</a></dt> +<dd> +<div class="block">Encodes the given String into a Caverphone 2.0 value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/ColognePhonetic.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">ColognePhonetic</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/ColognePhonetic.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">ColognePhonetic</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">DaitchMokotoffSoundex</a></dt> +<dd> +<div class="block">Encodes an Object using the Daitch-Mokotoff soundex algorithm without branching.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">DaitchMokotoffSoundex</a></dt> +<dd> +<div class="block">Encodes a String using the Daitch-Mokotoff soundex algorithm without branching.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dt> +<dd> +<div class="block">Encode the value using DoubleMetaphone.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dt> +<dd> +<div class="block">Encode the value using DoubleMetaphone.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">MatchRatingApproachEncoder</a></dt> +<dd> +<div class="block">Encodes an Object using the Match Rating Approach algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">MatchRatingApproachEncoder</a></dt> +<dd> +<div class="block">Encodes a String using the Match Rating Approach (MRA) algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Metaphone.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a></dt> +<dd> +<div class="block">Encodes an Object using the metaphone algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Metaphone.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a></dt> +<dd> +<div class="block">Encodes a String using the Metaphone algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Nysiis.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a></dt> +<dd> +<div class="block">Encodes an Object using the NYSIIS algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Nysiis.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a></dt> +<dd> +<div class="block">Encodes a String using the NYSIIS algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/RefinedSoundex.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></dt> +<dd> +<div class="block">Encodes an Object using the refined soundex algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/RefinedSoundex.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></dt> +<dd> +<div class="block">Encodes a String using the refined soundex algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">Encodes an Object using the soundex algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">Encodes a String using the soundex algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#encode-java.lang.String-java.nio.charset.Charset-">encode(String, Charset)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Encodes a string into its Base64 form using the specified Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#encode-java.lang.String-java.lang.String-">encode(String, String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Encodes a string into its Base64 form using the specified Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Encodes a string into its Base64 form using the default Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Encodes an object into its Base64 form using the default Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/PercentCodec.html#encode-byte:A-">encode(byte[])</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></dt> +<dd> +<div class="block">Percent-Encoding based on RFC 3986.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/PercentCodec.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></dt> +<dd> +<div class="block">Encodes an object into using the Percent-Encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#encode-java.lang.String-java.nio.charset.Charset-">encode(String, Charset)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#encode-java.lang.String-java.lang.String-">encode(String, String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Encodes a string into its quoted-printable form using the default Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Encodes an object into its quoted-printable form using the default Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-byte:A-">encode(byte[])</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Encodes an array of bytes into an array of quoted-printable 7-bit characters.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Encodes a string into its quoted-printable form using the default string Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Encodes an object into its quoted-printable safe form.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-java.lang.String-java.nio.charset.Charset-">encode(String, Charset)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-java.lang.String-java.lang.String-">encode(String, String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#encode-byte:A-">encode(byte[])</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Encodes an array of bytes into an array of URL safe 7-bit characters.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#encode-java.lang.String-java.lang.String-">encode(String, String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Encodes a string into its URL safe form using the specified string charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#encode-java.lang.String-">encode(String)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Encodes a string into its URL safe form using the default string charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#encode-java.lang.Object-">encode(Object)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Encodes an object into its URL safe form.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode(String)</a></span> - Method in interface org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dt> +<dd> +<div class="block">Encodes a String and returns a String.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#encodeAsString-byte:A-">encodeAsString(byte[])</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Encodes a byte[] containing binary data, into a String containing characters in the appropriate alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#encodeBase64-byte:A-">encodeBase64(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Encodes binary data using the base64 algorithm but does not chunk the output.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#encodeBase64-byte:A-boolean-">encodeBase64(byte[], boolean)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#encodeBase64-byte:A-boolean-boolean-">encodeBase64(byte[], boolean, boolean)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#encodeBase64-byte:A-boolean-boolean-int-">encodeBase64(byte[], boolean, boolean, int)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#encodeBase64Chunked-byte:A-">encodeBase64Chunked(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Encodes binary data using the base64 algorithm and chunks the encoded output into 76 character blocks</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#encodeBase64String-byte:A-">encodeBase64String(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Encodes binary data using the base64 algorithm but does not chunk the output.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#encodeBase64URLSafe-byte:A-">encodeBase64URLSafe(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#encodeBase64URLSafeString-byte:A-">encodeBase64URLSafeString(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-">encodeHex(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-boolean-">encodeHex(byte[], boolean)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-char:A-">encodeHex(byte[], char[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-int-int-boolean-">encodeHex(byte[], int, int, boolean)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-int-int-boolean-char:A-int-">encodeHex(byte[], int, int, boolean, char[], int)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHex-java.nio.ByteBuffer-">encodeHex(ByteBuffer)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHex-java.nio.ByteBuffer-boolean-">encodeHex(ByteBuffer, boolean)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHex-java.nio.ByteBuffer-char:A-">encodeHex(ByteBuffer, char[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHexString-byte:A-">encodeHexString(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts an array of bytes into a String representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHexString-byte:A-boolean-">encodeHexString(byte[], boolean)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts an array of bytes into a String representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHexString-java.nio.ByteBuffer-">encodeHexString(ByteBuffer)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts a byte buffer into a String representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#encodeHexString-java.nio.ByteBuffer-boolean-">encodeHexString(ByteBuffer, boolean)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts a byte buffer into a String representing the hexadecimal values of each byte in order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#encodeInteger-java.math.BigInteger-">encodeInteger(BigInteger)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Encodes to a byte64-encoded integer according to crypto standards such as W3C's XML-Signature.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#encodeQuotedPrintable-java.util.BitSet-byte:A-">encodeQuotedPrintable(BitSet, byte[])</a></span> - Static method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Encodes an array of bytes into an array of quoted-printable 7-bit characters.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#encodeQuotedPrintable-java.util.BitSet-byte:A-boolean-">encodeQuotedPrintable(BitSet, byte[], boolean)</a></span> - Static method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Encodes an array of bytes into an array of quoted-printable 7-bit characters.</div> +</dd> +<dt><a href="org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Encoder</span></a> - Interface in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Provides the highest level of abstraction for Encoders.</div> +</dd> +<dt><a href="org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">EncoderException</span></a> - Exception in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Thrown when there is a failure condition during the encoding process.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/EncoderException.html#EncoderException--">EncoderException()</a></span> - Constructor for exception org.apache.commons.codec.<a href="org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></dt> +<dd> +<div class="block">Constructs a new exception with <code>null</code> as its detail message.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/EncoderException.html#EncoderException-java.lang.String-">EncoderException(String)</a></span> - Constructor for exception org.apache.commons.codec.<a href="org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></dt> +<dd> +<div class="block">Constructs a new exception with the specified detail message.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/EncoderException.html#EncoderException-java.lang.String-java.lang.Throwable-">EncoderException(String, Throwable)</a></span> - Constructor for exception org.apache.commons.codec.<a href="org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></dt> +<dd> +<div class="block">Constructs a new exception with the specified detail message and cause.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/EncoderException.html#EncoderException-java.lang.Throwable-">EncoderException(Throwable)</a></span> - Constructor for exception org.apache.commons.codec.<a href="org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></dt> +<dd> +<div class="block">Constructs a new exception with the specified cause and a detail message of <code>(cause==null ? + null : cause.toString())</code> (which typically contains the class and detail message of <code>cause</code>).</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#encodeToString-byte:A-">encodeToString(byte[])</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Encodes a byte[] containing binary data, into a String containing characters in the Base-N alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#encodeUrl-java.util.BitSet-byte:A-">encodeUrl(BitSet, byte[])</a></span> - Static method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Encodes an array of bytes into an array of URL safe 7-bit characters.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html#end--">end()</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a></dt> +<dd> +<div class="block">Generate the 32-bit hash value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#ensureBufferSize-int-org.apache.commons.codec.binary.BaseNCodec.Context-">ensureBufferSize(int, BaseNCodec.Context)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Ensure that the buffer has room for <code>size</code> bytes</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html#eof--">eof()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></dt> +<dd> +<div class="block">Writes EOF.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#equals-java.lang.CharSequence-java.lang.CharSequence-">equals(CharSequence, CharSequence)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block"> + Compares two CharSequences, returning <code>true</code> if they represent equal sequences of characters.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#ESCAPE_CHAR">ESCAPE_CHAR</a></span> - Static variable in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Release 1.5 made this field final.</div> +</dd> +</dl> +<a name="I:F"> +<!-- --> +</a> +<h2 class="title">F</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html#flush--">flush()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></dt> +<dd> +<div class="block">Flushes this output stream and forces any buffered output bytes to be written out to the stream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html#from-java.util.Set-">from(Set<String>)</a></span> - Static method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BinaryCodec.html#fromAscii-byte:A-">fromAscii(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></dt> +<dd> +<div class="block">Decodes a byte array where each byte represents an ASCII '0' or '1'.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BinaryCodec.html#fromAscii-char:A-">fromAscii(char[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></dt> +<dd> +<div class="block">Decodes a char array where each char represents an ASCII '0' or '1'.</div> +</dd> +</dl> +<a name="I:G"> +<!-- --> +</a> +<h2 class="title">G</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#getAlternate--">getAlternate()</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html#getAny--">getAny()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#getAny--">getAny()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#getByteBufferUtf8-java.lang.String-">getByteBufferUtf8(String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Encodes the given string into a byte buffer using the UTF-8 charset, storing the result into a new byte + array.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#getBytesIso8859_1-java.lang.String-">getBytesIso8859_1(String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Encodes the given string into a sequence of bytes using the ISO-8859-1 charset, storing the result into a new + byte array.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#getBytesUnchecked-java.lang.String-java.lang.String-">getBytesUnchecked(String, String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Encodes the given string into a sequence of bytes using the named charset, storing the result into a new byte + array.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#getBytesUsAscii-java.lang.String-">getBytesUsAscii(String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Encodes the given string into a sequence of bytes using the US-ASCII charset, storing the result into a new byte + array.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#getBytesUtf16-java.lang.String-">getBytesUtf16(String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-16 charset, storing the result into a new byte + array.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#getBytesUtf16Be-java.lang.String-">getBytesUtf16Be(String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-16BE charset, storing the result into a new byte + array.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#getBytesUtf16Le-java.lang.String-">getBytesUtf16Le(String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-16LE charset, storing the result into a new byte + array.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-">getBytesUtf8(String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-8 charset, storing the result into a new byte + array.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#getCharset--">getCharset()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Gets the charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#getCharset--">getCharset()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#getCharset--">getCharset()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#getCharset--">getCharset()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#getCharsetName--">getCharsetName()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Gets the charset name.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#getChunkSeparator--">getChunkSeparator()</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Gets a copy of the chunk separator per RFC 2045 section 2.1.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#getCodecPolicy--">getCodecPolicy()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Returns the decoding behavior policy.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#getDefaultBufferSize--">getDefaultBufferSize()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Get the default buffer size.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#getDefaultCharset--">getDefaultCharset()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#getDefaultCharset--">getDefaultCharset()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#getDefaultCharset--">getDefaultCharset()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#getDefaultCharset--">getDefaultCharset()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">The default charset used for string decoding and encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getDigest-java.lang.String-">getDigest(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns a <code>MessageDigest</code> for the given <code>algorithm</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getDigest-java.lang.String-java.security.MessageDigest-">getDigest(String, MessageDigest)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns a <code>MessageDigest</code> for the given <code>algorithm</code> or a default if there is a problem + getting the algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#getEncodedLength-byte:A-">getEncodedLength(byte[])</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Calculates the amount of space needed to encode the supplied array.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#getEncoding--">getEncoding()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#getEncoding--">getEncoding()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#getEncoding--">getEncoding()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/net/URLCodec.html#getDefaultCharset--"><code>URLCodec.getDefaultCharset()</code></a>, will be removed in 2.0.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#getHmacMd5-byte:A-">getHmacMd5(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_MD5, byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#getHmacSha1-byte:A-">getHmacSha1(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_1, byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#getHmacSha256-byte:A-">getHmacSha256(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_256, byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#getHmacSha384-byte:A-">getHmacSha384(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_384, byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#getHmacSha512-byte:A-">getHmacSha512(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_512, byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#getInitializedMac-org.apache.commons.codec.digest.HmacAlgorithms-byte:A-">getInitializedMac(HmacAlgorithms, byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns an initialized <code>Mac</code> for the given <code>algorithm</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#getInitializedMac-java.lang.String-byte:A-">getInitializedMac(String, byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns an initialized <code>Mac</code> for the given <code>algorithm</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Resources.html#getInputStream-java.lang.String-">getInputStream(String)</a></span> - Static method in class org.apache.commons.codec.<a href="org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec">Resources</a></dt> +<dd> +<div class="block">Opens the given named resource from the given class.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.html#getInstance-org.apache.commons.codec.language.bm.NameType-">getInstance(NameType)</a></span> - Static method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.html#getInstance-java.lang.String-">getInstance(String)</a></span> - Static method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstance(NameType, RuleType, Languages.LanguageSet)</a></span> - Static method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-">getInstance(NameType, RuleType, String)</a></span> - Static method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstanceMap(NameType, RuleType, Languages.LanguageSet)</a></span> - Static method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-">getInstanceMap(NameType, RuleType, String)</a></span> - Static method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html#getLang--">getLang()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">PhoneticEngine</a></dt> +<dd> +<div class="block">Gets the Lang language guessing rules being used.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.html#getLanguages--">getLanguages()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#getLanguages--">getLanguages()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#getLanguages--">getLanguages()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#getLContext--">getLContext()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> +<div class="block">Gets the left context.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.html#getMaxCodeLen--">getMaxCodeLen()</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dt> +<dd> +<div class="block">Returns the maxCodeLen.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Metaphone.html#getMaxCodeLen--">getMaxCodeLen()</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a></dt> +<dd> +<div class="block">Returns the maxCodeLen.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#getMaxLength--">getMaxLength()</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html#getMaxPhonemes--">getMaxPhonemes()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">PhoneticEngine</a></dt> +<dd> +<div class="block">Gets the maximum number of phonemes the engine will calculate for a given input.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getMd2Digest--">getMd2Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an MD2 MessageDigest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getMd5Digest--">getMd5Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an MD5 MessageDigest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getMessageDigest--">getMessageDigest()</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns the message digest instance.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacAlgorithms.html#getName--">getName()</a></span> - Method in enum org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></dt> +<dd> +<div class="block">Gets the algorithm name.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/NameType.html#getName--">getName()</a></span> - Method in enum org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></dt> +<dd> +<div class="block">Gets the short version of the name type.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/RuleType.html#getName--">getName()</a></span> - Method in enum org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></dt> +<dd> +<div class="block">Gets the rule name.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#getNameType--">getNameType()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></dt> +<dd> +<div class="block">Gets the name type currently in operation.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html#getNameType--">getNameType()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">PhoneticEngine</a></dt> +<dd> +<div class="block">Gets the NameType being used.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#getPattern--">getPattern()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> +<div class="block">Gets the pattern.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#getPhoneme--">getPhoneme()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> +<div class="block">Gets the phoneme.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#getPhonemes--">getPhonemes()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html#getPhonemes--">getPhonemes()</a></span> - Method in interface org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.PhonemeList.html#getPhonemes--">getPhonemes()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm">Rule.PhonemeList</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#getPhonemeText--">getPhonemeText()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#getPrimary--">getPrimary()</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#getRContext--">getRContext()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> +<div class="block">Gets the right context.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#getRuleType--">getRuleType()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></dt> +<dd> +<div class="block">Gets the rule type currently in operation.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html#getRuleType--">getRuleType()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">PhoneticEngine</a></dt> +<dd> +<div class="block">Gets the RuleType being used.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getSha1Digest--">getSha1Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an SHA-1 digest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getSha256Digest--">getSha256Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an SHA-256 digest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getSha384Digest--">getSha384Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an SHA-384 digest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getSha3_224Digest--">getSha3_224Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an SHA3-224 digest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getSha3_256Digest--">getSha3_256Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an SHA3-256 digest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getSha3_384Digest--">getSha3_384Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an SHA3-384 digest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getSha3_512Digest--">getSha3_512Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an SHA3-512 digest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getSha512_224Digest--">getSha512_224Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an SHA-512/224 digest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getSha512_256Digest--">getSha512_256Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an SHA-512/256 digest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getSha512Digest--">getSha512Digest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Returns an SHA-512 digest.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#getShaDigest--">getShaDigest()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#getSha1Digest--"><code>DigestUtils.getSha1Digest()</code></a></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/PureJavaCrc32.html#getValue--">getValue()</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/PureJavaCrc32C.html#getValue--">getValue()</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32C</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/XXHash32.html#getValue--">getValue()</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest">XXHash32</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Lang.html#guessLanguage-java.lang.String-">guessLanguage(String)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></dt> +<dd> +<div class="block">Guesses the language of a word.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Lang.html#guessLanguages-java.lang.String-">guessLanguages(String)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></dt> +<dd> +<div class="block">Guesses the languages of a word.</div> +</dd> +</dl> +<a name="I:H"> +<!-- --> +</a> +<h2 class="title">H</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-">hash128(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block">Generates 128-bit hash from the byte array with a default seed.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128-java.lang.String-">hash128(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>MurmurHash3.hash128x64(byte[])</code></a> using the bytes returned from + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-">hash128(byte[], int, int, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>MurmurHash3.hash128x64(byte[], int, int, int)</code></a>. This corrects the seed initialization.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block">Generates 128-bit hash from the byte array with a seed of zero.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-">hash128x64(byte[], int, int, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block">Generates 128-bit hash from the byte array with the given offset, length and seed.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash2.html#hash32-byte:A-int-int-">hash32(byte[], int, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">MurmurHash2</a></dt> +<dd> +<div class="block">Generates a 32-bit hash from byte array with the given length and seed.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash2.html#hash32-byte:A-int-">hash32(byte[], int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">MurmurHash2</a></dt> +<dd> +<div class="block">Generates a 32-bit hash from byte array with the given length and a default seed value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash2.html#hash32-java.lang.String-">hash32(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">MurmurHash2</a></dt> +<dd> +<div class="block">Generates a 32-bit hash from a string with a default seed.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash2.html#hash32-java.lang.String-int-int-">hash32(String, int, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">MurmurHash2</a></dt> +<dd> +<div class="block">Generates a 32-bit hash from a substring with a default seed value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-long-">hash32(long, long)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block">Generates 32-bit hash from two longs with a default seed value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-long-int-">hash32(long, long, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block">Generates 32-bit hash from two longs with the given seed.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-">hash32(long)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block">Generates 32-bit hash from a long with a default seed value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-int-">hash32(long, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block">Generates 32-bit hash from a long with the given seed.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-">hash32(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>MurmurHash3.hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-java.lang.String-">hash32(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>MurmurHash3.hash32x86(byte[], int, int, int)</code></a> with the bytes returned from + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>. This corrects the processing of trailing bytes.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-">hash32(byte[], int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>MurmurHash3.hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-">hash32(byte[], int, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>MurmurHash3.hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-">hash32(byte[], int, int, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>MurmurHash3.hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-">hash32x86(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block">Generates 32-bit hash from the byte array with a seed of zero.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-">hash32x86(byte[], int, int, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block">Generates 32-bit hash from the byte array with the given offset, length and seed.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash2.html#hash64-byte:A-int-int-">hash64(byte[], int, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">MurmurHash2</a></dt> +<dd> +<div class="block">Generates a 64-bit hash from byte array of the given length and seed.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash2.html#hash64-byte:A-int-">hash64(byte[], int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">MurmurHash2</a></dt> +<dd> +<div class="block">Generates a 64-bit hash from byte array with given length and a default seed value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash2.html#hash64-java.lang.String-">hash64(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">MurmurHash2</a></dt> +<dd> +<div class="block">Generates a 64-bit hash from a string with a default seed.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash2.html#hash64-java.lang.String-int-int-">hash64(String, int, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">MurmurHash2</a></dt> +<dd> +<div class="block">Generates a 64-bit hash from a substring with a default seed value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-long-">hash64(long)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>MurmurHash3.hash128x64(byte[])</code></a> with the bytes from the <code>long</code>.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-int-">hash64(int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>MurmurHash3.hash128x64(byte[])</code></a> with the bytes from the <code>int</code>.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-short-">hash64(short)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>MurmurHash3.hash128x64(byte[])</code></a> with the bytes from the <code>short</code>.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-">hash64(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>MurmurHash3.hash128x64(byte[])</code></a>.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-">hash64(byte[], int, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>MurmurHash3.hash128x64(byte[], int, int, int)</code></a>.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-">hash64(byte[], int, int, int)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>MurmurHash3.hash128x64(byte[], int, int, int)</code></a>.</span></div> +</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Hex</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Converts hexadecimal Strings.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#Hex--">Hex()</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Creates a new codec with the default charset name <a href="org/apache/commons/codec/binary/Hex.html#DEFAULT_CHARSET"><code>Hex.DEFAULT_CHARSET</code></a></div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#Hex-java.nio.charset.Charset-">Hex(Charset)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Creates a new codec with the given Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#Hex-java.lang.String-">Hex(String)</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Creates a new codec with the given charset name.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmac-byte:A-">hmac(byte[])</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns the digest for the input data.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmac-java.lang.String-">hmac(String)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns the digest for the input data.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmac-java.nio.ByteBuffer-">hmac(ByteBuffer)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns the digest for the input data.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmac-java.io.InputStream-">hmac(InputStream)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns the digest for the stream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmac-java.io.File-">hmac(File)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns the digest for the file.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest"><span class="typeNameLink">HmacAlgorithms</span></a> - Enum in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">Standard <a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest"><code>HmacUtils</code></a> algorithm names from the <cite>Java Cryptography Architecture Standard Algorithm Name + Documentation</cite>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacHex-byte:A-">hmacHex(byte[])</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns the digest for the input data.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacHex-java.lang.String-">hmacHex(String)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns the digest for the input data.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacHex-java.nio.ByteBuffer-">hmacHex(ByteBuffer)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns the digest for the input data.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacHex-java.io.InputStream-">hmacHex(InputStream)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns the digest for the stream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacHex-java.io.File-">hmacHex(File)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns the digest for the file.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5-byte:A-byte:A-">hmacMd5(byte[], byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmac(byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5-byte:A-java.io.InputStream-">hmacMd5(byte[], InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmac(InputStream)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5-java.lang.String-java.lang.String-">hmacMd5(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, String).hmac(String)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5Hex-byte:A-byte:A-">hmacMd5Hex(byte[], byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmacHex(byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5Hex-byte:A-java.io.InputStream-">hmacMd5Hex(byte[], InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmacHex(InputStream)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacMd5Hex-java.lang.String-java.lang.String-">hmacMd5Hex(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, String).hmacHex(String)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1-byte:A-byte:A-">hmacSha1(byte[], byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmac(byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1-byte:A-java.io.InputStream-">hmacSha1(byte[], InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmac(InputStream)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1-java.lang.String-java.lang.String-">hmacSha1(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, String).hmac(String)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1Hex-byte:A-byte:A-">hmacSha1Hex(byte[], byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmacHex(byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1Hex-byte:A-java.io.InputStream-">hmacSha1Hex(byte[], InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmacHex(InputStream)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha1Hex-java.lang.String-java.lang.String-">hmacSha1Hex(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, String).hmacHex(String)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256-byte:A-byte:A-">hmacSha256(byte[], byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmac(byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256-byte:A-java.io.InputStream-">hmacSha256(byte[], InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmac(InputStream)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256-java.lang.String-java.lang.String-">hmacSha256(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, String).hmac(String)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256Hex-byte:A-byte:A-">hmacSha256Hex(byte[], byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmacHex(byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256Hex-byte:A-java.io.InputStream-">hmacSha256Hex(byte[], InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmacHex(InputStream)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha256Hex-java.lang.String-java.lang.String-">hmacSha256Hex(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, String).hmacHex(String)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384-byte:A-byte:A-">hmacSha384(byte[], byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmac(byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384-byte:A-java.io.InputStream-">hmacSha384(byte[], InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmac(InputStream)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384-java.lang.String-java.lang.String-">hmacSha384(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, String).hmac(String)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384Hex-byte:A-byte:A-">hmacSha384Hex(byte[], byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmacHex(byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384Hex-byte:A-java.io.InputStream-">hmacSha384Hex(byte[], InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmacHex(InputStream)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha384Hex-java.lang.String-java.lang.String-">hmacSha384Hex(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, String).hmacHex(String)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512-byte:A-byte:A-">hmacSha512(byte[], byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmac(byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512-byte:A-java.io.InputStream-">hmacSha512(byte[], InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmac(InputStream)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512-java.lang.String-java.lang.String-">hmacSha512(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, String).hmac(String)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512Hex-byte:A-byte:A-">hmacSha512Hex(byte[], byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmacHex(byte[])</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512Hex-byte:A-java.io.InputStream-">hmacSha512Hex(byte[], InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmacHex(InputStream)</code></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#hmacSha512Hex-java.lang.String-java.lang.String-">hmacSha512Hex(String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, String).hmacHex(String)</code></span></div> +</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">HmacUtils</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">Simplifies common <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> tasks.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#HmacUtils--">HmacUtils()</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">since 1.11; only useful to preserve binary compatibility</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#HmacUtils-java.lang.String-byte:A-">HmacUtils(String, byte[])</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Creates an instance using the provided algorithm type.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#HmacUtils-java.lang.String-java.lang.String-">HmacUtils(String, String)</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Creates an instance using the provided algorithm type.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#HmacUtils-org.apache.commons.codec.digest.HmacAlgorithms-java.lang.String-">HmacUtils(HmacAlgorithms, String)</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Creates an instance using the provided algorithm type.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#HmacUtils-org.apache.commons.codec.digest.HmacAlgorithms-byte:A-">HmacUtils(HmacAlgorithms, byte[])</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Creates an instance using the provided algorithm type.</div> +</dd> +</dl> +<a name="I:I"> +<!-- --> +</a> +<h2 class="title">I</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html#IncrementalHash32--">IncrementalHash32()</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> + </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html#IncrementalHash32x86--">IncrementalHash32x86()</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Lang.html#instance-org.apache.commons.codec.language.bm.NameType-">instance(NameType)</a></span> - Static method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></dt> +<dd> +<div class="block">Gets a Lang instance for one of the supported NameTypes.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#isArrayByteBase64-byte:A-">isArrayByteBase64(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">1.5 Use <a href="org/apache/commons/codec/binary/Base64.html#isBase64-byte:A-"><code>Base64.isBase64(byte[])</code></a>, will be removed in 2.0.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#isAvailable-java.lang.String-">isAvailable(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Test whether the algorithm is supported.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#isAvailable-java.lang.String-">isAvailable(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns whether this algorithm is available</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#isAvailable-org.apache.commons.codec.digest.HmacAlgorithms-">isAvailable(HmacAlgorithms)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Returns whether this algorithm is available</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#isBase64-byte-">isBase64(byte)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Returns whether or not the <code>octet</code> is in the base 64 alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#isBase64-byte:A-">isBase64(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Tests a given byte array to see if it contains only valid characters within the Base64 alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#isBase64-java.lang.String-">isBase64(String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Tests a given String to see if it contains only valid characters within the Base64 alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Caverphone.html#isCaverphoneEqual-java.lang.String-java.lang.String-">isCaverphoneEqual(String, String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Caverphone</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> +<div class="block">Tests if the caverphones of two strings are identical.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#isComplete--">isComplete()</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#isConcat--">isConcat()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></dt> +<dd> +<div class="block">Discovers if multiple possible encodings are concatenated.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html#isConcat--">isConcat()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">PhoneticEngine</a></dt> +<dd> +<div class="block">Gets if multiple phonetic encodings are concatenated or if just the first one is kept.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.html#isDoubleMetaphoneEqual-java.lang.String-java.lang.String-">isDoubleMetaphoneEqual(String, String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dt> +<dd> +<div class="block">Check if the Double Metaphone values of two <code>String</code> values + are equal.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.html#isDoubleMetaphoneEqual-java.lang.String-java.lang.String-boolean-">isDoubleMetaphoneEqual(String, String, boolean)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dt> +<dd> +<div class="block">Check if the Double Metaphone values of two <code>String</code> values + are equal, optionally using the alternate value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html#isEmpty--">isEmpty()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#isEmpty--">isEmpty()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#isEncodeBlanks--">isEncodeBlanks()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Tests if optional transformation of SPACE characters is to be used</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/AbstractCaverphone.html#isEncodeEqual-java.lang.String-java.lang.String-">isEncodeEqual(String, String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></dt> +<dd> +<div class="block">Tests if the encodings of two strings are equal.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/ColognePhonetic.html#isEncodeEqual-java.lang.String-java.lang.String-">isEncodeEqual(String, String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">ColognePhonetic</a></dt> +<dd> +<div class="block">Compares the first encoded string to the second encoded string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html#isEncodeEquals-java.lang.String-java.lang.String-">isEncodeEquals(String, String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">MatchRatingApproachEncoder</a></dt> +<dd> +<div class="block">Determines if two names are homophonous via Match Rating Approach (MRA) algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base16.html#isInAlphabet-byte-">isInAlphabet(byte)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a></dt> +<dd> +<div class="block">Returns whether or not the <code>octet</code> is in the Base16 alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base32.html#isInAlphabet-byte-">isInAlphabet(byte)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></dt> +<dd> +<div class="block">Returns whether or not the <code>octet</code> is in the Base32 alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#isInAlphabet-byte-">isInAlphabet(byte)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Returns whether or not the <code>octet</code> is in the Base64 alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-byte-">isInAlphabet(byte)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Returns whether or not the <code>octet</code> is in the current alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-byte:A-boolean-">isInAlphabet(byte[], boolean)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Tests a given byte array to see if it contains only valid characters within the alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-java.lang.String-">isInAlphabet(String)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Tests a given String to see if it contains only valid characters within the alphabet.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.RPattern.html#isMatch-java.lang.CharSequence-">isMatch(CharSequence)</a></span> - Method in interface org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Metaphone.html#isMetaphoneEqual-java.lang.String-java.lang.String-">isMetaphoneEqual(String, String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a></dt> +<dd> +<div class="block">Tests is the metaphones of two strings are identical.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/CharEncoding.html#ISO_8859_1">ISO_8859_1</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">CharEncoding</a></dt> +<dd> +<div class="block">CharEncodingISO Latin Alphabet No.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Charsets.html#ISO_8859_1">ISO_8859_1</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Charsets</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#ISO_8859_1" title="class or interface in java.nio.charset"><code>StandardCharsets.ISO_8859_1</code></a> instead.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html#isSingleton--">isSingleton()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#isSingleton--">isSingleton()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Nysiis.html#isStrict--">isStrict()</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a></dt> +<dd> +<div class="block">Indicates the strict mode for this <a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><code>Nysiis</code></a> encoder.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#isStrictDecoding--">isStrictDecoding()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Returns true if decoding behavior is strict.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html#isStrictDecoding--">isStrictDecoding()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></dt> +<dd> +<div class="block">Returns true if decoding behavior is strict.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html#isStrictDecoding--">isStrictDecoding()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></dt> +<dd> +<div class="block">Returns true if decoding behavior is strict.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/BCodec.html#isStrictDecoding--">isStrictDecoding()</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></dt> +<dd> +<div class="block">Returns true if decoding behavior is strict.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Base64.html#isUrlSafe--">isUrlSafe()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dt> +<dd> +<div class="block">Returns our current encode mode.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#isWhiteSpace-byte-">isWhiteSpace(byte)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Checks if a byte value is whitespace or not.</div> +</dd> +</dl> +<a name="I:J"> +<!-- --> +</a> +<h2 class="title">J</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#join-org.apache.commons.codec.language.bm.Rule.Phoneme-">join(Rule.Phoneme)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">since 1.9</span></div> +</div> +</dd> +</dl> +<a name="I:L"> +<!-- --> +</a> +<h2 class="title">L</h2> +<dl> +<dt><a href="org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Lang</span></a> - Class in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> +<div class="block">Language guessing utility.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Languages</span></a> - Class in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> +<div class="block">Language codes.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Languages.LanguageSet</span></a> - Class in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> +<div class="block">A set of languages.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Languages.SomeLanguages</span></a> - Class in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> +<div class="block">Some languages, explicitly enumerated.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html#LanguageSet--">LanguageSet()</a></span> - Constructor for class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#lineLength">lineLength</a></span> - Variable in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Chunksize for encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Lang.html#loadFromResource-java.lang.String-org.apache.commons.codec.language.bm.Languages-">loadFromResource(String, Languages)</a></span> - Static method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></dt> +<dd> +<div class="block">Loads language rules from a resource.</div> +</dd> +</dl> +<a name="I:M"> +<!-- --> +</a> +<h2 class="title">M</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/cli/Digest.html#main-java.lang.String:A-">main(String[])</a></span> - Static method in class org.apache.commons.codec.cli.<a href="org/apache/commons/codec/cli/Digest.html" title="class in org.apache.commons.codec.cli">Digest</a></dt> +<dd> +<div class="block">Runs the digest algorithm in <code>args[0]</code> on the file in <code>args[1]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html#mark-int-">mark(int)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></dt> +<dd> +<div class="block">Marks the current position in this input stream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html#markSupported--">markSupported()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></dt> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#MASK_8BITS">MASK_8BITS</a></span> - Static variable in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Mask used to extract 8 bits, used in decoding bytes</div> +</dd> +<dt><a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">MatchRatingApproachEncoder</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Match Rating Approach Phonetic Algorithm Developed by <CITE>Western Airlines</CITE> in 1977.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html#MatchRatingApproachEncoder--">MatchRatingApproachEncoder()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">MatchRatingApproachEncoder</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md2-byte:A-">md2(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD2 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md2-java.io.InputStream-">md2(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD2 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md2-java.lang.String-">md2(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD2 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#MD2">MD2</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The MD2 message digest algorithm defined in RFC 1319.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md2Hex-byte:A-">md2Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD2 digest and returns the value as a 32 character hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md2Hex-java.io.InputStream-">md2Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD2 digest and returns the value as a 32 character hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md2Hex-java.lang.String-">md2Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD2 digest and returns the value as a 32 character hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md5-byte:A-">md5(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md5-java.io.InputStream-">md5(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md5-java.lang.String-">md5(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#MD5">MD5</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The MD5 message digest algorithm defined in RFC 1321.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Md5Crypt</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">The libc crypt() "$1$" and Apache "$apr1$" MD5-based hash algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Md5Crypt.html#Md5Crypt--">Md5Crypt()</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-">md5Crypt(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></dt> +<dd> +<div class="block">Generates a libc6 crypt() compatible "$1$" hash value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.util.Random-">md5Crypt(byte[], Random)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></dt> +<dd> +<div class="block">Generates a libc6 crypt() compatible "$1$" hash value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.lang.String-">md5Crypt(byte[], String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></dt> +<dd> +<div class="block">Generates a libc crypt() compatible "$1$" MD5 based hash value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.lang.String-java.lang.String-">md5Crypt(byte[], String, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></dt> +<dd> +<div class="block">Generates a libc6 crypt() "$1$" or Apache htpasswd "$apr1$" hash value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.lang.String-java.lang.String-java.util.Random-">md5Crypt(byte[], String, String, Random)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></dt> +<dd> +<div class="block">Generates a libc6 crypt() "$1$" or Apache htpasswd "$apr1$" hash value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md5Hex-byte:A-">md5Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD5 digest and returns the value as a 32 character hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md5Hex-java.io.InputStream-">md5Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD5 digest and returns the value as a 32 character hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#md5Hex-java.lang.String-">md5Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the MD5 digest and returns the value as a 32 character hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#merge-org.apache.commons.codec.language.bm.Languages.LanguageSet-">merge(Languages.LanguageSet)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#mergeWithLanguage-org.apache.commons.codec.language.bm.Languages.LanguageSet-">mergeWithLanguage(Languages.LanguageSet)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></dt> +<dd> +<div class="block">Returns a new Phoneme with the same text but a union of its + current language set and the given one.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MessageDigestAlgorithms</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">Standard <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> algorithm names from the <cite>Java Cryptography Architecture Standard Algorithm Name + Documentation</cite>.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Metaphone</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Encodes a string into a Metaphone value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Metaphone.html#Metaphone--">Metaphone()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a></dt> +<dd> +<div class="block">Creates an instance of the Metaphone encoder</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Metaphone.html#metaphone-java.lang.String-">metaphone(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a></dt> +<dd> +<div class="block">Find the metaphone value of a String.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#MIME_CHUNK_SIZE">MIME_CHUNK_SIZE</a></span> - Static variable in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">MIME chunk size per RFC 2045 section 6.8.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash2</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">Implementation of the MurmurHash2 32-bit and 64-bit hash functions.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash3</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">Implementation of the MurmurHash3 32-bit and 128-bit hash functions.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash3.IncrementalHash32</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use IncrementalHash32x86. This corrects the processing of trailing bytes.</span></div> +</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash3.IncrementalHash32x86</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">Generates 32-bit hash from input bytes.</div> +</dd> +</dl> +<a name="I:N"> +<!-- --> +</a> +<h2 class="title">N</h2> +<dl> +<dt><a href="org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">NameType</span></a> - Enum in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> +<div class="block">Supported types of names.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#newString-byte:A-java.lang.String-">newString(byte[], String)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the given charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#newStringIso8859_1-byte:A-">newStringIso8859_1(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the ISO-8859-1 charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#newStringUsAscii-byte:A-">newStringUsAscii(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the US-ASCII charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#newStringUtf16-byte:A-">newStringUtf16(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-16 charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#newStringUtf16Be-byte:A-">newStringUtf16Be(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-16BE charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#newStringUtf16Le-byte:A-">newStringUtf16Le(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-16LE charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#newStringUtf8-byte:A-">newStringUtf8(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-8 charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.html#NO_LANGUAGES">NO_LANGUAGES</a></span> - Static variable in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></dt> +<dd> +<div class="block">No languages at all.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.html#NULL_HASHCODE">NULL_HASHCODE</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">This is not used internally and will be removed in a future release.</span></div> +</div> +</dd> +<dt><a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Nysiis</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Encodes a string into a NYSIIS value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Nysiis.html#Nysiis--">Nysiis()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a></dt> +<dd> +<div class="block">Creates an instance of the <a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><code>Nysiis</code></a> encoder with strict mode (original form), + i.e.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Nysiis.html#Nysiis-boolean-">Nysiis(boolean)</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a></dt> +<dd> +<div class="block">Create an instance of the <a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><code>Nysiis</code></a> encoder with the specified strict mode: + + + <code>true</code>: encoded strings have a maximum length of 6 + <code>false</code>: encoded strings may have arbitrary length + </div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Nysiis.html#nysiis-java.lang.String-">nysiis(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a></dt> +<dd> +<div class="block">Retrieves the NYSIIS code for a given String object.</div> +</dd> +</dl> +<a name="I:O"> +<!-- --> +</a> +<h2 class="title">O</h2> +<dl> +<dt><a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a> - package org.apache.commons.codec</dt> +<dd> +<div class="block">Interfaces and classes used by the various implementations in + the sub-packages.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> - package org.apache.commons.codec.binary</dt> +<dd> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</dd> +<dt><a href="org/apache/commons/codec/cli/package-summary.html">org.apache.commons.codec.cli</a> - package org.apache.commons.codec.cli</dt> +<dd> +<div class="block">Command line utility.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a> - package org.apache.commons.codec.digest</dt> +<dd> +<div class="block"> + Simplifies common <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> tasks and + includes a libc crypt(3) compatible crypt method that supports DES, + MD5, SHA-256 and SHA-512 based algorithms as well as the Apache + specific "$apr1$" variant.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a> - package org.apache.commons.codec.language</dt> +<dd> +<div class="block"> + Language and phonetic encoders.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> - package org.apache.commons.codec.language.bm</dt> +<dd> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</dd> +<dt><a href="org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a> - package org.apache.commons.codec.net</dt> +<dd> +<div class="block"> + Network related encoding and decoding.</div> +</dd> +</dl> +<a name="I:P"> +<!-- --> +</a> +<h2 class="title">P</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#PAD">PAD</a></span> - Variable in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="org/apache/commons/codec/binary/BaseNCodec.html#pad"><code>BaseNCodec.pad</code></a>. Will be removed in 2.0.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#pad">pad</a></span> - Variable in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#PAD_DEFAULT">PAD_DEFAULT</a></span> - Static variable in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">Byte used to pad output.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#patternAndContextMatches-java.lang.CharSequence-int-">patternAndContextMatches(CharSequence, int)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> +<div class="block">Decides if the pattern and context match the input starting at a position.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodec.html#PEM_CHUNK_SIZE">PEM_CHUNK_SIZE</a></span> - Static variable in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></dt> +<dd> +<div class="block">PEM chunk size per RFC 1421 section 4.3.2.4.</div> +</dd> +<dt><a href="org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">PercentCodec</span></a> - Class in <a href="org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></dt> +<dd> +<div class="block">Implements the Percent-Encoding scheme, as described in HTTP 1.1 specification.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/PercentCodec.html#PercentCodec--">PercentCodec()</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></dt> +<dd> +<div class="block">Constructs a Percent coded that will encode all the non US-ASCII characters using the Percent-Encoding + while it will not encode all the US-ASCII characters, except for character '%' that is used as escape + character for Percent-Encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/PercentCodec.html#PercentCodec-byte:A-boolean-">PercentCodec(byte[], boolean)</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></dt> +<dd> +<div class="block">Constructs a Percent codec by specifying the characters that belong to US-ASCII that should + always be encoded.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#Phoneme-java.lang.CharSequence-org.apache.commons.codec.language.bm.Languages.LanguageSet-">Phoneme(CharSequence, Languages.LanguageSet)</a></span> - Constructor for class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-">Phoneme(Rule.Phoneme, Rule.Phoneme)</a></span> - Constructor for class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Languages.LanguageSet-">Phoneme(Rule.Phoneme, Rule.Phoneme, Languages.LanguageSet)</a></span> - Constructor for class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.PhonemeList.html#PhonemeList-java.util.List-">PhonemeList(List<Rule.Phoneme>)</a></span> - Constructor for class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm">Rule.PhonemeList</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">PhoneticEngine</span></a> - Class in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> +<div class="block">Converts words into potential phonetic representations.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html#PhoneticEngine-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-boolean-">PhoneticEngine(NameType, RuleType, boolean)</a></span> - Constructor for class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">PhoneticEngine</a></dt> +<dd> +<div class="block">Generates a new, fully-configured phonetic engine.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/PhoneticEngine.html#PhoneticEngine-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-boolean-int-">PhoneticEngine(NameType, RuleType, boolean, int)</a></span> - Constructor for class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">PhoneticEngine</a></dt> +<dd> +<div class="block">Generates a new, fully-configured phonetic engine.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">PureJavaCrc32</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">A pure-java implementation of the CRC32 checksum that uses + the same polynomial as the built-in native CRC32.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/PureJavaCrc32.html#PureJavaCrc32--">PureJavaCrc32()</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32</a></dt> +<dd> +<div class="block">Create a new PureJavaCrc32 object.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">PureJavaCrc32C</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">A pure-java implementation of the CRC32 checksum that uses + the CRC32-C polynomial, the same polynomial used by iSCSI + and implemented on many Intel chipsets supporting SSE4.2.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/PureJavaCrc32C.html#PureJavaCrc32C--">PureJavaCrc32C()</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32C</a></dt> +<dd> +<div class="block">Create a new PureJavaCrc32 object.</div> +</dd> +</dl> +<a name="I:Q"> +<!-- --> +</a> +<h2 class="title">Q</h2> +<dl> +<dt><a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">QCodec</span></a> - Class in <a href="org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></dt> +<dd> +<div class="block">Similar to the Quoted-Printable content-transfer-encoding defined in + <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> and designed to allow text containing mostly ASCII + characters to be decipherable on an ASCII terminal without decoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#QCodec--">QCodec()</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Default constructor.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#QCodec-java.nio.charset.Charset-">QCodec(Charset)</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#QCodec-java.lang.String-">QCodec(String)</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +</dd> +<dt><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">QuotedPrintableCodec</span></a> - Class in <a href="org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></dt> +<dd> +<div class="block">Codec for the Quoted-Printable section of <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#QuotedPrintableCodec--">QuotedPrintableCodec()</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Default constructor, assumes default Charset of <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a></div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#QuotedPrintableCodec-boolean-">QuotedPrintableCodec(boolean)</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Constructor which allows for the selection of the strict mode.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#QuotedPrintableCodec-java.nio.charset.Charset-">QuotedPrintableCodec(Charset)</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#QuotedPrintableCodec-java.nio.charset.Charset-boolean-">QuotedPrintableCodec(Charset, boolean)</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Constructor which allows for the selection of a default Charset and strict mode.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QuotedPrintableCodec.html#QuotedPrintableCodec-java.lang.String-">QuotedPrintableCodec(String)</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></dt> +<dd> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +</dd> +</dl> +<a name="I:R"> +<!-- --> +</a> +<h2 class="title">R</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html#read--">read()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></dt> +<dd> +<div class="block">Reads one <code>byte</code> from this input stream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html#read-byte:A-int-int-">read(byte[], int, int)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></dt> +<dd> +<div class="block">Attempts to read <code>len</code> bytes into the specified <code>b</code> array starting at <code>offset</code> + from this InputStream.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">RefinedSoundex</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Encodes a string into a Refined Soundex value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/RefinedSoundex.html#RefinedSoundex--">RefinedSoundex()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></dt> +<dd> +<div class="block">Creates an instance of the RefinedSoundex object using the default US + English mapping.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/RefinedSoundex.html#RefinedSoundex-char:A-">RefinedSoundex(char[])</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></dt> +<dd> +<div class="block">Creates a refined soundex instance using a custom mapping.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/RefinedSoundex.html#RefinedSoundex-java.lang.String-">RefinedSoundex(String)</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></dt> +<dd> +<div class="block">Creates a refined Soundex instance using a custom mapping.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html#reset--">reset()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></dt> +<dd> +<div class="block">Repositions this stream to the position at the time the mark method was last called on this input stream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/PureJavaCrc32.html#reset--">reset()</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/PureJavaCrc32C.html#reset--">reset()</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32C</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/XXHash32.html#reset--">reset()</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest">XXHash32</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Resources</span></a> - Class in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Consider this class package private.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Resources.html#Resources--">Resources()</a></span> - Constructor for class org.apache.commons.codec.<a href="org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec">Resources</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html#restrictTo-org.apache.commons.codec.language.bm.Languages.LanguageSet-">restrictTo(Languages.LanguageSet)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#restrictTo-org.apache.commons.codec.language.bm.Languages.LanguageSet-">restrictTo(Languages.LanguageSet)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule</span></a> - Class in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> +<div class="block">A phoneme rule.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.html#Rule-java.lang.String-java.lang.String-java.lang.String-org.apache.commons.codec.language.bm.Rule.PhonemeExpr-">Rule(String, String, String, Rule.PhonemeExpr)</a></span> - Constructor for class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dt> +<dd> +<div class="block">Creates a new rule.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.Phoneme</span></a> - Class in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.PhonemeExpr</span></a> - Interface in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.PhonemeList</span></a> - Class in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> </dd> +<dt><a href="org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.RPattern</span></a> - Interface in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> +<div class="block">A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">RuleType</span></a> - Enum in <a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></dt> +<dd> +<div class="block">Types of rule.</div> +</dd> +</dl> +<a name="I:S"> +<!-- --> +</a> +<h2 class="title">S</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#setConcat-boolean-">setConcat(boolean)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></dt> +<dd> +<div class="block">Sets how multiple possible phonetic encodings are combined.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/QCodec.html#setEncodeBlanks-boolean-">setEncodeBlanks(boolean)</a></span> - Method in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></dt> +<dd> +<div class="block">Defines whether optional transformation of SPACE characters is to be used</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DoubleMetaphone.html#setMaxCodeLen-int-">setMaxCodeLen(int)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dt> +<dd> +<div class="block">Sets the maxCodeLen.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Metaphone.html#setMaxCodeLen-int-">setMaxCodeLen(int)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a></dt> +<dd> +<div class="block">Sets the maxCodeLen.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#setMaxLength-int-">setMaxLength(int)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#setMaxPhonemes-int-">setMaxPhonemes(int)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></dt> +<dd> +<div class="block">Sets the number of maximum of phonemes that shall be considered by the engine.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#setNameType-org.apache.commons.codec.language.bm.NameType-">setNameType(NameType)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></dt> +<dd> +<div class="block">Sets the type of name.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#setRuleType-org.apache.commons.codec.language.bm.RuleType-">setRuleType(RuleType)</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></dt> +<dd> +<div class="block">Sets the rule type to apply.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha-byte:A-">sha(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1-byte:A-"><code>DigestUtils.sha1(byte[])</code></a></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha-java.io.InputStream-">sha(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1-java.io.InputStream-"><code>DigestUtils.sha1(InputStream)</code></a></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha-java.lang.String-">sha(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1-java.lang.String-"><code>DigestUtils.sha1(String)</code></a></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha1-byte:A-">sha1(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha1-java.io.InputStream-">sha1(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha1-java.lang.String-">sha1(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-byte:A-">sha1Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.io.InputStream-">sha1Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.lang.String-">sha1Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha256-byte:A-">sha256(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-256 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha256-java.io.InputStream-">sha256(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-256 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha256-java.lang.String-">sha256(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-256 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Sha2Crypt.html#sha256Crypt-byte:A-">sha256Crypt(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest">Sha2Crypt</a></dt> +<dd> +<div class="block">Generates a libc crypt() compatible "$5$" hash value with random salt.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Sha2Crypt.html#sha256Crypt-byte:A-java.lang.String-">sha256Crypt(byte[], String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest">Sha2Crypt</a></dt> +<dd> +<div class="block">Generates a libc6 crypt() compatible "$5$" hash value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Sha2Crypt.html#sha256Crypt-byte:A-java.lang.String-java.util.Random-">sha256Crypt(byte[], String, Random)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest">Sha2Crypt</a></dt> +<dd> +<div class="block">Generates a libc6 crypt() compatible "$5$" hash value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha256Hex-byte:A-">sha256Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-256 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha256Hex-java.io.InputStream-">sha256Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-256 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha256Hex-java.lang.String-">sha256Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-256 digest and returns the value as a hex string.</div> +</dd> +<dt><a href="org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Sha2Crypt</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">SHA2-based Unix crypt implementation.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Sha2Crypt.html#Sha2Crypt--">Sha2Crypt()</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest">Sha2Crypt</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha384-byte:A-">sha384(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-384 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha384-java.io.InputStream-">sha384(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-384 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha384-java.lang.String-">sha384(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-384 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha384Hex-byte:A-">sha384Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-384 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha384Hex-java.io.InputStream-">sha384Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-384 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha384Hex-java.lang.String-">sha384Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-384 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_224-byte:A-">sha3_224(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-224 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_224-java.io.InputStream-">sha3_224(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-224 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_224-java.lang.String-">sha3_224(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-224 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_224">SHA3_224</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The SHA3-224 hash algorithm defined in the FIPS PUB 202.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_224Hex-byte:A-">sha3_224Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-224 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_224Hex-java.io.InputStream-">sha3_224Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-224 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_224Hex-java.lang.String-">sha3_224Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-224 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_256-byte:A-">sha3_256(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-256 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_256-java.io.InputStream-">sha3_256(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-256 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_256-java.lang.String-">sha3_256(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-256 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_256">SHA3_256</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The SHA3-256 hash algorithm defined in the FIPS PUB 202.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_256Hex-byte:A-">sha3_256Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-256 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_256Hex-java.io.InputStream-">sha3_256Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-256 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_256Hex-java.lang.String-">sha3_256Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-256 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_384-byte:A-">sha3_384(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-384 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_384-java.io.InputStream-">sha3_384(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-384 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_384-java.lang.String-">sha3_384(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-384 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_384">SHA3_384</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The SHA3-384 hash algorithm defined in the FIPS PUB 202.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_384Hex-byte:A-">sha3_384Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-384 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_384Hex-java.io.InputStream-">sha3_384Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-384 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_384Hex-java.lang.String-">sha3_384Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-384 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_512-byte:A-">sha3_512(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-512 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_512-java.io.InputStream-">sha3_512(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-512 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_512-java.lang.String-">sha3_512(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-512 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_512">SHA3_512</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The SHA3-512 hash algorithm defined in the FIPS PUB 202.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_512Hex-byte:A-">sha3_512Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-512 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_512Hex-java.io.InputStream-">sha3_512Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-512 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha3_512Hex-java.lang.String-">sha3_512Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA3-512 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512-byte:A-">sha512(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512-java.io.InputStream-">sha512(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512-java.lang.String-">sha512(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_224-byte:A-">sha512_224(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_224-java.io.InputStream-">sha512_224(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_224-java.lang.String-">sha512_224(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_224Hex-byte:A-">sha512_224Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_224Hex-java.io.InputStream-">sha512_224Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_224Hex-java.lang.String-">sha512_224Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_256-byte:A-">sha512_256(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_256-java.io.InputStream-">sha512_256(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_256-java.lang.String-">sha512_256(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a <code>byte[]</code>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_256Hex-byte:A-">sha512_256Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_256Hex-java.io.InputStream-">sha512_256Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512_256Hex-java.lang.String-">sha512_256Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Sha2Crypt.html#sha512Crypt-byte:A-">sha512Crypt(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest">Sha2Crypt</a></dt> +<dd> +<div class="block">Generates a libc crypt() compatible "$6$" hash value with random salt.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Sha2Crypt.html#sha512Crypt-byte:A-java.lang.String-">sha512Crypt(byte[], String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest">Sha2Crypt</a></dt> +<dd> +<div class="block">Generates a libc6 crypt() compatible "$6$" hash value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/Sha2Crypt.html#sha512Crypt-byte:A-java.lang.String-java.util.Random-">sha512Crypt(byte[], String, Random)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest">Sha2Crypt</a></dt> +<dd> +<div class="block">Generates a libc6 crypt() compatible "$6$" hash value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512Hex-byte:A-">sha512Hex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512Hex-java.io.InputStream-">sha512Hex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#sha512Hex-java.lang.String-">sha512Hex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Calculates the SHA-512 digest and returns the value as a hex string.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_1">SHA_1</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The SHA-1 hash algorithm defined in the FIPS PUB 180-2.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_224">SHA_224</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The SHA-224 hash algorithm defined in the FIPS PUB 180-3.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_256">SHA_256</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The SHA-256 hash algorithm defined in the FIPS PUB 180-2.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_384">SHA_384</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The SHA-384 hash algorithm defined in the FIPS PUB 180-2.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512">SHA_512</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The SHA-512 hash algorithm defined in the FIPS PUB 180-2.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512_224">SHA_512_224</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The SHA-512 hash algorithm defined in the FIPS PUB 180-4.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512_256">SHA_512_256</a></span> - Static variable in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">The SHA-512 hash algorithm defined in the FIPS PUB 180-4.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#shaHex-byte:A-">shaHex(byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-byte:A-"><code>DigestUtils.sha1Hex(byte[])</code></a></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#shaHex-java.io.InputStream-">shaHex(InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.io.InputStream-"><code>DigestUtils.sha1Hex(InputStream)</code></a></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#shaHex-java.lang.String-">shaHex(String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.lang.String-"><code>DigestUtils.sha1Hex(String)</code></a></span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#SILENT_MARKER">SILENT_MARKER</a></span> - Static variable in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">The marker character used to indicate a silent (ignored) character.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html#skip-long-">skip(long)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></dt> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html#soundex-java.lang.String-">soundex(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">DaitchMokotoffSoundex</a></dt> +<dd> +<div class="block">Encodes a String using the Daitch-Mokotoff soundex algorithm with branching.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/RefinedSoundex.html#soundex-java.lang.String-">soundex(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></dt> +<dd> +<div class="block">Retrieves the Refined Soundex code for a given String object.</div> +</dd> +<dt><a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Soundex</span></a> - Class in <a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></dt> +<dd> +<div class="block">Encodes a string into a Soundex value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#Soundex--">Soundex()</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">Creates an instance using US_ENGLISH_MAPPING</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#Soundex-char:A-">Soundex(char[])</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">Creates a soundex instance using the given mapping.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#Soundex-java.lang.String-">Soundex(String)</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">Creates a refined soundex instance using a custom mapping.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#Soundex-java.lang.String-boolean-">Soundex(String, boolean)</a></span> - Constructor for class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">Creates a refined soundex instance using a custom mapping.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#soundex-java.lang.String-">soundex(String)</a></span> - Method in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">Retrieves the Soundex code for a given String object.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html#start-int-">start(int)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a></dt> +<dd> +<div class="block">Starts a new incremental hash.</div> +</dd> +<dt><a href="org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">StringDecoder</span></a> - Interface in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Defines common decoding methods for String decoders.</div> +</dd> +<dt><a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">StringEncoder</span></a> - Interface in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Defines common encoding methods for String encoders.</div> +</dd> +<dt><a href="org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec"><span class="typeNameLink">StringEncoderComparator</span></a> - Class in <a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></dt> +<dd> +<div class="block">Compares Strings using a <a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><code>StringEncoder</code></a>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/StringEncoderComparator.html#StringEncoderComparator--">StringEncoderComparator()</a></span> - Constructor for class org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec">StringEncoderComparator</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Creating an instance without a <a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><code>StringEncoder</code></a> leads to a <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a>. Will be + removed in 2.0.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/StringEncoderComparator.html#StringEncoderComparator-org.apache.commons.codec.StringEncoder-">StringEncoderComparator(StringEncoder)</a></span> - Constructor for class org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec">StringEncoderComparator</a></dt> +<dd> +<div class="block">Constructs a new instance with the given algorithm.</div> +</dd> +<dt><a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">StringUtils</span></a> - Class in <a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></dt> +<dd> +<div class="block">Converts String to and from bytes using the encodings required by the Java specification.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/StringUtils.html#StringUtils--">StringUtils()</a></span> - Constructor for class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></dt> +<dd> </dd> +</dl> +<a name="I:T"> +<!-- --> +</a> +<h2 class="title">T</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BinaryCodec.html#toAsciiBytes-byte:A-">toAsciiBytes(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></dt> +<dd> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 character bytes - each byte is a truncated + char.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BinaryCodec.html#toAsciiChars-byte:A-">toAsciiChars(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></dt> +<dd> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 characters.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BinaryCodec.html#toAsciiString-byte:A-">toAsciiString(byte[])</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></dt> +<dd> +<div class="block">Converts an array of raw binary data into a String of ASCII 0 and 1 characters.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BinaryCodec.html#toByteArray-java.lang.String-">toByteArray(String)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></dt> +<dd> +<div class="block">Decodes a String where each char of the String represents an ASCII '0' or '1'.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Charsets.html#toCharset-java.nio.charset.Charset-">toCharset(Charset)</a></span> - Static method in class org.apache.commons.codec.<a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Charsets</a></dt> +<dd> +<div class="block">Returns the given Charset or the default Charset if the given Charset is null.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Charsets.html#toCharset-java.lang.String-">toCharset(String)</a></span> - Static method in class org.apache.commons.codec.<a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Charsets</a></dt> +<dd> +<div class="block">Returns a Charset for the named charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#toDigit-char-int-">toDigit(char, int)</a></span> - Static method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Converts a hexadecimal character to an integer.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/Hex.html#toString--">toString()</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></dt> +<dd> +<div class="block">Returns a string representation of the object, which includes the charset name.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/cli/Digest.html#toString--">toString()</a></span> - Method in class org.apache.commons.codec.cli.<a href="org/apache/commons/codec/cli/Digest.html" title="class in org.apache.commons.codec.cli">Digest</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacAlgorithms.html#toString--">toString()</a></span> - Method in enum org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></dt> +<dd> +<div class="block">The algorithm name</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#toString--">toString()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html#toString--">toString()</a></span> - Method in class org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></dt> +<dd> </dd> +</dl> +<a name="I:U"> +<!-- --> +</a> +<h2 class="title">U</h2> +<dl> +<dt><a href="org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">UnixCrypt</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">Unix crypt(3) algorithm implementation.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/UnixCrypt.html#UnixCrypt--">UnixCrypt()</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest">UnixCrypt</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/PureJavaCrc32.html#update-byte:A-int-int-">update(byte[], int, int)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/PureJavaCrc32.html#update-int-">update(int)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/PureJavaCrc32C.html#update-byte:A-int-int-">update(byte[], int, int)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32C</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/PureJavaCrc32C.html#update-int-">update(int)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32C</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/XXHash32.html#update-int-">update(int)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest">XXHash32</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/XXHash32.html#update-byte:A-int-int-">update(byte[], int, int)</a></span> - Method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest">XXHash32</a></dt> +<dd> </dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-byte:A-">updateDigest(MessageDigest, byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Updates the given <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.nio.ByteBuffer-">updateDigest(MessageDigest, ByteBuffer)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Updates the given <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a>.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.io.File-">updateDigest(MessageDigest, File)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a File and updates the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.io.InputStream-">updateDigest(MessageDigest, InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through an InputStream and updates the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.nio.file.Path-java.nio.file.OpenOption...-">updateDigest(MessageDigest, Path, OpenOption...)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a Path and updates the digest for the data</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.io.RandomAccessFile-">updateDigest(MessageDigest, RandomAccessFile)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Reads through a RandomAccessFile and updates the digest for the data using non-blocking-io (NIO)</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.lang.String-">updateDigest(MessageDigest, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></dt> +<dd> +<div class="block">Updates the given <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> from a String (converted to bytes using UTF-8).</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#updateHmac-javax.crypto.Mac-byte:A-">updateHmac(Mac, byte[])</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Resets and then updates the given <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with the value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#updateHmac-javax.crypto.Mac-java.io.InputStream-">updateHmac(Mac, InputStream)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Resets and then updates the given <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with the value.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacUtils.html#updateHmac-javax.crypto.Mac-java.lang.String-">updateHmac(Mac, String)</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></dt> +<dd> +<div class="block">Resets and then updates the given <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with the value.</div> +</dd> +<dt><a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">URLCodec</span></a> - Class in <a href="org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></dt> +<dd> +<div class="block">Implements the 'www-form-urlencoded' encoding scheme, also misleadingly known as URL encoding.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#URLCodec--">URLCodec()</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Default constructor.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#URLCodec-java.lang.String-">URLCodec(String)</a></span> - Constructor for class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block">Constructor which allows for the selection of a default charset.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/CharEncoding.html#US_ASCII">US_ASCII</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">CharEncoding</a></dt> +<dd> +<div class="block">Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Charsets.html#US_ASCII">US_ASCII</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Charsets</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#US_ASCII" title="class or interface in java.nio.charset"><code>StandardCharsets.US_ASCII</code></a> instead.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/RefinedSoundex.html#US_ENGLISH">US_ENGLISH</a></span> - Static variable in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></dt> +<dd> +<div class="block">This static variable contains an instance of the RefinedSoundex using + the US_ENGLISH mapping.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#US_ENGLISH">US_ENGLISH</a></span> - Static variable in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">An instance of Soundex using the US_ENGLISH_MAPPING mapping.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#US_ENGLISH_GENEALOGY">US_ENGLISH_GENEALOGY</a></span> - Static variable in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">An instance of Soundex using the mapping as per the Genealogy site: + http://www.genealogy.com/articles/research/00000060.html</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/RefinedSoundex.html#US_ENGLISH_MAPPING_STRING">US_ENGLISH_MAPPING_STRING</a></span> - Static variable in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></dt> +<dd> +<div class="block">Mapping:</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING_STRING">US_ENGLISH_MAPPING_STRING</a></span> - Static variable in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">This is a default mapping of the 26 letters used in US English.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/Soundex.html#US_ENGLISH_SIMPLIFIED">US_ENGLISH_SIMPLIFIED</a></span> - Static variable in class org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></dt> +<dd> +<div class="block">An instance of Soundex using the Simplified Soundex mapping, as described here: + http://west-penwith.org.uk/misc/soundex.htm</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/CharEncoding.html#UTF_16">UTF_16</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">CharEncoding</a></dt> +<dd> +<div class="block">Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark + (either order accepted on input, big-endian used on output)</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Charsets.html#UTF_16">UTF_16</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Charsets</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16</code></a> instead.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/CharEncoding.html#UTF_16BE">UTF_16BE</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">CharEncoding</a></dt> +<dd> +<div class="block">Sixteen-bit Unicode Transformation Format, big-endian byte order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Charsets.html#UTF_16BE">UTF_16BE</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Charsets</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16BE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16BE</code></a> instead.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/CharEncoding.html#UTF_16LE">UTF_16LE</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">CharEncoding</a></dt> +<dd> +<div class="block">Sixteen-bit Unicode Transformation Format, little-endian byte order.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Charsets.html#UTF_16LE">UTF_16LE</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Charsets</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16LE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16LE</code></a> instead.</span></div> +</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/CharEncoding.html#UTF_8">UTF_8</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">CharEncoding</a></dt> +<dd> +<div class="block">Eight-bit Unicode Transformation Format.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/Charsets.html#UTF_8">UTF_8</a></span> - Static variable in class org.apache.commons.codec.<a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Charsets</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a> instead.</span></div> +</div> +</dd> +</dl> +<a name="I:V"> +<!-- --> +</a> +<h2 class="title">V</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/CodecPolicy.html#valueOf-java.lang.String-">valueOf(String)</a></span> - Static method in enum org.apache.commons.codec.<a href="org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></dt> +<dd> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacAlgorithms.html#valueOf-java.lang.String-">valueOf(String)</a></span> - Static method in enum org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></dt> +<dd> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/NameType.html#valueOf-java.lang.String-">valueOf(String)</a></span> - Static method in enum org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></dt> +<dd> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/RuleType.html#valueOf-java.lang.String-">valueOf(String)</a></span> - Static method in enum org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></dt> +<dd> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/CodecPolicy.html#values--">values()</a></span> - Static method in enum org.apache.commons.codec.<a href="org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></dt> +<dd> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/HmacAlgorithms.html#values--">values()</a></span> - Static method in enum org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></dt> +<dd> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html#values--">values()</a></span> - Static method in class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></dt> +<dd> +<div class="block">Gets all constant values defined in this class.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/NameType.html#values--">values()</a></span> - Static method in enum org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></dt> +<dd> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/language/bm/RuleType.html#values--">values()</a></span> - Static method in enum org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></dt> +<dd> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</dd> +</dl> +<a name="I:W"> +<!-- --> +</a> +<h2 class="title">W</h2> +<dl> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html#write-byte:A-int-int-">write(byte[], int, int)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></dt> +<dd> +<div class="block">Writes <code>len</code> bytes from the specified <code>b</code> array starting at <code>offset</code> to this + output stream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html#write-int-">write(int)</a></span> - Method in class org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></dt> +<dd> +<div class="block">Writes the specified <code>byte</code> to this output stream.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/net/URLCodec.html#WWW_FORM_URL">WWW_FORM_URL</a></span> - Static variable in class org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dt> +<dd> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">1.11 Will be removed in 2.0 (CODEC-230)</span></div> +</div> +</dd> +</dl> +<a name="I:X"> +<!-- --> +</a> +<h2 class="title">X</h2> +<dl> +<dt><a href="org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">XXHash32</span></a> - Class in <a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></dt> +<dd> +<div class="block">Implementation of the xxhash32 hash algorithm.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/XXHash32.html#XXHash32--">XXHash32()</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest">XXHash32</a></dt> +<dd> +<div class="block">Creates an XXHash32 instance with a seed of 0.</div> +</dd> +<dt><span class="memberNameLink"><a href="org/apache/commons/codec/digest/XXHash32.html#XXHash32-int-">XXHash32(int)</a></span> - Constructor for class org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest">XXHash32</a></dt> +<dd> +<div class="block">Creates an XXHash32 instance.</div> +</dd> +</dl> +<a href="#I:A">A</a> <a href="#I:B">B</a> <a href="#I:C">C</a> <a href="#I:D">D</a> <a href="#I:E">E</a> <a href="#I:F">F</a> <a href="#I:G">G</a> <a href="#I:H">H</a> <a href="#I:I">I</a> <a href="#I:J">J</a> <a href="#I:L">L</a> <a href="#I:M">M</a> <a href="#I:N">N</a> <a href="#I:O">O</a> <a href="#I:P">P</a> <a href="#I:Q">Q</a> <a href="#I:R">R</a> <a href="#I:S">S</a> <a href="#I:T">T</a> <a href="#I:U">U</a> <a href="#I:V">V</a> <a href="#I:W">W</a> <a href="#I:X">X</a> </div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li class="navBarCell1Rev">Index</li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?index-all.html" target="_top">Frames</a></li> +<li><a href="index-all.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/index.html b/WebServer/commons-codec-1.15/apidocs/index.html new file mode 100644 index 0000000000000000000000000000000000000000..cbbb3ce698747b041a179dc120c7f7b384665f04 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/index.html @@ -0,0 +1,76 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Apache Commons Codec 1.15 API</title> +<script type="text/javascript"> + tmpTargetPage = "" + window.location.search; + if (tmpTargetPage != "" && tmpTargetPage != "undefined") + tmpTargetPage = tmpTargetPage.substring(1); + if (tmpTargetPage.indexOf(":") != -1 || (tmpTargetPage != "" && !validURL(tmpTargetPage))) + tmpTargetPage = "undefined"; + targetPage = tmpTargetPage; + function validURL(url) { + try { + url = decodeURIComponent(url); + } + catch (error) { + return false; + } + var pos = url.indexOf(".html"); + if (pos == -1 || pos != url.length - 5) + return false; + var allowNumber = false; + var allowSep = false; + var seenDot = false; + for (var i = 0; i < url.length - 5; i++) { + var ch = url.charAt(i); + if ('a' <= ch && ch <= 'z' || + 'A' <= ch && ch <= 'Z' || + ch == '$' || + ch == '_' || + ch.charCodeAt(0) > 127) { + allowNumber = true; + allowSep = true; + } else if ('0' <= ch && ch <= '9' + || ch == '-') { + if (!allowNumber) + return false; + } else if (ch == '/' || ch == '.') { + if (!allowSep) + return false; + allowNumber = false; + allowSep = false; + if (ch == '.') + seenDot = true; + if (ch == '/' && seenDot) + return false; + } else { + return false; + } + } + return true; + } + function loadFrames() { + if (targetPage != "" && targetPage != "undefined") + top.classFrame.location = top.targetPage; + } +</script> +</head> +<frameset cols="20%,80%" title="Documentation frame" onload="top.loadFrames()"> +<frameset rows="30%,70%" title="Left frames" onload="top.loadFrames()"> +<frame src="overview-frame.html" name="packageListFrame" title="All Packages"> +<frame src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)"> +</frameset> +<frame src="overview-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes"> +<noframes> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> +</noframes> +</frameset> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/BinaryDecoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/BinaryDecoder.html new file mode 100644 index 0000000000000000000000000000000000000000..837b6f4cf6a9aba8936fc555885b91e78081435d --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/BinaryDecoder.html @@ -0,0 +1,251 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>BinaryDecoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="BinaryDecoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":6}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BinaryDecoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/BinaryDecoder.html" target="_top">Frames</a></li> +<li><a href="BinaryDecoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Interface BinaryDecoder" class="title">Interface BinaryDecoder</h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Superinterfaces:</dt> +<dd><a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></dd> +</dl> +<dl> +<dt>All Known Implementing Classes:</dt> +<dd><a href="../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a>, <a href="../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a>, <a href="../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a>, <a href="../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a>, <a href="../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a>, <a href="../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a>, <a href="../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a>, <a href="../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a>, <a href="../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dd> +</dl> +<hr> +<br> +<pre>public interface <span class="typeNameLabel">BinaryDecoder</span> +extends <a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></pre> +<div class="block">Defines common decoding methods for byte array decoders.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/BinaryDecoder.html#decode-byte:A-">decode</a></span>(byte[] source)</code> +<div class="block">Decodes a byte array and returns the results as a byte array.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.Decoder"> +<!-- --> +</a> +<h3>Methods inherited from interface org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></h3> +<code><a href="../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="decode-byte:A-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>decode</h4> +<pre>byte[] decode(byte[] source) + throws <a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a byte array and returns the results as a byte array.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - A byte array which has been encoded with the appropriate encoder</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a byte array that contains decoded content</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - A decoder exception is thrown if a Decoder encounters a failure condition during the decode process.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BinaryDecoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/BinaryDecoder.html" target="_top">Frames</a></li> +<li><a href="BinaryDecoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/BinaryEncoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/BinaryEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..a4c7b8e60c1c62d2cbf0e1e0993bff368d9576f0 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/BinaryEncoder.html @@ -0,0 +1,251 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>BinaryEncoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="BinaryEncoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":6}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BinaryEncoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/BinaryEncoder.html" target="_top">Frames</a></li> +<li><a href="BinaryEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Interface BinaryEncoder" class="title">Interface BinaryEncoder</h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Superinterfaces:</dt> +<dd><a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></dd> +</dl> +<dl> +<dt>All Known Implementing Classes:</dt> +<dd><a href="../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a>, <a href="../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a>, <a href="../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a>, <a href="../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a>, <a href="../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a>, <a href="../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a>, <a href="../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a>, <a href="../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a>, <a href="../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dd> +</dl> +<hr> +<br> +<pre>public interface <span class="typeNameLabel">BinaryEncoder</span> +extends <a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></pre> +<div class="block">Defines common encoding methods for byte array encoders.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-">encode</a></span>(byte[] source)</code> +<div class="block">Encodes a byte array and return the encoded data as a byte array.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.Encoder"> +<!-- --> +</a> +<h3>Methods inherited from interface org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></h3> +<code><a href="../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-byte:A-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>encode</h4> +<pre>byte[] encode(byte[] source) + throws <a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes a byte array and return the encoded data as a byte array.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - Data to be encoded</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing the encoded data</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if the Encoder encounters a failure condition during the encoding process.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BinaryEncoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/BinaryEncoder.html" target="_top">Frames</a></li> +<li><a href="BinaryEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/CharEncoding.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/CharEncoding.html new file mode 100644 index 0000000000000000000000000000000000000000..8910df7df452c44bf19741f5b8080bdd274da80b --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/CharEncoding.html @@ -0,0 +1,445 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>CharEncoding (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="CharEncoding (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/CharEncoding.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/CharEncoding.html" target="_top">Frames</a></li> +<li><a href="CharEncoding.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.java.lang.Object">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Class CharEncoding" class="title">Class CharEncoding</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.CharEncoding</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">CharEncoding</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Character encoding names required of every implementation of the Java platform. + + From the Java documentation <a + href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>: + <p> + <cite>Every implementation of the Java platform is required to support the following character encodings. Consult the + release documentation for your implementation to see if any other encodings are supported. Consult the release + documentation for your implementation to see if any other encodings are supported.</cite> + </p> + + <ul> + <li><code>US-ASCII</code><p> + Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</p></li> + <li><code>ISO-8859-1</code><p> + ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</p></li> + <li><code>UTF-8</code><p> + Eight-bit Unicode Transformation Format.</p></li> + <li><code>UTF-16BE</code><p> + Sixteen-bit Unicode Transformation Format, big-endian byte order.</p></li> + <li><code>UTF-16LE</code><p> + Sixteen-bit Unicode Transformation Format, little-endian byte order.</p></li> + <li><code>UTF-16</code><p> + Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order + accepted on input, big-endian used on output.)</p></li> + </ul> + + This perhaps would best belong in the [lang] project. Even if a similar interface is defined in [lang], it is not + foreseen that [codec] would be made to depend on [lang]. + + <p> + This class is immutable and thread-safe. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/CharEncoding.html#ISO_8859_1">ISO_8859_1</a></span></code> +<div class="block">CharEncodingISO Latin Alphabet No.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/CharEncoding.html#US_ASCII">US_ASCII</a></span></code> +<div class="block">Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/CharEncoding.html#UTF_16">UTF_16</a></span></code> +<div class="block">Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark + (either order accepted on input, big-endian used on output)</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/CharEncoding.html#UTF_16BE">UTF_16BE</a></span></code> +<div class="block">Sixteen-bit Unicode Transformation Format, big-endian byte order.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/CharEncoding.html#UTF_16LE">UTF_16LE</a></span></code> +<div class="block">Sixteen-bit Unicode Transformation Format, little-endian byte order.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/CharEncoding.html#UTF_8">UTF_8</a></span></code> +<div class="block">Eight-bit Unicode Transformation Format.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/CharEncoding.html#CharEncoding--">CharEncoding</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="ISO_8859_1"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>ISO_8859_1</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ISO_8859_1</pre> +<div class="block">CharEncodingISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1. + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../constant-values.html#org.apache.commons.codec.CharEncoding.ISO_8859_1">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="US_ASCII"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>US_ASCII</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> US_ASCII</pre> +<div class="block">Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set. + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../constant-values.html#org.apache.commons.codec.CharEncoding.US_ASCII">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="UTF_16"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>UTF_16</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> UTF_16</pre> +<div class="block">Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark + (either order accepted on input, big-endian used on output) + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../constant-values.html#org.apache.commons.codec.CharEncoding.UTF_16">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="UTF_16BE"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>UTF_16BE</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> UTF_16BE</pre> +<div class="block">Sixteen-bit Unicode Transformation Format, big-endian byte order. + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../constant-values.html#org.apache.commons.codec.CharEncoding.UTF_16BE">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="UTF_16LE"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>UTF_16LE</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> UTF_16LE</pre> +<div class="block">Sixteen-bit Unicode Transformation Format, little-endian byte order. + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../constant-values.html#org.apache.commons.codec.CharEncoding.UTF_16LE">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="UTF_8"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>UTF_8</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> UTF_8</pre> +<div class="block">Eight-bit Unicode Transformation Format. + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../constant-values.html#org.apache.commons.codec.CharEncoding.UTF_8">Constant Field Values</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="CharEncoding--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>CharEncoding</h4> +<pre>public CharEncoding()</pre> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/CharEncoding.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/CharEncoding.html" target="_top">Frames</a></li> +<li><a href="CharEncoding.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.java.lang.Object">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Charsets.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Charsets.html new file mode 100644 index 0000000000000000000000000000000000000000..c8ca120ceb5bfe3c9f38ef4bd71c6e86527b3590 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Charsets.html @@ -0,0 +1,529 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Charsets (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Charsets (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Charsets.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/Charsets.html" target="_top">Frames</a></li> +<li><a href="Charsets.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Class Charsets" class="title">Class Charsets</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.Charsets</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Charsets</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Charsets required of every implementation of the Java platform. + + From the Java documentation <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard + charsets</a>: + <p> + <cite>Every implementation of the Java platform is required to support the following character encodings. Consult the + release documentation for your implementation to see if any other encodings are supported. Consult the release + documentation for your implementation to see if any other encodings are supported. </cite> + </p> + + <ul> + <li><code>US-ASCII</code><p> + Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</p></li> + <li><code>ISO-8859-1</code><p> + ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</p></li> + <li><code>UTF-8</code><p> + Eight-bit Unicode Transformation Format.</p></li> + <li><code>UTF-16BE</code><p> + Sixteen-bit Unicode Transformation Format, big-endian byte order.</p></li> + <li><code>UTF-16LE</code><p> + Sixteen-bit Unicode Transformation Format, little-endian byte order.</p></li> + <li><code>UTF-16</code><p> + Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order + accepted on input, big-endian used on output.)</p></li> + </ul> + + This perhaps would best belong in the Commons Lang project. Even if a similar class is defined in Commons Lang, it is + not foreseen that Commons Codec would be made to depend on Commons Lang. + + <p> + This class is immutable and thread-safe. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Charsets.html#ISO_8859_1">ISO_8859_1</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#ISO_8859_1" title="class or interface in java.nio.charset"><code>StandardCharsets.ISO_8859_1</code></a> instead.</span></div> +</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Charsets.html#US_ASCII">US_ASCII</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#US_ASCII" title="class or interface in java.nio.charset"><code>StandardCharsets.US_ASCII</code></a> instead.</span></div> +</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Charsets.html#UTF_16">UTF_16</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16</code></a> instead.</span></div> +</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Charsets.html#UTF_16BE">UTF_16BE</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16BE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16BE</code></a> instead.</span></div> +</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Charsets.html#UTF_16LE">UTF_16LE</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16LE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16LE</code></a> instead.</span></div> +</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Charsets.html#UTF_8">UTF_8</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a> instead.</span></div> +</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Charsets.html#Charsets--">Charsets</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Charsets.html#toCharset-java.nio.charset.Charset-">toCharset</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</code> +<div class="block">Returns the given Charset or the default Charset if the given Charset is null.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Charsets.html#toCharset-java.lang.String-">toCharset</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charset)</code> +<div class="block">Returns a Charset for the named charset.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="ISO_8859_1"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>ISO_8859_1</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> ISO_8859_1</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#ISO_8859_1" title="class or interface in java.nio.charset"><code>StandardCharsets.ISO_8859_1</code></a> instead.</span></div> +<div class="block">CharEncodingISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1. + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="US_ASCII"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>US_ASCII</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> US_ASCII</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#US_ASCII" title="class or interface in java.nio.charset"><code>StandardCharsets.US_ASCII</code></a> instead.</span></div> +<div class="block">Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set. + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="UTF_16"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>UTF_16</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> UTF_16</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16</code></a> instead.</span></div> +<div class="block">Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark + (either order accepted on input, big-endian used on output) + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="UTF_16BE"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>UTF_16BE</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> UTF_16BE</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16BE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16BE</code></a> instead.</span></div> +<div class="block">Sixteen-bit Unicode Transformation Format, big-endian byte order. + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="UTF_16LE"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>UTF_16LE</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> UTF_16LE</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16LE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16LE</code></a> instead.</span></div> +<div class="block">Sixteen-bit Unicode Transformation Format, little-endian byte order. + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="UTF_8"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>UTF_8</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> UTF_8</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a> instead.</span></div> +<div class="block">Eight-bit Unicode Transformation Format. + <p> + Every implementation of the Java platform is required to support this character encoding. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Charsets--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Charsets</h4> +<pre>public Charsets()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="toCharset-java.nio.charset.Charset-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>toCharset</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> toCharset(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</pre> +<div class="block">Returns the given Charset or the default Charset if the given Charset is null.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charset</code> - A charset or null.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the given Charset or the default Charset if the given Charset is null</dd> +</dl> +</li> +</ul> +<a name="toCharset-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>toCharset</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> toCharset(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charset)</pre> +<div class="block">Returns a Charset for the named charset. If the name is null, return the default Charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charset</code> - The name of the requested charset, may be null.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a Charset for the named charset</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - If the named charset is unavailable</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Charsets.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/Charsets.html" target="_top">Frames</a></li> +<li><a href="Charsets.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/CodecPolicy.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/CodecPolicy.html new file mode 100644 index 0000000000000000000000000000000000000000..ee54ef9a56a7db14e3709ee5549c07c345a86620 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/CodecPolicy.html @@ -0,0 +1,353 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>CodecPolicy (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="CodecPolicy (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/CodecPolicy.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/CodecPolicy.html" target="_top">Frames</a></li> +<li><a href="CodecPolicy.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#enum.constant.summary">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#enum.constant.detail">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Enum CodecPolicy" class="title">Enum CodecPolicy</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">java.lang.Enum</a><<a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a>></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.CodecPolicy</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a>></dd> +</dl> +<hr> +<br> +<pre>public enum <span class="typeNameLabel">CodecPolicy</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a><<a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a>></pre> +<div class="block">Defines encoding and decoding policies.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== ENUM CONSTANT SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="enum.constant.summary"> +<!-- --> +</a> +<h3>Enum Constant Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Constant Summary table, listing enum constants, and an explanation"> +<caption><span>Enum Constants</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Enum Constant and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/CodecPolicy.html#LENIENT">LENIENT</a></span></code> +<div class="block">The lenient policy.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/CodecPolicy.html#STRICT">STRICT</a></span></code> +<div class="block">The strict policy.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static <a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/CodecPolicy.html#valueOf-java.lang.String-">valueOf</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/CodecPolicy.html#values--">values</a></span>()</code> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Enum"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#compareTo-E-" title="class or interface in java.lang">compareTo</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang">getDeclaringClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#name--" title="class or interface in java.lang">name</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#ordinal--" title="class or interface in java.lang">ordinal</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#valueOf-java.lang.Class-java.lang.String-" title="class or interface in java.lang">valueOf</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ ENUM CONSTANT DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="enum.constant.detail"> +<!-- --> +</a> +<h3>Enum Constant Detail</h3> +<a name="STRICT"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>STRICT</h4> +<pre>public static final <a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> STRICT</pre> +<div class="block">The strict policy. Data that causes a codec to fail should throw an exception.</div> +</li> +</ul> +<a name="LENIENT"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>LENIENT</h4> +<pre>public static final <a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> LENIENT</pre> +<div class="block">The lenient policy. Data that causes a codec to fail should not throw an exception.</div> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="values--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>values</h4> +<pre>public static <a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a>[] values()</pre> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +<pre> +for (CodecPolicy c : CodecPolicy.values()) + System.out.println(c); +</pre></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>an array containing the constants of this enum type, in the order they are declared</dd> +</dl> +</li> +</ul> +<a name="valueOf-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>valueOf</h4> +<pre>public static <a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> valueOf(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Returns the enum constant of this type with the specified name. +The string must match <i>exactly</i> an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - the name of the enum constant to be returned.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the enum constant with the specified name</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if this enum type has no constant with the specified name</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the argument is null</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/CodecPolicy.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/CodecPolicy.html" target="_top">Frames</a></li> +<li><a href="CodecPolicy.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#enum.constant.summary">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#enum.constant.detail">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Decoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Decoder.html new file mode 100644 index 0000000000000000000000000000000000000000..9494f3633281dae59564175fc04c021aef129646 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Decoder.html @@ -0,0 +1,252 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Decoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Decoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":6}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Decoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/Decoder.html" target="_top">Frames</a></li> +<li><a href="Decoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Interface Decoder" class="title">Interface Decoder</h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Known Subinterfaces:</dt> +<dd><a href="../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></dd> +</dl> +<dl> +<dt>All Known Implementing Classes:</dt> +<dd><a href="../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a>, <a href="../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a>, <a href="../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a>, <a href="../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a>, <a href="../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a>, <a href="../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a>, <a href="../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a>, <a href="../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a>, <a href="../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a>, <a href="../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a>, <a href="../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dd> +</dl> +<hr> +<br> +<pre>public interface <span class="typeNameLabel">Decoder</span></pre> +<div class="block">Provides the highest level of abstraction for Decoders. + <p> + This is the sister interface of <a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec"><code>Encoder</code></a>. All Decoders implement this common generic interface. + Allows a user to pass a generic Object to any Decoder implementation in the codec package. + <p> + One of the two interfaces at the center of the codec package.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source)</code> +<div class="block">Decodes an "encoded" Object and returns a "decoded" Object.</div> +</td> +</tr> +</table> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="decode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>decode</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source) + throws <a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes an "encoded" Object and returns a "decoded" Object. Note that the implementation of this interface will + try to cast the Object parameter to the specific type expected by a particular Decoder implementation. If a + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang"><code>ClassCastException</code></a> occurs this decode method will throw a DecoderException.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - the object to decode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a 'decoded" object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - a decoder exception can be thrown for any number of reasons. Some good candidates are that the + parameter passed to this method is null, a param cannot be cast to the appropriate type for a + specific encoder.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Decoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/Decoder.html" target="_top">Frames</a></li> +<li><a href="Decoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/DecoderException.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/DecoderException.html new file mode 100644 index 0000000000000000000000000000000000000000..a7cbc0b1d47c16c8a110f5c0cdec9b79cf3b0451 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/DecoderException.html @@ -0,0 +1,346 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>DecoderException (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="DecoderException (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/DecoderException.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/DecoderException.html" target="_top">Frames</a></li> +<li><a href="DecoderException.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.java.lang.Throwable">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Class DecoderException" class="title">Class DecoderException</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">java.lang.Throwable</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">java.lang.Exception</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.DecoderException</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">DecoderException</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> +<div class="block">Thrown when there is a failure condition during the decoding process. This exception is thrown when a <a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><code>Decoder</code></a> + encounters a decoding specific exception such as invalid data, or characters outside of the expected range.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../serialized-form.html#org.apache.commons.codec.DecoderException">Serialized Form</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/DecoderException.html#DecoderException--">DecoderException</a></span>()</code> +<div class="block">Constructs a new exception with <code>null</code> as its detail message.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/DecoderException.html#DecoderException-java.lang.String-">DecoderException</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> message)</code> +<div class="block">Constructs a new exception with the specified detail message.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/DecoderException.html#DecoderException-java.lang.String-java.lang.Throwable-">DecoderException</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> message, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> cause)</code> +<div class="block">Constructs a new exception with the specified detail message and cause.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/DecoderException.html#DecoderException-java.lang.Throwable-">DecoderException</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> cause)</code> +<div class="block">Constructs a new exception with the specified cause and a detail message of <code>(cause==null ? + null : cause.toString())</code> (which typically contains the class and detail message of <code>cause</code>).</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang">addSuppressed</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#fillInStackTrace--" title="class or interface in java.lang">fillInStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getCause--" title="class or interface in java.lang">getCause</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getLocalizedMessage--" title="class or interface in java.lang">getLocalizedMessage</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getMessage--" title="class or interface in java.lang">getMessage</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getStackTrace--" title="class or interface in java.lang">getStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getSuppressed--" title="class or interface in java.lang">getSuppressed</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#initCause-java.lang.Throwable-" title="class or interface in java.lang">initCause</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#printStackTrace--" title="class or interface in java.lang">printStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#printStackTrace-java.io.PrintStream-" title="class or interface in java.lang">printStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#printStackTrace-java.io.PrintWriter-" title="class or interface in java.lang">printStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#setStackTrace-java.lang.StackTraceElement:A-" title="class or interface in java.lang">setStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="DecoderException--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>DecoderException</h4> +<pre>public DecoderException()</pre> +<div class="block">Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized, and may + subsequently be initialized by a call to <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#initCause-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.initCause(java.lang.Throwable)</code></a>.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="DecoderException-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>DecoderException</h4> +<pre>public DecoderException(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> message)</pre> +<div class="block">Constructs a new exception with the specified detail message. The cause is not initialized, and may subsequently + be initialized by a call to <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#initCause-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.initCause(java.lang.Throwable)</code></a>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>message</code> - The detail message which is saved for later retrieval by the <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getMessage--" title="class or interface in java.lang"><code>Throwable.getMessage()</code></a> method.</dd> +</dl> +</li> +</ul> +<a name="DecoderException-java.lang.String-java.lang.Throwable-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>DecoderException</h4> +<pre>public DecoderException(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> message, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> cause)</pre> +<div class="block">Constructs a new exception with the specified detail message and cause. + <p> + Note that the detail message associated with <code>cause</code> is not automatically incorporated into this + exception's detail message.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>message</code> - The detail message which is saved for later retrieval by the <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getMessage--" title="class or interface in java.lang"><code>Throwable.getMessage()</code></a> method.</dd> +<dd><code>cause</code> - The cause which is saved for later retrieval by the <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getCause--" title="class or interface in java.lang"><code>Throwable.getCause()</code></a> method. A <code>null</code> + value is permitted, and indicates that the cause is nonexistent or unknown.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="DecoderException-java.lang.Throwable-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>DecoderException</h4> +<pre>public DecoderException(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> cause)</pre> +<div class="block">Constructs a new exception with the specified cause and a detail message of <code>(cause==null ? + null : cause.toString())</code> (which typically contains the class and detail message of <code>cause</code>). + This constructor is useful for exceptions that are little more than wrappers for other throwables.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>cause</code> - The cause which is saved for later retrieval by the <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getCause--" title="class or interface in java.lang"><code>Throwable.getCause()</code></a> method. A <code>null</code> + value is permitted, and indicates that the cause is nonexistent or unknown.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/DecoderException.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/DecoderException.html" target="_top">Frames</a></li> +<li><a href="DecoderException.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.java.lang.Throwable">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Encoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Encoder.html new file mode 100644 index 0000000000000000000000000000000000000000..45c201338afdc1c420b787141ce7c23b72762257 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Encoder.html @@ -0,0 +1,249 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Encoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Encoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":6}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Encoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/Encoder.html" target="_top">Frames</a></li> +<li><a href="Encoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Interface Encoder" class="title">Interface Encoder</h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Known Subinterfaces:</dt> +<dd><a href="../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<dl> +<dt>All Known Implementing Classes:</dt> +<dd><a href="../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a>, <a href="../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a>, <a href="../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a>, <a href="../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a>, <a href="../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a>, <a href="../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a>, <a href="../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a>, <a href="../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a>, <a href="../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Caverphone</a>, <a href="../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Caverphone1</a>, <a href="../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Caverphone2</a>, <a href="../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">ColognePhonetic</a>, <a href="../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">DaitchMokotoffSoundex</a>, <a href="../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a>, <a href="../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a>, <a href="../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">MatchRatingApproachEncoder</a>, <a href="../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a>, <a href="../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a>, <a href="../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a>, <a href="../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a>, <a href="../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a>, <a href="../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a>, <a href="../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a>, <a href="../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dd> +</dl> +<hr> +<br> +<pre>public interface <span class="typeNameLabel">Encoder</span></pre> +<div class="block">Provides the highest level of abstraction for Encoders. + <p> + This is the sister interface of <a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><code>Decoder</code></a>. Every implementation of Encoder provides this + common generic interface which allows a user to pass a generic Object to any Encoder implementation + in the codec package.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source)</code> +<div class="block">Encodes an "Object" and returns the encoded content as an Object.</div> +</td> +</tr> +</table> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>encode</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source) + throws <a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an "Object" and returns the encoded content as an Object. The Objects here may just be + <code>byte[]</code> or <code>String</code>s depending on the implementation used.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - An object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An "encoded" Object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - An encoder exception is thrown if the encoder experiences a failure condition during the encoding + process.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Encoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/Encoder.html" target="_top">Frames</a></li> +<li><a href="Encoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/EncoderException.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/EncoderException.html new file mode 100644 index 0000000000000000000000000000000000000000..93766e3b254c28e0a1b6cb112fe1ea3fe0f39374 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/EncoderException.html @@ -0,0 +1,349 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>EncoderException (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="EncoderException (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/EncoderException.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/EncoderException.html" target="_top">Frames</a></li> +<li><a href="EncoderException.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.java.lang.Throwable">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Class EncoderException" class="title">Class EncoderException</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">java.lang.Throwable</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">java.lang.Exception</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.EncoderException</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">EncoderException</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> +<div class="block">Thrown when there is a failure condition during the encoding process. This exception is thrown when an + <a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec"><code>Encoder</code></a> encounters a encoding specific exception such as invalid data, inability to calculate a checksum, + characters outside of the expected range.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../serialized-form.html#org.apache.commons.codec.EncoderException">Serialized Form</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/EncoderException.html#EncoderException--">EncoderException</a></span>()</code> +<div class="block">Constructs a new exception with <code>null</code> as its detail message.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/EncoderException.html#EncoderException-java.lang.String-">EncoderException</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> message)</code> +<div class="block">Constructs a new exception with the specified detail message.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/EncoderException.html#EncoderException-java.lang.String-java.lang.Throwable-">EncoderException</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> message, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> cause)</code> +<div class="block">Constructs a new exception with the specified detail message and cause.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/EncoderException.html#EncoderException-java.lang.Throwable-">EncoderException</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> cause)</code> +<div class="block">Constructs a new exception with the specified cause and a detail message of <code>(cause==null ? + null : cause.toString())</code> (which typically contains the class and detail message of <code>cause</code>).</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#addSuppressed-java.lang.Throwable-" title="class or interface in java.lang">addSuppressed</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#fillInStackTrace--" title="class or interface in java.lang">fillInStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getCause--" title="class or interface in java.lang">getCause</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getLocalizedMessage--" title="class or interface in java.lang">getLocalizedMessage</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getMessage--" title="class or interface in java.lang">getMessage</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getStackTrace--" title="class or interface in java.lang">getStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getSuppressed--" title="class or interface in java.lang">getSuppressed</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#initCause-java.lang.Throwable-" title="class or interface in java.lang">initCause</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#printStackTrace--" title="class or interface in java.lang">printStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#printStackTrace-java.io.PrintStream-" title="class or interface in java.lang">printStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#printStackTrace-java.io.PrintWriter-" title="class or interface in java.lang">printStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#setStackTrace-java.lang.StackTraceElement:A-" title="class or interface in java.lang">setStackTrace</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="EncoderException--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>EncoderException</h4> +<pre>public EncoderException()</pre> +<div class="block">Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized, and may + subsequently be initialized by a call to <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#initCause-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.initCause(java.lang.Throwable)</code></a>.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="EncoderException-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>EncoderException</h4> +<pre>public EncoderException(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> message)</pre> +<div class="block">Constructs a new exception with the specified detail message. The cause is not initialized, and may subsequently + be initialized by a call to <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#initCause-java.lang.Throwable-" title="class or interface in java.lang"><code>Throwable.initCause(java.lang.Throwable)</code></a>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>message</code> - a useful message relating to the encoder specific error.</dd> +</dl> +</li> +</ul> +<a name="EncoderException-java.lang.String-java.lang.Throwable-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>EncoderException</h4> +<pre>public EncoderException(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> message, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> cause)</pre> +<div class="block">Constructs a new exception with the specified detail message and cause. + + <p> + Note that the detail message associated with <code>cause</code> is not automatically incorporated into this + exception's detail message. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>message</code> - The detail message which is saved for later retrieval by the <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getMessage--" title="class or interface in java.lang"><code>Throwable.getMessage()</code></a> method.</dd> +<dd><code>cause</code> - The cause which is saved for later retrieval by the <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getCause--" title="class or interface in java.lang"><code>Throwable.getCause()</code></a> method. A <code>null</code> + value is permitted, and indicates that the cause is nonexistent or unknown.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="EncoderException-java.lang.Throwable-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>EncoderException</h4> +<pre>public EncoderException(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> cause)</pre> +<div class="block">Constructs a new exception with the specified cause and a detail message of <code>(cause==null ? + null : cause.toString())</code> (which typically contains the class and detail message of <code>cause</code>). + This constructor is useful for exceptions that are little more than wrappers for other throwables.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>cause</code> - The cause which is saved for later retrieval by the <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true#getCause--" title="class or interface in java.lang"><code>Throwable.getCause()</code></a> method. A <code>null</code> + value is permitted, and indicates that the cause is nonexistent or unknown.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/EncoderException.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/EncoderException.html" target="_top">Frames</a></li> +<li><a href="EncoderException.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.java.lang.Throwable">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Resources.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Resources.html new file mode 100644 index 0000000000000000000000000000000000000000..a6380c4faf758bf2207640c32026495e695a2df9 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/Resources.html @@ -0,0 +1,286 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Resources (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Resources (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Resources.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/Resources.html" target="_top">Frames</a></li> +<li><a href="Resources.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Class Resources" class="title">Class Resources</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.Resources</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Resources</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Consider this class package private. Helps load resources.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Resources.html#Resources--">Resources</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/Resources.html#getInputStream-java.lang.String-">getInputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Opens the given named resource from the given class.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Resources--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Resources</h4> +<pre>public Resources()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="getInputStream-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getInputStream</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> getInputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Opens the given named resource from the given class.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - The resource name.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An input stream.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Resources.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/Resources.html" target="_top">Frames</a></li> +<li><a href="Resources.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/StringDecoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/StringDecoder.html new file mode 100644 index 0000000000000000000000000000000000000000..f9005e8720faec51a5073aa0b8895a582ed57e2a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/StringDecoder.html @@ -0,0 +1,251 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>StringDecoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="StringDecoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":6}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/StringDecoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/StringDecoder.html" target="_top">Frames</a></li> +<li><a href="StringDecoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Interface StringDecoder" class="title">Interface StringDecoder</h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Superinterfaces:</dt> +<dd><a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></dd> +</dl> +<dl> +<dt>All Known Implementing Classes:</dt> +<dd><a href="../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a>, <a href="../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a>, <a href="../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a>, <a href="../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dd> +</dl> +<hr> +<br> +<pre>public interface <span class="typeNameLabel">StringDecoder</span> +extends <a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></pre> +<div class="block">Defines common decoding methods for String decoders.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/StringDecoder.html#decode-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> +<div class="block">Decodes a String and returns a String.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.Decoder"> +<!-- --> +</a> +<h3>Methods inherited from interface org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></h3> +<code><a href="../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="decode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>decode</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source) + throws <a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a String and returns a String.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - the String to decode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the encoded String</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - thrown if there is an error condition during the Encoding process.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/StringDecoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/StringDecoder.html" target="_top">Frames</a></li> +<li><a href="StringDecoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/StringEncoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/StringEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..e9794d8cc005fb4be51a70a4753fa09234415c02 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/StringEncoder.html @@ -0,0 +1,251 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>StringEncoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="StringEncoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":6}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/StringEncoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/StringEncoder.html" target="_top">Frames</a></li> +<li><a href="StringEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Interface StringEncoder" class="title">Interface StringEncoder</h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Superinterfaces:</dt> +<dd><a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></dd> +</dl> +<dl> +<dt>All Known Implementing Classes:</dt> +<dd><a href="../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a>, <a href="../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a>, <a href="../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a>, <a href="../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Caverphone</a>, <a href="../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Caverphone1</a>, <a href="../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Caverphone2</a>, <a href="../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">ColognePhonetic</a>, <a href="../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">DaitchMokotoffSoundex</a>, <a href="../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a>, <a href="../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">MatchRatingApproachEncoder</a>, <a href="../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a>, <a href="../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a>, <a href="../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a>, <a href="../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a>, <a href="../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a>, <a href="../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a>, <a href="../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></dd> +</dl> +<hr> +<br> +<pre>public interface <span class="typeNameLabel">StringEncoder</span> +extends <a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></pre> +<div class="block">Defines common encoding methods for String encoders.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> +<div class="block">Encodes a String and returns a String.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.Encoder"> +<!-- --> +</a> +<h3>Methods inherited from interface org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></h3> +<code><a href="../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>encode</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source) + throws <a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes a String and returns a String.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - the String to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the encoded String</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if there is an error condition during the encoding process.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/StringEncoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/StringEncoder.html" target="_top">Frames</a></li> +<li><a href="StringEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/StringEncoderComparator.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/StringEncoderComparator.html new file mode 100644 index 0000000000000000000000000000000000000000..c4fe2cb858a526bd7fc21f5ea8befea7c54bbc46 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/StringEncoderComparator.html @@ -0,0 +1,337 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>StringEncoderComparator (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="StringEncoderComparator (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/StringEncoderComparator.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/StringEncoderComparator.html" target="_top">Frames</a></li> +<li><a href="StringEncoderComparator.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec</div> +<h2 title="Class StringEncoderComparator" class="title">Class StringEncoderComparator</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.StringEncoderComparator</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">StringEncoderComparator</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a></pre> +<div class="block">Compares Strings using a <a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><code>StringEncoder</code></a>. This comparator is used to sort Strings by an encoding scheme such as + Soundex, Metaphone, etc. This class can come in handy if one need to sort Strings by an encoded form of a name such + as Soundex. + + <p>This class is immutable and thread-safe.</p></div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/StringEncoderComparator.html#StringEncoderComparator--">StringEncoderComparator</a></span>()</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Creating an instance without a <a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><code>StringEncoder</code></a> leads to a <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a>. Will be + removed in 2.0.</span></div> +</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/StringEncoderComparator.html#StringEncoderComparator-org.apache.commons.codec.StringEncoder-">StringEncoderComparator</a></span>(<a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a> stringEncoder)</code> +<div class="block">Constructs a new instance with the given algorithm.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/codec/StringEncoderComparator.html#compare-java.lang.Object-java.lang.Object-">compare</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o2)</code> +<div class="block">Compares two strings based not on the strings themselves, but on an encoding of the two strings using the + StringEncoder this Comparator was created with.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.util.Comparator"> +<!-- --> +</a> +<h3>Methods inherited from interface java.util.<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#comparing-java.util.function.Function-" title="class or interface in java.util">comparing</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#comparing-java.util.function.Function-java.util.Comparator-" title="class or interface in java.util">comparing</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#comparingDouble-java.util.function.ToDoubleFunction-" title="class or interface in java.util">comparingDouble</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#comparingInt-java.util.function.ToIntFunction-" title="class or interface in java.util">comparingInt</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#comparingLong-java.util.function.ToLongFunction-" title="class or interface in java.util">comparingLong</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.util">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#naturalOrder--" title="class or interface in java.util">naturalOrder</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#nullsFirst-java.util.Comparator-" title="class or interface in java.util">nullsFirst</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#nullsLast-java.util.Comparator-" title="class or interface in java.util">nullsLast</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#reversed--" title="class or interface in java.util">reversed</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#reverseOrder--" title="class or interface in java.util">reverseOrder</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#thenComparing-java.util.Comparator-" title="class or interface in java.util">thenComparing</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#thenComparing-java.util.function.Function-" title="class or interface in java.util">thenComparing</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#thenComparing-java.util.function.Function-java.util.Comparator-" title="class or interface in java.util">thenComparing</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#thenComparingDouble-java.util.function.ToDoubleFunction-" title="class or interface in java.util">thenComparingDouble</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#thenComparingInt-java.util.function.ToIntFunction-" title="class or interface in java.util">thenComparingInt</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#thenComparingLong-java.util.function.ToLongFunction-" title="class or interface in java.util">thenComparingLong</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="StringEncoderComparator--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>StringEncoderComparator</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public StringEncoderComparator()</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Creating an instance without a <a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><code>StringEncoder</code></a> leads to a <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a>. Will be + removed in 2.0.</span></div> +<div class="block">Constructs a new instance.</div> +</li> +</ul> +<a name="StringEncoderComparator-org.apache.commons.codec.StringEncoder-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>StringEncoderComparator</h4> +<pre>public StringEncoderComparator(<a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a> stringEncoder)</pre> +<div class="block">Constructs a new instance with the given algorithm.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>stringEncoder</code> - the StringEncoder used for comparisons.</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="compare-java.lang.Object-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>compare</h4> +<pre>public int compare(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o2)</pre> +<div class="block">Compares two strings based not on the strings themselves, but on an encoding of the two strings using the + StringEncoder this Comparator was created with. + + If an <a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec"><code>EncoderException</code></a> is encountered, return <code>0</code>.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true#compare-T-T-" title="class or interface in java.util">compare</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>o1</code> - the object to compare</dd> +<dd><code>o2</code> - the object to compare to</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the Comparable.compareTo() return code or 0 if an encoding error was caught.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang"><code>Comparable</code></a></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/StringEncoderComparator.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/StringEncoderComparator.html" target="_top">Frames</a></li> +<li><a href="StringEncoderComparator.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base16.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base16.html new file mode 100644 index 0000000000000000000000000000000000000000..2cc3c4dd974182b37af34183a9082a8ef9db762c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base16.html @@ -0,0 +1,380 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Base16 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Base16 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base16.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base16.html" target="_top">Frames</a></li> +<li><a href="Base16.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class Base16" class="title">Class Base16</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">org.apache.commons.codec.binary.BaseNCodec</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.Base16</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Base16</span> +extends <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></pre> +<div class="block">Provides Base16 encoding and decoding. + + <p> + This class is thread-safe. + </p> + <p> + This implementation strictly follows RFC 4648, and as such unlike + the <a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary"><code>Base32</code></a> and <a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary"><code>Base64</code></a> implementations, + it does not ignore invalid alphabet characters or whitespace, + neither does it offer chunking or padding characters. + </p> + <p> + The only additional feature above those specified in RFC 4648 + is support for working with a lower-case alphabet in addition + to the default upper-case alphabet. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://tools.ietf.org/html/rfc4648#section-8">RFC 4648 - 8. Base 16 Encoding</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="fields.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec"> +<!-- --> +</a> +<h3>Fields inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#DECODING_POLICY_DEFAULT">DECODING_POLICY_DEFAULT</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#lineLength">lineLength</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#MASK_8BITS">MASK_8BITS</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#MIME_CHUNK_SIZE">MIME_CHUNK_SIZE</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#pad">pad</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PAD">PAD</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PAD_DEFAULT">PAD_DEFAULT</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PEM_CHUNK_SIZE">PEM_CHUNK_SIZE</a></code></li> +</ul> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16.html#Base16--">Base16</a></span>()</code> +<div class="block">Creates a Base16 codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16.html#Base16-boolean-">Base16</a></span>(boolean lowerCase)</code> +<div class="block">Creates a Base16 codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16.html#Base16-boolean-org.apache.commons.codec.CodecPolicy-">Base16</a></span>(boolean lowerCase, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base16 codec used for decoding and encoding.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16.html#isInAlphabet-byte-">isInAlphabet</a></span>(byte octet)</code> +<div class="block">Returns whether or not the <code>octet</code> is in the Base16 alphabet.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#containsAlphabetOrPad-byte:A-">containsAlphabetOrPad</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-byte:A-">decode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-java.lang.Object-">decode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-java.lang.String-">decode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-byte:A-">encode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-byte:A-int-int-">encode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-java.lang.Object-">encode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodeAsString-byte:A-">encodeAsString</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodeToString-byte:A-">encodeToString</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#ensureBufferSize-int-org.apache.commons.codec.binary.BaseNCodec.Context-">ensureBufferSize</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getChunkSeparator--">getChunkSeparator</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getCodecPolicy--">getCodecPolicy</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getDefaultBufferSize--">getDefaultBufferSize</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getEncodedLength-byte:A-">getEncodedLength</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-byte:A-boolean-">isInAlphabet</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-java.lang.String-">isInAlphabet</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isStrictDecoding--">isStrictDecoding</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isWhiteSpace-byte-">isWhiteSpace</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Base16--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base16</h4> +<pre>public Base16()</pre> +<div class="block">Creates a Base16 codec used for decoding and encoding.</div> +</li> +</ul> +<a name="Base16-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base16</h4> +<pre>public Base16(boolean lowerCase)</pre> +<div class="block">Creates a Base16 codec used for decoding and encoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lowerCase</code> - if <code>true</code> then use a lower-case Base16 alphabet.</dd> +</dl> +</li> +</ul> +<a name="Base16-boolean-org.apache.commons.codec.CodecPolicy-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Base16</h4> +<pre>public Base16(boolean lowerCase, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</pre> +<div class="block">Creates a Base16 codec used for decoding and encoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lowerCase</code> - if <code>true</code> then use a lower-case Base16 alphabet.</dd> +<dd><code>decodingPolicy</code> - Decoding policy.</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="isInAlphabet-byte-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>isInAlphabet</h4> +<pre>public boolean isInAlphabet(byte octet)</pre> +<div class="block">Returns whether or not the <code>octet</code> is in the Base16 alphabet.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-byte-">isInAlphabet</a></code> in class <code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>octet</code> - The value to test.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the value is defined in the the Base16 alphabet <code>false</code> otherwise.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base16.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base16.html" target="_top">Frames</a></li> +<li><a href="Base16.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base16InputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base16InputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..488eb966b0675e1d8fee69196197621b3f28aa5e --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base16InputStream.html @@ -0,0 +1,383 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Base16InputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Base16InputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base16InputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base16InputStream.html" target="_top">Frames</a></li> +<li><a href="Base16InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterInputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecInputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class Base16InputStream" class="title">Class Base16InputStream</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">java.io.InputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterInputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">org.apache.commons.codec.binary.BaseNCodecInputStream</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.Base16InputStream</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Base16InputStream</span> +extends <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></pre> +<div class="block">Provides Base16 encoding and decoding in a streaming fashion (unlimited size). + <p> + The default behavior of the Base16InputStream is to DECODE, whereas the default behavior of the + <a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary"><code>Base16OutputStream</code></a> is to ENCODE, but this behavior can be overridden by using a different constructor. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="fields.inherited.from.class.java.io.FilterInputStream"> +<!-- --> +</a> +<h3>Fields inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#in" title="class or interface in java.io">in</a></code></li> +</ul> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html#Base16InputStream-java.io.InputStream-">Base16InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in)</code> +<div class="block">Creates a Base16InputStream such that all data read is Base16-decoded from the original provided InputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html#Base16InputStream-java.io.InputStream-boolean-">Base16InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode)</code> +<div class="block">Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + provided InputStream.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html#Base16InputStream-java.io.InputStream-boolean-boolean-">Base16InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode, + boolean lowerCase)</code> +<div class="block">Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + provided InputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html#Base16InputStream-java.io.InputStream-boolean-boolean-org.apache.commons.codec.CodecPolicy-">Base16InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode, + boolean lowerCase, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + provided InputStream.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecInputStream"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#available--">available</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#isStrictDecoding--">isStrictDecoding</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#mark-int-">mark</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#markSupported--">markSupported</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#read--">read</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#read-byte:A-int-int-">read</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#reset--">reset</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#skip-long-">skip</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.io.FilterInputStream"> +<!-- --> +</a> +<h3>Methods inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#close--" title="class or interface in java.io">close</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#read-byte:A-" title="class or interface in java.io">read</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Base16InputStream-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base16InputStream</h4> +<pre>public Base16InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in)</pre> +<div class="block">Creates a Base16InputStream such that all data read is Base16-decoded from the original provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>in</code> - InputStream to wrap.</dd> +</dl> +</li> +</ul> +<a name="Base16InputStream-java.io.InputStream-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base16InputStream</h4> +<pre>public Base16InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode)</pre> +<div class="block">Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>in</code> - InputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data read from us, false if we should decode.</dd> +</dl> +</li> +</ul> +<a name="Base16InputStream-java.io.InputStream-boolean-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base16InputStream</h4> +<pre>public Base16InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode, + boolean lowerCase)</pre> +<div class="block">Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>in</code> - InputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data read from us, false if we should decode.</dd> +<dd><code>lowerCase</code> - if <code>true</code> then use a lower-case Base16 alphabet.</dd> +</dl> +</li> +</ul> +<a name="Base16InputStream-java.io.InputStream-boolean-boolean-org.apache.commons.codec.CodecPolicy-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Base16InputStream</h4> +<pre>public Base16InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode, + boolean lowerCase, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</pre> +<div class="block">Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>in</code> - InputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data read from us, false if we should decode.</dd> +<dd><code>lowerCase</code> - if <code>true</code> then use a lower-case Base16 alphabet.</dd> +<dd><code>decodingPolicy</code> - Decoding policy.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base16InputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base16InputStream.html" target="_top">Frames</a></li> +<li><a href="Base16InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterInputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecInputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base16OutputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base16OutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..c956b67ef2cd086366f2550bc213845996efcaca --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base16OutputStream.html @@ -0,0 +1,383 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Base16OutputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Base16OutputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base16OutputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base16OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base16OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterOutputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecOutputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class Base16OutputStream" class="title">Class Base16OutputStream</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">java.io.OutputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterOutputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">org.apache.commons.codec.binary.BaseNCodecOutputStream</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.Base16OutputStream</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Base16OutputStream</span> +extends <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></pre> +<div class="block">Provides Hex encoding and decoding in a streaming fashion (unlimited size). + <p> + The default behavior of the HexOutputStream is to ENCODE, whereas the default behavior of the + <a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary"><code>Base16InputStream</code></a> is to DECODE. But this behavior can be overridden by using a different constructor. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="fields.inherited.from.class.java.io.FilterOutputStream"> +<!-- --> +</a> +<h3>Fields inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#out" title="class or interface in java.io">out</a></code></li> +</ul> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html#Base16OutputStream-java.io.OutputStream-">Base16OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out)</code> +<div class="block">Creates a Base16OutputStream such that all data written is Hex-encoded to the original provided OutputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html#Base16OutputStream-java.io.OutputStream-boolean-">Base16OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode)</code> +<div class="block">Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + original provided OutputStream.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html#Base16OutputStream-java.io.OutputStream-boolean-boolean-">Base16OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode, + boolean lowerCase)</code> +<div class="block">Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + original provided OutputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html#Base16OutputStream-java.io.OutputStream-boolean-boolean-org.apache.commons.codec.CodecPolicy-">Base16OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode, + boolean lowerCase, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + original provided OutputStream.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecOutputStream"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#close--">close</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#eof--">eof</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#flush--">flush</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#isStrictDecoding--">isStrictDecoding</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#write-byte:A-int-int-">write</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#write-int-">write</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.io.FilterOutputStream"> +<!-- --> +</a> +<h3>Methods inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#write-byte:A-" title="class or interface in java.io">write</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Base16OutputStream-java.io.OutputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base16OutputStream</h4> +<pre>public Base16OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out)</pre> +<div class="block">Creates a Base16OutputStream such that all data written is Hex-encoded to the original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>out</code> - OutputStream to wrap.</dd> +</dl> +</li> +</ul> +<a name="Base16OutputStream-java.io.OutputStream-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base16OutputStream</h4> +<pre>public Base16OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode)</pre> +<div class="block">Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>out</code> - OutputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data written to us, false if we should decode.</dd> +</dl> +</li> +</ul> +<a name="Base16OutputStream-java.io.OutputStream-boolean-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base16OutputStream</h4> +<pre>public Base16OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode, + boolean lowerCase)</pre> +<div class="block">Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>out</code> - OutputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data written to us, false if we should decode.</dd> +<dd><code>lowerCase</code> - if <code>true</code> then use a lower-case Base16 alphabet.</dd> +</dl> +</li> +</ul> +<a name="Base16OutputStream-java.io.OutputStream-boolean-boolean-org.apache.commons.codec.CodecPolicy-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Base16OutputStream</h4> +<pre>public Base16OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode, + boolean lowerCase, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</pre> +<div class="block">Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>out</code> - OutputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data written to us, false if we should decode.</dd> +<dd><code>lowerCase</code> - if <code>true</code> then use a lower-case Base16 alphabet.</dd> +<dd><code>decodingPolicy</code> - Decoding policy.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base16OutputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base16OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base16OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterOutputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecOutputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base32.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base32.html new file mode 100644 index 0000000000000000000000000000000000000000..9c6a94fd89a1f915184b00f4c5f55c738c920d49 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base32.html @@ -0,0 +1,587 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Base32 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Base32 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base32.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base32.html" target="_top">Frames</a></li> +<li><a href="Base32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class Base32" class="title">Class Base32</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">org.apache.commons.codec.binary.BaseNCodec</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.Base32</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Base32</span> +extends <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></pre> +<div class="block">Provides Base32 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>. + + <p> + The class can be parameterized in the following manner with various constructors: + </p> + <ul> + <li>Whether to use the "base32hex" variant instead of the default "base32"</li> + <li>Line length: Default 76. Line length that aren't multiples of 8 will still essentially end up being multiples of + 8 in the encoded data. + <li>Line separator: Default is CRLF ("\r\n")</li> + </ul> + <p> + This class operates directly on byte streams, and not character streams. + </p> + <p> + This class is thread-safe. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="fields.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec"> +<!-- --> +</a> +<h3>Fields inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#DECODING_POLICY_DEFAULT">DECODING_POLICY_DEFAULT</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#lineLength">lineLength</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#MASK_8BITS">MASK_8BITS</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#MIME_CHUNK_SIZE">MIME_CHUNK_SIZE</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#pad">pad</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PAD">PAD</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PAD_DEFAULT">PAD_DEFAULT</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PEM_CHUNK_SIZE">PEM_CHUNK_SIZE</a></code></li> +</ul> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html#Base32--">Base32</a></span>()</code> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html#Base32-boolean-">Base32</a></span>(boolean useHex)</code> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html#Base32-boolean-byte-">Base32</a></span>(boolean useHex, + byte padding)</code> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html#Base32-byte-">Base32</a></span>(byte pad)</code> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html#Base32-int-">Base32</a></span>(int lineLength)</code> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html#Base32-int-byte:A-">Base32</a></span>(int lineLength, + byte[] lineSeparator)</code> +<div class="block">Creates a Base32 codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html#Base32-int-byte:A-boolean-">Base32</a></span>(int lineLength, + byte[] lineSeparator, + boolean useHex)</code> +<div class="block">Creates a Base32 / Base32 Hex codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html#Base32-int-byte:A-boolean-byte-">Base32</a></span>(int lineLength, + byte[] lineSeparator, + boolean useHex, + byte padding)</code> +<div class="block">Creates a Base32 / Base32 Hex codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html#Base32-int-byte:A-boolean-byte-org.apache.commons.codec.CodecPolicy-">Base32</a></span>(int lineLength, + byte[] lineSeparator, + boolean useHex, + byte padding, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base32 / Base32 Hex codec used for decoding and encoding.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html#isInAlphabet-byte-">isInAlphabet</a></span>(byte octet)</code> +<div class="block">Returns whether or not the <code>octet</code> is in the Base32 alphabet.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#containsAlphabetOrPad-byte:A-">containsAlphabetOrPad</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-byte:A-">decode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-java.lang.Object-">decode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-java.lang.String-">decode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-byte:A-">encode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-byte:A-int-int-">encode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-java.lang.Object-">encode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodeAsString-byte:A-">encodeAsString</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodeToString-byte:A-">encodeToString</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#ensureBufferSize-int-org.apache.commons.codec.binary.BaseNCodec.Context-">ensureBufferSize</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getChunkSeparator--">getChunkSeparator</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getCodecPolicy--">getCodecPolicy</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getDefaultBufferSize--">getDefaultBufferSize</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getEncodedLength-byte:A-">getEncodedLength</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-byte:A-boolean-">isInAlphabet</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-java.lang.String-">isInAlphabet</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isStrictDecoding--">isStrictDecoding</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isWhiteSpace-byte-">isWhiteSpace</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Base32--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32</h4> +<pre>public Base32()</pre> +<div class="block">Creates a Base32 codec used for decoding and encoding. + <p> + When encoding the line length is 0 (no chunking). + </p></div> +</li> +</ul> +<a name="Base32-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32</h4> +<pre>public Base32(boolean useHex)</pre> +<div class="block">Creates a Base32 codec used for decoding and encoding. + <p> + When encoding the line length is 0 (no chunking). + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>useHex</code> - if <code>true</code> then use Base32 Hex alphabet</dd> +</dl> +</li> +</ul> +<a name="Base32-boolean-byte-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32</h4> +<pre>public Base32(boolean useHex, + byte padding)</pre> +<div class="block">Creates a Base32 codec used for decoding and encoding. + <p> + When encoding the line length is 0 (no chunking). + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>useHex</code> - if <code>true</code> then use Base32 Hex alphabet</dd> +<dd><code>padding</code> - byte used as padding byte.</dd> +</dl> +</li> +</ul> +<a name="Base32-byte-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32</h4> +<pre>public Base32(byte pad)</pre> +<div class="block">Creates a Base32 codec used for decoding and encoding. + <p> + When encoding the line length is 0 (no chunking). + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pad</code> - byte used as padding byte.</dd> +</dl> +</li> +</ul> +<a name="Base32-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32</h4> +<pre>public Base32(int lineLength)</pre> +<div class="block">Creates a Base32 codec used for decoding and encoding. + <p> + When encoding the line length is given in the constructor, the line separator is CRLF. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lineLength</code> - Each line of encoded data will be at most of the given length (rounded down to nearest multiple of + 8). If lineLength <= 0, then the output will not be divided into lines (chunks). Ignored when + decoding.</dd> +</dl> +</li> +</ul> +<a name="Base32-int-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32</h4> +<pre>public Base32(int lineLength, + byte[] lineSeparator)</pre> +<div class="block">Creates a Base32 codec used for decoding and encoding. + <p> + When encoding the line length and line separator are given in the constructor. + </p> + <p> + Line lengths that aren't multiples of 8 will still essentially end up being multiples of 8 in the encoded data. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lineLength</code> - Each line of encoded data will be at most of the given length (rounded down to nearest multiple of + 8). If lineLength <= 0, then the output will not be divided into lines (chunks). Ignored when + decoding.</dd> +<dd><code>lineSeparator</code> - Each line of encoded data will end with this sequence of bytes.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown when the <code>lineSeparator</code> contains Base32 characters.</dd> +</dl> +</li> +</ul> +<a name="Base32-int-byte:A-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32</h4> +<pre>public Base32(int lineLength, + byte[] lineSeparator, + boolean useHex)</pre> +<div class="block">Creates a Base32 / Base32 Hex codec used for decoding and encoding. + <p> + When encoding the line length and line separator are given in the constructor. + </p> + <p> + Line lengths that aren't multiples of 8 will still essentially end up being multiples of 8 in the encoded data. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lineLength</code> - Each line of encoded data will be at most of the given length (rounded down to nearest multiple of + 8). If lineLength <= 0, then the output will not be divided into lines (chunks). Ignored when + decoding.</dd> +<dd><code>lineSeparator</code> - Each line of encoded data will end with this sequence of bytes.</dd> +<dd><code>useHex</code> - if <code>true</code>, then use Base32 Hex alphabet, otherwise use Base32 alphabet</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown when the <code>lineSeparator</code> contains Base32 characters. Or the + lineLength > 0 and lineSeparator is null.</dd> +</dl> +</li> +</ul> +<a name="Base32-int-byte:A-boolean-byte-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32</h4> +<pre>public Base32(int lineLength, + byte[] lineSeparator, + boolean useHex, + byte padding)</pre> +<div class="block">Creates a Base32 / Base32 Hex codec used for decoding and encoding. + <p> + When encoding the line length and line separator are given in the constructor. + </p> + <p> + Line lengths that aren't multiples of 8 will still essentially end up being multiples of 8 in the encoded data. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lineLength</code> - Each line of encoded data will be at most of the given length (rounded down to nearest multiple of + 8). If lineLength <= 0, then the output will not be divided into lines (chunks). Ignored when + decoding.</dd> +<dd><code>lineSeparator</code> - Each line of encoded data will end with this sequence of bytes.</dd> +<dd><code>useHex</code> - if <code>true</code>, then use Base32 Hex alphabet, otherwise use Base32 alphabet</dd> +<dd><code>padding</code> - byte used as padding byte.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown when the <code>lineSeparator</code> contains Base32 characters. Or the + lineLength > 0 and lineSeparator is null.</dd> +</dl> +</li> +</ul> +<a name="Base32-int-byte:A-boolean-byte-org.apache.commons.codec.CodecPolicy-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Base32</h4> +<pre>public Base32(int lineLength, + byte[] lineSeparator, + boolean useHex, + byte padding, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</pre> +<div class="block">Creates a Base32 / Base32 Hex codec used for decoding and encoding. + <p> + When encoding the line length and line separator are given in the constructor. + </p> + <p> + Line lengths that aren't multiples of 8 will still essentially end up being multiples of 8 in the encoded data. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lineLength</code> - Each line of encoded data will be at most of the given length (rounded down to nearest multiple of + 8). If lineLength <= 0, then the output will not be divided into lines (chunks). Ignored when + decoding.</dd> +<dd><code>lineSeparator</code> - Each line of encoded data will end with this sequence of bytes.</dd> +<dd><code>useHex</code> - if <code>true</code>, then use Base32 Hex alphabet, otherwise use Base32 alphabet</dd> +<dd><code>padding</code> - byte used as padding byte.</dd> +<dd><code>decodingPolicy</code> - The decoding policy.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown when the <code>lineSeparator</code> contains Base32 characters. Or the + lineLength > 0 and lineSeparator is null.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="isInAlphabet-byte-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>isInAlphabet</h4> +<pre>public boolean isInAlphabet(byte octet)</pre> +<div class="block">Returns whether or not the <code>octet</code> is in the Base32 alphabet.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-byte-">isInAlphabet</a></code> in class <code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>octet</code> - The value to test</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the value is defined in the the Base32 alphabet <code>false</code> otherwise.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base32.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base32.html" target="_top">Frames</a></li> +<li><a href="Base32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base32InputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base32InputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..e3796dd5be4984ad1f57d7c4d02193d2787c4df2 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base32InputStream.html @@ -0,0 +1,421 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Base32InputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Base32InputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base32InputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base32InputStream.html" target="_top">Frames</a></li> +<li><a href="Base32InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterInputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecInputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class Base32InputStream" class="title">Class Base32InputStream</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">java.io.InputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterInputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">org.apache.commons.codec.binary.BaseNCodecInputStream</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.Base32InputStream</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Base32InputStream</span> +extends <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></pre> +<div class="block">Provides Base32 encoding and decoding in a streaming fashion (unlimited size). When encoding the default lineLength + is 76 characters and the default lineEnding is CRLF, but these can be overridden by using the appropriate + constructor. + <p> + The default behavior of the Base32InputStream is to DECODE, whereas the default behavior of the Base32OutputStream + is to ENCODE, but this behavior can be overridden by using a different constructor. + </p> + <p> + Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode + character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc). + </p> + <p> + You can set the decoding behavior when the input bytes contain leftover trailing bits that cannot be created by a valid + encoding. These can be bits that are unused from the final character or entire characters. The default mode is + lenient decoding. + </p> + <ul> + <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible. The remainder are discarded. + <li>Strict: The decoding will raise an <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if trailing bits are not part of a valid + encoding. Any unused bits from the final character must be zero. Impossible counts of entire final characters are not + allowed. + </ul> + <p> + When strict decoding is enabled it is expected that the decoded bytes will be re-encoded to a byte array that matches + the original, i.e. no changes occur on the final character. This requires that the input bytes use the same padding + and alphabet as the encoder. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="fields.inherited.from.class.java.io.FilterInputStream"> +<!-- --> +</a> +<h3>Fields inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#in" title="class or interface in java.io">in</a></code></li> +</ul> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html#Base32InputStream-java.io.InputStream-">Base32InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in)</code> +<div class="block">Creates a Base32InputStream such that all data read is Base32-decoded from the original provided InputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html#Base32InputStream-java.io.InputStream-boolean-">Base32InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode)</code> +<div class="block">Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + provided InputStream.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html#Base32InputStream-java.io.InputStream-boolean-int-byte:A-">Base32InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> input, + boolean doEncode, + int lineLength, + byte[] lineSeparator)</code> +<div class="block">Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + provided InputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html#Base32InputStream-java.io.InputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base32InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> input, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + provided InputStream.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecInputStream"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#available--">available</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#isStrictDecoding--">isStrictDecoding</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#mark-int-">mark</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#markSupported--">markSupported</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#read--">read</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#read-byte:A-int-int-">read</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#reset--">reset</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#skip-long-">skip</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.io.FilterInputStream"> +<!-- --> +</a> +<h3>Methods inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#close--" title="class or interface in java.io">close</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#read-byte:A-" title="class or interface in java.io">read</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Base32InputStream-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32InputStream</h4> +<pre>public Base32InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in)</pre> +<div class="block">Creates a Base32InputStream such that all data read is Base32-decoded from the original provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>in</code> - InputStream to wrap.</dd> +</dl> +</li> +</ul> +<a name="Base32InputStream-java.io.InputStream-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32InputStream</h4> +<pre>public Base32InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode)</pre> +<div class="block">Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>in</code> - InputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data read from us, false if we should decode.</dd> +</dl> +</li> +</ul> +<a name="Base32InputStream-java.io.InputStream-boolean-int-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32InputStream</h4> +<pre>public Base32InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> input, + boolean doEncode, + int lineLength, + byte[] lineSeparator)</pre> +<div class="block">Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>input</code> - InputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data read from us, false if we should decode.</dd> +<dd><code>lineLength</code> - If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to + nearest multiple of 4). If lineLength <= 0, the encoded data is not divided into lines. If doEncode + is false, lineLength is ignored.</dd> +<dd><code>lineSeparator</code> - If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n). + If lineLength <= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.</dd> +</dl> +</li> +</ul> +<a name="Base32InputStream-java.io.InputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Base32InputStream</h4> +<pre>public Base32InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> input, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</pre> +<div class="block">Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>input</code> - InputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data read from us, false if we should decode.</dd> +<dd><code>lineLength</code> - If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to + nearest multiple of 4). If lineLength <= 0, the encoded data is not divided into lines. If doEncode + is false, lineLength is ignored.</dd> +<dd><code>lineSeparator</code> - If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n). + If lineLength <= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.</dd> +<dd><code>decodingPolicy</code> - The decoding policy.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base32InputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base32InputStream.html" target="_top">Frames</a></li> +<li><a href="Base32InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterInputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecInputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base32OutputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base32OutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..91e5c9b87835c1b3c01e07caee28a6f4db3f9527 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base32OutputStream.html @@ -0,0 +1,425 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Base32OutputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Base32OutputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base32OutputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base32OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base32OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterOutputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecOutputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class Base32OutputStream" class="title">Class Base32OutputStream</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">java.io.OutputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterOutputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">org.apache.commons.codec.binary.BaseNCodecOutputStream</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.Base32OutputStream</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Base32OutputStream</span> +extends <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></pre> +<div class="block">Provides Base32 encoding and decoding in a streaming fashion (unlimited size). When encoding the default lineLength + is 76 characters and the default lineEnding is CRLF, but these can be overridden by using the appropriate + constructor. + <p> + The default behavior of the Base32OutputStream is to ENCODE, whereas the default behavior of the Base32InputStream + is to DECODE. But this behavior can be overridden by using a different constructor. + </p> + <p> + Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode + character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc). + </p> + <p> + <b>Note:</b> It is mandatory to close the stream after the last byte has been written to it, otherwise the + final padding will be omitted and the resulting data will be incomplete/inconsistent. + </p> + <p> + You can set the decoding behavior when the input bytes contain leftover trailing bits that cannot be created by a valid + encoding. These can be bits that are unused from the final character or entire characters. The default mode is + lenient decoding. + </p> + <ul> + <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible. The remainder are discarded. + <li>Strict: The decoding will raise an <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if trailing bits are not part of a valid + encoding. Any unused bits from the final character must be zero. Impossible counts of entire final characters are not + allowed. + </ul> + <p> + When strict decoding is enabled it is expected that the decoded bytes will be re-encoded to a byte array that matches + the original, i.e. no changes occur on the final character. This requires that the input bytes use the same padding + and alphabet as the encoder. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="fields.inherited.from.class.java.io.FilterOutputStream"> +<!-- --> +</a> +<h3>Fields inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#out" title="class or interface in java.io">out</a></code></li> +</ul> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html#Base32OutputStream-java.io.OutputStream-">Base32OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out)</code> +<div class="block">Creates a Base32OutputStream such that all data written is Base32-encoded to the original provided OutputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html#Base32OutputStream-java.io.OutputStream-boolean-">Base32OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode)</code> +<div class="block">Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + original provided OutputStream.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html#Base32OutputStream-java.io.OutputStream-boolean-int-byte:A-">Base32OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> ouput, + boolean doEncode, + int lineLength, + byte[] lineSeparator)</code> +<div class="block">Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + original provided OutputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html#Base32OutputStream-java.io.OutputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base32OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> ouput, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + original provided OutputStream.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecOutputStream"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#close--">close</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#eof--">eof</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#flush--">flush</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#isStrictDecoding--">isStrictDecoding</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#write-byte:A-int-int-">write</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#write-int-">write</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.io.FilterOutputStream"> +<!-- --> +</a> +<h3>Methods inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#write-byte:A-" title="class or interface in java.io">write</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Base32OutputStream-java.io.OutputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32OutputStream</h4> +<pre>public Base32OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out)</pre> +<div class="block">Creates a Base32OutputStream such that all data written is Base32-encoded to the original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>out</code> - OutputStream to wrap.</dd> +</dl> +</li> +</ul> +<a name="Base32OutputStream-java.io.OutputStream-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32OutputStream</h4> +<pre>public Base32OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode)</pre> +<div class="block">Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>out</code> - OutputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data written to us, false if we should decode.</dd> +</dl> +</li> +</ul> +<a name="Base32OutputStream-java.io.OutputStream-boolean-int-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base32OutputStream</h4> +<pre>public Base32OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> ouput, + boolean doEncode, + int lineLength, + byte[] lineSeparator)</pre> +<div class="block">Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>ouput</code> - OutputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data written to us, false if we should decode.</dd> +<dd><code>lineLength</code> - If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to + nearest multiple of 4). If lineLength <= 0, the encoded data is not divided into lines. If doEncode + is false, lineLength is ignored.</dd> +<dd><code>lineSeparator</code> - If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n). + If lineLength <= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.</dd> +</dl> +</li> +</ul> +<a name="Base32OutputStream-java.io.OutputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Base32OutputStream</h4> +<pre>public Base32OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> ouput, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</pre> +<div class="block">Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>ouput</code> - OutputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data written to us, false if we should decode.</dd> +<dd><code>lineLength</code> - If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to + nearest multiple of 4). If lineLength <= 0, the encoded data is not divided into lines. If doEncode + is false, lineLength is ignored.</dd> +<dd><code>lineSeparator</code> - If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n). + If lineLength <= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.</dd> +<dd><code>decodingPolicy</code> - The decoding policy.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base32OutputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base32OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base32OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterOutputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecOutputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base64.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base64.html new file mode 100644 index 0000000000000000000000000000000000000000..8f72dbc9a4da4231096356efe90ac83642b66f8b --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base64.html @@ -0,0 +1,992 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Base64 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Base64 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":41,"i13":9,"i14":9,"i15":9,"i16":10,"i17":10}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base64.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base64.html" target="_top">Frames</a></li> +<li><a href="Base64.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class Base64" class="title">Class Base64</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">org.apache.commons.codec.binary.BaseNCodec</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.Base64</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Base64</span> +extends <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></pre> +<div class="block">Provides Base64 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>. + + <p> + This class implements section <cite>6.8. Base64 Content-Transfer-Encoding</cite> from RFC 2045 <cite>Multipurpose + Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</cite> by Freed and Borenstein. + </p> + <p> + The class can be parameterized in the following manner with various constructors: + </p> + <ul> + <li>URL-safe mode: Default off.</li> + <li>Line length: Default 76. Line length that aren't multiples of 4 will still essentially end up being multiples of + 4 in the encoded data. + <li>Line separator: Default is CRLF ("\r\n")</li> + </ul> + <p> + The URL-safe parameter is only applied to encode operations. Decoding seamlessly handles both modes. + </p> + <p> + Since this class operates directly on byte streams, and not character streams, it is hard-coded to only + encode/decode character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, + UTF-8, etc). + </p> + <p> + This class is thread-safe. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.0</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="fields.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec"> +<!-- --> +</a> +<h3>Fields inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#DECODING_POLICY_DEFAULT">DECODING_POLICY_DEFAULT</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#lineLength">lineLength</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#MASK_8BITS">MASK_8BITS</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#MIME_CHUNK_SIZE">MIME_CHUNK_SIZE</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#pad">pad</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PAD">PAD</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PAD_DEFAULT">PAD_DEFAULT</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PEM_CHUNK_SIZE">PEM_CHUNK_SIZE</a></code></li> +</ul> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#Base64--">Base64</a></span>()</code> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#Base64-boolean-">Base64</a></span>(boolean urlSafe)</code> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in the given URL-safe mode.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#Base64-int-">Base64</a></span>(int lineLength)</code> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#Base64-int-byte:A-">Base64</a></span>(int lineLength, + byte[] lineSeparator)</code> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#Base64-int-byte:A-boolean-">Base64</a></span>(int lineLength, + byte[] lineSeparator, + boolean urlSafe)</code> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#Base64-int-byte:A-boolean-org.apache.commons.codec.CodecPolicy-">Base64</a></span>(int lineLength, + byte[] lineSeparator, + boolean urlSafe, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#decodeBase64-byte:A-">decodeBase64</a></span>(byte[] base64Data)</code> +<div class="block">Decodes Base64 data into octets.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#decodeBase64-java.lang.String-">decodeBase64</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> base64String)</code> +<div class="block">Decodes a Base64 String into octets.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#decodeInteger-byte:A-">decodeInteger</a></span>(byte[] pArray)</code> +<div class="block">Decodes a byte64-encoded integer according to crypto standards such as W3C's XML-Signature.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#encodeBase64-byte:A-">encodeBase64</a></span>(byte[] binaryData)</code> +<div class="block">Encodes binary data using the base64 algorithm but does not chunk the output.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#encodeBase64-byte:A-boolean-">encodeBase64</a></span>(byte[] binaryData, + boolean isChunked)</code> +<div class="block">Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#encodeBase64-byte:A-boolean-boolean-">encodeBase64</a></span>(byte[] binaryData, + boolean isChunked, + boolean urlSafe)</code> +<div class="block">Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#encodeBase64-byte:A-boolean-boolean-int-">encodeBase64</a></span>(byte[] binaryData, + boolean isChunked, + boolean urlSafe, + int maxResultSize)</code> +<div class="block">Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#encodeBase64Chunked-byte:A-">encodeBase64Chunked</a></span>(byte[] binaryData)</code> +<div class="block">Encodes binary data using the base64 algorithm and chunks the encoded output into 76 character blocks</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#encodeBase64String-byte:A-">encodeBase64String</a></span>(byte[] binaryData)</code> +<div class="block">Encodes binary data using the base64 algorithm but does not chunk the output.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#encodeBase64URLSafe-byte:A-">encodeBase64URLSafe</a></span>(byte[] binaryData)</code> +<div class="block">Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#encodeBase64URLSafeString-byte:A-">encodeBase64URLSafeString</a></span>(byte[] binaryData)</code> +<div class="block">Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#encodeInteger-java.math.BigInteger-">encodeInteger</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bigInteger)</code> +<div class="block">Encodes to a byte64-encoded integer according to crypto standards such as W3C's XML-Signature.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code>static boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#isArrayByteBase64-byte:A-">isArrayByteBase64</a></span>(byte[] arrayOctet)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">1.5 Use <a href="../../../../../org/apache/commons/codec/binary/Base64.html#isBase64-byte:A-"><code>isBase64(byte[])</code></a>, will be removed in 2.0.</span></div> +</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code>static boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#isBase64-byte-">isBase64</a></span>(byte octet)</code> +<div class="block">Returns whether or not the <code>octet</code> is in the base 64 alphabet.</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code>static boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#isBase64-byte:A-">isBase64</a></span>(byte[] arrayOctet)</code> +<div class="block">Tests a given byte array to see if it contains only valid characters within the Base64 alphabet.</div> +</td> +</tr> +<tr id="i15" class="rowColor"> +<td class="colFirst"><code>static boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#isBase64-java.lang.String-">isBase64</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> base64)</code> +<div class="block">Tests a given String to see if it contains only valid characters within the Base64 alphabet.</div> +</td> +</tr> +<tr id="i16" class="altColor"> +<td class="colFirst"><code>protected boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#isInAlphabet-byte-">isInAlphabet</a></span>(byte octet)</code> +<div class="block">Returns whether or not the <code>octet</code> is in the Base64 alphabet.</div> +</td> +</tr> +<tr id="i17" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#isUrlSafe--">isUrlSafe</a></span>()</code> +<div class="block">Returns our current encode mode.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#containsAlphabetOrPad-byte:A-">containsAlphabetOrPad</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-byte:A-">decode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-java.lang.Object-">decode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-java.lang.String-">decode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-byte:A-">encode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-byte:A-int-int-">encode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-java.lang.Object-">encode</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodeAsString-byte:A-">encodeAsString</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodeToString-byte:A-">encodeToString</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#ensureBufferSize-int-org.apache.commons.codec.binary.BaseNCodec.Context-">ensureBufferSize</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getChunkSeparator--">getChunkSeparator</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getCodecPolicy--">getCodecPolicy</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getDefaultBufferSize--">getDefaultBufferSize</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getEncodedLength-byte:A-">getEncodedLength</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-byte:A-boolean-">isInAlphabet</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-java.lang.String-">isInAlphabet</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isStrictDecoding--">isStrictDecoding</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isWhiteSpace-byte-">isWhiteSpace</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Base64--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base64</h4> +<pre>public Base64()</pre> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. + <p> + When encoding the line length is 0 (no chunking), and the encoding table is STANDARD_ENCODE_TABLE. + </p> + + <p> + When decoding all variants are supported. + </p></div> +</li> +</ul> +<a name="Base64-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base64</h4> +<pre>public Base64(boolean urlSafe)</pre> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in the given URL-safe mode. + <p> + When encoding the line length is 76, the line separator is CRLF, and the encoding table is STANDARD_ENCODE_TABLE. + </p> + + <p> + When decoding all variants are supported. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>urlSafe</code> - if <code>true</code>, URL-safe encoding is used. In most cases this should be set to + <code>false</code>.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="Base64-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base64</h4> +<pre>public Base64(int lineLength)</pre> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. + <p> + When encoding the line length is given in the constructor, the line separator is CRLF, and the encoding table is + STANDARD_ENCODE_TABLE. + </p> + <p> + Line lengths that aren't multiples of 4 will still essentially end up being multiples of 4 in the encoded data. + </p> + <p> + When decoding all variants are supported. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lineLength</code> - Each line of encoded data will be at most of the given length (rounded down to nearest multiple of + 4). If lineLength <= 0, then the output will not be divided into lines (chunks). Ignored when + decoding.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="Base64-int-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base64</h4> +<pre>public Base64(int lineLength, + byte[] lineSeparator)</pre> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. + <p> + When encoding the line length and line separator are given in the constructor, and the encoding table is + STANDARD_ENCODE_TABLE. + </p> + <p> + Line lengths that aren't multiples of 4 will still essentially end up being multiples of 4 in the encoded data. + </p> + <p> + When decoding all variants are supported. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lineLength</code> - Each line of encoded data will be at most of the given length (rounded down to nearest multiple of + 4). If lineLength <= 0, then the output will not be divided into lines (chunks). Ignored when + decoding.</dd> +<dd><code>lineSeparator</code> - Each line of encoded data will end with this sequence of bytes.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown when the provided lineSeparator included some base64 characters.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="Base64-int-byte:A-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base64</h4> +<pre>public Base64(int lineLength, + byte[] lineSeparator, + boolean urlSafe)</pre> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. + <p> + When encoding the line length and line separator are given in the constructor, and the encoding table is + STANDARD_ENCODE_TABLE. + </p> + <p> + Line lengths that aren't multiples of 4 will still essentially end up being multiples of 4 in the encoded data. + </p> + <p> + When decoding all variants are supported. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lineLength</code> - Each line of encoded data will be at most of the given length (rounded down to nearest multiple of + 4). If lineLength <= 0, then the output will not be divided into lines (chunks). Ignored when + decoding.</dd> +<dd><code>lineSeparator</code> - Each line of encoded data will end with this sequence of bytes.</dd> +<dd><code>urlSafe</code> - Instead of emitting '+' and '/' we emit '-' and '_' respectively. urlSafe is only applied to encode + operations. Decoding seamlessly handles both modes. + <b>Note: no padding is added when using the URL-safe alphabet.</b></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown when the <code>lineSeparator</code> contains Base64 characters.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="Base64-int-byte:A-boolean-org.apache.commons.codec.CodecPolicy-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Base64</h4> +<pre>public Base64(int lineLength, + byte[] lineSeparator, + boolean urlSafe, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</pre> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode. + <p> + When encoding the line length and line separator are given in the constructor, and the encoding table is + STANDARD_ENCODE_TABLE. + </p> + <p> + Line lengths that aren't multiples of 4 will still essentially end up being multiples of 4 in the encoded data. + </p> + <p> + When decoding all variants are supported. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lineLength</code> - Each line of encoded data will be at most of the given length (rounded down to nearest multiple of + 4). If lineLength <= 0, then the output will not be divided into lines (chunks). Ignored when + decoding.</dd> +<dd><code>lineSeparator</code> - Each line of encoded data will end with this sequence of bytes.</dd> +<dd><code>urlSafe</code> - Instead of emitting '+' and '/' we emit '-' and '_' respectively. urlSafe is only applied to encode + operations. Decoding seamlessly handles both modes. + <b>Note: no padding is added when using the URL-safe alphabet.</b></dd> +<dd><code>decodingPolicy</code> - The decoding policy.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown when the <code>lineSeparator</code> contains Base64 characters.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="decodeBase64-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decodeBase64</h4> +<pre>public static byte[] decodeBase64(byte[] base64Data)</pre> +<div class="block">Decodes Base64 data into octets. + <p> + <b>Note:</b> this method seamlessly handles data encoded in URL-safe or normal mode. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>base64Data</code> - Byte array containing Base64 data</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Array containing decoded data.</dd> +</dl> +</li> +</ul> +<a name="decodeBase64-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decodeBase64</h4> +<pre>public static byte[] decodeBase64(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> base64String)</pre> +<div class="block">Decodes a Base64 String into octets. + <p> + <b>Note:</b> this method seamlessly handles data encoded in URL-safe or normal mode. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>base64String</code> - String containing Base64 data</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Array containing decoded data.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="decodeInteger-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decodeInteger</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> decodeInteger(byte[] pArray)</pre> +<div class="block">Decodes a byte64-encoded integer according to crypto standards such as W3C's XML-Signature.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pArray</code> - a byte array containing base64 character data</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A BigInteger</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="encodeBase64-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeBase64</h4> +<pre>public static byte[] encodeBase64(byte[] binaryData)</pre> +<div class="block">Encodes binary data using the base64 algorithm but does not chunk the output.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>binaryData</code> - binary data to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>byte[] containing Base64 characters in their UTF-8 representation.</dd> +</dl> +</li> +</ul> +<a name="encodeBase64-byte:A-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeBase64</h4> +<pre>public static byte[] encodeBase64(byte[] binaryData, + boolean isChunked)</pre> +<div class="block">Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>binaryData</code> - Array containing binary data to encode.</dd> +<dd><code>isChunked</code> - if <code>true</code> this encoder will chunk the base64 output into 76 character blocks</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Base64-encoded data.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown when the input array needs an output array bigger than <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang"><code>Integer.MAX_VALUE</code></a></dd> +</dl> +</li> +</ul> +<a name="encodeBase64-byte:A-boolean-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeBase64</h4> +<pre>public static byte[] encodeBase64(byte[] binaryData, + boolean isChunked, + boolean urlSafe)</pre> +<div class="block">Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>binaryData</code> - Array containing binary data to encode.</dd> +<dd><code>isChunked</code> - if <code>true</code> this encoder will chunk the base64 output into 76 character blocks</dd> +<dd><code>urlSafe</code> - if <code>true</code> this encoder will emit - and _ instead of the usual + and / characters. + <b>Note: no padding is added when encoding using the URL-safe alphabet.</b></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Base64-encoded data.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown when the input array needs an output array bigger than <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang"><code>Integer.MAX_VALUE</code></a></dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="encodeBase64-byte:A-boolean-boolean-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeBase64</h4> +<pre>public static byte[] encodeBase64(byte[] binaryData, + boolean isChunked, + boolean urlSafe, + int maxResultSize)</pre> +<div class="block">Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>binaryData</code> - Array containing binary data to encode.</dd> +<dd><code>isChunked</code> - if <code>true</code> this encoder will chunk the base64 output into 76 character blocks</dd> +<dd><code>urlSafe</code> - if <code>true</code> this encoder will emit - and _ instead of the usual + and / characters. + <b>Note: no padding is added when encoding using the URL-safe alphabet.</b></dd> +<dd><code>maxResultSize</code> - The maximum result size to accept.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Base64-encoded data.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown when the input array needs an output array bigger than maxResultSize</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="encodeBase64Chunked-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeBase64Chunked</h4> +<pre>public static byte[] encodeBase64Chunked(byte[] binaryData)</pre> +<div class="block">Encodes binary data using the base64 algorithm and chunks the encoded output into 76 character blocks</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>binaryData</code> - binary data to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Base64 characters chunked in 76 character blocks</dd> +</dl> +</li> +</ul> +<a name="encodeBase64String-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeBase64String</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeBase64String(byte[] binaryData)</pre> +<div class="block">Encodes binary data using the base64 algorithm but does not chunk the output. + + NOTE: We changed the behavior of this method from multi-line chunking (commons-codec-1.4) to + single-line non-chunking (commons-codec-1.5).</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>binaryData</code> - binary data to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>String containing Base64 characters.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4 (NOTE: 1.4 chunked the output, whereas 1.5 does not).</dd> +</dl> +</li> +</ul> +<a name="encodeBase64URLSafe-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeBase64URLSafe</h4> +<pre>public static byte[] encodeBase64URLSafe(byte[] binaryData)</pre> +<div class="block">Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output. The + url-safe variation emits - and _ instead of + and / characters. + <b>Note: no padding is added.</b></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>binaryData</code> - binary data to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>byte[] containing Base64 characters in their UTF-8 representation.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="encodeBase64URLSafeString-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeBase64URLSafeString</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeBase64URLSafeString(byte[] binaryData)</pre> +<div class="block">Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output. The + url-safe variation emits - and _ instead of + and / characters. + <b>Note: no padding is added.</b></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>binaryData</code> - binary data to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>String containing Base64 characters</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="encodeInteger-java.math.BigInteger-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeInteger</h4> +<pre>public static byte[] encodeInteger(<a href="https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bigInteger)</pre> +<div class="block">Encodes to a byte64-encoded integer according to crypto standards such as W3C's XML-Signature.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bigInteger</code> - a BigInteger</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing base64 character data</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if null is passed in</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="isArrayByteBase64-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isArrayByteBase64</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static boolean isArrayByteBase64(byte[] arrayOctet)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">1.5 Use <a href="../../../../../org/apache/commons/codec/binary/Base64.html#isBase64-byte:A-"><code>isBase64(byte[])</code></a>, will be removed in 2.0.</span></div> +<div class="block">Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. Currently the + method treats whitespace as valid.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>arrayOctet</code> - byte array to test</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if all bytes are valid characters in the Base64 alphabet or if the byte array is empty; + <code>false</code>, otherwise</dd> +</dl> +</li> +</ul> +<a name="isBase64-byte-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isBase64</h4> +<pre>public static boolean isBase64(byte octet)</pre> +<div class="block">Returns whether or not the <code>octet</code> is in the base 64 alphabet.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>octet</code> - The value to test</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the value is defined in the the base 64 alphabet, <code>false</code> otherwise.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="isBase64-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isBase64</h4> +<pre>public static boolean isBase64(byte[] arrayOctet)</pre> +<div class="block">Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. Currently the + method treats whitespace as valid.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>arrayOctet</code> - byte array to test</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if all bytes are valid characters in the Base64 alphabet or if the byte array is empty; + <code>false</code>, otherwise</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5</dd> +</dl> +</li> +</ul> +<a name="isBase64-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isBase64</h4> +<pre>public static boolean isBase64(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> base64)</pre> +<div class="block">Tests a given String to see if it contains only valid characters within the Base64 alphabet. Currently the + method treats whitespace as valid.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>base64</code> - String to test</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if all characters in the String are valid characters in the Base64 alphabet or if + the String is empty; <code>false</code>, otherwise</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5</dd> +</dl> +</li> +</ul> +<a name="isInAlphabet-byte-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isInAlphabet</h4> +<pre>protected boolean isInAlphabet(byte octet)</pre> +<div class="block">Returns whether or not the <code>octet</code> is in the Base64 alphabet.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-byte-">isInAlphabet</a></code> in class <code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>octet</code> - The value to test</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the value is defined in the the Base64 alphabet <code>false</code> otherwise.</dd> +</dl> +</li> +</ul> +<a name="isUrlSafe--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>isUrlSafe</h4> +<pre>public boolean isUrlSafe()</pre> +<div class="block">Returns our current encode mode. True if we're URL-SAFE, false otherwise.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true if we're in URL-SAFE mode, false otherwise.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base64.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base64.html" target="_top">Frames</a></li> +<li><a href="Base64.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.org.apache.commons.codec.binary.BaseNCodec">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base64InputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base64InputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..8e481670fcfd8debbd71d203cb7c3a8f0f38e399 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base64InputStream.html @@ -0,0 +1,425 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Base64InputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Base64InputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base64InputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base64InputStream.html" target="_top">Frames</a></li> +<li><a href="Base64InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterInputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecInputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class Base64InputStream" class="title">Class Base64InputStream</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">java.io.InputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterInputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">org.apache.commons.codec.binary.BaseNCodecInputStream</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.Base64InputStream</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Base64InputStream</span> +extends <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></pre> +<div class="block">Provides Base64 encoding and decoding in a streaming fashion (unlimited size). When encoding the default lineLength + is 76 characters and the default lineEnding is CRLF, but these can be overridden by using the appropriate + constructor. + <p> + The default behavior of the Base64InputStream is to DECODE, whereas the default behavior of the Base64OutputStream + is to ENCODE, but this behavior can be overridden by using a different constructor. + </p> + <p> + This class implements section <cite>6.8. Base64 Content-Transfer-Encoding</cite> from RFC 2045 <cite>Multipurpose + Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</cite> by Freed and Borenstein. + </p> + <p> + Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode + character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc). + </p> + <p> + You can set the decoding behavior when the input bytes contain leftover trailing bits that cannot be created by a valid + encoding. These can be bits that are unused from the final character or entire characters. The default mode is + lenient decoding. + </p> + <ul> + <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible. The remainder are discarded. + <li>Strict: The decoding will raise an <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if trailing bits are not part of a valid + encoding. Any unused bits from the final character must be zero. Impossible counts of entire final characters are not + allowed. + </ul> + <p> + When strict decoding is enabled it is expected that the decoded bytes will be re-encoded to a byte array that matches + the original, i.e. no changes occur on the final character. This requires that the input bytes use the same padding + and alphabet as the encoder. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="fields.inherited.from.class.java.io.FilterInputStream"> +<!-- --> +</a> +<h3>Fields inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#in" title="class or interface in java.io">in</a></code></li> +</ul> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html#Base64InputStream-java.io.InputStream-">Base64InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in)</code> +<div class="block">Creates a Base64InputStream such that all data read is Base64-decoded from the original provided InputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html#Base64InputStream-java.io.InputStream-boolean-">Base64InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode)</code> +<div class="block">Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + provided InputStream.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html#Base64InputStream-java.io.InputStream-boolean-int-byte:A-">Base64InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode, + int lineLength, + byte[] lineSeparator)</code> +<div class="block">Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + provided InputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html#Base64InputStream-java.io.InputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base64InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + provided InputStream.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecInputStream"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#available--">available</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#isStrictDecoding--">isStrictDecoding</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#mark-int-">mark</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#markSupported--">markSupported</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#read--">read</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#read-byte:A-int-int-">read</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#reset--">reset</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#skip-long-">skip</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.io.FilterInputStream"> +<!-- --> +</a> +<h3>Methods inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#close--" title="class or interface in java.io">close</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#read-byte:A-" title="class or interface in java.io">read</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Base64InputStream-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base64InputStream</h4> +<pre>public Base64InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in)</pre> +<div class="block">Creates a Base64InputStream such that all data read is Base64-decoded from the original provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>in</code> - InputStream to wrap.</dd> +</dl> +</li> +</ul> +<a name="Base64InputStream-java.io.InputStream-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base64InputStream</h4> +<pre>public Base64InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode)</pre> +<div class="block">Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>in</code> - InputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data read from us, false if we should decode.</dd> +</dl> +</li> +</ul> +<a name="Base64InputStream-java.io.InputStream-boolean-int-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base64InputStream</h4> +<pre>public Base64InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode, + int lineLength, + byte[] lineSeparator)</pre> +<div class="block">Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>in</code> - InputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data read from us, false if we should decode.</dd> +<dd><code>lineLength</code> - If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to + nearest multiple of 4). If lineLength <= 0, the encoded data is not divided into lines. If doEncode + is false, lineLength is ignored.</dd> +<dd><code>lineSeparator</code> - If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n). + If lineLength <= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.</dd> +</dl> +</li> +</ul> +<a name="Base64InputStream-java.io.InputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Base64InputStream</h4> +<pre>public Base64InputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</pre> +<div class="block">Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + provided InputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>in</code> - InputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data read from us, false if we should decode.</dd> +<dd><code>lineLength</code> - If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to + nearest multiple of 4). If lineLength <= 0, the encoded data is not divided into lines. If doEncode + is false, lineLength is ignored.</dd> +<dd><code>lineSeparator</code> - If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n). + If lineLength <= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.</dd> +<dd><code>decodingPolicy</code> - The decoding policy.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base64InputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base64InputStream.html" target="_top">Frames</a></li> +<li><a href="Base64InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterInputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecInputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base64OutputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base64OutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..79f497327f987bcba955e8822110f9527ad98522 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Base64OutputStream.html @@ -0,0 +1,429 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Base64OutputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Base64OutputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base64OutputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base64OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base64OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterOutputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecOutputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class Base64OutputStream" class="title">Class Base64OutputStream</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">java.io.OutputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterOutputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">org.apache.commons.codec.binary.BaseNCodecOutputStream</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.Base64OutputStream</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Base64OutputStream</span> +extends <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></pre> +<div class="block">Provides Base64 encoding and decoding in a streaming fashion (unlimited size). When encoding the default lineLength + is 76 characters and the default lineEnding is CRLF, but these can be overridden by using the appropriate + constructor. + <p> + The default behavior of the Base64OutputStream is to ENCODE, whereas the default behavior of the Base64InputStream + is to DECODE. But this behavior can be overridden by using a different constructor. + </p> + <p> + This class implements section <cite>6.8. Base64 Content-Transfer-Encoding</cite> from RFC 2045 <cite>Multipurpose + Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</cite> by Freed and Borenstein. + </p> + <p> + Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode + character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc). + </p> + <p> + <b>Note:</b> It is mandatory to close the stream after the last byte has been written to it, otherwise the + final padding will be omitted and the resulting data will be incomplete/inconsistent. + </p> + <p> + You can set the decoding behavior when the input bytes contain leftover trailing bits that cannot be created by a valid + encoding. These can be bits that are unused from the final character or entire characters. The default mode is + lenient decoding. + </p> + <ul> + <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible. The remainder are discarded. + <li>Strict: The decoding will raise an <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if trailing bits are not part of a valid + encoding. Any unused bits from the final character must be zero. Impossible counts of entire final characters are not + allowed. + </ul> + <p> + When strict decoding is enabled it is expected that the decoded bytes will be re-encoded to a byte array that matches + the original, i.e. no changes occur on the final character. This requires that the input bytes use the same padding + and alphabet as the encoder. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="fields.inherited.from.class.java.io.FilterOutputStream"> +<!-- --> +</a> +<h3>Fields inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#out" title="class or interface in java.io">out</a></code></li> +</ul> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html#Base64OutputStream-java.io.OutputStream-">Base64OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out)</code> +<div class="block">Creates a Base64OutputStream such that all data written is Base64-encoded to the original provided OutputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html#Base64OutputStream-java.io.OutputStream-boolean-">Base64OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode)</code> +<div class="block">Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + original provided OutputStream.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html#Base64OutputStream-java.io.OutputStream-boolean-int-byte:A-">Base64OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode, + int lineLength, + byte[] lineSeparator)</code> +<div class="block">Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + original provided OutputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html#Base64OutputStream-java.io.OutputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base64OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + original provided OutputStream.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecOutputStream"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></h3> +<code><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#close--">close</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#eof--">eof</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#flush--">flush</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#isStrictDecoding--">isStrictDecoding</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#write-byte:A-int-int-">write</a>, <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#write-int-">write</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.io.FilterOutputStream"> +<!-- --> +</a> +<h3>Methods inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#write-byte:A-" title="class or interface in java.io">write</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Base64OutputStream-java.io.OutputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base64OutputStream</h4> +<pre>public Base64OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out)</pre> +<div class="block">Creates a Base64OutputStream such that all data written is Base64-encoded to the original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>out</code> - OutputStream to wrap.</dd> +</dl> +</li> +</ul> +<a name="Base64OutputStream-java.io.OutputStream-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base64OutputStream</h4> +<pre>public Base64OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode)</pre> +<div class="block">Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>out</code> - OutputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data written to us, false if we should decode.</dd> +</dl> +</li> +</ul> +<a name="Base64OutputStream-java.io.OutputStream-boolean-int-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Base64OutputStream</h4> +<pre>public Base64OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode, + int lineLength, + byte[] lineSeparator)</pre> +<div class="block">Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>out</code> - OutputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data written to us, false if we should decode.</dd> +<dd><code>lineLength</code> - If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to + nearest multiple of 4). If lineLength <= 0, the encoded data is not divided into lines. If doEncode + is false, lineLength is ignored.</dd> +<dd><code>lineSeparator</code> - If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n). + If lineLength <= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.</dd> +</dl> +</li> +</ul> +<a name="Base64OutputStream-java.io.OutputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Base64OutputStream</h4> +<pre>public Base64OutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</pre> +<div class="block">Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + original provided OutputStream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>out</code> - OutputStream to wrap.</dd> +<dd><code>doEncode</code> - true if we should encode all data written to us, false if we should decode.</dd> +<dd><code>lineLength</code> - If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to + nearest multiple of 4). If lineLength <= 0, the encoded data is not divided into lines. If doEncode + is false, lineLength is ignored.</dd> +<dd><code>lineSeparator</code> - If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n). + If lineLength <= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.</dd> +<dd><code>decodingPolicy</code> - The decoding policy.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Base64OutputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Base64OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base64OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterOutputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.binary.BaseNCodecOutputStream">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BaseNCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BaseNCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..c029a4ff6c4286e2eebd8d16833a626f21f1dbb4 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BaseNCodec.html @@ -0,0 +1,1046 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>BaseNCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="BaseNCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":9,"i11":10,"i12":10,"i13":10,"i14":6,"i15":10,"i16":10,"i17":10,"i18":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BaseNCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/BaseNCodec.html" target="_top">Frames</a></li> +<li><a href="BaseNCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class BaseNCodec" class="title">Class BaseNCodec</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.BaseNCodec</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></dd> +</dl> +<dl> +<dt>Direct Known Subclasses:</dt> +<dd><a href="../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a>, <a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a>, <a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></dd> +</dl> +<hr> +<br> +<pre>public abstract class <span class="typeNameLabel">BaseNCodec</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></pre> +<div class="block">Abstract superclass for Base-N encoders and decoders. + + <p> + This class is thread-safe. + </p> + + You can set the decoding behavior when the input bytes contain leftover trailing bits that cannot be created by a valid + encoding. These can be bits that are unused from the final character or entire characters. The default mode is + lenient decoding. + <ul> + <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible. The remainder are discarded. + <li>Strict: The decoding will raise an <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if trailing bits are not part of a valid + encoding. Any unused bits from the final character must be zero. Impossible counts of entire final characters are not + allowed. + </ul> + <p> + When strict decoding is enabled it is expected that the decoded bytes will be re-encoded to a byte array that matches + the original, i.e. no changes occur on the final character. This requires that the input bytes use the same padding + and alphabet as the encoder. + </p></div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#DECODING_POLICY_DEFAULT">DECODING_POLICY_DEFAULT</a></span></code> +<div class="block">The default decoding policy.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#lineLength">lineLength</a></span></code> +<div class="block">Chunksize for encoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#MASK_8BITS">MASK_8BITS</a></span></code> +<div class="block">Mask used to extract 8 bits, used in decoding bytes</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#MIME_CHUNK_SIZE">MIME_CHUNK_SIZE</a></span></code> +<div class="block">MIME chunk size per RFC 2045 section 6.8.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected byte</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#pad">pad</a></span></code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected byte</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PAD">PAD</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#pad"><code>pad</code></a>. Will be removed in 2.0.</span></div> +</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected static byte</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PAD_DEFAULT">PAD_DEFAULT</a></span></code> +<div class="block">Byte used to pad output.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PEM_CHUNK_SIZE">PEM_CHUNK_SIZE</a></span></code> +<div class="block">PEM chunk size per RFC 1421 section 4.3.2.4.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier</th> +<th class="colLast" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#BaseNCodec-int-int-int-int-">BaseNCodec</a></span>(int unencodedBlockSize, + int encodedBlockSize, + int lineLength, + int chunkSeparatorLength)</code> +<div class="block">Note <code>lineLength</code> is rounded down to the nearest multiple of the encoded block size.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#BaseNCodec-int-int-int-int-byte-">BaseNCodec</a></span>(int unencodedBlockSize, + int encodedBlockSize, + int lineLength, + int chunkSeparatorLength, + byte pad)</code> +<div class="block">Note <code>lineLength</code> is rounded down to the nearest multiple of the encoded block size.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#BaseNCodec-int-int-int-int-byte-org.apache.commons.codec.CodecPolicy-">BaseNCodec</a></span>(int unencodedBlockSize, + int encodedBlockSize, + int lineLength, + int chunkSeparatorLength, + byte pad, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Note <code>lineLength</code> is rounded down to the nearest multiple of the encoded block size.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>protected boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#containsAlphabetOrPad-byte:A-">containsAlphabetOrPad</a></span>(byte[] arrayOctet)</code> +<div class="block">Tests a given byte array to see if it contains any characters within the alphabet or PAD.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-byte:A-">decode</a></span>(byte[] pArray)</code> +<div class="block">Decodes a byte[] containing characters in the Base-N alphabet.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Decodes an Object using the Base-N algorithm.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pArray)</code> +<div class="block">Decodes a String containing characters in the Base-N alphabet.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-byte:A-">encode</a></span>(byte[] pArray)</code> +<div class="block">Encodes a byte[] containing binary data, into a byte[] containing characters in the alphabet.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-byte:A-int-int-">encode</a></span>(byte[] pArray, + int offset, + int length)</code> +<div class="block">Encodes a byte[] containing binary data, into a byte[] containing + characters in the alphabet.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the Base-N algorithm.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodeAsString-byte:A-">encodeAsString</a></span>(byte[] pArray)</code> +<div class="block">Encodes a byte[] containing binary data, into a String containing characters in the appropriate alphabet.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodeToString-byte:A-">encodeToString</a></span>(byte[] pArray)</code> +<div class="block">Encodes a byte[] containing binary data, into a String containing characters in the Base-N alphabet.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>protected byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#ensureBufferSize-int-org.apache.commons.codec.binary.BaseNCodec.Context-">ensureBufferSize</a></span>(int size, + org.apache.commons.codec.binary.BaseNCodec.Context context)</code> +<div class="block">Ensure that the buffer has room for <code>size</code> bytes</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getChunkSeparator--">getChunkSeparator</a></span>()</code> +<div class="block">Gets a copy of the chunk separator per RFC 2045 section 2.1.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code><a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getCodecPolicy--">getCodecPolicy</a></span>()</code> +<div class="block">Returns the decoding behavior policy.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code>protected int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getDefaultBufferSize--">getDefaultBufferSize</a></span>()</code> +<div class="block">Get the default buffer size.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code>long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getEncodedLength-byte:A-">getEncodedLength</a></span>(byte[] pArray)</code> +<div class="block">Calculates the amount of space needed to encode the supplied array.</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code>protected abstract boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-byte-">isInAlphabet</a></span>(byte value)</code> +<div class="block">Returns whether or not the <code>octet</code> is in the current alphabet.</div> +</td> +</tr> +<tr id="i15" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-byte:A-boolean-">isInAlphabet</a></span>(byte[] arrayOctet, + boolean allowWSPad)</code> +<div class="block">Tests a given byte array to see if it contains only valid characters within the alphabet.</div> +</td> +</tr> +<tr id="i16" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-java.lang.String-">isInAlphabet</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> basen)</code> +<div class="block">Tests a given String to see if it contains only valid characters within the alphabet.</div> +</td> +</tr> +<tr id="i17" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isStrictDecoding--">isStrictDecoding</a></span>()</code> +<div class="block">Returns true if decoding behavior is strict.</div> +</td> +</tr> +<tr id="i18" class="altColor"> +<td class="colFirst"><code>protected static boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isWhiteSpace-byte-">isWhiteSpace</a></span>(byte byteToCheck)</code> +<div class="block">Checks if a byte value is whitespace or not.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="MIME_CHUNK_SIZE"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>MIME_CHUNK_SIZE</h4> +<pre>public static final int MIME_CHUNK_SIZE</pre> +<div class="block">MIME chunk size per RFC 2045 section 6.8. + + <p> + The 76 character limit does not count the trailing CRLF, but counts all other characters, including any + equal signs. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 section 6.8</a>, +<a href="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.MIME_CHUNK_SIZE">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="PEM_CHUNK_SIZE"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>PEM_CHUNK_SIZE</h4> +<pre>public static final int PEM_CHUNK_SIZE</pre> +<div class="block">PEM chunk size per RFC 1421 section 4.3.2.4. + + <p> + The 64 character limit does not count the trailing CRLF, but counts all other characters, including any + equal signs. + </p></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://tools.ietf.org/html/rfc1421">RFC 1421 section 4.3.2.4</a>, +<a href="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.PEM_CHUNK_SIZE">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="MASK_8BITS"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>MASK_8BITS</h4> +<pre>protected static final int MASK_8BITS</pre> +<div class="block">Mask used to extract 8 bits, used in decoding bytes</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.MASK_8BITS">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="PAD_DEFAULT"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>PAD_DEFAULT</h4> +<pre>protected static final byte PAD_DEFAULT</pre> +<div class="block">Byte used to pad output.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.PAD_DEFAULT">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="DECODING_POLICY_DEFAULT"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>DECODING_POLICY_DEFAULT</h4> +<pre>protected static final <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> DECODING_POLICY_DEFAULT</pre> +<div class="block">The default decoding policy.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +<a name="PAD"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>PAD</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +protected final byte PAD</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#pad"><code>pad</code></a>. Will be removed in 2.0.</span></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.PAD">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="pad"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>pad</h4> +<pre>protected final byte pad</pre> +</li> +</ul> +<a name="lineLength"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>lineLength</h4> +<pre>protected final int lineLength</pre> +<div class="block">Chunksize for encoding. Not used when decoding. + A value of zero or less implies no chunking of the encoded data. + Rounded down to nearest multiple of encodedBlockSize.</div> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="BaseNCodec-int-int-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>BaseNCodec</h4> +<pre>protected BaseNCodec(int unencodedBlockSize, + int encodedBlockSize, + int lineLength, + int chunkSeparatorLength)</pre> +<div class="block">Note <code>lineLength</code> is rounded down to the nearest multiple of the encoded block size. + If <code>chunkSeparatorLength</code> is zero, then chunking is disabled.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>unencodedBlockSize</code> - the size of an unencoded block (e.g. Base64 = 3)</dd> +<dd><code>encodedBlockSize</code> - the size of an encoded block (e.g. Base64 = 4)</dd> +<dd><code>lineLength</code> - if > 0, use chunking with a length <code>lineLength</code></dd> +<dd><code>chunkSeparatorLength</code> - the chunk separator length, if relevant</dd> +</dl> +</li> +</ul> +<a name="BaseNCodec-int-int-int-int-byte-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>BaseNCodec</h4> +<pre>protected BaseNCodec(int unencodedBlockSize, + int encodedBlockSize, + int lineLength, + int chunkSeparatorLength, + byte pad)</pre> +<div class="block">Note <code>lineLength</code> is rounded down to the nearest multiple of the encoded block size. + If <code>chunkSeparatorLength</code> is zero, then chunking is disabled.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>unencodedBlockSize</code> - the size of an unencoded block (e.g. Base64 = 3)</dd> +<dd><code>encodedBlockSize</code> - the size of an encoded block (e.g. Base64 = 4)</dd> +<dd><code>lineLength</code> - if > 0, use chunking with a length <code>lineLength</code></dd> +<dd><code>chunkSeparatorLength</code> - the chunk separator length, if relevant</dd> +<dd><code>pad</code> - byte used as padding byte.</dd> +</dl> +</li> +</ul> +<a name="BaseNCodec-int-int-int-int-byte-org.apache.commons.codec.CodecPolicy-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>BaseNCodec</h4> +<pre>protected BaseNCodec(int unencodedBlockSize, + int encodedBlockSize, + int lineLength, + int chunkSeparatorLength, + byte pad, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</pre> +<div class="block">Note <code>lineLength</code> is rounded down to the nearest multiple of the encoded block size. + If <code>chunkSeparatorLength</code> is zero, then chunking is disabled.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>unencodedBlockSize</code> - the size of an unencoded block (e.g. Base64 = 3)</dd> +<dd><code>encodedBlockSize</code> - the size of an encoded block (e.g. Base64 = 4)</dd> +<dd><code>lineLength</code> - if > 0, use chunking with a length <code>lineLength</code></dd> +<dd><code>chunkSeparatorLength</code> - the chunk separator length, if relevant</dd> +<dd><code>pad</code> - byte used as padding byte.</dd> +<dd><code>decodingPolicy</code> - Decoding policy.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="getChunkSeparator--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getChunkSeparator</h4> +<pre>public static byte[] getChunkSeparator()</pre> +<div class="block">Gets a copy of the chunk separator per RFC 2045 section 2.1.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the chunk separator</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 section 2.1</a></dd> +</dl> +</li> +</ul> +<a name="isWhiteSpace-byte-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isWhiteSpace</h4> +<pre>protected static boolean isWhiteSpace(byte byteToCheck)</pre> +<div class="block">Checks if a byte value is whitespace or not. + Whitespace is taken to mean: space, tab, CR, LF</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>byteToCheck</code> - the byte to check</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true if byte is whitespace, false otherwise</dd> +</dl> +</li> +</ul> +<a name="containsAlphabetOrPad-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>containsAlphabetOrPad</h4> +<pre>protected boolean containsAlphabetOrPad(byte[] arrayOctet)</pre> +<div class="block">Tests a given byte array to see if it contains any characters within the alphabet or PAD. + + Intended for use in checking line-ending arrays</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>arrayOctet</code> - byte array to test</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if any byte is a valid character in the alphabet or PAD; <code>false</code> otherwise</dd> +</dl> +</li> +</ul> +<a name="decode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public byte[] decode(byte[] pArray)</pre> +<div class="block">Decodes a byte[] containing characters in the Base-N alphabet.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html#decode-byte:A-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pArray</code> - A byte array containing Base-N character data</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a byte array containing binary data</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes an Object using the Base-N algorithm. This method is provided in order to satisfy the requirements of + the Decoder interface, and will throw a DecoderException if the supplied object is not of type byte[] or String.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - Object to decode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An object (of type byte[]) containing the binary data which corresponds to the byte[] or String + supplied.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - if the parameter supplied is not of type byte[]</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public byte[] decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pArray)</pre> +<div class="block">Decodes a String containing characters in the Base-N alphabet.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pArray</code> - A String containing Base-N character data</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a byte array containing binary data</dd> +</dl> +</li> +</ul> +<a name="encode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public byte[] encode(byte[] pArray)</pre> +<div class="block">Encodes a byte[] containing binary data, into a byte[] containing characters in the alphabet.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pArray</code> - a byte array containing binary data</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing only the base N alphabetic character data</dd> +</dl> +</li> +</ul> +<a name="encode-byte:A-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public byte[] encode(byte[] pArray, + int offset, + int length)</pre> +<div class="block">Encodes a byte[] containing binary data, into a byte[] containing + characters in the alphabet.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pArray</code> - a byte array containing binary data</dd> +<dd><code>offset</code> - initial offset of the subarray.</dd> +<dd><code>length</code> - length of the subarray.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing only the base N alphabetic character data</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an Object using the Base-N algorithm. This method is provided in order to satisfy the requirements of + the Encoder interface, and will throw an EncoderException if the supplied object is not of type byte[].</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - Object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An object (of type byte[]) containing the Base-N encoded data which corresponds to the byte[] supplied.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if the parameter supplied is not of type byte[]</dd> +</dl> +</li> +</ul> +<a name="encodeAsString-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeAsString</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeAsString(byte[] pArray)</pre> +<div class="block">Encodes a byte[] containing binary data, into a String containing characters in the appropriate alphabet. + Uses UTF8 encoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pArray</code> - a byte array containing binary data</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>String containing only character data in the appropriate alphabet.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5 + This is a duplicate of <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodeToString-byte:A-"><code>encodeToString(byte[])</code></a>; it was merged during refactoring.</dd> +</dl> +</li> +</ul> +<a name="encodeToString-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeToString</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeToString(byte[] pArray)</pre> +<div class="block">Encodes a byte[] containing binary data, into a String containing characters in the Base-N alphabet. + Uses UTF8 encoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pArray</code> - a byte array containing binary data</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A String containing only Base-N character data</dd> +</dl> +</li> +</ul> +<a name="ensureBufferSize-int-org.apache.commons.codec.binary.BaseNCodec.Context-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>ensureBufferSize</h4> +<pre>protected byte[] ensureBufferSize(int size, + org.apache.commons.codec.binary.BaseNCodec.Context context)</pre> +<div class="block">Ensure that the buffer has room for <code>size</code> bytes</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>size</code> - minimum spare space required</dd> +<dd><code>context</code> - the context to be used</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the buffer</dd> +</dl> +</li> +</ul> +<a name="getCodecPolicy--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getCodecPolicy</h4> +<pre>public <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> getCodecPolicy()</pre> +<div class="block">Returns the decoding behavior policy. + + <p> + The default is lenient. If the decoding policy is strict, then decoding will raise an + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if trailing bits are not part of a valid encoding. Decoding will compose + trailing bits into 8-bit bytes and discard the remainder. + </p></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true if using strict decoding</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +<a name="getDefaultBufferSize--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getDefaultBufferSize</h4> +<pre>protected int getDefaultBufferSize()</pre> +<div class="block">Get the default buffer size. Can be overridden.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the default buffer size.</dd> +</dl> +</li> +</ul> +<a name="getEncodedLength-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getEncodedLength</h4> +<pre>public long getEncodedLength(byte[] pArray)</pre> +<div class="block">Calculates the amount of space needed to encode the supplied array.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pArray</code> - byte[] array which will later be encoded</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>amount of space needed to encoded the supplied array. + Returns a long since a max-len array will require > Integer.MAX_VALUE</dd> +</dl> +</li> +</ul> +<a name="isInAlphabet-byte-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isInAlphabet</h4> +<pre>protected abstract boolean isInAlphabet(byte value)</pre> +<div class="block">Returns whether or not the <code>octet</code> is in the current alphabet. + Does not allow whitespace or pad.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value</code> - The value to test</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the value is defined in the current alphabet, <code>false</code> otherwise.</dd> +</dl> +</li> +</ul> +<a name="isInAlphabet-byte:A-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isInAlphabet</h4> +<pre>public boolean isInAlphabet(byte[] arrayOctet, + boolean allowWSPad)</pre> +<div class="block">Tests a given byte array to see if it contains only valid characters within the alphabet. + The method optionally treats whitespace and pad as valid.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>arrayOctet</code> - byte array to test</dd> +<dd><code>allowWSPad</code> - if <code>true</code>, then whitespace and PAD are also allowed</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if all bytes are valid characters in the alphabet or if the byte array is empty; + <code>false</code>, otherwise</dd> +</dl> +</li> +</ul> +<a name="isInAlphabet-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isInAlphabet</h4> +<pre>public boolean isInAlphabet(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> basen)</pre> +<div class="block">Tests a given String to see if it contains only valid characters within the alphabet. + The method treats whitespace and PAD as valid.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>basen</code> - String to test</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if all characters in the String are valid characters in the alphabet or if + the String is empty; <code>false</code>, otherwise</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet-byte:A-boolean-"><code>isInAlphabet(byte[], boolean)</code></a></dd> +</dl> +</li> +</ul> +<a name="isStrictDecoding--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>isStrictDecoding</h4> +<pre>public boolean isStrictDecoding()</pre> +<div class="block">Returns true if decoding behavior is strict. Decoding will raise an <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if trailing + bits are not part of a valid encoding. + + <p> + The default is false for lenient decoding. Decoding will compose trailing bits into 8-bit bytes and discard the + remainder. + </p></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true if using strict decoding</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BaseNCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/BaseNCodec.html" target="_top">Frames</a></li> +<li><a href="BaseNCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BaseNCodecInputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BaseNCodecInputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..6aa0b0b7371f2fcacd38f2e7aa8d2d4a815375ac --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BaseNCodecInputStream.html @@ -0,0 +1,519 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>BaseNCodecInputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="BaseNCodecInputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BaseNCodecInputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/BaseNCodecInputStream.html" target="_top">Frames</a></li> +<li><a href="BaseNCodecInputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterInputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class BaseNCodecInputStream" class="title">Class BaseNCodecInputStream</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">java.io.InputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterInputStream</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.BaseNCodecInputStream</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd> +</dl> +<dl> +<dt>Direct Known Subclasses:</dt> +<dd><a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary">Base16InputStream</a>, <a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary">Base32InputStream</a>, <a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary">Base64InputStream</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">BaseNCodecInputStream</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></pre> +<div class="block">Abstract superclass for Base-N input streams.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="fields.inherited.from.class.java.io.FilterInputStream"> +<!-- --> +</a> +<h3>Fields inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#in" title="class or interface in java.io">in</a></code></li> +</ul> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier</th> +<th class="colLast" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#BaseNCodecInputStream-java.io.InputStream-org.apache.commons.codec.binary.BaseNCodec-boolean-">BaseNCodecInputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> input, + <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a> baseNCodec, + boolean doEncode)</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#available--">available</a></span>()</code></td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#isStrictDecoding--">isStrictDecoding</a></span>()</code> +<div class="block">Returns true if decoding behavior is strict.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#mark-int-">mark</a></span>(int readLimit)</code> +<div class="block">Marks the current position in this input stream.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#markSupported--">markSupported</a></span>()</code></td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#read--">read</a></span>()</code> +<div class="block">Reads one <code>byte</code> from this input stream.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#read-byte:A-int-int-">read</a></span>(byte[] array, + int offset, + int len)</code> +<div class="block">Attempts to read <code>len</code> bytes into the specified <code>b</code> array starting at <code>offset</code> + from this InputStream.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#reset--">reset</a></span>()</code> +<div class="block">Repositions this stream to the position at the time the mark method was last called on this input stream.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#skip-long-">skip</a></span>(long n)</code></td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.io.FilterInputStream"> +<!-- --> +</a> +<h3>Methods inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#close--" title="class or interface in java.io">close</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#read-byte:A-" title="class or interface in java.io">read</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="BaseNCodecInputStream-java.io.InputStream-org.apache.commons.codec.binary.BaseNCodec-boolean-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>BaseNCodecInputStream</h4> +<pre>protected BaseNCodecInputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> input, + <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a> baseNCodec, + boolean doEncode)</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="available--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>available</h4> +<pre>public int available() + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#available--" title="class or interface in java.io">available</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>0</code> if the <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> has reached <code>EOF</code>, + <code>1</code> otherwise</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="isStrictDecoding--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isStrictDecoding</h4> +<pre>public boolean isStrictDecoding()</pre> +<div class="block">Returns true if decoding behavior is strict. Decoding will raise an + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if trailing bits are not part of a valid encoding. + + <p>The default is false for lenient encoding. Decoding will compose trailing bits + into 8-bit bytes and discard the remainder.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true if using strict decoding</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +<a name="mark-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>mark</h4> +<pre>public void mark(int readLimit)</pre> +<div class="block">Marks the current position in this input stream. + <p>The <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#mark-int-"><code>mark(int)</code></a> method of <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary"><code>BaseNCodecInputStream</code></a> does nothing.</p></div> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#mark-int-" title="class or interface in java.io">mark</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>readLimit</code> - the maximum limit of bytes that can be read before the mark position becomes invalid.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#markSupported--"><code>markSupported()</code></a></dd> +</dl> +</li> +</ul> +<a name="markSupported--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>markSupported</h4> +<pre>public boolean markSupported()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#markSupported--" title="class or interface in java.io">markSupported</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Always returns <code>false</code></dd> +</dl> +</li> +</ul> +<a name="read--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>read</h4> +<pre>public int read() + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads one <code>byte</code> from this input stream.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#read--" title="class or interface in java.io">read</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the byte as an integer in the range 0 to 255. Returns -1 if EOF has been reached.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs.</dd> +</dl> +</li> +</ul> +<a name="read-byte:A-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>read</h4> +<pre>public int read(byte[] array, + int offset, + int len) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Attempts to read <code>len</code> bytes into the specified <code>b</code> array starting at <code>offset</code> + from this InputStream.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#read-byte:A-int-int-" title="class or interface in java.io">read</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>array</code> - destination byte array</dd> +<dd><code>offset</code> - where to start writing the bytes</dd> +<dd><code>len</code> - maximum number of bytes to read</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>number of bytes read</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the byte array parameter is null</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - if offset, len or buffer size are invalid</dd> +</dl> +</li> +</ul> +<a name="reset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>reset</h4> +<pre>public void reset() + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Repositions this stream to the position at the time the mark method was last called on this input stream. + <p> + The <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#reset--"><code>reset()</code></a> method of <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary"><code>BaseNCodecInputStream</code></a> does nothing except throw an <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><code>IOException</code></a>.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#reset--" title="class or interface in java.io">reset</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if this method is invoked</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="skip-long-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>skip</h4> +<pre>public long skip(long n) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true#skip-long-" title="class or interface in java.io">skip</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io">FilterInputStream</a></code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the provided skip length is negative</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BaseNCodecInputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/BaseNCodecInputStream.html" target="_top">Frames</a></li> +<li><a href="BaseNCodecInputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterInputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BaseNCodecOutputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BaseNCodecOutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..67624f0ace04b95cb3169459060cf5534c61770a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BaseNCodecOutputStream.html @@ -0,0 +1,490 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>BaseNCodecOutputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="BaseNCodecOutputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BaseNCodecOutputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/BaseNCodecOutputStream.html" target="_top">Frames</a></li> +<li><a href="BaseNCodecOutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterOutputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class BaseNCodecOutputStream" class="title">Class BaseNCodecOutputStream</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">java.io.OutputStream</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterOutputStream</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.BaseNCodecOutputStream</li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd> +</dl> +<dl> +<dt>Direct Known Subclasses:</dt> +<dd><a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary">Base16OutputStream</a>, <a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary">Base32OutputStream</a>, <a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary">Base64OutputStream</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">BaseNCodecOutputStream</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></pre> +<div class="block">Abstract superclass for Base-N output streams. + <p> + To write the EOF marker without closing the stream, call <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#eof--"><code>eof()</code></a> or use an <a + href="https://commons.apache.org/proper/commons-io/">Apache Commons IO</a> <a href= + "https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/output/CloseShieldOutputStream.html" + >CloseShieldOutputStream</a>. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="fields.inherited.from.class.java.io.FilterOutputStream"> +<!-- --> +</a> +<h3>Fields inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#out" title="class or interface in java.io">out</a></code></li> +</ul> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#BaseNCodecOutputStream-java.io.OutputStream-org.apache.commons.codec.binary.BaseNCodec-boolean-">BaseNCodecOutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> output, + <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a> basedCodec, + boolean doEncode)</code> +<div class="block">TODO should this be protected?</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#close--">close</a></span>()</code> +<div class="block">Closes this output stream and releases any system resources associated with the stream.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#eof--">eof</a></span>()</code> +<div class="block">Writes EOF.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#flush--">flush</a></span>()</code> +<div class="block">Flushes this output stream and forces any buffered output bytes to be written out to the stream.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#isStrictDecoding--">isStrictDecoding</a></span>()</code> +<div class="block">Returns true if decoding behavior is strict.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#write-byte:A-int-int-">write</a></span>(byte[] array, + int offset, + int len)</code> +<div class="block">Writes <code>len</code> bytes from the specified <code>b</code> array starting at <code>offset</code> to this + output stream.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#write-int-">write</a></span>(int i)</code> +<div class="block">Writes the specified <code>byte</code> to this output stream.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.io.FilterOutputStream"> +<!-- --> +</a> +<h3>Methods inherited from class java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#write-byte:A-" title="class or interface in java.io">write</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="BaseNCodecOutputStream-java.io.OutputStream-org.apache.commons.codec.binary.BaseNCodec-boolean-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>BaseNCodecOutputStream</h4> +<pre>public BaseNCodecOutputStream(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> output, + <a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a> basedCodec, + boolean doEncode)</pre> +<div class="block">TODO should this be protected?</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>output</code> - the underlying output or null.</dd> +<dd><code>basedCodec</code> - a BaseNCodec.</dd> +<dd><code>doEncode</code> - true to encode, false to decode, TODO should be an enum?</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="close--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>close</h4> +<pre>public void close() + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Closes this output stream and releases any system resources associated with the stream. + <p> + To write the EOF marker without closing the stream, call <a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#eof--"><code>eof()</code></a> or use an + <a href="https://commons.apache.org/proper/commons-io/">Apache Commons IO</a> <a href= + "https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/output/CloseShieldOutputStream.html" + >CloseShieldOutputStream</a>. + </p></div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io">close</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true#close--" title="class or interface in java.lang">close</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#close--" title="class or interface in java.io">close</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs.</dd> +</dl> +</li> +</ul> +<a name="eof--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>eof</h4> +<pre>public void eof() + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Writes EOF.</div> +<dl> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="flush--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>flush</h4> +<pre>public void flush() + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Flushes this output stream and forces any buffered output bytes to be written out to the stream.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true#flush--" title="class or interface in java.io">flush</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a></code></dd> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#flush--" title="class or interface in java.io">flush</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs.</dd> +</dl> +</li> +</ul> +<a name="isStrictDecoding--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isStrictDecoding</h4> +<pre>public boolean isStrictDecoding()</pre> +<div class="block">Returns true if decoding behavior is strict. Decoding will raise an + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if trailing bits are not part of a valid encoding. + + <p>The default is false for lenient encoding. Decoding will compose trailing bits + into 8-bit bytes and discard the remainder.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true if using strict decoding</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +<a name="write-byte:A-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>write</h4> +<pre>public void write(byte[] array, + int offset, + int len) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Writes <code>len</code> bytes from the specified <code>b</code> array starting at <code>offset</code> to this + output stream.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#write-byte:A-int-int-" title="class or interface in java.io">write</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>array</code> - source byte array</dd> +<dd><code>offset</code> - where to start reading the bytes</dd> +<dd><code>len</code> - maximum number of bytes to write</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the byte array parameter is null</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - if offset, len or buffer size are invalid</dd> +</dl> +</li> +</ul> +<a name="write-int-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>write</h4> +<pre>public void write(int i) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Writes the specified <code>byte</code> to this output stream.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true#write-int-" title="class or interface in java.io">write</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>i</code> - source byte</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BaseNCodecOutputStream.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/BaseNCodecOutputStream.html" target="_top">Frames</a></li> +<li><a href="BaseNCodecOutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#fields.inherited.from.class.java.io.FilterOutputStream">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BinaryCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BinaryCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..0dea3c04ab008846c78b51f76e397a2b061c5891 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/BinaryCodec.html @@ -0,0 +1,526 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>BinaryCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="BinaryCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":10}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BinaryCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/BinaryCodec.html" target="_top">Frames</a></li> +<li><a href="BinaryCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class BinaryCodec" class="title">Class BinaryCodec</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.BinaryCodec</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">BinaryCodec</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></pre> +<div class="block">Converts between byte arrays and strings of "0"s and "1"s. + + <p>This class is immutable and thread-safe.</p> + + TODO: may want to add more bit vector functions like and/or/xor/nand + TODO: also might be good to generate boolean[] from byte[] et cetera.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.3</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#BinaryCodec--">BinaryCodec</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#decode-byte:A-">decode</a></span>(byte[] ascii)</code> +<div class="block">Decodes a byte array where each byte represents an ASCII '0' or '1'.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ascii)</code> +<div class="block">Decodes a byte array where each byte represents an ASCII '0' or '1'.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#encode-byte:A-">encode</a></span>(byte[] raw)</code> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 characters.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> raw)</code> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 chars.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#fromAscii-byte:A-">fromAscii</a></span>(byte[] ascii)</code> +<div class="block">Decodes a byte array where each byte represents an ASCII '0' or '1'.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#fromAscii-char:A-">fromAscii</a></span>(char[] ascii)</code> +<div class="block">Decodes a char array where each char represents an ASCII '0' or '1'.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#toAsciiBytes-byte:A-">toAsciiBytes</a></span>(byte[] raw)</code> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 character bytes - each byte is a truncated + char.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>static char[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#toAsciiChars-byte:A-">toAsciiChars</a></span>(byte[] raw)</code> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 characters.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#toAsciiString-byte:A-">toAsciiString</a></span>(byte[] raw)</code> +<div class="block">Converts an array of raw binary data into a String of ASCII 0 and 1 characters.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#toByteArray-java.lang.String-">toByteArray</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ascii)</code> +<div class="block">Decodes a String where each char of the String represents an ASCII '0' or '1'.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="BinaryCodec--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>BinaryCodec</h4> +<pre>public BinaryCodec()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="fromAscii-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>fromAscii</h4> +<pre>public static byte[] fromAscii(byte[] ascii)</pre> +<div class="block">Decodes a byte array where each byte represents an ASCII '0' or '1'.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>ascii</code> - each byte represents an ASCII '0' or '1'</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the raw encoded binary where each bit corresponds to a byte in the byte array argument</dd> +</dl> +</li> +</ul> +<a name="fromAscii-char:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>fromAscii</h4> +<pre>public static byte[] fromAscii(char[] ascii)</pre> +<div class="block">Decodes a char array where each char represents an ASCII '0' or '1'.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>ascii</code> - each char represents an ASCII '0' or '1'</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the raw encoded binary where each bit corresponds to a char in the char array argument</dd> +</dl> +</li> +</ul> +<a name="toAsciiBytes-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>toAsciiBytes</h4> +<pre>public static byte[] toAsciiBytes(byte[] raw)</pre> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 character bytes - each byte is a truncated + char.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>raw</code> - the raw binary data to convert</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>an array of 0 and 1 character bytes for each bit of the argument</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-"><code>BinaryEncoder.encode(byte[])</code></a></dd> +</dl> +</li> +</ul> +<a name="toAsciiChars-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>toAsciiChars</h4> +<pre>public static char[] toAsciiChars(byte[] raw)</pre> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 characters.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>raw</code> - the raw binary data to convert</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>an array of 0 and 1 characters for each bit of the argument</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-"><code>BinaryEncoder.encode(byte[])</code></a></dd> +</dl> +</li> +</ul> +<a name="toAsciiString-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>toAsciiString</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toAsciiString(byte[] raw)</pre> +<div class="block">Converts an array of raw binary data into a String of ASCII 0 and 1 characters.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>raw</code> - the raw binary data to convert</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a String of 0 and 1 characters representing the binary data</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-"><code>BinaryEncoder.encode(byte[])</code></a></dd> +</dl> +</li> +</ul> +<a name="decode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public byte[] decode(byte[] ascii)</pre> +<div class="block">Decodes a byte array where each byte represents an ASCII '0' or '1'.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html#decode-byte:A-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>ascii</code> - each byte represents an ASCII '0' or '1'</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the raw encoded binary where each bit corresponds to a byte in the byte array argument</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-"><code>Decoder.decode(Object)</code></a></dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ascii) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a byte array where each byte represents an ASCII '0' or '1'.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>ascii</code> - each byte represents an ASCII '0' or '1'</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the raw encoded binary where each bit corresponds to a byte in the byte array argument</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - if argument is not a byte[], char[] or String</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-"><code>Decoder.decode(Object)</code></a></dd> +</dl> +</li> +</ul> +<a name="encode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public byte[] encode(byte[] raw)</pre> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 characters.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>raw</code> - the raw binary data to convert</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>0 and 1 ASCII character bytes one for each bit of the argument</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-"><code>BinaryEncoder.encode(byte[])</code></a></dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> raw) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 chars.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>raw</code> - the raw binary data to convert</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>0 and 1 ASCII character chars one for each bit of the argument</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if the argument is not a byte[]</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-"><code>Encoder.encode(Object)</code></a></dd> +</dl> +</li> +</ul> +<a name="toByteArray-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>toByteArray</h4> +<pre>public byte[] toByteArray(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ascii)</pre> +<div class="block">Decodes a String where each char of the String represents an ASCII '0' or '1'.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>ascii</code> - String of '0' and '1' characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the raw encoded binary where each bit corresponds to a byte in the byte array argument</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-"><code>Decoder.decode(Object)</code></a></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BinaryCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/BinaryCodec.html" target="_top">Frames</a></li> +<li><a href="BinaryCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/CharSequenceUtils.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/CharSequenceUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..a21dd55dba6fc3ec72e301c30639452543a64f62 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/CharSequenceUtils.html @@ -0,0 +1,250 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>CharSequenceUtils (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="CharSequenceUtils (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/CharSequenceUtils.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/CharSequenceUtils.html" target="_top">Frames</a></li> +<li><a href="CharSequenceUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.java.lang.Object">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class CharSequenceUtils" class="title">Class CharSequenceUtils</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.CharSequenceUtils</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">CharSequenceUtils</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block"><p> + Operations on <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang"><code>CharSequence</code></a> that are <code>null</code> safe. + </p> + <p> + Copied from Apache Commons Lang r1586295 on April 10, 2014 (day of 3.3.2 release). + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.10</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang"><code>CharSequence</code></a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/CharSequenceUtils.html#CharSequenceUtils--">CharSequenceUtils</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="CharSequenceUtils--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>CharSequenceUtils</h4> +<pre>public CharSequenceUtils()</pre> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/CharSequenceUtils.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/CharSequenceUtils.html" target="_top">Frames</a></li> +<li><a href="CharSequenceUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.java.lang.Object">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Hex.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Hex.html new file mode 100644 index 0000000000000000000000000000000000000000..5c62e849275c874af9054d53e91ce54730c8b2a5 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/Hex.html @@ -0,0 +1,1133 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Hex (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Hex (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":9,"i5":9,"i6":10,"i7":10,"i8":10,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":10,"i22":10,"i23":9,"i24":10}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Hex.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Hex.html" target="_top">Frames</a></li> +<li><a href="Hex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class Hex" class="title">Class Hex</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.Hex</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Hex</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></pre> +<div class="block">Converts hexadecimal Strings. The Charset used for certain operation can be set, the default is set in + <a href="../../../../../org/apache/commons/codec/binary/Hex.html#DEFAULT_CHARSET_NAME"><code>DEFAULT_CHARSET_NAME</code></a> + + This class is thread-safe.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.1</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#DEFAULT_CHARSET">DEFAULT_CHARSET</a></span></code> +<div class="block">Default charset is <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#DEFAULT_CHARSET_NAME">DEFAULT_CHARSET_NAME</a></span></code> +<div class="block">Default charset name is <a href="../../../../../org/apache/commons/codec/CharEncoding.html#UTF_8"><code>CharEncoding.UTF_8</code></a>.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#Hex--">Hex</a></span>()</code> +<div class="block">Creates a new codec with the default charset name <a href="../../../../../org/apache/commons/codec/binary/Hex.html#DEFAULT_CHARSET"><code>DEFAULT_CHARSET</code></a></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#Hex-java.nio.charset.Charset-">Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</code> +<div class="block">Creates a new codec with the given Charset.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#Hex-java.lang.String-">Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</code> +<div class="block">Creates a new codec with the given charset name.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decode-byte:A-">decode</a></span>(byte[] array)</code> +<div class="block">Converts an array of character bytes representing hexadecimal values into an array of bytes of those same values.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decode-java.nio.ByteBuffer-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer)</code> +<div class="block">Converts a buffer of character bytes representing hexadecimal values into an array of bytes of those same values.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> object)</code> +<div class="block">Converts a String or an array of character bytes representing hexadecimal values into an array of bytes of those + same values.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decodeHex-char:A-">decodeHex</a></span>(char[] data)</code> +<div class="block">Converts an array of characters representing hexadecimal values into an array of bytes of those same values.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decodeHex-char:A-byte:A-int-">decodeHex</a></span>(char[] data, + byte[] out, + int outOffset)</code> +<div class="block">Converts an array of characters representing hexadecimal values into an array of bytes of those same values.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decodeHex-java.lang.String-">decodeHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Converts a String representing hexadecimal values into an array of bytes of those same values.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encode-byte:A-">encode</a></span>(byte[] array)</code> +<div class="block">Converts an array of bytes into an array of bytes for the characters representing the hexadecimal values of each + byte in order.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encode-java.nio.ByteBuffer-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> array)</code> +<div class="block">Converts byte buffer into an array of bytes for the characters representing the hexadecimal values of each byte + in order.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> object)</code> +<div class="block">Converts a String or an array of bytes into an array of characters representing the hexadecimal values of each + byte in order.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>static char[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-">encodeHex</a></span>(byte[] data)</code> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>static char[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-boolean-">encodeHex</a></span>(byte[] data, + boolean toLowerCase)</code> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code>protected static char[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-char:A-">encodeHex</a></span>(byte[] data, + char[] toDigits)</code> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code>static char[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-int-int-boolean-">encodeHex</a></span>(byte[] data, + int dataOffset, + int dataLen, + boolean toLowerCase)</code> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code>static void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-int-int-boolean-char:A-int-">encodeHex</a></span>(byte[] data, + int dataOffset, + int dataLen, + boolean toLowerCase, + char[] out, + int outOffset)</code> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code>static char[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHex-java.nio.ByteBuffer-">encodeHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data)</code> +<div class="block">Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i15" class="rowColor"> +<td class="colFirst"><code>static char[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHex-java.nio.ByteBuffer-boolean-">encodeHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data, + boolean toLowerCase)</code> +<div class="block">Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i16" class="altColor"> +<td class="colFirst"><code>protected static char[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHex-java.nio.ByteBuffer-char:A-">encodeHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> byteBuffer, + char[] toDigits)</code> +<div class="block">Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i17" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHexString-byte:A-">encodeHexString</a></span>(byte[] data)</code> +<div class="block">Converts an array of bytes into a String representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i18" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHexString-byte:A-boolean-">encodeHexString</a></span>(byte[] data, + boolean toLowerCase)</code> +<div class="block">Converts an array of bytes into a String representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i19" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHexString-java.nio.ByteBuffer-">encodeHexString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data)</code> +<div class="block">Converts a byte buffer into a String representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i20" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHexString-java.nio.ByteBuffer-boolean-">encodeHexString</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data, + boolean toLowerCase)</code> +<div class="block">Converts a byte buffer into a String representing the hexadecimal values of each byte in order.</div> +</td> +</tr> +<tr id="i21" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#getCharset--">getCharset</a></span>()</code> +<div class="block">Gets the charset.</div> +</td> +</tr> +<tr id="i22" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#getCharsetName--">getCharsetName</a></span>()</code> +<div class="block">Gets the charset name.</div> +</td> +</tr> +<tr id="i23" class="rowColor"> +<td class="colFirst"><code>protected static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#toDigit-char-int-">toDigit</a></span>(char ch, + int index)</code> +<div class="block">Converts a hexadecimal character to an integer.</div> +</td> +</tr> +<tr id="i24" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#toString--">toString</a></span>()</code> +<div class="block">Returns a string representation of the object, which includes the charset name.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="DEFAULT_CHARSET"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>DEFAULT_CHARSET</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> DEFAULT_CHARSET</pre> +<div class="block">Default charset is <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a>.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="DEFAULT_CHARSET_NAME"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>DEFAULT_CHARSET_NAME</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEFAULT_CHARSET_NAME</pre> +<div class="block">Default charset name is <a href="../../../../../org/apache/commons/codec/CharEncoding.html#UTF_8"><code>CharEncoding.UTF_8</code></a>.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.binary.Hex.DEFAULT_CHARSET_NAME">Constant Field Values</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Hex--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Hex</h4> +<pre>public Hex()</pre> +<div class="block">Creates a new codec with the default charset name <a href="../../../../../org/apache/commons/codec/binary/Hex.html#DEFAULT_CHARSET"><code>DEFAULT_CHARSET</code></a></div> +</li> +</ul> +<a name="Hex-java.nio.charset.Charset-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Hex</h4> +<pre>public Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</pre> +<div class="block">Creates a new codec with the given Charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charset</code> - the charset.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Hex</h4> +<pre>public Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</pre> +<div class="block">Creates a new codec with the given charset name.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charsetName</code> - the charset name.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - If the named charset is unavailable</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4, 1.7 throws UnsupportedCharsetException if the named charset is unavailable</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="decodeHex-char:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decodeHex</h4> +<pre>public static byte[] decodeHex(char[] data) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Converts an array of characters representing hexadecimal values into an array of bytes of those same values. The + returned array will be half the length of the passed array, as it takes two characters to represent any given + byte. An exception is thrown if the passed char array has an odd number of elements.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - An array of characters containing hexadecimal digits</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing binary data decoded from the supplied char array.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if an odd number of characters or illegal characters are supplied</dd> +</dl> +</li> +</ul> +<a name="decodeHex-char:A-byte:A-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decodeHex</h4> +<pre>public static int decodeHex(char[] data, + byte[] out, + int outOffset) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Converts an array of characters representing hexadecimal values into an array of bytes of those same values. The + returned array will be half the length of the passed array, as it takes two characters to represent any given + byte. An exception is thrown if the passed char array has an odd number of elements.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - An array of characters containing hexadecimal digits</dd> +<dd><code>out</code> - A byte array to contain the binary data decoded from the supplied char array.</dd> +<dd><code>outOffset</code> - The position within <code>out</code> to start writing the decoded bytes.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the number of bytes written to <code>out</code>.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if an odd number of characters or illegal characters are supplied</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +<a name="decodeHex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decodeHex</h4> +<pre>public static byte[] decodeHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Converts a String representing hexadecimal values into an array of bytes of those same values. The returned array + will be half the length of the passed String, as it takes two characters to represent any given byte. An + exception is thrown if the passed String has an odd number of elements.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - A String containing hexadecimal digits</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing binary data decoded from the supplied char array.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if an odd number of characters or illegal characters are supplied</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="encodeHex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHex</h4> +<pre>public static char[] encodeHex(byte[] data)</pre> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order. + The returned array will be double the length of the passed array, as it takes two characters to represent any + given byte.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - a byte[] to convert to hex characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A char[] containing lower-case hexadecimal characters</dd> +</dl> +</li> +</ul> +<a name="encodeHex-byte:A-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHex</h4> +<pre>public static char[] encodeHex(byte[] data, + boolean toLowerCase)</pre> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order. + The returned array will be double the length of the passed array, as it takes two characters to represent any + given byte.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - a byte[] to convert to Hex characters</dd> +<dd><code>toLowerCase</code> - <code>true</code> converts to lowercase, <code>false</code> to uppercase</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A char[] containing hexadecimal characters in the selected case</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="encodeHex-byte:A-char:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHex</h4> +<pre>protected static char[] encodeHex(byte[] data, + char[] toDigits)</pre> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order. + The returned array will be double the length of the passed array, as it takes two characters to represent any + given byte.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - a byte[] to convert to hex characters</dd> +<dd><code>toDigits</code> - the output alphabet (must contain at least 16 chars)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A char[] containing the appropriate characters from the alphabet For best results, this should be either + upper- or lower-case hex.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="encodeHex-byte:A-int-int-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHex</h4> +<pre>public static char[] encodeHex(byte[] data, + int dataOffset, + int dataLen, + boolean toLowerCase)</pre> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - a byte[] to convert to hex characters</dd> +<dd><code>dataOffset</code> - the position in <code>data</code> to start encoding from</dd> +<dd><code>dataLen</code> - the number of bytes from <code>dataOffset</code> to encode</dd> +<dd><code>toLowerCase</code> - <code>true</code> converts to lowercase, <code>false</code> to uppercase</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A char[] containing the appropriate characters from the alphabet For best results, this should be either + upper- or lower-case hex.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +<a name="encodeHex-byte:A-int-int-boolean-char:A-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHex</h4> +<pre>public static void encodeHex(byte[] data, + int dataOffset, + int dataLen, + boolean toLowerCase, + char[] out, + int outOffset)</pre> +<div class="block">Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - a byte[] to convert to hex characters</dd> +<dd><code>dataOffset</code> - the position in <code>data</code> to start encoding from</dd> +<dd><code>dataLen</code> - the number of bytes from <code>dataOffset</code> to encode</dd> +<dd><code>toLowerCase</code> - <code>true</code> converts to lowercase, <code>false</code> to uppercase</dd> +<dd><code>out</code> - a char[] which will hold the resultant appropriate characters from the alphabet.</dd> +<dd><code>outOffset</code> - the position within <code>out</code> at which to start writing the encoded characters.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +<a name="encodeHex-java.nio.ByteBuffer-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHex</h4> +<pre>public static char[] encodeHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data)</pre> +<div class="block">Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order. The + returned array will be double the length of the passed array, as it takes two characters to represent any given + byte. + + <p>All bytes identified by <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>Buffer.remaining()</code></a> will be used; after this method + the value <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>remaining()</code></a> will be zero.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - a byte buffer to convert to hex characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A char[] containing lower-case hexadecimal characters</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="encodeHex-java.nio.ByteBuffer-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHex</h4> +<pre>public static char[] encodeHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data, + boolean toLowerCase)</pre> +<div class="block">Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order. The + returned array will be double the length of the passed array, as it takes two characters to represent any given + byte. + + <p>All bytes identified by <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>Buffer.remaining()</code></a> will be used; after this method + the value <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>remaining()</code></a> will be zero.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - a byte buffer to convert to hex characters</dd> +<dd><code>toLowerCase</code> - <code>true</code> converts to lowercase, <code>false</code> to uppercase</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A char[] containing hexadecimal characters in the selected case</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="encodeHex-java.nio.ByteBuffer-char:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHex</h4> +<pre>protected static char[] encodeHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> byteBuffer, + char[] toDigits)</pre> +<div class="block">Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order. The + returned array will be double the length of the passed array, as it takes two characters to represent any given + byte. + + <p>All bytes identified by <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>Buffer.remaining()</code></a> will be used; after this method + the value <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>remaining()</code></a> will be zero.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>byteBuffer</code> - a byte buffer to convert to hex characters</dd> +<dd><code>toDigits</code> - the output alphabet (must be at least 16 characters)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A char[] containing the appropriate characters from the alphabet For best results, this should be either + upper- or lower-case hex.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="encodeHexString-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHexString</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeHexString(byte[] data)</pre> +<div class="block">Converts an array of bytes into a String representing the hexadecimal values of each byte in order. The returned + String will be double the length of the passed array, as it takes two characters to represent any given byte.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - a byte[] to convert to hex characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A String containing lower-case hexadecimal characters</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="encodeHexString-byte:A-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHexString</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeHexString(byte[] data, + boolean toLowerCase)</pre> +<div class="block">Converts an array of bytes into a String representing the hexadecimal values of each byte in order. The returned + String will be double the length of the passed array, as it takes two characters to represent any given byte.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - a byte[] to convert to hex characters</dd> +<dd><code>toLowerCase</code> - <code>true</code> converts to lowercase, <code>false</code> to uppercase</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A String containing lower-case hexadecimal characters</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="encodeHexString-java.nio.ByteBuffer-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHexString</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeHexString(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data)</pre> +<div class="block">Converts a byte buffer into a String representing the hexadecimal values of each byte in order. The returned + String will be double the length of the passed array, as it takes two characters to represent any given byte. + + <p>All bytes identified by <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>Buffer.remaining()</code></a> will be used; after this method + the value <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>remaining()</code></a> will be zero.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - a byte buffer to convert to hex characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A String containing lower-case hexadecimal characters</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="encodeHexString-java.nio.ByteBuffer-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeHexString</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeHexString(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data, + boolean toLowerCase)</pre> +<div class="block">Converts a byte buffer into a String representing the hexadecimal values of each byte in order. The returned + String will be double the length of the passed array, as it takes two characters to represent any given byte. + + <p>All bytes identified by <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>Buffer.remaining()</code></a> will be used; after this method + the value <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>remaining()</code></a> will be zero.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - a byte buffer to convert to hex characters</dd> +<dd><code>toLowerCase</code> - <code>true</code> converts to lowercase, <code>false</code> to uppercase</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A String containing lower-case hexadecimal characters</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="toDigit-char-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>toDigit</h4> +<pre>protected static int toDigit(char ch, + int index) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Converts a hexadecimal character to an integer.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>ch</code> - A character to convert to an integer digit</dd> +<dd><code>index</code> - The index of the character in the source</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An integer</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if ch is an illegal hex character</dd> +</dl> +</li> +</ul> +<a name="decode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public byte[] decode(byte[] array) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Converts an array of character bytes representing hexadecimal values into an array of bytes of those same values. + The returned array will be half the length of the passed array, as it takes two characters to represent any given + byte. An exception is thrown if the passed char array has an odd number of elements.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html#decode-byte:A-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>array</code> - An array of character bytes containing hexadecimal digits</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing binary data decoded from the supplied byte array (representing characters).</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if an odd number of characters is supplied to this function</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decodeHex-char:A-"><code>decodeHex(char[])</code></a></dd> +</dl> +</li> +</ul> +<a name="decode-java.nio.ByteBuffer-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public byte[] decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Converts a buffer of character bytes representing hexadecimal values into an array of bytes of those same values. + The returned array will be half the length of the passed array, as it takes two characters to represent any given + byte. An exception is thrown if the passed char array has an odd number of elements. + + <p>All bytes identified by <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>Buffer.remaining()</code></a> will be used; after this method + the value <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>remaining()</code></a> will be zero.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>buffer</code> - An array of character bytes containing hexadecimal digits</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing binary data decoded from the supplied byte array (representing characters).</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if an odd number of characters is supplied to this function</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decodeHex-char:A-"><code>decodeHex(char[])</code></a></dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> object) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Converts a String or an array of character bytes representing hexadecimal values into an array of bytes of those + same values. The returned array will be half the length of the passed String or array, as it takes two characters + to represent any given byte. An exception is thrown if the passed char array has an odd number of elements.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>object</code> - A String, ByteBuffer, byte[], or an array of character bytes containing hexadecimal digits</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing binary data decoded from the supplied byte array (representing characters).</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if an odd number of characters is supplied to this function or the object is not + a String or char[]</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decodeHex-char:A-"><code>decodeHex(char[])</code></a></dd> +</dl> +</li> +</ul> +<a name="encode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public byte[] encode(byte[] array)</pre> +<div class="block">Converts an array of bytes into an array of bytes for the characters representing the hexadecimal values of each + byte in order. The returned array will be double the length of the passed array, as it takes two characters to + represent any given byte. + <p> + The conversion from hexadecimal characters to the returned bytes is performed with the charset named by + <a href="../../../../../org/apache/commons/codec/binary/Hex.html#getCharset--"><code>getCharset()</code></a>. + </p></div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>array</code> - a byte[] to convert to hex characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte[] containing the bytes of the lower-case hexadecimal characters</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7 No longer throws IllegalStateException if the charsetName is invalid.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-"><code>encodeHex(byte[])</code></a></dd> +</dl> +</li> +</ul> +<a name="encode-java.nio.ByteBuffer-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public byte[] encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> array)</pre> +<div class="block">Converts byte buffer into an array of bytes for the characters representing the hexadecimal values of each byte + in order. The returned array will be double the length of the passed array, as it takes two characters to + represent any given byte. + + <p>The conversion from hexadecimal characters to the returned bytes is performed with the charset named by + <a href="../../../../../org/apache/commons/codec/binary/Hex.html#getCharset--"><code>getCharset()</code></a>.</p> + + <p>All bytes identified by <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>Buffer.remaining()</code></a> will be used; after this method + the value <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html?is-external=true#remaining--" title="class or interface in java.nio"><code>remaining()</code></a> will be zero.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>array</code> - a byte buffer to convert to hex characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte[] containing the bytes of the lower-case hexadecimal characters</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-"><code>encodeHex(byte[])</code></a></dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> object) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Converts a String or an array of bytes into an array of characters representing the hexadecimal values of each + byte in order. The returned array will be double the length of the passed String or array, as it takes two + characters to represent any given byte. + <p> + The conversion from hexadecimal characters to bytes to be encoded to performed with the charset named by + <a href="../../../../../org/apache/commons/codec/binary/Hex.html#getCharset--"><code>getCharset()</code></a>. + </p></div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>object</code> - a String, ByteBuffer, or byte[] to convert to hex characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A char[] containing lower-case hexadecimal characters</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - Thrown if the given object is not a String or byte[]</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encodeHex-byte:A-"><code>encodeHex(byte[])</code></a></dd> +</dl> +</li> +</ul> +<a name="getCharset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getCharset</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> getCharset()</pre> +<div class="block">Gets the charset.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the charset.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="getCharsetName--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getCharsetName</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getCharsetName()</pre> +<div class="block">Gets the charset name.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the charset name.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="toString--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>toString</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> +<div class="block">Returns a string representation of the object, which includes the charset name.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a string representation of the object.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Hex.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/Hex.html" target="_top">Frames</a></li> +<li><a href="Hex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/StringUtils.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/StringUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..b71b8b86d1cd326741f5213927d121509d9d2d3b --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/StringUtils.html @@ -0,0 +1,785 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>StringUtils (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="StringUtils (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/StringUtils.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/StringUtils.html" target="_top">Frames</a></li> +<li><a href="StringUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.binary</div> +<h2 title="Class StringUtils" class="title">Class StringUtils</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.binary.StringUtils</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">StringUtils</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Converts String to and from bytes using the encodings required by the Java specification. These encodings are + specified in <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html"> + Standard charsets</a>. + + <p>This class is immutable and thread-safe.</p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec"><code>CharEncoding</code></a>, +<a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#StringUtils--">StringUtils</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#equals-java.lang.CharSequence-java.lang.CharSequence-">equals</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> cs1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> cs2)</code> +<div class="block"> + Compares two CharSequences, returning <code>true</code> if they represent equal sequences of characters.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getByteBufferUtf8-java.lang.String-">getByteBufferUtf8</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</code> +<div class="block">Encodes the given string into a byte buffer using the UTF-8 charset, storing the result into a new byte + array.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesIso8859_1-java.lang.String-">getBytesIso8859_1</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</code> +<div class="block">Encodes the given string into a sequence of bytes using the ISO-8859-1 charset, storing the result into a new + byte array.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUnchecked-java.lang.String-java.lang.String-">getBytesUnchecked</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</code> +<div class="block">Encodes the given string into a sequence of bytes using the named charset, storing the result into a new byte + array.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUsAscii-java.lang.String-">getBytesUsAscii</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</code> +<div class="block">Encodes the given string into a sequence of bytes using the US-ASCII charset, storing the result into a new byte + array.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf16-java.lang.String-">getBytesUtf16</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</code> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-16 charset, storing the result into a new byte + array.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf16Be-java.lang.String-">getBytesUtf16Be</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</code> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-16BE charset, storing the result into a new byte + array.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf16Le-java.lang.String-">getBytesUtf16Le</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</code> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-16LE charset, storing the result into a new byte + array.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-">getBytesUtf8</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</code> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-8 charset, storing the result into a new byte + array.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#newString-byte:A-java.lang.String-">newString</a></span>(byte[] bytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</code> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the given charset.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#newStringIso8859_1-byte:A-">newStringIso8859_1</a></span>(byte[] bytes)</code> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the ISO-8859-1 charset.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#newStringUsAscii-byte:A-">newStringUsAscii</a></span>(byte[] bytes)</code> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the US-ASCII charset.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#newStringUtf16-byte:A-">newStringUtf16</a></span>(byte[] bytes)</code> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-16 charset.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#newStringUtf16Be-byte:A-">newStringUtf16Be</a></span>(byte[] bytes)</code> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-16BE charset.</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#newStringUtf16Le-byte:A-">newStringUtf16Le</a></span>(byte[] bytes)</code> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-16LE charset.</div> +</td> +</tr> +<tr id="i15" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#newStringUtf8-byte:A-">newStringUtf8</a></span>(byte[] bytes)</code> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-8 charset.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="StringUtils--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>StringUtils</h4> +<pre>public StringUtils()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="equals-java.lang.CharSequence-java.lang.CharSequence-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>equals</h4> +<pre>public static boolean equals(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> cs1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> cs2)</pre> +<div class="block"><p> + Compares two CharSequences, returning <code>true</code> if they represent equal sequences of characters. + </p> + + <p> + <code>null</code>s are handled without exceptions. Two <code>null</code> references are considered to be equal. + The comparison is case sensitive. + </p> + + <pre> + StringUtils.equals(null, null) = true + StringUtils.equals(null, "abc") = false + StringUtils.equals("abc", null) = false + StringUtils.equals("abc", "abc") = true + StringUtils.equals("abc", "ABC") = false + </pre> + + <p> + Copied from Apache Commons Lang r1583482 on April 10, 2014 (day of 3.3.2 release). + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>cs1</code> - the first CharSequence, may be <code>null</code></dd> +<dd><code>cs2</code> - the second CharSequence, may be <code>null</code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the CharSequences are equal (case-sensitive), or both <code>null</code></dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.10</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>Object.equals(Object)</code></a></dd> +</dl> +</li> +</ul> +<a name="getByteBufferUtf8-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getByteBufferUtf8</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> getByteBufferUtf8(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</pre> +<div class="block">Encodes the given string into a byte buffer using the UTF-8 charset, storing the result into a new byte + array.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>string</code> - the String to encode, may be <code>null</code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>encoded bytes, or <code>null</code> if the input string was <code>null</code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUnchecked-java.lang.String-java.lang.String-"><code>getBytesUnchecked(String, String)</code></a></dd> +</dl> +</li> +</ul> +<a name="getBytesIso8859_1-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getBytesIso8859_1</h4> +<pre>public static byte[] getBytesIso8859_1(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</pre> +<div class="block">Encodes the given string into a sequence of bytes using the ISO-8859-1 charset, storing the result into a new + byte array.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>string</code> - the String to encode, may be <code>null</code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>encoded bytes, or <code>null</code> if the input string was <code>null</code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#ISO_8859_1" title="class or interface in java.nio.charset"><code>StandardCharsets.ISO_8859_1</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUnchecked-java.lang.String-java.lang.String-"><code>getBytesUnchecked(String, String)</code></a></dd> +</dl> +</li> +</ul> +<a name="getBytesUnchecked-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getBytesUnchecked</h4> +<pre>public static byte[] getBytesUnchecked(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</pre> +<div class="block">Encodes the given string into a sequence of bytes using the named charset, storing the result into a new byte + array. + <p> + This method catches <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io"><code>UnsupportedEncodingException</code></a> and rethrows it as <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang"><code>IllegalStateException</code></a>, which + should never happen for a required charset name. Use this method when the encoding is required to be in the JRE. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>string</code> - the String to encode, may be <code>null</code></dd> +<dd><code>charsetName</code> - The name of a required <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset"><code>Charset</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>encoded bytes, or <code>null</code> if the input string was <code>null</code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - Thrown when a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io"><code>UnsupportedEncodingException</code></a> is caught, which should never happen for a + required charset name.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec"><code>CharEncoding</code></a>, +<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.lang.String-" title="class or interface in java.lang"><code>String.getBytes(String)</code></a></dd> +</dl> +</li> +</ul> +<a name="getBytesUsAscii-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getBytesUsAscii</h4> +<pre>public static byte[] getBytesUsAscii(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</pre> +<div class="block">Encodes the given string into a sequence of bytes using the US-ASCII charset, storing the result into a new byte + array.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>string</code> - the String to encode, may be <code>null</code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>encoded bytes, or <code>null</code> if the input string was <code>null</code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#US_ASCII" title="class or interface in java.nio.charset"><code>StandardCharsets.US_ASCII</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUnchecked-java.lang.String-java.lang.String-"><code>getBytesUnchecked(String, String)</code></a></dd> +</dl> +</li> +</ul> +<a name="getBytesUtf16-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getBytesUtf16</h4> +<pre>public static byte[] getBytesUtf16(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</pre> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-16 charset, storing the result into a new byte + array.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>string</code> - the String to encode, may be <code>null</code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>encoded bytes, or <code>null</code> if the input string was <code>null</code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUnchecked-java.lang.String-java.lang.String-"><code>getBytesUnchecked(String, String)</code></a></dd> +</dl> +</li> +</ul> +<a name="getBytesUtf16Be-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getBytesUtf16Be</h4> +<pre>public static byte[] getBytesUtf16Be(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</pre> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-16BE charset, storing the result into a new byte + array.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>string</code> - the String to encode, may be <code>null</code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>encoded bytes, or <code>null</code> if the input string was <code>null</code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16BE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16BE</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUnchecked-java.lang.String-java.lang.String-"><code>getBytesUnchecked(String, String)</code></a></dd> +</dl> +</li> +</ul> +<a name="getBytesUtf16Le-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getBytesUtf16Le</h4> +<pre>public static byte[] getBytesUtf16Le(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</pre> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-16LE charset, storing the result into a new byte + array.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>string</code> - the String to encode, may be <code>null</code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>encoded bytes, or <code>null</code> if the input string was <code>null</code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16LE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16LE</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUnchecked-java.lang.String-java.lang.String-"><code>getBytesUnchecked(String, String)</code></a></dd> +</dl> +</li> +</ul> +<a name="getBytesUtf8-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getBytesUtf8</h4> +<pre>public static byte[] getBytesUtf8(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> string)</pre> +<div class="block">Encodes the given string into a sequence of bytes using the UTF-8 charset, storing the result into a new byte + array.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>string</code> - the String to encode, may be <code>null</code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>encoded bytes, or <code>null</code> if the input string was <code>null</code></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>, +<a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUnchecked-java.lang.String-java.lang.String-"><code>getBytesUnchecked(String, String)</code></a></dd> +</dl> +</li> +</ul> +<a name="newString-byte:A-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>newString</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> newString(byte[] bytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</pre> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the given charset. + <p> + This method catches <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io"><code>UnsupportedEncodingException</code></a> and re-throws it as <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang"><code>IllegalStateException</code></a>, which + should never happen for a required charset name. Use this method when the encoding is required to be in the JRE. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - The bytes to be decoded into characters, may be <code>null</code></dd> +<dd><code>charsetName</code> - The name of a required <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset"><code>Charset</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new <code>String</code> decoded from the specified array of bytes using the given charset, + or <code>null</code> if the input byte array was <code>null</code>.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - Thrown when a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io"><code>UnsupportedEncodingException</code></a> is caught, which should never happen for a + required charset name.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec"><code>CharEncoding</code></a>, +<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#String-byte:A-java.lang.String-" title="class or interface in java.lang"><code>String.String(byte[], String)</code></a></dd> +</dl> +</li> +</ul> +<a name="newStringIso8859_1-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>newStringIso8859_1</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> newStringIso8859_1(byte[] bytes)</pre> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the ISO-8859-1 charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - The bytes to be decoded into characters, may be <code>null</code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new <code>String</code> decoded from the specified array of bytes using the ISO-8859-1 charset, or + <code>null</code> if the input byte array was <code>null</code>.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#ISO_8859_1" title="class or interface in java.nio.charset"><code>StandardCharsets.ISO_8859_1</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +</dl> +</li> +</ul> +<a name="newStringUsAscii-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>newStringUsAscii</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> newStringUsAscii(byte[] bytes)</pre> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the US-ASCII charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - The bytes to be decoded into characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new <code>String</code> decoded from the specified array of bytes using the US-ASCII charset, + or <code>null</code> if the input byte array was <code>null</code>.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#US_ASCII" title="class or interface in java.nio.charset"><code>StandardCharsets.US_ASCII</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +</dl> +</li> +</ul> +<a name="newStringUtf16-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>newStringUtf16</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> newStringUtf16(byte[] bytes)</pre> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-16 charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - The bytes to be decoded into characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new <code>String</code> decoded from the specified array of bytes using the UTF-16 charset + or <code>null</code> if the input byte array was <code>null</code>.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +</dl> +</li> +</ul> +<a name="newStringUtf16Be-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>newStringUtf16Be</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> newStringUtf16Be(byte[] bytes)</pre> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-16BE charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - The bytes to be decoded into characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new <code>String</code> decoded from the specified array of bytes using the UTF-16BE charset, + or <code>null</code> if the input byte array was <code>null</code>.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16BE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16BE</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +</dl> +</li> +</ul> +<a name="newStringUtf16Le-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>newStringUtf16Le</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> newStringUtf16Le(byte[] bytes)</pre> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-16LE charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - The bytes to be decoded into characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new <code>String</code> decoded from the specified array of bytes using the UTF-16LE charset, + or <code>null</code> if the input byte array was <code>null</code>.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_16LE" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_16LE</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +</dl> +</li> +</ul> +<a name="newStringUtf8-byte:A-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>newStringUtf8</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> newStringUtf8(byte[] bytes)</pre> +<div class="block">Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-8 charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - The bytes to be decoded into characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new <code>String</code> decoded from the specified array of bytes using the UTF-8 charset, + or <code>null</code> if the input byte array was <code>null</code>.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - Thrown if <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a> is not initialized, which should never happen since it is + required by the Java platform specification.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>As of 1.7, throws <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><code>NullPointerException</code></a> instead of UnsupportedEncodingException</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/StringUtils.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/StringUtils.html" target="_top">Frames</a></li> +<li><a href="StringUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base16.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base16.html new file mode 100644 index 0000000000000000000000000000000000000000..f4b6c2cc0f8470c358e152007eaead5f540fbe57 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base16.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.Base16 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.Base16 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base16.html" target="_top">Frames</a></li> +<li><a href="Base16.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.Base16" class="title">Uses of Class<br>org.apache.commons.codec.binary.Base16</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.Base16</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base16.html" target="_top">Frames</a></li> +<li><a href="Base16.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base16InputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base16InputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..c17ebb3639332dc7d08e38fc6f4ab1d995719d86 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base16InputStream.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.Base16InputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.Base16InputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base16InputStream.html" target="_top">Frames</a></li> +<li><a href="Base16InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.Base16InputStream" class="title">Uses of Class<br>org.apache.commons.codec.binary.Base16InputStream</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.Base16InputStream</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base16InputStream.html" target="_top">Frames</a></li> +<li><a href="Base16InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base16OutputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base16OutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..47019cccb6cc144e376928c23fd55386b7badf1c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base16OutputStream.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.Base16OutputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.Base16OutputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base16OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base16OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.Base16OutputStream" class="title">Uses of Class<br>org.apache.commons.codec.binary.Base16OutputStream</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.Base16OutputStream</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base16OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base16OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base32.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base32.html new file mode 100644 index 0000000000000000000000000000000000000000..209059f3f2e348a3a50331418376f03d5dae8bd3 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base32.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.Base32 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.Base32 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base32.html" target="_top">Frames</a></li> +<li><a href="Base32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.Base32" class="title">Uses of Class<br>org.apache.commons.codec.binary.Base32</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.Base32</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base32.html" target="_top">Frames</a></li> +<li><a href="Base32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base32InputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base32InputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..b0bc0270778d6b4800a6e5447aff7a44f8a8d922 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base32InputStream.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.Base32InputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.Base32InputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base32InputStream.html" target="_top">Frames</a></li> +<li><a href="Base32InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.Base32InputStream" class="title">Uses of Class<br>org.apache.commons.codec.binary.Base32InputStream</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.Base32InputStream</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base32InputStream.html" target="_top">Frames</a></li> +<li><a href="Base32InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base32OutputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base32OutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..8f511f3c0e7edadf64d01d422018a39b3bea12e3 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base32OutputStream.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.Base32OutputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.Base32OutputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base32OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base32OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.Base32OutputStream" class="title">Uses of Class<br>org.apache.commons.codec.binary.Base32OutputStream</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.Base32OutputStream</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base32OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base32OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base64.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base64.html new file mode 100644 index 0000000000000000000000000000000000000000..9f0335c1147380e09edaa4f4b6181ae262c58056 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base64.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.Base64 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.Base64 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base64.html" target="_top">Frames</a></li> +<li><a href="Base64.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.Base64" class="title">Uses of Class<br>org.apache.commons.codec.binary.Base64</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.Base64</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base64.html" target="_top">Frames</a></li> +<li><a href="Base64.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base64InputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base64InputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..bd27c95c62d86d6725a504b0f1193bee1e3fd51f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base64InputStream.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.Base64InputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.Base64InputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base64InputStream.html" target="_top">Frames</a></li> +<li><a href="Base64InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.Base64InputStream" class="title">Uses of Class<br>org.apache.commons.codec.binary.Base64InputStream</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.Base64InputStream</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base64InputStream.html" target="_top">Frames</a></li> +<li><a href="Base64InputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base64OutputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base64OutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..3d2b1cfedff0d09830d3c43e7f67d36f3fd09dc6 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Base64OutputStream.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.Base64OutputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.Base64OutputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base64OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base64OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.Base64OutputStream" class="title">Uses of Class<br>org.apache.commons.codec.binary.Base64OutputStream</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.Base64OutputStream</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Base64OutputStream.html" target="_top">Frames</a></li> +<li><a href="Base64OutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BaseNCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BaseNCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..82292a8d5c042a9d2c8504964c30f6f315fe72c2 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BaseNCodec.html @@ -0,0 +1,201 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.BaseNCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.BaseNCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/BaseNCodec.html" target="_top">Frames</a></li> +<li><a href="BaseNCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.BaseNCodec" class="title">Uses of Class<br>org.apache.commons.codec.binary.BaseNCodec</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a> in <a href="../../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation"> +<caption><span>Subclasses of <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a> in <a href="../../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a></span></code> +<div class="block">Provides Base16 encoding and decoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></span></code> +<div class="block">Provides Base32 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></span></code> +<div class="block">Provides Base64 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> +<caption><span>Constructors in <a href="../../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> with parameters of type <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html#BaseNCodecInputStream-java.io.InputStream-org.apache.commons.codec.binary.BaseNCodec-boolean-">BaseNCodecInputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> input, + <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a> baseNCodec, + boolean doEncode)</code> </td> +</tr> +<tr class="rowColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html#BaseNCodecOutputStream-java.io.OutputStream-org.apache.commons.codec.binary.BaseNCodec-boolean-">BaseNCodecOutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> output, + <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a> basedCodec, + boolean doEncode)</code> +<div class="block">TODO should this be protected?</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/BaseNCodec.html" target="_top">Frames</a></li> +<li><a href="BaseNCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BaseNCodecInputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BaseNCodecInputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..07bc277ae85181cfbcbbbc04f99cf52dbc5b2684 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BaseNCodecInputStream.html @@ -0,0 +1,181 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.BaseNCodecInputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.BaseNCodecInputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/BaseNCodecInputStream.html" target="_top">Frames</a></li> +<li><a href="BaseNCodecInputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.BaseNCodecInputStream" class="title">Uses of Class<br>org.apache.commons.codec.binary.BaseNCodecInputStream</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a> in <a href="../../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation"> +<caption><span>Subclasses of <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a> in <a href="../../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary">Base16InputStream</a></span></code> +<div class="block">Provides Base16 encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary">Base32InputStream</a></span></code> +<div class="block">Provides Base32 encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary">Base64InputStream</a></span></code> +<div class="block">Provides Base64 encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/BaseNCodecInputStream.html" target="_top">Frames</a></li> +<li><a href="BaseNCodecInputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BaseNCodecOutputStream.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BaseNCodecOutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..bcab03f816a1a785f4c121df83ce2854dc734d8a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BaseNCodecOutputStream.html @@ -0,0 +1,181 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.BaseNCodecOutputStream (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.BaseNCodecOutputStream (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/BaseNCodecOutputStream.html" target="_top">Frames</a></li> +<li><a href="BaseNCodecOutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.BaseNCodecOutputStream" class="title">Uses of Class<br>org.apache.commons.codec.binary.BaseNCodecOutputStream</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a> in <a href="../../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation"> +<caption><span>Subclasses of <a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a> in <a href="../../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary">Base16OutputStream</a></span></code> +<div class="block">Provides Hex encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary">Base32OutputStream</a></span></code> +<div class="block">Provides Base32 encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary">Base64OutputStream</a></span></code> +<div class="block">Provides Base64 encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/BaseNCodecOutputStream.html" target="_top">Frames</a></li> +<li><a href="BaseNCodecOutputStream.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BinaryCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BinaryCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..d7e28883f197a7b9d9bee336c2ade53d89ee8c4e --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/BinaryCodec.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.BinaryCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.BinaryCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/BinaryCodec.html" target="_top">Frames</a></li> +<li><a href="BinaryCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.BinaryCodec" class="title">Uses of Class<br>org.apache.commons.codec.binary.BinaryCodec</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.BinaryCodec</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/BinaryCodec.html" target="_top">Frames</a></li> +<li><a href="BinaryCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/CharSequenceUtils.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/CharSequenceUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..4cdce0616692df71ab81c800ceef05f28a6adbe1 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/CharSequenceUtils.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.CharSequenceUtils (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.CharSequenceUtils (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/CharSequenceUtils.html" target="_top">Frames</a></li> +<li><a href="CharSequenceUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.CharSequenceUtils" class="title">Uses of Class<br>org.apache.commons.codec.binary.CharSequenceUtils</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.CharSequenceUtils</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/CharSequenceUtils.html" target="_top">Frames</a></li> +<li><a href="CharSequenceUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Hex.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Hex.html new file mode 100644 index 0000000000000000000000000000000000000000..3bb74bae91ec4c22ebbd3795ffed70b37f07fa8a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/Hex.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.Hex (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.Hex (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Hex.html" target="_top">Frames</a></li> +<li><a href="Hex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.Hex" class="title">Uses of Class<br>org.apache.commons.codec.binary.Hex</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.Hex</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/Hex.html" target="_top">Frames</a></li> +<li><a href="Hex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/StringUtils.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/StringUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..8835d49745f462b761937c7da7ae709533b038c0 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/class-use/StringUtils.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.binary.StringUtils (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.binary.StringUtils (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/StringUtils.html" target="_top">Frames</a></li> +<li><a href="StringUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.binary.StringUtils" class="title">Uses of Class<br>org.apache.commons.codec.binary.StringUtils</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.binary.StringUtils</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/binary/class-use/StringUtils.html" target="_top">Frames</a></li> +<li><a href="StringUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-frame.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-frame.html new file mode 100644 index 0000000000000000000000000000000000000000..a6ea7eff937dfa43c04605052cb966383d5d8e8f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-frame.html @@ -0,0 +1,35 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.binary (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<h1 class="bar"><a href="../../../../../org/apache/commons/codec/binary/package-summary.html" target="classFrame">org.apache.commons.codec.binary</a></h1> +<div class="indexContainer"> +<h2 title="Classes">Classes</h2> +<ul title="Classes"> +<li><a href="Base16.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base16</a></li> +<li><a href="Base16InputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base16InputStream</a></li> +<li><a href="Base16OutputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base16OutputStream</a></li> +<li><a href="Base32.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base32</a></li> +<li><a href="Base32InputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base32InputStream</a></li> +<li><a href="Base32OutputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base32OutputStream</a></li> +<li><a href="Base64.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base64</a></li> +<li><a href="Base64InputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base64InputStream</a></li> +<li><a href="Base64OutputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">Base64OutputStream</a></li> +<li><a href="BaseNCodec.html" title="class in org.apache.commons.codec.binary" target="classFrame">BaseNCodec</a></li> +<li><a href="BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">BaseNCodecInputStream</a></li> +<li><a href="BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary" target="classFrame">BaseNCodecOutputStream</a></li> +<li><a href="BinaryCodec.html" title="class in org.apache.commons.codec.binary" target="classFrame">BinaryCodec</a></li> +<li><a href="CharSequenceUtils.html" title="class in org.apache.commons.codec.binary" target="classFrame">CharSequenceUtils</a></li> +<li><a href="Hex.html" title="class in org.apache.commons.codec.binary" target="classFrame">Hex</a></li> +<li><a href="StringUtils.html" title="class in org.apache.commons.codec.binary" target="classFrame">StringUtils</a></li> +</ul> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-summary.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-summary.html new file mode 100644 index 0000000000000000000000000000000000000000..3d06506a39d1c1d66883a410f31d51da0e42a765 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-summary.html @@ -0,0 +1,245 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.binary (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.binary (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/cli/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Package" class="title">Package org.apache.commons.codec.binary</h1> +<div class="docSummary"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</div> +<p>See: <a href="#package.description">Description</a></p> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> +<caption><span>Class Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Class</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a></td> +<td class="colLast"> +<div class="block">Provides Base16 encoding and decoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary">Base16InputStream</a></td> +<td class="colLast"> +<div class="block">Provides Base16 encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary">Base16OutputStream</a></td> +<td class="colLast"> +<div class="block">Provides Hex encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></td> +<td class="colLast"> +<div class="block">Provides Base32 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary">Base32InputStream</a></td> +<td class="colLast"> +<div class="block">Provides Base32 encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary">Base32OutputStream</a></td> +<td class="colLast"> +<div class="block">Provides Base32 encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></td> +<td class="colLast"> +<div class="block">Provides Base64 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary">Base64InputStream</a></td> +<td class="colLast"> +<div class="block">Provides Base64 encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary">Base64OutputStream</a></td> +<td class="colLast"> +<div class="block">Provides Base64 encoding and decoding in a streaming fashion (unlimited size).</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></td> +<td class="colLast"> +<div class="block">Abstract superclass for Base-N encoders and decoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecInputStream</a></td> +<td class="colLast"> +<div class="block">Abstract superclass for Base-N input streams.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary">BaseNCodecOutputStream</a></td> +<td class="colLast"> +<div class="block">Abstract superclass for Base-N output streams.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></td> +<td class="colLast"> +<div class="block">Converts between byte arrays and strings of "0"s and "1"s.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary">CharSequenceUtils</a></td> +<td class="colLast"> +<div class="block"> + Operations on <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang"><code>CharSequence</code></a> that are <code>null</code> safe.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></td> +<td class="colLast"> +<div class="block">Converts hexadecimal Strings.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary">StringUtils</a></td> +<td class="colLast"> +<div class="block">Converts String to and from bytes using the encodings required by the Java specification.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +<a name="package.description"> +<!-- --> +</a> +<h2 title="Package org.apache.commons.codec.binary Description">Package org.apache.commons.codec.binary Description</h2> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/cli/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-tree.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-tree.html new file mode 100644 index 0000000000000000000000000000000000000000..638391311637a95384ff3d2c63d28e304506d6ea --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-tree.html @@ -0,0 +1,178 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.binary Class Hierarchy (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.binary Class Hierarchy (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/package-tree.html">Prev</a></li> +<li><a href="../../../../../org/apache/commons/codec/cli/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 class="title">Hierarchy For Package org.apache.commons.codec.binary</h1> +<span class="packageHierarchyLabel">Package Hierarchies:</span> +<ul class="horizontal"> +<li><a href="../../../../../overview-tree.html">All Packages</a></li> +</ul> +</div> +<div class="contentContainer"> +<h2 title="Class Hierarchy">Class Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BaseNCodec</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>) +<ul> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base16</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base32</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base64</span></a></li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BinaryCodec</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">CharSequenceUtils</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Hex</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>)</li> +<li type="circle">java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><span class="typeNameLink">InputStream</span></a> (implements java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>) +<ul> +<li type="circle">java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io"><span class="typeNameLink">FilterInputStream</span></a> +<ul> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BaseNCodecInputStream</span></a> +<ul> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base16InputStream</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base32InputStream</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base64InputStream</span></a></li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +<li type="circle">java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><span class="typeNameLink">OutputStream</span></a> (implements java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a>) +<ul> +<li type="circle">java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io"><span class="typeNameLink">FilterOutputStream</span></a> +<ul> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BaseNCodecOutputStream</span></a> +<ul> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base16OutputStream</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base32OutputStream</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base64OutputStream</span></a></li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.binary.<a href="../../../../../org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">StringUtils</span></a></li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/package-tree.html">Prev</a></li> +<li><a href="../../../../../org/apache/commons/codec/cli/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-use.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-use.html new file mode 100644 index 0000000000000000000000000000000000000000..1423ba23461483184ce160a221694ca0de530c61 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/binary/package-use.html @@ -0,0 +1,172 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Package org.apache.commons.codec.binary (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Package org.apache.commons.codec.binary (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Uses of Package org.apache.commons.codec.binary" class="title">Uses of Package<br>org.apache.commons.codec.binary</h1> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> used by <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="../../../../../org/apache/commons/codec/binary/class-use/BaseNCodec.html#org.apache.commons.codec.binary">BaseNCodec</a> +<div class="block">Abstract superclass for Base-N encoders and decoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../../org/apache/commons/codec/binary/class-use/BaseNCodecInputStream.html#org.apache.commons.codec.binary">BaseNCodecInputStream</a> +<div class="block">Abstract superclass for Base-N input streams.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../../org/apache/commons/codec/binary/class-use/BaseNCodecOutputStream.html#org.apache.commons.codec.binary">BaseNCodecOutputStream</a> +<div class="block">Abstract superclass for Base-N output streams.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/binary/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/BinaryDecoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/BinaryDecoder.html new file mode 100644 index 0000000000000000000000000000000000000000..01a8ea189b69bd2a4d65b60a78b4dd2c787fd70d --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/BinaryDecoder.html @@ -0,0 +1,238 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Interface org.apache.commons.codec.BinaryDecoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Interface org.apache.commons.codec.BinaryDecoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/BinaryDecoder.html" target="_top">Frames</a></li> +<li><a href="BinaryDecoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Interface org.apache.commons.codec.BinaryDecoder" class="title">Uses of Interface<br>org.apache.commons.codec.BinaryDecoder</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.net">org.apache.commons.codec.net</a></td> +<td class="colLast"> +<div class="block"> + Network related encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a> in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> that implement <a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a></span></code> +<div class="block">Provides Base16 encoding and decoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></span></code> +<div class="block">Provides Base32 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></span></code> +<div class="block">Provides Base64 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></span></code> +<div class="block">Abstract superclass for Base-N encoders and decoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></span></code> +<div class="block">Converts between byte arrays and strings of "0"s and "1"s.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></span></code> +<div class="block">Converts hexadecimal Strings.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.net"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a> in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a> that implement <a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></span></code> +<div class="block">Implements the Percent-Encoding scheme, as described in HTTP 1.1 specification.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></span></code> +<div class="block">Codec for the Quoted-Printable section of <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></span></code> +<div class="block">Implements the 'www-form-urlencoded' encoding scheme, also misleadingly known as URL encoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/BinaryDecoder.html" target="_top">Frames</a></li> +<li><a href="BinaryDecoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/BinaryEncoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/BinaryEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..451a168f18e89a1b4e758db6197c1421df72ab7c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/BinaryEncoder.html @@ -0,0 +1,238 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Interface org.apache.commons.codec.BinaryEncoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Interface org.apache.commons.codec.BinaryEncoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/BinaryEncoder.html" target="_top">Frames</a></li> +<li><a href="BinaryEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Interface org.apache.commons.codec.BinaryEncoder" class="title">Uses of Interface<br>org.apache.commons.codec.BinaryEncoder</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.net">org.apache.commons.codec.net</a></td> +<td class="colLast"> +<div class="block"> + Network related encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a> in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> that implement <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a></span></code> +<div class="block">Provides Base16 encoding and decoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></span></code> +<div class="block">Provides Base32 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></span></code> +<div class="block">Provides Base64 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></span></code> +<div class="block">Abstract superclass for Base-N encoders and decoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></span></code> +<div class="block">Converts between byte arrays and strings of "0"s and "1"s.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></span></code> +<div class="block">Converts hexadecimal Strings.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.net"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a> in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a> that implement <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></span></code> +<div class="block">Implements the Percent-Encoding scheme, as described in HTTP 1.1 specification.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></span></code> +<div class="block">Codec for the Quoted-Printable section of <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></span></code> +<div class="block">Implements the 'www-form-urlencoded' encoding scheme, also misleadingly known as URL encoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/BinaryEncoder.html" target="_top">Frames</a></li> +<li><a href="BinaryEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/CharEncoding.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/CharEncoding.html new file mode 100644 index 0000000000000000000000000000000000000000..c696697cbcd967739d39d04cd12cdbbf5ce07757 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/CharEncoding.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.CharEncoding (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.CharEncoding (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/CharEncoding.html" target="_top">Frames</a></li> +<li><a href="CharEncoding.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.CharEncoding" class="title">Uses of Class<br>org.apache.commons.codec.CharEncoding</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.CharEncoding</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/CharEncoding.html" target="_top">Frames</a></li> +<li><a href="CharEncoding.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Charsets.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Charsets.html new file mode 100644 index 0000000000000000000000000000000000000000..17d2e798ced518d18f1682ea02e8b4daa8e0ed11 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Charsets.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.Charsets (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.Charsets (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/Charsets.html" target="_top">Frames</a></li> +<li><a href="Charsets.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.Charsets" class="title">Uses of Class<br>org.apache.commons.codec.Charsets</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.Charsets</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/Charsets.html" target="_top">Frames</a></li> +<li><a href="Charsets.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/CodecPolicy.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/CodecPolicy.html new file mode 100644 index 0000000000000000000000000000000000000000..d7c11d77e53788e173aba83a1d9e9396c8f363f5 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/CodecPolicy.html @@ -0,0 +1,343 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.CodecPolicy (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.CodecPolicy (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/CodecPolicy.html" target="_top">Frames</a></li> +<li><a href="CodecPolicy.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.CodecPolicy" class="title">Uses of Class<br>org.apache.commons.codec.CodecPolicy</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec">org.apache.commons.codec</a></td> +<td class="colLast"> +<div class="block">Interfaces and classes used by the various implementations in + the sub-packages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.net">org.apache.commons.codec.net</a></td> +<td class="colLast"> +<div class="block"> + Network related encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a> that return <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></code></td> +<td class="colLast"><span class="typeNameLabel">CodecPolicy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/CodecPolicy.html#valueOf-java.lang.String-">valueOf</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a>[]</code></td> +<td class="colLast"><span class="typeNameLabel">CodecPolicy.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/CodecPolicy.html#values--">values</a></span>()</code> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> +<caption><span>Fields in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> declared as <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>protected static <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></code></td> +<td class="colLast"><span class="typeNameLabel">BaseNCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#DECODING_POLICY_DEFAULT">DECODING_POLICY_DEFAULT</a></span></code> +<div class="block">The default decoding policy.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> that return <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></code></td> +<td class="colLast"><span class="typeNameLabel">BaseNCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getCodecPolicy--">getCodecPolicy</a></span>()</code> +<div class="block">Returns the decoding behavior policy.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> +<caption><span>Constructors in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> with parameters of type <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16.html#Base16-boolean-org.apache.commons.codec.CodecPolicy-">Base16</a></span>(boolean lowerCase, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base16 codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16InputStream.html#Base16InputStream-java.io.InputStream-boolean-boolean-org.apache.commons.codec.CodecPolicy-">Base16InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode, + boolean lowerCase, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original + provided InputStream.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16OutputStream.html#Base16OutputStream-java.io.OutputStream-boolean-boolean-org.apache.commons.codec.CodecPolicy-">Base16OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode, + boolean lowerCase, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the + original provided OutputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html#Base32-int-byte:A-boolean-byte-org.apache.commons.codec.CodecPolicy-">Base32</a></span>(int lineLength, + byte[] lineSeparator, + boolean useHex, + byte padding, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base32 / Base32 Hex codec used for decoding and encoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32InputStream.html#Base32InputStream-java.io.InputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base32InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> input, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original + provided InputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32OutputStream.html#Base32OutputStream-java.io.OutputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base32OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> ouput, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the + original provided OutputStream.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html#Base64-int-byte:A-boolean-org.apache.commons.codec.CodecPolicy-">Base64</a></span>(int lineLength, + byte[] lineSeparator, + boolean urlSafe, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64InputStream.html#Base64InputStream-java.io.InputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base64InputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original + provided InputStream.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html#Base64OutputStream-java.io.OutputStream-boolean-int-byte:A-org.apache.commons.codec.CodecPolicy-">Base64OutputStream</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, + boolean doEncode, + int lineLength, + byte[] lineSeparator, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the + original provided OutputStream.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#BaseNCodec-int-int-int-int-byte-org.apache.commons.codec.CodecPolicy-">BaseNCodec</a></span>(int unencodedBlockSize, + int encodedBlockSize, + int lineLength, + int chunkSeparatorLength, + byte pad, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Note <code>lineLength</code> is rounded down to the nearest multiple of the encoded block size.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.net"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> +<caption><span>Constructors in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a> with parameters of type <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#BCodec-java.nio.charset.Charset-org.apache.commons.codec.CodecPolicy-">BCodec</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/CodecPolicy.html" target="_top">Frames</a></li> +<li><a href="CodecPolicy.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Decoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Decoder.html new file mode 100644 index 0000000000000000000000000000000000000000..d93ce5ed827a571bd4f23c1efea05ee9b552dce3 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Decoder.html @@ -0,0 +1,286 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Interface org.apache.commons.codec.Decoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Interface org.apache.commons.codec.Decoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/Decoder.html" target="_top">Frames</a></li> +<li><a href="Decoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Interface org.apache.commons.codec.Decoder" class="title">Uses of Interface<br>org.apache.commons.codec.Decoder</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec">org.apache.commons.codec</a></td> +<td class="colLast"> +<div class="block">Interfaces and classes used by the various implementations in + the sub-packages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.net">org.apache.commons.codec.net</a></td> +<td class="colLast"> +<div class="block"> + Network related encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a> in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subinterfaces, and an explanation"> +<caption><span>Subinterfaces of <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a> in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Interface and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>interface </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></span></code> +<div class="block">Defines common decoding methods for byte array decoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>interface </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></span></code> +<div class="block">Defines common decoding methods for String decoders.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a> in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> that implement <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a></span></code> +<div class="block">Provides Base16 encoding and decoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></span></code> +<div class="block">Provides Base32 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></span></code> +<div class="block">Provides Base64 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></span></code> +<div class="block">Abstract superclass for Base-N encoders and decoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></span></code> +<div class="block">Converts between byte arrays and strings of "0"s and "1"s.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></span></code> +<div class="block">Converts hexadecimal Strings.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.net"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a> in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a> that implement <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></span></code> +<div class="block">Identical to the Base64 encoding defined by <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> + and allows a character set to be specified.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></span></code> +<div class="block">Implements the Percent-Encoding scheme, as described in HTTP 1.1 specification.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></span></code> +<div class="block">Similar to the Quoted-Printable content-transfer-encoding defined in + <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> and designed to allow text containing mostly ASCII + characters to be decipherable on an ASCII terminal without decoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></span></code> +<div class="block">Codec for the Quoted-Printable section of <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></span></code> +<div class="block">Implements the 'www-form-urlencoded' encoding scheme, also misleadingly known as URL encoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/Decoder.html" target="_top">Frames</a></li> +<li><a href="Decoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/DecoderException.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/DecoderException.html new file mode 100644 index 0000000000000000000000000000000000000000..032d3e1124ee959777ae92b0ebefdf75c62aad7f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/DecoderException.html @@ -0,0 +1,390 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.DecoderException (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.DecoderException (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/DecoderException.html" target="_top">Frames</a></li> +<li><a href="DecoderException.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.DecoderException" class="title">Uses of Class<br>org.apache.commons.codec.DecoderException</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec">org.apache.commons.codec</a></td> +<td class="colLast"> +<div class="block">Interfaces and classes used by the various implementations in + the sub-packages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.net">org.apache.commons.codec.net</a></td> +<td class="colLast"> +<div class="block"> + Network related encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a> in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a> that throw <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">BinaryDecoder.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html#decode-byte:A-">decode</a></span>(byte[] source)</code> +<div class="block">Decodes a byte array and returns the results as a byte array.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">Decoder.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source)</code> +<div class="block">Decodes an "encoded" Object and returns a "decoded" Object.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">StringDecoder.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/StringDecoder.html#decode-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> +<div class="block">Decodes a String and returns a String.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a> in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> that throw <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">Hex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decode-byte:A-">decode</a></span>(byte[] array)</code> +<div class="block">Converts an array of character bytes representing hexadecimal values into an array of bytes of those same values.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">Hex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decode-java.nio.ByteBuffer-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer)</code> +<div class="block">Converts a buffer of character bytes representing hexadecimal values into an array of bytes of those same values.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">BinaryCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ascii)</code> +<div class="block">Decodes a byte array where each byte represents an ASCII '0' or '1'.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">BaseNCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Decodes an Object using the Base-N algorithm.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">Hex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> object)</code> +<div class="block">Converts a String or an array of character bytes representing hexadecimal values into an array of bytes of those + same values.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">Hex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decodeHex-char:A-">decodeHex</a></span>(char[] data)</code> +<div class="block">Converts an array of characters representing hexadecimal values into an array of bytes of those same values.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><span class="typeNameLabel">Hex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decodeHex-char:A-byte:A-int-">decodeHex</a></span>(char[] data, + byte[] out, + int outOffset)</code> +<div class="block">Converts an array of characters representing hexadecimal values into an array of bytes of those same values.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">Hex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#decodeHex-java.lang.String-">decodeHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Converts a String representing hexadecimal values into an array of bytes of those same values.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected static int</code></td> +<td class="colLast"><span class="typeNameLabel">Hex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#toDigit-char-int-">toDigit</a></span>(char ch, + int index)</code> +<div class="block">Converts a hexadecimal character to an integer.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.net"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a> in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a> that throw <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">QuotedPrintableCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-byte:A-">decode</a></span>(byte[] bytes)</code> +<div class="block">Decodes an array of quoted-printable characters into an array of original bytes.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">URLCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#decode-byte:A-">decode</a></span>(byte[] bytes)</code> +<div class="block">Decodes an array of URL safe 7-bit characters into an array of original bytes.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">PercentCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html#decode-byte:A-">decode</a></span>(byte[] bytes)</code> +<div class="block">Decode bytes encoded with Percent-Encoding based on RFC 3986.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">BCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> +<div class="block">Decodes a Base64 object into its original form.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">QCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Decodes a quoted-printable object into its original form.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">QuotedPrintableCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Decodes a quoted-printable object into its original form.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">URLCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Decodes a URL safe object into its original form.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">PercentCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Decodes a byte[] Object, whose bytes are encoded with Percent-Encoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">BCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#decode-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> +<div class="block">Decodes a Base64 string into its original form.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">QCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#decode-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Decodes a quoted-printable string into its original form.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">QuotedPrintableCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr)</code> +<div class="block">Decodes a quoted-printable string into its original form using the default string Charset.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">URLCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#decode-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Decodes a URL safe string into its original form using the default string charset.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">QuotedPrintableCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.String-java.nio.charset.Charset-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> sourceCharset)</code> +<div class="block">Decodes a quoted-printable string into its original form using the specified string Charset.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">QuotedPrintableCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.String-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceCharset)</code> +<div class="block">Decodes a quoted-printable string into its original form using the specified string Charset.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">URLCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#decode-java.lang.String-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</code> +<div class="block">Decodes a URL safe string into its original form using the specified encoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">QuotedPrintableCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decodeQuotedPrintable-byte:A-">decodeQuotedPrintable</a></span>(byte[] bytes)</code> +<div class="block">Decodes an array quoted-printable characters into an array of original bytes.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">URLCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#decodeUrl-byte:A-">decodeUrl</a></span>(byte[] bytes)</code> +<div class="block">Decodes an array of URL safe 7-bit characters into an array of original bytes.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">QCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#doDecoding-byte:A-">doDecoding</a></span>(byte[] bytes)</code> </td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/DecoderException.html" target="_top">Frames</a></li> +<li><a href="DecoderException.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Encoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Encoder.html new file mode 100644 index 0000000000000000000000000000000000000000..21c21818c9e54ed1bab49b5018c55c75022a252b --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Encoder.html @@ -0,0 +1,407 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Interface org.apache.commons.codec.Encoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Interface org.apache.commons.codec.Encoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/Encoder.html" target="_top">Frames</a></li> +<li><a href="Encoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Interface org.apache.commons.codec.Encoder" class="title">Uses of Interface<br>org.apache.commons.codec.Encoder</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec">org.apache.commons.codec</a></td> +<td class="colLast"> +<div class="block">Interfaces and classes used by the various implementations in + the sub-packages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language">org.apache.commons.codec.language</a></td> +<td class="colLast"> +<div class="block"> + Language and phonetic encoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.net">org.apache.commons.codec.net</a></td> +<td class="colLast"> +<div class="block"> + Network related encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a> in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subinterfaces, and an explanation"> +<caption><span>Subinterfaces of <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a> in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Interface and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>interface </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></span></code> +<div class="block">Defines common encoding methods for byte array encoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>interface </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></span></code> +<div class="block">Defines common encoding methods for String encoders.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a> in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> that implement <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary">Base16</a></span></code> +<div class="block">Provides Base16 encoding and decoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</a></span></code> +<div class="block">Provides Base32 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</a></span></code> +<div class="block">Provides Base64 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary">BaseNCodec</a></span></code> +<div class="block">Abstract superclass for Base-N encoders and decoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary">BinaryCodec</a></span></code> +<div class="block">Converts between byte arrays and strings of "0"s and "1"s.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary">Hex</a></span></code> +<div class="block">Converts hexadecimal Strings.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.language"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a> in <a href="../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a> that implement <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></span></code> +<div class="block">Encodes a string into a Caverphone value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Caverphone</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">1.5 Replaced by <a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><code>Caverphone2</code></a>, will be removed in 2.0.</span></div> +</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Caverphone1</a></span></code> +<div class="block">Encodes a string into a Caverphone 1.0 value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Caverphone2</a></span></code> +<div class="block">Encodes a string into a Caverphone 2.0 value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">ColognePhonetic</a></span></code> +<div class="block">Encodes a string into a Cologne Phonetic value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">DaitchMokotoffSoundex</a></span></code> +<div class="block">Encodes a string into a Daitch-Mokotoff Soundex value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></span></code> +<div class="block">Encodes a string into a double metaphone value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">MatchRatingApproachEncoder</a></span></code> +<div class="block">Match Rating Approach Phonetic Algorithm Developed by <CITE>Western Airlines</CITE> in 1977.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a></span></code> +<div class="block">Encodes a string into a Metaphone value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a></span></code> +<div class="block">Encodes a string into a NYSIIS value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></span></code> +<div class="block">Encodes a string into a Refined Soundex value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></span></code> +<div class="block">Encodes a string into a Soundex value.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a> in <a href="../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that implement <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></span></code> +<div class="block">Encodes strings into their Beider-Morse phonetic encoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.net"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a> in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a> that implement <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></span></code> +<div class="block">Identical to the Base64 encoding defined by <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> + and allows a character set to be specified.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></span></code> +<div class="block">Implements the Percent-Encoding scheme, as described in HTTP 1.1 specification.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></span></code> +<div class="block">Similar to the Quoted-Printable content-transfer-encoding defined in + <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> and designed to allow text containing mostly ASCII + characters to be decipherable on an ASCII terminal without decoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></span></code> +<div class="block">Codec for the Quoted-Printable section of <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></span></code> +<div class="block">Implements the 'www-form-urlencoded' encoding scheme, also misleadingly known as URL encoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/Encoder.html" target="_top">Frames</a></li> +<li><a href="Encoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/EncoderException.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/EncoderException.html new file mode 100644 index 0000000000000000000000000000000000000000..acae4841605001b395ca8ec5bc190ca24bdfee90 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/EncoderException.html @@ -0,0 +1,460 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.EncoderException (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.EncoderException (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/EncoderException.html" target="_top">Frames</a></li> +<li><a href="EncoderException.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.EncoderException" class="title">Uses of Class<br>org.apache.commons.codec.EncoderException</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec">org.apache.commons.codec</a></td> +<td class="colLast"> +<div class="block">Interfaces and classes used by the various implementations in + the sub-packages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language">org.apache.commons.codec.language</a></td> +<td class="colLast"> +<div class="block"> + Language and phonetic encoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.net">org.apache.commons.codec.net</a></td> +<td class="colLast"> +<div class="block"> + Network related encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a> in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a> that throw <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">BinaryEncoder.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-">encode</a></span>(byte[] source)</code> +<div class="block">Encodes a byte array and return the encoded data as a byte array.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">Encoder.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source)</code> +<div class="block">Encodes an "Object" and returns the encoded content as an Object.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">StringEncoder.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> +<div class="block">Encodes a String and returns a String.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a> in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a> that throw <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">BinaryCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BinaryCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> raw)</code> +<div class="block">Converts an array of raw binary data into an array of ASCII 0 and 1 chars.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">BaseNCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the Base-N algorithm.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">Hex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/binary/Hex.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> object)</code> +<div class="block">Converts a String or an array of bytes into an array of characters representing the hexadecimal values of each + byte in order.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.language"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a> in <a href="../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a> that throw <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><span class="typeNameLabel">Soundex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#difference-java.lang.String-java.lang.String-">difference</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s2)</code> +<div class="block">Encodes the Strings and returns the number of characters in the two encoded Strings that are the same.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><span class="typeNameLabel">RefinedSoundex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html#difference-java.lang.String-java.lang.String-">difference</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s2)</code> +<div class="block">Returns the number of characters in the two encoded Strings that are the + same.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">Soundex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the soundex algorithm.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">AbstractCaverphone.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source)</code> +<div class="block">Encodes an Object using the caverphone algorithm.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">RefinedSoundex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the refined soundex algorithm.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">DaitchMokotoffSoundex.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the Daitch-Mokotoff soundex algorithm without branching.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">DoubleMetaphone.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encode the value using DoubleMetaphone.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">Caverphone.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +<div class="block">Encodes an Object using the caverphone algorithm.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">ColognePhonetic.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> object)</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">Nysiis.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Nysiis.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the NYSIIS algorithm.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">Metaphone.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Metaphone.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the metaphone algorithm.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">MatchRatingApproachEncoder.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> pObject)</code> +<div class="block">Encodes an Object using the Match Rating Approach algorithm.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><span class="typeNameLabel">AbstractCaverphone.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html#isEncodeEqual-java.lang.String-java.lang.String-">isEncodeEqual</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str2)</code> +<div class="block">Tests if the encodings of two strings are equal.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a> in <a href="../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that throw <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">BeiderMorseEncoder.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source)</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">BeiderMorseEncoder.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> </td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.net"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a> in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a> that throw <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><span class="typeNameLabel">PercentCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html#encode-byte:A-">encode</a></span>(byte[] bytes)</code> +<div class="block">Percent-Encoding based on RFC 3986.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">BCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> +<div class="block">Encodes an object into its Base64 form using the default Charset.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">QCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an object into its quoted-printable form using the default Charset.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">QuotedPrintableCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an object into its quoted-printable safe form.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">URLCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an object into its URL safe form.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><span class="typeNameLabel">PercentCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an object into using the Percent-Encoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">BCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> strSource)</code> +<div class="block">Encodes a string into its Base64 form using the default Charset.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">QCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr)</code> +<div class="block">Encodes a string into its quoted-printable form using the default Charset.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">QuotedPrintableCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr)</code> +<div class="block">Encodes a string into its quoted-printable form using the default string Charset.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">URLCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Encodes a string into its URL safe form using the default string charset.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">BCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode-java.lang.String-java.nio.charset.Charset-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> strSource, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> sourceCharset)</code> +<div class="block">Encodes a string into its Base64 form using the specified Charset.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">QCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#encode-java.lang.String-java.nio.charset.Charset-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> sourceCharset)</code> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">BCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode-java.lang.String-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> strSource, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceCharset)</code> +<div class="block">Encodes a string into its Base64 form using the specified Charset.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">QCodec.</span><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#encode-java.lang.String-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceCharset)</code> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/EncoderException.html" target="_top">Frames</a></li> +<li><a href="EncoderException.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Resources.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Resources.html new file mode 100644 index 0000000000000000000000000000000000000000..ce33cabf34257ef6b1d49a5911148a2f677be775 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/Resources.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.Resources (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.Resources (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/Resources.html" target="_top">Frames</a></li> +<li><a href="Resources.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.Resources" class="title">Uses of Class<br>org.apache.commons.codec.Resources</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.Resources</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/Resources.html" target="_top">Frames</a></li> +<li><a href="Resources.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/StringDecoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/StringDecoder.html new file mode 100644 index 0000000000000000000000000000000000000000..2bbf46ac2d82670d98cc5446419b82c3c1e252fc --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/StringDecoder.html @@ -0,0 +1,191 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Interface org.apache.commons.codec.StringDecoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Interface org.apache.commons.codec.StringDecoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/StringDecoder.html" target="_top">Frames</a></li> +<li><a href="StringDecoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Interface org.apache.commons.codec.StringDecoder" class="title">Uses of Interface<br>org.apache.commons.codec.StringDecoder</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.net">org.apache.commons.codec.net</a></td> +<td class="colLast"> +<div class="block"> + Network related encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.net"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a> in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a> that implement <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></span></code> +<div class="block">Identical to the Base64 encoding defined by <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> + and allows a character set to be specified.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></span></code> +<div class="block">Similar to the Quoted-Printable content-transfer-encoding defined in + <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> and designed to allow text containing mostly ASCII + characters to be decipherable on an ASCII terminal without decoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></span></code> +<div class="block">Codec for the Quoted-Printable section of <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></span></code> +<div class="block">Implements the 'www-form-urlencoded' encoding scheme, also misleadingly known as URL encoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/StringDecoder.html" target="_top">Frames</a></li> +<li><a href="StringDecoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/StringEncoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/StringEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..ecdd95e36c92cb9d8b7afde5e4f7d9daacb52e3a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/StringEncoder.html @@ -0,0 +1,337 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Interface org.apache.commons.codec.StringEncoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Interface org.apache.commons.codec.StringEncoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/StringEncoder.html" target="_top">Frames</a></li> +<li><a href="StringEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Interface org.apache.commons.codec.StringEncoder" class="title">Uses of Interface<br>org.apache.commons.codec.StringEncoder</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec">org.apache.commons.codec</a></td> +<td class="colLast"> +<div class="block">Interfaces and classes used by the various implementations in + the sub-packages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language">org.apache.commons.codec.language</a></td> +<td class="colLast"> +<div class="block"> + Language and phonetic encoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.net">org.apache.commons.codec.net</a></td> +<td class="colLast"> +<div class="block"> + Network related encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a> in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> +<caption><span>Constructors in <a href="../../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a> with parameters of type <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/StringEncoderComparator.html#StringEncoderComparator-org.apache.commons.codec.StringEncoder-">StringEncoderComparator</a></span>(<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a> stringEncoder)</code> +<div class="block">Constructs a new instance with the given algorithm.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.language"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a> in <a href="../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a> that implement <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></span></code> +<div class="block">Encodes a string into a Caverphone value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Caverphone</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">1.5 Replaced by <a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><code>Caverphone2</code></a>, will be removed in 2.0.</span></div> +</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Caverphone1</a></span></code> +<div class="block">Encodes a string into a Caverphone 1.0 value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Caverphone2</a></span></code> +<div class="block">Encodes a string into a Caverphone 2.0 value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">ColognePhonetic</a></span></code> +<div class="block">Encodes a string into a Cologne Phonetic value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">DaitchMokotoffSoundex</a></span></code> +<div class="block">Encodes a string into a Daitch-Mokotoff Soundex value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></span></code> +<div class="block">Encodes a string into a double metaphone value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">MatchRatingApproachEncoder</a></span></code> +<div class="block">Match Rating Approach Phonetic Algorithm Developed by <CITE>Western Airlines</CITE> in 1977.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a></span></code> +<div class="block">Encodes a string into a Metaphone value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a></span></code> +<div class="block">Encodes a string into a NYSIIS value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></span></code> +<div class="block">Encodes a string into a Refined Soundex value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></span></code> +<div class="block">Encodes a string into a Soundex value.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a> in <a href="../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that implement <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></span></code> +<div class="block">Encodes strings into their Beider-Morse phonetic encoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.net"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a> in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a> that implement <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></span></code> +<div class="block">Identical to the Base64 encoding defined by <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> + and allows a character set to be specified.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></span></code> +<div class="block">Similar to the Quoted-Printable content-transfer-encoding defined in + <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> and designed to allow text containing mostly ASCII + characters to be decipherable on an ASCII terminal without decoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></span></code> +<div class="block">Codec for the Quoted-Printable section of <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></span></code> +<div class="block">Implements the 'www-form-urlencoded' encoding scheme, also misleadingly known as URL encoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/StringEncoder.html" target="_top">Frames</a></li> +<li><a href="StringEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/StringEncoderComparator.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/StringEncoderComparator.html new file mode 100644 index 0000000000000000000000000000000000000000..1b0d25635e2f76109641460feed850dc57cf06dd --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/class-use/StringEncoderComparator.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.StringEncoderComparator (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.StringEncoderComparator (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/StringEncoderComparator.html" target="_top">Frames</a></li> +<li><a href="StringEncoderComparator.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.StringEncoderComparator" class="title">Uses of Class<br>org.apache.commons.codec.StringEncoderComparator</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.StringEncoderComparator</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/class-use/StringEncoderComparator.html" target="_top">Frames</a></li> +<li><a href="StringEncoderComparator.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/Digest.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/Digest.html new file mode 100644 index 0000000000000000000000000000000000000000..bd7df753190252fb0dc95c5962f74401ed21012a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/Digest.html @@ -0,0 +1,279 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Digest (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Digest (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":10}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Digest.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/cli/Digest.html" target="_top">Frames</a></li> +<li><a href="Digest.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.cli</div> +<h2 title="Class Digest" class="title">Class Digest</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.cli.Digest</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Digest</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">A minimal command line to run digest over files, directories or a string</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/cli/Digest.html#main-java.lang.String:A-"><code>main(String[])</code></a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/cli/Digest.html#main-java.lang.String:A-">main</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] args)</code> +<div class="block">Runs the digest algorithm in <code>args[0]</code> on the file in <code>args[1]</code>.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/cli/Digest.html#toString--">toString</a></span>()</code> </td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="main-java.lang.String:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>main</h4> +<pre>public static void main(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] args) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Runs the digest algorithm in <code>args[0]</code> on the file in <code>args[1]</code>. If there is no <code>args[1]</code>, use + standard input. + + <p> + The algorithm can also be <code>ALL</code> or <code>*</code> to output one line for each known algorithm. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>args</code> - <code>args[0]</code> is one of <a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest"><code>MessageDigestAlgorithms</code></a> name, + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> name, <code>ALL</code>, or <code>*</code>. + <code>args[1+]</code> is a FILE/DIRECTORY/String.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an error occurs</dd> +</dl> +</li> +</ul> +<a name="toString--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>toString</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Digest.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/cli/Digest.html" target="_top">Frames</a></li> +<li><a href="Digest.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/class-use/Digest.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/class-use/Digest.html new file mode 100644 index 0000000000000000000000000000000000000000..36e026c90c9ac2c2682ea115ceffeb57c5e1b3dc --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/class-use/Digest.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.cli.Digest (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.cli.Digest (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/cli/Digest.html" title="class in org.apache.commons.codec.cli">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/cli/class-use/Digest.html" target="_top">Frames</a></li> +<li><a href="Digest.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.cli.Digest" class="title">Uses of Class<br>org.apache.commons.codec.cli.Digest</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.cli.Digest</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/cli/Digest.html" title="class in org.apache.commons.codec.cli">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/cli/class-use/Digest.html" target="_top">Frames</a></li> +<li><a href="Digest.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-frame.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-frame.html new file mode 100644 index 0000000000000000000000000000000000000000..accc333be732eec1e0d2b09a0de62c402afffb99 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-frame.html @@ -0,0 +1,20 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.cli (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<h1 class="bar"><a href="../../../../../org/apache/commons/codec/cli/package-summary.html" target="classFrame">org.apache.commons.codec.cli</a></h1> +<div class="indexContainer"> +<h2 title="Classes">Classes</h2> +<ul title="Classes"> +<li><a href="Digest.html" title="class in org.apache.commons.codec.cli" target="classFrame">Digest</a></li> +</ul> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-summary.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-summary.html new file mode 100644 index 0000000000000000000000000000000000000000..086fbf30217e82da26c55d1d7cfa5b57faae6bb5 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-summary.html @@ -0,0 +1,154 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.cli (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.cli (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/cli/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Package" class="title">Package org.apache.commons.codec.cli</h1> +<div class="docSummary"> +<div class="block">Command line utility.</div> +</div> +<p>See: <a href="#package.description">Description</a></p> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> +<caption><span>Class Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Class</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/cli/Digest.html" title="class in org.apache.commons.codec.cli">Digest</a></td> +<td class="colLast"> +<div class="block">A minimal command line to run digest over files, directories or a string</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +<a name="package.description"> +<!-- --> +</a> +<h2 title="Package org.apache.commons.codec.cli Description">Package org.apache.commons.codec.cli Description</h2> +<div class="block"><p>Command line utility.</p></div> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/cli/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-tree.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-tree.html new file mode 100644 index 0000000000000000000000000000000000000000..c176f2f9610b13f4b151667db57416fc31f5d964 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-tree.html @@ -0,0 +1,138 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.cli Class Hierarchy (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.cli Class Hierarchy (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/package-tree.html">Prev</a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/cli/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 class="title">Hierarchy For Package org.apache.commons.codec.cli</h1> +<span class="packageHierarchyLabel">Package Hierarchies:</span> +<ul class="horizontal"> +<li><a href="../../../../../overview-tree.html">All Packages</a></li> +</ul> +</div> +<div class="contentContainer"> +<h2 title="Class Hierarchy">Class Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">org.apache.commons.codec.cli.<a href="../../../../../org/apache/commons/codec/cli/Digest.html" title="class in org.apache.commons.codec.cli"><span class="typeNameLink">Digest</span></a></li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/binary/package-tree.html">Prev</a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/cli/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-use.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-use.html new file mode 100644 index 0000000000000000000000000000000000000000..b861ca0c289ef4ca709e767727a4e50cf54f322f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/cli/package-use.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Package org.apache.commons.codec.cli (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Package org.apache.commons.codec.cli (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/cli/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Uses of Package org.apache.commons.codec.cli" class="title">Uses of Package<br>org.apache.commons.codec.cli</h1> +</div> +<div class="contentContainer">No usage of org.apache.commons.codec.cli</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/cli/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/Crypt.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/Crypt.html new file mode 100644 index 0000000000000000000000000000000000000000..914e90dd14e175d6348609e3caea11bed65d9eb3 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/Crypt.html @@ -0,0 +1,440 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Crypt (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Crypt (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":9,"i2":9,"i3":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Crypt.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/Crypt.html" target="_top">Frames</a></li> +<li><a href="Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class Crypt" class="title">Class Crypt</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.Crypt</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Crypt</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">GNU libc crypt(3) compatible hash method. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>crypt(String, String)</code></a> for further details. + <p> + This class is immutable and thread-safe.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Crypt.html#Crypt--">Crypt</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-byte:A-">crypt</a></span>(byte[] keyBytes)</code> +<div class="block">Encrypts a password in a crypt(3) compatible way.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-byte:A-java.lang.String-">crypt</a></span>(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</code> +<div class="block">Encrypts a password in a crypt(3) compatible way.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-">crypt</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> +<div class="block">Calculates the digest using the strongest crypt(3) algorithm.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-">crypt</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</code> +<div class="block">Encrypts a password in a crypt(3) compatible way.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Crypt--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Crypt</h4> +<pre>public Crypt()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="crypt-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> crypt(byte[] keyBytes)</pre> +<div class="block">Encrypts a password in a crypt(3) compatible way. + <p> + A random salt and the default algorithm (currently SHA-512) are used. See <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>crypt(String, String)</code></a> for + details. + </p> + <p> + A salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts and calling <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-byte:A-java.lang.String-"><code>crypt(byte[], String)</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext password</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +</dl> +</li> +</ul> +<a name="crypt-byte:A-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> crypt(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</pre> +<div class="block">Encrypts a password in a crypt(3) compatible way. + <p> + If no salt is provided, a random salt and the default algorithm (currently SHA-512) will be used. See + <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>crypt(String, String)</code></a> for details.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext password</dd> +<dd><code>salt</code> - real salt value without prefix or "rounds=". The salt may be null, + in which case a salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; + for more secure salts consider using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to + generate your own salts.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +</dl> +</li> +</ul> +<a name="crypt-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> crypt(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> +<div class="block">Calculates the digest using the strongest crypt(3) algorithm. + <p> + A random salt and the default algorithm (currently SHA-512) are used. + </p> + <p> + A salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts and calling <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>crypt(String, String)</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - plaintext password</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>crypt(String, String)</code></a></dd> +</dl> +</li> +</ul> +<a name="crypt-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> crypt(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</pre> +<div class="block">Encrypts a password in a crypt(3) compatible way. + <p> + The exact algorithm depends on the format of the salt string: + <ul> + <li>SHA-512 salts start with <code>$6$</code> and are up to 16 chars long. + <li>SHA-256 salts start with <code>$5$</code> and are up to 16 chars long + <li>MD5 salts start with <code>$1$</code> and are up to 8 chars long + <li>DES, the traditional UnixCrypt algorithm is used with only 2 chars + <li>Only the first 8 chars of the passwords are used in the DES algorithm! + </ul> + The magic strings <code>"$apr1$"</code> and <code>"$2a$"</code> are not recognized by this method as its output should be + identical with that of the libc implementation. + <p> + The rest of the salt string is drawn from the set <code>[a-zA-Z0-9./]</code> and is cut at the maximum length of if a + <code>"$"</code> sign is encountered. It is therefore valid to enter a complete hash value as salt to e.g. verify a + password with: + + <pre> + storedPwd.equals(crypt(enteredPwd, storedPwd)) + </pre> + <p> + The resulting string starts with the marker string (<code>$n$</code>), where n is the same as the input salt. + The salt is then appended, followed by a <code>"$"</code> sign. + This is followed by the actual hash value. + For DES the string only contains the salt and actual hash. + The total length is dependent on the algorithm used: + <ul> + <li>SHA-512: 106 chars + <li>SHA-256: 63 chars + <li>MD5: 34 chars + <li>DES: 13 chars + </ul> + <p> + Example: + + <pre> + crypt("secret", "$1$xxxx") => "$1$xxxx$aMkevjfEIpa35Bh3G4bAc." + crypt("secret", "xx") => "xxWAum7tHdIUw" + </pre> + <p> + This method comes in a variation that accepts a byte[] array to support input strings that are not encoded in + UTF-8 but e.g. in ISO-8859-1 where equal characters result in different byte values.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - plaintext password as entered by the used</dd> +<dd><code>salt</code> - real salt value without prefix or "rounds=". The salt may be null, in which case a + salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts + consider using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>hash value, i.e. encrypted password including the salt string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught. *</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd>"The man page of the libc crypt (3) function."</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Crypt.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/Crypt.html" target="_top">Frames</a></li> +<li><a href="Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/DigestUtils.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/DigestUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..9b996f7ea37f755aac8f4f38fa50b8dea22ca0a7 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/DigestUtils.html @@ -0,0 +1,3442 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>DigestUtils (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="DigestUtils (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":9,"i19":9,"i20":9,"i21":9,"i22":10,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":41,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":9,"i46":9,"i47":41,"i48":41,"i49":41,"i50":9,"i51":9,"i52":9,"i53":9,"i54":9,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":9,"i65":9,"i66":9,"i67":9,"i68":9,"i69":9,"i70":9,"i71":9,"i72":9,"i73":9,"i74":9,"i75":9,"i76":9,"i77":9,"i78":9,"i79":9,"i80":9,"i81":9,"i82":9,"i83":9,"i84":9,"i85":9,"i86":9,"i87":9,"i88":9,"i89":9,"i90":9,"i91":9,"i92":9,"i93":9,"i94":9,"i95":9,"i96":9,"i97":9,"i98":9,"i99":9,"i100":9,"i101":9,"i102":9,"i103":9,"i104":9,"i105":9,"i106":9,"i107":9,"i108":9,"i109":9,"i110":41,"i111":41,"i112":41,"i113":9,"i114":9,"i115":9,"i116":9,"i117":9,"i118":9,"i119":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/DigestUtils.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/DigestUtils.html" target="_top">Frames</a></li> +<li><a href="DigestUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class DigestUtils" class="title">Class DigestUtils</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.DigestUtils</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">DigestUtils</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Operations to simplify common <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> tasks. + This class is immutable and thread-safe. + However the MessageDigest instances it creates generally won't be. + <p> + The <a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest"><code>MessageDigestAlgorithms</code></a> class provides constants for standard + digest algorithms that can be used with the <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getDigest-java.lang.String-"><code>getDigest(String)</code></a> method + and other methods that require the Digest algorithm name. + <p> + Note: the class has short-hand methods for all the algorithms present as standard in Java 6. + This approach requires lots of methods for each algorithm, and quickly becomes unwieldy. + The following code works with all algorithms: + <pre> + import static org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_224; + ... + byte [] digest = new DigestUtils(SHA_224).digest(dataToDigest); + String hdigest = new DigestUtils(SHA_224).digestAsHex(new File("pom.xml")); + </pre></div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest"><code>MessageDigestAlgorithms</code></a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#DigestUtils--">DigestUtils</a></span>()</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">since 1.11; only useful to preserve binary compatibility</span></div> +</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#DigestUtils-java.security.MessageDigest-">DigestUtils</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> digest)</code> +<div class="block">Creates an instance using the provided <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> parameter.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#DigestUtils-java.lang.String-">DigestUtils</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Creates an instance using the provided <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> parameter.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-byte:A-">digest</a></span>(byte[] data)</code> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-java.nio.ByteBuffer-">digest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data)</code> +<div class="block">Reads through a ByteBuffer and returns the digest for the data</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-java.io.File-">digest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> data)</code> +<div class="block">Reads through a File and returns the digest for the data</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-java.io.InputStream-">digest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Reads through an InputStream and returns the digest for the data</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-byte:A-">digest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + byte[] data)</code> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-java.nio.ByteBuffer-">digest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data)</code> +<div class="block">Reads through a ByteBuffer and returns the digest for the data</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-java.io.File-">digest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> data)</code> +<div class="block">Reads through a File and returns the digest for the data</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-java.io.InputStream-">digest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Reads through an InputStream and returns the digest for the data</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-java.nio.file.Path-java.nio.file.OpenOption...-">digest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file">Path</a> data, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/OpenOption.html?is-external=true" title="class or interface in java.nio.file">OpenOption</a>... options)</code> +<div class="block">Reads through a File and returns the digest for the data</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-java.security.MessageDigest-java.io.RandomAccessFile-">digest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/RandomAccessFile.html?is-external=true" title="class or interface in java.io">RandomAccessFile</a> data)</code> +<div class="block">Reads through a RandomAccessFile using non-blocking-io (NIO) and returns the digest for the data</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-java.nio.file.Path-java.nio.file.OpenOption...-">digest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file">Path</a> data, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/OpenOption.html?is-external=true" title="class or interface in java.nio.file">OpenOption</a>... options)</code> +<div class="block">Reads through a File and returns the digest for the data</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-java.lang.String-">digest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-byte:A-">digestAsHex</a></span>(byte[] data)</code> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.nio.ByteBuffer-">digestAsHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data)</code> +<div class="block">Reads through a ByteBuffer and returns the digest for the data</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.io.File-">digestAsHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> data)</code> +<div class="block">Reads through a File and returns the digest for the data</div> +</td> +</tr> +<tr id="i15" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.io.InputStream-">digestAsHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Reads through an InputStream and returns the digest for the data</div> +</td> +</tr> +<tr id="i16" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.nio.file.Path-java.nio.file.OpenOption...-">digestAsHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file">Path</a> data, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/OpenOption.html?is-external=true" title="class or interface in java.nio.file">OpenOption</a>... options)</code> +<div class="block">Reads through a File and returns the digest for the data</div> +</td> +</tr> +<tr id="i17" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.lang.String-">digestAsHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +</td> +</tr> +<tr id="i18" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getDigest-java.lang.String-">getDigest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> algorithm)</code> +<div class="block">Returns a <code>MessageDigest</code> for the given <code>algorithm</code>.</div> +</td> +</tr> +<tr id="i19" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getDigest-java.lang.String-java.security.MessageDigest-">getDigest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> algorithm, + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> defaultMessageDigest)</code> +<div class="block">Returns a <code>MessageDigest</code> for the given <code>algorithm</code> or a default if there is a problem + getting the algorithm.</div> +</td> +</tr> +<tr id="i20" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getMd2Digest--">getMd2Digest</a></span>()</code> +<div class="block">Returns an MD2 MessageDigest.</div> +</td> +</tr> +<tr id="i21" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getMd5Digest--">getMd5Digest</a></span>()</code> +<div class="block">Returns an MD5 MessageDigest.</div> +</td> +</tr> +<tr id="i22" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getMessageDigest--">getMessageDigest</a></span>()</code> +<div class="block">Returns the message digest instance.</div> +</td> +</tr> +<tr id="i23" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha1Digest--">getSha1Digest</a></span>()</code> +<div class="block">Returns an SHA-1 digest.</div> +</td> +</tr> +<tr id="i24" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha256Digest--">getSha256Digest</a></span>()</code> +<div class="block">Returns an SHA-256 digest.</div> +</td> +</tr> +<tr id="i25" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha3_224Digest--">getSha3_224Digest</a></span>()</code> +<div class="block">Returns an SHA3-224 digest.</div> +</td> +</tr> +<tr id="i26" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha3_256Digest--">getSha3_256Digest</a></span>()</code> +<div class="block">Returns an SHA3-256 digest.</div> +</td> +</tr> +<tr id="i27" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha3_384Digest--">getSha3_384Digest</a></span>()</code> +<div class="block">Returns an SHA3-384 digest.</div> +</td> +</tr> +<tr id="i28" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha3_512Digest--">getSha3_512Digest</a></span>()</code> +<div class="block">Returns an SHA3-512 digest.</div> +</td> +</tr> +<tr id="i29" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha384Digest--">getSha384Digest</a></span>()</code> +<div class="block">Returns an SHA-384 digest.</div> +</td> +</tr> +<tr id="i30" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha512_224Digest--">getSha512_224Digest</a></span>()</code> +<div class="block">Returns an SHA-512/224 digest.</div> +</td> +</tr> +<tr id="i31" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha512_256Digest--">getSha512_256Digest</a></span>()</code> +<div class="block">Returns an SHA-512/256 digest.</div> +</td> +</tr> +<tr id="i32" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha512Digest--">getSha512Digest</a></span>()</code> +<div class="block">Returns an SHA-512 digest.</div> +</td> +</tr> +<tr id="i33" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getShaDigest--">getShaDigest</a></span>()</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha1Digest--"><code>getSha1Digest()</code></a></span></div> +</div> +</td> +</tr> +<tr id="i34" class="altColor"> +<td class="colFirst"><code>static boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#isAvailable-java.lang.String-">isAvailable</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> messageDigestAlgorithm)</code> +<div class="block">Test whether the algorithm is supported.</div> +</td> +</tr> +<tr id="i35" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md2-byte:A-">md2</a></span>(byte[] data)</code> +<div class="block">Calculates the MD2 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i36" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md2-java.io.InputStream-">md2</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the MD2 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i37" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md2-java.lang.String-">md2</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the MD2 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i38" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md2Hex-byte:A-">md2Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the MD2 digest and returns the value as a 32 character hex string.</div> +</td> +</tr> +<tr id="i39" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md2Hex-java.io.InputStream-">md2Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the MD2 digest and returns the value as a 32 character hex string.</div> +</td> +</tr> +<tr id="i40" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md2Hex-java.lang.String-">md2Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the MD2 digest and returns the value as a 32 character hex string.</div> +</td> +</tr> +<tr id="i41" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md5-byte:A-">md5</a></span>(byte[] data)</code> +<div class="block">Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i42" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md5-java.io.InputStream-">md5</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i43" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md5-java.lang.String-">md5</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i44" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md5Hex-byte:A-">md5Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the MD5 digest and returns the value as a 32 character hex string.</div> +</td> +</tr> +<tr id="i45" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md5Hex-java.io.InputStream-">md5Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the MD5 digest and returns the value as a 32 character hex string.</div> +</td> +</tr> +<tr id="i46" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#md5Hex-java.lang.String-">md5Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the MD5 digest and returns the value as a 32 character hex string.</div> +</td> +</tr> +<tr id="i47" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha-byte:A-">sha</a></span>(byte[] data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1-byte:A-"><code>sha1(byte[])</code></a></span></div> +</div> +</td> +</tr> +<tr id="i48" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha-java.io.InputStream-">sha</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1-java.io.InputStream-"><code>sha1(InputStream)</code></a></span></div> +</div> +</td> +</tr> +<tr id="i49" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha-java.lang.String-">sha</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1-java.lang.String-"><code>sha1(String)</code></a></span></div> +</div> +</td> +</tr> +<tr id="i50" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1-byte:A-">sha1</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i51" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1-java.io.InputStream-">sha1</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i52" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1-java.lang.String-">sha1</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i53" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-byte:A-">sha1Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i54" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.io.InputStream-">sha1Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i55" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.lang.String-">sha1Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i56" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha256-byte:A-">sha256</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-256 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i57" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha256-java.io.InputStream-">sha256</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-256 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i58" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha256-java.lang.String-">sha256</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-256 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i59" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha256Hex-byte:A-">sha256Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-256 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i60" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha256Hex-java.io.InputStream-">sha256Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-256 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i61" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha256Hex-java.lang.String-">sha256Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-256 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i62" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_224-byte:A-">sha3_224</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA3-224 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i63" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_224-java.io.InputStream-">sha3_224</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA3-224 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i64" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_224-java.lang.String-">sha3_224</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA3-224 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i65" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_224Hex-byte:A-">sha3_224Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA3-224 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i66" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_224Hex-java.io.InputStream-">sha3_224Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA3-224 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i67" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_224Hex-java.lang.String-">sha3_224Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA3-224 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i68" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_256-byte:A-">sha3_256</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA3-256 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i69" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_256-java.io.InputStream-">sha3_256</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA3-256 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i70" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_256-java.lang.String-">sha3_256</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA3-256 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i71" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_256Hex-byte:A-">sha3_256Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA3-256 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i72" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_256Hex-java.io.InputStream-">sha3_256Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA3-256 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i73" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_256Hex-java.lang.String-">sha3_256Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA3-256 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i74" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_384-byte:A-">sha3_384</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA3-384 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i75" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_384-java.io.InputStream-">sha3_384</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA3-384 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i76" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_384-java.lang.String-">sha3_384</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA3-384 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i77" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_384Hex-byte:A-">sha3_384Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA3-384 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i78" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_384Hex-java.io.InputStream-">sha3_384Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA3-384 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i79" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_384Hex-java.lang.String-">sha3_384Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA3-384 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i80" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_512-byte:A-">sha3_512</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA3-512 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i81" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_512-java.io.InputStream-">sha3_512</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA3-512 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i82" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_512-java.lang.String-">sha3_512</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA3-512 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i83" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_512Hex-byte:A-">sha3_512Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA3-512 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i84" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_512Hex-java.io.InputStream-">sha3_512Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA3-512 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i85" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha3_512Hex-java.lang.String-">sha3_512Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA3-512 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i86" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha384-byte:A-">sha384</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-384 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i87" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha384-java.io.InputStream-">sha384</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-384 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i88" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha384-java.lang.String-">sha384</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-384 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i89" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha384Hex-byte:A-">sha384Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-384 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i90" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha384Hex-java.io.InputStream-">sha384Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-384 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i91" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha384Hex-java.lang.String-">sha384Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-384 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i92" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_224-byte:A-">sha512_224</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i93" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_224-java.io.InputStream-">sha512_224</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i94" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_224-java.lang.String-">sha512_224</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i95" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_224Hex-byte:A-">sha512_224Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i96" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_224Hex-java.io.InputStream-">sha512_224Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i97" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_224Hex-java.lang.String-">sha512_224Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i98" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_256-byte:A-">sha512_256</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i99" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_256-java.io.InputStream-">sha512_256</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i100" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_256-java.lang.String-">sha512_256</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i101" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_256Hex-byte:A-">sha512_256Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i102" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_256Hex-java.io.InputStream-">sha512_256Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i103" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512_256Hex-java.lang.String-">sha512_256Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i104" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512-byte:A-">sha512</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-512 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i105" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512-java.io.InputStream-">sha512</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-512 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i106" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512-java.lang.String-">sha512</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-512 digest and returns the value as a <code>byte[]</code>.</div> +</td> +</tr> +<tr id="i107" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512Hex-byte:A-">sha512Hex</a></span>(byte[] data)</code> +<div class="block">Calculates the SHA-512 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i108" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512Hex-java.io.InputStream-">sha512Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block">Calculates the SHA-512 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i109" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha512Hex-java.lang.String-">sha512Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block">Calculates the SHA-512 digest and returns the value as a hex string.</div> +</td> +</tr> +<tr id="i110" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#shaHex-byte:A-">shaHex</a></span>(byte[] data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-byte:A-"><code>sha1Hex(byte[])</code></a></span></div> +</div> +</td> +</tr> +<tr id="i111" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#shaHex-java.io.InputStream-">shaHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.io.InputStream-"><code>sha1Hex(InputStream)</code></a></span></div> +</div> +</td> +</tr> +<tr id="i112" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#shaHex-java.lang.String-">shaHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.lang.String-"><code>sha1Hex(String)</code></a></span></div> +</div> +</td> +</tr> +<tr id="i113" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-byte:A-">updateDigest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + byte[] valueToDigest)</code> +<div class="block">Updates the given <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a>.</div> +</td> +</tr> +<tr id="i114" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.nio.ByteBuffer-">updateDigest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> valueToDigest)</code> +<div class="block">Updates the given <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a>.</div> +</td> +</tr> +<tr id="i115" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.io.File-">updateDigest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> digest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> data)</code> +<div class="block">Reads through a File and updates the digest for the data</div> +</td> +</tr> +<tr id="i116" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.io.InputStream-">updateDigest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> digest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> inputStream)</code> +<div class="block">Reads through an InputStream and updates the digest for the data</div> +</td> +</tr> +<tr id="i117" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.nio.file.Path-java.nio.file.OpenOption...-">updateDigest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> digest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file">Path</a> path, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/OpenOption.html?is-external=true" title="class or interface in java.nio.file">OpenOption</a>... options)</code> +<div class="block">Reads through a Path and updates the digest for the data</div> +</td> +</tr> +<tr id="i118" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.io.RandomAccessFile-">updateDigest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> digest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/RandomAccessFile.html?is-external=true" title="class or interface in java.io">RandomAccessFile</a> data)</code> +<div class="block">Reads through a RandomAccessFile and updates the digest for the data using non-blocking-io (NIO)</div> +</td> +</tr> +<tr id="i119" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-java.lang.String-">updateDigest</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block">Updates the given <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> from a String (converted to bytes using UTF-8).</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="DigestUtils--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>DigestUtils</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public DigestUtils()</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">since 1.11; only useful to preserve binary compatibility</span></div> +<div class="block">Preserves binary compatibility only. + As for previous versions does not provide useful behavior</div> +</li> +</ul> +<a name="DigestUtils-java.security.MessageDigest-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>DigestUtils</h4> +<pre>public DigestUtils(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> digest)</pre> +<div class="block">Creates an instance using the provided <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> parameter. + + This can then be used to create digests using methods such as + <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-byte:A-"><code>digest(byte[])</code></a> and <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.io.File-"><code>digestAsHex(File)</code></a>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>digest</code> - the <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> to use</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="DigestUtils-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>DigestUtils</h4> +<pre>public DigestUtils(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Creates an instance using the provided <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> parameter. + + This can then be used to create digests using methods such as + <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digest-byte:A-"><code>digest(byte[])</code></a> and <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#digestAsHex-java.io.File-"><code>digestAsHex(File)</code></a>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - the name of the <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> to use</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getDigest-java.lang.String-"><code>getDigest(String)</code></a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="digest-java.security.MessageDigest-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public static byte[] digest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + byte[] data)</pre> +<div class="block">Reads through a byte array and returns the digest for the data. Provided for symmetry with other methods.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>messageDigest</code> - The MessageDigest to use (e.g. MD5)</dd> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digest-java.security.MessageDigest-java.nio.ByteBuffer-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public static byte[] digest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data)</pre> +<div class="block">Reads through a ByteBuffer and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>messageDigest</code> - The MessageDigest to use (e.g. MD5)</dd> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digest-java.security.MessageDigest-java.io.File-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public static byte[] digest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through a File and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>messageDigest</code> - The MessageDigest to use (e.g. MD5)</dd> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digest-java.security.MessageDigest-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public static byte[] digest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through an InputStream and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>messageDigest</code> - The MessageDigest to use (e.g. MD5)</dd> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11 (was private)</dd> +</dl> +</li> +</ul> +<a name="digest-java.security.MessageDigest-java.nio.file.Path-java.nio.file.OpenOption...-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public static byte[] digest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file">Path</a> data, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/OpenOption.html?is-external=true" title="class or interface in java.nio.file">OpenOption</a>... options) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through a File and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>messageDigest</code> - The MessageDigest to use (e.g. MD5)</dd> +<dd><code>data</code> - Data to digest</dd> +<dd><code>options</code> - options How to open the file</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="digest-java.security.MessageDigest-java.io.RandomAccessFile-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public static byte[] digest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/RandomAccessFile.html?is-external=true" title="class or interface in java.io">RandomAccessFile</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through a RandomAccessFile using non-blocking-io (NIO) and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>messageDigest</code> - The MessageDigest to use (e.g. MD5)</dd> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="getDigest-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getDigest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getDigest(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> algorithm)</pre> +<div class="block">Returns a <code>MessageDigest</code> for the given <code>algorithm</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>algorithm</code> - the name of the algorithm requested. See <a + href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA" + >Appendix A in the Java Cryptography Architecture Reference Guide</a> for information about standard + algorithm names.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true#getInstance-java.lang.String-" title="class or interface in java.security"><code>MessageDigest.getInstance(String)</code></a></dd> +</dl> +</li> +</ul> +<a name="getDigest-java.lang.String-java.security.MessageDigest-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getDigest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getDigest(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> algorithm, + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> defaultMessageDigest)</pre> +<div class="block">Returns a <code>MessageDigest</code> for the given <code>algorithm</code> or a default if there is a problem + getting the algorithm.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>algorithm</code> - the name of the algorithm requested. See + <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA" > + Appendix A in the Java Cryptography Architecture Reference Guide</a> for information about standard + algorithm names.</dd> +<dd><code>defaultMessageDigest</code> - The default MessageDigest.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true#getInstance-java.lang.String-" title="class or interface in java.security"><code>MessageDigest.getInstance(String)</code></a></dd> +</dl> +</li> +</ul> +<a name="getMd2Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getMd2Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getMd2Digest()</pre> +<div class="block">Returns an MD2 MessageDigest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An MD2 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught, which should never happen because MD2 is a + built-in algorithm</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#MD2"><code>MessageDigestAlgorithms.MD2</code></a></dd> +</dl> +</li> +</ul> +<a name="getMd5Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getMd5Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getMd5Digest()</pre> +<div class="block">Returns an MD5 MessageDigest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An MD5 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught, which should never happen because MD5 is a + built-in algorithm</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#MD5"><code>MessageDigestAlgorithms.MD5</code></a></dd> +</dl> +</li> +</ul> +<a name="getSha1Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSha1Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getSha1Digest()</pre> +<div class="block">Returns an SHA-1 digest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An SHA-1 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught, which should never happen because SHA-1 is a + built-in algorithm</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_1"><code>MessageDigestAlgorithms.SHA_1</code></a></dd> +</dl> +</li> +</ul> +<a name="getSha256Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSha256Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getSha256Digest()</pre> +<div class="block">Returns an SHA-256 digest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An SHA-256 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught, which should never happen because SHA-256 is a + built-in algorithm</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_256"><code>MessageDigestAlgorithms.SHA_256</code></a></dd> +</dl> +</li> +</ul> +<a name="getSha3_224Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSha3_224Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getSha3_224Digest()</pre> +<div class="block">Returns an SHA3-224 digest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An SHA3-224 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught, which should not happen on + Oracle Java 9 andgreater.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_224"><code>MessageDigestAlgorithms.SHA3_224</code></a></dd> +</dl> +</li> +</ul> +<a name="getSha3_256Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSha3_256Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getSha3_256Digest()</pre> +<div class="block">Returns an SHA3-256 digest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An SHA3-256 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught, which should not happen on + Oracle Java 9 and greater.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_256"><code>MessageDigestAlgorithms.SHA3_256</code></a></dd> +</dl> +</li> +</ul> +<a name="getSha3_384Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSha3_384Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getSha3_384Digest()</pre> +<div class="block">Returns an SHA3-384 digest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An SHA3-384 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught, which should not happen on + Oracle Java 9 and greater.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_384"><code>MessageDigestAlgorithms.SHA3_384</code></a></dd> +</dl> +</li> +</ul> +<a name="getSha3_512Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSha3_512Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getSha3_512Digest()</pre> +<div class="block">Returns an SHA3-512 digest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An SHA3-512 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught, which should not happen + on Oracle Java 9 and greater.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_512"><code>MessageDigestAlgorithms.SHA3_512</code></a></dd> +</dl> +</li> +</ul> +<a name="getSha384Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSha384Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getSha384Digest()</pre> +<div class="block">Returns an SHA-384 digest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An SHA-384 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught, which should never happen + because SHA-384 is a built-in algorithm</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_384"><code>MessageDigestAlgorithms.SHA_384</code></a></dd> +</dl> +</li> +</ul> +<a name="getSha512_224Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSha512_224Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getSha512_224Digest()</pre> +<div class="block">Returns an SHA-512/224 digest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An SHA-512/224 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512_224"><code>MessageDigestAlgorithms.SHA_512_224</code></a></dd> +</dl> +</li> +</ul> +<a name="getSha512_256Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSha512_256Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getSha512_256Digest()</pre> +<div class="block">Returns an SHA-512/256 digest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An SHA-512/256 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512_224"><code>MessageDigestAlgorithms.SHA_512_224</code></a></dd> +</dl> +</li> +</ul> +<a name="getSha512Digest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getSha512Digest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getSha512Digest()</pre> +<div class="block">Returns an SHA-512 digest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An SHA-512 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught, which should never happen + because SHA-512 is a built-in algorithm</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512"><code>MessageDigestAlgorithms.SHA_512</code></a></dd> +</dl> +</li> +</ul> +<a name="getShaDigest--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getShaDigest</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getShaDigest()</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#getSha1Digest--"><code>getSha1Digest()</code></a></span></div> +<div class="block">Returns an SHA-1 digest.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An SHA-1 digest instance.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught</dd> +</dl> +</li> +</ul> +<a name="isAvailable-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isAvailable</h4> +<pre>public static boolean isAvailable(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> messageDigestAlgorithm)</pre> +<div class="block">Test whether the algorithm is supported.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>messageDigestAlgorithm</code> - the algorithm name</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the algorithm can be found</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="md2-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md2</h4> +<pre>public static byte[] md2(byte[] data)</pre> +<div class="block">Calculates the MD2 digest and returns the value as a 16 element <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD2 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="md2-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md2</h4> +<pre>public static byte[] md2(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the MD2 digest and returns the value as a 16 element <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD2 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="md2-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md2</h4> +<pre>public static byte[] md2(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the MD2 digest and returns the value as a 16 element <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD2 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="md2Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md2Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> md2Hex(byte[] data)</pre> +<div class="block">Calculates the MD2 digest and returns the value as a 32 character hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD2 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="md2Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md2Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> md2Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the MD2 digest and returns the value as a 32 character hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD2 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="md2Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md2Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> md2Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the MD2 digest and returns the value as a 32 character hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD2 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="md5-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md5</h4> +<pre>public static byte[] md5(byte[] data)</pre> +<div class="block">Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD5 digest</dd> +</dl> +</li> +</ul> +<a name="md5-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md5</h4> +<pre>public static byte[] md5(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD5 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="md5-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md5</h4> +<pre>public static byte[] md5(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD5 digest</dd> +</dl> +</li> +</ul> +<a name="md5Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md5Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> md5Hex(byte[] data)</pre> +<div class="block">Calculates the MD5 digest and returns the value as a 32 character hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD5 digest as a hex string</dd> +</dl> +</li> +</ul> +<a name="md5Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md5Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> md5Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the MD5 digest and returns the value as a 32 character hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD5 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="md5Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md5Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> md5Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the MD5 digest and returns the value as a 32 character hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>MD5 digest as a hex string</dd> +</dl> +</li> +</ul> +<a name="sha-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] sha(byte[] data)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1-byte:A-"><code>sha1(byte[])</code></a></span></div> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest</dd> +</dl> +</li> +</ul> +<a name="sha-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] sha(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1-java.io.InputStream-"><code>sha1(InputStream)</code></a></span></div> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] sha(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1-java.lang.String-"><code>sha1(String)</code></a></span></div> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest</dd> +</dl> +</li> +</ul> +<a name="sha1-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha1</h4> +<pre>public static byte[] sha1(byte[] data)</pre> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="sha1-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha1</h4> +<pre>public static byte[] sha1(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="sha1-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha1</h4> +<pre>public static byte[] sha1(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest</dd> +</dl> +</li> +</ul> +<a name="sha1Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha1Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha1Hex(byte[] data)</pre> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="sha1Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha1Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha1Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="sha1Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha1Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha1Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="sha256-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha256</h4> +<pre>public static byte[] sha256(byte[] data)</pre> +<div class="block">Calculates the SHA-256 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-256 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha256-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha256</h4> +<pre>public static byte[] sha256(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-256 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-256 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha256-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha256</h4> +<pre>public static byte[] sha256(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-256 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-256 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha256Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha256Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha256Hex(byte[] data)</pre> +<div class="block">Calculates the SHA-256 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-256 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha256Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha256Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha256Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-256 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-256 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha256Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha256Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha256Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-256 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-256 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha3_224-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_224</h4> +<pre>public static byte[] sha3_224(byte[] data)</pre> +<div class="block">Calculates the SHA3-224 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-224 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_224-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_224</h4> +<pre>public static byte[] sha3_224(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA3-224 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-224 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_224-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_224</h4> +<pre>public static byte[] sha3_224(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA3-224 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-224 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_224Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_224Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_224Hex(byte[] data)</pre> +<div class="block">Calculates the SHA3-224 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-224 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_224Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_224Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_224Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA3-224 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-224 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_224Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_224Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_224Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA3-224 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-224 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_256-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_256</h4> +<pre>public static byte[] sha3_256(byte[] data)</pre> +<div class="block">Calculates the SHA3-256 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-256 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_256-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_256</h4> +<pre>public static byte[] sha3_256(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA3-256 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-256 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_256-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_256</h4> +<pre>public static byte[] sha3_256(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA3-256 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-256 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_256Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_256Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_256Hex(byte[] data)</pre> +<div class="block">Calculates the SHA3-256 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-256 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_256Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_256Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_256Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA3-256 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-256 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_256Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_256Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_256Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA3-256 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-256 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_384-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_384</h4> +<pre>public static byte[] sha3_384(byte[] data)</pre> +<div class="block">Calculates the SHA3-384 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-384 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_384-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_384</h4> +<pre>public static byte[] sha3_384(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA3-384 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-384 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_384-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_384</h4> +<pre>public static byte[] sha3_384(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA3-384 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-384 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_384Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_384Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_384Hex(byte[] data)</pre> +<div class="block">Calculates the SHA3-384 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-384 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_384Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_384Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_384Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA3-384 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-384 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_384Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_384Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_384Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA3-384 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-384 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_512-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_512</h4> +<pre>public static byte[] sha3_512(byte[] data)</pre> +<div class="block">Calculates the SHA3-512 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-512 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_512-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_512</h4> +<pre>public static byte[] sha3_512(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA3-512 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-512 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_512-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_512</h4> +<pre>public static byte[] sha3_512(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA3-512 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-512 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_512Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_512Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_512Hex(byte[] data)</pre> +<div class="block">Calculates the SHA3-512 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-512 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_512Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_512Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_512Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA3-512 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-512 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha3_512Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha3_512Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha3_512Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA3-512 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA3-512 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha384-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha384</h4> +<pre>public static byte[] sha384(byte[] data)</pre> +<div class="block">Calculates the SHA-384 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-384 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha384-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha384</h4> +<pre>public static byte[] sha384(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-384 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-384 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha384-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha384</h4> +<pre>public static byte[] sha384(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-384 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-384 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha384Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha384Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha384Hex(byte[] data)</pre> +<div class="block">Calculates the SHA-384 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-384 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha384Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha384Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha384Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-384 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-384 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha384Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha384Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha384Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-384 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-384 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha512-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512</h4> +<pre>public static byte[] sha512(byte[] data)</pre> +<div class="block">Calculates the SHA-512 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha512-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512</h4> +<pre>public static byte[] sha512(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-512 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha512-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512</h4> +<pre>public static byte[] sha512(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-512 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha512_224-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_224</h4> +<pre>public static byte[] sha512_224(byte[] data)</pre> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/224 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512_224-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_224</h4> +<pre>public static byte[] sha512_224(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/224 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512_224-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_224</h4> +<pre>public static byte[] sha512_224(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/224 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512_224Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_224Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512_224Hex(byte[] data)</pre> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/224 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512_224Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_224Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512_224Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/224 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512_224Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_224Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512_224Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-512/224 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/224 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512_256-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_256</h4> +<pre>public static byte[] sha512_256(byte[] data)</pre> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/256 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512_256-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_256</h4> +<pre>public static byte[] sha512_256(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/256 digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512_256-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_256</h4> +<pre>public static byte[] sha512_256(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a <code>byte[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest; converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/224 digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512_256Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_256Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512_256Hex(byte[] data)</pre> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/256 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512_256Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_256Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512_256Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/256 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512_256Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512_256Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512_256Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-512/256 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512/256 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="sha512Hex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512Hex(byte[] data)</pre> +<div class="block">Calculates the SHA-512 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha512Hex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Calculates the SHA-512 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="sha512Hex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512Hex</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Calculates the SHA-512 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-512 digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="shaHex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>shaHex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> shaHex(byte[] data)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-byte:A-"><code>sha1Hex(byte[])</code></a></span></div> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest as a hex string</dd> +</dl> +</li> +</ul> +<a name="shaHex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>shaHex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> shaHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.io.InputStream-"><code>sha1Hex(InputStream)</code></a></span></div> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="shaHex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>shaHex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> shaHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#sha1Hex-java.lang.String-"><code>sha1Hex(String)</code></a></span></div> +<div class="block">Calculates the SHA-1 digest and returns the value as a hex string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>SHA-1 digest as a hex string</dd> +</dl> +</li> +</ul> +<a name="updateDigest-java.security.MessageDigest-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>updateDigest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> updateDigest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + byte[] valueToDigest)</pre> +<div class="block">Updates the given <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>messageDigest</code> - the <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> to update</dd> +<dd><code>valueToDigest</code> - the value to update the <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> with</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the updated <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a></dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="updateDigest-java.security.MessageDigest-java.nio.ByteBuffer-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>updateDigest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> updateDigest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> valueToDigest)</pre> +<div class="block">Updates the given <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>messageDigest</code> - the <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> to update</dd> +<dd><code>valueToDigest</code> - the value to update the <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> with</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the updated <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a></dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="updateDigest-java.security.MessageDigest-java.io.File-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>updateDigest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> updateDigest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> digest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through a File and updates the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>digest</code> - The MessageDigest to use (e.g. MD5)</dd> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="updateDigest-java.security.MessageDigest-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>updateDigest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> updateDigest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> digest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> inputStream) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through an InputStream and updates the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>digest</code> - The MessageDigest to use (e.g. MD5)</dd> +<dd><code>inputStream</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.8</dd> +</dl> +</li> +</ul> +<a name="updateDigest-java.security.MessageDigest-java.nio.file.Path-java.nio.file.OpenOption...-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>updateDigest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> updateDigest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> digest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file">Path</a> path, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/OpenOption.html?is-external=true" title="class or interface in java.nio.file">OpenOption</a>... options) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through a Path and updates the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>digest</code> - The MessageDigest to use (e.g. MD5)</dd> +<dd><code>path</code> - Data to digest</dd> +<dd><code>options</code> - options How to open the file</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="updateDigest-java.security.MessageDigest-java.io.RandomAccessFile-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>updateDigest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> updateDigest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> digest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/RandomAccessFile.html?is-external=true" title="class or interface in java.io">RandomAccessFile</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through a RandomAccessFile and updates the digest for the data using non-blocking-io (NIO)</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>digest</code> - The MessageDigest to use (e.g. MD5)</dd> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="updateDigest-java.security.MessageDigest-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>updateDigest</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> updateDigest(<a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> messageDigest, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block">Updates the given <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> from a String (converted to bytes using UTF-8). + <p> + To update the digest using a different charset for the conversion, + convert the String to a byte array using + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a> and pass that + to the <a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html#updateDigest-java.security.MessageDigest-byte:A-"><code>updateDigest(MessageDigest, byte[])</code></a> method</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>messageDigest</code> - the <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> to update</dd> +<dd><code>valueToDigest</code> - the value to update the <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> with; + converted to bytes using <a href="../../../../../org/apache/commons/codec/binary/StringUtils.html#getBytesUtf8-java.lang.String-"><code>StringUtils.getBytesUtf8(String)</code></a></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the updated <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a></dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="digest-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public byte[] digest(byte[] data)</pre> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digest-java.nio.ByteBuffer-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public byte[] digest(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data)</pre> +<div class="block">Reads through a ByteBuffer and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digest-java.io.File-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public byte[] digest(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through a File and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digest-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public byte[] digest(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through an InputStream and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digest-java.nio.file.Path-java.nio.file.OpenOption...-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public byte[] digest(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file">Path</a> data, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/OpenOption.html?is-external=true" title="class or interface in java.nio.file">OpenOption</a>... options) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through a File and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dd><code>options</code> - options How to open the file</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="digest-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digest</h4> +<pre>public byte[] digest(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest treated as UTF-8 string</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digestAsHex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digestAsHex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> digestAsHex(byte[] data)</pre> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digestAsHex-java.nio.ByteBuffer-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digestAsHex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> digestAsHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> data)</pre> +<div class="block">Reads through a ByteBuffer and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digestAsHex-java.io.File-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digestAsHex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> digestAsHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through a File and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digestAsHex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digestAsHex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> digestAsHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> data) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through an InputStream and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digestAsHex-java.nio.file.Path-java.nio.file.OpenOption...-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digestAsHex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> digestAsHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/Path.html?is-external=true" title="class or interface in java.nio.file">Path</a> data, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/OpenOption.html?is-external=true" title="class or interface in java.nio.file">OpenOption</a>... options) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Reads through a File and returns the digest for the data</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest</dd> +<dd><code>options</code> - options How to open the file</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a hex string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On error reading from the stream</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="digestAsHex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>digestAsHex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> digestAsHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block">Reads through a byte array and returns the digest for the data.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - Data to digest treated as UTF-8 string</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a hex string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="getMessageDigest--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getMessageDigest</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</a> getMessageDigest()</pre> +<div class="block">Returns the message digest instance.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the message digest instance</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/DigestUtils.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/DigestUtils.html" target="_top">Frames</a></li> +<li><a href="DigestUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/HmacAlgorithms.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/HmacAlgorithms.html new file mode 100644 index 0000000000000000000000000000000000000000..f122df7da11dbbff9668c6a1b9b1aaa05dae995f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/HmacAlgorithms.html @@ -0,0 +1,504 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>HmacAlgorithms (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="HmacAlgorithms (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":9,"i3":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/HmacAlgorithms.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/HmacAlgorithms.html" target="_top">Frames</a></li> +<li><a href="HmacAlgorithms.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#enum.constant.summary">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#enum.constant.detail">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Enum HmacAlgorithms" class="title">Enum HmacAlgorithms</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">java.lang.Enum</a><<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a>></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.HmacAlgorithms</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a>></dd> +</dl> +<hr> +<br> +<pre>public enum <span class="typeNameLabel">HmacAlgorithms</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a><<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a>></pre> +<div class="block">Standard <a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest"><code>HmacUtils</code></a> algorithm names from the <cite>Java Cryptography Architecture Standard Algorithm Name + Documentation</cite>. + + <p> + <strong>Note: Not all JCE implementations support all the algorithms in this enum.</strong> + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.10</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"> Java + 6 Cryptography Architecture Sun Providers Documentation</a>, +<a href="http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"> Java + 7 Cryptography Architecture Sun Providers Documentation</a>, +<a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"> Java + 8 Cryptography Architecture Sun Providers Documentation</a>, +<a href= + "http://docs.oracle.com/javase/9/security/oracleproviders.htm#JSSEC-GUID-A47B1249-593C-4C38-A0D0-68FA7681E0A7"> + Java 9 Cryptography Architecture Sun Providers Documentation</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== ENUM CONSTANT SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="enum.constant.summary"> +<!-- --> +</a> +<h3>Enum Constant Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Constant Summary table, listing enum constants, and an explanation"> +<caption><span>Enum Constants</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Enum Constant and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#HMAC_MD5">HMAC_MD5</a></span></code> +<div class="block">The HmacMD5 Message Authentication Code (MAC) algorithm specified in RFC 2104 and RFC 1321.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#HMAC_SHA_1">HMAC_SHA_1</a></span></code> +<div class="block">The HmacSHA1 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#HMAC_SHA_224">HMAC_SHA_224</a></span></code> +<div class="block">The HmacSHA224 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#HMAC_SHA_256">HMAC_SHA_256</a></span></code> +<div class="block">The HmacSHA256 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#HMAC_SHA_384">HMAC_SHA_384</a></span></code> +<div class="block">The HmacSHA384 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#HMAC_SHA_512">HMAC_SHA_512</a></span></code> +<div class="block">The HmacSHA512 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#getName--">getName</a></span>()</code> +<div class="block">Gets the algorithm name.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#toString--">toString</a></span>()</code> +<div class="block">The algorithm name</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#valueOf-java.lang.String-">valueOf</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#values--">values</a></span>()</code> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Enum"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#compareTo-E-" title="class or interface in java.lang">compareTo</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang">getDeclaringClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#name--" title="class or interface in java.lang">name</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#ordinal--" title="class or interface in java.lang">ordinal</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#valueOf-java.lang.Class-java.lang.String-" title="class or interface in java.lang">valueOf</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ ENUM CONSTANT DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="enum.constant.detail"> +<!-- --> +</a> +<h3>Enum Constant Detail</h3> +<a name="HMAC_MD5"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>HMAC_MD5</h4> +<pre>public static final <a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> HMAC_MD5</pre> +<div class="block">The HmacMD5 Message Authentication Code (MAC) algorithm specified in RFC 2104 and RFC 1321. + <p> + Every implementation of the Java platform is required to support this standard MAC algorithm. + </p></div> +</li> +</ul> +<a name="HMAC_SHA_1"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>HMAC_SHA_1</h4> +<pre>public static final <a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> HMAC_SHA_1</pre> +<div class="block">The HmacSHA1 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2. + <p> + Every implementation of the Java platform is required to support this standard MAC algorithm. + </p></div> +</li> +</ul> +<a name="HMAC_SHA_224"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>HMAC_SHA_224</h4> +<pre>public static final <a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> HMAC_SHA_224</pre> +<div class="block">The HmacSHA224 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2. + <p> + Every implementation of the Java 8+ platform is required to support this standard MAC algorithm. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="HMAC_SHA_256"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>HMAC_SHA_256</h4> +<pre>public static final <a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> HMAC_SHA_256</pre> +<div class="block">The HmacSHA256 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2. + <p> + Every implementation of the Java platform is required to support this standard MAC algorithm. + </p></div> +</li> +</ul> +<a name="HMAC_SHA_384"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>HMAC_SHA_384</h4> +<pre>public static final <a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> HMAC_SHA_384</pre> +<div class="block">The HmacSHA384 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2. + <p> + This MAC algorithm is <em>optional</em>; not all implementations support it. + </p></div> +</li> +</ul> +<a name="HMAC_SHA_512"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>HMAC_SHA_512</h4> +<pre>public static final <a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> HMAC_SHA_512</pre> +<div class="block">The HmacSHA512 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2. + <p> + This MAC algorithm is <em>optional</em>; not all implementations support it. + </p></div> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="values--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>values</h4> +<pre>public static <a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a>[] values()</pre> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +<pre> +for (HmacAlgorithms c : HmacAlgorithms.values()) + System.out.println(c); +</pre></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>an array containing the constants of this enum type, in the order they are declared</dd> +</dl> +</li> +</ul> +<a name="valueOf-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>valueOf</h4> +<pre>public static <a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> valueOf(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Returns the enum constant of this type with the specified name. +The string must match <i>exactly</i> an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - the name of the enum constant to be returned.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the enum constant with the specified name</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if this enum type has no constant with the specified name</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the argument is null</dd> +</dl> +</li> +</ul> +<a name="getName--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getName</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getName()</pre> +<div class="block">Gets the algorithm name.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the algorithm name.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="toString--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>toString</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> +<div class="block">The algorithm name</div> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a><<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a>></code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The algorithm name ("HmacSHA512" for example)</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"> + Java 6 Cryptography Architecture Sun Providers Documentation</a>, +<a href="http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"> + Java 7 Cryptography Architecture Sun Providers Documentation</a>, +<a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"> + Java 8 Cryptography Architecture Sun Providers Documentation</a>, +<a href= + "http://docs.oracle.com/javase/9/security/oracleproviders.htm#JSSEC-GUID-A47B1249-593C-4C38-A0D0-68FA7681E0A7"> + Java 9 Cryptography Architecture Sun Providers Documentation</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/HmacAlgorithms.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/HmacAlgorithms.html" target="_top">Frames</a></li> +<li><a href="HmacAlgorithms.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#enum.constant.summary">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#enum.constant.detail">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/HmacUtils.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/HmacUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..17d8528f7546e3d03ef060721d9713bd12f29448 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/HmacUtils.html @@ -0,0 +1,2000 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>HmacUtils (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="HmacUtils (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":41,"i1":41,"i2":41,"i3":41,"i4":41,"i5":9,"i6":9,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":41,"i18":41,"i19":41,"i20":41,"i21":41,"i22":41,"i23":41,"i24":41,"i25":41,"i26":41,"i27":41,"i28":41,"i29":41,"i30":41,"i31":41,"i32":41,"i33":41,"i34":41,"i35":41,"i36":41,"i37":41,"i38":41,"i39":41,"i40":41,"i41":41,"i42":41,"i43":41,"i44":41,"i45":41,"i46":41,"i47":9,"i48":9,"i49":9,"i50":9,"i51":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/HmacUtils.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/HmacUtils.html" target="_top">Frames</a></li> +<li><a href="HmacUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class HmacUtils" class="title">Class HmacUtils</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.HmacUtils</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public final class <span class="typeNameLabel">HmacUtils</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Simplifies common <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> tasks. This class is immutable and thread-safe. + However the Mac may not be. + <p> + <strong>Note: Not all JCE implementations support all algorithms. If not supported, an IllegalArgumentException is + thrown.</strong> + <p> + Sample usage: + <pre> + import static HmacAlgorithms.*; + byte[] key = {1,2,3,4}; // don't use this actual key! + String valueToDigest = "The quick brown fox jumps over the lazy dog"; + byte[] hmac = new HmacUtils(HMAC_SHA_224, key).hmac(valueToDigest); + // Mac re-use + HmacUtils hm1 = new HmacUtils("HmacAlgoName", key); // use a valid name here! + String hexPom = hm1.hmacHex(new File("pom.xml")); + String hexNot = hm1.hmacHex(new File("NOTICE.txt")); + </pre></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.10</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#HmacUtils--">HmacUtils</a></span>()</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">since 1.11; only useful to preserve binary compatibility</span></div> +</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#HmacUtils-org.apache.commons.codec.digest.HmacAlgorithms-byte:A-">HmacUtils</a></span>(<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> algorithm, + byte[] key)</code> +<div class="block">Creates an instance using the provided algorithm type.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#HmacUtils-org.apache.commons.codec.digest.HmacAlgorithms-java.lang.String-">HmacUtils</a></span>(<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> algorithm, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> +<div class="block">Creates an instance using the provided algorithm type.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#HmacUtils-java.lang.String-byte:A-">HmacUtils</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> algorithm, + byte[] key)</code> +<div class="block">Creates an instance using the provided algorithm type.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#HmacUtils-java.lang.String-java.lang.String-">HmacUtils</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> algorithm, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> +<div class="block">Creates an instance using the provided algorithm type.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#getHmacMd5-byte:A-">getHmacMd5</a></span>(byte[] key)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_MD5, byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#getHmacSha1-byte:A-">getHmacSha1</a></span>(byte[] key)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_1, byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#getHmacSha256-byte:A-">getHmacSha256</a></span>(byte[] key)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_256, byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#getHmacSha384-byte:A-">getHmacSha384</a></span>(byte[] key)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_384, byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#getHmacSha512-byte:A-">getHmacSha512</a></span>(byte[] key)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_512, byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#getInitializedMac-org.apache.commons.codec.digest.HmacAlgorithms-byte:A-">getInitializedMac</a></span>(<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> algorithm, + byte[] key)</code> +<div class="block">Returns an initialized <code>Mac</code> for the given <code>algorithm</code>.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#getInitializedMac-java.lang.String-byte:A-">getInitializedMac</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> algorithm, + byte[] key)</code> +<div class="block">Returns an initialized <code>Mac</code> for the given <code>algorithm</code>.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmac-byte:A-">hmac</a></span>(byte[] valueToDigest)</code> +<div class="block">Returns the digest for the input data.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmac-java.nio.ByteBuffer-">hmac</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> valueToDigest)</code> +<div class="block">Returns the digest for the input data.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmac-java.io.File-">hmac</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> valueToDigest)</code> +<div class="block">Returns the digest for the file.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmac-java.io.InputStream-">hmac</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block">Returns the digest for the stream.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmac-java.lang.String-">hmac</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block">Returns the digest for the input data.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacHex-byte:A-">hmacHex</a></span>(byte[] valueToDigest)</code> +<div class="block">Returns the digest for the input data.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacHex-java.nio.ByteBuffer-">hmacHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> valueToDigest)</code> +<div class="block">Returns the digest for the input data.</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacHex-java.io.File-">hmacHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> valueToDigest)</code> +<div class="block">Returns the digest for the file.</div> +</td> +</tr> +<tr id="i15" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacHex-java.io.InputStream-">hmacHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block">Returns the digest for the stream.</div> +</td> +</tr> +<tr id="i16" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacHex-java.lang.String-">hmacHex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block">Returns the digest for the input data.</div> +</td> +</tr> +<tr id="i17" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacMd5-byte:A-byte:A-">hmacMd5</a></span>(byte[] key, + byte[] valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmac(byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i18" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacMd5-byte:A-java.io.InputStream-">hmacMd5</a></span>(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmac(InputStream)</code></span></div> +</div> +</td> +</tr> +<tr id="i19" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacMd5-java.lang.String-java.lang.String-">hmacMd5</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, String).hmac(String)</code></span></div> +</div> +</td> +</tr> +<tr id="i20" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacMd5Hex-byte:A-byte:A-">hmacMd5Hex</a></span>(byte[] key, + byte[] valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmacHex(byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i21" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacMd5Hex-byte:A-java.io.InputStream-">hmacMd5Hex</a></span>(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmacHex(InputStream)</code></span></div> +</div> +</td> +</tr> +<tr id="i22" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacMd5Hex-java.lang.String-java.lang.String-">hmacMd5Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, String).hmacHex(String)</code></span></div> +</div> +</td> +</tr> +<tr id="i23" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha1-byte:A-byte:A-">hmacSha1</a></span>(byte[] key, + byte[] valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmac(byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i24" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha1-byte:A-java.io.InputStream-">hmacSha1</a></span>(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmac(InputStream)</code></span></div> +</div> +</td> +</tr> +<tr id="i25" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha1-java.lang.String-java.lang.String-">hmacSha1</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, String).hmac(String)</code></span></div> +</div> +</td> +</tr> +<tr id="i26" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha1Hex-byte:A-byte:A-">hmacSha1Hex</a></span>(byte[] key, + byte[] valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmacHex(byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i27" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha1Hex-byte:A-java.io.InputStream-">hmacSha1Hex</a></span>(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmacHex(InputStream)</code></span></div> +</div> +</td> +</tr> +<tr id="i28" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha1Hex-java.lang.String-java.lang.String-">hmacSha1Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, String).hmacHex(String)</code></span></div> +</div> +</td> +</tr> +<tr id="i29" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha256-byte:A-byte:A-">hmacSha256</a></span>(byte[] key, + byte[] valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmac(byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i30" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha256-byte:A-java.io.InputStream-">hmacSha256</a></span>(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmac(InputStream)</code></span></div> +</div> +</td> +</tr> +<tr id="i31" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha256-java.lang.String-java.lang.String-">hmacSha256</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, String).hmac(String)</code></span></div> +</div> +</td> +</tr> +<tr id="i32" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha256Hex-byte:A-byte:A-">hmacSha256Hex</a></span>(byte[] key, + byte[] valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmacHex(byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i33" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha256Hex-byte:A-java.io.InputStream-">hmacSha256Hex</a></span>(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmacHex(InputStream)</code></span></div> +</div> +</td> +</tr> +<tr id="i34" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha256Hex-java.lang.String-java.lang.String-">hmacSha256Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, String).hmacHex(String)</code></span></div> +</div> +</td> +</tr> +<tr id="i35" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha384-byte:A-byte:A-">hmacSha384</a></span>(byte[] key, + byte[] valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmac(byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i36" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha384-byte:A-java.io.InputStream-">hmacSha384</a></span>(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmac(InputStream)</code></span></div> +</div> +</td> +</tr> +<tr id="i37" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha384-java.lang.String-java.lang.String-">hmacSha384</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, String).hmac(String)</code></span></div> +</div> +</td> +</tr> +<tr id="i38" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha384Hex-byte:A-byte:A-">hmacSha384Hex</a></span>(byte[] key, + byte[] valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmacHex(byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i39" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha384Hex-byte:A-java.io.InputStream-">hmacSha384Hex</a></span>(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmacHex(InputStream)</code></span></div> +</div> +</td> +</tr> +<tr id="i40" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha384Hex-java.lang.String-java.lang.String-">hmacSha384Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, String).hmacHex(String)</code></span></div> +</div> +</td> +</tr> +<tr id="i41" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha512-byte:A-byte:A-">hmacSha512</a></span>(byte[] key, + byte[] valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmac(byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i42" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha512-byte:A-java.io.InputStream-">hmacSha512</a></span>(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmac(InputStream)</code></span></div> +</div> +</td> +</tr> +<tr id="i43" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha512-java.lang.String-java.lang.String-">hmacSha512</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, String).hmac(String)</code></span></div> +</div> +</td> +</tr> +<tr id="i44" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha512Hex-byte:A-byte:A-">hmacSha512Hex</a></span>(byte[] key, + byte[] valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmacHex(byte[])</code></span></div> +</div> +</td> +</tr> +<tr id="i45" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha512Hex-byte:A-java.io.InputStream-">hmacSha512Hex</a></span>(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmacHex(InputStream)</code></span></div> +</div> +</td> +</tr> +<tr id="i46" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#hmacSha512Hex-java.lang.String-java.lang.String-">hmacSha512Hex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, String).hmacHex(String)</code></span></div> +</div> +</td> +</tr> +<tr id="i47" class="rowColor"> +<td class="colFirst"><code>static boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#isAvailable-org.apache.commons.codec.digest.HmacAlgorithms-">isAvailable</a></span>(<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> name)</code> +<div class="block">Returns whether this algorithm is available</div> +</td> +</tr> +<tr id="i48" class="altColor"> +<td class="colFirst"><code>static boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#isAvailable-java.lang.String-">isAvailable</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns whether this algorithm is available</div> +</td> +</tr> +<tr id="i49" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#updateHmac-javax.crypto.Mac-byte:A-">updateHmac</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> mac, + byte[] valueToDigest)</code> +<div class="block">Resets and then updates the given <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with the value.</div> +</td> +</tr> +<tr id="i50" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#updateHmac-javax.crypto.Mac-java.io.InputStream-">updateHmac</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> mac, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest)</code> +<div class="block">Resets and then updates the given <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with the value.</div> +</td> +</tr> +<tr id="i51" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html#updateHmac-javax.crypto.Mac-java.lang.String-">updateHmac</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> mac, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</code> +<div class="block">Resets and then updates the given <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with the value.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="HmacUtils--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>HmacUtils</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public HmacUtils()</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">since 1.11; only useful to preserve binary compatibility</span></div> +<div class="block">Preserves binary compatibility only. + As for previous versions does not provide useful behavior</div> +</li> +</ul> +<a name="HmacUtils-java.lang.String-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>HmacUtils</h4> +<pre>public HmacUtils(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> algorithm, + byte[] key)</pre> +<div class="block">Creates an instance using the provided algorithm type.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>algorithm</code> - to use</dd> +<dd><code>key</code> - the key to use</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="HmacUtils-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>HmacUtils</h4> +<pre>public HmacUtils(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> algorithm, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> +<div class="block">Creates an instance using the provided algorithm type.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>algorithm</code> - to use</dd> +<dd><code>key</code> - the key to use</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="HmacUtils-org.apache.commons.codec.digest.HmacAlgorithms-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>HmacUtils</h4> +<pre>public HmacUtils(<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> algorithm, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> +<div class="block">Creates an instance using the provided algorithm type.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>algorithm</code> - to use</dd> +<dd><code>key</code> - the key to use</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="HmacUtils-org.apache.commons.codec.digest.HmacAlgorithms-byte:A-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>HmacUtils</h4> +<pre>public HmacUtils(<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> algorithm, + byte[] key)</pre> +<div class="block">Creates an instance using the provided algorithm type.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>algorithm</code> - to use.</dd> +<dd><code>key</code> - the key to use</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="isAvailable-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isAvailable</h4> +<pre>public static boolean isAvailable(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Returns whether this algorithm is available</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - the name to check</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>whether this algorithm is available</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="isAvailable-org.apache.commons.codec.digest.HmacAlgorithms-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isAvailable</h4> +<pre>public static boolean isAvailable(<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> name)</pre> +<div class="block">Returns whether this algorithm is available</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - the name to check</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>whether this algorithm is available</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="getHmacMd5-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getHmacMd5</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> getHmacMd5(byte[] key)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_MD5, byte[])</code></span></div> +<div class="block">Returns an initialized <code>Mac</code> for the HmacMD5 algorithm. + <p> + Every implementation of the Java platform is required to support this standard Mac algorithm. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A Mac instance initialized with the given key.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#getInstance-java.lang.String-" title="class or interface in javax.crypto"><code>Mac.getInstance(String)</code></a>, +<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#init-java.security.Key-" title="class or interface in javax.crypto"><code>Mac.init(Key)</code></a></dd> +</dl> +</li> +</ul> +<a name="getHmacSha1-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getHmacSha1</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> getHmacSha1(byte[] key)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_1, byte[])</code></span></div> +<div class="block">Returns an initialized <code>Mac</code> for the HmacSHA1 algorithm. + <p> + Every implementation of the Java platform is required to support this standard Mac algorithm. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A Mac instance initialized with the given key.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#getInstance-java.lang.String-" title="class or interface in javax.crypto"><code>Mac.getInstance(String)</code></a>, +<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#init-java.security.Key-" title="class or interface in javax.crypto"><code>Mac.init(Key)</code></a></dd> +</dl> +</li> +</ul> +<a name="getHmacSha256-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getHmacSha256</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> getHmacSha256(byte[] key)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_256, byte[])</code></span></div> +<div class="block">Returns an initialized <code>Mac</code> for the HmacSHA256 algorithm. + <p> + Every implementation of the Java platform is required to support this standard Mac algorithm. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A Mac instance initialized with the given key.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#getInstance-java.lang.String-" title="class or interface in javax.crypto"><code>Mac.getInstance(String)</code></a>, +<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#init-java.security.Key-" title="class or interface in javax.crypto"><code>Mac.init(Key)</code></a></dd> +</dl> +</li> +</ul> +<a name="getHmacSha384-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getHmacSha384</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> getHmacSha384(byte[] key)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_384, byte[])</code></span></div> +<div class="block">Returns an initialized <code>Mac</code> for the HmacSHA384 algorithm. + <p> + Every implementation of the Java platform is <em>not</em> required to support this Mac algorithm. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A Mac instance initialized with the given key.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#getInstance-java.lang.String-" title="class or interface in javax.crypto"><code>Mac.getInstance(String)</code></a>, +<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#init-java.security.Key-" title="class or interface in javax.crypto"><code>Mac.init(Key)</code></a></dd> +</dl> +</li> +</ul> +<a name="getHmacSha512-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getHmacSha512</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> getHmacSha512(byte[] key)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>getInitializedMac(HmacAlgorithms.HMAC_SHA_512, byte[])</code></span></div> +<div class="block">Returns an initialized <code>Mac</code> for the HmacSHA512 algorithm. + <p> + Every implementation of the Java platform is <em>not</em> required to support this Mac algorithm. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A Mac instance initialized with the given key.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#getInstance-java.lang.String-" title="class or interface in javax.crypto"><code>Mac.getInstance(String)</code></a>, +<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#init-java.security.Key-" title="class or interface in javax.crypto"><code>Mac.init(Key)</code></a></dd> +</dl> +</li> +</ul> +<a name="getInitializedMac-org.apache.commons.codec.digest.HmacAlgorithms-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInitializedMac</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> getInitializedMac(<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> algorithm, + byte[] key)</pre> +<div class="block">Returns an initialized <code>Mac</code> for the given <code>algorithm</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>algorithm</code> - the name of the algorithm requested. See + <a href= "http://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA" + >Appendix A in the Java Cryptography Architecture Reference Guide</a> for information about standard + algorithm names.</dd> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A Mac instance initialized with the given key.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#getInstance-java.lang.String-" title="class or interface in javax.crypto"><code>Mac.getInstance(String)</code></a>, +<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#init-java.security.Key-" title="class or interface in javax.crypto"><code>Mac.init(Key)</code></a></dd> +</dl> +</li> +</ul> +<a name="getInitializedMac-java.lang.String-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInitializedMac</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> getInitializedMac(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> algorithm, + byte[] key)</pre> +<div class="block">Returns an initialized <code>Mac</code> for the given <code>algorithm</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>algorithm</code> - the name of the algorithm requested. See + <a href= "http://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA" + >Appendix A in the Java Cryptography Architecture Reference Guide</a> for information about standard + algorithm names.</dd> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A Mac instance initialized with the given key.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#getInstance-java.lang.String-" title="class or interface in javax.crypto"><code>Mac.getInstance(String)</code></a>, +<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true#init-java.security.Key-" title="class or interface in javax.crypto"><code>Mac.init(Key)</code></a></dd> +</dl> +</li> +</ul> +<a name="hmacMd5-byte:A-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacMd5</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacMd5(byte[] key, + byte[] valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmac(byte[])</code></span></div> +<div class="block">Returns a HmacMD5 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacMD5 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacMd5-byte:A-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacMd5</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacMd5(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmac(InputStream)</code></span></div> +<div class="block">Returns a HmacMD5 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacMD5 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacMd5-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacMd5</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacMd5(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, String).hmac(String)</code></span></div> +<div class="block">Returns a HmacMD5 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacMD5 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacMd5Hex-byte:A-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacMd5Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacMd5Hex(byte[] key, + byte[] valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmacHex(byte[])</code></span></div> +<div class="block">Returns a HmacMD5 Message Authentication Code (MAC) as a hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacMD5 MAC for the given key and value as a hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacMd5Hex-byte:A-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacMd5Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacMd5Hex(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmacHex(InputStream)</code></span></div> +<div class="block">Returns a HmacMD5 Message Authentication Code (MAC) as a hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacMD5 MAC for the given key and value as a hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacMd5Hex-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacMd5Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacMd5Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_MD5, String).hmacHex(String)</code></span></div> +<div class="block">Returns a HmacMD5 Message Authentication Code (MAC) as a hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacMD5 MAC for the given key and value as a hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha1-byte:A-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha1</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha1(byte[] key, + byte[] valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmac(byte[])</code></span></div> +<div class="block">Returns a HmacSHA1 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA1 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha1-byte:A-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha1</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha1(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmac(InputStream)</code></span></div> +<div class="block">Returns a HmacSHA1 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA1 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha1-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha1</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha1(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, String).hmac(String)</code></span></div> +<div class="block">Returns a HmacSHA1 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA1 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha1Hex-byte:A-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha1Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha1Hex(byte[] key, + byte[] valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmacHex(byte[])</code></span></div> +<div class="block">Returns a HmacSHA1 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA1 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha1Hex-byte:A-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha1Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha1Hex(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmacHex(InputStream)</code></span></div> +<div class="block">Returns a HmacSHA1 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA1 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha1Hex-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha1Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha1Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_1, String).hmacHex(String)</code></span></div> +<div class="block">Returns a HmacSHA1 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA1 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha256-byte:A-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha256</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha256(byte[] key, + byte[] valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmac(byte[])</code></span></div> +<div class="block">Returns a HmacSHA256 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA256 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha256-byte:A-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha256</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha256(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmac(InputStream)</code></span></div> +<div class="block">Returns a HmacSHA256 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA256 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha256-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha256</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha256(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, String).hmac(String)</code></span></div> +<div class="block">Returns a HmacSHA256 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA256 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha256Hex-byte:A-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha256Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha256Hex(byte[] key, + byte[] valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmacHex(byte[])</code></span></div> +<div class="block">Returns a HmacSHA256 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA256 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha256Hex-byte:A-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha256Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha256Hex(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmacHex(InputStream)</code></span></div> +<div class="block">Returns a HmacSHA256 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA256 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha256Hex-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha256Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha256Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_256, String).hmacHex(String)</code></span></div> +<div class="block">Returns a HmacSHA256 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA256 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha384-byte:A-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha384</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha384(byte[] key, + byte[] valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmac(byte[])</code></span></div> +<div class="block">Returns a HmacSHA384 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA384 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha384-byte:A-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha384</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha384(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmac(InputStream)</code></span></div> +<div class="block">Returns a HmacSHA384 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA384 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha384-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha384</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha384(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, String).hmac(String)</code></span></div> +<div class="block">Returns a HmacSHA384 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA384 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha384Hex-byte:A-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha384Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha384Hex(byte[] key, + byte[] valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmacHex(byte[])</code></span></div> +<div class="block">Returns a HmacSHA384 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA384 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha384Hex-byte:A-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha384Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha384Hex(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmacHex(InputStream)</code></span></div> +<div class="block">Returns a HmacSHA384 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA384 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha384Hex-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha384Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha384Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_384, String).hmacHex(String)</code></span></div> +<div class="block">Returns a HmacSHA384 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA384 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha512-byte:A-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha512</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha512(byte[] key, + byte[] valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmac(byte[])</code></span></div> +<div class="block">Returns a HmacSHA512 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA512 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha512-byte:A-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha512</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha512(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmac(InputStream)</code></span></div> +<div class="block">Returns a HmacSHA512 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA512 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha512-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha512</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static byte[] hmacSha512(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, String).hmac(String)</code></span></div> +<div class="block">Returns a HmacSHA512 Message Authentication Code (MAC) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA512 MAC for the given key and value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha512Hex-byte:A-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha512Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha512Hex(byte[] key, + byte[] valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmacHex(byte[])</code></span></div> +<div class="block">Returns a HmacSHA512 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA512 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha512Hex-byte:A-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha512Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha512Hex(byte[] key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmacHex(InputStream)</code></span></div> +<div class="block">Returns a HmacSHA512 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA512 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="hmacSha512Hex-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacSha512Hex</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacSha512Hex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">(1.11) Use <code>new HmacUtils(HmacAlgorithms.HMAC_SHA_512, String).hmacHex(String)</code></span></div> +<div class="block">Returns a HmacSHA512 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key for the keyed digest (must not be null)</dd> +<dd><code>valueToDigest</code> - The value (data) which should to digest (maybe empty or null)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>HmacSHA512 MAC for the given key and value as hex string (lowercase)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught or key is null or key is invalid.</dd> +</dl> +</li> +</ul> +<a name="updateHmac-javax.crypto.Mac-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>updateHmac</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> updateHmac(<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> mac, + byte[] valueToDigest)</pre> +<div class="block">Resets and then updates the given <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with the value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>mac</code> - the initialized <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> to update</dd> +<dd><code>valueToDigest</code> - the value to update the <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with (maybe null or empty)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the updated <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the Mac was not initialized</dd> +</dl> +</li> +</ul> +<a name="updateHmac-javax.crypto.Mac-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>updateHmac</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> updateHmac(<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> mac, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Resets and then updates the given <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with the value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>mac</code> - the initialized <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> to update</dd> +<dd><code>valueToDigest</code> - the value to update the <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the updated <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If the Mac was not initialized</dd> +</dl> +</li> +</ul> +<a name="updateHmac-javax.crypto.Mac-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>updateHmac</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> updateHmac(<a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a> mac, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block">Resets and then updates the given <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with the value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>mac</code> - the initialized <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> to update</dd> +<dd><code>valueToDigest</code> - the value to update the <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> with (maybe null or empty)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the updated <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a></dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the Mac was not initialized</dd> +</dl> +</li> +</ul> +<a name="hmac-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmac</h4> +<pre>public byte[] hmac(byte[] valueToDigest)</pre> +<div class="block">Returns the digest for the input data.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>valueToDigest</code> - the input to use</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a byte[]</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="hmacHex-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacHex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacHex(byte[] valueToDigest)</pre> +<div class="block">Returns the digest for the input data.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>valueToDigest</code> - the input to use</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a hex String</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="hmac-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmac</h4> +<pre>public byte[] hmac(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block">Returns the digest for the input data.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>valueToDigest</code> - the input to use, treated as UTF-8</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a byte[]</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="hmacHex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacHex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> valueToDigest)</pre> +<div class="block">Returns the digest for the input data.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>valueToDigest</code> - the input to use, treated as UTF-8</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a hex String</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="hmac-java.nio.ByteBuffer-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmac</h4> +<pre>public byte[] hmac(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> valueToDigest)</pre> +<div class="block">Returns the digest for the input data.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>valueToDigest</code> - the input to use</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a byte[]</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="hmacHex-java.nio.ByteBuffer-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacHex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> valueToDigest)</pre> +<div class="block">Returns the digest for the input data.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>valueToDigest</code> - the input to use</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a hex String</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="hmac-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmac</h4> +<pre>public byte[] hmac(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Returns the digest for the stream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>valueToDigest</code> - the data to use + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="hmacHex-java.io.InputStream-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmacHex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Returns the digest for the stream.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>valueToDigest</code> - the data to use + <p> + The InputStream must not be null and will not be closed + </p></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a hex String</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="hmac-java.io.File-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hmac</h4> +<pre>public byte[] hmac(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Returns the digest for the file.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>valueToDigest</code> - the file to use</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="hmacHex-java.io.File-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>hmacHex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> hmacHex(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> valueToDigest) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> +<div class="block">Returns the digest for the file.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>valueToDigest</code> - the file to use</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the digest as a hex String</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an I/O error occurs.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/HmacUtils.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/HmacUtils.html" target="_top">Frames</a></li> +<li><a href="HmacUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/Md5Crypt.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/Md5Crypt.html new file mode 100644 index 0000000000000000000000000000000000000000..8c480e082ad6fd8f13c5cdce8210f99ce3d5c399 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/Md5Crypt.html @@ -0,0 +1,629 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Md5Crypt (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Md5Crypt (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Md5Crypt.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/Md5Crypt.html" target="_top">Frames</a></li> +<li><a href="Md5Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class Md5Crypt" class="title">Class Md5Crypt</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.Md5Crypt</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Md5Crypt</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">The libc crypt() "$1$" and Apache "$apr1$" MD5-based hash algorithm. + <p> + Based on the public domain ("beer-ware") C implementation from Poul-Henning Kamp which was found at: <a + href="http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libcrypt/crypt-md5.c?rev=1.1;content-type=text%2Fplain"> + crypt-md5.c @ freebsd.org</a> + </p> + <p> + Source: + </p> + <pre> + $FreeBSD: src/lib/libcrypt/crypt-md5.c,v 1.1 1999/01/21 13:50:09 brandon Exp $ + </pre> + <p> + Conversion to Kotlin and from there to Java in 2012. + </p> + <p> + The C style comments are from the original C code, the ones with "//" from the port. + </p> + <p> + This class is immutable and thread-safe. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#Md5Crypt--">Md5Crypt</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-">apr1Crypt</a></span>(byte[] keyBytes)</code> +<div class="block">See <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-"><code>apr1Crypt(byte[], String)</code></a> for details.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.util.Random-">apr1Crypt</a></span>(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util">Random</a> random)</code> +<div class="block">See <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-"><code>apr1Crypt(byte[], String)</code></a> for details.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-">apr1Crypt</a></span>(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</code> +<div class="block">See <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-java.lang.String-"><code>apr1Crypt(String, String)</code></a> for details.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-">apr1Crypt</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> keyBytes)</code> +<div class="block">See <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-java.lang.String-"><code>apr1Crypt(String, String)</code></a> for details.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-java.lang.String-">apr1Crypt</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</code> +<div class="block">Generates an Apache htpasswd compatible "$apr1$" MD5 based hash value.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-">md5Crypt</a></span>(byte[] keyBytes)</code> +<div class="block">Generates a libc6 crypt() compatible "$1$" hash value.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.util.Random-">md5Crypt</a></span>(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util">Random</a> random)</code> +<div class="block">Generates a libc6 crypt() compatible "$1$" hash value.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.lang.String-">md5Crypt</a></span>(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</code> +<div class="block">Generates a libc crypt() compatible "$1$" MD5 based hash value.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.lang.String-java.lang.String-">md5Crypt</a></span>(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> prefix)</code> +<div class="block">Generates a libc6 crypt() "$1$" or Apache htpasswd "$apr1$" hash value.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.lang.String-java.lang.String-java.util.Random-">md5Crypt</a></span>(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> prefix, + <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util">Random</a> random)</code> +<div class="block">Generates a libc6 crypt() "$1$" or Apache htpasswd "$apr1$" hash value.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Md5Crypt--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Md5Crypt</h4> +<pre>public Md5Crypt()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="apr1Crypt-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>apr1Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> apr1Crypt(byte[] keyBytes)</pre> +<div class="block">See <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-"><code>apr1Crypt(byte[], String)</code></a> for details. + <p> + A salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a>; your own <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util"><code>Random</code></a> in + <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.util.Random-"><code>apr1Crypt(byte[], Random)</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext string to hash.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught. *</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-"><code>apr1Crypt(byte[], String)</code></a></dd> +</dl> +</li> +</ul> +<a name="apr1Crypt-byte:A-java.util.Random-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>apr1Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> apr1Crypt(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util">Random</a> random)</pre> +<div class="block">See <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-"><code>apr1Crypt(byte[], String)</code></a> for details. + <p> + A salt is generated for you using the user provided <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util"><code>Random</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext string to hash.</dd> +<dd><code>random</code> - the instance of <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util"><code>Random</code></a> to use for generating the salt. Consider using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> + or <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught. *</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-"><code>apr1Crypt(byte[], String)</code></a></dd> +</dl> +</li> +</ul> +<a name="apr1Crypt-byte:A-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>apr1Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> apr1Crypt(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</pre> +<div class="block">See <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-java.lang.String-"><code>apr1Crypt(String, String)</code></a> for details. + <p> + A salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext string to hash.</dd> +<dd><code>salt</code> - An APR1 salt. The salt may be null, in which case a salt is generated for you using + <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your + own salts.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +</dl> +</li> +</ul> +<a name="apr1Crypt-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>apr1Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> apr1Crypt(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> keyBytes)</pre> +<div class="block">See <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-java.lang.String-"><code>apr1Crypt(String, String)</code></a> for details. + <p> + A salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts and calling <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-"><code>apr1Crypt(byte[], String)</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext string to hash.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-byte:A-java.lang.String-"><code>apr1Crypt(byte[], String)</code></a></dd> +</dl> +</li> +</ul> +<a name="apr1Crypt-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>apr1Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> apr1Crypt(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</pre> +<div class="block">Generates an Apache htpasswd compatible "$apr1$" MD5 based hash value. + <p> + The algorithm is identical to the crypt(3) "$1$" one but produces different outputs due to the different salt + prefix.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext string to hash.</dd> +<dd><code>salt</code> - salt string including the prefix and optionally garbage at the end. The salt may be null, in which + case a salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +</dl> +</li> +</ul> +<a name="md5Crypt-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md5Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> md5Crypt(byte[] keyBytes)</pre> +<div class="block">Generates a libc6 crypt() compatible "$1$" hash value. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.lang.String-"><code>md5Crypt(byte[], String)</code></a> for details. +</p> + <p> + A salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts and calling <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.lang.String-"><code>md5Crypt(byte[], String)</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext string to hash.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.lang.String-"><code>md5Crypt(byte[], String)</code></a></dd> +</dl> +</li> +</ul> +<a name="md5Crypt-byte:A-java.util.Random-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md5Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> md5Crypt(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util">Random</a> random)</pre> +<div class="block">Generates a libc6 crypt() compatible "$1$" hash value. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.lang.String-"><code>md5Crypt(byte[], String)</code></a> for details. +</p> + <p> + A salt is generated for you using the instance of <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util"><code>Random</code></a> you supply. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext string to hash.</dd> +<dd><code>random</code> - the instance of <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util"><code>Random</code></a> to use for generating the salt. Consider using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> + or <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#md5Crypt-byte:A-java.lang.String-"><code>md5Crypt(byte[], String)</code></a></dd> +</dl> +</li> +</ul> +<a name="md5Crypt-byte:A-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md5Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> md5Crypt(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</pre> +<div class="block">Generates a libc crypt() compatible "$1$" MD5 based hash value. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>Crypt.crypt(String, String)</code></a> for details. We use <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> for seed generation by + default. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext string to hash.</dd> +<dd><code>salt</code> - salt string including the prefix and optionally garbage at the end. The salt may be null, in which + case a salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +</dl> +</li> +</ul> +<a name="md5Crypt-byte:A-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>md5Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> md5Crypt(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> prefix)</pre> +<div class="block">Generates a libc6 crypt() "$1$" or Apache htpasswd "$apr1$" hash value. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>Crypt.crypt(String, String)</code></a> or <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-java.lang.String-"><code>apr1Crypt(String, String)</code></a> for details. We use + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>by default</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext string to hash.</dd> +<dd><code>salt</code> - real salt value without prefix or "rounds=". The salt may be null, in which case a salt + is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider + using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts.</dd> +<dd><code>prefix</code> - salt prefix</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +</dl> +</li> +</ul> +<a name="md5Crypt-byte:A-java.lang.String-java.lang.String-java.util.Random-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>md5Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> md5Crypt(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> prefix, + <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util">Random</a> random)</pre> +<div class="block">Generates a libc6 crypt() "$1$" or Apache htpasswd "$apr1$" hash value. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>Crypt.crypt(String, String)</code></a> or <a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html#apr1Crypt-java.lang.String-java.lang.String-"><code>apr1Crypt(String, String)</code></a> for details. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext string to hash.</dd> +<dd><code>salt</code> - real salt value without prefix or "rounds=". The salt may be null, in which case a salt + is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider + using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts.</dd> +<dd><code>prefix</code> - salt prefix</dd> +<dd><code>random</code> - the instance of <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util"><code>Random</code></a> to use for generating the salt. Consider using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> + or <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Md5Crypt.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/Md5Crypt.html" target="_top">Frames</a></li> +<li><a href="Md5Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MessageDigestAlgorithms.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MessageDigestAlgorithms.html new file mode 100644 index 0000000000000000000000000000000000000000..49d63a1e8a4bfbc7c2434368d37c77c2a6a19ad1 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MessageDigestAlgorithms.html @@ -0,0 +1,597 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>MessageDigestAlgorithms (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="MessageDigestAlgorithms (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MessageDigestAlgorithms.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MessageDigestAlgorithms.html" target="_top">Frames</a></li> +<li><a href="MessageDigestAlgorithms.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class MessageDigestAlgorithms" class="title">Class MessageDigestAlgorithms</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.MessageDigestAlgorithms</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">MessageDigestAlgorithms</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Standard <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> algorithm names from the <cite>Java Cryptography Architecture Standard Algorithm Name + Documentation</cite>. + <p> + This class is immutable and thread-safe. + </p> + <p> + Java 8 and up: SHA-224. + </p> + <p> + Java 9 and up: SHA3-224, SHA3-256, SHA3-384, SHA3-512. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#MessageDigest"> + Java 7 Cryptography Architecture Standard Algorithm Name Documentation</a>, +<a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#MessageDigest"> + Java 8 Cryptography Architecture Standard Algorithm Name Documentation</a>, +<a href="https://docs.oracle.com/javase/9/docs/specs/security/standard-names.html#messagedigest-algorithms"> + Java 9 Cryptography Architecture Standard Algorithm Name Documentation</a>, +<a href="https://docs.oracle.com/javase/10/docs/specs/security/standard-names.html#messagedigest-algorithms"> + Java 10 Cryptography Architecture Standard Algorithm Name Documentation</a>, +<a href="https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html#messagedigest-algorithms"> + Java 11 Cryptography Architecture Standard Algorithm Name Documentation</a>, +<a href="https://docs.oracle.com/en/java/javase/12/docs/specs/security/standard-names.html#messagedigest-algorithms"> + Java 12 Cryptography Architecture Standard Algorithm Name Documentation</a>, +<a href="https://docs.oracle.com/en/java/javase/13/docs/specs/security/standard-names.html#messagedigest-algorithms"> + Java 13 Cryptography Architecture Standard Algorithm Name Documentation</a>, +<a href="http://dx.doi.org/10.6028/NIST.FIPS.180-4">FIPS PUB 180-4</a>, +<a href="http://dx.doi.org/10.6028/NIST.FIPS.202">FIPS PUB 202</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#MD2">MD2</a></span></code> +<div class="block">The MD2 message digest algorithm defined in RFC 1319.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#MD5">MD5</a></span></code> +<div class="block">The MD5 message digest algorithm defined in RFC 1321.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_1">SHA_1</a></span></code> +<div class="block">The SHA-1 hash algorithm defined in the FIPS PUB 180-2.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_224">SHA_224</a></span></code> +<div class="block">The SHA-224 hash algorithm defined in the FIPS PUB 180-3.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_256">SHA_256</a></span></code> +<div class="block">The SHA-256 hash algorithm defined in the FIPS PUB 180-2.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_384">SHA_384</a></span></code> +<div class="block">The SHA-384 hash algorithm defined in the FIPS PUB 180-2.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512">SHA_512</a></span></code> +<div class="block">The SHA-512 hash algorithm defined in the FIPS PUB 180-2.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512_224">SHA_512_224</a></span></code> +<div class="block">The SHA-512 hash algorithm defined in the FIPS PUB 180-4.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA_512_256">SHA_512_256</a></span></code> +<div class="block">The SHA-512 hash algorithm defined in the FIPS PUB 180-4.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_224">SHA3_224</a></span></code> +<div class="block">The SHA3-224 hash algorithm defined in the FIPS PUB 202.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_256">SHA3_256</a></span></code> +<div class="block">The SHA3-256 hash algorithm defined in the FIPS PUB 202.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_384">SHA3_384</a></span></code> +<div class="block">The SHA3-384 hash algorithm defined in the FIPS PUB 202.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#SHA3_512">SHA3_512</a></span></code> +<div class="block">The SHA3-512 hash algorithm defined in the FIPS PUB 202.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html#values--">values</a></span>()</code> +<div class="block">Gets all constant values defined in this class.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="MD2"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>MD2</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> MD2</pre> +<div class="block">The MD2 message digest algorithm defined in RFC 1319.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.MD2">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="MD5"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>MD5</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> MD5</pre> +<div class="block">The MD5 message digest algorithm defined in RFC 1321.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.MD5">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="SHA_1"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SHA_1</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SHA_1</pre> +<div class="block">The SHA-1 hash algorithm defined in the FIPS PUB 180-2.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_1">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="SHA_224"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SHA_224</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SHA_224</pre> +<div class="block">The SHA-224 hash algorithm defined in the FIPS PUB 180-3. + <p> + Present in Oracle Java 8. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_224">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="SHA_256"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SHA_256</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SHA_256</pre> +<div class="block">The SHA-256 hash algorithm defined in the FIPS PUB 180-2.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_256">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="SHA_384"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SHA_384</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SHA_384</pre> +<div class="block">The SHA-384 hash algorithm defined in the FIPS PUB 180-2.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_384">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="SHA_512"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SHA_512</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SHA_512</pre> +<div class="block">The SHA-512 hash algorithm defined in the FIPS PUB 180-2.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_512">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="SHA_512_224"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SHA_512_224</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SHA_512_224</pre> +<div class="block">The SHA-512 hash algorithm defined in the FIPS PUB 180-4. + <p> + Included starting in Oracle Java 9. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_512_224">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="SHA_512_256"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SHA_512_256</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SHA_512_256</pre> +<div class="block">The SHA-512 hash algorithm defined in the FIPS PUB 180-4. + <p> + Included starting in Oracle Java 9. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_512_256">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="SHA3_224"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SHA3_224</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SHA3_224</pre> +<div class="block">The SHA3-224 hash algorithm defined in the FIPS PUB 202. + <p> + Included starting in Oracle Java 9. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA3_224">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="SHA3_256"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SHA3_256</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SHA3_256</pre> +<div class="block">The SHA3-256 hash algorithm defined in the FIPS PUB 202. + <p> + Included starting in Oracle Java 9. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA3_256">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="SHA3_384"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SHA3_384</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SHA3_384</pre> +<div class="block">The SHA3-384 hash algorithm defined in the FIPS PUB 202. + <p> + Included starting in Oracle Java 9. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA3_384">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="SHA3_512"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>SHA3_512</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SHA3_512</pre> +<div class="block">The SHA3-512 hash algorithm defined in the FIPS PUB 202. + <p> + Included starting in Oracle Java 9. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA3_512">Constant Field Values</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="values--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>values</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] values()</pre> +<div class="block">Gets all constant values defined in this class.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>all constant values defined in this class.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MessageDigestAlgorithms.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MessageDigestAlgorithms.html" target="_top">Frames</a></li> +<li><a href="MessageDigestAlgorithms.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash2.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash2.html new file mode 100644 index 0000000000000000000000000000000000000000..a8fe695944e70dc2b6452020c503d9c8ba63a491 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash2.html @@ -0,0 +1,523 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>MurmurHash2 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="MurmurHash2 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MurmurHash2.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MurmurHash2.html" target="_top">Frames</a></li> +<li><a href="MurmurHash2.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class MurmurHash2" class="title">Class MurmurHash2</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.MurmurHash2</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public final class <span class="typeNameLabel">MurmurHash2</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Implementation of the MurmurHash2 32-bit and 64-bit hash functions. + + <p>MurmurHash is a non-cryptographic hash function suitable for general + hash-based lookup. The name comes from two basic operations, multiply (MU) + and rotate (R), used in its inner loop. Unlike cryptographic hash functions, + it is not specifically designed to be difficult to reverse by an adversary, + making it unsuitable for cryptographic purposes.</p> + + <p>This contains a Java port of the 32-bit hash function <code>MurmurHash2</code> + and the 64-bit hash function <code>MurmurHash64A</code> from Austin Applyby's + original <code>c++</code> code in SMHasher.</p> + + <p>This is a re-implementation of the original C code plus some additional + features.</p> + + <p>This is public domain code with no copyrights. From home page of + <a href="https://github.com/aappleby/smhasher">SMHasher</a>:</p> + + <blockquote> + "All MurmurHash versions are public domain software, and the author + disclaims all copyright to their code." + </blockquote></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.13</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a>, +<a href="https://github.com/aappleby/smhasher/blob/master/src/MurmurHash2.cpp"> + Original MurmurHash2 c++ code</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash32-byte:A-int-">hash32</a></span>(byte[] data, + int length)</code> +<div class="block">Generates a 32-bit hash from byte array with the given length and a default seed value.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash32-byte:A-int-int-">hash32</a></span>(byte[] data, + int length, + int seed)</code> +<div class="block">Generates a 32-bit hash from byte array with the given length and seed.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash32-java.lang.String-">hash32</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code> +<div class="block">Generates a 32-bit hash from a string with a default seed.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash32-java.lang.String-int-int-">hash32</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + int from, + int length)</code> +<div class="block">Generates a 32-bit hash from a substring with a default seed value.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>static long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash64-byte:A-int-">hash64</a></span>(byte[] data, + int length)</code> +<div class="block">Generates a 64-bit hash from byte array with given length and a default seed value.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>static long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash64-byte:A-int-int-">hash64</a></span>(byte[] data, + int length, + int seed)</code> +<div class="block">Generates a 64-bit hash from byte array of the given length and seed.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>static long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash64-java.lang.String-">hash64</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code> +<div class="block">Generates a 64-bit hash from a string with a default seed.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>static long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash64-java.lang.String-int-int-">hash64</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + int from, + int length)</code> +<div class="block">Generates a 64-bit hash from a substring with a default seed value.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="hash32-byte:A-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre>public static int hash32(byte[] data, + int length, + int seed)</pre> +<div class="block">Generates a 32-bit hash from byte array with the given length and seed.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>length</code> - The length of the array</dd> +<dd><code>seed</code> - The initial seed value</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +</dl> +</li> +</ul> +<a name="hash32-byte:A-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre>public static int hash32(byte[] data, + int length)</pre> +<div class="block">Generates a 32-bit hash from byte array with the given length and a default seed value. + This is a helper method that will produce the same result as: + + <pre> + int seed = 0x9747b28c; + int hash = MurmurHash2.hash32(data, length, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>length</code> - The length of the array</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash32-byte:A-int-int-"><code>hash32(byte[], int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash32-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre>public static int hash32(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre> +<div class="block">Generates a 32-bit hash from a string with a default seed. + <p> + Before 1.14 the string was converted using default encoding. + Since 1.14 the string is converted to bytes using UTF-8 encoding. + </p> + This is a helper method that will produce the same result as: + + <pre> + int seed = 0x9747b28c; + byte[] bytes = data.getBytes(StandardCharsets.UTF_8); + int hash = MurmurHash2.hash32(bytes, bytes.length, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - The input string</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash32-byte:A-int-int-"><code>hash32(byte[], int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash32-java.lang.String-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre>public static int hash32(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + int from, + int length)</pre> +<div class="block">Generates a 32-bit hash from a substring with a default seed value. + The string is converted to bytes using the default encoding. + This is a helper method that will produce the same result as: + + <pre> + int seed = 0x9747b28c; + byte[] bytes = text.substring(from, from + length).getBytes(StandardCharsets.UTF_8); + int hash = MurmurHash2.hash32(bytes, bytes.length, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - The input string</dd> +<dd><code>from</code> - The starting index</dd> +<dd><code>length</code> - The length of the substring</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash32-byte:A-int-int-"><code>hash32(byte[], int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash64-byte:A-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash64</h4> +<pre>public static long hash64(byte[] data, + int length, + int seed)</pre> +<div class="block">Generates a 64-bit hash from byte array of the given length and seed.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>length</code> - The length of the array</dd> +<dd><code>seed</code> - The initial seed value</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 64-bit hash of the given array</dd> +</dl> +</li> +</ul> +<a name="hash64-byte:A-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash64</h4> +<pre>public static long hash64(byte[] data, + int length)</pre> +<div class="block">Generates a 64-bit hash from byte array with given length and a default seed value. + This is a helper method that will produce the same result as: + + <pre> + int seed = 0xe17a1465; + int hash = MurmurHash2.hash64(data, length, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>length</code> - The length of the array</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 64-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash64-byte:A-int-int-"><code>hash64(byte[], int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash64-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash64</h4> +<pre>public static long hash64(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre> +<div class="block">Generates a 64-bit hash from a string with a default seed. + <p> + Before 1.14 the string was converted using default encoding. + Since 1.14 the string is converted to bytes using UTF-8 encoding. + </p> + This is a helper method that will produce the same result as: + + <pre> + int seed = 0xe17a1465; + byte[] bytes = data.getBytes(StandardCharsets.UTF_8); + int hash = MurmurHash2.hash64(bytes, bytes.length, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - The input string</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 64-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash64-byte:A-int-int-"><code>hash64(byte[], int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash64-java.lang.String-int-int-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>hash64</h4> +<pre>public static long hash64(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + int from, + int length)</pre> +<div class="block">Generates a 64-bit hash from a substring with a default seed value. + The string is converted to bytes using the default encoding. + This is a helper method that will produce the same result as: + + <pre> + int seed = 0xe17a1465; + byte[] bytes = text.substring(from, from + length).getBytes(StandardCharsets.UTF_8); + int hash = MurmurHash2.hash64(bytes, bytes.length, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - The The input string</dd> +<dd><code>from</code> - The starting index</dd> +<dd><code>length</code> - The length of the substring</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 64-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html#hash64-byte:A-int-int-"><code>hash64(byte[], int, int)</code></a></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MurmurHash2.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MurmurHash2.html" target="_top">Frames</a></li> +<li><a href="MurmurHash2.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html new file mode 100644 index 0000000000000000000000000000000000000000..2b7844d50870b7b657e43fa3853754704bd9fa45 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html @@ -0,0 +1,270 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>MurmurHash3.IncrementalHash32 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="MurmurHash3.IncrementalHash32 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MurmurHash3.IncrementalHash32.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.IncrementalHash32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32x86">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class MurmurHash3.IncrementalHash32" class="title">Class MurmurHash3.IncrementalHash32</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32x86</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>Enclosing class:</dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dd> +</dl> +<hr> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use IncrementalHash32x86. This corrects the processing of trailing bytes.</span></div> +</div> +<br> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static class <span class="typeNameLabel">MurmurHash3.IncrementalHash32</span> +extends <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a></pre> +<div class="block">Generates 32-bit hash from input bytes. Bytes can be added incrementally and the new + hash computed. + + <p>This is an implementation of the 32-bit hash function <code>MurmurHash3_x86_32</code> + from from Austin Applyby's original MurmurHash3 <code>c++</code> code in SMHasher.</p> + + <p>This implementation contains a sign-extension bug in the finalization step of + any bytes left over from dividing the length by 4. This manifests if any of these + bytes are negative.<p></div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html#IncrementalHash32--">IncrementalHash32</a></span>()</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> + </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32x86"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a></h3> +<code><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html#add-byte:A-int-int-">add</a>, <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html#end--">end</a>, <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html#start-int-">start</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="IncrementalHash32--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>IncrementalHash32</h4> +<pre>public IncrementalHash32()</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MurmurHash3.IncrementalHash32.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.IncrementalHash32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#methods.inherited.from.class.org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32x86">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li>Method</li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html new file mode 100644 index 0000000000000000000000000000000000000000..4a28db6e9f0912a2711a1be6c8238e7999c1d5ee --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html @@ -0,0 +1,343 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>MurmurHash3.IncrementalHash32x86 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="MurmurHash3.IncrementalHash32x86 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MurmurHash3.IncrementalHash32x86.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.IncrementalHash32x86.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class MurmurHash3.IncrementalHash32x86" class="title">Class MurmurHash3.IncrementalHash32x86</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32x86</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>Direct Known Subclasses:</dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32</a></dd> +</dl> +<dl> +<dt>Enclosing class:</dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></dd> +</dl> +<hr> +<br> +<pre>public static class <span class="typeNameLabel">MurmurHash3.IncrementalHash32x86</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Generates 32-bit hash from input bytes. Bytes can be added incrementally and the new + hash computed. + + <p>This is an implementation of the 32-bit hash function <code>MurmurHash3_x86_32</code> + from from Austin Applyby's original MurmurHash3 <code>c++</code> code in SMHasher.</p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html#IncrementalHash32x86--">IncrementalHash32x86</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html#add-byte:A-int-int-">add</a></span>(byte[] data, + int offset, + int length)</code> +<div class="block">Adds the byte array to the current incremental hash.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html#end--">end</a></span>()</code> +<div class="block">Generate the 32-bit hash value.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html#start-int-">start</a></span>(int seed)</code> +<div class="block">Starts a new incremental hash.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="IncrementalHash32x86--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>IncrementalHash32x86</h4> +<pre>public IncrementalHash32x86()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="start-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>start</h4> +<pre>public final void start(int seed)</pre> +<div class="block">Starts a new incremental hash.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>seed</code> - The initial seed value</dd> +</dl> +</li> +</ul> +<a name="add-byte:A-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>add</h4> +<pre>public final void add(byte[] data, + int offset, + int length)</pre> +<div class="block">Adds the byte array to the current incremental hash.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>offset</code> - The offset of data</dd> +<dd><code>length</code> - The length of array</dd> +</dl> +</li> +</ul> +<a name="end--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>end</h4> +<pre>public final int end()</pre> +<div class="block">Generate the 32-bit hash value. Repeat calls to this method with no additional data + will generate the same hash value.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MurmurHash3.IncrementalHash32x86.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.IncrementalHash32x86.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash3.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash3.html new file mode 100644 index 0000000000000000000000000000000000000000..5b9f4623ed0cec8e14df2abaebe2af19f45665a7 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/MurmurHash3.html @@ -0,0 +1,1279 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>MurmurHash3 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="MurmurHash3 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":41,"i2":41,"i3":9,"i4":9,"i5":41,"i6":41,"i7":41,"i8":41,"i9":9,"i10":9,"i11":9,"i12":9,"i13":41,"i14":9,"i15":9,"i16":41,"i17":41,"i18":41,"i19":41,"i20":41,"i21":41}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MurmurHash3.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MurmurHash3.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li><a href="#nested.class.summary">Nested</a> | </li> +<li><a href="#field.summary">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class MurmurHash3" class="title">Class MurmurHash3</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.MurmurHash3</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public final class <span class="typeNameLabel">MurmurHash3</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Implementation of the MurmurHash3 32-bit and 128-bit hash functions. + + <p> + MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. The name comes from two basic + operations, multiply (MU) and rotate (R), used in its inner loop. Unlike cryptographic hash functions, it is not + specifically designed to be difficult to reverse by an adversary, making it unsuitable for cryptographic purposes. + </p> + + <p> + This contains a Java port of the 32-bit hash function <code>MurmurHash3_x86_32</code> and the 128-bit hash function + <code>MurmurHash3_x64_128</code> from Austin Applyby's original <code>c++</code> code in SMHasher. + </p> + + <p> + This is public domain code with no copyrights. From home page of + <a href="https://github.com/aappleby/smhasher">SMHasher</a>: + </p> + + <blockquote> "All MurmurHash versions are public domain software, and the author disclaims all copyright to their + code." </blockquote> + + <p> + Original adaption from Apache Hive. That adaption contains a <code>hash64</code> method that is not part of the original + MurmurHash3 code. It is not recommended to use these methods. They will be removed in a future release. To obtain a + 64-bit hash use half of the bits from the <code>hash128x64</code> methods using the input data converted to bytes. + <p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.13</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a>, +<a href="https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp"> Original MurmurHash3 c++ + code</a>, +<a href= + "https://github.com/apache/hive/blob/master/storage-api/src/java/org/apache/hive/common/util/Murmur3.java"> + Apache Hive Murmer3</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== NESTED CLASS SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="nested.class.summary"> +<!-- --> +</a> +<h3>Nested Class Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> +<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use IncrementalHash32x86. This corrects the processing of trailing bytes.</span></div> +</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a></span></code> +<div class="block">Generates 32-bit hash from input bytes.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#DEFAULT_SEED">DEFAULT_SEED</a></span></code> +<div class="block">A default seed to use for the murmur hash algorithm.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#NULL_HASHCODE">NULL_HASHCODE</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">This is not used internally and will be removed in a future release.</span></div> +</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static long[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-">hash128</a></span>(byte[] data)</code> +<div class="block">Generates 128-bit hash from the byte array with a default seed.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static long[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-">hash128</a></span>(byte[] data, + int offset, + int length, + int seed)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>. This corrects the seed initialization.</span></div> +</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static long[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-java.lang.String-">hash128</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> using the bytes returned from + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>.</span></div> +</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static long[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64</a></span>(byte[] data)</code> +<div class="block">Generates 128-bit hash from the byte array with a seed of zero.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>static long[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-">hash128x64</a></span>(byte[] data, + int offset, + int length, + int seed)</code> +<div class="block">Generates 128-bit hash from the byte array with the given offset, length and seed.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-">hash32</a></span>(byte[] data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-">hash32</a></span>(byte[] data, + int length)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-">hash32</a></span>(byte[] data, + int length, + int seed)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-">hash32</a></span>(byte[] data, + int offset, + int length, + int seed)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-">hash32</a></span>(long data)</code> +<div class="block">Generates 32-bit hash from a long with a default seed value.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-int-">hash32</a></span>(long data, + int seed)</code> +<div class="block">Generates 32-bit hash from a long with the given seed.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-long-">hash32</a></span>(long data1, + long data2)</code> +<div class="block">Generates 32-bit hash from two longs with a default seed value.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-long-long-int-">hash32</a></span>(long data1, + long data2, + int seed)</code> +<div class="block">Generates 32-bit hash from two longs with the given seed.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-java.lang.String-">hash32</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a> with the bytes returned from + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>. This corrects the processing of trailing bytes.</span></div> +</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-">hash32x86</a></span>(byte[] data)</code> +<div class="block">Generates 32-bit hash from the byte array with a seed of zero.</div> +</td> +</tr> +<tr id="i15" class="rowColor"> +<td class="colFirst"><code>static int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-">hash32x86</a></span>(byte[] data, + int offset, + int length, + int seed)</code> +<div class="block">Generates 32-bit hash from the byte array with the given offset, length and seed.</div> +</td> +</tr> +<tr id="i16" class="altColor"> +<td class="colFirst"><code>static long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-">hash64</a></span>(byte[] data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a>.</span></div> +</div> +</td> +</tr> +<tr id="i17" class="rowColor"> +<td class="colFirst"><code>static long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-">hash64</a></span>(byte[] data, + int offset, + int length)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>.</span></div> +</div> +</td> +</tr> +<tr id="i18" class="altColor"> +<td class="colFirst"><code>static long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-">hash64</a></span>(byte[] data, + int offset, + int length, + int seed)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>.</span></div> +</div> +</td> +</tr> +<tr id="i19" class="rowColor"> +<td class="colFirst"><code>static long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-int-">hash64</a></span>(int data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>int</code>.</span></div> +</div> +</td> +</tr> +<tr id="i20" class="altColor"> +<td class="colFirst"><code>static long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-long-">hash64</a></span>(long data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>long</code>.</span></div> +</div> +</td> +</tr> +<tr id="i21" class="rowColor"> +<td class="colFirst"><code>static long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-short-">hash64</a></span>(short data)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>short</code>.</span></div> +</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="NULL_HASHCODE"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>NULL_HASHCODE</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static final long NULL_HASHCODE</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">This is not used internally and will be removed in a future release.</span></div> +<div class="block">A random number to use for a hash code.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MurmurHash3.NULL_HASHCODE">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="DEFAULT_SEED"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>DEFAULT_SEED</h4> +<pre>public static final int DEFAULT_SEED</pre> +<div class="block">A default seed to use for the murmur hash algorithm. + Has the value <code>104729</code>.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.digest.MurmurHash3.DEFAULT_SEED">Constant Field Values</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="hash32-long-long-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre>public static int hash32(long data1, + long data2)</pre> +<div class="block">Generates 32-bit hash from two longs with a default seed value. + This is a helper method that will produce the same result as: + + <pre> + int offset = 0; + int seed = 104729; + int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16) + .putLong(data1) + .putLong(data2) + .array(), offset, 16, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data1</code> - The first long to hash</dd> +<dd><code>data2</code> - The second long to hash</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash32-long-long-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre>public static int hash32(long data1, + long data2, + int seed)</pre> +<div class="block">Generates 32-bit hash from two longs with the given seed. + This is a helper method that will produce the same result as: + + <pre> + int offset = 0; + int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16) + .putLong(data1) + .putLong(data2) + .array(), offset, 16, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data1</code> - The first long to hash</dd> +<dd><code>data2</code> - The second long to hash</dd> +<dd><code>seed</code> - The initial seed value</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash32-long-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre>public static int hash32(long data)</pre> +<div class="block">Generates 32-bit hash from a long with a default seed value. + This is a helper method that will produce the same result as: + + <pre> + int offset = 0; + int seed = 104729; + int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8) + .putLong(data) + .array(), offset, 8, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The long to hash</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash32-long-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre>public static int hash32(long data, + int seed)</pre> +<div class="block">Generates 32-bit hash from a long with the given seed. + This is a helper method that will produce the same result as: + + <pre> + int offset = 0; + int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8) + .putLong(data) + .array(), offset, 8, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The long to hash</dd> +<dd><code>seed</code> - The initial seed value</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash32-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static int hash32(byte[] data)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +<div class="block">Generates 32-bit hash from the byte array with a default seed. + This is a helper method that will produce the same result as: + + <pre> + int offset = 0; + int seed = 104729; + int hash = MurmurHash3.hash32(data, offset, data.length, seed); + </pre> + + <p>This implementation contains a sign-extension bug in the finalization step of + any bytes left over from dividing the length by 4. This manifests if any of these + bytes are negative.<p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-"><code>hash32(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash32-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static int hash32(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a> with the bytes returned from + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>. This corrects the processing of trailing bytes.</span></div> +<div class="block">Generates 32-bit hash from a string with a default seed. + <p> + Before 1.14 the string was converted using default encoding. + Since 1.14 the string is converted to bytes using UTF-8 encoding. + </p> + This is a helper method that will produce the same result as: + + <pre> + int offset = 0; + int seed = 104729; + byte[] bytes = data.getBytes(StandardCharsets.UTF_8); + int hash = MurmurHash3.hash32(bytes, offset, bytes.length, seed); + </pre> + + <p>This implementation contains a sign-extension bug in the finalization step of + any bytes left over from dividing the length by 4. This manifests if any of these + bytes are negative.<p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input string</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-"><code>hash32(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash32-byte:A-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static int hash32(byte[] data, + int length)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +<div class="block">Generates 32-bit hash from the byte array with the given length and a default seed. + This is a helper method that will produce the same result as: + + <pre> + int offset = 0; + int seed = 104729; + int hash = MurmurHash3.hash32(data, offset, length, seed); + </pre> + + <p>This implementation contains a sign-extension bug in the finalization step of + any bytes left over from dividing the length by 4. This manifests if any of these + bytes are negative.<p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>length</code> - The length of array</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-"><code>hash32(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash32-byte:A-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static int hash32(byte[] data, + int length, + int seed)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +<div class="block">Generates 32-bit hash from the byte array with the given length and seed. This is a + helper method that will produce the same result as: + + <pre> + int offset = 0; + int hash = MurmurHash3.hash32(data, offset, length, seed); + </pre> + + <p>This implementation contains a sign-extension bug in the finalization step of + any bytes left over from dividing the length by 4. This manifests if any of these + bytes are negative.<p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>length</code> - The length of array</dd> +<dd><code>seed</code> - The initial seed value</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32-byte:A-int-int-int-"><code>hash32(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash32-byte:A-int-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static int hash32(byte[] data, + int offset, + int length, + int seed)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a>. This corrects the processing of trailing bytes.</span></div> +<div class="block">Generates 32-bit hash from the byte array with the given offset, length and seed. + + <p>This is an implementation of the 32-bit hash function <code>MurmurHash3_x86_32</code> + from from Austin Applyby's original MurmurHash3 <code>c++</code> code in SMHasher.</p> + + <p>This implementation contains a sign-extension bug in the finalization step of + any bytes left over from dividing the length by 4. This manifests if any of these + bytes are negative.<p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>offset</code> - The offset of data</dd> +<dd><code>length</code> - The length of array</dd> +<dd><code>seed</code> - The initial seed value</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +</dl> +</li> +</ul> +<a name="hash32x86-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32x86</h4> +<pre>public static int hash32x86(byte[] data)</pre> +<div class="block">Generates 32-bit hash from the byte array with a seed of zero. + This is a helper method that will produce the same result as: + + <pre> + int offset = 0; + int seed = 0; + int hash = MurmurHash3.hash32x86(data, offset, data.length, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash32x86-byte:A-int-int-int-"><code>hash32x86(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash32x86-byte:A-int-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash32x86</h4> +<pre>public static int hash32x86(byte[] data, + int offset, + int length, + int seed)</pre> +<div class="block">Generates 32-bit hash from the byte array with the given offset, length and seed. + + <p>This is an implementation of the 32-bit hash function <code>MurmurHash3_x86_32</code> + from from Austin Applyby's original MurmurHash3 <code>c++</code> code in SMHasher.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>offset</code> - The offset of data</dd> +<dd><code>length</code> - The length of array</dd> +<dd><code>seed</code> - The initial seed value</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 32-bit hash</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +<a name="hash64-long-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash64</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static long hash64(long data)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>long</code>.</span></div> +<div class="block">Generates 64-bit hash from a long with a default seed. + + <p><strong>This is not part of the original MurmurHash3 <code>c++</code> implementation.</strong></p> + + <p>This is a Murmur3-like 64-bit variant. + The method does not produce the same result as either half of the hash bytes from + <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64(byte[])</a> with the same byte data from the <code>long</code>. + This method will be removed in a future release.</p> + + <p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a> does not effect + this result as the default seed is positive.</p> + + <p>This is a helper method that will produce the same result as:</p> + + <pre> + int offset = 0; + int seed = 104729; + long hash = MurmurHash3.hash64(ByteBuffer.allocate(8) + .putLong(data) + .array(), offset, 8, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The long to hash</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 64-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash64-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash64</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static long hash64(int data)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>int</code>.</span></div> +<div class="block">Generates 64-bit hash from an int with a default seed. + + <p><strong>This is not part of the original MurmurHash3 <code>c++</code> implementation.</strong></p> + + <p>This is a Murmur3-like 64-bit variant. + The method does not produce the same result as either half of the hash bytes from + <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64(byte[])</a> with the same byte data from the <code>int</code>. + This method will be removed in a future release.</p> + + <p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a> does not effect + this result as the default seed is positive.</p> + + <p>This is a helper method that will produce the same result as:</p> + + <pre> + int offset = 0; + int seed = 104729; + long hash = MurmurHash3.hash64(ByteBuffer.allocate(4) + .putInt(data) + .array(), offset, 4, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The int to hash</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 64-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash64-short-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash64</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static long hash64(short data)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> with the bytes from the <code>short</code>.</span></div> +<div class="block">Generates 64-bit hash from a short with a default seed. + + <p><strong>This is not part of the original MurmurHash3 <code>c++</code> implementation.</strong></p> + + <p>This is a Murmur3-like 64-bit variant. + The method does not produce the same result as either half of the hash bytes from + <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64(byte[])</a> with the same byte data from the <code>short</code>. + This method will be removed in a future release.</p> + + <p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a> does not effect + this result as the default seed is positive.</p> + + <p>This is a helper method that will produce the same result as:</p> + + <pre> + int offset = 0; + int seed = 104729; + long hash = MurmurHash3.hash64(ByteBuffer.allocate(2) + .putShort(data) + .array(), offset, 2, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The short to hash</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 64-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash64-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash64</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static long hash64(byte[] data)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a>.</span></div> +<div class="block">Generates 64-bit hash from a byte array with a default seed. + + <p><strong>This is not part of the original MurmurHash3 <code>c++</code> implementation.</strong></p> + + <p>This is a Murmur3-like 64-bit variant. + The method does not produce the same result as either half of the hash bytes from + <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64(byte[])</a> with the same byte data. + This method will be removed in a future release.</p> + + <p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a> does not effect + this result as the default seed is positive.</p> + + <p>This is a helper method that will produce the same result as:</p> + + <pre> + int offset = 0; + int seed = 104729; + long hash = MurmurHash3.hash64(data, offset, data.length, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 64-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash64-byte:A-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash64</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static long hash64(byte[] data, + int offset, + int length)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>.</span></div> +<div class="block">Generates 64-bit hash from a byte array with the given offset and length and a default seed. + + <p><strong>This is not part of the original MurmurHash3 <code>c++</code> implementation.</strong></p> + + <p>This is a Murmur3-like 64-bit variant. + The method does not produce the same result as either half of the hash bytes from + <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-">hash128x64(byte[])</a> with the same byte data. + This method will be removed in a future release.</p> + + <p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a> does not effect + this result as the default seed is positive.</p> + + <p>This is a helper method that will produce the same result as:</p> + + <pre> + int seed = 104729; + long hash = MurmurHash3.hash64(data, offset, length, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>offset</code> - The offset of data</dd> +<dd><code>length</code> - The length of array</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 64-bit hash</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash64-byte:A-int-int-int-"><code>hash64(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash64-byte:A-int-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash64</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static long hash64(byte[] data, + int offset, + int length, + int seed)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Not part of the MurmurHash3 implementation. + Use half of the hash bytes from <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>.</span></div> +<div class="block">Generates 64-bit hash from a byte array with the given offset, length and seed. + + <p><strong>This is not part of the original MurmurHash3 <code>c++</code> implementation.</strong></p> + + <p>This is a Murmur3-like 64-bit variant. + This method will be removed in a future release.</p> + + <p>This implementation contains a sign-extension bug in the seed initialization. + This manifests if the seed is negative.</p> + + <p>This algorithm processes 8 bytes chunks of data in a manner similar to the 16 byte chunks + of data processed in the MurmurHash3 <code>MurmurHash3_x64_128</code> method. However the hash + is not mixed with a hash chunk from the next 8 bytes of data. The method will not return + the same value as the first or second 64-bits of the function + <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-"><code>hash128(byte[], int, int, int)</code></a>.</p> + + <p>Use of this method is not advised. Use the first long returned from + <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>.<p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>offset</code> - The offset of data</dd> +<dd><code>length</code> - The length of array</dd> +<dd><code>seed</code> - The initial seed value</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 64-bit hash</dd> +</dl> +</li> +</ul> +<a name="hash128-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash128</h4> +<pre>public static long[] hash128(byte[] data)</pre> +<div class="block">Generates 128-bit hash from the byte array with a default seed. + This is a helper method that will produce the same result as: + + <pre> + int offset = 0; + int seed = 104729; + int hash = MurmurHash3.hash128(data, offset, data.length, seed); + </pre> + + <p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-"><code>hash128(byte[], int, int, int)</code></a> does not effect + this result as the default seed is positive.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 128-bit hash (2 longs)</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-"><code>hash128(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash128x64-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash128x64</h4> +<pre>public static long[] hash128x64(byte[] data)</pre> +<div class="block">Generates 128-bit hash from the byte array with a seed of zero. + This is a helper method that will produce the same result as: + + <pre> + int offset = 0; + int seed = 0; + int hash = MurmurHash3.hash128x64(data, offset, data.length, seed); + </pre></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 128-bit hash (2 longs)</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash128-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash128</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static long[] hash128(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> data)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-"><code>hash128x64(byte[])</code></a> using the bytes returned from + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#getBytes-java.nio.charset.Charset-" title="class or interface in java.lang"><code>String.getBytes(java.nio.charset.Charset)</code></a>.</span></div> +<div class="block">Generates 128-bit hash from a string with a default seed. + <p> + Before 1.14 the string was converted using default encoding. + Since 1.14 the string is converted to bytes using UTF-8 encoding. + </p> + This is a helper method that will produce the same result as: + + <pre> + int offset = 0; + int seed = 104729; + byte[] bytes = data.getBytes(StandardCharsets.UTF_8); + int hash = MurmurHash3.hash128(bytes, offset, bytes.length, seed); + </pre> + + <p>Note: The sign extension bug in <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-"><code>hash128(byte[], int, int, int)</code></a> does not effect + this result as the default seed is positive.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input String</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 128-bit hash (2 longs)</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128-byte:A-int-int-int-"><code>hash128(byte[], int, int, int)</code></a></dd> +</dl> +</li> +</ul> +<a name="hash128-byte:A-int-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hash128</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public static long[] hash128(byte[] data, + int offset, + int length, + int seed)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html#hash128x64-byte:A-int-int-int-"><code>hash128x64(byte[], int, int, int)</code></a>. This corrects the seed initialization.</span></div> +<div class="block">Generates 128-bit hash from the byte array with the given offset, length and seed. + + <p>This is an implementation of the 128-bit hash function <code>MurmurHash3_x64_128</code> + from from Austin Applyby's original MurmurHash3 <code>c++</code> code in SMHasher.</p> + + <p>This implementation contains a sign-extension bug in the seed initialization. + This manifests if the seed is negative.<p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>offset</code> - The first element of array</dd> +<dd><code>length</code> - The length of array</dd> +<dd><code>seed</code> - The initial seed value</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 128-bit hash (2 longs)</dd> +</dl> +</li> +</ul> +<a name="hash128x64-byte:A-int-int-int-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>hash128x64</h4> +<pre>public static long[] hash128x64(byte[] data, + int offset, + int length, + int seed)</pre> +<div class="block">Generates 128-bit hash from the byte array with the given offset, length and seed. + + <p>This is an implementation of the 128-bit hash function <code>MurmurHash3_x64_128</code> + from from Austin Applyby's original MurmurHash3 <code>c++</code> code in SMHasher.</p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>data</code> - The input byte array</dd> +<dd><code>offset</code> - The first element of array</dd> +<dd><code>length</code> - The length of array</dd> +<dd><code>seed</code> - The initial seed value</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The 128-bit hash (2 longs)</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.14</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MurmurHash3.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/MurmurHash3.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li><a href="#nested.class.summary">Nested</a> | </li> +<li><a href="#field.summary">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/PureJavaCrc32.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/PureJavaCrc32.html new file mode 100644 index 0000000000000000000000000000000000000000..816ab729190cc6548685003d81e25bf33e4b4dbe --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/PureJavaCrc32.html @@ -0,0 +1,361 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>PureJavaCrc32 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="PureJavaCrc32 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/PureJavaCrc32.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/PureJavaCrc32.html" target="_top">Frames</a></li> +<li><a href="PureJavaCrc32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class PureJavaCrc32" class="title">Class PureJavaCrc32</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.PureJavaCrc32</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">PureJavaCrc32</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></pre> +<div class="block">A pure-java implementation of the CRC32 checksum that uses + the same polynomial as the built-in native CRC32. + + This is to avoid the JNI overhead for certain uses of Checksumming + where many small pieces of data are checksummed in succession. + + The current version is ~10x to 1.8x as fast as Sun's native + java.util.zip.CRC32 in Java 1.6 + + Copied from Hadoop 2.6.3. + The code agrees with the following file in the 2.6.3 tag: + https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob_plain; + f=hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/PureJavaCrc32.java; + hb=2120de588b92b9f22b1cc4188761d6a8c61aa778 + <p> + This class is Not ThreadSafe</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/CRC32.html?is-external=true" title="class or interface in java.util.zip"><code>CRC32</code></a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html#PureJavaCrc32--">PureJavaCrc32</a></span>()</code> +<div class="block">Create a new PureJavaCrc32 object.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html#getValue--">getValue</a></span>()</code> </td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html#reset--">reset</a></span>()</code> </td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html#update-byte:A-int-int-">update</a></span>(byte[] b, + int offset, + int len)</code> </td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html#update-int-">update</a></span>(int b)</code> </td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="PureJavaCrc32--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>PureJavaCrc32</h4> +<pre>public PureJavaCrc32()</pre> +<div class="block">Create a new PureJavaCrc32 object.</div> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="getValue--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getValue</h4> +<pre>public long getValue()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#getValue--" title="class or interface in java.util.zip">getValue</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +<a name="reset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>reset</h4> +<pre>public void reset()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#reset--" title="class or interface in java.util.zip">reset</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +<a name="update-byte:A-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>update</h4> +<pre>public void update(byte[] b, + int offset, + int len)</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#update-byte:A-int-int-" title="class or interface in java.util.zip">update</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +<a name="update-int-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>update</h4> +<pre>public final void update(int b)</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#update-int-" title="class or interface in java.util.zip">update</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/PureJavaCrc32.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/PureJavaCrc32.html" target="_top">Frames</a></li> +<li><a href="PureJavaCrc32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/PureJavaCrc32C.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/PureJavaCrc32C.html new file mode 100644 index 0000000000000000000000000000000000000000..73c5b88aa645755772806db6326d28a1c31c431e --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/PureJavaCrc32C.html @@ -0,0 +1,353 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>PureJavaCrc32C (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="PureJavaCrc32C (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/PureJavaCrc32C.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/PureJavaCrc32C.html" target="_top">Frames</a></li> +<li><a href="PureJavaCrc32C.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class PureJavaCrc32C" class="title">Class PureJavaCrc32C</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.PureJavaCrc32C</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">PureJavaCrc32C</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></pre> +<div class="block">A pure-java implementation of the CRC32 checksum that uses + the CRC32-C polynomial, the same polynomial used by iSCSI + and implemented on many Intel chipsets supporting SSE4.2. + + Copied from Hadoop 2.3.6: + https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob_plain; + f=hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/PureJavaCrc32C.java; + hb=2120de588b92b9f22b1cc4188761d6a8c61aa778 + <p> + This class is Not ThreadSafe</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html#PureJavaCrc32C--">PureJavaCrc32C</a></span>()</code> +<div class="block">Create a new PureJavaCrc32 object.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html#getValue--">getValue</a></span>()</code> </td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html#reset--">reset</a></span>()</code> </td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html#update-byte:A-int-int-">update</a></span>(byte[] b, + int off, + int len)</code> </td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html#update-int-">update</a></span>(int b)</code> </td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="PureJavaCrc32C--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>PureJavaCrc32C</h4> +<pre>public PureJavaCrc32C()</pre> +<div class="block">Create a new PureJavaCrc32 object.</div> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="getValue--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getValue</h4> +<pre>public long getValue()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#getValue--" title="class or interface in java.util.zip">getValue</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +<a name="reset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>reset</h4> +<pre>public void reset()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#reset--" title="class or interface in java.util.zip">reset</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +<a name="update-byte:A-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>update</h4> +<pre>public void update(byte[] b, + int off, + int len)</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#update-byte:A-int-int-" title="class or interface in java.util.zip">update</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +<a name="update-int-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>update</h4> +<pre>public final void update(int b)</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#update-int-" title="class or interface in java.util.zip">update</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/PureJavaCrc32C.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/PureJavaCrc32C.html" target="_top">Frames</a></li> +<li><a href="PureJavaCrc32C.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/Sha2Crypt.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/Sha2Crypt.html new file mode 100644 index 0000000000000000000000000000000000000000..6c9eb54f707cb94f72771c4e0d5cc09df362c8c2 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/Sha2Crypt.html @@ -0,0 +1,477 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Sha2Crypt (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Sha2Crypt (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Sha2Crypt.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/Sha2Crypt.html" target="_top">Frames</a></li> +<li><a href="Sha2Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class Sha2Crypt" class="title">Class Sha2Crypt</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.Sha2Crypt</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Sha2Crypt</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">SHA2-based Unix crypt implementation. + <p> + Based on the C implementation released into the Public Domain by Ulrich Drepper <drepper@redhat.com> + http://www.akkadia.org/drepper/SHA-crypt.txt + <p> + Conversion to Kotlin and from there to Java in 2012 by Christian Hammers <ch@lathspell.de> and likewise put + into the Public Domain. + <p> + This class is immutable and thread-safe.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html#Sha2Crypt--">Sha2Crypt</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html#sha256Crypt-byte:A-">sha256Crypt</a></span>(byte[] keyBytes)</code> +<div class="block">Generates a libc crypt() compatible "$5$" hash value with random salt.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html#sha256Crypt-byte:A-java.lang.String-">sha256Crypt</a></span>(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</code> +<div class="block">Generates a libc6 crypt() compatible "$5$" hash value.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html#sha256Crypt-byte:A-java.lang.String-java.util.Random-">sha256Crypt</a></span>(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util">Random</a> random)</code> +<div class="block">Generates a libc6 crypt() compatible "$5$" hash value.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html#sha512Crypt-byte:A-">sha512Crypt</a></span>(byte[] keyBytes)</code> +<div class="block">Generates a libc crypt() compatible "$6$" hash value with random salt.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html#sha512Crypt-byte:A-java.lang.String-">sha512Crypt</a></span>(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</code> +<div class="block">Generates a libc6 crypt() compatible "$6$" hash value.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html#sha512Crypt-byte:A-java.lang.String-java.util.Random-">sha512Crypt</a></span>(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util">Random</a> random)</code> +<div class="block">Generates a libc6 crypt() compatible "$6$" hash value.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Sha2Crypt--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Sha2Crypt</h4> +<pre>public Sha2Crypt()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="sha256Crypt-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha256Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha256Crypt(byte[] keyBytes)</pre> +<div class="block">Generates a libc crypt() compatible "$5$" hash value with random salt. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>Crypt.crypt(String, String)</code></a> for details. + </p> + <p> + A salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts and calling <a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html#sha256Crypt-byte:A-java.lang.String-"><code>sha256Crypt(byte[], String)</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext to hash</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>complete hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +</dl> +</li> +</ul> +<a name="sha256Crypt-byte:A-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha256Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha256Crypt(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</pre> +<div class="block">Generates a libc6 crypt() compatible "$5$" hash value. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>Crypt.crypt(String, String)</code></a> for details. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext to hash</dd> +<dd><code>salt</code> - real salt value without prefix or "rounds=". The salt may be null, in which case a salt + is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a>. If one does not want to use <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a>, + you can pass your own <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util"><code>Random</code></a> in <a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html#sha256Crypt-byte:A-java.lang.String-java.util.Random-"><code>sha256Crypt(byte[], String, Random)</code></a>.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>complete hash value including salt</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +</dl> +</li> +</ul> +<a name="sha256Crypt-byte:A-java.lang.String-java.util.Random-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha256Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha256Crypt(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util">Random</a> random)</pre> +<div class="block">Generates a libc6 crypt() compatible "$5$" hash value. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>Crypt.crypt(String, String)</code></a> for details. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext to hash</dd> +<dd><code>salt</code> - real salt value without prefix or "rounds=".</dd> +<dd><code>random</code> - the instance of <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util"><code>Random</code></a> to use for generating the salt. Consider using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> + or <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>complete hash value including salt</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +<a name="sha512Crypt-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512Crypt(byte[] keyBytes)</pre> +<div class="block">Generates a libc crypt() compatible "$6$" hash value with random salt. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>Crypt.crypt(String, String)</code></a> for details. + </p> + <p> + A salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts and calling <a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html#sha512Crypt-byte:A-java.lang.String-"><code>sha512Crypt(byte[], String)</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext to hash</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>complete hash value</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +</dl> +</li> +</ul> +<a name="sha512Crypt-byte:A-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>sha512Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512Crypt(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</pre> +<div class="block">Generates a libc6 crypt() compatible "$6$" hash value. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>Crypt.crypt(String, String)</code></a> for details. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext to hash</dd> +<dd><code>salt</code> - real salt value without prefix or "rounds=". The salt may be null, in which case a salt is generated + for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a>; if you want to use a <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util"><code>Random</code></a> object other than + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> then we suggest you provide it using + <a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html#sha512Crypt-byte:A-java.lang.String-java.util.Random-"><code>sha512Crypt(byte[], String, Random)</code></a>.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>complete hash value including salt</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +</dl> +</li> +</ul> +<a name="sha512Crypt-byte:A-java.lang.String-java.util.Random-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>sha512Crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sha512Crypt(byte[] keyBytes, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util">Random</a> random)</pre> +<div class="block">Generates a libc6 crypt() compatible "$6$" hash value. + <p> + See <a href="../../../../../org/apache/commons/codec/digest/Crypt.html#crypt-java.lang.String-java.lang.String-"><code>Crypt.crypt(String, String)</code></a> for details. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>keyBytes</code> - plaintext to hash</dd> +<dd><code>salt</code> - real salt value without prefix or "rounds=". The salt may be null, in which case a salt + is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts.</dd> +<dd><code>random</code> - the instance of <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util"><code>Random</code></a> to use for generating the salt. Consider using <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> + or <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>complete hash value including salt</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when a <a href="https://docs.oracle.com/javase/7/docs/api/java/security/NoSuchAlgorithmException.html?is-external=true" title="class or interface in java.security"><code>NoSuchAlgorithmException</code></a> is caught.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Sha2Crypt.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/Sha2Crypt.html" target="_top">Frames</a></li> +<li><a href="Sha2Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/UnixCrypt.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/UnixCrypt.html new file mode 100644 index 0000000000000000000000000000000000000000..9b0f6b9c0d110b4a27780bf997e63ecc29d51f0f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/UnixCrypt.html @@ -0,0 +1,388 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>UnixCrypt (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="UnixCrypt (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":9,"i2":9,"i3":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/UnixCrypt.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/UnixCrypt.html" target="_top">Frames</a></li> +<li><a href="UnixCrypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class UnixCrypt" class="title">Class UnixCrypt</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.UnixCrypt</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">UnixCrypt</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Unix crypt(3) algorithm implementation. + <p> + This class only implements the traditional 56 bit DES based algorithm. Please use DigestUtils.crypt() for a method + that distinguishes between all the algorithms supported in the current glibc's crypt(). + <p> + The Java implementation was taken from the JetSpeed Portal project (see + org.apache.jetspeed.services.security.ldap.UnixCrypt). + <p> + This class is slightly incompatible if the given salt contains characters that are not part of the allowed range + [a-zA-Z0-9./]. + <p> + This class is immutable and thread-safe.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html#UnixCrypt--">UnixCrypt</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html#crypt-byte:A-">crypt</a></span>(byte[] original)</code> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html#crypt-byte:A-java.lang.String-">crypt</a></span>(byte[] original, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</code> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html#crypt-java.lang.String-">crypt</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> original)</code> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html#crypt-java.lang.String-java.lang.String-">crypt</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> original, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</code> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="UnixCrypt--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>UnixCrypt</h4> +<pre>public UnixCrypt()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="crypt-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> crypt(byte[] original)</pre> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm. + <p> + A salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts and calling <a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html#crypt-byte:A-java.lang.String-"><code>crypt(byte[], String)</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>original</code> - plaintext password</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a 13 character string starting with the salt string</dd> +</dl> +</li> +</ul> +<a name="crypt-byte:A-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> crypt(byte[] original, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</pre> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm. + <p> + Using unspecified characters as salt results incompatible hash values. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>original</code> - plaintext password</dd> +<dd><code>salt</code> - a two character string drawn from [a-zA-Z0-9./]. The salt may be null, in which case a salt is + generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a 13 character string starting with the salt string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +</dl> +</li> +</ul> +<a name="crypt-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> crypt(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> original)</pre> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm. + <p> + A salt is generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts and calling <a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html#crypt-java.lang.String-java.lang.String-"><code>crypt(String, String)</code></a>. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>original</code> - plaintext password</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a 13 character string starting with the salt string</dd> +</dl> +</li> +</ul> +<a name="crypt-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>crypt</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> crypt(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> original, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> salt)</pre> +<div class="block">Generates a crypt(3) compatible hash using the DES algorithm.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>original</code> - plaintext password</dd> +<dd><code>salt</code> - a two character string drawn from [a-zA-Z0-9./]. The salt may be null, in which case a salt is + generated for you using <a href="https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadLocalRandom.html?is-external=true" title="class or interface in java.util.concurrent"><code>ThreadLocalRandom</code></a>; for more secure salts consider using + <a href="https://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security"><code>SecureRandom</code></a> to generate your own salts.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a 13 character string starting with the salt string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the salt does not match the allowed pattern</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/UnixCrypt.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/UnixCrypt.html" target="_top">Frames</a></li> +<li><a href="UnixCrypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/XXHash32.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/XXHash32.html new file mode 100644 index 0000000000000000000000000000000000000000..5699ef2439eb51271638587da4285a5a750bbc1f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/XXHash32.html @@ -0,0 +1,373 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>XXHash32 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="XXHash32 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/XXHash32.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/XXHash32.html" target="_top">Frames</a></li> +<li><a href="XXHash32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.digest</div> +<h2 title="Class XXHash32" class="title">Class XXHash32</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.digest.XXHash32</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">XXHash32</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></pre> +<div class="block">Implementation of the xxhash32 hash algorithm. + + <p> + Copied from Commons Compress 1.14 <a href= + "https://git-wip-us.apache.org/repos/asf?p=commons-compress.git;a=blob;f=src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java;h=a406ffc197449be594d46f0d2712b2d4786a1e68;hb=HEAD">https://git-wip-us.apache.org/repos/asf?p=commons-compress.git;a=blob;f=src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java;h=a406ffc197449be594d46f0d2712b2d4786a1e68;hb=HEAD</a> + </p> + <p> + NotThreadSafe + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://cyan4973.github.io/xxHash/">xxHash</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/XXHash32.html#XXHash32--">XXHash32</a></span>()</code> +<div class="block">Creates an XXHash32 instance with a seed of 0.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/XXHash32.html#XXHash32-int-">XXHash32</a></span>(int seed)</code> +<div class="block">Creates an XXHash32 instance.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>long</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/XXHash32.html#getValue--">getValue</a></span>()</code> </td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/XXHash32.html#reset--">reset</a></span>()</code> </td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/XXHash32.html#update-byte:A-int-int-">update</a></span>(byte[] b, + int off, + int len)</code> </td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/digest/XXHash32.html#update-int-">update</a></span>(int b)</code> </td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="XXHash32--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>XXHash32</h4> +<pre>public XXHash32()</pre> +<div class="block">Creates an XXHash32 instance with a seed of 0.</div> +</li> +</ul> +<a name="XXHash32-int-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>XXHash32</h4> +<pre>public XXHash32(int seed)</pre> +<div class="block">Creates an XXHash32 instance.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>seed</code> - the seed to use</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="reset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>reset</h4> +<pre>public void reset()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#reset--" title="class or interface in java.util.zip">reset</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +<a name="update-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>update</h4> +<pre>public void update(int b)</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#update-int-" title="class or interface in java.util.zip">update</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +<a name="update-byte:A-int-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>update</h4> +<pre>public void update(byte[] b, + int off, + int len)</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#update-byte:A-int-int-" title="class or interface in java.util.zip">update</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +<a name="getValue--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getValue</h4> +<pre>public long getValue()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true#getValue--" title="class or interface in java.util.zip">getValue</a></code> in interface <code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a></code></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/XXHash32.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/XXHash32.html" target="_top">Frames</a></li> +<li><a href="XXHash32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/Crypt.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/Crypt.html new file mode 100644 index 0000000000000000000000000000000000000000..0a94b9a3fcc95109006f1e074aff9ddb91d38398 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/Crypt.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.Crypt (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.Crypt (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/Crypt.html" target="_top">Frames</a></li> +<li><a href="Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.Crypt" class="title">Uses of Class<br>org.apache.commons.codec.digest.Crypt</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.Crypt</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/Crypt.html" target="_top">Frames</a></li> +<li><a href="Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/DigestUtils.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/DigestUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..bbd45f3fdd835fdc53d837a8143bcc3f98305b4f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/DigestUtils.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.DigestUtils (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.DigestUtils (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/DigestUtils.html" target="_top">Frames</a></li> +<li><a href="DigestUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.DigestUtils" class="title">Uses of Class<br>org.apache.commons.codec.digest.DigestUtils</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.DigestUtils</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/DigestUtils.html" target="_top">Frames</a></li> +<li><a href="DigestUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/HmacAlgorithms.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/HmacAlgorithms.html new file mode 100644 index 0000000000000000000000000000000000000000..88dcf74b954486dbb1027e5aa0a73da6f65bf250 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/HmacAlgorithms.html @@ -0,0 +1,222 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.HmacAlgorithms (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.HmacAlgorithms (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/HmacAlgorithms.html" target="_top">Frames</a></li> +<li><a href="HmacAlgorithms.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.HmacAlgorithms" class="title">Uses of Class<br>org.apache.commons.codec.digest.HmacAlgorithms</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.digest">org.apache.commons.codec.digest</a></td> +<td class="colLast"> +<div class="block"> + Simplifies common <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> tasks and + includes a libc crypt(3) compatible crypt method that supports DES, + MD5, SHA-256 and SHA-512 based algorithms as well as the Apache + specific "$apr1$" variant.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.digest"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> in <a href="../../../../../../org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a> that return <a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></code></td> +<td class="colLast"><span class="typeNameLabel">HmacAlgorithms.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#valueOf-java.lang.String-">valueOf</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a>[]</code></td> +<td class="colLast"><span class="typeNameLabel">HmacAlgorithms.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html#values--">values</a></span>()</code> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a> with parameters of type <a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto">Mac</a></code></td> +<td class="colLast"><span class="typeNameLabel">HmacUtils.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/digest/HmacUtils.html#getInitializedMac-org.apache.commons.codec.digest.HmacAlgorithms-byte:A-">getInitializedMac</a></span>(<a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> algorithm, + byte[] key)</code> +<div class="block">Returns an initialized <code>Mac</code> for the given <code>algorithm</code>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static boolean</code></td> +<td class="colLast"><span class="typeNameLabel">HmacUtils.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/digest/HmacUtils.html#isAvailable-org.apache.commons.codec.digest.HmacAlgorithms-">isAvailable</a></span>(<a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> name)</code> +<div class="block">Returns whether this algorithm is available</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> +<caption><span>Constructors in <a href="../../../../../../org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a> with parameters of type <a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/digest/HmacUtils.html#HmacUtils-org.apache.commons.codec.digest.HmacAlgorithms-byte:A-">HmacUtils</a></span>(<a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> algorithm, + byte[] key)</code> +<div class="block">Creates an instance using the provided algorithm type.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/digest/HmacUtils.html#HmacUtils-org.apache.commons.codec.digest.HmacAlgorithms-java.lang.String-">HmacUtils</a></span>(<a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a> algorithm, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> +<div class="block">Creates an instance using the provided algorithm type.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/HmacAlgorithms.html" target="_top">Frames</a></li> +<li><a href="HmacAlgorithms.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/HmacUtils.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/HmacUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..bfa59973c6b0602d7c5f6021e5b9b05f0dac5ffe --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/HmacUtils.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.HmacUtils (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.HmacUtils (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/HmacUtils.html" target="_top">Frames</a></li> +<li><a href="HmacUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.HmacUtils" class="title">Uses of Class<br>org.apache.commons.codec.digest.HmacUtils</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.HmacUtils</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/HmacUtils.html" target="_top">Frames</a></li> +<li><a href="HmacUtils.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/Md5Crypt.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/Md5Crypt.html new file mode 100644 index 0000000000000000000000000000000000000000..4493880486d51314ad95c0fd2d140a24726d89d3 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/Md5Crypt.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.Md5Crypt (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.Md5Crypt (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/Md5Crypt.html" target="_top">Frames</a></li> +<li><a href="Md5Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.Md5Crypt" class="title">Uses of Class<br>org.apache.commons.codec.digest.Md5Crypt</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.Md5Crypt</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/Md5Crypt.html" target="_top">Frames</a></li> +<li><a href="Md5Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MessageDigestAlgorithms.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MessageDigestAlgorithms.html new file mode 100644 index 0000000000000000000000000000000000000000..060e03729bde99c0f42374dce4be869330423866 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MessageDigestAlgorithms.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.MessageDigestAlgorithms (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.MessageDigestAlgorithms (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/MessageDigestAlgorithms.html" target="_top">Frames</a></li> +<li><a href="MessageDigestAlgorithms.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.MessageDigestAlgorithms" class="title">Uses of Class<br>org.apache.commons.codec.digest.MessageDigestAlgorithms</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.MessageDigestAlgorithms</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/MessageDigestAlgorithms.html" target="_top">Frames</a></li> +<li><a href="MessageDigestAlgorithms.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash2.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash2.html new file mode 100644 index 0000000000000000000000000000000000000000..fa5a33e60d9541514a5b93bc45edb9406fce5b43 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash2.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.MurmurHash2 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.MurmurHash2 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/MurmurHash2.html" target="_top">Frames</a></li> +<li><a href="MurmurHash2.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.MurmurHash2" class="title">Uses of Class<br>org.apache.commons.codec.digest.MurmurHash2</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.MurmurHash2</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/MurmurHash2.html" target="_top">Frames</a></li> +<li><a href="MurmurHash2.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash3.IncrementalHash32.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash3.IncrementalHash32.html new file mode 100644 index 0000000000000000000000000000000000000000..acffcce5416a4cb502beb42fef9549b8fc3bef44 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash3.IncrementalHash32.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/MurmurHash3.IncrementalHash32.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.IncrementalHash32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32" class="title">Uses of Class<br>org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/MurmurHash3.IncrementalHash32.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.IncrementalHash32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash3.IncrementalHash32x86.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash3.IncrementalHash32x86.html new file mode 100644 index 0000000000000000000000000000000000000000..087eed344a0b1d7795a92bbd3f68fd11cc419c30 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash3.IncrementalHash32x86.html @@ -0,0 +1,175 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32x86 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32x86 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/MurmurHash3.IncrementalHash32x86.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.IncrementalHash32x86.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32x86" class="title">Uses of Class<br>org.apache.commons.codec.digest.MurmurHash3.IncrementalHash32x86</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.digest">org.apache.commons.codec.digest</a></td> +<td class="colLast"> +<div class="block"> + Simplifies common <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> tasks and + includes a libc crypt(3) compatible crypt method that supports DES, + MD5, SHA-256 and SHA-512 based algorithms as well as the Apache + specific "$apr1$" variant.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.digest"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a> in <a href="../../../../../../org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation"> +<caption><span>Subclasses of <a href="../../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a> in <a href="../../../../../../org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use IncrementalHash32x86. This corrects the processing of trailing bytes.</span></div> +</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/MurmurHash3.IncrementalHash32x86.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.IncrementalHash32x86.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash3.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash3.html new file mode 100644 index 0000000000000000000000000000000000000000..0e3903cd2eb4d9df84492acfe0c970f5775e6f03 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/MurmurHash3.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.MurmurHash3 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.MurmurHash3 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/MurmurHash3.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.MurmurHash3" class="title">Uses of Class<br>org.apache.commons.codec.digest.MurmurHash3</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.MurmurHash3</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/MurmurHash3.html" target="_top">Frames</a></li> +<li><a href="MurmurHash3.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/PureJavaCrc32.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/PureJavaCrc32.html new file mode 100644 index 0000000000000000000000000000000000000000..1be861aca15ca37403ce90636c867ddfee3cb447 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/PureJavaCrc32.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.PureJavaCrc32 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.PureJavaCrc32 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/PureJavaCrc32.html" target="_top">Frames</a></li> +<li><a href="PureJavaCrc32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.PureJavaCrc32" class="title">Uses of Class<br>org.apache.commons.codec.digest.PureJavaCrc32</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.PureJavaCrc32</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/PureJavaCrc32.html" target="_top">Frames</a></li> +<li><a href="PureJavaCrc32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/PureJavaCrc32C.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/PureJavaCrc32C.html new file mode 100644 index 0000000000000000000000000000000000000000..ef5e2bd0263fa1fb641f405eea488ef85edfad76 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/PureJavaCrc32C.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.PureJavaCrc32C (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.PureJavaCrc32C (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/PureJavaCrc32C.html" target="_top">Frames</a></li> +<li><a href="PureJavaCrc32C.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.PureJavaCrc32C" class="title">Uses of Class<br>org.apache.commons.codec.digest.PureJavaCrc32C</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.PureJavaCrc32C</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/PureJavaCrc32C.html" target="_top">Frames</a></li> +<li><a href="PureJavaCrc32C.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/Sha2Crypt.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/Sha2Crypt.html new file mode 100644 index 0000000000000000000000000000000000000000..15c91eca852b48f5bd3f6da4247f2b6a3d59b003 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/Sha2Crypt.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.Sha2Crypt (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.Sha2Crypt (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/Sha2Crypt.html" target="_top">Frames</a></li> +<li><a href="Sha2Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.Sha2Crypt" class="title">Uses of Class<br>org.apache.commons.codec.digest.Sha2Crypt</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.Sha2Crypt</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/Sha2Crypt.html" target="_top">Frames</a></li> +<li><a href="Sha2Crypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/UnixCrypt.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/UnixCrypt.html new file mode 100644 index 0000000000000000000000000000000000000000..5912ff084af87fed3d78e4365b8f033c940f4485 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/UnixCrypt.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.UnixCrypt (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.UnixCrypt (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/UnixCrypt.html" target="_top">Frames</a></li> +<li><a href="UnixCrypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.UnixCrypt" class="title">Uses of Class<br>org.apache.commons.codec.digest.UnixCrypt</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.UnixCrypt</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/UnixCrypt.html" target="_top">Frames</a></li> +<li><a href="UnixCrypt.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/XXHash32.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/XXHash32.html new file mode 100644 index 0000000000000000000000000000000000000000..b19e2c908509eec67063c3cdf4899feb02bd3796 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/class-use/XXHash32.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.digest.XXHash32 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.digest.XXHash32 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/XXHash32.html" target="_top">Frames</a></li> +<li><a href="XXHash32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.digest.XXHash32" class="title">Uses of Class<br>org.apache.commons.codec.digest.XXHash32</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.digest.XXHash32</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/digest/class-use/XXHash32.html" target="_top">Frames</a></li> +<li><a href="XXHash32.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-frame.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-frame.html new file mode 100644 index 0000000000000000000000000000000000000000..81e34170f965d7fc213e4a5facd9739ab8bc0297 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-frame.html @@ -0,0 +1,37 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.digest (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<h1 class="bar"><a href="../../../../../org/apache/commons/codec/digest/package-summary.html" target="classFrame">org.apache.commons.codec.digest</a></h1> +<div class="indexContainer"> +<h2 title="Classes">Classes</h2> +<ul title="Classes"> +<li><a href="Crypt.html" title="class in org.apache.commons.codec.digest" target="classFrame">Crypt</a></li> +<li><a href="DigestUtils.html" title="class in org.apache.commons.codec.digest" target="classFrame">DigestUtils</a></li> +<li><a href="HmacUtils.html" title="class in org.apache.commons.codec.digest" target="classFrame">HmacUtils</a></li> +<li><a href="Md5Crypt.html" title="class in org.apache.commons.codec.digest" target="classFrame">Md5Crypt</a></li> +<li><a href="MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest" target="classFrame">MessageDigestAlgorithms</a></li> +<li><a href="MurmurHash2.html" title="class in org.apache.commons.codec.digest" target="classFrame">MurmurHash2</a></li> +<li><a href="MurmurHash3.html" title="class in org.apache.commons.codec.digest" target="classFrame">MurmurHash3</a></li> +<li><a href="MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest" target="classFrame">MurmurHash3.IncrementalHash32</a></li> +<li><a href="MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest" target="classFrame">MurmurHash3.IncrementalHash32x86</a></li> +<li><a href="PureJavaCrc32.html" title="class in org.apache.commons.codec.digest" target="classFrame">PureJavaCrc32</a></li> +<li><a href="PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest" target="classFrame">PureJavaCrc32C</a></li> +<li><a href="Sha2Crypt.html" title="class in org.apache.commons.codec.digest" target="classFrame">Sha2Crypt</a></li> +<li><a href="UnixCrypt.html" title="class in org.apache.commons.codec.digest" target="classFrame">UnixCrypt</a></li> +<li><a href="XXHash32.html" title="class in org.apache.commons.codec.digest" target="classFrame">XXHash32</a></li> +</ul> +<h2 title="Enums">Enums</h2> +<ul title="Enums"> +<li><a href="HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest" target="classFrame">HmacAlgorithms</a></li> +</ul> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-summary.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-summary.html new file mode 100644 index 0000000000000000000000000000000000000000..31fe36910e0199f6d7dc20281b63315f228a0f92 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-summary.html @@ -0,0 +1,263 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.digest (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.digest (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/cli/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/language/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Package" class="title">Package org.apache.commons.codec.digest</h1> +<div class="docSummary"> +<div class="block"> + Simplifies common <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> tasks and + includes a libc crypt(3) compatible crypt method that supports DES, + MD5, SHA-256 and SHA-512 based algorithms as well as the Apache + specific "$apr1$" variant.</div> +</div> +<p>See: <a href="#package.description">Description</a></p> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> +<caption><span>Class Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Class</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest">Crypt</a></td> +<td class="colLast"> +<div class="block">GNU libc crypt(3) compatible hash method.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest">DigestUtils</a></td> +<td class="colLast"> +<div class="block">Operations to simplify common <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> tasks.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest">HmacUtils</a></td> +<td class="colLast"> +<div class="block">Simplifies common <a href="https://docs.oracle.com/javase/7/docs/api/javax/crypto/Mac.html?is-external=true" title="class or interface in javax.crypto"><code>Mac</code></a> tasks.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest">Md5Crypt</a></td> +<td class="colLast"> +<div class="block">The libc crypt() "$1$" and Apache "$apr1$" MD5-based hash algorithm.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest">MessageDigestAlgorithms</a></td> +<td class="colLast"> +<div class="block">Standard <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> algorithm names from the <cite>Java Cryptography Architecture Standard Algorithm Name + Documentation</cite>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest">MurmurHash2</a></td> +<td class="colLast"> +<div class="block">Implementation of the MurmurHash2 32-bit and 64-bit hash functions.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest">MurmurHash3</a></td> +<td class="colLast"> +<div class="block">Implementation of the MurmurHash3 32-bit and 128-bit hash functions.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32</a></td> +<td class="colLast">Deprecated +<div class="block"><span class="deprecationComment">Use IncrementalHash32x86.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a></td> +<td class="colLast"> +<div class="block">Generates 32-bit hash from input bytes.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32</a></td> +<td class="colLast"> +<div class="block">A pure-java implementation of the CRC32 checksum that uses + the same polynomial as the built-in native CRC32.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest">PureJavaCrc32C</a></td> +<td class="colLast"> +<div class="block">A pure-java implementation of the CRC32 checksum that uses + the CRC32-C polynomial, the same polynomial used by iSCSI + and implemented on many Intel chipsets supporting SSE4.2.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest">Sha2Crypt</a></td> +<td class="colLast"> +<div class="block">SHA2-based Unix crypt implementation.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest">UnixCrypt</a></td> +<td class="colLast"> +<div class="block">Unix crypt(3) algorithm implementation.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest">XXHash32</a></td> +<td class="colLast"> +<div class="block">Implementation of the xxhash32 hash algorithm.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Summary table, listing enums, and an explanation"> +<caption><span>Enum Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Enum</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest">HmacAlgorithms</a></td> +<td class="colLast"> +<div class="block">Standard <a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest"><code>HmacUtils</code></a> algorithm names from the <cite>Java Cryptography Architecture Standard Algorithm Name + Documentation</cite>.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +<a name="package.description"> +<!-- --> +</a> +<h2 title="Package org.apache.commons.codec.digest Description">Package org.apache.commons.codec.digest Description</h2> +<div class="block"><p> + Simplifies common <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> tasks and + includes a libc crypt(3) compatible crypt method that supports DES, + MD5, SHA-256 and SHA-512 based algorithms as well as the Apache + specific "$apr1$" variant. + </p></div> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/cli/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/language/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-tree.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-tree.html new file mode 100644 index 0000000000000000000000000000000000000000..a82366129fe7d04e72aa0231d1a38fd6ff276147 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-tree.html @@ -0,0 +1,166 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.digest Class Hierarchy (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.digest Class Hierarchy (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/cli/package-tree.html">Prev</a></li> +<li><a href="../../../../../org/apache/commons/codec/language/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 class="title">Hierarchy For Package org.apache.commons.codec.digest</h1> +<span class="packageHierarchyLabel">Package Hierarchies:</span> +<ul class="horizontal"> +<li><a href="../../../../../overview-tree.html">All Packages</a></li> +</ul> +</div> +<div class="contentContainer"> +<h2 title="Class Hierarchy">Class Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Crypt</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">DigestUtils</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">HmacUtils</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Md5Crypt</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MessageDigestAlgorithms</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash2</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash3</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash3.IncrementalHash32x86</span></a> +<ul> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash3.IncrementalHash32</span></a></li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">PureJavaCrc32</span></a> (implements java.util.zip.<a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a>)</li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">PureJavaCrc32C</span></a> (implements java.util.zip.<a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a>)</li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Sha2Crypt</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">UnixCrypt</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">XXHash32</span></a> (implements java.util.zip.<a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a>)</li> +</ul> +</li> +</ul> +<h2 title="Enum Hierarchy">Enum Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Enum</span></a><E> (implements java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><T>, java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>) +<ul> +<li type="circle">org.apache.commons.codec.digest.<a href="../../../../../org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest"><span class="typeNameLink">HmacAlgorithms</span></a></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/cli/package-tree.html">Prev</a></li> +<li><a href="../../../../../org/apache/commons/codec/language/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-use.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-use.html new file mode 100644 index 0000000000000000000000000000000000000000..315d654c6e1071bf2d6a75803c1077b3a4867636 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/digest/package-use.html @@ -0,0 +1,172 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Package org.apache.commons.codec.digest (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Package org.apache.commons.codec.digest (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Uses of Package org.apache.commons.codec.digest" class="title">Uses of Package<br>org.apache.commons.codec.digest</h1> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.digest">org.apache.commons.codec.digest</a></td> +<td class="colLast"> +<div class="block"> + Simplifies common <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> tasks and + includes a libc crypt(3) compatible crypt method that supports DES, + MD5, SHA-256 and SHA-512 based algorithms as well as the Apache + specific "$apr1$" variant.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.digest"> +<!-- --> +</a> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a> used by <a href="../../../../../org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="../../../../../org/apache/commons/codec/digest/class-use/HmacAlgorithms.html#org.apache.commons.codec.digest">HmacAlgorithms</a> +<div class="block">Standard <a href="../../../../../org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest"><code>HmacUtils</code></a> algorithm names from the <cite>Java Cryptography Architecture Standard Algorithm Name + Documentation</cite>.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../../org/apache/commons/codec/digest/class-use/MurmurHash3.IncrementalHash32x86.html#org.apache.commons.codec.digest">MurmurHash3.IncrementalHash32x86</a> +<div class="block">Generates 32-bit hash from input bytes.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/digest/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/AbstractCaverphone.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/AbstractCaverphone.html new file mode 100644 index 0000000000000000000000000000000000000000..69888351b83e6a1f47dcee4648d3c1a779537745 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/AbstractCaverphone.html @@ -0,0 +1,349 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>AbstractCaverphone (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="AbstractCaverphone (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/AbstractCaverphone.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/AbstractCaverphone.html" target="_top">Frames</a></li> +<li><a href="AbstractCaverphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class AbstractCaverphone" class="title">Class AbstractCaverphone</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.AbstractCaverphone</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<dl> +<dt>Direct Known Subclasses:</dt> +<dd><a href="../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Caverphone1</a>, <a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Caverphone2</a></dd> +</dl> +<hr> +<br> +<pre>public abstract class <span class="typeNameLabel">AbstractCaverphone</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></pre> +<div class="block">Encodes a string into a Caverphone value. + + This is an algorithm created by the Caversham Project at the University of Otago. It implements the Caverphone 2.0 + algorithm: + + <p>This class is immutable and thread-safe.</p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html#AbstractCaverphone--">AbstractCaverphone</a></span>()</code> +<div class="block">Creates an instance of the Caverphone encoder</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source)</code> +<div class="block">Encodes an Object using the caverphone algorithm.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html#isEncodeEqual-java.lang.String-java.lang.String-">isEncodeEqual</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str2)</code> +<div class="block">Tests if the encodings of two strings are equal.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.StringEncoder"> +<!-- --> +</a> +<h3>Methods inherited from interface org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></h3> +<code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="AbstractCaverphone--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>AbstractCaverphone</h4> +<pre>public AbstractCaverphone()</pre> +<div class="block">Creates an instance of the Caverphone encoder</div> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an Object using the caverphone algorithm. This method is provided in order to satisfy the requirements of + the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - Object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An object (or type java.lang.String) containing the caverphone code which corresponds to the String + supplied.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if the parameter supplied is not of type java.lang.String</dd> +</dl> +</li> +</ul> +<a name="isEncodeEqual-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>isEncodeEqual</h4> +<pre>public boolean isEncodeEqual(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str2) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Tests if the encodings of two strings are equal. + + This method might be promoted to a new AbstractStringEncoder superclass.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str1</code> - First of two strings to compare</dd> +<dd><code>str2</code> - Second of two strings to compare</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the encodings of these strings are identical, <code>false</code> otherwise.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if there is an error condition during the encoding process.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/AbstractCaverphone.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/AbstractCaverphone.html" target="_top">Frames</a></li> +<li><a href="AbstractCaverphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Caverphone.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Caverphone.html new file mode 100644 index 0000000000000000000000000000000000000000..2162f0408612d6a335e5ccf48828acdd867a9714 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Caverphone.html @@ -0,0 +1,392 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Caverphone (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Caverphone (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":42,"i1":42,"i2":42,"i3":42}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Caverphone.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Caverphone.html" target="_top">Frames</a></li> +<li><a href="Caverphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class Caverphone" class="title">Class Caverphone</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.Caverphone</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">1.5 Replaced by <a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><code>Caverphone2</code></a>, will be removed in 2.0.</span></div> +</div> +<br> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public class <span class="typeNameLabel">Caverphone</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></pre> +<div class="block">Encodes a string into a Caverphone 2.0 value. Delegate to a <a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><code>Caverphone2</code></a> instance. + + This is an algorithm created by the Caversham Project at the University of Otago. It implements the Caverphone 2.0 + algorithm:</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a>, +<a href="http://caversham.otago.ac.nz/files/working/ctp150804.pdf">Caverphone 2.0 specification</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone.html#Caverphone--">Caverphone</a></span>()</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +<div class="block">Creates an instance of the Caverphone encoder</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone.html#caverphone-java.lang.String-">caverphone</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +<div class="block">Encodes the given String into a Caverphone value.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +<div class="block">Encodes an Object using the caverphone algorithm.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +<div class="block">Encodes a String using the Caverphone algorithm.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone.html#isCaverphoneEqual-java.lang.String-java.lang.String-">isCaverphoneEqual</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str2)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +<div class="block">Tests if the caverphones of two strings are identical.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Caverphone--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Caverphone</h4> +<pre>public Caverphone()</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +<div class="block">Creates an instance of the Caverphone encoder</div> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="caverphone-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>caverphone</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> caverphone(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +<div class="block">Encodes the given String into a Caverphone value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - String the source string</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A caverphone code for the given String</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +<div class="block">Encodes an Object using the caverphone algorithm. This method is provided in order to satisfy the requirements of + the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - Object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An object (or type java.lang.String) containing the caverphone code which corresponds to the String + supplied.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if the parameter supplied is not of type java.lang.String</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +<div class="block">Encodes a String using the Caverphone algorithm.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - String object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The caverphone code corresponding to the String supplied</dd> +</dl> +</li> +</ul> +<a name="isCaverphoneEqual-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>isCaverphoneEqual</h4> +<pre>public boolean isCaverphoneEqual(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str2)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> +<div class="block">Tests if the caverphones of two strings are identical.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str1</code> - First of two strings to compare</dd> +<dd><code>str2</code> - Second of two strings to compare</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the caverphones of these strings are identical, <code>false</code> otherwise.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Caverphone.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Caverphone.html" target="_top">Frames</a></li> +<li><a href="Caverphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Caverphone1.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Caverphone1.html new file mode 100644 index 0000000000000000000000000000000000000000..9c0316e49bce9d319164d11d616d726e1c67143c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Caverphone1.html @@ -0,0 +1,310 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Caverphone1 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Caverphone1 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Caverphone1.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Caverphone1.html" target="_top">Frames</a></li> +<li><a href="Caverphone1.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class Caverphone1" class="title">Class Caverphone1</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">org.apache.commons.codec.language.AbstractCaverphone</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.Caverphone1</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Caverphone1</span> +extends <a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></pre> +<div class="block">Encodes a string into a Caverphone 1.0 value. + + This is an algorithm created by the Caversham Project at the University of Otago. It implements the Caverphone 1.0 + algorithm:</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5 + + <p>This class is immutable and thread-safe.</p></dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a>, +<a href="http://caversham.otago.ac.nz/files/working/ctp060902.pdf">Caverphone 1.0 specification</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone1.html#Caverphone1--">Caverphone1</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone1.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> +<div class="block">Encodes the given String into a Caverphone value.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.language.AbstractCaverphone"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></h3> +<code><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html#encode-java.lang.Object-">encode</a>, <a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html#isEncodeEqual-java.lang.String-java.lang.String-">isEncodeEqual</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Caverphone1--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Caverphone1</h4> +<pre>public Caverphone1()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</pre> +<div class="block">Encodes the given String into a Caverphone value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - String the source string</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A caverphone code for the given String</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Caverphone1.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Caverphone1.html" target="_top">Frames</a></li> +<li><a href="Caverphone1.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Caverphone2.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Caverphone2.html new file mode 100644 index 0000000000000000000000000000000000000000..9b8f5e3c712cacf13da4dad6fe32382202fa7511 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Caverphone2.html @@ -0,0 +1,310 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Caverphone2 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Caverphone2 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Caverphone2.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Caverphone2.html" target="_top">Frames</a></li> +<li><a href="Caverphone2.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class Caverphone2" class="title">Class Caverphone2</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">org.apache.commons.codec.language.AbstractCaverphone</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.Caverphone2</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Caverphone2</span> +extends <a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></pre> +<div class="block">Encodes a string into a Caverphone 2.0 value. + + This is an algorithm created by the Caversham Project at the University of Otago. It implements the Caverphone 2.0 + algorithm:</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5 + + <p>This class is immutable and thread-safe.</p></dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a>, +<a href="http://caversham.otago.ac.nz/files/working/ctp150804.pdf">Caverphone 2.0 specification</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone2.html#Caverphone2--">Caverphone2</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Caverphone2.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> +<div class="block">Encodes the given String into a Caverphone 2.0 value.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.language.AbstractCaverphone"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></h3> +<code><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html#encode-java.lang.Object-">encode</a>, <a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html#isEncodeEqual-java.lang.String-java.lang.String-">isEncodeEqual</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Caverphone2--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Caverphone2</h4> +<pre>public Caverphone2()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</pre> +<div class="block">Encodes the given String into a Caverphone 2.0 value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - String the source string</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A caverphone code for the given String</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Caverphone2.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Caverphone2.html" target="_top">Frames</a></li> +<li><a href="Caverphone2.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/ColognePhonetic.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/ColognePhonetic.html new file mode 100644 index 0000000000000000000000000000000000000000..be5682ad52dc6054c0d28ecdd07639afd4078fab --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/ColognePhonetic.html @@ -0,0 +1,531 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>ColognePhonetic (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="ColognePhonetic (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/ColognePhonetic.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/ColognePhonetic.html" target="_top">Frames</a></li> +<li><a href="ColognePhonetic.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class ColognePhonetic" class="title">Class ColognePhonetic</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.ColognePhonetic</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">ColognePhonetic</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></pre> +<div class="block">Encodes a string into a Cologne Phonetic value. + <p> + Implements the <a href="http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik">Kölner Phonetik</a> (Cologne + Phonetic) algorithm issued by Hans Joachim Postel in 1969. + </p> + <p> + The <i>Kölner Phonetik</i> is a phonetic algorithm which is optimized for the German language. It is related to + the well-known soundex algorithm. + </p> + + <h2>Algorithm</h2> + + <ul> + + <li> + <h3>Step 1:</h3> + After preprocessing (conversion to upper case, transcription of <a + href="http://en.wikipedia.org/wiki/Germanic_umlaut">germanic umlauts</a>, removal of non alphabetical characters) the + letters of the supplied text are replaced by their phonetic code according to the following table. + <table border="1"> + <caption style="caption-side: bottom"><small><i>(Source: <a + href="http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik#Buchstabencodes">Wikipedia (de): Kölner Phonetik -- + Buchstabencodes</a>)</i></small></caption> <tbody> + <tr> + <th>Letter</th> + <th>Context</th> + <th>Code</th> + </tr> + <tr> + <td>A, E, I, J, O, U, Y</td> + <td></td> + <td>0</td> + </tr> + <tr> + + <td>H</td> + <td></td> + <td>-</td> + </tr> + <tr> + <td>B</td> + <td></td> + <td rowspan="2">1</td> + </tr> + <tr> + <td>P</td> + <td>not before H</td> + + </tr> + <tr> + <td>D, T</td> + <td>not before C, S, Z</td> + <td>2</td> + </tr> + <tr> + <td>F, V, W</td> + <td></td> + <td rowspan="2">3</td> + </tr> + <tr> + + <td>P</td> + <td>before H</td> + </tr> + <tr> + <td>G, K, Q</td> + <td></td> + <td rowspan="3">4</td> + </tr> + <tr> + <td rowspan="2">C</td> + <td>at onset before A, H, K, L, O, Q, R, U, X</td> + + </tr> + <tr> + <td>before A, H, K, O, Q, U, X except after S, Z</td> + </tr> + <tr> + <td>X</td> + <td>not after C, K, Q</td> + <td>48</td> + </tr> + <tr> + <td>L</td> + <td></td> + + <td>5</td> + </tr> + <tr> + <td>M, N</td> + <td></td> + <td>6</td> + </tr> + <tr> + <td>R</td> + <td></td> + <td>7</td> + </tr> + + <tr> + <td>S, Z</td> + <td></td> + <td rowspan="6">8</td> + </tr> + <tr> + <td rowspan="3">C</td> + <td>after S, Z</td> + </tr> + <tr> + <td>at onset except before A, H, K, L, O, Q, R, U, X</td> + </tr> + + <tr> + <td>not before A, H, K, O, Q, U, X</td> + </tr> + <tr> + <td>D, T</td> + <td>before C, S, Z</td> + </tr> + <tr> + <td>X</td> + <td>after C, K, Q</td> + </tr> + </tbody> + </table> + + <h4>Example:</h4> + + <code>"M</code>ü<code>ller-L</code>ü<code>denscheidt" + => "MULLERLUDENSCHEIDT" => "6005507500206880022"</code> + + </li> + + <li> + <h3>Step 2:</h3> + Collapse of all multiple consecutive code digits. + <h4>Example:</h4> + <code>"6005507500206880022" =&gt; "6050750206802"</code></li> + + <li> + <h3>Step 3:</h3> + Removal of all codes "0" except at the beginning. This means that two or more identical consecutive digits can occur + if they occur after removing the "0" digits. + + <h4>Example:</h4> + <code>"6050750206802" =&gt; "65752682"</code></li> + + </ul> + + <p> + This class is thread-safe. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.5</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik">Wikipedia (de): Kölner Phonetik (in German)</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html#ColognePhonetic--">ColognePhonetic</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html#colognePhonetic-java.lang.String-">colognePhonetic</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code> +<div class="block"> + Implements the <i>Kölner Phonetik</i> algorithm.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> object)</code> +<div class="block">Encodes an "Object" and returns the encoded content as an Object.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code> +<div class="block">Encodes a String and returns a String.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html#isEncodeEqual-java.lang.String-java.lang.String-">isEncodeEqual</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text2)</code> +<div class="block">Compares the first encoded string to the second encoded string.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="ColognePhonetic--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>ColognePhonetic</h4> +<pre>public ColognePhonetic()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="colognePhonetic-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>colognePhonetic</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> colognePhonetic(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre> +<div class="block"><p> + Implements the <i>Kölner Phonetik</i> algorithm. + </p> + <p> + In contrast to the initial description of the algorithm, this implementation does the encoding in one pass. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - The source text to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the corresponding encoding according to the <i>Kölner Phonetik</i> algorithm</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> object) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">Encoder</a></code></span></div> +<div class="block">Encodes an "Object" and returns the encoded content as an Object. The Objects here may just be + <code>byte[]</code> or <code>String</code>s depending on the implementation used.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>object</code> - An object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An "encoded" Object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - An encoder exception is thrown if the encoder experiences a failure condition during the encoding + process.</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre> +<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">StringEncoder</a></code></span></div> +<div class="block">Encodes a String and returns a String.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - the String to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the encoded String</dd> +</dl> +</li> +</ul> +<a name="isEncodeEqual-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>isEncodeEqual</h4> +<pre>public boolean isEncodeEqual(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text2)</pre> +<div class="block">Compares the first encoded string to the second encoded string.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text1</code> - source text to encode before testing for equality.</dd> +<dd><code>text2</code> - source text to encode before testing for equality.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the encoding the first string equals the encoding of the second string, <code>false</code> + otherwise</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/ColognePhonetic.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/ColognePhonetic.html" target="_top">Frames</a></li> +<li><a href="ColognePhonetic.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/DaitchMokotoffSoundex.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/DaitchMokotoffSoundex.html new file mode 100644 index 0000000000000000000000000000000000000000..582639cd07979da1a0c44bc6b419088009334505 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/DaitchMokotoffSoundex.html @@ -0,0 +1,427 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>DaitchMokotoffSoundex (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="DaitchMokotoffSoundex (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/DaitchMokotoffSoundex.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/DaitchMokotoffSoundex.html" target="_top">Frames</a></li> +<li><a href="DaitchMokotoffSoundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class DaitchMokotoffSoundex" class="title">Class DaitchMokotoffSoundex</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.DaitchMokotoffSoundex</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">DaitchMokotoffSoundex</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></pre> +<div class="block">Encodes a string into a Daitch-Mokotoff Soundex value. + <p> + The Daitch-Mokotoff Soundex algorithm is a refinement of the Russel and American Soundex algorithms, yielding greater + accuracy in matching especially Slavish and Yiddish surnames with similar pronunciation but differences in spelling. + </p> + <p> + The main differences compared to the other soundex variants are: + </p> + <ul> + <li>coded names are 6 digits long + <li>the initial character of the name is coded + <li>rules to encoded multi-character n-grams + <li>multiple possible encodings for the same name (branching) + </ul> + <p> + This implementation supports branching, depending on the used method: + <ul> + <li><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html#encode-java.lang.String-"><code>encode(String)</code></a> - branching disabled, only the first code will be returned + <li><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html#soundex-java.lang.String-"><code>soundex(String)</code></a> - branching enabled, all codes will be returned, separated by '|' + </ul> + <p> + Note: this implementation has additional branching rules compared to the original description of the algorithm. The + rules can be customized by overriding the default rules contained in the resource file + <code>org/apache/commons/codec/language/dmrules.txt</code>. + </p> + <p> + This class is thread-safe. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.10</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language"><code>Soundex</code></a>, +<a href="http://en.wikipedia.org/wiki/Daitch%E2%80%93Mokotoff_Soundex"> Wikipedia - Daitch-Mokotoff Soundex</a>, +<a href="http://www.avotaynu.com/soundex.htm">Avotaynu - Soundexing and Genealogy</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html#DaitchMokotoffSoundex--">DaitchMokotoffSoundex</a></span>()</code> +<div class="block">Creates a new instance with ASCII-folding enabled.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html#DaitchMokotoffSoundex-boolean-">DaitchMokotoffSoundex</a></span>(boolean folding)</code> +<div class="block">Creates a new instance.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the Daitch-Mokotoff soundex algorithm without branching.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> +<div class="block">Encodes a String using the Daitch-Mokotoff soundex algorithm without branching.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html#soundex-java.lang.String-">soundex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> +<div class="block">Encodes a String using the Daitch-Mokotoff soundex algorithm with branching.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="DaitchMokotoffSoundex--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>DaitchMokotoffSoundex</h4> +<pre>public DaitchMokotoffSoundex()</pre> +<div class="block">Creates a new instance with ASCII-folding enabled.</div> +</li> +</ul> +<a name="DaitchMokotoffSoundex-boolean-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>DaitchMokotoffSoundex</h4> +<pre>public DaitchMokotoffSoundex(boolean folding)</pre> +<div class="block">Creates a new instance. + <p> + With ASCII-folding enabled, certain accented characters will be transformed to equivalent ASCII characters, e.g. + è -> e. + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>folding</code> - if ASCII-folding shall be performed before encoding</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an Object using the Daitch-Mokotoff soundex algorithm without branching. + <p> + This method is provided in order to satisfy the requirements of the Encoder interface, and will throw an + EncoderException if the supplied object is not of type java.lang.String. + </p></div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - Object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An object (of type java.lang.String) containing the DM soundex code, which corresponds to the String + supplied.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if the parameter supplied is not of type java.lang.String</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a character is not mapped</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html#soundex-java.lang.String-"><code>soundex(String)</code></a></dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</pre> +<div class="block">Encodes a String using the Daitch-Mokotoff soundex algorithm without branching.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - A String object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A DM Soundex code corresponding to the String supplied</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a character is not mapped</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html#soundex-java.lang.String-"><code>soundex(String)</code></a></dd> +</dl> +</li> +</ul> +<a name="soundex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>soundex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> soundex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</pre> +<div class="block">Encodes a String using the Daitch-Mokotoff soundex algorithm with branching. + <p> + In case a string is encoded into multiple codes (see branching rules), the result will contain all codes, + separated by '|'. + </p> + <p> + Example: the name "AUERBACH" is encoded as both + </p> + <ul> + <li>097400</li> + <li>097500</li> + </ul> + <p> + Thus the result will be "097400|097500". + </p></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - A String object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A string containing a set of DM Soundex codes corresponding to the String supplied</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a character is not mapped</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/DaitchMokotoffSoundex.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/DaitchMokotoffSoundex.html" target="_top">Frames</a></li> +<li><a href="DaitchMokotoffSoundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html new file mode 100644 index 0000000000000000000000000000000000000000..bfd9cfecf94d0119645a5094a4c9519c9e3d3f4b --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html @@ -0,0 +1,411 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>DoubleMetaphone.DoubleMetaphoneResult (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="DoubleMetaphone.DoubleMetaphoneResult (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/DoubleMetaphone.DoubleMetaphoneResult.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" target="_top">Frames</a></li> +<li><a href="DoubleMetaphone.DoubleMetaphoneResult.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class DoubleMetaphone.DoubleMetaphoneResult" class="title">Class DoubleMetaphone.DoubleMetaphoneResult</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.DoubleMetaphone.DoubleMetaphoneResult</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>Enclosing class:</dt> +<dd><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">DoubleMetaphone.DoubleMetaphoneResult</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Inner class for storing results, since there is the optional alternate encoding.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#DoubleMetaphoneResult-int-">DoubleMetaphoneResult</a></span>(int maxLength)</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#append-char-">append</a></span>(char value)</code> </td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#append-char-char-">append</a></span>(char primary, + char alternate)</code> </td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#append-java.lang.String-">append</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> </td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#append-java.lang.String-java.lang.String-">append</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> primary, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> alternate)</code> </td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#appendAlternate-char-">appendAlternate</a></span>(char value)</code> </td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#appendAlternate-java.lang.String-">appendAlternate</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> </td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#appendPrimary-char-">appendPrimary</a></span>(char value)</code> </td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#appendPrimary-java.lang.String-">appendPrimary</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> </td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#getAlternate--">getAlternate</a></span>()</code> </td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#getPrimary--">getPrimary</a></span>()</code> </td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html#isComplete--">isComplete</a></span>()</code> </td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="DoubleMetaphoneResult-int-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>DoubleMetaphoneResult</h4> +<pre>public DoubleMetaphoneResult(int maxLength)</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="append-char-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>append</h4> +<pre>public void append(char value)</pre> +</li> +</ul> +<a name="append-char-char-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>append</h4> +<pre>public void append(char primary, + char alternate)</pre> +</li> +</ul> +<a name="appendPrimary-char-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>appendPrimary</h4> +<pre>public void appendPrimary(char value)</pre> +</li> +</ul> +<a name="appendAlternate-char-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>appendAlternate</h4> +<pre>public void appendAlternate(char value)</pre> +</li> +</ul> +<a name="append-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>append</h4> +<pre>public void append(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> +</li> +</ul> +<a name="append-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>append</h4> +<pre>public void append(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> primary, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> alternate)</pre> +</li> +</ul> +<a name="appendPrimary-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>appendPrimary</h4> +<pre>public void appendPrimary(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> +</li> +</ul> +<a name="appendAlternate-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>appendAlternate</h4> +<pre>public void appendAlternate(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> +</li> +</ul> +<a name="getPrimary--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getPrimary</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getPrimary()</pre> +</li> +</ul> +<a name="getAlternate--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getAlternate</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getAlternate()</pre> +</li> +</ul> +<a name="isComplete--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>isComplete</h4> +<pre>public boolean isComplete()</pre> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/DoubleMetaphone.DoubleMetaphoneResult.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" target="_top">Frames</a></li> +<li><a href="DoubleMetaphone.DoubleMetaphoneResult.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/DoubleMetaphone.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/DoubleMetaphone.html new file mode 100644 index 0000000000000000000000000000000000000000..d3632632e954a9743950343a4f90b900aa30dd09 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/DoubleMetaphone.html @@ -0,0 +1,534 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>DoubleMetaphone (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="DoubleMetaphone (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":9,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/DoubleMetaphone.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/DoubleMetaphone.html" target="_top">Frames</a></li> +<li><a href="DoubleMetaphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li><a href="#nested.class.summary">Nested</a> | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class DoubleMetaphone" class="title">Class DoubleMetaphone</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.DoubleMetaphone</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">DoubleMetaphone</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></pre> +<div class="block">Encodes a string into a double metaphone value. This Implementation is based on the algorithm by <CITE>Lawrence + Philips</CITE>. + <p> + This class is conditionally thread-safe. The instance field for the maximum code length is mutable + <a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#setMaxCodeLen-int-"><code>setMaxCodeLen(int)</code></a> but is not volatile, and accesses are not synchronized. If an instance of the class is + shared between threads, the caller needs to ensure that suitable synchronization is used to ensure safe publication + of the value between threads, and must not invoke <a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#setMaxCodeLen-int-"><code>setMaxCodeLen(int)</code></a> after initial setup.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://drdobbs.com/184401251?pgno=2">Original Article</a>, +<a href="http://en.wikipedia.org/wiki/Metaphone">http://en.wikipedia.org/wiki/Metaphone</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== NESTED CLASS SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="nested.class.summary"> +<!-- --> +</a> +<h3>Nested Class Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> +<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">DoubleMetaphone.DoubleMetaphoneResult</a></span></code> +<div class="block">Inner class for storing results, since there is the optional alternate encoding.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#DoubleMetaphone--">DoubleMetaphone</a></span>()</code> +<div class="block">Creates an instance of this DoubleMetaphone encoder</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>protected char</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#charAt-java.lang.String-int-">charAt</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value, + int index)</code> </td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>protected static boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#contains-java.lang.String-int-int-java.lang.String...-">contains</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value, + int start, + int length, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>... criteria)</code> </td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#doubleMetaphone-java.lang.String-">doubleMetaphone</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> +<div class="block">Encode a value with Double Metaphone.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#doubleMetaphone-java.lang.String-boolean-">doubleMetaphone</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value, + boolean alternate)</code> +<div class="block">Encode a value with Double Metaphone, optionally using the alternate encoding.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encode the value using DoubleMetaphone.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> +<div class="block">Encode the value using DoubleMetaphone.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#getMaxCodeLen--">getMaxCodeLen</a></span>()</code> +<div class="block">Returns the maxCodeLen.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#isDoubleMetaphoneEqual-java.lang.String-java.lang.String-">isDoubleMetaphoneEqual</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value2)</code> +<div class="block">Check if the Double Metaphone values of two <code>String</code> values + are equal.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#isDoubleMetaphoneEqual-java.lang.String-java.lang.String-boolean-">isDoubleMetaphoneEqual</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value2, + boolean alternate)</code> +<div class="block">Check if the Double Metaphone values of two <code>String</code> values + are equal, optionally using the alternate value.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#setMaxCodeLen-int-">setMaxCodeLen</a></span>(int maxCodeLen)</code> +<div class="block">Sets the maxCodeLen.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="DoubleMetaphone--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>DoubleMetaphone</h4> +<pre>public DoubleMetaphone()</pre> +<div class="block">Creates an instance of this DoubleMetaphone encoder</div> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="doubleMetaphone-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>doubleMetaphone</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> doubleMetaphone(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> +<div class="block">Encode a value with Double Metaphone.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value</code> - String to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>an encoded string</dd> +</dl> +</li> +</ul> +<a name="doubleMetaphone-java.lang.String-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>doubleMetaphone</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> doubleMetaphone(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value, + boolean alternate)</pre> +<div class="block">Encode a value with Double Metaphone, optionally using the alternate encoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value</code> - String to encode</dd> +<dd><code>alternate</code> - use alternate encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>an encoded string</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encode the value using DoubleMetaphone. It will only work if + <code>obj</code> is a <code>String</code> (like <code>Metaphone</code>).</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - Object to encode (should be of type String)</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An encoded Object (will be of type String)</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - encode parameter is not of type String</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> +<div class="block">Encode the value using DoubleMetaphone.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value</code> - String to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An encoded String</dd> +</dl> +</li> +</ul> +<a name="isDoubleMetaphoneEqual-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isDoubleMetaphoneEqual</h4> +<pre>public boolean isDoubleMetaphoneEqual(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value2)</pre> +<div class="block">Check if the Double Metaphone values of two <code>String</code> values + are equal.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value1</code> - The left-hand side of the encoded <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>String.equals(Object)</code></a>.</dd> +<dd><code>value2</code> - The right-hand side of the encoded <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>String.equals(Object)</code></a>.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the encoded <code>String</code>s are equal; + <code>false</code> otherwise.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html#isDoubleMetaphoneEqual-java.lang.String-java.lang.String-boolean-"><code>isDoubleMetaphoneEqual(String,String,boolean)</code></a></dd> +</dl> +</li> +</ul> +<a name="isDoubleMetaphoneEqual-java.lang.String-java.lang.String-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isDoubleMetaphoneEqual</h4> +<pre>public boolean isDoubleMetaphoneEqual(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value2, + boolean alternate)</pre> +<div class="block">Check if the Double Metaphone values of two <code>String</code> values + are equal, optionally using the alternate value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value1</code> - The left-hand side of the encoded <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>String.equals(Object)</code></a>.</dd> +<dd><code>value2</code> - The right-hand side of the encoded <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>String.equals(Object)</code></a>.</dd> +<dd><code>alternate</code> - use the alternate value if <code>true</code>.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the encoded <code>String</code>s are equal; + <code>false</code> otherwise.</dd> +</dl> +</li> +</ul> +<a name="getMaxCodeLen--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getMaxCodeLen</h4> +<pre>public int getMaxCodeLen()</pre> +<div class="block">Returns the maxCodeLen.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>int</dd> +</dl> +</li> +</ul> +<a name="setMaxCodeLen-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setMaxCodeLen</h4> +<pre>public void setMaxCodeLen(int maxCodeLen)</pre> +<div class="block">Sets the maxCodeLen.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>maxCodeLen</code> - The maxCodeLen to set</dd> +</dl> +</li> +</ul> +<a name="charAt-java.lang.String-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>charAt</h4> +<pre>protected char charAt(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value, + int index)</pre> +</li> +</ul> +<a name="contains-java.lang.String-int-int-java.lang.String...-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>contains</h4> +<pre>protected static boolean contains(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value, + int start, + int length, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>... criteria)</pre> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/DoubleMetaphone.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/DoubleMetaphone.html" target="_top">Frames</a></li> +<li><a href="DoubleMetaphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li><a href="#nested.class.summary">Nested</a> | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/MatchRatingApproachEncoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/MatchRatingApproachEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..cdc3b85374165afa42d7b948f977ad127db831a8 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/MatchRatingApproachEncoder.html @@ -0,0 +1,352 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>MatchRatingApproachEncoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="MatchRatingApproachEncoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MatchRatingApproachEncoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/MatchRatingApproachEncoder.html" target="_top">Frames</a></li> +<li><a href="MatchRatingApproachEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class MatchRatingApproachEncoder" class="title">Class MatchRatingApproachEncoder</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.MatchRatingApproachEncoder</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">MatchRatingApproachEncoder</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></pre> +<div class="block">Match Rating Approach Phonetic Algorithm Developed by <CITE>Western Airlines</CITE> in 1977. + + This class is immutable and thread-safe.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.8</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://en.wikipedia.org/wiki/Match_rating_approach">Wikipedia - Match Rating Approach</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html#MatchRatingApproachEncoder--">MatchRatingApproachEncoder</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> pObject)</code> +<div class="block">Encodes an Object using the Match Rating Approach algorithm.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Encodes a String using the Match Rating Approach (MRA) algorithm.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html#isEncodeEquals-java.lang.String-java.lang.String-">isEncodeEquals</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name2)</code> +<div class="block">Determines if two names are homophonous via Match Rating Approach (MRA) algorithm.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="MatchRatingApproachEncoder--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>MatchRatingApproachEncoder</h4> +<pre>public MatchRatingApproachEncoder()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> pObject) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an Object using the Match Rating Approach algorithm. Method is here to satisfy the requirements of the + Encoder interface Throws an EncoderException if input object is not of type java.lang.String.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pObject</code> - Object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An object (or type java.lang.String) containing the Match Rating Approach code which corresponds to the + String supplied.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if the parameter supplied is not of type java.lang.String</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Encodes a String using the Match Rating Approach (MRA) algorithm.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - String object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The MRA code corresponding to the String supplied</dd> +</dl> +</li> +</ul> +<a name="isEncodeEquals-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>isEncodeEquals</h4> +<pre>public boolean isEncodeEquals(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name2)</pre> +<div class="block">Determines if two names are homophonous via Match Rating Approach (MRA) algorithm. It should be noted that the + strings are cleaned in the same way as <a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html#encode-java.lang.String-"><code>encode(String)</code></a>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name1</code> - First of the 2 strings (names) to compare</dd> +<dd><code>name2</code> - Second of the 2 names to compare</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the encodings are identical <code>false</code> otherwise.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/MatchRatingApproachEncoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/MatchRatingApproachEncoder.html" target="_top">Frames</a></li> +<li><a href="MatchRatingApproachEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Metaphone.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Metaphone.html new file mode 100644 index 0000000000000000000000000000000000000000..698a5be49fc303bd9f89b85836523311340b4864 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Metaphone.html @@ -0,0 +1,441 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Metaphone (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Metaphone (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Metaphone.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Metaphone.html" target="_top">Frames</a></li> +<li><a href="Metaphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class Metaphone" class="title">Class Metaphone</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.Metaphone</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Metaphone</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></pre> +<div class="block">Encodes a string into a Metaphone value. + <p> + Initial Java implementation by <CITE>William B. Brogden. December, 1997</CITE>. + Permission given by <CITE>wbrogden</CITE> for code to be used anywhere. + <p> + <CITE>Hanging on the Metaphone</CITE> by <CITE>Lawrence Philips</CITE> in <CITE>Computer Language of Dec. 1990, + p 39.</CITE> + <p> + Note, that this does not match the algorithm that ships with PHP, or the algorithm found in the Perl implementations: + </p> + <ul> + <li><a href="http://search.cpan.org/~mschwern/Text-Metaphone-1.96/Metaphone.pm">Text:Metaphone-1.96</a> + (broken link 4/30/2013) </li> + <li><a href="https://metacpan.org/source/MSCHWERN/Text-Metaphone-1.96//Metaphone.pm">Text:Metaphone-1.96</a> + (link checked 4/30/2013) </li> + </ul> + <p> + They have had undocumented changes from the originally published algorithm. + For more information, see <a href="https://issues.apache.org/jira/browse/CODEC-57">CODEC-57</a>. + <p> + This class is conditionally thread-safe. + The instance field for maximum code length is mutable <a href="../../../../../org/apache/commons/codec/language/Metaphone.html#setMaxCodeLen-int-"><code>setMaxCodeLen(int)</code></a> + but is not volatile, and accesses are not synchronized. + If an instance of the class is shared between threads, the caller needs to ensure that suitable synchronization + is used to ensure safe publication of the value between threads, and must not invoke <a href="../../../../../org/apache/commons/codec/language/Metaphone.html#setMaxCodeLen-int-"><code>setMaxCodeLen(int)</code></a> + after initial setup.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Metaphone.html#Metaphone--">Metaphone</a></span>()</code> +<div class="block">Creates an instance of the Metaphone encoder</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Metaphone.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the metaphone algorithm.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Metaphone.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Encodes a String using the Metaphone algorithm.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Metaphone.html#getMaxCodeLen--">getMaxCodeLen</a></span>()</code> +<div class="block">Returns the maxCodeLen.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Metaphone.html#isMetaphoneEqual-java.lang.String-java.lang.String-">isMetaphoneEqual</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str2)</code> +<div class="block">Tests is the metaphones of two strings are identical.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Metaphone.html#metaphone-java.lang.String-">metaphone</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> txt)</code> +<div class="block">Find the metaphone value of a String.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Metaphone.html#setMaxCodeLen-int-">setMaxCodeLen</a></span>(int maxCodeLen)</code> +<div class="block">Sets the maxCodeLen.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Metaphone--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Metaphone</h4> +<pre>public Metaphone()</pre> +<div class="block">Creates an instance of the Metaphone encoder</div> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="metaphone-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>metaphone</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> metaphone(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> txt)</pre> +<div class="block">Find the metaphone value of a String. This is similar to the + soundex algorithm, but better at finding similar sounding words. + All input is converted to upper case. + Limitations: Input format is expected to be a single ASCII word + with only characters in the A - Z range, no punctuation or numbers.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>txt</code> - String to find the metaphone code for</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A metaphone code corresponding to the String supplied</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an Object using the metaphone algorithm. This method + is provided in order to satisfy the requirements of the + Encoder interface, and will throw an EncoderException if the + supplied object is not of type java.lang.String.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - Object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An object (or type java.lang.String) containing the + metaphone code which corresponds to the String supplied.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if the parameter supplied is not + of type java.lang.String</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> +<div class="block">Encodes a String using the Metaphone algorithm.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - String object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The metaphone code corresponding to the String supplied</dd> +</dl> +</li> +</ul> +<a name="isMetaphoneEqual-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isMetaphoneEqual</h4> +<pre>public boolean isMetaphoneEqual(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str2)</pre> +<div class="block">Tests is the metaphones of two strings are identical.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str1</code> - First of two strings to compare</dd> +<dd><code>str2</code> - Second of two strings to compare</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the metaphones of these strings are identical, + <code>false</code> otherwise.</dd> +</dl> +</li> +</ul> +<a name="getMaxCodeLen--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getMaxCodeLen</h4> +<pre>public int getMaxCodeLen()</pre> +<div class="block">Returns the maxCodeLen.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>int</dd> +</dl> +</li> +</ul> +<a name="setMaxCodeLen-int-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>setMaxCodeLen</h4> +<pre>public void setMaxCodeLen(int maxCodeLen)</pre> +<div class="block">Sets the maxCodeLen.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>maxCodeLen</code> - The maxCodeLen to set</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Metaphone.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Metaphone.html" target="_top">Frames</a></li> +<li><a href="Metaphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Nysiis.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Nysiis.html new file mode 100644 index 0000000000000000000000000000000000000000..49a1b745f013f7ab3d6883a0be5d7510426def19 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Nysiis.html @@ -0,0 +1,441 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Nysiis (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Nysiis (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Nysiis.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Nysiis.html" target="_top">Frames</a></li> +<li><a href="Nysiis.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class Nysiis" class="title">Class Nysiis</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.Nysiis</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Nysiis</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></pre> +<div class="block">Encodes a string into a NYSIIS value. NYSIIS is an encoding used to relate similar names, but can also be used as a + general purpose scheme to find word with similar phonemes. + <p> + NYSIIS features an accuracy increase of 2.7% over the traditional Soundex algorithm. + <p> + Algorithm description: + <pre> + 1. Transcode first characters of name + 1a. MAC -> MCC + 1b. KN -> NN + 1c. K -> C + 1d. PH -> FF + 1e. PF -> FF + 1f. SCH -> SSS + 2. Transcode last characters of name + 2a. EE, IE -> Y + 2b. DT,RT,RD,NT,ND -> D + 3. First character of key = first character of name + 4. Transcode remaining characters by following these rules, incrementing by one character each time + 4a. EV -> AF else A,E,I,O,U -> A + 4b. Q -> G + 4c. Z -> S + 4d. M -> N + 4e. KN -> N else K -> C + 4f. SCH -> SSS + 4g. PH -> FF + 4h. H -> If previous or next is nonvowel, previous + 4i. W -> If previous is vowel, previous + 4j. Add current to key if current != last key character + 5. If last character is S, remove it + 6. If last characters are AY, replace with Y + 7. If last character is A, remove it + 8. Collapse all strings of repeated characters + 9. Add original first character of name as first character of key + </pre> + <p> + This class is immutable and thread-safe.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://en.wikipedia.org/wiki/NYSIIS">NYSIIS on Wikipedia</a>, +<a href="http://www.dropby.com/NYSIIS.html">NYSIIS on dropby.com</a>, +<a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language"><code>Soundex</code></a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Nysiis.html#Nysiis--">Nysiis</a></span>()</code> +<div class="block">Creates an instance of the <a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><code>Nysiis</code></a> encoder with strict mode (original form), + i.e.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Nysiis.html#Nysiis-boolean-">Nysiis</a></span>(boolean strict)</code> +<div class="block">Create an instance of the <a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><code>Nysiis</code></a> encoder with the specified strict mode: + + + <code>true</code>: encoded strings have a maximum length of 6 + <code>false</code>: encoded strings may have arbitrary length + </div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Nysiis.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the NYSIIS algorithm.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Nysiis.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Encodes a String using the NYSIIS algorithm.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Nysiis.html#isStrict--">isStrict</a></span>()</code> +<div class="block">Indicates the strict mode for this <a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><code>Nysiis</code></a> encoder.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Nysiis.html#nysiis-java.lang.String-">nysiis</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Retrieves the NYSIIS code for a given String object.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Nysiis--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Nysiis</h4> +<pre>public Nysiis()</pre> +<div class="block">Creates an instance of the <a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><code>Nysiis</code></a> encoder with strict mode (original form), + i.e. encoded strings have a maximum length of 6.</div> +</li> +</ul> +<a name="Nysiis-boolean-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Nysiis</h4> +<pre>public Nysiis(boolean strict)</pre> +<div class="block">Create an instance of the <a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><code>Nysiis</code></a> encoder with the specified strict mode: + + <ul> + <li><code>true</code>: encoded strings have a maximum length of 6</li> + <li><code>false</code>: encoded strings may have arbitrary length</li> + </ul></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>strict</code> - the strict mode</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an Object using the NYSIIS algorithm. This method is provided in order to satisfy the requirements of the + Encoder interface, and will throw an <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec"><code>EncoderException</code></a> if the supplied object is not of type + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><code>String</code></a>.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - Object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An object (or a <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><code>String</code></a>) containing the NYSIIS code which corresponds to the given String.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if the parameter supplied is not of a <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><code>String</code></a></dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a character is not mapped</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> +<div class="block">Encodes a String using the NYSIIS algorithm.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - A String object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A Nysiis code corresponding to the String supplied</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a character is not mapped</dd> +</dl> +</li> +</ul> +<a name="isStrict--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isStrict</h4> +<pre>public boolean isStrict()</pre> +<div class="block">Indicates the strict mode for this <a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><code>Nysiis</code></a> encoder.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if the encoder is configured for strict mode, <code>false</code> otherwise</dd> +</dl> +</li> +</ul> +<a name="nysiis-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>nysiis</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> nysiis(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> +<div class="block">Retrieves the NYSIIS code for a given String object.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - String to encode using the NYSIIS algorithm</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A NYSIIS code for the String supplied</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Nysiis.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Nysiis.html" target="_top">Frames</a></li> +<li><a href="Nysiis.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/RefinedSoundex.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/RefinedSoundex.html new file mode 100644 index 0000000000000000000000000000000000000000..5d8c610a347b16bf78beac84ce6fd63bc303b571 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/RefinedSoundex.html @@ -0,0 +1,510 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>RefinedSoundex (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="RefinedSoundex (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/RefinedSoundex.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/RefinedSoundex.html" target="_top">Frames</a></li> +<li><a href="RefinedSoundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class RefinedSoundex" class="title">Class RefinedSoundex</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.RefinedSoundex</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">RefinedSoundex</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></pre> +<div class="block">Encodes a string into a Refined Soundex value. A refined soundex code is + optimized for spell checking words. Soundex method originally developed by + <CITE>Margaret Odell</CITE> and <CITE>Robert Russell</CITE>. + + <p>This class is immutable and thread-safe.</p></div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html#US_ENGLISH">US_ENGLISH</a></span></code> +<div class="block">This static variable contains an instance of the RefinedSoundex using + the US_ENGLISH mapping.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html#US_ENGLISH_MAPPING_STRING">US_ENGLISH_MAPPING_STRING</a></span></code> +<div class="block">Mapping:</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html#RefinedSoundex--">RefinedSoundex</a></span>()</code> +<div class="block">Creates an instance of the RefinedSoundex object using the default US + English mapping.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html#RefinedSoundex-char:A-">RefinedSoundex</a></span>(char[] mapping)</code> +<div class="block">Creates a refined soundex instance using a custom mapping.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html#RefinedSoundex-java.lang.String-">RefinedSoundex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> mapping)</code> +<div class="block">Creates a refined Soundex instance using a custom mapping.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html#difference-java.lang.String-java.lang.String-">difference</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s2)</code> +<div class="block">Returns the number of characters in the two encoded Strings that are the + same.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the refined soundex algorithm.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Encodes a String using the refined soundex algorithm.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html#soundex-java.lang.String-">soundex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Retrieves the Refined Soundex code for a given String object.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="US_ENGLISH_MAPPING_STRING"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>US_ENGLISH_MAPPING_STRING</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> US_ENGLISH_MAPPING_STRING</pre> +<div class="block">Mapping: + <pre> + 0: A E I O U Y H W + 1: B P + 2: F V + 3: C K S + 4: G J + 5: Q X Z + 6: D T + 7: L + 8: M N + 9: R + </pre></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.language.RefinedSoundex.US_ENGLISH_MAPPING_STRING">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="US_ENGLISH"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>US_ENGLISH</h4> +<pre>public static final <a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a> US_ENGLISH</pre> +<div class="block">This static variable contains an instance of the RefinedSoundex using + the US_ENGLISH mapping.</div> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="RefinedSoundex--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>RefinedSoundex</h4> +<pre>public RefinedSoundex()</pre> +<div class="block">Creates an instance of the RefinedSoundex object using the default US + English mapping.</div> +</li> +</ul> +<a name="RefinedSoundex-char:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>RefinedSoundex</h4> +<pre>public RefinedSoundex(char[] mapping)</pre> +<div class="block">Creates a refined soundex instance using a custom mapping. This + constructor can be used to customize the mapping, and/or possibly + provide an internationalized mapping for a non-Western character set.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>mapping</code> - Mapping array to use when finding the corresponding code for + a given character</dd> +</dl> +</li> +</ul> +<a name="RefinedSoundex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>RefinedSoundex</h4> +<pre>public RefinedSoundex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> mapping)</pre> +<div class="block">Creates a refined Soundex instance using a custom mapping. This constructor can be used to customize the mapping, + and/or possibly provide an internationalized mapping for a non-Western character set.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>mapping</code> - Mapping string to use when finding the corresponding code for a given character</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="difference-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>difference</h4> +<pre>public int difference(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s2) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Returns the number of characters in the two encoded Strings that are the + same. This return value ranges from 0 to the length of the shortest + encoded String: 0 indicates little or no similarity, and 4 out of 4 (for + example) indicates strong similarity or identical values. For refined + Soundex, the return value can be greater than 4.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>s1</code> - A String that will be encoded and compared.</dd> +<dd><code>s2</code> - A String that will be encoded and compared.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The number of characters in the two encoded Strings that are the + same from 0 to to the length of the shortest encoded String.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if an error occurs encoding one of the strings</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.3</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><code>SoundexUtils.difference(StringEncoder,String,String)</code>, +<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp"> + MS T-SQL DIFFERENCE</a></dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an Object using the refined soundex algorithm. This method is + provided in order to satisfy the requirements of the Encoder interface, + and will throw an EncoderException if the supplied object is not of type + java.lang.String.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - Object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An object (or type java.lang.String) containing the refined + soundex code which corresponds to the String supplied.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if the parameter supplied is not of type java.lang.String</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> +<div class="block">Encodes a String using the refined soundex algorithm.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - A String object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A Soundex code corresponding to the String supplied</dd> +</dl> +</li> +</ul> +<a name="soundex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>soundex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> soundex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> +<div class="block">Retrieves the Refined Soundex code for a given String object.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - String to encode using the Refined Soundex algorithm</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A soundex code for the String supplied</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/RefinedSoundex.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/RefinedSoundex.html" target="_top">Frames</a></li> +<li><a href="RefinedSoundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Soundex.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Soundex.html new file mode 100644 index 0000000000000000000000000000000000000000..0927bab2d1e47a6637e2bcd3c9f1304f577ca482 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/Soundex.html @@ -0,0 +1,675 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Soundex (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Soundex (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":42,"i4":42,"i5":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Soundex.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Soundex.html" target="_top">Frames</a></li> +<li><a href="Soundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language</div> +<h2 title="Class Soundex" class="title">Class Soundex</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.Soundex</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Soundex</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></pre> +<div class="block">Encodes a string into a Soundex value. Soundex is an encoding used to relate similar names, but can also be used as a + general purpose scheme to find word with similar phonemes. + + <p>This class is thread-safe. + Although not strictly immutable, the mutable fields are not actually used.</p></div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static char</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#SILENT_MARKER">SILENT_MARKER</a></span></code> +<div class="block">The marker character used to indicate a silent (ignored) character.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH">US_ENGLISH</a></span></code> +<div class="block">An instance of Soundex using the US_ENGLISH_MAPPING mapping.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_GENEALOGY">US_ENGLISH_GENEALOGY</a></span></code> +<div class="block">An instance of Soundex using the mapping as per the Genealogy site: + http://www.genealogy.com/articles/research/00000060.html</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING_STRING">US_ENGLISH_MAPPING_STRING</a></span></code> +<div class="block">This is a default mapping of the 26 letters used in US English.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_SIMPLIFIED">US_ENGLISH_SIMPLIFIED</a></span></code> +<div class="block">An instance of Soundex using the Simplified Soundex mapping, as described here: + http://west-penwith.org.uk/misc/soundex.htm</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex--">Soundex</a></span>()</code> +<div class="block">Creates an instance using US_ENGLISH_MAPPING</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex-char:A-">Soundex</a></span>(char[] mapping)</code> +<div class="block">Creates a soundex instance using the given mapping.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex-java.lang.String-">Soundex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> mapping)</code> +<div class="block">Creates a refined soundex instance using a custom mapping.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex-java.lang.String-boolean-">Soundex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> mapping, + boolean specialCaseHW)</code> +<div class="block">Creates a refined soundex instance using a custom mapping.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#difference-java.lang.String-java.lang.String-">difference</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s2)</code> +<div class="block">Encodes the Strings and returns the number of characters in the two encoded Strings that are the same.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an Object using the soundex algorithm.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Encodes a String using the soundex algorithm.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#getMaxLength--">getMaxLength</a></span>()</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</span></div> +</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#setMaxLength-int-">setMaxLength</a></span>(int maxLength)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</span></div> +</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/language/Soundex.html#soundex-java.lang.String-">soundex</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Retrieves the Soundex code for a given String object.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="SILENT_MARKER"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SILENT_MARKER</h4> +<pre>public static final char SILENT_MARKER</pre> +<div class="block">The marker character used to indicate a silent (ignored) character. + These are ignored except when they appear as the first character. + <p> + Note: the <a href="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING_STRING"><code>US_ENGLISH_MAPPING_STRING</code></a> does not use this mechanism + because changing it might break existing code. Mappings that don't contain + a silent marker code are treated as though H and W are silent. + <p> + To override this, use the <a href="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex-java.lang.String-boolean-"><code>Soundex(String, boolean)</code></a> constructor.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.language.Soundex.SILENT_MARKER">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="US_ENGLISH_MAPPING_STRING"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>US_ENGLISH_MAPPING_STRING</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> US_ENGLISH_MAPPING_STRING</pre> +<div class="block">This is a default mapping of the 26 letters used in US English. A value of <code>0</code> for a letter position + means do not encode, but treat as a separator when it occurs between consonants with the same code. + <p> + (This constant is provided as both an implementation convenience and to allow Javadoc to pick + up the value for the constant values page.) + <p> + <b>Note that letters H and W are treated specially.</b> + They are ignored (after the first letter) and don't act as separators + between consonants with the same code.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.language.Soundex.US_ENGLISH_MAPPING_STRING">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="US_ENGLISH"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>US_ENGLISH</h4> +<pre>public static final <a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a> US_ENGLISH</pre> +<div class="block">An instance of Soundex using the US_ENGLISH_MAPPING mapping. + This treats H and W as silent letters. + Apart from when they appear as the first letter, they are ignored. + They don't act as separators between duplicate codes.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING_STRING"><code>US_ENGLISH_MAPPING_STRING</code></a></dd> +</dl> +</li> +</ul> +<a name="US_ENGLISH_SIMPLIFIED"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>US_ENGLISH_SIMPLIFIED</h4> +<pre>public static final <a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a> US_ENGLISH_SIMPLIFIED</pre> +<div class="block">An instance of Soundex using the Simplified Soundex mapping, as described here: + http://west-penwith.org.uk/misc/soundex.htm + <p> + This treats H and W the same as vowels (AEIOUY). + Such letters aren't encoded (after the first), but they do + act as separators when dropping duplicate codes. + The mapping is otherwise the same as for <a href="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH"><code>US_ENGLISH</code></a> + <p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +<a name="US_ENGLISH_GENEALOGY"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>US_ENGLISH_GENEALOGY</h4> +<pre>public static final <a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a> US_ENGLISH_GENEALOGY</pre> +<div class="block">An instance of Soundex using the mapping as per the Genealogy site: + http://www.genealogy.com/articles/research/00000060.html + <p> + This treats vowels (AEIOUY), H and W as silent letters. + Such letters are ignored (after the first) and do not + act as separators when dropping duplicate codes. + <p> + The codes for consonants are otherwise the same as for + <a href="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING_STRING"><code>US_ENGLISH_MAPPING_STRING</code></a> and <a href="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_SIMPLIFIED"><code>US_ENGLISH_SIMPLIFIED</code></a></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Soundex--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Soundex</h4> +<pre>public Soundex()</pre> +<div class="block">Creates an instance using US_ENGLISH_MAPPING</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex-char:A-"><code>Soundex(char[])</code></a>, +<a href="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING_STRING"><code>US_ENGLISH_MAPPING_STRING</code></a></dd> +</dl> +</li> +</ul> +<a name="Soundex-char:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Soundex</h4> +<pre>public Soundex(char[] mapping)</pre> +<div class="block">Creates a soundex instance using the given mapping. This constructor can be used to provide an internationalized + mapping for a non-Western character set. + + Every letter of the alphabet is "mapped" to a numerical value. This char array holds the values to which each + letter is mapped. This implementation contains a default map for US_ENGLISH + <p> + If the mapping contains an instance of <a href="../../../../../org/apache/commons/codec/language/Soundex.html#SILENT_MARKER"><code>SILENT_MARKER</code></a> then H and W are not given special treatment</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>mapping</code> - Mapping array to use when finding the corresponding code for a given character</dd> +</dl> +</li> +</ul> +<a name="Soundex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Soundex</h4> +<pre>public Soundex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> mapping)</pre> +<div class="block">Creates a refined soundex instance using a custom mapping. This constructor can be used to customize the mapping, + and/or possibly provide an internationalized mapping for a non-Western character set. + <p> + If the mapping contains an instance of <a href="../../../../../org/apache/commons/codec/language/Soundex.html#SILENT_MARKER"><code>SILENT_MARKER</code></a> then H and W are not given special treatment</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>mapping</code> - Mapping string to use when finding the corresponding code for a given character</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.4</dd> +</dl> +</li> +</ul> +<a name="Soundex-java.lang.String-boolean-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Soundex</h4> +<pre>public Soundex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> mapping, + boolean specialCaseHW)</pre> +<div class="block">Creates a refined soundex instance using a custom mapping. This constructor can be used to customize the mapping, + and/or possibly provide an internationalized mapping for a non-Western character set.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>mapping</code> - Mapping string to use when finding the corresponding code for a given character</dd> +<dd><code>specialCaseHW</code> - if true, then</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.11</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="difference-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>difference</h4> +<pre>public int difference(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s1, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s2) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes the Strings and returns the number of characters in the two encoded Strings that are the same. This + return value ranges from 0 through 4: 0 indicates little or no similarity, and 4 indicates strong similarity or + identical values.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>s1</code> - A String that will be encoded and compared.</dd> +<dd><code>s2</code> - A String that will be encoded and compared.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The number of characters in the two encoded Strings that are the same from 0 to 4.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if an error occurs encoding one of the strings</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.3</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><code>SoundexUtils.difference(StringEncoder,String,String)</code>, +<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp"> MS + T-SQL DIFFERENCE </a></dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an Object using the soundex algorithm. This method is provided in order to satisfy the requirements of + the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - Object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An object (or type java.lang.String) containing the soundex code which corresponds to the String + supplied.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if the parameter supplied is not of type java.lang.String</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a character is not mapped</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> +<div class="block">Encodes a String using the soundex algorithm.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - A String object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A Soundex code corresponding to the String supplied</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a character is not mapped</dd> +</dl> +</li> +</ul> +<a name="getMaxLength--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getMaxLength</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public int getMaxLength()</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</span></div> +<div class="block">Returns the maxLength. Standard Soundex</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>int</dd> +</dl> +</li> +</ul> +<a name="setMaxLength-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setMaxLength</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public void setMaxLength(int maxLength)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</span></div> +<div class="block">Sets the maxLength.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>maxLength</code> - The maxLength to set</dd> +</dl> +</li> +</ul> +<a name="soundex-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>soundex</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> soundex(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> +<div class="block">Retrieves the Soundex code for a given String object.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - String to encode using the Soundex algorithm</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A soundex code for the String supplied</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a character is not mapped</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Soundex.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/Soundex.html" target="_top">Frames</a></li> +<li><a href="Soundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/BeiderMorseEncoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/BeiderMorseEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..7213abc8e5967bc35d779fdc7ff23ca9a5a040a4 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/BeiderMorseEncoder.html @@ -0,0 +1,523 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>BeiderMorseEncoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="BeiderMorseEncoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BeiderMorseEncoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" target="_top">Frames</a></li> +<li><a href="BeiderMorseEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Class BeiderMorseEncoder" class="title">Class BeiderMorseEncoder</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.bm.BeiderMorseEncoder</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">BeiderMorseEncoder</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></pre> +<div class="block">Encodes strings into their Beider-Morse phonetic encoding. + <p> + Beider-Morse phonetic encodings are optimised for family names. However, they may be useful for a wide range of + words. + <p> + This encoder is intentionally mutable to allow dynamic configuration through bean properties. As such, it is mutable, + and may not be thread-safe. If you require a guaranteed thread-safe encoding then use <a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm"><code>PhoneticEngine</code></a> + directly. + <p> + <b>Encoding overview</b> + <p> + Beider-Morse phonetic encodings is a multi-step process. Firstly, a table of rules is consulted to guess what + language the word comes from. For example, if it ends in "<code>ault</code>" then it infers that the word is French. + Next, the word is translated into a phonetic representation using a language-specific phonetics table. Some runs of + letters can be pronounced in multiple ways, and a single run of letters may be potentially broken up into phonemes at + different places, so this stage results in a set of possible language-specific phonetic representations. Lastly, this + language-specific phonetic representation is processed by a table of rules that re-writes it phonetically taking into + account systematic pronunciation differences between languages, to move it towards a pan-indo-european phonetic + representation. Again, sometimes there are multiple ways this could be done and sometimes things that can be + pronounced in several ways in the source language have only one way to represent them in this average phonetic + language, so the result is again a set of phonetic spellings. + <p> + Some names are treated as having multiple parts. This can be due to two things. Firstly, they may be hyphenated. In + this case, each individual hyphenated word is encoded, and then these are combined end-to-end for the final encoding. + Secondly, some names have standard prefixes, for example, "<code>Mac/Mc</code>" in Scottish (English) names. As + sometimes it is ambiguous whether the prefix is intended or is an accident of the spelling, the word is encoded once + with the prefix and once without it. The resulting encoding contains one and then the other result. + <p> + <b>Encoding format</b> + <p> + Individual phonetic spellings of an input word are represented in upper- and lower-case roman characters. Where there + are multiple possible phonetic representations, these are joined with a pipe (<code>|</code>) character. If multiple + hyphenated words where found, or if the word may contain a name prefix, each encoded word is placed in elipses and + these blocks are then joined with hyphens. For example, "<code>d'ortley</code>" has a possible prefix. The form + without prefix encodes to "<code>ortlaj|ortlej</code>", while the form with prefix encodes to " + <code>dortlaj|dortlej</code>". Thus, the full, combined encoding is "<code>(ortlaj|ortlej)-(dortlaj|dortlej)</code>". + <p> + The encoded forms are often quite a bit longer than the input strings. This is because a single input may have many + potential phonetic interpretations. For example, "<code>Renault</code>" encodes to " + <code>rYnDlt|rYnalt|rYnult|rinDlt|rinalt|rinult</code>". The <code>APPROX</code> rules will tend to produce larger + encodings as they consider a wider range of possible, approximate phonetic interpretations of the original word. + Down-stream applications may wish to further process the encoding for indexing or lookup purposes, for example, by + splitting on pipe (<code>|</code>) and indexing under each of these alternatives. + <p> + <b>Note</b>: this version of the Beider-Morse encoding is equivalent with v3.4 of the reference implementation. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.6</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://stevemorse.org/phonetics/bmpm.htm">Beider-Morse Phonetic Matching</a>, +<a href="http://stevemorse.org/phoneticinfo.htm">Reference implementation</a> + + <p> + This class is Not ThreadSafe + </p></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#BeiderMorseEncoder--">BeiderMorseEncoder</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source)</code> +<div class="block">Encodes an "Object" and returns the encoded content as an Object.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> +<div class="block">Encodes a String and returns a String.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#getNameType--">getNameType</a></span>()</code> +<div class="block">Gets the name type currently in operation.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#getRuleType--">getRuleType</a></span>()</code> +<div class="block">Gets the rule type currently in operation.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#isConcat--">isConcat</a></span>()</code> +<div class="block">Discovers if multiple possible encodings are concatenated.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#setConcat-boolean-">setConcat</a></span>(boolean concat)</code> +<div class="block">Sets how multiple possible phonetic encodings are combined.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#setMaxPhonemes-int-">setMaxPhonemes</a></span>(int maxPhonemes)</code> +<div class="block">Sets the number of maximum of phonemes that shall be considered by the engine.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#setNameType-org.apache.commons.codec.language.bm.NameType-">setNameType</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType)</code> +<div class="block">Sets the type of name.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#setRuleType-org.apache.commons.codec.language.bm.RuleType-">setRuleType</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> ruleType)</code> +<div class="block">Sets the rule type to apply.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="BeiderMorseEncoder--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>BeiderMorseEncoder</h4> +<pre>public BeiderMorseEncoder()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> source) + throws <a href="../../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">Encoder</a></code></span></div> +<div class="block">Encodes an "Object" and returns the encoded content as an Object. The Objects here may just be + <code>byte[]</code> or <code>String</code>s depending on the implementation used.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - An object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An "encoded" Object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - An encoder exception is thrown if the encoder experiences a failure condition during the encoding + process.</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source) + throws <a href="../../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">StringEncoder</a></code></span></div> +<div class="block">Encodes a String and returns a String.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>source</code> - the String to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the encoded String</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if there is an error condition during the encoding process.</dd> +</dl> +</li> +</ul> +<a name="getNameType--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getNameType</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> getNameType()</pre> +<div class="block">Gets the name type currently in operation.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the NameType currently being used</dd> +</dl> +</li> +</ul> +<a name="getRuleType--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getRuleType</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> getRuleType()</pre> +<div class="block">Gets the rule type currently in operation.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the RuleType currently being used</dd> +</dl> +</li> +</ul> +<a name="isConcat--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isConcat</h4> +<pre>public boolean isConcat()</pre> +<div class="block">Discovers if multiple possible encodings are concatenated.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true if multiple encodings are concatenated, false if just the first one is returned</dd> +</dl> +</li> +</ul> +<a name="setConcat-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setConcat</h4> +<pre>public void setConcat(boolean concat)</pre> +<div class="block">Sets how multiple possible phonetic encodings are combined.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>concat</code> - true if multiple encodings are to be combined with a '|', false if just the first one is + to be considered</dd> +</dl> +</li> +</ul> +<a name="setNameType-org.apache.commons.codec.language.bm.NameType-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setNameType</h4> +<pre>public void setNameType(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType)</pre> +<div class="block">Sets the type of name. Use <a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html#GENERIC"><code>NameType.GENERIC</code></a> unless you specifically want phonetic encodings + optimized for Ashkenazi or Sephardic Jewish family names.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>nameType</code> - the NameType in use</dd> +</dl> +</li> +</ul> +<a name="setRuleType-org.apache.commons.codec.language.bm.RuleType-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setRuleType</h4> +<pre>public void setRuleType(<a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> ruleType)</pre> +<div class="block">Sets the rule type to apply. This will widen or narrow the range of phonetic encodings considered.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>ruleType</code> - <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html#APPROX"><code>RuleType.APPROX</code></a> or <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html#EXACT"><code>RuleType.EXACT</code></a> for approximate or exact phonetic matches</dd> +</dl> +</li> +</ul> +<a name="setMaxPhonemes-int-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>setMaxPhonemes</h4> +<pre>public void setMaxPhonemes(int maxPhonemes)</pre> +<div class="block">Sets the number of maximum of phonemes that shall be considered by the engine.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>maxPhonemes</code> - the maximum number of phonemes returned by the engine</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BeiderMorseEncoder.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" target="_top">Frames</a></li> +<li><a href="BeiderMorseEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Lang.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Lang.html new file mode 100644 index 0000000000000000000000000000000000000000..143d0fdd7c653b42b5704cc0f420893d4e22fff9 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Lang.html @@ -0,0 +1,356 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Lang (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Lang (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":9,"i3":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Lang.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Lang.html" target="_top">Frames</a></li> +<li><a href="Lang.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Class Lang" class="title">Class Lang</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.bm.Lang</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Lang</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Language guessing utility. + <p> + This class encapsulates rules used to guess the possible languages that a word originates from. This is + done by reference to a whole series of rules distributed in resource files. + <p> + Instances of this class are typically managed through the static factory method instance(). + Unless you are developing your own language guessing rules, you will not need to interact with this class directly. + <p> + This class is intended to be immutable and thread-safe. + <p> + <b>Lang resources</b> + <p> + Language guessing rules are typically loaded from resource files. These are UTF-8 encoded text files. + They are systematically named following the pattern: + <blockquote>org/apache/commons/codec/language/bm/lang.txt</blockquote> + The format of these resources is the following: + <ul> + <li><b>Rules:</b> whitespace separated strings. + There should be 3 columns to each row, and these will be interpreted as: + <ol> + <li>pattern: a regular expression.</li> + <li>languages: a '+'-separated list of languages.</li> + <li>acceptOnMatch: 'true' or 'false' indicating if a match rules in or rules out the language.</li> + </ol> + </li> + <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text following on that line to be + discarded as a comment.</li> + <li><b>Multi-line comments:</b> Any line starting with '/*' will start multi-line commenting mode. + This will skip all content until a line ending in '*' and '/' is found.</li> + <li><b>Blank lines:</b> All blank lines will be skipped.</li> + </ul> + <p> + Port of lang.php</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.6</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html#guessLanguage-java.lang.String-">guessLanguage</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code> +<div class="block">Guesses the language of a word.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html#guessLanguages-java.lang.String-">guessLanguages</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input)</code> +<div class="block">Guesses the languages of a word.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html#instance-org.apache.commons.codec.language.bm.NameType-">instance</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType)</code> +<div class="block">Gets a Lang instance for one of the supported NameTypes.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html#loadFromResource-java.lang.String-org.apache.commons.codec.language.bm.Languages-">loadFromResource</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> languageRulesResourceName, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a> languages)</code> +<div class="block">Loads language rules from a resource.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="instance-org.apache.commons.codec.language.bm.NameType-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>instance</h4> +<pre>public static <a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a> instance(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType)</pre> +<div class="block">Gets a Lang instance for one of the supported NameTypes.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>nameType</code> - the NameType to look up</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a Lang encapsulating the language guessing rules for that name type</dd> +</dl> +</li> +</ul> +<a name="loadFromResource-java.lang.String-org.apache.commons.codec.language.bm.Languages-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>loadFromResource</h4> +<pre>public static <a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a> loadFromResource(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> languageRulesResourceName, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a> languages)</pre> +<div class="block">Loads language rules from a resource. + <p> + In normal use, you will obtain instances of Lang through the <a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html#instance-org.apache.commons.codec.language.bm.NameType-"><code>instance(NameType)</code></a> method. + You will only need to call this yourself if you are developing custom language mapping rules.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>languageRulesResourceName</code> - the fully-qualified resource name to load</dd> +<dd><code>languages</code> - the languages that these rules will support</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a Lang encapsulating the loaded language-guessing rules.</dd> +</dl> +</li> +</ul> +<a name="guessLanguage-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>guessLanguage</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> guessLanguage(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre> +<div class="block">Guesses the language of a word.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - the word</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the language that the word originates from or <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html#ANY"><code>Languages.ANY</code></a> if there was no unique match</dd> +</dl> +</li> +</ul> +<a name="guessLanguages-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>guessLanguages</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> guessLanguages(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input)</pre> +<div class="block">Guesses the languages of a word.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>input</code> - the word</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a Set of Strings of language names that are potential matches for the input word</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Lang.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Lang.html" target="_top">Frames</a></li> +<li><a href="Lang.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Languages.LanguageSet.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Languages.LanguageSet.html new file mode 100644 index 0000000000000000000000000000000000000000..602ac6fec862067b85cb6b8b9dfebe29cc9ebbc4 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Languages.LanguageSet.html @@ -0,0 +1,346 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Languages.LanguageSet (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Languages.LanguageSet (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":6,"i1":9,"i2":6,"i3":6,"i4":6,"i5":6}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Languages.LanguageSet.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Languages.LanguageSet.html" target="_top">Frames</a></li> +<li><a href="Languages.LanguageSet.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Class Languages.LanguageSet" class="title">Class Languages.LanguageSet</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.bm.Languages.LanguageSet</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>Direct Known Subclasses:</dt> +<dd><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></dd> +</dl> +<dl> +<dt>Enclosing class:</dt> +<dd><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></dd> +</dl> +<hr> +<br> +<pre>public abstract static class <span class="typeNameLabel">Languages.LanguageSet</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">A set of languages.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#LanguageSet--">LanguageSet</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>abstract boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#contains-java.lang.String-">contains</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> language)</code> </td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#from-java.util.Set-">from</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> langs)</code> </td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>abstract <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#getAny--">getAny</a></span>()</code> </td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>abstract boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#isEmpty--">isEmpty</a></span>()</code> </td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>abstract boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#isSingleton--">isSingleton</a></span>()</code> </td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>abstract <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#restrictTo-org.apache.commons.codec.language.bm.Languages.LanguageSet-">restrictTo</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</code> </td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="LanguageSet--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>LanguageSet</h4> +<pre>public LanguageSet()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="from-java.util.Set-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>from</h4> +<pre>public static <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> from(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> langs)</pre> +</li> +</ul> +<a name="contains-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>contains</h4> +<pre>public abstract boolean contains(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> language)</pre> +</li> +</ul> +<a name="getAny--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getAny</h4> +<pre>public abstract <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getAny()</pre> +</li> +</ul> +<a name="isEmpty--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isEmpty</h4> +<pre>public abstract boolean isEmpty()</pre> +</li> +</ul> +<a name="isSingleton--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isSingleton</h4> +<pre>public abstract boolean isSingleton()</pre> +</li> +</ul> +<a name="restrictTo-org.apache.commons.codec.language.bm.Languages.LanguageSet-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>restrictTo</h4> +<pre>public abstract <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> restrictTo(<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</pre> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Languages.LanguageSet.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Languages.LanguageSet.html" target="_top">Frames</a></li> +<li><a href="Languages.LanguageSet.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Languages.SomeLanguages.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Languages.SomeLanguages.html new file mode 100644 index 0000000000000000000000000000000000000000..bb1349aff68e13b501282f4cce8fe64e3a8b6917 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Languages.SomeLanguages.html @@ -0,0 +1,370 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Languages.SomeLanguages (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Languages.SomeLanguages (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Languages.SomeLanguages.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" target="_top">Frames</a></li> +<li><a href="Languages.SomeLanguages.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Class Languages.SomeLanguages" class="title">Class Languages.SomeLanguages</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm.Languages.LanguageSet</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.bm.Languages.SomeLanguages</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>Enclosing class:</dt> +<dd><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></dd> +</dl> +<hr> +<br> +<pre>public static final class <span class="typeNameLabel">Languages.SomeLanguages</span> +extends <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></pre> +<div class="block">Some languages, explicitly enumerated.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#contains-java.lang.String-">contains</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> language)</code> </td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#getAny--">getAny</a></span>()</code> </td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#getLanguages--">getLanguages</a></span>()</code> </td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#isEmpty--">isEmpty</a></span>()</code> </td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#isSingleton--">isSingleton</a></span>()</code> </td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#merge-org.apache.commons.codec.language.bm.Languages.LanguageSet-">merge</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</code> </td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#restrictTo-org.apache.commons.codec.language.bm.Languages.LanguageSet-">restrictTo</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</code> </td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#toString--">toString</a></span>()</code> </td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.codec.language.bm.Languages.LanguageSet"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></h3> +<code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#from-java.util.Set-">from</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="contains-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>contains</h4> +<pre>public boolean contains(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> language)</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#contains-java.lang.String-">contains</a></code> in class <code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></dd> +</dl> +</li> +</ul> +<a name="getAny--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getAny</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getAny()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#getAny--">getAny</a></code> in class <code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></dd> +</dl> +</li> +</ul> +<a name="getLanguages--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getLanguages</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getLanguages()</pre> +</li> +</ul> +<a name="isEmpty--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isEmpty</h4> +<pre>public boolean isEmpty()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#isEmpty--">isEmpty</a></code> in class <code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></dd> +</dl> +</li> +</ul> +<a name="isSingleton--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isSingleton</h4> +<pre>public boolean isSingleton()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#isSingleton--">isSingleton</a></code> in class <code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></dd> +</dl> +</li> +</ul> +<a name="restrictTo-org.apache.commons.codec.language.bm.Languages.LanguageSet-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>restrictTo</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> restrictTo(<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#restrictTo-org.apache.commons.codec.language.bm.Languages.LanguageSet-">restrictTo</a></code> in class <code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></dd> +</dl> +</li> +</ul> +<a name="merge-org.apache.commons.codec.language.bm.Languages.LanguageSet-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>merge</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> merge(<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</pre> +</li> +</ul> +<a name="toString--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>toString</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Languages.SomeLanguages.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" target="_top">Frames</a></li> +<li><a href="Languages.SomeLanguages.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Languages.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Languages.html new file mode 100644 index 0000000000000000000000000000000000000000..6e3fc9454d393f0b1d63b6e78688848ec8becc15 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Languages.html @@ -0,0 +1,388 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Languages (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Languages (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":9,"i2":10}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Languages.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Languages.html" target="_top">Frames</a></li> +<li><a href="Languages.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li><a href="#nested.class.summary">Nested</a> | </li> +<li><a href="#field.summary">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Class Languages" class="title">Class Languages</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.bm.Languages</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Languages</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Language codes. + <p> + Language codes are typically loaded from resource files. These are UTF-8 + encoded text files. They are systematically named following the pattern: + <blockquote>org/apache/commons/codec/language/bm/${<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html#getName--"><code>NameType.getName()</code></a> + languages.txt</blockquote> + <p> + The format of these resources is the following: + <ul> + <li><b>Language:</b> a single string containing no whitespace</li> + <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text + following on that line to be discarded as a comment.</li> + <li><b>Multi-line comments:</b> Any line starting with '/*' will start + multi-line commenting mode. This will skip all content until a line ending in + '*' and '/' is found.</li> + <li><b>Blank lines:</b> All blank lines will be skipped.</li> + </ul> + <p> + Ported from language.php + <p> + This class is immutable and thread-safe.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.6</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== NESTED CLASS SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="nested.class.summary"> +<!-- --> +</a> +<h3>Nested Class Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> +<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></span></code> +<div class="block">A set of languages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></span></code> +<div class="block">Some languages, explicitly enumerated.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html#ANY">ANY</a></span></code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html#ANY_LANGUAGE">ANY_LANGUAGE</a></span></code> +<div class="block">Any/all languages.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html#NO_LANGUAGES">NO_LANGUAGES</a></span></code> +<div class="block">No languages at all.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html#getInstance-org.apache.commons.codec.language.bm.NameType-">getInstance</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType)</code> </td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html#getInstance-java.lang.String-">getInstance</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> languagesResourceName)</code> </td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html#getLanguages--">getLanguages</a></span>()</code> </td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="ANY"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>ANY</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ANY</pre> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../../constant-values.html#org.apache.commons.codec.language.bm.Languages.ANY">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="NO_LANGUAGES"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>NO_LANGUAGES</h4> +<pre>public static final <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> NO_LANGUAGES</pre> +<div class="block">No languages at all.</div> +</li> +</ul> +<a name="ANY_LANGUAGE"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>ANY_LANGUAGE</h4> +<pre>public static final <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> ANY_LANGUAGE</pre> +<div class="block">Any/all languages.</div> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="getInstance-org.apache.commons.codec.language.bm.NameType-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInstance</h4> +<pre>public static <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a> getInstance(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType)</pre> +</li> +</ul> +<a name="getInstance-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInstance</h4> +<pre>public static <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a> getInstance(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> languagesResourceName)</pre> +</li> +</ul> +<a name="getLanguages--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getLanguages</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getLanguages()</pre> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Languages.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Languages.html" target="_top">Frames</a></li> +<li><a href="Languages.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li><a href="#nested.class.summary">Nested</a> | </li> +<li><a href="#field.summary">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/NameType.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/NameType.html new file mode 100644 index 0000000000000000000000000000000000000000..103d1e8135ce7dc6c32d7d8aebc8bd10bcb7eb69 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/NameType.html @@ -0,0 +1,390 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>NameType (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="NameType (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":9,"i2":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/NameType.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/NameType.html" target="_top">Frames</a></li> +<li><a href="NameType.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#enum.constant.summary">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#enum.constant.detail">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Enum NameType" class="title">Enum NameType</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">java.lang.Enum</a><<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a>></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.bm.NameType</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a>></dd> +</dl> +<hr> +<br> +<pre>public enum <span class="typeNameLabel">NameType</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a><<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a>></pre> +<div class="block">Supported types of names. Unless you are matching particular family names, use <a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html#GENERIC"><code>GENERIC</code></a>. The + <code>GENERIC</code> NameType should work reasonably well for non-name words. The other encodings are + specifically tuned to family names, and may not work well at all for general text.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.6</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== ENUM CONSTANT SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="enum.constant.summary"> +<!-- --> +</a> +<h3>Enum Constant Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Constant Summary table, listing enum constants, and an explanation"> +<caption><span>Enum Constants</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Enum Constant and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html#ASHKENAZI">ASHKENAZI</a></span></code> +<div class="block">Ashkenazi family names</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html#GENERIC">GENERIC</a></span></code> +<div class="block">Generic names and words</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html#SEPHARDIC">SEPHARDIC</a></span></code> +<div class="block">Sephardic family names</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html#getName--">getName</a></span>()</code> +<div class="block">Gets the short version of the name type.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html#valueOf-java.lang.String-">valueOf</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html#values--">values</a></span>()</code> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Enum"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#compareTo-E-" title="class or interface in java.lang">compareTo</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang">getDeclaringClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#name--" title="class or interface in java.lang">name</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#ordinal--" title="class or interface in java.lang">ordinal</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#valueOf-java.lang.Class-java.lang.String-" title="class or interface in java.lang">valueOf</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ ENUM CONSTANT DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="enum.constant.detail"> +<!-- --> +</a> +<h3>Enum Constant Detail</h3> +<a name="ASHKENAZI"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>ASHKENAZI</h4> +<pre>public static final <a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> ASHKENAZI</pre> +<div class="block">Ashkenazi family names</div> +</li> +</ul> +<a name="GENERIC"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>GENERIC</h4> +<pre>public static final <a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> GENERIC</pre> +<div class="block">Generic names and words</div> +</li> +</ul> +<a name="SEPHARDIC"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>SEPHARDIC</h4> +<pre>public static final <a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> SEPHARDIC</pre> +<div class="block">Sephardic family names</div> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="values--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>values</h4> +<pre>public static <a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a>[] values()</pre> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +<pre> +for (NameType c : NameType.values()) + System.out.println(c); +</pre></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>an array containing the constants of this enum type, in the order they are declared</dd> +</dl> +</li> +</ul> +<a name="valueOf-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>valueOf</h4> +<pre>public static <a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> valueOf(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Returns the enum constant of this type with the specified name. +The string must match <i>exactly</i> an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - the name of the enum constant to be returned.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the enum constant with the specified name</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if this enum type has no constant with the specified name</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the argument is null</dd> +</dl> +</li> +</ul> +<a name="getName--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getName</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getName()</pre> +<div class="block">Gets the short version of the name type.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the NameType short string</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/NameType.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/NameType.html" target="_top">Frames</a></li> +<li><a href="NameType.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#enum.constant.summary">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#enum.constant.detail">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/PhoneticEngine.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/PhoneticEngine.html new file mode 100644 index 0000000000000000000000000000000000000000..22573b1aa6935bac423c9a571303c375534d869b --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/PhoneticEngine.html @@ -0,0 +1,468 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>PhoneticEngine (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="PhoneticEngine (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/PhoneticEngine.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/PhoneticEngine.html" target="_top">Frames</a></li> +<li><a href="PhoneticEngine.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Class PhoneticEngine" class="title">Class PhoneticEngine</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.bm.PhoneticEngine</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">PhoneticEngine</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">Converts words into potential phonetic representations. + <p> + This is a two-stage process. Firstly, the word is converted into a phonetic representation that takes + into account the likely source language. Next, this phonetic representation is converted into a + pan-European 'average' representation, allowing comparison between different versions of essentially + the same word from different languages. + <p> + This class is intentionally immutable and thread-safe. + If you wish to alter the settings for a PhoneticEngine, you + must make a new one with the updated settings. + <p> + Ported from phoneticengine.php</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.6</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#PhoneticEngine-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-boolean-">PhoneticEngine</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> ruleType, + boolean concat)</code> +<div class="block">Generates a new, fully-configured phonetic engine.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#PhoneticEngine-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-boolean-int-">PhoneticEngine</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> ruleType, + boolean concat, + int maxPhonemes)</code> +<div class="block">Generates a new, fully-configured phonetic engine.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input)</code> +<div class="block">Encodes a string to its phonetic representation.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#encode-java.lang.String-org.apache.commons.codec.language.bm.Languages.LanguageSet-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> languageSet)</code> +<div class="block">Encodes an input string into an output phonetic representation, given a set of possible origin languages.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#getLang--">getLang</a></span>()</code> +<div class="block">Gets the Lang language guessing rules being used.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#getMaxPhonemes--">getMaxPhonemes</a></span>()</code> +<div class="block">Gets the maximum number of phonemes the engine will calculate for a given input.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#getNameType--">getNameType</a></span>()</code> +<div class="block">Gets the NameType being used.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#getRuleType--">getRuleType</a></span>()</code> +<div class="block">Gets the RuleType being used.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#isConcat--">isConcat</a></span>()</code> +<div class="block">Gets if multiple phonetic encodings are concatenated or if just the first one is kept.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="PhoneticEngine-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>PhoneticEngine</h4> +<pre>public PhoneticEngine(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> ruleType, + boolean concat)</pre> +<div class="block">Generates a new, fully-configured phonetic engine.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>nameType</code> - the type of names it will use</dd> +<dd><code>ruleType</code> - the type of rules it will apply</dd> +<dd><code>concat</code> - if it will concatenate multiple encodings</dd> +</dl> +</li> +</ul> +<a name="PhoneticEngine-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-boolean-int-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>PhoneticEngine</h4> +<pre>public PhoneticEngine(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> ruleType, + boolean concat, + int maxPhonemes)</pre> +<div class="block">Generates a new, fully-configured phonetic engine.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>nameType</code> - the type of names it will use</dd> +<dd><code>ruleType</code> - the type of rules it will apply</dd> +<dd><code>concat</code> - if it will concatenate multiple encodings</dd> +<dd><code>maxPhonemes</code> - the maximum number of phonemes that will be handled</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input)</pre> +<div class="block">Encodes a string to its phonetic representation.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>input</code> - the String to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the encoding of the input</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-org.apache.commons.codec.language.bm.Languages.LanguageSet-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> languageSet)</pre> +<div class="block">Encodes an input string into an output phonetic representation, given a set of possible origin languages.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>input</code> - String to phoneticise; a String with dashes or spaces separating each word</dd> +<dd><code>languageSet</code> - set of possible origin languages</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a phonetic representation of the input; a String containing '-'-separated phonetic representations of the + input</dd> +</dl> +</li> +</ul> +<a name="getLang--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getLang</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a> getLang()</pre> +<div class="block">Gets the Lang language guessing rules being used.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the Lang in use</dd> +</dl> +</li> +</ul> +<a name="getNameType--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getNameType</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> getNameType()</pre> +<div class="block">Gets the NameType being used.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the NameType in use</dd> +</dl> +</li> +</ul> +<a name="getRuleType--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getRuleType</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> getRuleType()</pre> +<div class="block">Gets the RuleType being used.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the RuleType in use</dd> +</dl> +</li> +</ul> +<a name="isConcat--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isConcat</h4> +<pre>public boolean isConcat()</pre> +<div class="block">Gets if multiple phonetic encodings are concatenated or if just the first one is kept.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true if multiple phonetic encodings are returned, false if just the first is</dd> +</dl> +</li> +</ul> +<a name="getMaxPhonemes--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getMaxPhonemes</h4> +<pre>public int getMaxPhonemes()</pre> +<div class="block">Gets the maximum number of phonemes the engine will calculate for a given input.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the maximum number of phonemes</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/PhoneticEngine.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/PhoneticEngine.html" target="_top">Frames</a></li> +<li><a href="PhoneticEngine.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.Phoneme.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.Phoneme.html new file mode 100644 index 0000000000000000000000000000000000000000..8fa7ff12f6c3592d67506f64a93903db7ae9ae62 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.Phoneme.html @@ -0,0 +1,459 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Rule.Phoneme (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Rule.Phoneme (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":42,"i5":10,"i6":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Rule.Phoneme.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Rule.Phoneme.html" target="_top">Frames</a></li> +<li><a href="Rule.Phoneme.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Class Rule.Phoneme" class="title">Class Rule.Phoneme</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.bm.Rule.Phoneme</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></dd> +</dl> +<dl> +<dt>Enclosing class:</dt> +<dd><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dd> +</dl> +<hr> +<br> +<pre>public static final class <span class="typeNameLabel">Rule.Phoneme</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></pre> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#COMPARATOR">COMPARATOR</a></span></code> </td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#Phoneme-java.lang.CharSequence-org.apache.commons.codec.language.bm.Languages.LanguageSet-">Phoneme</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> phonemeText, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> languages)</code> </td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-">Phoneme</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeLeft, + <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeRight)</code> </td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Languages.LanguageSet-">Phoneme</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeLeft, + <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeRight, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> languages)</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#append-java.lang.CharSequence-">append</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> str)</code> </td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#getLanguages--">getLanguages</a></span>()</code> </td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#getPhonemes--">getPhonemes</a></span>()</code> </td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#getPhonemeText--">getPhonemeText</a></span>()</code> </td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#join-org.apache.commons.codec.language.bm.Rule.Phoneme-">join</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> right)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">since 1.9</span></div> +</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#mergeWithLanguage-org.apache.commons.codec.language.bm.Languages.LanguageSet-">mergeWithLanguage</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> lang)</code> +<div class="block">Returns a new Phoneme with the same text but a union of its + current language set and the given one.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#toString--">toString</a></span>()</code> </td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="COMPARATOR"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>COMPARATOR</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>> COMPARATOR</pre> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Phoneme-java.lang.CharSequence-org.apache.commons.codec.language.bm.Languages.LanguageSet-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Phoneme</h4> +<pre>public Phoneme(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> phonemeText, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> languages)</pre> +</li> +</ul> +<a name="Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>Phoneme</h4> +<pre>public Phoneme(<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeLeft, + <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeRight)</pre> +</li> +</ul> +<a name="Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Languages.LanguageSet-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Phoneme</h4> +<pre>public Phoneme(<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeLeft, + <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeRight, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> languages)</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="append-java.lang.CharSequence-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>append</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> append(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> str)</pre> +</li> +</ul> +<a name="getLanguages--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getLanguages</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> getLanguages()</pre> +</li> +</ul> +<a name="getPhonemes--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getPhonemes</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>> getPhonemes()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html#getPhonemes--">getPhonemes</a></code> in interface <code><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></code></dd> +</dl> +</li> +</ul> +<a name="getPhonemeText--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getPhonemeText</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> getPhonemeText()</pre> +</li> +</ul> +<a name="join-org.apache.commons.codec.language.bm.Rule.Phoneme-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>join</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> join(<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> right)</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">since 1.9</span></div> +<div class="block">Deprecated since 1.9.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>right</code> - the Phoneme to join</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a new Phoneme</dd> +</dl> +</li> +</ul> +<a name="mergeWithLanguage-org.apache.commons.codec.language.bm.Languages.LanguageSet-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>mergeWithLanguage</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> mergeWithLanguage(<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> lang)</pre> +<div class="block">Returns a new Phoneme with the same text but a union of its + current language set and the given one.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>lang</code> - the language set to merge</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a new Phoneme</dd> +</dl> +</li> +</ul> +<a name="toString--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>toString</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Overrides:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Rule.Phoneme.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Rule.Phoneme.html" target="_top">Frames</a></li> +<li><a href="Rule.Phoneme.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html new file mode 100644 index 0000000000000000000000000000000000000000..2cf01778ca43cc325e5e5af08d209ae6c32f4abc --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html @@ -0,0 +1,230 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Rule.PhonemeExpr (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Rule.PhonemeExpr (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":6}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Rule.PhonemeExpr.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" target="_top">Frames</a></li> +<li><a href="Rule.PhonemeExpr.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Interface Rule.PhonemeExpr" class="title">Interface Rule.PhonemeExpr</h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Known Implementing Classes:</dt> +<dd><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>, <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm">Rule.PhonemeList</a></dd> +</dl> +<dl> +<dt>Enclosing class:</dt> +<dd><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dd> +</dl> +<hr> +<br> +<pre>public static interface <span class="typeNameLabel">Rule.PhonemeExpr</span></pre> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html#getPhonemes--">getPhonemes</a></span>()</code> </td> +</tr> +</table> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="getPhonemes--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getPhonemes</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>> getPhonemes()</pre> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Rule.PhonemeExpr.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" target="_top">Frames</a></li> +<li><a href="Rule.PhonemeExpr.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.PhonemeList.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.PhonemeList.html new file mode 100644 index 0000000000000000000000000000000000000000..ef214e892606ac5b317450b8e6e61209788343dd --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.PhonemeList.html @@ -0,0 +1,285 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Rule.PhonemeList (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Rule.PhonemeList (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Rule.PhonemeList.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Rule.PhonemeList.html" target="_top">Frames</a></li> +<li><a href="Rule.PhonemeList.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Class Rule.PhonemeList" class="title">Class Rule.PhonemeList</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.bm.Rule.PhonemeList</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></dd> +</dl> +<dl> +<dt>Enclosing class:</dt> +<dd><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dd> +</dl> +<hr> +<br> +<pre>public static final class <span class="typeNameLabel">Rule.PhonemeList</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></pre> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html#PhonemeList-java.util.List-">PhonemeList</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>> phonemes)</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html#getPhonemes--">getPhonemes</a></span>()</code> </td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="PhonemeList-java.util.List-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>PhonemeList</h4> +<pre>public PhonemeList(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>> phonemes)</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="getPhonemes--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getPhonemes</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>> getPhonemes()</pre> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html#getPhonemes--">getPhonemes</a></code> in interface <code><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></code></dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Rule.PhonemeList.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Rule.PhonemeList.html" target="_top">Frames</a></li> +<li><a href="Rule.PhonemeList.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.RPattern.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.RPattern.html new file mode 100644 index 0000000000000000000000000000000000000000..07a40b9881e2bcd9f87c7d9a56891fffd1bbe090 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.RPattern.html @@ -0,0 +1,227 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Rule.RPattern (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Rule.RPattern (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":6}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Rule.RPattern.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Rule.RPattern.html" target="_top">Frames</a></li> +<li><a href="Rule.RPattern.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Interface Rule.RPattern" class="title">Interface Rule.RPattern</h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>Enclosing class:</dt> +<dd><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></dd> +</dl> +<hr> +<br> +<pre>public static interface <span class="typeNameLabel">Rule.RPattern</span></pre> +<div class="block">A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations.</div> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html#isMatch-java.lang.CharSequence-">isMatch</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> input)</code> </td> +</tr> +</table> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="isMatch-java.lang.CharSequence-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>isMatch</h4> +<pre>boolean isMatch(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> input)</pre> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Rule.RPattern.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Rule.RPattern.html" target="_top">Frames</a></li> +<li><a href="Rule.RPattern.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.html new file mode 100644 index 0000000000000000000000000000000000000000..0d1e4699aadecc9a3599387969a8652a6d319664 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/Rule.html @@ -0,0 +1,628 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Rule (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Rule (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Rule.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Rule.html" target="_top">Frames</a></li> +<li><a href="Rule.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li><a href="#nested.class.summary">Nested</a> | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Class Rule" class="title">Class Rule</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.bm.Rule</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<hr> +<br> +<pre>public class <span class="typeNameLabel">Rule</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> +<div class="block">A phoneme rule. + <p> + Rules have a pattern, left context, right context, output phoneme, set of languages for which they apply + and a logical flag indicating if all languages must be in play. A rule matches if: + <ul> + <li>the pattern matches at the current position</li> + <li>the string up until the beginning of the pattern matches the left context</li> + <li>the string from the end of the pattern matches the right context</li> + <li>logical is ALL and all languages are in scope; or</li> + <li>logical is any other value and at least one language is in scope</li> + </ul> + <p> + Rules are typically generated by parsing rules resources. In normal use, there will be no need for the user + to explicitly construct their own. + <p> + Rules are immutable and thread-safe. + <p> + <b>Rules resources</b> + <p> + Rules are typically loaded from resource files. These are UTF-8 encoded text files. They are systematically + named following the pattern: + <blockquote>org/apache/commons/codec/language/bm/${NameType#getName}_${RuleType#getName}_${language}.txt</blockquote> + <p> + The format of these resources is the following: + <ul> + <li><b>Rules:</b> whitespace separated, double-quoted strings. There should be 4 columns to each row, and these + will be interpreted as: + <ol> + <li>pattern</li> + <li>left context</li> + <li>right context</li> + <li>phoneme</li> + </ol> + </li> + <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text following on that line to be discarded + as a comment.</li> + <li><b>Multi-line comments:</b> Any line starting with '/*' will start multi-line commenting mode. This will skip + all content until a line ending in '*' and '/' is found.</li> + <li><b>Blank lines:</b> All blank lines will be skipped.</li> + </ul></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.6</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== NESTED CLASS SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="nested.class.summary"> +<!-- --> +</a> +<h3>Nested Class Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> +<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></span></code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static interface </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></span></code> </td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm">Rule.PhonemeList</a></span></code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static interface </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></span></code> +<div class="block">A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#ALL">ALL</a></span></code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#ALL_STRINGS_RMATCHER">ALL_STRINGS_RMATCHER</a></span></code> </td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#Rule-java.lang.String-java.lang.String-java.lang.String-org.apache.commons.codec.language.bm.Rule.PhonemeExpr-">Rule</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pattern, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lContext, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> rContext, + <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a> phoneme)</code> +<div class="block">Creates a new rule.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstance</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</code> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-">getInstance</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lang)</code> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstanceMap</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</code> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-">getInstanceMap</a></span>(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lang)</code> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#getLContext--">getLContext</a></span>()</code> +<div class="block">Gets the left context.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#getPattern--">getPattern</a></span>()</code> +<div class="block">Gets the pattern.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#getPhoneme--">getPhoneme</a></span>()</code> +<div class="block">Gets the phoneme.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#getRContext--">getRContext</a></span>()</code> +<div class="block">Gets the right context.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html#patternAndContextMatches-java.lang.CharSequence-int-">patternAndContextMatches</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> input, + int i)</code> +<div class="block">Decides if the pattern and context match the input starting at a position.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="ALL_STRINGS_RMATCHER"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>ALL_STRINGS_RMATCHER</h4> +<pre>public static final <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a> ALL_STRINGS_RMATCHER</pre> +</li> +</ul> +<a name="ALL"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>ALL</h4> +<pre>public static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ALL</pre> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../../constant-values.html#org.apache.commons.codec.language.bm.Rule.ALL">Constant Field Values</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Rule-java.lang.String-java.lang.String-java.lang.String-org.apache.commons.codec.language.bm.Rule.PhonemeExpr-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Rule</h4> +<pre>public Rule(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pattern, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lContext, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> rContext, + <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a> phoneme)</pre> +<div class="block">Creates a new rule.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>pattern</code> - the pattern</dd> +<dd><code>lContext</code> - the left context</dd> +<dd><code>rContext</code> - the right context</dd> +<dd><code>phoneme</code> - the resulting phoneme</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInstance</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>> getInstance(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</pre> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>nameType</code> - the NameType to consider</dd> +<dd><code>rt</code> - the RuleType to consider</dd> +<dd><code>langs</code> - the set of languages to consider</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a list of Rules that apply</dd> +</dl> +</li> +</ul> +<a name="getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInstance</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>> getInstance(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lang)</pre> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>nameType</code> - the NameType to consider</dd> +<dd><code>rt</code> - the RuleType to consider</dd> +<dd><code>lang</code> - the language to consider</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a list of Rules that apply</dd> +</dl> +</li> +</ul> +<a name="getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInstanceMap</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>>> getInstanceMap(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</pre> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>nameType</code> - the NameType to consider</dd> +<dd><code>rt</code> - the RuleType to consider</dd> +<dd><code>langs</code> - the set of languages to consider</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a map containing all Rules that apply, grouped by the first character of the rule pattern</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.9</dd> +</dl> +</li> +</ul> +<a name="getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInstanceMap</h4> +<pre>public static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>>> getInstanceMap(<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lang)</pre> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>nameType</code> - the NameType to consider</dd> +<dd><code>rt</code> - the RuleType to consider</dd> +<dd><code>lang</code> - the language to consider</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a map containing all Rules that apply, grouped by the first character of the rule pattern</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.9</dd> +</dl> +</li> +</ul> +<a name="getLContext--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getLContext</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a> getLContext()</pre> +<div class="block">Gets the left context. This is a regular expression that must match to the left of the pattern.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the left context Pattern</dd> +</dl> +</li> +</ul> +<a name="getPattern--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getPattern</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getPattern()</pre> +<div class="block">Gets the pattern. This is a string-literal that must exactly match.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the pattern</dd> +</dl> +</li> +</ul> +<a name="getPhoneme--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getPhoneme</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a> getPhoneme()</pre> +<div class="block">Gets the phoneme. If the rule matches, this is the phoneme associated with the pattern match.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the phoneme</dd> +</dl> +</li> +</ul> +<a name="getRContext--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getRContext</h4> +<pre>public <a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a> getRContext()</pre> +<div class="block">Gets the right context. This is a regular expression that must match to the right of the pattern.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the right context Pattern</dd> +</dl> +</li> +</ul> +<a name="patternAndContextMatches-java.lang.CharSequence-int-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>patternAndContextMatches</h4> +<pre>public boolean patternAndContextMatches(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> input, + int i)</pre> +<div class="block">Decides if the pattern and context match the input starting at a position. It is a match if the + <code>lContext</code> matches <code>input</code> up to <code>i</code>, <code>pattern</code> matches at i and + <code>rContext</code> matches from the end of the match of <code>pattern</code> to the end of <code>input</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>input</code> - the input String</dd> +<dd><code>i</code> - the int position within the input</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true if the pattern and left/right context match, false otherwise</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/Rule.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/Rule.html" target="_top">Frames</a></li> +<li><a href="Rule.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li><a href="#nested.class.summary">Nested</a> | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/RuleType.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/RuleType.html new file mode 100644 index 0000000000000000000000000000000000000000..52a54e891beade52e6251d217b4a9690195d6be0 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/RuleType.html @@ -0,0 +1,388 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>RuleType (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="RuleType (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":9,"i2":9}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/RuleType.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/RuleType.html" target="_top">Frames</a></li> +<li><a href="RuleType.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#enum.constant.summary">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#enum.constant.detail">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.language.bm</div> +<h2 title="Enum RuleType" class="title">Enum RuleType</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">java.lang.Enum</a><<a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a>></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.language.bm.RuleType</li> +</ul> +</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a>></dd> +</dl> +<hr> +<br> +<pre>public enum <span class="typeNameLabel">RuleType</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a><<a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a>></pre> +<div class="block">Types of rule.</div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.6</dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== ENUM CONSTANT SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="enum.constant.summary"> +<!-- --> +</a> +<h3>Enum Constant Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Constant Summary table, listing enum constants, and an explanation"> +<caption><span>Enum Constants</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Enum Constant and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html#APPROX">APPROX</a></span></code> +<div class="block">Approximate rules, which will lead to the largest number of phonetic interpretations.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html#EXACT">EXACT</a></span></code> +<div class="block">Exact rules, which will lead to a minimum number of phonetic interpretations.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html#RULES">RULES</a></span></code> +<div class="block">For internal use only.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html#getName--">getName</a></span>()</code> +<div class="block">Gets the rule name.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html#valueOf-java.lang.String-">valueOf</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html#values--">values</a></span>()</code> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Enum"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#compareTo-E-" title="class or interface in java.lang">compareTo</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang">getDeclaringClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#name--" title="class or interface in java.lang">name</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#ordinal--" title="class or interface in java.lang">ordinal</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#valueOf-java.lang.Class-java.lang.String-" title="class or interface in java.lang">valueOf</a></code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ ENUM CONSTANT DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="enum.constant.detail"> +<!-- --> +</a> +<h3>Enum Constant Detail</h3> +<a name="APPROX"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>APPROX</h4> +<pre>public static final <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> APPROX</pre> +<div class="block">Approximate rules, which will lead to the largest number of phonetic interpretations.</div> +</li> +</ul> +<a name="EXACT"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>EXACT</h4> +<pre>public static final <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> EXACT</pre> +<div class="block">Exact rules, which will lead to a minimum number of phonetic interpretations.</div> +</li> +</ul> +<a name="RULES"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>RULES</h4> +<pre>public static final <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> RULES</pre> +<div class="block">For internal use only. Please use <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html#APPROX"><code>APPROX</code></a> or <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html#EXACT"><code>EXACT</code></a>.</div> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="values--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>values</h4> +<pre>public static <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a>[] values()</pre> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +<pre> +for (RuleType c : RuleType.values()) + System.out.println(c); +</pre></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>an array containing the constants of this enum type, in the order they are declared</dd> +</dl> +</li> +</ul> +<a name="valueOf-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>valueOf</h4> +<pre>public static <a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> valueOf(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> +<div class="block">Returns the enum constant of this type with the specified name. +The string must match <i>exactly</i> an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>name</code> - the name of the enum constant to be returned.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the enum constant with the specified name</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if this enum type has no constant with the specified name</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the argument is null</dd> +</dl> +</li> +</ul> +<a name="getName--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getName</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getName()</pre> +<div class="block">Gets the rule name.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the rule name.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/RuleType.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/RuleType.html" target="_top">Frames</a></li> +<li><a href="RuleType.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#enum.constant.summary">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#enum.constant.detail">Enum Constants</a> | </li> +<li>Field | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/BeiderMorseEncoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/BeiderMorseEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..c2343abf6af06ba31aeee5b048596277ae93f53d --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/BeiderMorseEncoder.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.bm.BeiderMorseEncoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.bm.BeiderMorseEncoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/BeiderMorseEncoder.html" target="_top">Frames</a></li> +<li><a href="BeiderMorseEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.bm.BeiderMorseEncoder" class="title">Uses of Class<br>org.apache.commons.codec.language.bm.BeiderMorseEncoder</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.bm.BeiderMorseEncoder</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/BeiderMorseEncoder.html" target="_top">Frames</a></li> +<li><a href="BeiderMorseEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Lang.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Lang.html new file mode 100644 index 0000000000000000000000000000000000000000..1ec5c73a4d1fa408aac484b311a6a4ecfbd0d8ec --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Lang.html @@ -0,0 +1,182 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.bm.Lang (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.bm.Lang (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Lang.html" target="_top">Frames</a></li> +<li><a href="Lang.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.bm.Lang" class="title">Uses of Class<br>org.apache.commons.codec.language.bm.Lang</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a> in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that return <a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></code></td> +<td class="colLast"><span class="typeNameLabel">PhoneticEngine.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#getLang--">getLang</a></span>()</code> +<div class="block">Gets the Lang language guessing rules being used.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></code></td> +<td class="colLast"><span class="typeNameLabel">Lang.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html#instance-org.apache.commons.codec.language.bm.NameType-">instance</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType)</code> +<div class="block">Gets a Lang instance for one of the supported NameTypes.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></code></td> +<td class="colLast"><span class="typeNameLabel">Lang.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html#loadFromResource-java.lang.String-org.apache.commons.codec.language.bm.Languages-">loadFromResource</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> languageRulesResourceName, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a> languages)</code> +<div class="block">Loads language rules from a resource.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Lang.html" target="_top">Frames</a></li> +<li><a href="Lang.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Languages.LanguageSet.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Languages.LanguageSet.html new file mode 100644 index 0000000000000000000000000000000000000000..90fdf8cab5b9365d4d691ef979100e355ed202ca --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Languages.LanguageSet.html @@ -0,0 +1,293 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.bm.Languages.LanguageSet (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.bm.Languages.LanguageSet (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Languages.LanguageSet.html" target="_top">Frames</a></li> +<li><a href="Languages.LanguageSet.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.bm.Languages.LanguageSet" class="title">Uses of Class<br>org.apache.commons.codec.language.bm.Languages.LanguageSet</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation"> +<caption><span>Subclasses of <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></span></code> +<div class="block">Some languages, explicitly enumerated.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> +<caption><span>Fields in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> declared as <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html#ANY_LANGUAGE">ANY_LANGUAGE</a></span></code> +<div class="block">Any/all languages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html#NO_LANGUAGES">NO_LANGUAGES</a></span></code> +<div class="block">No languages at all.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that return <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.LanguageSet.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#from-java.util.Set-">from</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> langs)</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.Phoneme.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#getLanguages--">getLanguages</a></span>()</code> </td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><span class="typeNameLabel">Lang.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html#guessLanguages-java.lang.String-">guessLanguages</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input)</code> +<div class="block">Guesses the languages of a word.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.SomeLanguages.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#merge-org.apache.commons.codec.language.bm.Languages.LanguageSet-">merge</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</code> </td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>abstract <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.LanguageSet.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#restrictTo-org.apache.commons.codec.language.bm.Languages.LanguageSet-">restrictTo</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.SomeLanguages.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#restrictTo-org.apache.commons.codec.language.bm.Languages.LanguageSet-">restrictTo</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</code> </td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with parameters of type <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><span class="typeNameLabel">PhoneticEngine.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#encode-java.lang.String-org.apache.commons.codec.language.bm.Languages.LanguageSet-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> languageSet)</code> +<div class="block">Encodes an input string into an output phonetic representation, given a set of possible origin languages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstance</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</code> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstanceMap</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</code> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.SomeLanguages.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#merge-org.apache.commons.codec.language.bm.Languages.LanguageSet-">merge</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</code> </td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.Phoneme.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#mergeWithLanguage-org.apache.commons.codec.language.bm.Languages.LanguageSet-">mergeWithLanguage</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> lang)</code> +<div class="block">Returns a new Phoneme with the same text but a union of its + current language set and the given one.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>abstract <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.LanguageSet.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html#restrictTo-org.apache.commons.codec.language.bm.Languages.LanguageSet-">restrictTo</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</code> </td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.SomeLanguages.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html#restrictTo-org.apache.commons.codec.language.bm.Languages.LanguageSet-">restrictTo</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> other)</code> </td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> +<caption><span>Constructors in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with parameters of type <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#Phoneme-java.lang.CharSequence-org.apache.commons.codec.language.bm.Languages.LanguageSet-">Phoneme</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> phonemeText, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> languages)</code> </td> +</tr> +<tr class="rowColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Languages.LanguageSet-">Phoneme</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeLeft, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeRight, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> languages)</code> </td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Languages.LanguageSet.html" target="_top">Frames</a></li> +<li><a href="Languages.LanguageSet.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Languages.SomeLanguages.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Languages.SomeLanguages.html new file mode 100644 index 0000000000000000000000000000000000000000..6e934c306807908f57ba6ceb26681ca3e0657701 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Languages.SomeLanguages.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.bm.Languages.SomeLanguages (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.bm.Languages.SomeLanguages (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Languages.SomeLanguages.html" target="_top">Frames</a></li> +<li><a href="Languages.SomeLanguages.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.bm.Languages.SomeLanguages" class="title">Uses of Class<br>org.apache.commons.codec.language.bm.Languages.SomeLanguages</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.bm.Languages.SomeLanguages</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Languages.SomeLanguages.html" target="_top">Frames</a></li> +<li><a href="Languages.SomeLanguages.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Languages.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Languages.html new file mode 100644 index 0000000000000000000000000000000000000000..8eb0aefef17add9131aa8b0bb85f1de72c87b6d6 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Languages.html @@ -0,0 +1,187 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.bm.Languages (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.bm.Languages (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Languages.html" target="_top">Frames</a></li> +<li><a href="Languages.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.bm.Languages" class="title">Uses of Class<br>org.apache.commons.codec.language.bm.Languages</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a> in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that return <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html#getInstance-org.apache.commons.codec.language.bm.NameType-">getInstance</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType)</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html#getInstance-java.lang.String-">getInstance</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> languagesResourceName)</code> </td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with parameters of type <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></code></td> +<td class="colLast"><span class="typeNameLabel">Lang.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html#loadFromResource-java.lang.String-org.apache.commons.codec.language.bm.Languages-">loadFromResource</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> languageRulesResourceName, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a> languages)</code> +<div class="block">Loads language rules from a resource.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Languages.html" target="_top">Frames</a></li> +<li><a href="Languages.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/NameType.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/NameType.html new file mode 100644 index 0000000000000000000000000000000000000000..846ae00a3335a0b5d6c516d789d12e35f754f4ce --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/NameType.html @@ -0,0 +1,268 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.bm.NameType (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.bm.NameType (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/NameType.html" target="_top">Frames</a></li> +<li><a href="NameType.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.bm.NameType" class="title">Uses of Class<br>org.apache.commons.codec.language.bm.NameType</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that return <a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></code></td> +<td class="colLast"><span class="typeNameLabel">BeiderMorseEncoder.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#getNameType--">getNameType</a></span>()</code> +<div class="block">Gets the name type currently in operation.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></code></td> +<td class="colLast"><span class="typeNameLabel">PhoneticEngine.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#getNameType--">getNameType</a></span>()</code> +<div class="block">Gets the NameType being used.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></code></td> +<td class="colLast"><span class="typeNameLabel">NameType.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html#valueOf-java.lang.String-">valueOf</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a>[]</code></td> +<td class="colLast"><span class="typeNameLabel">NameType.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html#values--">values</a></span>()</code> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with parameters of type <a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></code></td> +<td class="colLast"><span class="typeNameLabel">Languages.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.html#getInstance-org.apache.commons.codec.language.bm.NameType-">getInstance</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType)</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstance</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</code> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-">getInstance</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lang)</code> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstanceMap</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</code> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-">getInstanceMap</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lang)</code> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></code></td> +<td class="colLast"><span class="typeNameLabel">Lang.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Lang.html#instance-org.apache.commons.codec.language.bm.NameType-">instance</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType)</code> +<div class="block">Gets a Lang instance for one of the supported NameTypes.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><span class="typeNameLabel">BeiderMorseEncoder.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#setNameType-org.apache.commons.codec.language.bm.NameType-">setNameType</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType)</code> +<div class="block">Sets the type of name.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> +<caption><span>Constructors in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with parameters of type <a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#PhoneticEngine-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-boolean-">PhoneticEngine</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> ruleType, + boolean concat)</code> +<div class="block">Generates a new, fully-configured phonetic engine.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#PhoneticEngine-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-boolean-int-">PhoneticEngine</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> ruleType, + boolean concat, + int maxPhonemes)</code> +<div class="block">Generates a new, fully-configured phonetic engine.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/NameType.html" target="_top">Frames</a></li> +<li><a href="NameType.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/PhoneticEngine.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/PhoneticEngine.html new file mode 100644 index 0000000000000000000000000000000000000000..a8f54aa91c56028c21dcd370b392613c0d85bcb9 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/PhoneticEngine.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.bm.PhoneticEngine (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.bm.PhoneticEngine (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/PhoneticEngine.html" target="_top">Frames</a></li> +<li><a href="PhoneticEngine.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.bm.PhoneticEngine" class="title">Uses of Class<br>org.apache.commons.codec.language.bm.PhoneticEngine</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.bm.PhoneticEngine</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/PhoneticEngine.html" target="_top">Frames</a></li> +<li><a href="PhoneticEngine.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.Phoneme.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.Phoneme.html new file mode 100644 index 0000000000000000000000000000000000000000..549607a09482b1166530d34dffe8c3309fe5bdff --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.Phoneme.html @@ -0,0 +1,261 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.bm.Rule.Phoneme (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.bm.Rule.Phoneme (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Rule.Phoneme.html" target="_top">Frames</a></li> +<li><a href="Rule.Phoneme.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.bm.Rule.Phoneme" class="title">Uses of Class<br>org.apache.commons.codec.language.bm.Rule.Phoneme</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> +<caption><span>Fields in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with type parameters of type <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.Phoneme.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#COMPARATOR">COMPARATOR</a></span></code> </td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that return <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.Phoneme.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#append-java.lang.CharSequence-">append</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> str)</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.Phoneme.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#join-org.apache.commons.codec.language.bm.Rule.Phoneme-">join</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> right)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">since 1.9</span></div> +</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.Phoneme.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#mergeWithLanguage-org.apache.commons.codec.language.bm.Languages.LanguageSet-">mergeWithLanguage</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> lang)</code> +<div class="block">Returns a new Phoneme with the same text but a union of its + current language set and the given one.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that return types with arguments of type <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.Phoneme.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#getPhonemes--">getPhonemes</a></span>()</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.PhonemeExpr.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html#getPhonemes--">getPhonemes</a></span>()</code> </td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.PhonemeList.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html#getPhonemes--">getPhonemes</a></span>()</code> </td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with parameters of type <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.Phoneme.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#join-org.apache.commons.codec.language.bm.Rule.Phoneme-">join</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> right)</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">since 1.9</span></div> +</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> +<caption><span>Constructors in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with parameters of type <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-">Phoneme</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeLeft, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeRight)</code> </td> +</tr> +<tr class="rowColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html#Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Rule.Phoneme-org.apache.commons.codec.language.bm.Languages.LanguageSet-">Phoneme</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeLeft, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a> phonemeRight, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> languages)</code> </td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> +<caption><span>Constructor parameters in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with type arguments of type <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html#PhonemeList-java.util.List-">PhonemeList</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a>> phonemes)</code> </td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Rule.Phoneme.html" target="_top">Frames</a></li> +<li><a href="Rule.Phoneme.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.PhonemeExpr.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.PhonemeExpr.html new file mode 100644 index 0000000000000000000000000000000000000000..9db73dfb59d17b72a96e2c2d3cadf649fcdfc184 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.PhonemeExpr.html @@ -0,0 +1,202 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Interface org.apache.commons.codec.language.bm.Rule.PhonemeExpr (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Interface org.apache.commons.codec.language.bm.Rule.PhonemeExpr (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Rule.PhonemeExpr.html" target="_top">Frames</a></li> +<li><a href="Rule.PhonemeExpr.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Interface org.apache.commons.codec.language.bm.Rule.PhonemeExpr" class="title">Uses of Interface<br>org.apache.commons.codec.language.bm.Rule.PhonemeExpr</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a> in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that implement <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></span></code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm">Rule.PhonemeList</a></span></code> </td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that return <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getPhoneme--">getPhoneme</a></span>()</code> +<div class="block">Gets the phoneme.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> +<caption><span>Constructors in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with parameters of type <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#Rule-java.lang.String-java.lang.String-java.lang.String-org.apache.commons.codec.language.bm.Rule.PhonemeExpr-">Rule</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pattern, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lContext, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> rContext, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a> phoneme)</code> +<div class="block">Creates a new rule.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Rule.PhonemeExpr.html" target="_top">Frames</a></li> +<li><a href="Rule.PhonemeExpr.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.PhonemeList.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.PhonemeList.html new file mode 100644 index 0000000000000000000000000000000000000000..b7c804f484b5825dbdb5f3b6e3ef2d871c0fb1a1 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.PhonemeList.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.bm.Rule.PhonemeList (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.bm.Rule.PhonemeList (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Rule.PhonemeList.html" target="_top">Frames</a></li> +<li><a href="Rule.PhonemeList.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.bm.Rule.PhonemeList" class="title">Uses of Class<br>org.apache.commons.codec.language.bm.Rule.PhonemeList</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.bm.Rule.PhonemeList</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Rule.PhonemeList.html" target="_top">Frames</a></li> +<li><a href="Rule.PhonemeList.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.RPattern.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.RPattern.html new file mode 100644 index 0000000000000000000000000000000000000000..c79a36323829d1fa5834036d37f2246e3a4b2558 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.RPattern.html @@ -0,0 +1,188 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Interface org.apache.commons.codec.language.bm.Rule.RPattern (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Interface org.apache.commons.codec.language.bm.Rule.RPattern (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Rule.RPattern.html" target="_top">Frames</a></li> +<li><a href="Rule.RPattern.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Interface org.apache.commons.codec.language.bm.Rule.RPattern" class="title">Uses of Interface<br>org.apache.commons.codec.language.bm.Rule.RPattern</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a> in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> +<caption><span>Fields in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> declared as <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#ALL_STRINGS_RMATCHER">ALL_STRINGS_RMATCHER</a></span></code> </td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that return <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getLContext--">getLContext</a></span>()</code> +<div class="block">Gets the left context.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getRContext--">getRContext</a></span>()</code> +<div class="block">Gets the right context.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Rule.RPattern.html" target="_top">Frames</a></li> +<li><a href="Rule.RPattern.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.html new file mode 100644 index 0000000000000000000000000000000000000000..23d21d88b4b660e6ca9c6996d464ef60b8e57c11 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/Rule.html @@ -0,0 +1,195 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.bm.Rule (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.bm.Rule (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Rule.html" target="_top">Frames</a></li> +<li><a href="Rule.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.bm.Rule" class="title">Uses of Class<br>org.apache.commons.codec.language.bm.Rule</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a> in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that return types with arguments of type <a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstance</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</code> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-">getInstance</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lang)</code> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstanceMap</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</code> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-">getInstanceMap</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lang)</code> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/Rule.html" target="_top">Frames</a></li> +<li><a href="Rule.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/RuleType.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/RuleType.html new file mode 100644 index 0000000000000000000000000000000000000000..a295b851478758698eba39761ab29c5b4a9575dc --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/class-use/RuleType.html @@ -0,0 +1,258 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.bm.RuleType (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.bm.RuleType (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/RuleType.html" target="_top">Frames</a></li> +<li><a href="RuleType.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.bm.RuleType" class="title">Uses of Class<br>org.apache.commons.codec.language.bm.RuleType</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> that return <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></code></td> +<td class="colLast"><span class="typeNameLabel">BeiderMorseEncoder.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#getRuleType--">getRuleType</a></span>()</code> +<div class="block">Gets the rule type currently in operation.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></code></td> +<td class="colLast"><span class="typeNameLabel">PhoneticEngine.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#getRuleType--">getRuleType</a></span>()</code> +<div class="block">Gets the RuleType being used.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></code></td> +<td class="colLast"><span class="typeNameLabel">RuleType.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html#valueOf-java.lang.String-">valueOf</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> +<div class="block">Returns the enum constant of this type with the specified name.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a>[]</code></td> +<td class="colLast"><span class="typeNameLabel">RuleType.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html#values--">values</a></span>()</code> +<div class="block">Returns an array containing the constants of this enum type, in +the order they are declared.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> +<caption><span>Methods in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with parameters of type <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstance</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</code> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstance-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-">getInstance</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lang)</code> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-org.apache.commons.codec.language.bm.Languages.LanguageSet-">getInstanceMap</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="../../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a> langs)</code> +<div class="block">Gets rules for a combination of name type, rule type and languages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a>>></code></td> +<td class="colLast"><span class="typeNameLabel">Rule.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/Rule.html#getInstanceMap-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-java.lang.String-">getInstanceMap</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> rt, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> lang)</code> +<div class="block">Gets rules for a combination of name type, rule type and a single language.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><span class="typeNameLabel">BeiderMorseEncoder.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html#setRuleType-org.apache.commons.codec.language.bm.RuleType-">setRuleType</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> ruleType)</code> +<div class="block">Sets the rule type to apply.</div> +</td> +</tr> +</tbody> +</table> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> +<caption><span>Constructors in <a href="../../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> with parameters of type <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#PhoneticEngine-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-boolean-">PhoneticEngine</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> ruleType, + boolean concat)</code> +<div class="block">Generates a new, fully-configured phonetic engine.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html#PhoneticEngine-org.apache.commons.codec.language.bm.NameType-org.apache.commons.codec.language.bm.RuleType-boolean-int-">PhoneticEngine</a></span>(<a href="../../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a> nameType, + <a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a> ruleType, + boolean concat, + int maxPhonemes)</code> +<div class="block">Generates a new, fully-configured phonetic engine.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/codec/language/bm/class-use/RuleType.html" target="_top">Frames</a></li> +<li><a href="RuleType.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-frame.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-frame.html new file mode 100644 index 0000000000000000000000000000000000000000..1b7243a165c391e590a18407d016152c69ca049b --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-frame.html @@ -0,0 +1,38 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.language.bm (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<h1 class="bar"><a href="../../../../../../org/apache/commons/codec/language/bm/package-summary.html" target="classFrame">org.apache.commons.codec.language.bm</a></h1> +<div class="indexContainer"> +<h2 title="Interfaces">Interfaces</h2> +<ul title="Interfaces"> +<li><a href="Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm" target="classFrame"><span class="interfaceName">Rule.PhonemeExpr</span></a></li> +<li><a href="Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm" target="classFrame"><span class="interfaceName">Rule.RPattern</span></a></li> +</ul> +<h2 title="Classes">Classes</h2> +<ul title="Classes"> +<li><a href="BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">BeiderMorseEncoder</a></li> +<li><a href="Lang.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Lang</a></li> +<li><a href="Languages.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Languages</a></li> +<li><a href="Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Languages.LanguageSet</a></li> +<li><a href="Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Languages.SomeLanguages</a></li> +<li><a href="PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">PhoneticEngine</a></li> +<li><a href="Rule.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Rule</a></li> +<li><a href="Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Rule.Phoneme</a></li> +<li><a href="Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm" target="classFrame">Rule.PhonemeList</a></li> +</ul> +<h2 title="Enums">Enums</h2> +<ul title="Enums"> +<li><a href="NameType.html" title="enum in org.apache.commons.codec.language.bm" target="classFrame">NameType</a></li> +<li><a href="RuleType.html" title="enum in org.apache.commons.codec.language.bm" target="classFrame">RuleType</a></li> +</ul> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-summary.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-summary.html new file mode 100644 index 0000000000000000000000000000000000000000..9563b7ea719396c6c44db5a70a9b838dff57b7cd --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-summary.html @@ -0,0 +1,242 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.language.bm (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.language.bm (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Package" class="title">Package org.apache.commons.codec.language.bm</h1> +<div class="docSummary"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</div> +<p>See: <a href="#package.description">Description</a></p> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation"> +<caption><span>Interface Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Interface</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a></td> +<td class="colLast"> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm">Rule.RPattern</a></td> +<td class="colLast"> +<div class="block">A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> +<caption><span>Class Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Class</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm">BeiderMorseEncoder</a></td> +<td class="colLast"> +<div class="block">Encodes strings into their Beider-Morse phonetic encoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm">Lang</a></td> +<td class="colLast"> +<div class="block">Language guessing utility.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm">Languages</a></td> +<td class="colLast"> +<div class="block">Language codes.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm">Languages.LanguageSet</a></td> +<td class="colLast"> +<div class="block">A set of languages.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm">Languages.SomeLanguages</a></td> +<td class="colLast"> +<div class="block">Some languages, explicitly enumerated.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm">PhoneticEngine</a></td> +<td class="colLast"> +<div class="block">Converts words into potential phonetic representations.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm">Rule</a></td> +<td class="colLast"> +<div class="block">A phoneme rule.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm">Rule.Phoneme</a></td> +<td class="colLast"> </td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm">Rule.PhonemeList</a></td> +<td class="colLast"> </td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Summary table, listing enums, and an explanation"> +<caption><span>Enum Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Enum</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm">NameType</a></td> +<td class="colLast"> +<div class="block">Supported types of names.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm">RuleType</a></td> +<td class="colLast"> +<div class="block">Types of rule.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +<a name="package.description"> +<!-- --> +</a> +<h2 title="Package org.apache.commons.codec.language.bm Description">Package org.apache.commons.codec.language.bm Description</h2> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-tree.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-tree.html new file mode 100644 index 0000000000000000000000000000000000000000..8f398e5004e59c1d931f6fe713f6903b6d2394d6 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-tree.html @@ -0,0 +1,167 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.language.bm Class Hierarchy (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.language.bm Class Hierarchy (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/package-tree.html">Prev</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 class="title">Hierarchy For Package org.apache.commons.codec.language.bm</h1> +<span class="packageHierarchyLabel">Package Hierarchies:</span> +<ul class="horizontal"> +<li><a href="../../../../../../overview-tree.html">All Packages</a></li> +</ul> +</div> +<div class="contentContainer"> +<h2 title="Class Hierarchy">Class Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">BeiderMorseEncoder</span></a> (implements org.apache.commons.codec.<a href="../../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Lang</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Languages</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Languages.LanguageSet</span></a> +<ul> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Languages.SomeLanguages</span></a></li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">PhoneticEngine</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.Phoneme</span></a> (implements org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a>)</li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.PhonemeList</span></a> (implements org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a>)</li> +</ul> +</li> +</ul> +<h2 title="Interface Hierarchy">Interface Hierarchy</h2> +<ul> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.PhonemeExpr</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.RPattern</span></a></li> +</ul> +<h2 title="Enum Hierarchy">Enum Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Enum</span></a><E> (implements java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><T>, java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>) +<ul> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">NameType</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="../../../../../../org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">RuleType</span></a></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../../org/apache/commons/codec/language/package-tree.html">Prev</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-use.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-use.html new file mode 100644 index 0000000000000000000000000000000000000000..2cca2dcf2eb144d7d8d3b84a3b5b708421464aa6 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/bm/package-use.html @@ -0,0 +1,198 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Package org.apache.commons.codec.language.bm (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Package org.apache.commons.codec.language.bm (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Uses of Package org.apache.commons.codec.language.bm" class="title">Uses of Package<br>org.apache.commons.codec.language.bm</h1> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a> used by <a href="../../../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="../../../../../../org/apache/commons/codec/language/bm/class-use/Lang.html#org.apache.commons.codec.language.bm">Lang</a> +<div class="block">Language guessing utility.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../../../org/apache/commons/codec/language/bm/class-use/Languages.html#org.apache.commons.codec.language.bm">Languages</a> +<div class="block">Language codes.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../../../org/apache/commons/codec/language/bm/class-use/Languages.LanguageSet.html#org.apache.commons.codec.language.bm">Languages.LanguageSet</a> +<div class="block">A set of languages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../../../org/apache/commons/codec/language/bm/class-use/NameType.html#org.apache.commons.codec.language.bm">NameType</a> +<div class="block">Supported types of names.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../../../org/apache/commons/codec/language/bm/class-use/Rule.html#org.apache.commons.codec.language.bm">Rule</a> +<div class="block">A phoneme rule.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../../../org/apache/commons/codec/language/bm/class-use/Rule.Phoneme.html#org.apache.commons.codec.language.bm">Rule.Phoneme</a> </td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../../../org/apache/commons/codec/language/bm/class-use/Rule.PhonemeExpr.html#org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a> </td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../../../org/apache/commons/codec/language/bm/class-use/Rule.RPattern.html#org.apache.commons.codec.language.bm">Rule.RPattern</a> +<div class="block">A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../../../org/apache/commons/codec/language/bm/class-use/RuleType.html#org.apache.commons.codec.language.bm">RuleType</a> +<div class="block">Types of rule.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/bm/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/AbstractCaverphone.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/AbstractCaverphone.html new file mode 100644 index 0000000000000000000000000000000000000000..c03b4d10e33bc09b84e87d280cf1093ffbab510f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/AbstractCaverphone.html @@ -0,0 +1,176 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.AbstractCaverphone (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.AbstractCaverphone (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/AbstractCaverphone.html" target="_top">Frames</a></li> +<li><a href="AbstractCaverphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.AbstractCaverphone" class="title">Uses of Class<br>org.apache.commons.codec.language.AbstractCaverphone</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language">org.apache.commons.codec.language</a></td> +<td class="colLast"> +<div class="block"> + Language and phonetic encoders.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a> in <a href="../../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation"> +<caption><span>Subclasses of <a href="../../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a> in <a href="../../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Caverphone1</a></span></code> +<div class="block">Encodes a string into a Caverphone 1.0 value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>class </code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Caverphone2</a></span></code> +<div class="block">Encodes a string into a Caverphone 2.0 value.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/AbstractCaverphone.html" target="_top">Frames</a></li> +<li><a href="AbstractCaverphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Caverphone.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Caverphone.html new file mode 100644 index 0000000000000000000000000000000000000000..ceaa992878808e6e32a46c47c4e675ec54d1ee17 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Caverphone.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.Caverphone (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.Caverphone (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Caverphone.html" target="_top">Frames</a></li> +<li><a href="Caverphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.Caverphone" class="title">Uses of Class<br>org.apache.commons.codec.language.Caverphone</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.Caverphone</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Caverphone.html" target="_top">Frames</a></li> +<li><a href="Caverphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Caverphone1.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Caverphone1.html new file mode 100644 index 0000000000000000000000000000000000000000..6107b42ec1267861c6e043eb460287b64ed9329c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Caverphone1.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.Caverphone1 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.Caverphone1 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Caverphone1.html" target="_top">Frames</a></li> +<li><a href="Caverphone1.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.Caverphone1" class="title">Uses of Class<br>org.apache.commons.codec.language.Caverphone1</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.Caverphone1</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Caverphone1.html" target="_top">Frames</a></li> +<li><a href="Caverphone1.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Caverphone2.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Caverphone2.html new file mode 100644 index 0000000000000000000000000000000000000000..3477bb65aff9671fe74e1143bc658eb0942a60cd --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Caverphone2.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.Caverphone2 (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.Caverphone2 (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Caverphone2.html" target="_top">Frames</a></li> +<li><a href="Caverphone2.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.Caverphone2" class="title">Uses of Class<br>org.apache.commons.codec.language.Caverphone2</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.Caverphone2</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Caverphone2.html" target="_top">Frames</a></li> +<li><a href="Caverphone2.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/ColognePhonetic.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/ColognePhonetic.html new file mode 100644 index 0000000000000000000000000000000000000000..83b32d71e9dc1a393dd7c2d8a8018c766bd07938 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/ColognePhonetic.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.ColognePhonetic (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.ColognePhonetic (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/ColognePhonetic.html" target="_top">Frames</a></li> +<li><a href="ColognePhonetic.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.ColognePhonetic" class="title">Uses of Class<br>org.apache.commons.codec.language.ColognePhonetic</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.ColognePhonetic</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/ColognePhonetic.html" target="_top">Frames</a></li> +<li><a href="ColognePhonetic.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/DaitchMokotoffSoundex.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/DaitchMokotoffSoundex.html new file mode 100644 index 0000000000000000000000000000000000000000..628833f231a82ecf78d723019d2559541ebc0f0c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/DaitchMokotoffSoundex.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.DaitchMokotoffSoundex (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.DaitchMokotoffSoundex (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/DaitchMokotoffSoundex.html" target="_top">Frames</a></li> +<li><a href="DaitchMokotoffSoundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.DaitchMokotoffSoundex" class="title">Uses of Class<br>org.apache.commons.codec.language.DaitchMokotoffSoundex</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.DaitchMokotoffSoundex</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/DaitchMokotoffSoundex.html" target="_top">Frames</a></li> +<li><a href="DaitchMokotoffSoundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/DoubleMetaphone.DoubleMetaphoneResult.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/DoubleMetaphone.DoubleMetaphoneResult.html new file mode 100644 index 0000000000000000000000000000000000000000..5c158be97374974ab156f573a906feb4eea24684 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/DoubleMetaphone.DoubleMetaphoneResult.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.DoubleMetaphone.DoubleMetaphoneResult (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.DoubleMetaphone.DoubleMetaphoneResult (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/DoubleMetaphone.DoubleMetaphoneResult.html" target="_top">Frames</a></li> +<li><a href="DoubleMetaphone.DoubleMetaphoneResult.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.DoubleMetaphone.DoubleMetaphoneResult" class="title">Uses of Class<br>org.apache.commons.codec.language.DoubleMetaphone.DoubleMetaphoneResult</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.DoubleMetaphone.DoubleMetaphoneResult</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/DoubleMetaphone.DoubleMetaphoneResult.html" target="_top">Frames</a></li> +<li><a href="DoubleMetaphone.DoubleMetaphoneResult.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/DoubleMetaphone.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/DoubleMetaphone.html new file mode 100644 index 0000000000000000000000000000000000000000..4034b35cf726df4c4c3ff631ea453b6e944d8710 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/DoubleMetaphone.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.DoubleMetaphone (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.DoubleMetaphone (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/DoubleMetaphone.html" target="_top">Frames</a></li> +<li><a href="DoubleMetaphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.DoubleMetaphone" class="title">Uses of Class<br>org.apache.commons.codec.language.DoubleMetaphone</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.DoubleMetaphone</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/DoubleMetaphone.html" target="_top">Frames</a></li> +<li><a href="DoubleMetaphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/MatchRatingApproachEncoder.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/MatchRatingApproachEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..0491e85a1024766b422f970ff7e47b77e5b0e1e4 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/MatchRatingApproachEncoder.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.MatchRatingApproachEncoder (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.MatchRatingApproachEncoder (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/MatchRatingApproachEncoder.html" target="_top">Frames</a></li> +<li><a href="MatchRatingApproachEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.MatchRatingApproachEncoder" class="title">Uses of Class<br>org.apache.commons.codec.language.MatchRatingApproachEncoder</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.MatchRatingApproachEncoder</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/MatchRatingApproachEncoder.html" target="_top">Frames</a></li> +<li><a href="MatchRatingApproachEncoder.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Metaphone.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Metaphone.html new file mode 100644 index 0000000000000000000000000000000000000000..945b955f64ada88e4cecc236f2a7559e3119aead --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Metaphone.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.Metaphone (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.Metaphone (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Metaphone.html" target="_top">Frames</a></li> +<li><a href="Metaphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.Metaphone" class="title">Uses of Class<br>org.apache.commons.codec.language.Metaphone</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.Metaphone</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Metaphone.html" target="_top">Frames</a></li> +<li><a href="Metaphone.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Nysiis.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Nysiis.html new file mode 100644 index 0000000000000000000000000000000000000000..e2bb49f55e84f12365077faa6dc016f6cb54bec4 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Nysiis.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.Nysiis (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.Nysiis (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Nysiis.html" target="_top">Frames</a></li> +<li><a href="Nysiis.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.Nysiis" class="title">Uses of Class<br>org.apache.commons.codec.language.Nysiis</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.language.Nysiis</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Nysiis.html" target="_top">Frames</a></li> +<li><a href="Nysiis.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/RefinedSoundex.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/RefinedSoundex.html new file mode 100644 index 0000000000000000000000000000000000000000..98176051dd65b4d20edbcdd9a45bf4b26b37452a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/RefinedSoundex.html @@ -0,0 +1,171 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.RefinedSoundex (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.RefinedSoundex (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/RefinedSoundex.html" target="_top">Frames</a></li> +<li><a href="RefinedSoundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.RefinedSoundex" class="title">Uses of Class<br>org.apache.commons.codec.language.RefinedSoundex</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language">org.apache.commons.codec.language</a></td> +<td class="colLast"> +<div class="block"> + Language and phonetic encoders.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a> in <a href="../../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> +<caption><span>Fields in <a href="../../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a> declared as <a href="../../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></code></td> +<td class="colLast"><span class="typeNameLabel">RefinedSoundex.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/RefinedSoundex.html#US_ENGLISH">US_ENGLISH</a></span></code> +<div class="block">This static variable contains an instance of the RefinedSoundex using + the US_ENGLISH mapping.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/RefinedSoundex.html" target="_top">Frames</a></li> +<li><a href="RefinedSoundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Soundex.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Soundex.html new file mode 100644 index 0000000000000000000000000000000000000000..a12a8586f02a5618775f296b862da2fe4621f8e9 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/class-use/Soundex.html @@ -0,0 +1,184 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.language.Soundex (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.language.Soundex (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Soundex.html" target="_top">Frames</a></li> +<li><a href="Soundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.language.Soundex" class="title">Uses of Class<br>org.apache.commons.codec.language.Soundex</h2> +</div> +<div class="classUseContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language">org.apache.commons.codec.language</a></td> +<td class="colLast"> +<div class="block"> + Language and phonetic encoders.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.language"> +<!-- --> +</a> +<h3>Uses of <a href="../../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a> in <a href="../../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></h3> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> +<caption><span>Fields in <a href="../../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a> declared as <a href="../../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></code></td> +<td class="colLast"><span class="typeNameLabel">Soundex.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH">US_ENGLISH</a></span></code> +<div class="block">An instance of Soundex using the US_ENGLISH_MAPPING mapping.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></code></td> +<td class="colLast"><span class="typeNameLabel">Soundex.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_GENEALOGY">US_ENGLISH_GENEALOGY</a></span></code> +<div class="block">An instance of Soundex using the mapping as per the Genealogy site: + http://www.genealogy.com/articles/research/00000060.html</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static <a href="../../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></code></td> +<td class="colLast"><span class="typeNameLabel">Soundex.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_SIMPLIFIED">US_ENGLISH_SIMPLIFIED</a></span></code> +<div class="block">An instance of Soundex using the Simplified Soundex mapping, as described here: + http://west-penwith.org.uk/misc/soundex.htm</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/language/class-use/Soundex.html" target="_top">Frames</a></li> +<li><a href="Soundex.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-frame.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-frame.html new file mode 100644 index 0000000000000000000000000000000000000000..cbb82f04a73ebab3fad268016ed93e4808d5315b --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-frame.html @@ -0,0 +1,31 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.language (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<h1 class="bar"><a href="../../../../../org/apache/commons/codec/language/package-summary.html" target="classFrame">org.apache.commons.codec.language</a></h1> +<div class="indexContainer"> +<h2 title="Classes">Classes</h2> +<ul title="Classes"> +<li><a href="AbstractCaverphone.html" title="class in org.apache.commons.codec.language" target="classFrame">AbstractCaverphone</a></li> +<li><a href="Caverphone.html" title="class in org.apache.commons.codec.language" target="classFrame">Caverphone</a></li> +<li><a href="Caverphone1.html" title="class in org.apache.commons.codec.language" target="classFrame">Caverphone1</a></li> +<li><a href="Caverphone2.html" title="class in org.apache.commons.codec.language" target="classFrame">Caverphone2</a></li> +<li><a href="ColognePhonetic.html" title="class in org.apache.commons.codec.language" target="classFrame">ColognePhonetic</a></li> +<li><a href="DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language" target="classFrame">DaitchMokotoffSoundex</a></li> +<li><a href="DoubleMetaphone.html" title="class in org.apache.commons.codec.language" target="classFrame">DoubleMetaphone</a></li> +<li><a href="MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language" target="classFrame">MatchRatingApproachEncoder</a></li> +<li><a href="Metaphone.html" title="class in org.apache.commons.codec.language" target="classFrame">Metaphone</a></li> +<li><a href="Nysiis.html" title="class in org.apache.commons.codec.language" target="classFrame">Nysiis</a></li> +<li><a href="RefinedSoundex.html" title="class in org.apache.commons.codec.language" target="classFrame">RefinedSoundex</a></li> +<li><a href="Soundex.html" title="class in org.apache.commons.codec.language" target="classFrame">Soundex</a></li> +</ul> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-summary.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-summary.html new file mode 100644 index 0000000000000000000000000000000000000000..64c88db82fcd7c02ca7c34a60aa5159f1e1e9049 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-summary.html @@ -0,0 +1,223 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.language (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.language (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/language/bm/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Package" class="title">Package org.apache.commons.codec.language</h1> +<div class="docSummary"> +<div class="block"> + Language and phonetic encoders.</div> +</div> +<p>See: <a href="#package.description">Description</a></p> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> +<caption><span>Class Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Class</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language">AbstractCaverphone</a></td> +<td class="colLast"> +<div class="block">Encodes a string into a Caverphone value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language">Caverphone</a></td> +<td class="colLast">Deprecated +<div class="block"><span class="deprecationComment">1.5 Replaced by <a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><code>Caverphone2</code></a>, will be removed in 2.0.</span></div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language">Caverphone1</a></td> +<td class="colLast"> +<div class="block">Encodes a string into a Caverphone 1.0 value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language">Caverphone2</a></td> +<td class="colLast"> +<div class="block">Encodes a string into a Caverphone 2.0 value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language">ColognePhonetic</a></td> +<td class="colLast"> +<div class="block">Encodes a string into a Cologne Phonetic value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language">DaitchMokotoffSoundex</a></td> +<td class="colLast"> +<div class="block">Encodes a string into a Daitch-Mokotoff Soundex value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language">DoubleMetaphone</a></td> +<td class="colLast"> +<div class="block">Encodes a string into a double metaphone value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language">MatchRatingApproachEncoder</a></td> +<td class="colLast"> +<div class="block">Match Rating Approach Phonetic Algorithm Developed by <CITE>Western Airlines</CITE> in 1977.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language">Metaphone</a></td> +<td class="colLast"> +<div class="block">Encodes a string into a Metaphone value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language">Nysiis</a></td> +<td class="colLast"> +<div class="block">Encodes a string into a NYSIIS value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language">RefinedSoundex</a></td> +<td class="colLast"> +<div class="block">Encodes a string into a Refined Soundex value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</a></td> +<td class="colLast"> +<div class="block">Encodes a string into a Soundex value.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +<a name="package.description"> +<!-- --> +</a> +<h2 title="Package org.apache.commons.codec.language Description">Package org.apache.commons.codec.language Description</h2> +<div class="block"><p> + Language and phonetic encoders. + </p></div> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../org/apache/commons/codec/language/bm/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-tree.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-tree.html new file mode 100644 index 0000000000000000000000000000000000000000..78d1f535d242eda6540eec5f7974256e8b86323d --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-tree.html @@ -0,0 +1,153 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.language Class Hierarchy (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.language Class Hierarchy (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/package-tree.html">Prev</a></li> +<li><a href="../../../../../org/apache/commons/codec/language/bm/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 class="title">Hierarchy For Package org.apache.commons.codec.language</h1> +<span class="packageHierarchyLabel">Package Hierarchies:</span> +<ul class="horizontal"> +<li><a href="../../../../../overview-tree.html">All Packages</a></li> +</ul> +</div> +<div class="contentContainer"> +<h2 title="Class Hierarchy">Class Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">AbstractCaverphone</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>) +<ul> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Caverphone1</span></a></li> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Caverphone2</span></a></li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Caverphone</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">ColognePhonetic</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">DaitchMokotoffSoundex</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">DoubleMetaphone</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">DoubleMetaphone.DoubleMetaphoneResult</span></a></li> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">MatchRatingApproachEncoder</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Metaphone</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Nysiis</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">RefinedSoundex</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.<a href="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Soundex</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/digest/package-tree.html">Prev</a></li> +<li><a href="../../../../../org/apache/commons/codec/language/bm/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-use.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-use.html new file mode 100644 index 0000000000000000000000000000000000000000..fb52977c65deefb2dc84fe90a839f0ce8d4f19f5 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/language/package-use.html @@ -0,0 +1,173 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Package org.apache.commons.codec.language (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Package org.apache.commons.codec.language (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Uses of Package org.apache.commons.codec.language" class="title">Uses of Package<br>org.apache.commons.codec.language</h1> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language">org.apache.commons.codec.language</a></td> +<td class="colLast"> +<div class="block"> + Language and phonetic encoders.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.language"> +<!-- --> +</a> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a> used by <a href="../../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="../../../../../org/apache/commons/codec/language/class-use/AbstractCaverphone.html#org.apache.commons.codec.language">AbstractCaverphone</a> +<div class="block">Encodes a string into a Caverphone value.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../../org/apache/commons/codec/language/class-use/RefinedSoundex.html#org.apache.commons.codec.language">RefinedSoundex</a> +<div class="block">Encodes a string into a Refined Soundex value.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../../org/apache/commons/codec/language/class-use/Soundex.html#org.apache.commons.codec.language">Soundex</a> +<div class="block">Encodes a string into a Soundex value.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/language/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/BCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/BCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..038e0d9fa86682ce5c57ea8dd752e7c896046c87 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/BCodec.html @@ -0,0 +1,840 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>BCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="BCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/BCodec.html" target="_top">Frames</a></li> +<li><a href="BCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.net</div> +<h2 title="Class BCodec" class="title">Class BCodec</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.net.BCodec</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">BCodec</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>, <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></pre> +<div class="block">Identical to the Base64 encoding defined by <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> + and allows a character set to be specified. + <p> + <a href="http://www.ietf.org/rfc/rfc1522.txt">RFC 1522</a> describes techniques to allow the encoding of non-ASCII + text in various portions of a RFC 822 [2] message header, in a manner which is unlikely to confuse existing message + handling software. + </p> + <p> + This class is immutable and thread-safe. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.3</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.ietf.org/rfc/rfc1522.txt">MIME (Multipurpose Internet Mail Extensions) Part Two: Message + Header Extensions for Non-ASCII Text</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#POSTFIX">POSTFIX</a></span></code> +<div class="block">Prefix.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#PREFIX">PREFIX</a></span></code> +<div class="block">Postfix.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected static char</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#SEP">SEP</a></span></code> +<div class="block">Separator.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#BCodec--">BCodec</a></span>()</code> +<div class="block">Default constructor.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#BCodec-java.nio.charset.Charset-">BCodec</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</code> +<div class="block">Constructor which allows for the selection of a default Charset</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#BCodec-java.nio.charset.Charset-org.apache.commons.codec.CodecPolicy-">BCodec</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</code> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#BCodec-java.lang.String-">BCodec</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</code> +<div class="block">Constructor which allows for the selection of a default Charset</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> +<div class="block">Decodes a Base64 object into its original form.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#decode-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> +<div class="block">Decodes a Base64 string into its original form.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#decodeText-java.lang.String-">decodeText</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code> +<div class="block">Applies an RFC 1522 compliant decoding scheme to the given string of text.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>protected byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#doDecoding-byte:A-">doDecoding</a></span>(byte[] bytes)</code> +<div class="block">Decodes an array of bytes using the defined encoding scheme.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>protected byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#doEncoding-byte:A-">doEncoding</a></span>(byte[] bytes)</code> +<div class="block">Encodes an array of bytes using the defined encoding scheme.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> +<div class="block">Encodes an object into its Base64 form using the default Charset.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> strSource)</code> +<div class="block">Encodes a string into its Base64 form using the default Charset.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode-java.lang.String-java.nio.charset.Charset-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> strSource, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> sourceCharset)</code> +<div class="block">Encodes a string into its Base64 form using the specified Charset.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode-java.lang.String-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> strSource, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceCharset)</code> +<div class="block">Encodes a string into its Base64 form using the specified Charset.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encodeText-java.lang.String-java.nio.charset.Charset-">encodeText</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</code> +<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encodeText-java.lang.String-java.lang.String-">encodeText</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</code> +<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#getCharset--">getCharset</a></span>()</code> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#getDefaultCharset--">getDefaultCharset</a></span>()</code> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#getEncoding--">getEncoding</a></span>()</code> +<div class="block">Returns the codec name (referred to as encoding in the RFC 1522).</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/BCodec.html#isStrictDecoding--">isStrictDecoding</a></span>()</code> +<div class="block">Returns true if decoding behavior is strict.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="SEP"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SEP</h4> +<pre>protected static final char SEP</pre> +<div class="block">Separator.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.net.BCodec.SEP">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="POSTFIX"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>POSTFIX</h4> +<pre>protected static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> POSTFIX</pre> +<div class="block">Prefix.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.net.BCodec.POSTFIX">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="PREFIX"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>PREFIX</h4> +<pre>protected static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> PREFIX</pre> +<div class="block">Postfix.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.net.BCodec.PREFIX">Constant Field Values</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="BCodec--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>BCodec</h4> +<pre>public BCodec()</pre> +<div class="block">Default constructor.</div> +</li> +</ul> +<a name="BCodec-java.nio.charset.Charset-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>BCodec</h4> +<pre>public BCodec(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</pre> +<div class="block">Constructor which allows for the selection of a default Charset</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charset</code> - the default string Charset to use.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="BCodec-java.nio.charset.Charset-org.apache.commons.codec.CodecPolicy-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>BCodec</h4> +<pre>public BCodec(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset, + <a href="../../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a> decodingPolicy)</pre> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charset</code> - the default string Charset to use.</dd> +<dd><code>decodingPolicy</code> - The decoding policy.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="BCodec-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>BCodec</h4> +<pre>public BCodec(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</pre> +<div class="block">Constructor which allows for the selection of a default Charset</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charsetName</code> - the default Charset to use.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - If the named Charset is unavailable</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7 throws UnsupportedCharsetException if the named Charset is unavailable</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="isStrictDecoding--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isStrictDecoding</h4> +<pre>public boolean isStrictDecoding()</pre> +<div class="block">Returns true if decoding behavior is strict. Decoding will raise a + <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec"><code>DecoderException</code></a> if trailing bits are not part of a valid Base64 encoding. + + <p>The default is false for lenient encoding. Decoding will compose trailing bits + into 8-bit bytes and discard the remainder.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>true if using strict decoding</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.15</dd> +</dl> +</li> +</ul> +<a name="getEncoding--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getEncoding</h4> +<pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getEncoding()</pre> +<div class="block">Returns the codec name (referred to as encoding in the RFC 1522).</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>name of the codec</dd> +</dl> +</li> +</ul> +<a name="doEncoding-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>doEncoding</h4> +<pre>protected byte[] doEncoding(byte[] bytes)</pre> +<div class="block">Encodes an array of bytes using the defined encoding scheme.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - Data to be encoded</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing the encoded data</dd> +</dl> +</li> +</ul> +<a name="doDecoding-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>doDecoding</h4> +<pre>protected byte[] doDecoding(byte[] bytes)</pre> +<div class="block">Decodes an array of bytes using the defined encoding scheme.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - Data to be decoded</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a byte array that contains decoded data</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-java.nio.charset.Charset-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> strSource, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> sourceCharset) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes a string into its Base64 form using the specified Charset. Unsafe characters are escaped.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>strSource</code> - string to convert to Base64 form</dd> +<dd><code>sourceCharset</code> - the Charset for <code>value</code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Base64 string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> strSource, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceCharset) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes a string into its Base64 form using the specified Charset. Unsafe characters are escaped.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>strSource</code> - string to convert to Base64 form</dd> +<dd><code>sourceCharset</code> - the Charset for <code>value</code></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Base64 string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> strSource) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes a string into its Base64 form using the default Charset. Unsafe characters are escaped.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>strSource</code> - string to convert to Base64 form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Base64 string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a Base64 string into its original form. Escaped characters are converted back to their original + representation.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringDecoder.html#decode-java.lang.String-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value</code> - Base64 string to convert into its original form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>original string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - A decoder exception is thrown if a failure condition is encountered during the decode process.</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an object into its Base64 form using the default Charset. Unsafe characters are escaped.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value</code> - object to convert to Base64 form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Base64 object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a Base64 object into its original form. Escaped characters are converted back to their original + representation.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value</code> - Base64 object to convert into its original form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>original object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if the argument is not a <code>String</code>. Thrown if a failure condition is encountered + during the decode process.</dd> +</dl> +</li> +</ul> +<a name="getCharset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getCharset</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> getCharset()</pre> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the default Charset name</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="getDefaultCharset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getDefaultCharset</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getDefaultCharset()</pre> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the default Charset name</dd> +</dl> +</li> +</ul> +<a name="encodeText-java.lang.String-java.nio.charset.Charset-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeText</h4> +<pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeText(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset. + <p> + This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes + <a href="../../../../../org/apache/commons/codec/net/BCodec.html#doEncoding-byte:A-"><code>doEncoding(byte [])</code></a> method of a concrete class to perform the specific encoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - a string to encode</dd> +<dd><code>charset</code> - a charset to be used</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>RFC 1522 compliant "encoded-word"</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if there is an error condition during the Encoding process.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="encodeText-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeText</h4> +<pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeText(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a>, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> +<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset. + <p> + This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes + <a href="../../../../../org/apache/commons/codec/net/BCodec.html#doEncoding-byte:A-"><code>doEncoding(byte [])</code></a> method of a concrete class to perform the specific encoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - a string to encode</dd> +<dd><code>charsetName</code> - the charset to use</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>RFC 1522 compliant "encoded-word"</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if there is an error condition during the Encoding process.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if charset is not available</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="decodeText-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>decodeText</h4> +<pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> decodeText(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a>, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> +<div class="block">Applies an RFC 1522 compliant decoding scheme to the given string of text. + <p> + This method processes the "encoded-word" header common to all the RFC 1522 codecs and then invokes + <a href="../../../../../org/apache/commons/codec/net/BCodec.html#doEncoding-byte:A-"><code>doEncoding(byte [])</code></a> method of a concrete class to perform the specific decoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - a string to decode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new decoded String or <code>null</code> if the input is <code>null</code>.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - thrown if there is an error condition during the decoding process.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - thrown if charset specified in the "encoded-word" header is not supported</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/BCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Class</li> +<li><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/BCodec.html" target="_top">Frames</a></li> +<li><a href="BCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/PercentCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/PercentCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..5310a5adbba49be8e8ba16285052cd5af2e47159 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/PercentCodec.html @@ -0,0 +1,419 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>PercentCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="PercentCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/PercentCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/PercentCodec.html" target="_top">Frames</a></li> +<li><a href="PercentCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.net</div> +<h2 title="Class PercentCodec" class="title">Class PercentCodec</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.net.PercentCodec</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">PercentCodec</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></pre> +<div class="block">Implements the Percent-Encoding scheme, as described in HTTP 1.1 specification. For extensibility, an array of + special US-ASCII characters can be specified in order to perform proper URI encoding for the different parts + of the URI. + <p> + This class is immutable. It is also thread-safe besides using BitSet which is not thread-safe, but its public + interface only call the access + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.12</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="https://tools.ietf.org/html/rfc3986#section-2.1">Percent-Encoding</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html#PercentCodec--">PercentCodec</a></span>()</code> +<div class="block">Constructs a Percent coded that will encode all the non US-ASCII characters using the Percent-Encoding + while it will not encode all the US-ASCII characters, except for character '%' that is used as escape + character for Percent-Encoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html#PercentCodec-byte:A-boolean-">PercentCodec</a></span>(byte[] alwaysEncodeChars, + boolean plusForSpace)</code> +<div class="block">Constructs a Percent codec by specifying the characters that belong to US-ASCII that should + always be encoded.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html#decode-byte:A-">decode</a></span>(byte[] bytes)</code> +<div class="block">Decode bytes encoded with Percent-Encoding based on RFC 3986.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Decodes a byte[] Object, whose bytes are encoded with Percent-Encoding.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html#encode-byte:A-">encode</a></span>(byte[] bytes)</code> +<div class="block">Percent-Encoding based on RFC 3986.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an object into using the Percent-Encoding.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="PercentCodec--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>PercentCodec</h4> +<pre>public PercentCodec()</pre> +<div class="block">Constructs a Percent coded that will encode all the non US-ASCII characters using the Percent-Encoding + while it will not encode all the US-ASCII characters, except for character '%' that is used as escape + character for Percent-Encoding.</div> +</li> +</ul> +<a name="PercentCodec-byte:A-boolean-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>PercentCodec</h4> +<pre>public PercentCodec(byte[] alwaysEncodeChars, + boolean plusForSpace)</pre> +<div class="block">Constructs a Percent codec by specifying the characters that belong to US-ASCII that should + always be encoded. The rest US-ASCII characters will not be encoded, except for character '%' that + is used as escape character for Percent-Encoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>alwaysEncodeChars</code> - the unsafe characters that should always be encoded</dd> +<dd><code>plusForSpace</code> - the flag defining if the space character should be encoded as '+'</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public byte[] encode(byte[] bytes) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Percent-Encoding based on RFC 3986. The non US-ASCII characters are encoded, as well as the + US-ASCII characters that are configured to be always encoded.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - Data to be encoded</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing the encoded data</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if the Encoder encounters a failure condition during the encoding process.</dd> +</dl> +</li> +</ul> +<a name="decode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public byte[] decode(byte[] bytes) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decode bytes encoded with Percent-Encoding based on RFC 3986. The reverse process is performed in order to + decode the encoded characters to Unicode.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html#decode-byte:A-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - A byte array which has been encoded with the appropriate encoder</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a byte array that contains decoded content</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - A decoder exception is thrown if a Decoder encounters a failure condition during the decode process.</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an object into using the Percent-Encoding. Only byte[] objects are accepted.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - the object to encode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the encoding result byte[] as Object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - if the object is not a byte array</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a byte[] Object, whose bytes are encoded with Percent-Encoding.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - the object to decode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the decoding result byte[] as Object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - if the object is not a byte array</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/PercentCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/PercentCodec.html" target="_top">Frames</a></li> +<li><a href="PercentCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/QCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/QCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..12e2a00ae08b78f0330b54ff420720e31fed5723 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/QCodec.html @@ -0,0 +1,837 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>QCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="QCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/QCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/QCodec.html" target="_top">Frames</a></li> +<li><a href="QCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.net</div> +<h2 title="Class QCodec" class="title">Class QCodec</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.net.QCodec</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">QCodec</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>, <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></pre> +<div class="block">Similar to the Quoted-Printable content-transfer-encoding defined in + <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> and designed to allow text containing mostly ASCII + characters to be decipherable on an ASCII terminal without decoding. + <p> + <a href="http://www.ietf.org/rfc/rfc1522.txt">RFC 1522</a> describes techniques to allow the encoding of non-ASCII + text in various portions of a RFC 822 [2] message header, in a manner which is unlikely to confuse existing message + handling software. + </p> + <p> + This class is conditionally thread-safe. + The instance field for encoding blanks is mutable <a href="../../../../../org/apache/commons/codec/net/QCodec.html#setEncodeBlanks-boolean-"><code>setEncodeBlanks(boolean)</code></a> + but is not volatile, and accesses are not synchronised. + If an instance of the class is shared between threads, the caller needs to ensure that suitable synchronisation + is used to ensure safe publication of the value between threads, and must not invoke + <a href="../../../../../org/apache/commons/codec/net/QCodec.html#setEncodeBlanks-boolean-"><code>setEncodeBlanks(boolean)</code></a> after initial setup. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.3</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.ietf.org/rfc/rfc1522.txt">MIME (Multipurpose Internet Mail Extensions) Part Two: Message + Header Extensions for Non-ASCII Text</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#POSTFIX">POSTFIX</a></span></code> +<div class="block">Prefix.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#PREFIX">PREFIX</a></span></code> +<div class="block">Postfix.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected static char</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#SEP">SEP</a></span></code> +<div class="block">Separator.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#QCodec--">QCodec</a></span>()</code> +<div class="block">Default constructor.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#QCodec-java.nio.charset.Charset-">QCodec</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</code> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#QCodec-java.lang.String-">QCodec</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</code> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Decodes a quoted-printable object into its original form.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#decode-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Decodes a quoted-printable string into its original form.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#decodeText-java.lang.String-">decodeText</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code> +<div class="block">Applies an RFC 1522 compliant decoding scheme to the given string of text.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code>protected byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#doDecoding-byte:A-">doDecoding</a></span>(byte[] bytes)</code> +<div class="block">Decodes an array of bytes using the defined encoding scheme.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>protected byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#doEncoding-byte:A-">doEncoding</a></span>(byte[] bytes)</code> +<div class="block">Encodes an array of bytes using the defined encoding scheme.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an object into its quoted-printable form using the default Charset.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr)</code> +<div class="block">Encodes a string into its quoted-printable form using the default Charset.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#encode-java.lang.String-java.nio.charset.Charset-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> sourceCharset)</code> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#encode-java.lang.String-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceCharset)</code> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#encodeText-java.lang.String-java.nio.charset.Charset-">encodeText</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</code> +<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#encodeText-java.lang.String-java.lang.String-">encodeText</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</code> +<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#getCharset--">getCharset</a></span>()</code> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#getDefaultCharset--">getDefaultCharset</a></span>()</code> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#getEncoding--">getEncoding</a></span>()</code> +<div class="block">Returns the codec name (referred to as encoding in the RFC 1522).</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#isEncodeBlanks--">isEncodeBlanks</a></span>()</code> +<div class="block">Tests if optional transformation of SPACE characters is to be used</div> +</td> +</tr> +<tr id="i15" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QCodec.html#setEncodeBlanks-boolean-">setEncodeBlanks</a></span>(boolean b)</code> +<div class="block">Defines whether optional transformation of SPACE characters is to be used</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="SEP"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>SEP</h4> +<pre>protected static final char SEP</pre> +<div class="block">Separator.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.net.QCodec.SEP">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="POSTFIX"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>POSTFIX</h4> +<pre>protected static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> POSTFIX</pre> +<div class="block">Prefix.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.net.QCodec.POSTFIX">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="PREFIX"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>PREFIX</h4> +<pre>protected static final <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> PREFIX</pre> +<div class="block">Postfix.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.net.QCodec.PREFIX">Constant Field Values</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="QCodec--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>QCodec</h4> +<pre>public QCodec()</pre> +<div class="block">Default constructor.</div> +</li> +</ul> +<a name="QCodec-java.nio.charset.Charset-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>QCodec</h4> +<pre>public QCodec(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</pre> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charset</code> - the default string Charset to use.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="QCodec-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>QCodec</h4> +<pre>public QCodec(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</pre> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charsetName</code> - the Charset to use.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - If the named Charset is unavailable</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7 throws UnsupportedCharsetException if the named Charset is unavailable</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="getEncoding--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getEncoding</h4> +<pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getEncoding()</pre> +<div class="block">Returns the codec name (referred to as encoding in the RFC 1522).</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>name of the codec</dd> +</dl> +</li> +</ul> +<a name="doEncoding-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>doEncoding</h4> +<pre>protected byte[] doEncoding(byte[] bytes)</pre> +<div class="block">Encodes an array of bytes using the defined encoding scheme.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - Data to be encoded</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A byte array containing the encoded data</dd> +</dl> +</li> +</ul> +<a name="doDecoding-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>doDecoding</h4> +<pre>protected byte[] doDecoding(byte[] bytes) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes an array of bytes using the defined encoding scheme.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - Data to be decoded</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>a byte array that contains decoded data</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - A decoder exception is thrown if a Decoder encounters a failure condition during the decode process.</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-java.nio.charset.Charset-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> sourceCharset) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset. Unsafe characters are escaped.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>sourceStr</code> - string to convert to quoted-printable form</dd> +<dd><code>sourceCharset</code> - the Charset for sourceStr</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>quoted-printable string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceCharset) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset. Unsafe characters are escaped.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>sourceStr</code> - string to convert to quoted-printable form</dd> +<dd><code>sourceCharset</code> - the Charset for sourceStr</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>quoted-printable string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes a string into its quoted-printable form using the default Charset. Unsafe characters are escaped.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>sourceStr</code> - string to convert to quoted-printable form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>quoted-printable string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a quoted-printable string into its original form. Escaped characters are converted back to their original + representation.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringDecoder.html#decode-java.lang.String-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - quoted-printable string to convert into its original form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>original string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - A decoder exception is thrown if a failure condition is encountered during the decode process.</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an object into its quoted-printable form using the default Charset. Unsafe characters are escaped.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - object to convert to quoted-printable form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>quoted-printable object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a quoted-printable object into its original form. Escaped characters are converted back to their original + representation.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - quoted-printable object to convert into its original form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>original object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if the argument is not a <code>String</code>. Thrown if a failure condition is encountered + during the decode process.</dd> +</dl> +</li> +</ul> +<a name="getCharset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getCharset</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> getCharset()</pre> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the default Charset name</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="getDefaultCharset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getDefaultCharset</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getDefaultCharset()</pre> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the default Charset name</dd> +</dl> +</li> +</ul> +<a name="isEncodeBlanks--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isEncodeBlanks</h4> +<pre>public boolean isEncodeBlanks()</pre> +<div class="block">Tests if optional transformation of SPACE characters is to be used</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><code>true</code> if SPACE characters are to be transformed, <code>false</code> otherwise</dd> +</dl> +</li> +</ul> +<a name="setEncodeBlanks-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setEncodeBlanks</h4> +<pre>public void setEncodeBlanks(boolean b)</pre> +<div class="block">Defines whether optional transformation of SPACE characters is to be used</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>b</code> - <code>true</code> if SPACE characters are to be transformed, <code>false</code> otherwise</dd> +</dl> +</li> +</ul> +<a name="encodeText-java.lang.String-java.nio.charset.Charset-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeText</h4> +<pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeText(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset. + <p> + This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes + <a href="../../../../../org/apache/commons/codec/net/QCodec.html#doEncoding-byte:A-"><code>doEncoding(byte [])</code></a> method of a concrete class to perform the specific encoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - a string to encode</dd> +<dd><code>charset</code> - a charset to be used</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>RFC 1522 compliant "encoded-word"</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if there is an error condition during the Encoding process.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="encodeText-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeText</h4> +<pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodeText(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a>, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> +<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset. + <p> + This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes + <a href="../../../../../org/apache/commons/codec/net/QCodec.html#doEncoding-byte:A-"><code>doEncoding(byte [])</code></a> method of a concrete class to perform the specific encoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - a string to encode</dd> +<dd><code>charsetName</code> - the charset to use</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>RFC 1522 compliant "encoded-word"</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if there is an error condition during the Encoding process.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if charset is not available</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd> +</dl> +</li> +</ul> +<a name="decodeText-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>decodeText</h4> +<pre>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> decodeText(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a>, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> +<div class="block">Applies an RFC 1522 compliant decoding scheme to the given string of text. + <p> + This method processes the "encoded-word" header common to all the RFC 1522 codecs and then invokes + <a href="../../../../../org/apache/commons/codec/net/QCodec.html#doEncoding-byte:A-"><code>doEncoding(byte [])</code></a> method of a concrete class to perform the specific decoding.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>text</code> - a string to decode</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new decoded String or <code>null</code> if the input is <code>null</code>.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - thrown if there is an error condition during the decoding process.</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - thrown if charset specified in the "encoded-word" header is not supported</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/QCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/QCodec.html" target="_top">Frames</a></li> +<li><a href="QCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/QuotedPrintableCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/QuotedPrintableCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..8087dcaa8811ed868a1c64860e5880a49861e746 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/QuotedPrintableCodec.html @@ -0,0 +1,834 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>QuotedPrintableCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="QuotedPrintableCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":9,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":9,"i12":9,"i13":10,"i14":10}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/QuotedPrintableCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/QuotedPrintableCodec.html" target="_top">Frames</a></li> +<li><a href="QuotedPrintableCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.net</div> +<h2 title="Class QuotedPrintableCodec" class="title">Class QuotedPrintableCodec</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.net.QuotedPrintableCodec</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">QuotedPrintableCodec</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>, <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></pre> +<div class="block">Codec for the Quoted-Printable section of <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>. + <p> + The Quoted-Printable encoding is intended to represent data that largely consists of octets that correspond to + printable characters in the ASCII character set. It encodes the data in such a way that the resulting octets are + unlikely to be modified by mail transport. If the data being encoded are mostly ASCII text, the encoded form of the + data remains largely recognizable by humans. A body which is entirely ASCII may also be encoded in Quoted-Printable + to ensure the integrity of the data should the message pass through a character- translating, and/or line-wrapping + gateway. + </p> + <p> + Note: + </p> + <p> + Depending on the selected <code>strict</code> parameter, this class will implement a different set of rules of the + quoted-printable spec: + </p> + <ul> + <li><code>strict=false</code>: only rules #1 and #2 are implemented</li> + <li><code>strict=true</code>: all rules #1 through #5 are implemented</li> + </ul> + <p> + Originally, this class only supported the non-strict mode, but the codec in this partial form could already be used + for certain applications that do not require quoted-printable line formatting (rules #3, #4, #5), for instance + Q codec. The strict mode has been added in 1.10. + </p> + <p> + This class is immutable and thread-safe. + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.3</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521 MIME (Multipurpose Internet Mail Extensions) Part One: + Mechanisms for Specifying and Describing the Format of Internet Message Bodies </a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#QuotedPrintableCodec--">QuotedPrintableCodec</a></span>()</code> +<div class="block">Default constructor, assumes default Charset of <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a></div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#QuotedPrintableCodec-boolean-">QuotedPrintableCodec</a></span>(boolean strict)</code> +<div class="block">Constructor which allows for the selection of the strict mode.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#QuotedPrintableCodec-java.nio.charset.Charset-">QuotedPrintableCodec</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</code> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#QuotedPrintableCodec-java.nio.charset.Charset-boolean-">QuotedPrintableCodec</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset, + boolean strict)</code> +<div class="block">Constructor which allows for the selection of a default Charset and strict mode.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#QuotedPrintableCodec-java.lang.String-">QuotedPrintableCodec</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</code> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-byte:A-">decode</a></span>(byte[] bytes)</code> +<div class="block">Decodes an array of quoted-printable characters into an array of original bytes.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Decodes a quoted-printable object into its original form.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr)</code> +<div class="block">Decodes a quoted-printable string into its original form using the default string Charset.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.String-java.nio.charset.Charset-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> sourceCharset)</code> +<div class="block">Decodes a quoted-printable string into its original form using the specified string Charset.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decode-java.lang.String-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceCharset)</code> +<div class="block">Decodes a quoted-printable string into its original form using the specified string Charset.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#decodeQuotedPrintable-byte:A-">decodeQuotedPrintable</a></span>(byte[] bytes)</code> +<div class="block">Decodes an array quoted-printable characters into an array of original bytes.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-byte:A-">encode</a></span>(byte[] bytes)</code> +<div class="block">Encodes an array of bytes into an array of quoted-printable 7-bit characters.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an object into its quoted-printable safe form.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr)</code> +<div class="block">Encodes a string into its quoted-printable form using the default string Charset.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-java.lang.String-java.nio.charset.Charset-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> sourceCharset)</code> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#encode-java.lang.String-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceCharset)</code> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#encodeQuotedPrintable-java.util.BitSet-byte:A-">encodeQuotedPrintable</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</a> printable, + byte[] bytes)</code> +<div class="block">Encodes an array of bytes into an array of quoted-printable 7-bit characters.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#encodeQuotedPrintable-java.util.BitSet-byte:A-boolean-">encodeQuotedPrintable</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</a> printable, + byte[] bytes, + boolean strict)</code> +<div class="block">Encodes an array of bytes into an array of quoted-printable 7-bit characters.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#getCharset--">getCharset</a></span>()</code> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#getDefaultCharset--">getDefaultCharset</a></span>()</code> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="QuotedPrintableCodec--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>QuotedPrintableCodec</h4> +<pre>public QuotedPrintableCodec()</pre> +<div class="block">Default constructor, assumes default Charset of <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html?is-external=true#UTF_8" title="class or interface in java.nio.charset"><code>StandardCharsets.UTF_8</code></a></div> +</li> +</ul> +<a name="QuotedPrintableCodec-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>QuotedPrintableCodec</h4> +<pre>public QuotedPrintableCodec(boolean strict)</pre> +<div class="block">Constructor which allows for the selection of the strict mode.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>strict</code> - if <code>true</code>, soft line breaks will be used</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.10</dd> +</dl> +</li> +</ul> +<a name="QuotedPrintableCodec-java.nio.charset.Charset-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>QuotedPrintableCodec</h4> +<pre>public QuotedPrintableCodec(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset)</pre> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charset</code> - the default string Charset to use.</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="QuotedPrintableCodec-java.nio.charset.Charset-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>QuotedPrintableCodec</h4> +<pre>public QuotedPrintableCodec(<a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> charset, + boolean strict)</pre> +<div class="block">Constructor which allows for the selection of a default Charset and strict mode.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charset</code> - the default string Charset to use.</dd> +<dd><code>strict</code> - if <code>true</code>, soft line breaks will be used</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.10</dd> +</dl> +</li> +</ul> +<a name="QuotedPrintableCodec-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>QuotedPrintableCodec</h4> +<pre>public QuotedPrintableCodec(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/IllegalCharsetNameException.html?is-external=true" title="class or interface in java.nio.charset">IllegalCharsetNameException</a>, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a>, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></pre> +<div class="block">Constructor which allows for the selection of a default Charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charsetName</code> - the default string Charset to use.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - If no support for the named Charset is available + in this instance of the Java virtual machine</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If the given charsetName is null</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/IllegalCharsetNameException.html?is-external=true" title="class or interface in java.nio.charset">IllegalCharsetNameException</a></code> - If the given Charset name is illegal</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7 throws UnsupportedCharsetException if the named Charset is unavailable</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encodeQuotedPrintable-java.util.BitSet-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeQuotedPrintable</h4> +<pre>public static final byte[] encodeQuotedPrintable(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</a> printable, + byte[] bytes)</pre> +<div class="block">Encodes an array of bytes into an array of quoted-printable 7-bit characters. Unsafe characters are escaped. + <p> + This function implements a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in + RFC 1521 and is suitable for encoding binary data and unformatted text.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>printable</code> - bitset of characters deemed quoted-printable</dd> +<dd><code>bytes</code> - array of bytes to be encoded</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>array of bytes containing quoted-printable data</dd> +</dl> +</li> +</ul> +<a name="encodeQuotedPrintable-java.util.BitSet-byte:A-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeQuotedPrintable</h4> +<pre>public static final byte[] encodeQuotedPrintable(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</a> printable, + byte[] bytes, + boolean strict)</pre> +<div class="block">Encodes an array of bytes into an array of quoted-printable 7-bit characters. Unsafe characters are escaped. + <p> + Depending on the selection of the <code>strict</code> parameter, this function either implements the full ruleset + or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in + RFC 1521 and is suitable for encoding binary data and unformatted text.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>printable</code> - bitset of characters deemed quoted-printable</dd> +<dd><code>bytes</code> - array of bytes to be encoded</dd> +<dd><code>strict</code> - if <code>true</code> the full ruleset is used, otherwise only rule #1 and rule #2</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>array of bytes containing quoted-printable data</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.10</dd> +</dl> +</li> +</ul> +<a name="decodeQuotedPrintable-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decodeQuotedPrintable</h4> +<pre>public static final byte[] decodeQuotedPrintable(byte[] bytes) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes an array quoted-printable characters into an array of original bytes. Escaped characters are converted + back to their original representation. + <p> + This function fully implements the quoted-printable encoding specification (rule #1 through rule #5) as + defined in RFC 1521.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - array of quoted-printable characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>array of original bytes</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if quoted-printable decoding is unsuccessful</dd> +</dl> +</li> +</ul> +<a name="encode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public byte[] encode(byte[] bytes)</pre> +<div class="block">Encodes an array of bytes into an array of quoted-printable 7-bit characters. Unsafe characters are escaped. + <p> + Depending on the selection of the <code>strict</code> parameter, this function either implements the full ruleset + or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in + RFC 1521 and is suitable for encoding binary data and unformatted text.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - array of bytes to be encoded</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>array of bytes containing quoted-printable data</dd> +</dl> +</li> +</ul> +<a name="decode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public byte[] decode(byte[] bytes) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes an array of quoted-printable characters into an array of original bytes. Escaped characters are converted + back to their original representation. + <p> + This function fully implements the quoted-printable encoding specification (rule #1 through rule #5) as + defined in RFC 1521.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html#decode-byte:A-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - array of quoted-printable characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>array of original bytes</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if quoted-printable decoding is unsuccessful</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes a string into its quoted-printable form using the default string Charset. Unsafe characters are escaped. + <p> + Depending on the selection of the <code>strict</code> parameter, this function either implements the full ruleset + or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in + RFC 1521 and is suitable for encoding binary data and unformatted text.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>sourceStr</code> - string to convert to quoted-printable form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>quoted-printable string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - Thrown if quoted-printable encoding is unsuccessful</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#getCharset--"><code>getCharset()</code></a></dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.String-java.nio.charset.Charset-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> sourceCharset) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a quoted-printable string into its original form using the specified string Charset. Escaped characters + are converted back to their original representation.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>sourceStr</code> - quoted-printable string to convert into its original form</dd> +<dd><code>sourceCharset</code> - the original string Charset</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>original string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if quoted-printable decoding is unsuccessful</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceCharset) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a>, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> +<div class="block">Decodes a quoted-printable string into its original form using the specified string Charset. Escaped characters + are converted back to their original representation.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>sourceStr</code> - quoted-printable string to convert into its original form</dd> +<dd><code>sourceCharset</code> - the original string Charset</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>original string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if quoted-printable decoding is unsuccessful</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - Thrown if Charset is not supported</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a quoted-printable string into its original form using the default string Charset. Escaped characters are + converted back to their original representation.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringDecoder.html#decode-java.lang.String-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>sourceStr</code> - quoted-printable string to convert into its original form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>original string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if quoted-printable decoding is unsuccessful. Thrown if Charset is not supported.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html#getCharset--"><code>getCharset()</code></a></dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an object into its quoted-printable safe form. Unsafe characters are escaped.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - string to convert to a quoted-printable form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>quoted-printable object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - Thrown if quoted-printable encoding is not applicable to objects of this type or if encoding is + unsuccessful</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a quoted-printable object into its original form. Escaped characters are converted back to their original + representation.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - quoted-printable object to convert into its original form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>original object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if the argument is not a <code>String</code> or <code>byte[]</code>. Thrown if a failure + condition is encountered during the decode process.</dd> +</dl> +</li> +</ul> +<a name="getCharset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getCharset</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> getCharset()</pre> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the default Charset name</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="getDefaultCharset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getDefaultCharset</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getDefaultCharset()</pre> +<div class="block">Gets the default Charset name used for string decoding and encoding.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the default Charset name</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-java.nio.charset.Charset-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> sourceCharset)</pre> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset. Unsafe characters are escaped. + <p> + Depending on the selection of the <code>strict</code> parameter, this function either implements the full ruleset + or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in + RFC 1521 and is suitable for encoding binary data and unformatted text.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>sourceStr</code> - string to convert to quoted-printable form</dd> +<dd><code>sourceCharset</code> - the Charset for sourceStr</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>quoted-printable string</dd> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.7</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceStr, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sourceCharset) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> +<div class="block">Encodes a string into its quoted-printable form using the specified Charset. Unsafe characters are escaped. + <p> + Depending on the selection of the <code>strict</code> parameter, this function either implements the full ruleset + or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in + RFC 1521 and is suitable for encoding binary data and unformatted text.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>sourceStr</code> - string to convert to quoted-printable form</dd> +<dd><code>sourceCharset</code> - the Charset for sourceStr</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>quoted-printable string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - Thrown if the Charset is not supported</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/QuotedPrintableCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/QuotedPrintableCodec.html" target="_top">Frames</a></li> +<li><a href="QuotedPrintableCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/URLCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/URLCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..42d6176da454af045016646dbdf3bff07f5b0329 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/URLCodec.html @@ -0,0 +1,708 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>URLCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="URLCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":9,"i5":10,"i6":10,"i7":10,"i8":10,"i9":9,"i10":10,"i11":42}; +var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; +var altColor = "altColor"; +var rowColor = "rowColor"; +var tableTab = "tableTab"; +var activeTableTab = "activeTableTab"; +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/URLCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/URLCodec.html" target="_top">Frames</a></li> +<li><a href="URLCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<!-- ======== START OF CLASS DATA ======== --> +<div class="header"> +<div class="subTitle">org.apache.commons.codec.net</div> +<h2 title="Class URLCodec" class="title">Class URLCodec</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.commons.codec.net.URLCodec</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="typeNameLabel">URLCodec</span> +extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, <a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>, <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></pre> +<div class="block">Implements the 'www-form-urlencoded' encoding scheme, also misleadingly known as URL encoding. + <p> + This codec is meant to be a replacement for standard Java classes <a href="https://docs.oracle.com/javase/7/docs/api/java/net/URLEncoder.html?is-external=true" title="class or interface in java.net"><code>URLEncoder</code></a> and + <a href="https://docs.oracle.com/javase/7/docs/api/java/net/URLDecoder.html?is-external=true" title="class or interface in java.net"><code>URLDecoder</code></a> on older Java platforms, as these classes in Java versions below + 1.4 rely on the platform's default charset encoding. + </p> + <p> + This class is thread-safe as of 1.11 + </p></div> +<dl> +<dt><span class="simpleTagLabel">Since:</span></dt> +<dd>1.2</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1">Chapter 17.13.4 Form content types</a> + of the <a href="http://www.w3.org/TR/html4/">HTML 4.01 Specification</a></dd> +</dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- =========== FIELD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.summary"> +<!-- --> +</a> +<h3>Field Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> +<caption><span>Fields</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Field and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#charset">charset</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">TODO: This field will be changed to a private final Charset in 2.0. (CODEC-126)</span></div> +</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected static byte</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#ESCAPE_CHAR">ESCAPE_CHAR</a></span></code> +<div class="block">Release 1.5 made this field final.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#WWW_FORM_URL">WWW_FORM_URL</a></span></code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">1.11 Will be removed in 2.0 (CODEC-230)</span></div> +</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#URLCodec--">URLCodec</a></span>()</code> +<div class="block">Default constructor.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#URLCodec-java.lang.String-">URLCodec</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charset)</code> +<div class="block">Constructor which allows for the selection of a default charset.</div> +</td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr id="i0" class="altColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#decode-byte:A-">decode</a></span>(byte[] bytes)</code> +<div class="block">Decodes an array of URL safe 7-bit characters into an array of original bytes.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#decode-java.lang.Object-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Decodes a URL safe object into its original form.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#decode-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Decodes a URL safe string into its original form using the default string charset.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#decode-java.lang.String-java.lang.String-">decode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</code> +<div class="block">Decodes a URL safe string into its original form using the specified encoding.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#decodeUrl-byte:A-">decodeUrl</a></span>(byte[] bytes)</code> +<div class="block">Decodes an array of URL safe 7-bit characters into an array of original bytes.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code>byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#encode-byte:A-">encode</a></span>(byte[] bytes)</code> +<div class="block">Encodes an array of bytes into an array of URL safe 7-bit characters.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#encode-java.lang.Object-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code> +<div class="block">Encodes an object into its URL safe form.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#encode-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> +<div class="block">Encodes a string into its URL safe form using the default string charset.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#encode-java.lang.String-java.lang.String-">encode</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName)</code> +<div class="block">Encodes a string into its URL safe form using the specified string charset.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code>static byte[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#encodeUrl-java.util.BitSet-byte:A-">encodeUrl</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</a> urlsafe, + byte[] bytes)</code> +<div class="block">Encodes an array of bytes into an array of URL safe 7-bit characters.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#getDefaultCharset--">getDefaultCharset</a></span>()</code> +<div class="block">The default charset used for string decoding and encoding.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#getEncoding--">getEncoding</a></span>()</code> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> +<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/net/URLCodec.html#getDefaultCharset--"><code>getDefaultCharset()</code></a>, will be removed in 2.0.</span></div> +</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> +<!-- --> +</a> +<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ FIELD DETAIL =========== --> +<ul class="blockList"> +<li class="blockList"><a name="field.detail"> +<!-- --> +</a> +<h3>Field Detail</h3> +<a name="charset"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>charset</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +protected volatile <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charset</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">TODO: This field will be changed to a private final Charset in 2.0. (CODEC-126)</span></div> +<div class="block">The default charset used for string decoding and encoding.</div> +</li> +</ul> +<a name="ESCAPE_CHAR"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>ESCAPE_CHAR</h4> +<pre>protected static final byte ESCAPE_CHAR</pre> +<div class="block">Release 1.5 made this field final.</div> +<dl> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../constant-values.html#org.apache.commons.codec.net.URLCodec.ESCAPE_CHAR">Constant Field Values</a></dd> +</dl> +</li> +</ul> +<a name="WWW_FORM_URL"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>WWW_FORM_URL</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +protected static final <a href="https://docs.oracle.com/javase/7/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</a> WWW_FORM_URL</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">1.11 Will be removed in 2.0 (CODEC-230)</span></div> +<div class="block">BitSet of www-form-url safe characters. + This is a copy of the internal BitSet which is now used for the conversion. + Changes to this field are ignored.</div> +</li> +</ul> +</li> +</ul> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor.detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="URLCodec--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>URLCodec</h4> +<pre>public URLCodec()</pre> +<div class="block">Default constructor.</div> +</li> +</ul> +<a name="URLCodec-java.lang.String-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>URLCodec</h4> +<pre>public URLCodec(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charset)</pre> +<div class="block">Constructor which allows for the selection of a default charset.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>charset</code> - the default string charset to use.</dd> +</dl> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method.detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="encodeUrl-java.util.BitSet-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encodeUrl</h4> +<pre>public static final byte[] encodeUrl(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/BitSet.html?is-external=true" title="class or interface in java.util">BitSet</a> urlsafe, + byte[] bytes)</pre> +<div class="block">Encodes an array of bytes into an array of URL safe 7-bit characters. Unsafe characters are escaped.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>urlsafe</code> - bitset of characters deemed URL safe</dd> +<dd><code>bytes</code> - array of bytes to convert to URL safe characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>array of bytes containing URL safe characters</dd> +</dl> +</li> +</ul> +<a name="decodeUrl-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decodeUrl</h4> +<pre>public static final byte[] decodeUrl(byte[] bytes) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes an array of URL safe 7-bit characters into an array of original bytes. Escaped characters are converted + back to their original representation.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - array of URL safe characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>array of original bytes</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if URL decoding is unsuccessful</dd> +</dl> +</li> +</ul> +<a name="encode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public byte[] encode(byte[] bytes)</pre> +<div class="block">Encodes an array of bytes into an array of URL safe 7-bit characters. Unsafe characters are escaped.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode-byte:A-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - array of bytes to convert to URL safe characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>array of bytes containing URL safe characters</dd> +</dl> +</li> +</ul> +<a name="decode-byte:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public byte[] decode(byte[] bytes) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes an array of URL safe 7-bit characters into an array of original bytes. Escaped characters are converted + back to their original representation.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html#decode-byte:A-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>bytes</code> - array of URL safe characters</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>array of original bytes</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if URL decoding is unsuccessful</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName) + throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> +<div class="block">Encodes a string into its URL safe form using the specified string charset. Unsafe characters are escaped.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - string to convert to a URL safe form</dd> +<dd><code>charsetName</code> - the charset for str</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>URL safe string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - Thrown if charset is not supported</dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes a string into its URL safe form using the default string charset. Unsafe characters are escaped.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode-java.lang.String-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - string to convert to a URL safe form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>URL safe string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - Thrown if URL encoding is unsuccessful</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#getDefaultCharset--"><code>getDefaultCharset()</code></a></dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.String-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str, + <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> charsetName) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a>, + <a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> +<div class="block">Decodes a URL safe string into its original form using the specified encoding. Escaped characters are converted + back to their original representation.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - URL safe string to convert into its original form</dd> +<dd><code>charsetName</code> - the original string charset</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>original string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if URL decoding is unsuccessful</dd> +<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - Thrown if charset is not supported</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.String-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a URL safe string into its original form using the default string charset. Escaped characters are + converted back to their original representation.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/StringDecoder.html#decode-java.lang.String-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>str</code> - URL safe string to convert into its original form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>original string</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if URL decoding is unsuccessful</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../../org/apache/commons/codec/net/URLCodec.html#getDefaultCharset--"><code>getDefaultCharset()</code></a></dd> +</dl> +</li> +</ul> +<a name="encode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>encode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> encode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre> +<div class="block">Encodes an object into its URL safe form. Unsafe characters are escaped.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode-java.lang.Object-">encode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - string to convert to a URL safe form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>URL safe object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - Thrown if URL encoding is not applicable to objects of this type or if encoding is unsuccessful</dd> +</dl> +</li> +</ul> +<a name="decode-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>decode</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> decode(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj) + throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre> +<div class="block">Decodes a URL safe object into its original form. Escaped characters are converted back to their original + representation.</div> +<dl> +<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/Decoder.html#decode-java.lang.Object-">decode</a></code> in interface <code><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></code></dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>obj</code> - URL safe object to convert into its original form</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>original object</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if the argument is not a <code>String</code> or <code>byte[]</code>. Thrown if a failure + condition is encountered during the decode process.</dd> +</dl> +</li> +</ul> +<a name="getDefaultCharset--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getDefaultCharset</h4> +<pre>public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getDefaultCharset()</pre> +<div class="block">The default charset used for string decoding and encoding.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the default string charset.</dd> +</dl> +</li> +</ul> +<a name="getEncoding--"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>getEncoding</h4> +<pre><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> +public <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getEncoding()</pre> +<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../../../../org/apache/commons/codec/net/URLCodec.html#getDefaultCharset--"><code>getDefaultCharset()</code></a>, will be removed in 2.0.</span></div> +<div class="block">The <code>String</code> encoding used for decoding and encoding.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>Returns the encoding.</dd> +</dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li class="navBarCell1Rev">Class</li> +<li><a href="class-use/URLCodec.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/URLCodec.html" target="_top">Frames</a></li> +<li><a href="URLCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<div> +<ul class="subNavList"> +<li>Summary: </li> +<li>Nested | </li> +<li><a href="#field.summary">Field</a> | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li><a href="#field.detail">Field</a> | </li> +<li><a href="#constructor.detail">Constr</a> | </li> +<li><a href="#method.detail">Method</a></li> +</ul> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/BCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/BCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..f5426fc3a96ff4a3923ca1135a3a5325d0b24db1 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/BCodec.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.net.BCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.net.BCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/net/class-use/BCodec.html" target="_top">Frames</a></li> +<li><a href="BCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.net.BCodec" class="title">Uses of Class<br>org.apache.commons.codec.net.BCodec</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.net.BCodec</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/net/class-use/BCodec.html" target="_top">Frames</a></li> +<li><a href="BCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/PercentCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/PercentCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..a53a30ec4e38f5f0cf78a6efe3752efec66bcb50 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/PercentCodec.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.net.PercentCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.net.PercentCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/net/class-use/PercentCodec.html" target="_top">Frames</a></li> +<li><a href="PercentCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.net.PercentCodec" class="title">Uses of Class<br>org.apache.commons.codec.net.PercentCodec</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.net.PercentCodec</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/net/class-use/PercentCodec.html" target="_top">Frames</a></li> +<li><a href="PercentCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/QCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/QCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..4da0a46f4d8626681df05d86a8b7769e5c7942d1 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/QCodec.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.net.QCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.net.QCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/net/class-use/QCodec.html" target="_top">Frames</a></li> +<li><a href="QCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.net.QCodec" class="title">Uses of Class<br>org.apache.commons.codec.net.QCodec</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.net.QCodec</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/net/class-use/QCodec.html" target="_top">Frames</a></li> +<li><a href="QCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/QuotedPrintableCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/QuotedPrintableCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..63ad688a4361945e8664865e3e3a4a6bf1e1db19 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/QuotedPrintableCodec.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.net.QuotedPrintableCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.net.QuotedPrintableCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/net/class-use/QuotedPrintableCodec.html" target="_top">Frames</a></li> +<li><a href="QuotedPrintableCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.net.QuotedPrintableCodec" class="title">Uses of Class<br>org.apache.commons.codec.net.QuotedPrintableCodec</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.net.QuotedPrintableCodec</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/net/class-use/QuotedPrintableCodec.html" target="_top">Frames</a></li> +<li><a href="QuotedPrintableCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/URLCodec.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/URLCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..73eadc589639fd7c9423185a33ba9fa651f43940 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/class-use/URLCodec.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.codec.net.URLCodec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.codec.net.URLCodec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/net/class-use/URLCodec.html" target="_top">Frames</a></li> +<li><a href="URLCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.codec.net.URLCodec" class="title">Uses of Class<br>org.apache.commons.codec.net.URLCodec</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.codec.net.URLCodec</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../index.html?org/apache/commons/codec/net/class-use/URLCodec.html" target="_top">Frames</a></li> +<li><a href="URLCodec.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-frame.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-frame.html new file mode 100644 index 0000000000000000000000000000000000000000..3f050e18b1f32a580e09ed98a5048e2b804dca18 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-frame.html @@ -0,0 +1,24 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.net (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<h1 class="bar"><a href="../../../../../org/apache/commons/codec/net/package-summary.html" target="classFrame">org.apache.commons.codec.net</a></h1> +<div class="indexContainer"> +<h2 title="Classes">Classes</h2> +<ul title="Classes"> +<li><a href="BCodec.html" title="class in org.apache.commons.codec.net" target="classFrame">BCodec</a></li> +<li><a href="PercentCodec.html" title="class in org.apache.commons.codec.net" target="classFrame">PercentCodec</a></li> +<li><a href="QCodec.html" title="class in org.apache.commons.codec.net" target="classFrame">QCodec</a></li> +<li><a href="QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net" target="classFrame">QuotedPrintableCodec</a></li> +<li><a href="URLCodec.html" title="class in org.apache.commons.codec.net" target="classFrame">URLCodec</a></li> +</ul> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-summary.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-summary.html new file mode 100644 index 0000000000000000000000000000000000000000..0bfb41ef813d9eafbb1abd1b96092d4fa1468f1f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-summary.html @@ -0,0 +1,184 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.net (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.net (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/bm/package-summary.html">Prev Package</a></li> +<li>Next Package</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Package" class="title">Package org.apache.commons.codec.net</h1> +<div class="docSummary"> +<div class="block"> + Network related encoding and decoding.</div> +</div> +<p>See: <a href="#package.description">Description</a></p> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> +<caption><span>Class Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Class</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net">BCodec</a></td> +<td class="colLast"> +<div class="block">Identical to the Base64 encoding defined by <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> + and allows a character set to be specified.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net">PercentCodec</a></td> +<td class="colLast"> +<div class="block">Implements the Percent-Encoding scheme, as described in HTTP 1.1 specification.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net">QCodec</a></td> +<td class="colLast"> +<div class="block">Similar to the Quoted-Printable content-transfer-encoding defined in + <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> and designed to allow text containing mostly ASCII + characters to be decipherable on an ASCII terminal without decoding.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net">QuotedPrintableCodec</a></td> +<td class="colLast"> +<div class="block">Codec for the Quoted-Printable section of <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net">URLCodec</a></td> +<td class="colLast"> +<div class="block">Implements the 'www-form-urlencoded' encoding scheme, also misleadingly known as URL encoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +<a name="package.description"> +<!-- --> +</a> +<h2 title="Package org.apache.commons.codec.net Description">Package org.apache.commons.codec.net Description</h2> +<div class="block"><p> + Network related encoding and decoding. + </p></div> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/bm/package-summary.html">Prev Package</a></li> +<li>Next Package</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-tree.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-tree.html new file mode 100644 index 0000000000000000000000000000000000000000..2b4612a1ef55763e2ca57b01923a8bb7cf111867 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-tree.html @@ -0,0 +1,142 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec.net Class Hierarchy (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec.net Class Hierarchy (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/bm/package-tree.html">Prev</a></li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 class="title">Hierarchy For Package org.apache.commons.codec.net</h1> +<span class="packageHierarchyLabel">Package Hierarchies:</span> +<ul class="horizontal"> +<li><a href="../../../../../overview-tree.html">All Packages</a></li> +</ul> +</div> +<div class="contentContainer"> +<h2 title="Class Hierarchy">Class Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">org.apache.commons.codec.net.<a href="../../../../../org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">BCodec</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.net.<a href="../../../../../org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">PercentCodec</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.net.<a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">QCodec</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.net.<a href="../../../../../org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">QuotedPrintableCodec</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.net.<a href="../../../../../org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">URLCodec</span></a> (implements org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, org.apache.commons.codec.<a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../../../org/apache/commons/codec/language/bm/package-tree.html">Prev</a></li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-use.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-use.html new file mode 100644 index 0000000000000000000000000000000000000000..abbcb07af4b74a252ae2aa3476bff254d412853e --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/net/package-use.html @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Package org.apache.commons.codec.net (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Package org.apache.commons.codec.net (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Uses of Package org.apache.commons.codec.net" class="title">Uses of Package<br>org.apache.commons.codec.net</h1> +</div> +<div class="contentContainer">No usage of org.apache.commons.codec.net</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/commons/codec/net/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-frame.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-frame.html new file mode 100644 index 0000000000000000000000000000000000000000..6e5742bc9e6fb26fe4c55ed9da7cda49e3f00037 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-frame.html @@ -0,0 +1,41 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<h1 class="bar"><a href="../../../../org/apache/commons/codec/package-summary.html" target="classFrame">org.apache.commons.codec</a></h1> +<div class="indexContainer"> +<h2 title="Interfaces">Interfaces</h2> +<ul title="Interfaces"> +<li><a href="BinaryDecoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">BinaryDecoder</span></a></li> +<li><a href="BinaryEncoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">BinaryEncoder</span></a></li> +<li><a href="Decoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">Decoder</span></a></li> +<li><a href="Encoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">Encoder</span></a></li> +<li><a href="StringDecoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">StringDecoder</span></a></li> +<li><a href="StringEncoder.html" title="interface in org.apache.commons.codec" target="classFrame"><span class="interfaceName">StringEncoder</span></a></li> +</ul> +<h2 title="Classes">Classes</h2> +<ul title="Classes"> +<li><a href="CharEncoding.html" title="class in org.apache.commons.codec" target="classFrame">CharEncoding</a></li> +<li><a href="Charsets.html" title="class in org.apache.commons.codec" target="classFrame">Charsets</a></li> +<li><a href="Resources.html" title="class in org.apache.commons.codec" target="classFrame">Resources</a></li> +<li><a href="StringEncoderComparator.html" title="class in org.apache.commons.codec" target="classFrame">StringEncoderComparator</a></li> +</ul> +<h2 title="Enums">Enums</h2> +<ul title="Enums"> +<li><a href="CodecPolicy.html" title="enum in org.apache.commons.codec" target="classFrame">CodecPolicy</a></li> +</ul> +<h2 title="Exceptions">Exceptions</h2> +<ul title="Exceptions"> +<li><a href="DecoderException.html" title="class in org.apache.commons.codec" target="classFrame">DecoderException</a></li> +<li><a href="EncoderException.html" title="class in org.apache.commons.codec" target="classFrame">EncoderException</a></li> +</ul> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-summary.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-summary.html new file mode 100644 index 0000000000000000000000000000000000000000..1bd4e9ab1adc7b63b28a507020df70e848337403 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-summary.html @@ -0,0 +1,279 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Package</li> +<li><a href="../../../../org/apache/commons/codec/binary/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Package" class="title">Package org.apache.commons.codec</h1> +<div class="docSummary"> +<div class="block">Interfaces and classes used by the various implementations in + the sub-packages.</div> +</div> +<p>See: <a href="#package.description">Description</a></p> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation"> +<caption><span>Interface Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Interface</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a></td> +<td class="colLast"> +<div class="block">Defines common decoding methods for byte array decoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a></td> +<td class="colLast"> +<div class="block">Defines common encoding methods for byte array encoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></td> +<td class="colLast"> +<div class="block">Provides the highest level of abstraction for Decoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></td> +<td class="colLast"> +<div class="block">Provides the highest level of abstraction for Encoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></td> +<td class="colLast"> +<div class="block">Defines common decoding methods for String decoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></td> +<td class="colLast"> +<div class="block">Defines common encoding methods for String encoders.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> +<caption><span>Class Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Class</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec">CharEncoding</a></td> +<td class="colLast"> +<div class="block">Character encoding names required of every implementation of the Java platform.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec">Charsets</a></td> +<td class="colLast"> +<div class="block">Charsets required of every implementation of the Java platform.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec">Resources</a></td> +<td class="colLast"> +<div class="block">Consider this class package private.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec">StringEncoderComparator</a></td> +<td class="colLast"> +<div class="block">Compares Strings using a <a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><code>StringEncoder</code></a>.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Summary table, listing enums, and an explanation"> +<caption><span>Enum Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Enum</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec">CodecPolicy</a></td> +<td class="colLast"> +<div class="block">Defines encoding and decoding policies.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"> +<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Exception Summary table, listing exceptions, and an explanation"> +<caption><span>Exception Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Exception</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></td> +<td class="colLast"> +<div class="block">Thrown when there is a failure condition during the decoding process.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></td> +<td class="colLast"> +<div class="block">Thrown when there is a failure condition during the encoding process.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +<a name="package.description"> +<!-- --> +</a> +<h2 title="Package org.apache.commons.codec Description">Package org.apache.commons.codec Description</h2> +<div class="block"><p>Interfaces and classes used by the various implementations in + the sub-packages.</p> + + <p>Definitive implementations of commonly used encoders and + decoders.</p> + + <p>Codec is currently comprised of a modest set of utilities and a + simple framework for String encoding and decoding in the following + packages:</p> + + <ul> + <li><a href="binary/package-summary.html">Binary codecs.</a></li> + <li><a href="cli/package-summary.html">Command line utility.</a></li> + <li><a href="digest/package-summary.html">Digests and hashers</a></li> + <li><a href="language/package-summary.html">Common language + and phonetic encoders.</a></li> + <li><a href="language/bm/package-summary.html">Beider-Morse + codec.</a></li> + <li><a href="net/package-summary.html">Network codecs.</a></li> + </ul></div> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li class="navBarCell1Rev">Package</li> +<li>Class</li> +<li><a href="package-use.html">Use</a></li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev Package</li> +<li><a href="../../../../org/apache/commons/codec/binary/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-tree.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-tree.html new file mode 100644 index 0000000000000000000000000000000000000000..70b66a9792f0ebc7c8b01585d3b110e48f29d12d --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-tree.html @@ -0,0 +1,178 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>org.apache.commons.codec Class Hierarchy (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="org.apache.commons.codec Class Hierarchy (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li><a href="../../../../org/apache/commons/codec/binary/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 class="title">Hierarchy For Package org.apache.commons.codec</h1> +<span class="packageHierarchyLabel">Package Hierarchies:</span> +<ul class="horizontal"> +<li><a href="../../../../overview-tree.html">All Packages</a></li> +</ul> +</div> +<div class="contentContainer"> +<h2 title="Class Hierarchy">Class Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec"><span class="typeNameLink">CharEncoding</span></a></li> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Charsets</span></a></li> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Resources</span></a></li> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec"><span class="typeNameLink">StringEncoderComparator</span></a> (implements java.util.<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a><T>)</li> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Throwable</span></a> (implements java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>) +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Exception</span></a> +<ul> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">DecoderException</span></a></li> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">EncoderException</span></a></li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +</ul> +<h2 title="Interface Hierarchy">Interface Hierarchy</h2> +<ul> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Decoder</span></a> +<ul> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">BinaryDecoder</span></a></li> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">StringDecoder</span></a></li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Encoder</span></a> +<ul> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">BinaryEncoder</span></a></li> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">StringEncoder</span></a></li> +</ul> +</li> +</ul> +<h2 title="Enum Hierarchy">Enum Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Enum</span></a><E> (implements java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><T>, java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>) +<ul> +<li type="circle">org.apache.commons.codec.<a href="../../../../org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec"><span class="typeNameLink">CodecPolicy</span></a></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li><a href="../../../../org/apache/commons/codec/binary/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-use.html b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-use.html new file mode 100644 index 0000000000000000000000000000000000000000..8de479177011918c83471749a41173f03d6d2120 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/org/apache/commons/codec/package-use.html @@ -0,0 +1,372 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Package org.apache.commons.codec (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Package org.apache.commons.codec (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Uses of Package org.apache.commons.codec" class="title">Uses of Package<br>org.apache.commons.codec</h1> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> +<caption><span>Packages that use <a href="../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec">org.apache.commons.codec</a></td> +<td class="colLast"> +<div class="block">Interfaces and classes used by the various implementations in + the sub-packages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.binary">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language">org.apache.commons.codec.language</a></td> +<td class="colLast"> +<div class="block"> + Language and phonetic encoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.language.bm">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="#org.apache.commons.codec.net">org.apache.commons.codec.net</a></td> +<td class="colLast"> +<div class="block"> + Network related encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec"> +<!-- --> +</a> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a> used by <a href="../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/CodecPolicy.html#org.apache.commons.codec">CodecPolicy</a> +<div class="block">Defines encoding and decoding policies.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/Decoder.html#org.apache.commons.codec">Decoder</a> +<div class="block">Provides the highest level of abstraction for Decoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/DecoderException.html#org.apache.commons.codec">DecoderException</a> +<div class="block">Thrown when there is a failure condition during the decoding process.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/Encoder.html#org.apache.commons.codec">Encoder</a> +<div class="block">Provides the highest level of abstraction for Encoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/EncoderException.html#org.apache.commons.codec">EncoderException</a> +<div class="block">Thrown when there is a failure condition during the encoding process.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/StringEncoder.html#org.apache.commons.codec">StringEncoder</a> +<div class="block">Defines common encoding methods for String encoders.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.binary"> +<!-- --> +</a> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a> used by <a href="../../../../org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/BinaryDecoder.html#org.apache.commons.codec.binary">BinaryDecoder</a> +<div class="block">Defines common decoding methods for byte array decoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/BinaryEncoder.html#org.apache.commons.codec.binary">BinaryEncoder</a> +<div class="block">Defines common encoding methods for byte array encoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/CodecPolicy.html#org.apache.commons.codec.binary">CodecPolicy</a> +<div class="block">Defines encoding and decoding policies.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/Decoder.html#org.apache.commons.codec.binary">Decoder</a> +<div class="block">Provides the highest level of abstraction for Decoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/DecoderException.html#org.apache.commons.codec.binary">DecoderException</a> +<div class="block">Thrown when there is a failure condition during the decoding process.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/Encoder.html#org.apache.commons.codec.binary">Encoder</a> +<div class="block">Provides the highest level of abstraction for Encoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/EncoderException.html#org.apache.commons.codec.binary">EncoderException</a> +<div class="block">Thrown when there is a failure condition during the encoding process.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.language"> +<!-- --> +</a> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a> used by <a href="../../../../org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/Encoder.html#org.apache.commons.codec.language">Encoder</a> +<div class="block">Provides the highest level of abstraction for Encoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/EncoderException.html#org.apache.commons.codec.language">EncoderException</a> +<div class="block">Thrown when there is a failure condition during the encoding process.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/StringEncoder.html#org.apache.commons.codec.language">StringEncoder</a> +<div class="block">Defines common encoding methods for String encoders.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.language.bm"> +<!-- --> +</a> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a> used by <a href="../../../../org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/Encoder.html#org.apache.commons.codec.language.bm">Encoder</a> +<div class="block">Provides the highest level of abstraction for Encoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/EncoderException.html#org.apache.commons.codec.language.bm">EncoderException</a> +<div class="block">Thrown when there is a failure condition during the encoding process.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/StringEncoder.html#org.apache.commons.codec.language.bm">StringEncoder</a> +<div class="block">Defines common encoding methods for String encoders.</div> +</td> +</tr> +</tbody> +</table> +</li> +<li class="blockList"><a name="org.apache.commons.codec.net"> +<!-- --> +</a> +<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> +<caption><span>Classes in <a href="../../../../org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a> used by <a href="../../../../org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Class and Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/BinaryDecoder.html#org.apache.commons.codec.net">BinaryDecoder</a> +<div class="block">Defines common decoding methods for byte array decoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/BinaryEncoder.html#org.apache.commons.codec.net">BinaryEncoder</a> +<div class="block">Defines common encoding methods for byte array encoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/CodecPolicy.html#org.apache.commons.codec.net">CodecPolicy</a> +<div class="block">Defines encoding and decoding policies.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/Decoder.html#org.apache.commons.codec.net">Decoder</a> +<div class="block">Provides the highest level of abstraction for Decoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/DecoderException.html#org.apache.commons.codec.net">DecoderException</a> +<div class="block">Thrown when there is a failure condition during the decoding process.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/Encoder.html#org.apache.commons.codec.net">Encoder</a> +<div class="block">Provides the highest level of abstraction for Encoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/EncoderException.html#org.apache.commons.codec.net">EncoderException</a> +<div class="block">Thrown when there is a failure condition during the encoding process.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/StringDecoder.html#org.apache.commons.codec.net">StringDecoder</a> +<div class="block">Defines common decoding methods for String decoders.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><a href="../../../../org/apache/commons/codec/class-use/StringEncoder.html#org.apache.commons.codec.net">StringEncoder</a> +<div class="block">Defines common encoding methods for String encoders.</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../overview-summary.html">Overview</a></li> +<li><a href="package-summary.html">Package</a></li> +<li>Class</li> +<li class="navBarCell1Rev">Use</li> +<li><a href="package-tree.html">Tree</a></li> +<li><a href="../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../index-all.html">Index</a></li> +<li><a href="../../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/commons/codec/package-use.html" target="_top">Frames</a></li> +<li><a href="package-use.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/overview-frame.html b/WebServer/commons-codec-1.15/apidocs/overview-frame.html new file mode 100644 index 0000000000000000000000000000000000000000..6f179385ff5baaf516a982d911dc0d455531a393 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/overview-frame.html @@ -0,0 +1,27 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Overview List (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> +<script type="text/javascript" src="script.js"></script> +</head> +<body> +<div class="indexHeader"><span><a href="allclasses-frame.html" target="packageFrame">All Classes</a></span></div> +<div class="indexContainer"> +<h2 title="Packages">Packages</h2> +<ul title="Packages"> +<li><a href="org/apache/commons/codec/package-frame.html" target="packageFrame">org.apache.commons.codec</a></li> +<li><a href="org/apache/commons/codec/binary/package-frame.html" target="packageFrame">org.apache.commons.codec.binary</a></li> +<li><a href="org/apache/commons/codec/cli/package-frame.html" target="packageFrame">org.apache.commons.codec.cli</a></li> +<li><a href="org/apache/commons/codec/digest/package-frame.html" target="packageFrame">org.apache.commons.codec.digest</a></li> +<li><a href="org/apache/commons/codec/language/package-frame.html" target="packageFrame">org.apache.commons.codec.language</a></li> +<li><a href="org/apache/commons/codec/language/bm/package-frame.html" target="packageFrame">org.apache.commons.codec.language.bm</a></li> +<li><a href="org/apache/commons/codec/net/package-frame.html" target="packageFrame">org.apache.commons.codec.net</a></li> +</ul> +</div> +<p> </p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/overview-summary.html b/WebServer/commons-codec-1.15/apidocs/overview-summary.html new file mode 100644 index 0000000000000000000000000000000000000000..4e1f24ae27227fad1a42a51b1b2b4ba5f401d7c5 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/overview-summary.html @@ -0,0 +1,184 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Overview (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> +<script type="text/javascript" src="script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Overview (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li class="navBarCell1Rev">Overview</li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li><a href="index-all.html">Index</a></li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?overview-summary.html" target="_top">Frames</a></li> +<li><a href="overview-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 class="title">Apache Commons Codec 1.15 API</h1> +</div> +<div class="contentContainer"> +<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Packages table, listing packages, and an explanation"> +<caption><span>Packages</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Package</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="org/apache/commons/codec/package-summary.html">org.apache.commons.codec</a></td> +<td class="colLast"> +<div class="block">Interfaces and classes used by the various implementations in + the sub-packages.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="org/apache/commons/codec/binary/package-summary.html">org.apache.commons.codec.binary</a></td> +<td class="colLast"> +<div class="block">Base64, Base32, Binary, and Hexadecimal String encoding and decoding.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="org/apache/commons/codec/cli/package-summary.html">org.apache.commons.codec.cli</a></td> +<td class="colLast"> +<div class="block">Command line utility.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="org/apache/commons/codec/digest/package-summary.html">org.apache.commons.codec.digest</a></td> +<td class="colLast"> +<div class="block"> + Simplifies common <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> tasks and + includes a libc crypt(3) compatible crypt method that supports DES, + MD5, SHA-256 and SHA-512 based algorithms as well as the Apache + specific "$apr1$" variant.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="org/apache/commons/codec/language/package-summary.html">org.apache.commons.codec.language</a></td> +<td class="colLast"> +<div class="block"> + Language and phonetic encoders.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="org/apache/commons/codec/language/bm/package-summary.html">org.apache.commons.codec.language.bm</a></td> +<td class="colLast"> +<div class="block">Implementation details of the Beider-Morse codec.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="org/apache/commons/codec/net/package-summary.html">org.apache.commons.codec.net</a></td> +<td class="colLast"> +<div class="block"> + Network related encoding and decoding.</div> +</td> +</tr> +</tbody> +</table> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li class="navBarCell1Rev">Overview</li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li><a href="index-all.html">Index</a></li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?overview-summary.html" target="_top">Frames</a></li> +<li><a href="overview-summary.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/overview-tree.html b/WebServer/commons-codec-1.15/apidocs/overview-tree.html new file mode 100644 index 0000000000000000000000000000000000000000..6a769998929de0ffb58acb96390a4b620287ed6c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/overview-tree.html @@ -0,0 +1,281 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Class Hierarchy (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> +<script type="text/javascript" src="script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Class Hierarchy (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li><a href="index-all.html">Index</a></li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li> +<li><a href="overview-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 class="title">Hierarchy For All Packages</h1> +<span class="packageHierarchyLabel">Package Hierarchies:</span> +<ul class="horizontal"> +<li><a href="org/apache/commons/codec/package-tree.html">org.apache.commons.codec</a>, </li> +<li><a href="org/apache/commons/codec/binary/package-tree.html">org.apache.commons.codec.binary</a>, </li> +<li><a href="org/apache/commons/codec/cli/package-tree.html">org.apache.commons.codec.cli</a>, </li> +<li><a href="org/apache/commons/codec/digest/package-tree.html">org.apache.commons.codec.digest</a>, </li> +<li><a href="org/apache/commons/codec/language/package-tree.html">org.apache.commons.codec.language</a>, </li> +<li><a href="org/apache/commons/codec/language/bm/package-tree.html">org.apache.commons.codec.language.bm</a>, </li> +<li><a href="org/apache/commons/codec/net/package-tree.html">org.apache.commons.codec.net</a></li> +</ul> +</div> +<div class="contentContainer"> +<h2 title="Class Hierarchy">Class Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/AbstractCaverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">AbstractCaverphone</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>) +<ul> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone1.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Caverphone1</span></a></li> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone2.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Caverphone2</span></a></li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BaseNCodec</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>) +<ul> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base16</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base32</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base64</span></a></li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/BCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">BCodec</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/BeiderMorseEncoder.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">BeiderMorseEncoder</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BinaryCodec.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BinaryCodec</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Caverphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Caverphone</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/CharEncoding.html" title="class in org.apache.commons.codec"><span class="typeNameLink">CharEncoding</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/CharSequenceUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">CharSequenceUtils</span></a></li> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/Charsets.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Charsets</span></a></li> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/ColognePhonetic.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">ColognePhonetic</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Crypt</span></a></li> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DaitchMokotoffSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">DaitchMokotoffSoundex</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.cli.<a href="org/apache/commons/codec/cli/Digest.html" title="class in org.apache.commons.codec.cli"><span class="typeNameLink">Digest</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/DigestUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">DigestUtils</span></a></li> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">DoubleMetaphone</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">DoubleMetaphone.DoubleMetaphoneResult</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Hex.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Hex</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacUtils.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">HmacUtils</span></a></li> +<li type="circle">java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><span class="typeNameLink">InputStream</span></a> (implements java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>) +<ul> +<li type="circle">java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterInputStream.html?is-external=true" title="class or interface in java.io"><span class="typeNameLink">FilterInputStream</span></a> +<ul> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BaseNCodecInputStream</span></a> +<ul> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base16InputStream</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base32InputStream</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64InputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base64InputStream</span></a></li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Lang.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Lang</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Languages</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.LanguageSet.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Languages.LanguageSet</span></a> +<ul> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Languages.SomeLanguages.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Languages.SomeLanguages</span></a></li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/MatchRatingApproachEncoder.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">MatchRatingApproachEncoder</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Md5Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Md5Crypt</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MessageDigestAlgorithms.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MessageDigestAlgorithms</span></a></li> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Metaphone.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Metaphone</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash2.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash2</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash3</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash3.IncrementalHash32x86</span></a> +<ul> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">MurmurHash3.IncrementalHash32</span></a></li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Nysiis.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Nysiis</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><span class="typeNameLink">OutputStream</span></a> (implements java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a>) +<ul> +<li type="circle">java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io"><span class="typeNameLink">FilterOutputStream</span></a> +<ul> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/BaseNCodecOutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">BaseNCodecOutputStream</span></a> +<ul> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base16OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base16OutputStream</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base32OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base32OutputStream</span></a></li> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">Base64OutputStream</span></a></li> +</ul> +</li> +</ul> +</li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/PercentCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">PercentCodec</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/PhoneticEngine.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">PhoneticEngine</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">PureJavaCrc32</span></a> (implements java.util.zip.<a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a>)</li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/PureJavaCrc32C.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">PureJavaCrc32C</span></a> (implements java.util.zip.<a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a>)</li> +<li type="circle">org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">QCodec</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/QuotedPrintableCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">QuotedPrintableCodec</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">RefinedSoundex</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/Resources.html" title="class in org.apache.commons.codec"><span class="typeNameLink">Resources</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.Phoneme.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.Phoneme</span></a> (implements org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a>)</li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.PhonemeList.html" title="class in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.PhonemeList</span></a> (implements org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm">Rule.PhonemeExpr</a>)</li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/Sha2Crypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">Sha2Crypt</span></a></li> +<li type="circle">org.apache.commons.codec.language.<a href="org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language"><span class="typeNameLink">Soundex</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoderComparator.html" title="class in org.apache.commons.codec"><span class="typeNameLink">StringEncoderComparator</span></a> (implements java.util.<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a><T>)</li> +<li type="circle">org.apache.commons.codec.binary.<a href="org/apache/commons/codec/binary/StringUtils.html" title="class in org.apache.commons.codec.binary"><span class="typeNameLink">StringUtils</span></a></li> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Throwable</span></a> (implements java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>) +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Exception</span></a> +<ul> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">DecoderException</span></a></li> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec"><span class="typeNameLink">EncoderException</span></a></li> +</ul> +</li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/UnixCrypt.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">UnixCrypt</span></a></li> +<li type="circle">org.apache.commons.codec.net.<a href="org/apache/commons/codec/net/URLCodec.html" title="class in org.apache.commons.codec.net"><span class="typeNameLink">URLCodec</span></a> (implements org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>)</li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/XXHash32.html" title="class in org.apache.commons.codec.digest"><span class="typeNameLink">XXHash32</span></a> (implements java.util.zip.<a href="https://docs.oracle.com/javase/7/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</a>)</li> +</ul> +</li> +</ul> +<h2 title="Interface Hierarchy">Interface Hierarchy</h2> +<ul> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Decoder</span></a> +<ul> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">BinaryDecoder</span></a></li> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">StringDecoder</span></a></li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">Encoder</span></a> +<ul> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">BinaryEncoder</span></a></li> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec"><span class="typeNameLink">StringEncoder</span></a></li> +</ul> +</li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.PhonemeExpr</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/Rule.RPattern.html" title="interface in org.apache.commons.codec.language.bm"><span class="typeNameLink">Rule.RPattern</span></a></li> +</ul> +<h2 title="Enum Hierarchy">Enum Hierarchy</h2> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> +<ul> +<li type="circle">java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Enum</span></a><E> (implements java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><T>, java.io.<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>) +<ul> +<li type="circle">org.apache.commons.codec.<a href="org/apache/commons/codec/CodecPolicy.html" title="enum in org.apache.commons.codec"><span class="typeNameLink">CodecPolicy</span></a></li> +<li type="circle">org.apache.commons.codec.digest.<a href="org/apache/commons/codec/digest/HmacAlgorithms.html" title="enum in org.apache.commons.codec.digest"><span class="typeNameLink">HmacAlgorithms</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/NameType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">NameType</span></a></li> +<li type="circle">org.apache.commons.codec.language.bm.<a href="org/apache/commons/codec/language/bm/RuleType.html" title="enum in org.apache.commons.codec.language.bm"><span class="typeNameLink">RuleType</span></a></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li class="navBarCell1Rev">Tree</li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li><a href="index-all.html">Index</a></li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li> +<li><a href="overview-tree.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/package-list b/WebServer/commons-codec-1.15/apidocs/package-list new file mode 100644 index 0000000000000000000000000000000000000000..8b23b44db1968dfd850e5f2b548b8f9c0f7d5864 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/package-list @@ -0,0 +1,7 @@ +org.apache.commons.codec +org.apache.commons.codec.binary +org.apache.commons.codec.cli +org.apache.commons.codec.digest +org.apache.commons.codec.language +org.apache.commons.codec.language.bm +org.apache.commons.codec.net diff --git a/WebServer/commons-codec-1.15/apidocs/script.js b/WebServer/commons-codec-1.15/apidocs/script.js new file mode 100644 index 0000000000000000000000000000000000000000..b34635693143ac308ba6d22c29554e5631f64b74 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "<a href=\"javascript:show("+ value + ");\">" + tabs[value][1] + "</a>"; + } + } +} diff --git a/WebServer/commons-codec-1.15/apidocs/serialized-form.html b/WebServer/commons-codec-1.15/apidocs/serialized-form.html new file mode 100644 index 0000000000000000000000000000000000000000..c3f56320302e04d78ce16c62254db4438620c35b --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/serialized-form.html @@ -0,0 +1,151 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Serialized Form (Apache Commons Codec 1.15 API)</title> +<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> +<script type="text/javascript" src="script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Serialized Form (Apache Commons Codec 1.15 API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li><a href="index-all.html">Index</a></li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li> +<li><a href="serialized-form.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Serialized Form" class="title">Serialized Form</h1> +</div> +<div class="serializedFormContainer"> +<ul class="blockList"> +<li class="blockList"> +<h2 title="Package">Package org.apache.commons.codec</h2> +<ul class="blockList"> +<li class="blockList"><a name="org.apache.commons.codec.DecoderException"> +<!-- --> +</a> +<h3>Class <a href="org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">org.apache.commons.codec.DecoderException</a> extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> implements Serializable</h3> +<dl class="nameValue"> +<dt>serialVersionUID:</dt> +<dd>1L</dd> +</dl> +</li> +<li class="blockList"><a name="org.apache.commons.codec.EncoderException"> +<!-- --> +</a> +<h3>Class <a href="org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">org.apache.commons.codec.EncoderException</a> extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> implements Serializable</h3> +<dl class="nameValue"> +<dt>serialVersionUID:</dt> +<dd>1L</dd> +</dl> +</li> +</ul> +</li> +</ul> +</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="overview-summary.html">Overview</a></li> +<li>Package</li> +<li>Class</li> +<li>Use</li> +<li><a href="overview-tree.html">Tree</a></li> +<li><a href="deprecated-list.html">Deprecated</a></li> +<li><a href="index-all.html">Index</a></li> +<li><a href="help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li> +<li><a href="serialized-form.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2002–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/BinaryDecoder.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/BinaryDecoder.html new file mode 100644 index 0000000000000000000000000000000000000000..bd421326130c312784c901062846bbae1996984e --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/BinaryDecoder.html @@ -0,0 +1,109 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Defines common decoding methods for byte array decoders.<a name="line.21"></a> +<span class="sourceLineNo">022</span> *<a name="line.22"></a> +<span class="sourceLineNo">023</span> */<a name="line.23"></a> +<span class="sourceLineNo">024</span>public interface BinaryDecoder extends Decoder {<a name="line.24"></a> +<span class="sourceLineNo">025</span><a name="line.25"></a> +<span class="sourceLineNo">026</span> /**<a name="line.26"></a> +<span class="sourceLineNo">027</span> * Decodes a byte array and returns the results as a byte array.<a name="line.27"></a> +<span class="sourceLineNo">028</span> *<a name="line.28"></a> +<span class="sourceLineNo">029</span> * @param source<a name="line.29"></a> +<span class="sourceLineNo">030</span> * A byte array which has been encoded with the appropriate encoder<a name="line.30"></a> +<span class="sourceLineNo">031</span> * @return a byte array that contains decoded content<a name="line.31"></a> +<span class="sourceLineNo">032</span> * @throws DecoderException<a name="line.32"></a> +<span class="sourceLineNo">033</span> * A decoder exception is thrown if a Decoder encounters a failure condition during the decode process.<a name="line.33"></a> +<span class="sourceLineNo">034</span> */<a name="line.34"></a> +<span class="sourceLineNo">035</span> byte[] decode(byte[] source) throws DecoderException;<a name="line.35"></a> +<span class="sourceLineNo">036</span>}<a name="line.36"></a> +<span class="sourceLineNo">037</span><a name="line.37"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/BinaryEncoder.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/BinaryEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..25faca46811dbab75ebce72f31a898e67713366c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/BinaryEncoder.html @@ -0,0 +1,109 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Defines common encoding methods for byte array encoders.<a name="line.21"></a> +<span class="sourceLineNo">022</span> *<a name="line.22"></a> +<span class="sourceLineNo">023</span> */<a name="line.23"></a> +<span class="sourceLineNo">024</span>public interface BinaryEncoder extends Encoder {<a name="line.24"></a> +<span class="sourceLineNo">025</span><a name="line.25"></a> +<span class="sourceLineNo">026</span> /**<a name="line.26"></a> +<span class="sourceLineNo">027</span> * Encodes a byte array and return the encoded data as a byte array.<a name="line.27"></a> +<span class="sourceLineNo">028</span> *<a name="line.28"></a> +<span class="sourceLineNo">029</span> * @param source<a name="line.29"></a> +<span class="sourceLineNo">030</span> * Data to be encoded<a name="line.30"></a> +<span class="sourceLineNo">031</span> * @return A byte array containing the encoded data<a name="line.31"></a> +<span class="sourceLineNo">032</span> * @throws EncoderException<a name="line.32"></a> +<span class="sourceLineNo">033</span> * thrown if the Encoder encounters a failure condition during the encoding process.<a name="line.33"></a> +<span class="sourceLineNo">034</span> */<a name="line.34"></a> +<span class="sourceLineNo">035</span> byte[] encode(byte[] source) throws EncoderException;<a name="line.35"></a> +<span class="sourceLineNo">036</span>}<a name="line.36"></a> +<span class="sourceLineNo">037</span><a name="line.37"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/CharEncoding.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/CharEncoding.html new file mode 100644 index 0000000000000000000000000000000000000000..66ee4ce2354b9db010d58e05fb8b5a9dd694506d --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/CharEncoding.html @@ -0,0 +1,191 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Character encoding names required of every implementation of the Java platform.<a name="line.21"></a> +<span class="sourceLineNo">022</span> *<a name="line.22"></a> +<span class="sourceLineNo">023</span> * From the Java documentation <a<a name="line.23"></a> +<span class="sourceLineNo">024</span> * href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a>:<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * <cite>Every implementation of the Java platform is required to support the following character encodings. Consult the<a name="line.26"></a> +<span class="sourceLineNo">027</span> * release documentation for your implementation to see if any other encodings are supported. Consult the release<a name="line.27"></a> +<span class="sourceLineNo">028</span> * documentation for your implementation to see if any other encodings are supported.</cite><a name="line.28"></a> +<span class="sourceLineNo">029</span> * </p><a name="line.29"></a> +<span class="sourceLineNo">030</span> *<a name="line.30"></a> +<span class="sourceLineNo">031</span> * <ul><a name="line.31"></a> +<span class="sourceLineNo">032</span> * <li>{@code US-ASCII}<p><a name="line.32"></a> +<span class="sourceLineNo">033</span> * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</p></li><a name="line.33"></a> +<span class="sourceLineNo">034</span> * <li>{@code ISO-8859-1}<p><a name="line.34"></a> +<span class="sourceLineNo">035</span> * ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</p></li><a name="line.35"></a> +<span class="sourceLineNo">036</span> * <li>{@code UTF-8}<p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * Eight-bit Unicode Transformation Format.</p></li><a name="line.37"></a> +<span class="sourceLineNo">038</span> * <li>{@code UTF-16BE}<p><a name="line.38"></a> +<span class="sourceLineNo">039</span> * Sixteen-bit Unicode Transformation Format, big-endian byte order.</p></li><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <li>{@code UTF-16LE}<p><a name="line.40"></a> +<span class="sourceLineNo">041</span> * Sixteen-bit Unicode Transformation Format, little-endian byte order.</p></li><a name="line.41"></a> +<span class="sourceLineNo">042</span> * <li>{@code UTF-16}<p><a name="line.42"></a> +<span class="sourceLineNo">043</span> * Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order<a name="line.43"></a> +<span class="sourceLineNo">044</span> * accepted on input, big-endian used on output.)</p></li><a name="line.44"></a> +<span class="sourceLineNo">045</span> * </ul><a name="line.45"></a> +<span class="sourceLineNo">046</span> *<a name="line.46"></a> +<span class="sourceLineNo">047</span> * This perhaps would best belong in the [lang] project. Even if a similar interface is defined in [lang], it is not<a name="line.47"></a> +<span class="sourceLineNo">048</span> * foreseen that [codec] would be made to depend on [lang].<a name="line.48"></a> +<span class="sourceLineNo">049</span> *<a name="line.49"></a> +<span class="sourceLineNo">050</span> * <p><a name="line.50"></a> +<span class="sourceLineNo">051</span> * This class is immutable and thread-safe.<a name="line.51"></a> +<span class="sourceLineNo">052</span> * </p><a name="line.52"></a> +<span class="sourceLineNo">053</span> *<a name="line.53"></a> +<span class="sourceLineNo">054</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.54"></a> +<span class="sourceLineNo">055</span> * @since 1.4<a name="line.55"></a> +<span class="sourceLineNo">056</span> */<a name="line.56"></a> +<span class="sourceLineNo">057</span>public class CharEncoding {<a name="line.57"></a> +<span class="sourceLineNo">058</span><a name="line.58"></a> +<span class="sourceLineNo">059</span> /**<a name="line.59"></a> +<span class="sourceLineNo">060</span> * CharEncodingISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.<a name="line.60"></a> +<span class="sourceLineNo">061</span> * <p><a name="line.61"></a> +<span class="sourceLineNo">062</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.62"></a> +<span class="sourceLineNo">063</span> * </p><a name="line.63"></a> +<span class="sourceLineNo">064</span> *<a name="line.64"></a> +<span class="sourceLineNo">065</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.65"></a> +<span class="sourceLineNo">066</span> */<a name="line.66"></a> +<span class="sourceLineNo">067</span> public static final String ISO_8859_1 = "ISO-8859-1";<a name="line.67"></a> +<span class="sourceLineNo">068</span><a name="line.68"></a> +<span class="sourceLineNo">069</span> /**<a name="line.69"></a> +<span class="sourceLineNo">070</span> * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.<a name="line.70"></a> +<span class="sourceLineNo">071</span> * <p><a name="line.71"></a> +<span class="sourceLineNo">072</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.72"></a> +<span class="sourceLineNo">073</span> * </p><a name="line.73"></a> +<span class="sourceLineNo">074</span> *<a name="line.74"></a> +<span class="sourceLineNo">075</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.75"></a> +<span class="sourceLineNo">076</span> */<a name="line.76"></a> +<span class="sourceLineNo">077</span> public static final String US_ASCII = "US-ASCII";<a name="line.77"></a> +<span class="sourceLineNo">078</span><a name="line.78"></a> +<span class="sourceLineNo">079</span> /**<a name="line.79"></a> +<span class="sourceLineNo">080</span> * Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark<a name="line.80"></a> +<span class="sourceLineNo">081</span> * (either order accepted on input, big-endian used on output)<a name="line.81"></a> +<span class="sourceLineNo">082</span> * <p><a name="line.82"></a> +<span class="sourceLineNo">083</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.83"></a> +<span class="sourceLineNo">084</span> * </p><a name="line.84"></a> +<span class="sourceLineNo">085</span> *<a name="line.85"></a> +<span class="sourceLineNo">086</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.86"></a> +<span class="sourceLineNo">087</span> */<a name="line.87"></a> +<span class="sourceLineNo">088</span> public static final String UTF_16 = "UTF-16";<a name="line.88"></a> +<span class="sourceLineNo">089</span><a name="line.89"></a> +<span class="sourceLineNo">090</span> /**<a name="line.90"></a> +<span class="sourceLineNo">091</span> * Sixteen-bit Unicode Transformation Format, big-endian byte order.<a name="line.91"></a> +<span class="sourceLineNo">092</span> * <p><a name="line.92"></a> +<span class="sourceLineNo">093</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.93"></a> +<span class="sourceLineNo">094</span> * </p><a name="line.94"></a> +<span class="sourceLineNo">095</span> *<a name="line.95"></a> +<span class="sourceLineNo">096</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.96"></a> +<span class="sourceLineNo">097</span> */<a name="line.97"></a> +<span class="sourceLineNo">098</span> public static final String UTF_16BE = "UTF-16BE";<a name="line.98"></a> +<span class="sourceLineNo">099</span><a name="line.99"></a> +<span class="sourceLineNo">100</span> /**<a name="line.100"></a> +<span class="sourceLineNo">101</span> * Sixteen-bit Unicode Transformation Format, little-endian byte order.<a name="line.101"></a> +<span class="sourceLineNo">102</span> * <p><a name="line.102"></a> +<span class="sourceLineNo">103</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.103"></a> +<span class="sourceLineNo">104</span> * </p><a name="line.104"></a> +<span class="sourceLineNo">105</span> *<a name="line.105"></a> +<span class="sourceLineNo">106</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.106"></a> +<span class="sourceLineNo">107</span> */<a name="line.107"></a> +<span class="sourceLineNo">108</span> public static final String UTF_16LE = "UTF-16LE";<a name="line.108"></a> +<span class="sourceLineNo">109</span><a name="line.109"></a> +<span class="sourceLineNo">110</span> /**<a name="line.110"></a> +<span class="sourceLineNo">111</span> * Eight-bit Unicode Transformation Format.<a name="line.111"></a> +<span class="sourceLineNo">112</span> * <p><a name="line.112"></a> +<span class="sourceLineNo">113</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.113"></a> +<span class="sourceLineNo">114</span> * </p><a name="line.114"></a> +<span class="sourceLineNo">115</span> *<a name="line.115"></a> +<span class="sourceLineNo">116</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.116"></a> +<span class="sourceLineNo">117</span> */<a name="line.117"></a> +<span class="sourceLineNo">118</span> public static final String UTF_8 = "UTF-8";<a name="line.118"></a> +<span class="sourceLineNo">119</span>}<a name="line.119"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Charsets.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Charsets.html new file mode 100644 index 0000000000000000000000000000000000000000..68d5b4674852dc1b059e84c60f78ca62540b0e2d --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Charsets.html @@ -0,0 +1,234 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>package org.apache.commons.codec;<a name="line.17"></a> +<span class="sourceLineNo">018</span><a name="line.18"></a> +<span class="sourceLineNo">019</span>import java.nio.charset.Charset;<a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.nio.charset.StandardCharsets;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>/**<a name="line.22"></a> +<span class="sourceLineNo">023</span> * Charsets required of every implementation of the Java platform.<a name="line.23"></a> +<span class="sourceLineNo">024</span> *<a name="line.24"></a> +<span class="sourceLineNo">025</span> * From the Java documentation <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard<a name="line.25"></a> +<span class="sourceLineNo">026</span> * charsets</a>:<a name="line.26"></a> +<span class="sourceLineNo">027</span> * <p><a name="line.27"></a> +<span class="sourceLineNo">028</span> * <cite>Every implementation of the Java platform is required to support the following character encodings. Consult the<a name="line.28"></a> +<span class="sourceLineNo">029</span> * release documentation for your implementation to see if any other encodings are supported. Consult the release<a name="line.29"></a> +<span class="sourceLineNo">030</span> * documentation for your implementation to see if any other encodings are supported. </cite><a name="line.30"></a> +<span class="sourceLineNo">031</span> * </p><a name="line.31"></a> +<span class="sourceLineNo">032</span> *<a name="line.32"></a> +<span class="sourceLineNo">033</span> * <ul><a name="line.33"></a> +<span class="sourceLineNo">034</span> * <li>{@code US-ASCII}<p><a name="line.34"></a> +<span class="sourceLineNo">035</span> * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</p></li><a name="line.35"></a> +<span class="sourceLineNo">036</span> * <li>{@code ISO-8859-1}<p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</p></li><a name="line.37"></a> +<span class="sourceLineNo">038</span> * <li>{@code UTF-8}<p><a name="line.38"></a> +<span class="sourceLineNo">039</span> * Eight-bit Unicode Transformation Format.</p></li><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <li>{@code UTF-16BE}<p><a name="line.40"></a> +<span class="sourceLineNo">041</span> * Sixteen-bit Unicode Transformation Format, big-endian byte order.</p></li><a name="line.41"></a> +<span class="sourceLineNo">042</span> * <li>{@code UTF-16LE}<p><a name="line.42"></a> +<span class="sourceLineNo">043</span> * Sixteen-bit Unicode Transformation Format, little-endian byte order.</p></li><a name="line.43"></a> +<span class="sourceLineNo">044</span> * <li>{@code UTF-16}<p><a name="line.44"></a> +<span class="sourceLineNo">045</span> * Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order<a name="line.45"></a> +<span class="sourceLineNo">046</span> * accepted on input, big-endian used on output.)</p></li><a name="line.46"></a> +<span class="sourceLineNo">047</span> * </ul><a name="line.47"></a> +<span class="sourceLineNo">048</span> *<a name="line.48"></a> +<span class="sourceLineNo">049</span> * This perhaps would best belong in the Commons Lang project. Even if a similar class is defined in Commons Lang, it is<a name="line.49"></a> +<span class="sourceLineNo">050</span> * not foreseen that Commons Codec would be made to depend on Commons Lang.<a name="line.50"></a> +<span class="sourceLineNo">051</span> *<a name="line.51"></a> +<span class="sourceLineNo">052</span> * <p><a name="line.52"></a> +<span class="sourceLineNo">053</span> * This class is immutable and thread-safe.<a name="line.53"></a> +<span class="sourceLineNo">054</span> * </p><a name="line.54"></a> +<span class="sourceLineNo">055</span> *<a name="line.55"></a> +<span class="sourceLineNo">056</span> * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.56"></a> +<span class="sourceLineNo">057</span> * @since 1.7<a name="line.57"></a> +<span class="sourceLineNo">058</span> */<a name="line.58"></a> +<span class="sourceLineNo">059</span>public class Charsets {<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> //<a name="line.61"></a> +<span class="sourceLineNo">062</span> // This class should only contain Charset instances for required encodings. This guarantees that it will load<a name="line.62"></a> +<span class="sourceLineNo">063</span> // correctly and without delay on all Java platforms.<a name="line.63"></a> +<span class="sourceLineNo">064</span> //<a name="line.64"></a> +<span class="sourceLineNo">065</span><a name="line.65"></a> +<span class="sourceLineNo">066</span> /**<a name="line.66"></a> +<span class="sourceLineNo">067</span> * CharEncodingISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.<a name="line.67"></a> +<span class="sourceLineNo">068</span> * <p><a name="line.68"></a> +<span class="sourceLineNo">069</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.69"></a> +<span class="sourceLineNo">070</span> * </p><a name="line.70"></a> +<span class="sourceLineNo">071</span> *<a name="line.71"></a> +<span class="sourceLineNo">072</span> * @deprecated Use {@link java.nio.charset.StandardCharsets#ISO_8859_1} instead.<a name="line.72"></a> +<span class="sourceLineNo">073</span> * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.73"></a> +<span class="sourceLineNo">074</span> */<a name="line.74"></a> +<span class="sourceLineNo">075</span> @Deprecated<a name="line.75"></a> +<span class="sourceLineNo">076</span> public static final Charset ISO_8859_1 = StandardCharsets.ISO_8859_1;<a name="line.76"></a> +<span class="sourceLineNo">077</span><a name="line.77"></a> +<span class="sourceLineNo">078</span> /**<a name="line.78"></a> +<span class="sourceLineNo">079</span> * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.<a name="line.79"></a> +<span class="sourceLineNo">080</span> * <p><a name="line.80"></a> +<span class="sourceLineNo">081</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.81"></a> +<span class="sourceLineNo">082</span> * </p><a name="line.82"></a> +<span class="sourceLineNo">083</span> *<a name="line.83"></a> +<span class="sourceLineNo">084</span> * @deprecated Use {@link java.nio.charset.StandardCharsets#US_ASCII} instead.<a name="line.84"></a> +<span class="sourceLineNo">085</span> * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.85"></a> +<span class="sourceLineNo">086</span> */<a name="line.86"></a> +<span class="sourceLineNo">087</span> @Deprecated<a name="line.87"></a> +<span class="sourceLineNo">088</span> public static final Charset US_ASCII = StandardCharsets.US_ASCII;<a name="line.88"></a> +<span class="sourceLineNo">089</span><a name="line.89"></a> +<span class="sourceLineNo">090</span> /**<a name="line.90"></a> +<span class="sourceLineNo">091</span> * Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark<a name="line.91"></a> +<span class="sourceLineNo">092</span> * (either order accepted on input, big-endian used on output)<a name="line.92"></a> +<span class="sourceLineNo">093</span> * <p><a name="line.93"></a> +<span class="sourceLineNo">094</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.94"></a> +<span class="sourceLineNo">095</span> * </p><a name="line.95"></a> +<span class="sourceLineNo">096</span> *<a name="line.96"></a> +<span class="sourceLineNo">097</span> * @deprecated Use {@link java.nio.charset.StandardCharsets#UTF_16} instead.<a name="line.97"></a> +<span class="sourceLineNo">098</span> * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.98"></a> +<span class="sourceLineNo">099</span> */<a name="line.99"></a> +<span class="sourceLineNo">100</span> @Deprecated<a name="line.100"></a> +<span class="sourceLineNo">101</span> public static final Charset UTF_16 = StandardCharsets.UTF_16;<a name="line.101"></a> +<span class="sourceLineNo">102</span><a name="line.102"></a> +<span class="sourceLineNo">103</span> /**<a name="line.103"></a> +<span class="sourceLineNo">104</span> * Sixteen-bit Unicode Transformation Format, big-endian byte order.<a name="line.104"></a> +<span class="sourceLineNo">105</span> * <p><a name="line.105"></a> +<span class="sourceLineNo">106</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.106"></a> +<span class="sourceLineNo">107</span> * </p><a name="line.107"></a> +<span class="sourceLineNo">108</span> *<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @deprecated Use {@link java.nio.charset.StandardCharsets#UTF_16BE} instead.<a name="line.109"></a> +<span class="sourceLineNo">110</span> * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.110"></a> +<span class="sourceLineNo">111</span> */<a name="line.111"></a> +<span class="sourceLineNo">112</span> @Deprecated<a name="line.112"></a> +<span class="sourceLineNo">113</span> public static final Charset UTF_16BE = StandardCharsets.UTF_16BE;<a name="line.113"></a> +<span class="sourceLineNo">114</span><a name="line.114"></a> +<span class="sourceLineNo">115</span> /**<a name="line.115"></a> +<span class="sourceLineNo">116</span> * Sixteen-bit Unicode Transformation Format, little-endian byte order.<a name="line.116"></a> +<span class="sourceLineNo">117</span> * <p><a name="line.117"></a> +<span class="sourceLineNo">118</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.118"></a> +<span class="sourceLineNo">119</span> * </p><a name="line.119"></a> +<span class="sourceLineNo">120</span> *<a name="line.120"></a> +<span class="sourceLineNo">121</span> * @deprecated Use {@link java.nio.charset.StandardCharsets#UTF_16LE} instead.<a name="line.121"></a> +<span class="sourceLineNo">122</span> * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.122"></a> +<span class="sourceLineNo">123</span> */<a name="line.123"></a> +<span class="sourceLineNo">124</span> @Deprecated<a name="line.124"></a> +<span class="sourceLineNo">125</span> public static final Charset UTF_16LE = StandardCharsets.UTF_16LE;<a name="line.125"></a> +<span class="sourceLineNo">126</span><a name="line.126"></a> +<span class="sourceLineNo">127</span> /**<a name="line.127"></a> +<span class="sourceLineNo">128</span> * Eight-bit Unicode Transformation Format.<a name="line.128"></a> +<span class="sourceLineNo">129</span> * <p><a name="line.129"></a> +<span class="sourceLineNo">130</span> * Every implementation of the Java platform is required to support this character encoding.<a name="line.130"></a> +<span class="sourceLineNo">131</span> * </p><a name="line.131"></a> +<span class="sourceLineNo">132</span> *<a name="line.132"></a> +<span class="sourceLineNo">133</span> * @deprecated Use {@link java.nio.charset.StandardCharsets#UTF_8} instead.<a name="line.133"></a> +<span class="sourceLineNo">134</span> * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.134"></a> +<span class="sourceLineNo">135</span> */<a name="line.135"></a> +<span class="sourceLineNo">136</span> @Deprecated<a name="line.136"></a> +<span class="sourceLineNo">137</span> public static final Charset UTF_8 = StandardCharsets.UTF_8;<a name="line.137"></a> +<span class="sourceLineNo">138</span><a name="line.138"></a> +<span class="sourceLineNo">139</span> /**<a name="line.139"></a> +<span class="sourceLineNo">140</span> * Returns the given Charset or the default Charset if the given Charset is null.<a name="line.140"></a> +<span class="sourceLineNo">141</span> *<a name="line.141"></a> +<span class="sourceLineNo">142</span> * @param charset<a name="line.142"></a> +<span class="sourceLineNo">143</span> * A charset or null.<a name="line.143"></a> +<span class="sourceLineNo">144</span> * @return the given Charset or the default Charset if the given Charset is null<a name="line.144"></a> +<span class="sourceLineNo">145</span> */<a name="line.145"></a> +<span class="sourceLineNo">146</span> public static Charset toCharset(final Charset charset) {<a name="line.146"></a> +<span class="sourceLineNo">147</span> return charset == null ? Charset.defaultCharset() : charset;<a name="line.147"></a> +<span class="sourceLineNo">148</span> }<a name="line.148"></a> +<span class="sourceLineNo">149</span><a name="line.149"></a> +<span class="sourceLineNo">150</span> /**<a name="line.150"></a> +<span class="sourceLineNo">151</span> * Returns a Charset for the named charset. If the name is null, return the default Charset.<a name="line.151"></a> +<span class="sourceLineNo">152</span> *<a name="line.152"></a> +<span class="sourceLineNo">153</span> * @param charset<a name="line.153"></a> +<span class="sourceLineNo">154</span> * The name of the requested charset, may be null.<a name="line.154"></a> +<span class="sourceLineNo">155</span> * @return a Charset for the named charset<a name="line.155"></a> +<span class="sourceLineNo">156</span> * @throws java.nio.charset.UnsupportedCharsetException<a name="line.156"></a> +<span class="sourceLineNo">157</span> * If the named charset is unavailable<a name="line.157"></a> +<span class="sourceLineNo">158</span> */<a name="line.158"></a> +<span class="sourceLineNo">159</span> public static Charset toCharset(final String charset) {<a name="line.159"></a> +<span class="sourceLineNo">160</span> return charset == null ? Charset.defaultCharset() : Charset.forName(charset);<a name="line.160"></a> +<span class="sourceLineNo">161</span> }<a name="line.161"></a> +<span class="sourceLineNo">162</span>}<a name="line.162"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/CodecPolicy.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/CodecPolicy.html new file mode 100644 index 0000000000000000000000000000000000000000..137f3f06c33a4ee394da94559578879e5713d358 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/CodecPolicy.html @@ -0,0 +1,108 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Defines encoding and decoding policies.<a name="line.21"></a> +<span class="sourceLineNo">022</span> *<a name="line.22"></a> +<span class="sourceLineNo">023</span> * @since 1.15<a name="line.23"></a> +<span class="sourceLineNo">024</span> */<a name="line.24"></a> +<span class="sourceLineNo">025</span>public enum CodecPolicy {<a name="line.25"></a> +<span class="sourceLineNo">026</span><a name="line.26"></a> +<span class="sourceLineNo">027</span> /**<a name="line.27"></a> +<span class="sourceLineNo">028</span> * The strict policy. Data that causes a codec to fail should throw an exception.<a name="line.28"></a> +<span class="sourceLineNo">029</span> */<a name="line.29"></a> +<span class="sourceLineNo">030</span> STRICT,<a name="line.30"></a> +<span class="sourceLineNo">031</span><a name="line.31"></a> +<span class="sourceLineNo">032</span> /**<a name="line.32"></a> +<span class="sourceLineNo">033</span> * The lenient policy. Data that causes a codec to fail should not throw an exception.<a name="line.33"></a> +<span class="sourceLineNo">034</span> */<a name="line.34"></a> +<span class="sourceLineNo">035</span> LENIENT<a name="line.35"></a> +<span class="sourceLineNo">036</span>}<a name="line.36"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Decoder.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Decoder.html new file mode 100644 index 0000000000000000000000000000000000000000..8e4fa5b169b7df290adc93ef3f5d5694251a3077 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Decoder.html @@ -0,0 +1,118 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Provides the highest level of abstraction for Decoders.<a name="line.21"></a> +<span class="sourceLineNo">022</span> * <p><a name="line.22"></a> +<span class="sourceLineNo">023</span> * This is the sister interface of {@link Encoder}. All Decoders implement this common generic interface.<a name="line.23"></a> +<span class="sourceLineNo">024</span> * Allows a user to pass a generic Object to any Decoder implementation in the codec package.<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * One of the two interfaces at the center of the codec package.<a name="line.26"></a> +<span class="sourceLineNo">027</span> *<a name="line.27"></a> +<span class="sourceLineNo">028</span> */<a name="line.28"></a> +<span class="sourceLineNo">029</span>public interface Decoder {<a name="line.29"></a> +<span class="sourceLineNo">030</span><a name="line.30"></a> +<span class="sourceLineNo">031</span> /**<a name="line.31"></a> +<span class="sourceLineNo">032</span> * Decodes an "encoded" Object and returns a "decoded" Object. Note that the implementation of this interface will<a name="line.32"></a> +<span class="sourceLineNo">033</span> * try to cast the Object parameter to the specific type expected by a particular Decoder implementation. If a<a name="line.33"></a> +<span class="sourceLineNo">034</span> * {@link ClassCastException} occurs this decode method will throw a DecoderException.<a name="line.34"></a> +<span class="sourceLineNo">035</span> *<a name="line.35"></a> +<span class="sourceLineNo">036</span> * @param source<a name="line.36"></a> +<span class="sourceLineNo">037</span> * the object to decode<a name="line.37"></a> +<span class="sourceLineNo">038</span> * @return a 'decoded" object<a name="line.38"></a> +<span class="sourceLineNo">039</span> * @throws DecoderException<a name="line.39"></a> +<span class="sourceLineNo">040</span> * a decoder exception can be thrown for any number of reasons. Some good candidates are that the<a name="line.40"></a> +<span class="sourceLineNo">041</span> * parameter passed to this method is null, a param cannot be cast to the appropriate type for a<a name="line.41"></a> +<span class="sourceLineNo">042</span> * specific encoder.<a name="line.42"></a> +<span class="sourceLineNo">043</span> */<a name="line.43"></a> +<span class="sourceLineNo">044</span> Object decode(Object source) throws DecoderException;<a name="line.44"></a> +<span class="sourceLineNo">045</span>}<a name="line.45"></a> +<span class="sourceLineNo">046</span><a name="line.46"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/DecoderException.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/DecoderException.html new file mode 100644 index 0000000000000000000000000000000000000000..ad8a345034835f18c4e4027e34c539faad7ab3b5 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/DecoderException.html @@ -0,0 +1,157 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Thrown when there is a failure condition during the decoding process. This exception is thrown when a {@link Decoder}<a name="line.21"></a> +<span class="sourceLineNo">022</span> * encounters a decoding specific exception such as invalid data, or characters outside of the expected range.<a name="line.22"></a> +<span class="sourceLineNo">023</span> *<a name="line.23"></a> +<span class="sourceLineNo">024</span> */<a name="line.24"></a> +<span class="sourceLineNo">025</span>public class DecoderException extends Exception {<a name="line.25"></a> +<span class="sourceLineNo">026</span><a name="line.26"></a> +<span class="sourceLineNo">027</span> /**<a name="line.27"></a> +<span class="sourceLineNo">028</span> * Declares the Serial Version Uid.<a name="line.28"></a> +<span class="sourceLineNo">029</span> *<a name="line.29"></a> +<span class="sourceLineNo">030</span> * @see <a href="http://c2.com/cgi/wiki?AlwaysDeclareSerialVersionUid">Always Declare Serial Version Uid</a><a name="line.30"></a> +<span class="sourceLineNo">031</span> */<a name="line.31"></a> +<span class="sourceLineNo">032</span> private static final long serialVersionUID = 1L;<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span> /**<a name="line.34"></a> +<span class="sourceLineNo">035</span> * Constructs a new exception with {@code null} as its detail message. The cause is not initialized, and may<a name="line.35"></a> +<span class="sourceLineNo">036</span> * subsequently be initialized by a call to {@link #initCause}.<a name="line.36"></a> +<span class="sourceLineNo">037</span> *<a name="line.37"></a> +<span class="sourceLineNo">038</span> * @since 1.4<a name="line.38"></a> +<span class="sourceLineNo">039</span> */<a name="line.39"></a> +<span class="sourceLineNo">040</span> public DecoderException() {<a name="line.40"></a> +<span class="sourceLineNo">041</span> super();<a name="line.41"></a> +<span class="sourceLineNo">042</span> }<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> +<span class="sourceLineNo">044</span> /**<a name="line.44"></a> +<span class="sourceLineNo">045</span> * Constructs a new exception with the specified detail message. The cause is not initialized, and may subsequently<a name="line.45"></a> +<span class="sourceLineNo">046</span> * be initialized by a call to {@link #initCause}.<a name="line.46"></a> +<span class="sourceLineNo">047</span> *<a name="line.47"></a> +<span class="sourceLineNo">048</span> * @param message<a name="line.48"></a> +<span class="sourceLineNo">049</span> * The detail message which is saved for later retrieval by the {@link #getMessage()} method.<a name="line.49"></a> +<span class="sourceLineNo">050</span> */<a name="line.50"></a> +<span class="sourceLineNo">051</span> public DecoderException(final String message) {<a name="line.51"></a> +<span class="sourceLineNo">052</span> super(message);<a name="line.52"></a> +<span class="sourceLineNo">053</span> }<a name="line.53"></a> +<span class="sourceLineNo">054</span><a name="line.54"></a> +<span class="sourceLineNo">055</span> /**<a name="line.55"></a> +<span class="sourceLineNo">056</span> * Constructs a new exception with the specified detail message and cause.<a name="line.56"></a> +<span class="sourceLineNo">057</span> * <p><a name="line.57"></a> +<span class="sourceLineNo">058</span> * Note that the detail message associated with {@code cause} is not automatically incorporated into this<a name="line.58"></a> +<span class="sourceLineNo">059</span> * exception's detail message.<a name="line.59"></a> +<span class="sourceLineNo">060</span> *<a name="line.60"></a> +<span class="sourceLineNo">061</span> * @param message<a name="line.61"></a> +<span class="sourceLineNo">062</span> * The detail message which is saved for later retrieval by the {@link #getMessage()} method.<a name="line.62"></a> +<span class="sourceLineNo">063</span> * @param cause<a name="line.63"></a> +<span class="sourceLineNo">064</span> * The cause which is saved for later retrieval by the {@link #getCause()} method. A {@code null}<a name="line.64"></a> +<span class="sourceLineNo">065</span> * value is permitted, and indicates that the cause is nonexistent or unknown.<a name="line.65"></a> +<span class="sourceLineNo">066</span> * @since 1.4<a name="line.66"></a> +<span class="sourceLineNo">067</span> */<a name="line.67"></a> +<span class="sourceLineNo">068</span> public DecoderException(final String message, final Throwable cause) {<a name="line.68"></a> +<span class="sourceLineNo">069</span> super(message, cause);<a name="line.69"></a> +<span class="sourceLineNo">070</span> }<a name="line.70"></a> +<span class="sourceLineNo">071</span><a name="line.71"></a> +<span class="sourceLineNo">072</span> /**<a name="line.72"></a> +<span class="sourceLineNo">073</span> * Constructs a new exception with the specified cause and a detail message of <code>(cause==null ?<a name="line.73"></a> +<span class="sourceLineNo">074</span> * null : cause.toString())</code> (which typically contains the class and detail message of {@code cause}).<a name="line.74"></a> +<span class="sourceLineNo">075</span> * This constructor is useful for exceptions that are little more than wrappers for other throwables.<a name="line.75"></a> +<span class="sourceLineNo">076</span> *<a name="line.76"></a> +<span class="sourceLineNo">077</span> * @param cause<a name="line.77"></a> +<span class="sourceLineNo">078</span> * The cause which is saved for later retrieval by the {@link #getCause()} method. A {@code null}<a name="line.78"></a> +<span class="sourceLineNo">079</span> * value is permitted, and indicates that the cause is nonexistent or unknown.<a name="line.79"></a> +<span class="sourceLineNo">080</span> * @since 1.4<a name="line.80"></a> +<span class="sourceLineNo">081</span> */<a name="line.81"></a> +<span class="sourceLineNo">082</span> public DecoderException(final Throwable cause) {<a name="line.82"></a> +<span class="sourceLineNo">083</span> super(cause);<a name="line.83"></a> +<span class="sourceLineNo">084</span> }<a name="line.84"></a> +<span class="sourceLineNo">085</span>}<a name="line.85"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Encoder.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Encoder.html new file mode 100644 index 0000000000000000000000000000000000000000..8f81ecf0a053350dca7edb0b3dead815aa9633ff --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Encoder.html @@ -0,0 +1,115 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Provides the highest level of abstraction for Encoders.<a name="line.21"></a> +<span class="sourceLineNo">022</span> * <p><a name="line.22"></a> +<span class="sourceLineNo">023</span> * This is the sister interface of {@link Decoder}. Every implementation of Encoder provides this<a name="line.23"></a> +<span class="sourceLineNo">024</span> * common generic interface which allows a user to pass a generic Object to any Encoder implementation<a name="line.24"></a> +<span class="sourceLineNo">025</span> * in the codec package.<a name="line.25"></a> +<span class="sourceLineNo">026</span> *<a name="line.26"></a> +<span class="sourceLineNo">027</span> */<a name="line.27"></a> +<span class="sourceLineNo">028</span>public interface Encoder {<a name="line.28"></a> +<span class="sourceLineNo">029</span><a name="line.29"></a> +<span class="sourceLineNo">030</span> /**<a name="line.30"></a> +<span class="sourceLineNo">031</span> * Encodes an "Object" and returns the encoded content as an Object. The Objects here may just be<a name="line.31"></a> +<span class="sourceLineNo">032</span> * {@code byte[]} or {@code String}s depending on the implementation used.<a name="line.32"></a> +<span class="sourceLineNo">033</span> *<a name="line.33"></a> +<span class="sourceLineNo">034</span> * @param source<a name="line.34"></a> +<span class="sourceLineNo">035</span> * An object to encode<a name="line.35"></a> +<span class="sourceLineNo">036</span> * @return An "encoded" Object<a name="line.36"></a> +<span class="sourceLineNo">037</span> * @throws EncoderException<a name="line.37"></a> +<span class="sourceLineNo">038</span> * An encoder exception is thrown if the encoder experiences a failure condition during the encoding<a name="line.38"></a> +<span class="sourceLineNo">039</span> * process.<a name="line.39"></a> +<span class="sourceLineNo">040</span> */<a name="line.40"></a> +<span class="sourceLineNo">041</span> Object encode(Object source) throws EncoderException;<a name="line.41"></a> +<span class="sourceLineNo">042</span>}<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/EncoderException.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/EncoderException.html new file mode 100644 index 0000000000000000000000000000000000000000..b116870ec44be7171cdd9ec7aeb185e10428445c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/EncoderException.html @@ -0,0 +1,160 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Thrown when there is a failure condition during the encoding process. This exception is thrown when an<a name="line.21"></a> +<span class="sourceLineNo">022</span> * {@link Encoder} encounters a encoding specific exception such as invalid data, inability to calculate a checksum,<a name="line.22"></a> +<span class="sourceLineNo">023</span> * characters outside of the expected range.<a name="line.23"></a> +<span class="sourceLineNo">024</span> *<a name="line.24"></a> +<span class="sourceLineNo">025</span> */<a name="line.25"></a> +<span class="sourceLineNo">026</span>public class EncoderException extends Exception {<a name="line.26"></a> +<span class="sourceLineNo">027</span><a name="line.27"></a> +<span class="sourceLineNo">028</span> /**<a name="line.28"></a> +<span class="sourceLineNo">029</span> * Declares the Serial Version Uid.<a name="line.29"></a> +<span class="sourceLineNo">030</span> *<a name="line.30"></a> +<span class="sourceLineNo">031</span> * @see <a href="http://c2.com/cgi/wiki?AlwaysDeclareSerialVersionUid">Always Declare Serial Version Uid</a><a name="line.31"></a> +<span class="sourceLineNo">032</span> */<a name="line.32"></a> +<span class="sourceLineNo">033</span> private static final long serialVersionUID = 1L;<a name="line.33"></a> +<span class="sourceLineNo">034</span><a name="line.34"></a> +<span class="sourceLineNo">035</span> /**<a name="line.35"></a> +<span class="sourceLineNo">036</span> * Constructs a new exception with {@code null} as its detail message. The cause is not initialized, and may<a name="line.36"></a> +<span class="sourceLineNo">037</span> * subsequently be initialized by a call to {@link #initCause}.<a name="line.37"></a> +<span class="sourceLineNo">038</span> *<a name="line.38"></a> +<span class="sourceLineNo">039</span> * @since 1.4<a name="line.39"></a> +<span class="sourceLineNo">040</span> */<a name="line.40"></a> +<span class="sourceLineNo">041</span> public EncoderException() {<a name="line.41"></a> +<span class="sourceLineNo">042</span> super();<a name="line.42"></a> +<span class="sourceLineNo">043</span> }<a name="line.43"></a> +<span class="sourceLineNo">044</span><a name="line.44"></a> +<span class="sourceLineNo">045</span> /**<a name="line.45"></a> +<span class="sourceLineNo">046</span> * Constructs a new exception with the specified detail message. The cause is not initialized, and may subsequently<a name="line.46"></a> +<span class="sourceLineNo">047</span> * be initialized by a call to {@link #initCause}.<a name="line.47"></a> +<span class="sourceLineNo">048</span> *<a name="line.48"></a> +<span class="sourceLineNo">049</span> * @param message<a name="line.49"></a> +<span class="sourceLineNo">050</span> * a useful message relating to the encoder specific error.<a name="line.50"></a> +<span class="sourceLineNo">051</span> */<a name="line.51"></a> +<span class="sourceLineNo">052</span> public EncoderException(final String message) {<a name="line.52"></a> +<span class="sourceLineNo">053</span> super(message);<a name="line.53"></a> +<span class="sourceLineNo">054</span> }<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> /**<a name="line.56"></a> +<span class="sourceLineNo">057</span> * Constructs a new exception with the specified detail message and cause.<a name="line.57"></a> +<span class="sourceLineNo">058</span> *<a name="line.58"></a> +<span class="sourceLineNo">059</span> * <p><a name="line.59"></a> +<span class="sourceLineNo">060</span> * Note that the detail message associated with {@code cause} is not automatically incorporated into this<a name="line.60"></a> +<span class="sourceLineNo">061</span> * exception's detail message.<a name="line.61"></a> +<span class="sourceLineNo">062</span> * </p><a name="line.62"></a> +<span class="sourceLineNo">063</span> *<a name="line.63"></a> +<span class="sourceLineNo">064</span> * @param message<a name="line.64"></a> +<span class="sourceLineNo">065</span> * The detail message which is saved for later retrieval by the {@link #getMessage()} method.<a name="line.65"></a> +<span class="sourceLineNo">066</span> * @param cause<a name="line.66"></a> +<span class="sourceLineNo">067</span> * The cause which is saved for later retrieval by the {@link #getCause()} method. A {@code null}<a name="line.67"></a> +<span class="sourceLineNo">068</span> * value is permitted, and indicates that the cause is nonexistent or unknown.<a name="line.68"></a> +<span class="sourceLineNo">069</span> * @since 1.4<a name="line.69"></a> +<span class="sourceLineNo">070</span> */<a name="line.70"></a> +<span class="sourceLineNo">071</span> public EncoderException(final String message, final Throwable cause) {<a name="line.71"></a> +<span class="sourceLineNo">072</span> super(message, cause);<a name="line.72"></a> +<span class="sourceLineNo">073</span> }<a name="line.73"></a> +<span class="sourceLineNo">074</span><a name="line.74"></a> +<span class="sourceLineNo">075</span> /**<a name="line.75"></a> +<span class="sourceLineNo">076</span> * Constructs a new exception with the specified cause and a detail message of <code>(cause==null ?<a name="line.76"></a> +<span class="sourceLineNo">077</span> * null : cause.toString())</code> (which typically contains the class and detail message of {@code cause}).<a name="line.77"></a> +<span class="sourceLineNo">078</span> * This constructor is useful for exceptions that are little more than wrappers for other throwables.<a name="line.78"></a> +<span class="sourceLineNo">079</span> *<a name="line.79"></a> +<span class="sourceLineNo">080</span> * @param cause<a name="line.80"></a> +<span class="sourceLineNo">081</span> * The cause which is saved for later retrieval by the {@link #getCause()} method. A {@code null}<a name="line.81"></a> +<span class="sourceLineNo">082</span> * value is permitted, and indicates that the cause is nonexistent or unknown.<a name="line.82"></a> +<span class="sourceLineNo">083</span> * @since 1.4<a name="line.83"></a> +<span class="sourceLineNo">084</span> */<a name="line.84"></a> +<span class="sourceLineNo">085</span> public EncoderException(final Throwable cause) {<a name="line.85"></a> +<span class="sourceLineNo">086</span> super(cause);<a name="line.86"></a> +<span class="sourceLineNo">087</span> }<a name="line.87"></a> +<span class="sourceLineNo">088</span>}<a name="line.88"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Resources.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Resources.html new file mode 100644 index 0000000000000000000000000000000000000000..8ab1c863769d009231449cbba89ad94c713640e8 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/Resources.html @@ -0,0 +1,114 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.InputStream;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>/**<a name="line.22"></a> +<span class="sourceLineNo">023</span> * Consider this class package private. Helps load resources.<a name="line.23"></a> +<span class="sourceLineNo">024</span> *<a name="line.24"></a> +<span class="sourceLineNo">025</span> * @since 1.12<a name="line.25"></a> +<span class="sourceLineNo">026</span> */<a name="line.26"></a> +<span class="sourceLineNo">027</span>public class Resources {<a name="line.27"></a> +<span class="sourceLineNo">028</span><a name="line.28"></a> +<span class="sourceLineNo">029</span> /**<a name="line.29"></a> +<span class="sourceLineNo">030</span> * Opens the given named resource from the given class.<a name="line.30"></a> +<span class="sourceLineNo">031</span> *<a name="line.31"></a> +<span class="sourceLineNo">032</span> * @param name The resource name.<a name="line.32"></a> +<span class="sourceLineNo">033</span> * @return An input stream.<a name="line.33"></a> +<span class="sourceLineNo">034</span> */<a name="line.34"></a> +<span class="sourceLineNo">035</span> public static InputStream getInputStream(final String name) {<a name="line.35"></a> +<span class="sourceLineNo">036</span> final InputStream inputStream = Resources.class.getClassLoader().getResourceAsStream(name);<a name="line.36"></a> +<span class="sourceLineNo">037</span> if (inputStream == null) {<a name="line.37"></a> +<span class="sourceLineNo">038</span> throw new IllegalArgumentException("Unable to resolve required resource: " + name);<a name="line.38"></a> +<span class="sourceLineNo">039</span> }<a name="line.39"></a> +<span class="sourceLineNo">040</span> return inputStream;<a name="line.40"></a> +<span class="sourceLineNo">041</span> }<a name="line.41"></a> +<span class="sourceLineNo">042</span>}<a name="line.42"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/StringDecoder.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/StringDecoder.html new file mode 100644 index 0000000000000000000000000000000000000000..3343c059175192bafb90d252041604072fda17cd --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/StringDecoder.html @@ -0,0 +1,109 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Defines common decoding methods for String decoders.<a name="line.21"></a> +<span class="sourceLineNo">022</span> *<a name="line.22"></a> +<span class="sourceLineNo">023</span> */<a name="line.23"></a> +<span class="sourceLineNo">024</span>public interface StringDecoder extends Decoder {<a name="line.24"></a> +<span class="sourceLineNo">025</span><a name="line.25"></a> +<span class="sourceLineNo">026</span> /**<a name="line.26"></a> +<span class="sourceLineNo">027</span> * Decodes a String and returns a String.<a name="line.27"></a> +<span class="sourceLineNo">028</span> *<a name="line.28"></a> +<span class="sourceLineNo">029</span> * @param source<a name="line.29"></a> +<span class="sourceLineNo">030</span> * the String to decode<a name="line.30"></a> +<span class="sourceLineNo">031</span> * @return the encoded String<a name="line.31"></a> +<span class="sourceLineNo">032</span> * @throws DecoderException<a name="line.32"></a> +<span class="sourceLineNo">033</span> * thrown if there is an error condition during the Encoding process.<a name="line.33"></a> +<span class="sourceLineNo">034</span> */<a name="line.34"></a> +<span class="sourceLineNo">035</span> String decode(String source) throws DecoderException;<a name="line.35"></a> +<span class="sourceLineNo">036</span>}<a name="line.36"></a> +<span class="sourceLineNo">037</span><a name="line.37"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/StringEncoder.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/StringEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..c555159f6e729ecd0667669a93720aa9b07348bb --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/StringEncoder.html @@ -0,0 +1,109 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Defines common encoding methods for String encoders.<a name="line.21"></a> +<span class="sourceLineNo">022</span> *<a name="line.22"></a> +<span class="sourceLineNo">023</span> */<a name="line.23"></a> +<span class="sourceLineNo">024</span>public interface StringEncoder extends Encoder {<a name="line.24"></a> +<span class="sourceLineNo">025</span><a name="line.25"></a> +<span class="sourceLineNo">026</span> /**<a name="line.26"></a> +<span class="sourceLineNo">027</span> * Encodes a String and returns a String.<a name="line.27"></a> +<span class="sourceLineNo">028</span> *<a name="line.28"></a> +<span class="sourceLineNo">029</span> * @param source<a name="line.29"></a> +<span class="sourceLineNo">030</span> * the String to encode<a name="line.30"></a> +<span class="sourceLineNo">031</span> * @return the encoded String<a name="line.31"></a> +<span class="sourceLineNo">032</span> * @throws EncoderException<a name="line.32"></a> +<span class="sourceLineNo">033</span> * thrown if there is an error condition during the encoding process.<a name="line.33"></a> +<span class="sourceLineNo">034</span> */<a name="line.34"></a> +<span class="sourceLineNo">035</span> String encode(String source) throws EncoderException;<a name="line.35"></a> +<span class="sourceLineNo">036</span>}<a name="line.36"></a> +<span class="sourceLineNo">037</span><a name="line.37"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/StringEncoderComparator.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/StringEncoderComparator.html new file mode 100644 index 0000000000000000000000000000000000000000..1c31dcaedd416d53b106ef614867137b1a2d6cda --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/StringEncoderComparator.html @@ -0,0 +1,162 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.Comparator;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>/**<a name="line.22"></a> +<span class="sourceLineNo">023</span> * Compares Strings using a {@link StringEncoder}. This comparator is used to sort Strings by an encoding scheme such as<a name="line.23"></a> +<span class="sourceLineNo">024</span> * Soundex, Metaphone, etc. This class can come in handy if one need to sort Strings by an encoded form of a name such<a name="line.24"></a> +<span class="sourceLineNo">025</span> * as Soundex.<a name="line.25"></a> +<span class="sourceLineNo">026</span> *<a name="line.26"></a> +<span class="sourceLineNo">027</span> * <p>This class is immutable and thread-safe.</p><a name="line.27"></a> +<span class="sourceLineNo">028</span> *<a name="line.28"></a> +<span class="sourceLineNo">029</span> */<a name="line.29"></a> +<span class="sourceLineNo">030</span>@SuppressWarnings("rawtypes")<a name="line.30"></a> +<span class="sourceLineNo">031</span>// TODO ought to implement Comparator<String> but that's not possible whilst maintaining binary compatibility.<a name="line.31"></a> +<span class="sourceLineNo">032</span>public class StringEncoderComparator implements Comparator {<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span> /**<a name="line.34"></a> +<span class="sourceLineNo">035</span> * Internal encoder instance.<a name="line.35"></a> +<span class="sourceLineNo">036</span> */<a name="line.36"></a> +<span class="sourceLineNo">037</span> private final StringEncoder stringEncoder;<a name="line.37"></a> +<span class="sourceLineNo">038</span><a name="line.38"></a> +<span class="sourceLineNo">039</span> /**<a name="line.39"></a> +<span class="sourceLineNo">040</span> * Constructs a new instance.<a name="line.40"></a> +<span class="sourceLineNo">041</span> *<a name="line.41"></a> +<span class="sourceLineNo">042</span> * @deprecated Creating an instance without a {@link StringEncoder} leads to a {@link NullPointerException}. Will be<a name="line.42"></a> +<span class="sourceLineNo">043</span> * removed in 2.0.<a name="line.43"></a> +<span class="sourceLineNo">044</span> */<a name="line.44"></a> +<span class="sourceLineNo">045</span> @Deprecated<a name="line.45"></a> +<span class="sourceLineNo">046</span> public StringEncoderComparator() {<a name="line.46"></a> +<span class="sourceLineNo">047</span> this.stringEncoder = null; // Trying to use this will cause things to break<a name="line.47"></a> +<span class="sourceLineNo">048</span> }<a name="line.48"></a> +<span class="sourceLineNo">049</span><a name="line.49"></a> +<span class="sourceLineNo">050</span> /**<a name="line.50"></a> +<span class="sourceLineNo">051</span> * Constructs a new instance with the given algorithm.<a name="line.51"></a> +<span class="sourceLineNo">052</span> *<a name="line.52"></a> +<span class="sourceLineNo">053</span> * @param stringEncoder<a name="line.53"></a> +<span class="sourceLineNo">054</span> * the StringEncoder used for comparisons.<a name="line.54"></a> +<span class="sourceLineNo">055</span> */<a name="line.55"></a> +<span class="sourceLineNo">056</span> public StringEncoderComparator(final StringEncoder stringEncoder) {<a name="line.56"></a> +<span class="sourceLineNo">057</span> this.stringEncoder = stringEncoder;<a name="line.57"></a> +<span class="sourceLineNo">058</span> }<a name="line.58"></a> +<span class="sourceLineNo">059</span><a name="line.59"></a> +<span class="sourceLineNo">060</span> /**<a name="line.60"></a> +<span class="sourceLineNo">061</span> * Compares two strings based not on the strings themselves, but on an encoding of the two strings using the<a name="line.61"></a> +<span class="sourceLineNo">062</span> * StringEncoder this Comparator was created with.<a name="line.62"></a> +<span class="sourceLineNo">063</span> *<a name="line.63"></a> +<span class="sourceLineNo">064</span> * If an {@link EncoderException} is encountered, return {@code 0}.<a name="line.64"></a> +<span class="sourceLineNo">065</span> *<a name="line.65"></a> +<span class="sourceLineNo">066</span> * @param o1<a name="line.66"></a> +<span class="sourceLineNo">067</span> * the object to compare<a name="line.67"></a> +<span class="sourceLineNo">068</span> * @param o2<a name="line.68"></a> +<span class="sourceLineNo">069</span> * the object to compare to<a name="line.69"></a> +<span class="sourceLineNo">070</span> * @return the Comparable.compareTo() return code or 0 if an encoding error was caught.<a name="line.70"></a> +<span class="sourceLineNo">071</span> * @see Comparable<a name="line.71"></a> +<span class="sourceLineNo">072</span> */<a name="line.72"></a> +<span class="sourceLineNo">073</span> @Override<a name="line.73"></a> +<span class="sourceLineNo">074</span> public int compare(final Object o1, final Object o2) {<a name="line.74"></a> +<span class="sourceLineNo">075</span><a name="line.75"></a> +<span class="sourceLineNo">076</span> int compareCode = 0;<a name="line.76"></a> +<span class="sourceLineNo">077</span><a name="line.77"></a> +<span class="sourceLineNo">078</span> try {<a name="line.78"></a> +<span class="sourceLineNo">079</span> @SuppressWarnings("unchecked") // May fail with CCE if encode returns something that is not Comparable<a name="line.79"></a> +<span class="sourceLineNo">080</span> // However this was always the case.<a name="line.80"></a> +<span class="sourceLineNo">081</span> final Comparable<Comparable<?>> s1 = (Comparable<Comparable<?>>) this.stringEncoder.encode(o1);<a name="line.81"></a> +<span class="sourceLineNo">082</span> final Comparable<?> s2 = (Comparable<?>) this.stringEncoder.encode(o2);<a name="line.82"></a> +<span class="sourceLineNo">083</span> compareCode = s1.compareTo(s2);<a name="line.83"></a> +<span class="sourceLineNo">084</span> } catch (final EncoderException ee) {<a name="line.84"></a> +<span class="sourceLineNo">085</span> compareCode = 0;<a name="line.85"></a> +<span class="sourceLineNo">086</span> }<a name="line.86"></a> +<span class="sourceLineNo">087</span> return compareCode;<a name="line.87"></a> +<span class="sourceLineNo">088</span> }<a name="line.88"></a> +<span class="sourceLineNo">089</span><a name="line.89"></a> +<span class="sourceLineNo">090</span>}<a name="line.90"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base16.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base16.html new file mode 100644 index 0000000000000000000000000000000000000000..7acf2009aae7ef93d1a83f7fa35fb9cefb17ad69 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base16.html @@ -0,0 +1,339 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.CodecPolicy;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>/**<a name="line.22"></a> +<span class="sourceLineNo">023</span> * Provides Base16 encoding and decoding.<a name="line.23"></a> +<span class="sourceLineNo">024</span> *<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * This class is thread-safe.<a name="line.26"></a> +<span class="sourceLineNo">027</span> * </p><a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p><a name="line.28"></a> +<span class="sourceLineNo">029</span> * This implementation strictly follows RFC 4648, and as such unlike<a name="line.29"></a> +<span class="sourceLineNo">030</span> * the {@link Base32} and {@link Base64} implementations,<a name="line.30"></a> +<span class="sourceLineNo">031</span> * it does not ignore invalid alphabet characters or whitespace,<a name="line.31"></a> +<span class="sourceLineNo">032</span> * neither does it offer chunking or padding characters.<a name="line.32"></a> +<span class="sourceLineNo">033</span> * </p><a name="line.33"></a> +<span class="sourceLineNo">034</span> * <p><a name="line.34"></a> +<span class="sourceLineNo">035</span> * The only additional feature above those specified in RFC 4648<a name="line.35"></a> +<span class="sourceLineNo">036</span> * is support for working with a lower-case alphabet in addition<a name="line.36"></a> +<span class="sourceLineNo">037</span> * to the default upper-case alphabet.<a name="line.37"></a> +<span class="sourceLineNo">038</span> * </p><a name="line.38"></a> +<span class="sourceLineNo">039</span> *<a name="line.39"></a> +<span class="sourceLineNo">040</span> * @see <a href="https://tools.ietf.org/html/rfc4648#section-8">RFC 4648 - 8. Base 16 Encoding</a><a name="line.40"></a> +<span class="sourceLineNo">041</span> *<a name="line.41"></a> +<span class="sourceLineNo">042</span> * @since 1.15<a name="line.42"></a> +<span class="sourceLineNo">043</span> */<a name="line.43"></a> +<span class="sourceLineNo">044</span>public class Base16 extends BaseNCodec {<a name="line.44"></a> +<span class="sourceLineNo">045</span><a name="line.45"></a> +<span class="sourceLineNo">046</span> /**<a name="line.46"></a> +<span class="sourceLineNo">047</span> * BASE16 characters are 4 bits in length.<a name="line.47"></a> +<span class="sourceLineNo">048</span> * They are formed by taking an 8-bit group,<a name="line.48"></a> +<span class="sourceLineNo">049</span> * which is converted into two BASE16 characters.<a name="line.49"></a> +<span class="sourceLineNo">050</span> */<a name="line.50"></a> +<span class="sourceLineNo">051</span> private static final int BITS_PER_ENCODED_BYTE = 4;<a name="line.51"></a> +<span class="sourceLineNo">052</span> private static final int BYTES_PER_ENCODED_BLOCK = 2;<a name="line.52"></a> +<span class="sourceLineNo">053</span> private static final int BYTES_PER_UNENCODED_BLOCK = 1;<a name="line.53"></a> +<span class="sourceLineNo">054</span><a name="line.54"></a> +<span class="sourceLineNo">055</span> /**<a name="line.55"></a> +<span class="sourceLineNo">056</span> * This array is a lookup table that translates Unicode characters drawn from the "Base16 Alphabet" (as specified<a name="line.56"></a> +<span class="sourceLineNo">057</span> * in Table 5 of RFC 4648) into their 4-bit positive integer equivalents. Characters that are not in the Base16<a name="line.57"></a> +<span class="sourceLineNo">058</span> * alphabet but fall within the bounds of the array are translated to -1.<a name="line.58"></a> +<span class="sourceLineNo">059</span> */<a name="line.59"></a> +<span class="sourceLineNo">060</span> private static final byte[] UPPER_CASE_DECODE_TABLE = {<a name="line.60"></a> +<span class="sourceLineNo">061</span> // 0 1 2 3 4 5 6 7 8 9 A B C D E F<a name="line.61"></a> +<span class="sourceLineNo">062</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00-0f<a name="line.62"></a> +<span class="sourceLineNo">063</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10-1f<a name="line.63"></a> +<span class="sourceLineNo">064</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20-2f<a name="line.64"></a> +<span class="sourceLineNo">065</span> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, // 30-3f 0-9<a name="line.65"></a> +<span class="sourceLineNo">066</span> -1, 10, 11, 12, 13, 14, 15 // 40-46 A-F<a name="line.66"></a> +<span class="sourceLineNo">067</span> };<a name="line.67"></a> +<span class="sourceLineNo">068</span><a name="line.68"></a> +<span class="sourceLineNo">069</span> /**<a name="line.69"></a> +<span class="sourceLineNo">070</span> * This array is a lookup table that translates 4-bit positive integer index values into their "Base16 Alphabet"<a name="line.70"></a> +<span class="sourceLineNo">071</span> * equivalents as specified in Table 5 of RFC 4648.<a name="line.71"></a> +<span class="sourceLineNo">072</span> */<a name="line.72"></a> +<span class="sourceLineNo">073</span> private static final byte[] UPPER_CASE_ENCODE_TABLE = {<a name="line.73"></a> +<span class="sourceLineNo">074</span> '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',<a name="line.74"></a> +<span class="sourceLineNo">075</span> 'A', 'B', 'C', 'D', 'E', 'F'<a name="line.75"></a> +<span class="sourceLineNo">076</span> };<a name="line.76"></a> +<span class="sourceLineNo">077</span><a name="line.77"></a> +<span class="sourceLineNo">078</span> /**<a name="line.78"></a> +<span class="sourceLineNo">079</span> * This array is a lookup table that translates Unicode characters drawn from the a lower-case "Base16 Alphabet"<a name="line.79"></a> +<span class="sourceLineNo">080</span> * into their 4-bit positive integer equivalents. Characters that are not in the Base16<a name="line.80"></a> +<span class="sourceLineNo">081</span> * alphabet but fall within the bounds of the array are translated to -1.<a name="line.81"></a> +<span class="sourceLineNo">082</span> */<a name="line.82"></a> +<span class="sourceLineNo">083</span> private static final byte[] LOWER_CASE_DECODE_TABLE = {<a name="line.83"></a> +<span class="sourceLineNo">084</span> // 0 1 2 3 4 5 6 7 8 9 A B C D E F<a name="line.84"></a> +<span class="sourceLineNo">085</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00-0f<a name="line.85"></a> +<span class="sourceLineNo">086</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10-1f<a name="line.86"></a> +<span class="sourceLineNo">087</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20-2f<a name="line.87"></a> +<span class="sourceLineNo">088</span> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, // 30-3f 0-9<a name="line.88"></a> +<span class="sourceLineNo">089</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 40-4f<a name="line.89"></a> +<span class="sourceLineNo">090</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 50-5f<a name="line.90"></a> +<span class="sourceLineNo">091</span> -1, 10, 11, 12, 13, 14, 15 // 60-66 a-f<a name="line.91"></a> +<span class="sourceLineNo">092</span> };<a name="line.92"></a> +<span class="sourceLineNo">093</span><a name="line.93"></a> +<span class="sourceLineNo">094</span> /**<a name="line.94"></a> +<span class="sourceLineNo">095</span> * This array is a lookup table that translates 4-bit positive integer index values into their "Base16 Alphabet"<a name="line.95"></a> +<span class="sourceLineNo">096</span> * lower-case equivalents.<a name="line.96"></a> +<span class="sourceLineNo">097</span> */<a name="line.97"></a> +<span class="sourceLineNo">098</span> private static final byte[] LOWER_CASE_ENCODE_TABLE = {<a name="line.98"></a> +<span class="sourceLineNo">099</span> '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',<a name="line.99"></a> +<span class="sourceLineNo">100</span> 'a', 'b', 'c', 'd', 'e', 'f'<a name="line.100"></a> +<span class="sourceLineNo">101</span> };<a name="line.101"></a> +<span class="sourceLineNo">102</span><a name="line.102"></a> +<span class="sourceLineNo">103</span> /** Mask used to extract 4 bits, used when decoding character. */<a name="line.103"></a> +<span class="sourceLineNo">104</span> private static final int MASK_4BITS = 0x0f;<a name="line.104"></a> +<span class="sourceLineNo">105</span><a name="line.105"></a> +<span class="sourceLineNo">106</span> /**<a name="line.106"></a> +<span class="sourceLineNo">107</span> * Decode table to use.<a name="line.107"></a> +<span class="sourceLineNo">108</span> */<a name="line.108"></a> +<span class="sourceLineNo">109</span> private final byte[] decodeTable;<a name="line.109"></a> +<span class="sourceLineNo">110</span><a name="line.110"></a> +<span class="sourceLineNo">111</span> /**<a name="line.111"></a> +<span class="sourceLineNo">112</span> * Encode table to use.<a name="line.112"></a> +<span class="sourceLineNo">113</span> */<a name="line.113"></a> +<span class="sourceLineNo">114</span> private final byte[] encodeTable;<a name="line.114"></a> +<span class="sourceLineNo">115</span><a name="line.115"></a> +<span class="sourceLineNo">116</span> /**<a name="line.116"></a> +<span class="sourceLineNo">117</span> * Creates a Base16 codec used for decoding and encoding.<a name="line.117"></a> +<span class="sourceLineNo">118</span> */<a name="line.118"></a> +<span class="sourceLineNo">119</span> public Base16() {<a name="line.119"></a> +<span class="sourceLineNo">120</span> this(false);<a name="line.120"></a> +<span class="sourceLineNo">121</span> }<a name="line.121"></a> +<span class="sourceLineNo">122</span><a name="line.122"></a> +<span class="sourceLineNo">123</span> /**<a name="line.123"></a> +<span class="sourceLineNo">124</span> * Creates a Base16 codec used for decoding and encoding.<a name="line.124"></a> +<span class="sourceLineNo">125</span> *<a name="line.125"></a> +<span class="sourceLineNo">126</span> * @param lowerCase if {@code true} then use a lower-case Base16 alphabet.<a name="line.126"></a> +<span class="sourceLineNo">127</span> */<a name="line.127"></a> +<span class="sourceLineNo">128</span> public Base16(final boolean lowerCase) {<a name="line.128"></a> +<span class="sourceLineNo">129</span> this(lowerCase, DECODING_POLICY_DEFAULT);<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> /**<a name="line.132"></a> +<span class="sourceLineNo">133</span> * Creates a Base16 codec used for decoding and encoding.<a name="line.133"></a> +<span class="sourceLineNo">134</span> *<a name="line.134"></a> +<span class="sourceLineNo">135</span> * @param lowerCase if {@code true} then use a lower-case Base16 alphabet.<a name="line.135"></a> +<span class="sourceLineNo">136</span> * @param decodingPolicy Decoding policy.<a name="line.136"></a> +<span class="sourceLineNo">137</span> */<a name="line.137"></a> +<span class="sourceLineNo">138</span> public Base16(final boolean lowerCase, final CodecPolicy decodingPolicy) {<a name="line.138"></a> +<span class="sourceLineNo">139</span> super(BYTES_PER_UNENCODED_BLOCK, BYTES_PER_ENCODED_BLOCK, 0, 0,<a name="line.139"></a> +<span class="sourceLineNo">140</span> PAD_DEFAULT, decodingPolicy);<a name="line.140"></a> +<span class="sourceLineNo">141</span> if (lowerCase) {<a name="line.141"></a> +<span class="sourceLineNo">142</span> this.encodeTable = LOWER_CASE_ENCODE_TABLE;<a name="line.142"></a> +<span class="sourceLineNo">143</span> this.decodeTable = LOWER_CASE_DECODE_TABLE;<a name="line.143"></a> +<span class="sourceLineNo">144</span> } else {<a name="line.144"></a> +<span class="sourceLineNo">145</span> this.encodeTable = UPPER_CASE_ENCODE_TABLE;<a name="line.145"></a> +<span class="sourceLineNo">146</span> this.decodeTable = UPPER_CASE_DECODE_TABLE;<a name="line.146"></a> +<span class="sourceLineNo">147</span> }<a name="line.147"></a> +<span class="sourceLineNo">148</span> }<a name="line.148"></a> +<span class="sourceLineNo">149</span><a name="line.149"></a> +<span class="sourceLineNo">150</span> @Override<a name="line.150"></a> +<span class="sourceLineNo">151</span> void decode(final byte[] data, int offset, final int length, final Context context) {<a name="line.151"></a> +<span class="sourceLineNo">152</span> if (context.eof || length < 0) {<a name="line.152"></a> +<span class="sourceLineNo">153</span> context.eof = true;<a name="line.153"></a> +<span class="sourceLineNo">154</span> if (context.ibitWorkArea != 0) {<a name="line.154"></a> +<span class="sourceLineNo">155</span> validateTrailingCharacter();<a name="line.155"></a> +<span class="sourceLineNo">156</span> }<a name="line.156"></a> +<span class="sourceLineNo">157</span> return;<a name="line.157"></a> +<span class="sourceLineNo">158</span> }<a name="line.158"></a> +<span class="sourceLineNo">159</span><a name="line.159"></a> +<span class="sourceLineNo">160</span> final int dataLen = Math.min(data.length - offset, length);<a name="line.160"></a> +<span class="sourceLineNo">161</span> final int availableChars = (context.ibitWorkArea != 0 ? 1 : 0) + dataLen;<a name="line.161"></a> +<span class="sourceLineNo">162</span><a name="line.162"></a> +<span class="sourceLineNo">163</span> // small optimisation to short-cut the rest of this method when it is fed byte-by-byte<a name="line.163"></a> +<span class="sourceLineNo">164</span> if (availableChars == 1 && availableChars == dataLen) {<a name="line.164"></a> +<span class="sourceLineNo">165</span> context.ibitWorkArea = decodeOctet(data[offset]) + 1; // store 1/2 byte for next invocation of decode, we offset by +1 as empty-value is 0<a name="line.165"></a> +<span class="sourceLineNo">166</span> return;<a name="line.166"></a> +<span class="sourceLineNo">167</span> }<a name="line.167"></a> +<span class="sourceLineNo">168</span><a name="line.168"></a> +<span class="sourceLineNo">169</span> // we must have an even number of chars to decode<a name="line.169"></a> +<span class="sourceLineNo">170</span> final int charsToProcess = availableChars % BYTES_PER_ENCODED_BLOCK == 0 ? availableChars : availableChars - 1;<a name="line.170"></a> +<span class="sourceLineNo">171</span><a name="line.171"></a> +<span class="sourceLineNo">172</span> final byte[] buffer = ensureBufferSize(charsToProcess / BYTES_PER_ENCODED_BLOCK, context);<a name="line.172"></a> +<span class="sourceLineNo">173</span><a name="line.173"></a> +<span class="sourceLineNo">174</span> int result;<a name="line.174"></a> +<span class="sourceLineNo">175</span> int i = 0;<a name="line.175"></a> +<span class="sourceLineNo">176</span> if (dataLen < availableChars) {<a name="line.176"></a> +<span class="sourceLineNo">177</span> // we have 1/2 byte from previous invocation to decode<a name="line.177"></a> +<span class="sourceLineNo">178</span> result = (context.ibitWorkArea - 1) << BITS_PER_ENCODED_BYTE;<a name="line.178"></a> +<span class="sourceLineNo">179</span> result |= decodeOctet(data[offset++]);<a name="line.179"></a> +<span class="sourceLineNo">180</span> i = 2;<a name="line.180"></a> +<span class="sourceLineNo">181</span><a name="line.181"></a> +<span class="sourceLineNo">182</span> buffer[context.pos++] = (byte)result;<a name="line.182"></a> +<span class="sourceLineNo">183</span><a name="line.183"></a> +<span class="sourceLineNo">184</span> // reset to empty-value for next invocation!<a name="line.184"></a> +<span class="sourceLineNo">185</span> context.ibitWorkArea = 0;<a name="line.185"></a> +<span class="sourceLineNo">186</span> }<a name="line.186"></a> +<span class="sourceLineNo">187</span><a name="line.187"></a> +<span class="sourceLineNo">188</span> while (i < charsToProcess) {<a name="line.188"></a> +<span class="sourceLineNo">189</span> result = decodeOctet(data[offset++]) << BITS_PER_ENCODED_BYTE;<a name="line.189"></a> +<span class="sourceLineNo">190</span> result |= decodeOctet(data[offset++]);<a name="line.190"></a> +<span class="sourceLineNo">191</span> i += 2;<a name="line.191"></a> +<span class="sourceLineNo">192</span> buffer[context.pos++] = (byte)result;<a name="line.192"></a> +<span class="sourceLineNo">193</span> }<a name="line.193"></a> +<span class="sourceLineNo">194</span><a name="line.194"></a> +<span class="sourceLineNo">195</span> // we have one char of a hex-pair left over<a name="line.195"></a> +<span class="sourceLineNo">196</span> if (i < dataLen) {<a name="line.196"></a> +<span class="sourceLineNo">197</span> context.ibitWorkArea = decodeOctet(data[i]) + 1; // store 1/2 byte for next invocation of decode, we offset by +1 as empty-value is 0<a name="line.197"></a> +<span class="sourceLineNo">198</span> }<a name="line.198"></a> +<span class="sourceLineNo">199</span> }<a name="line.199"></a> +<span class="sourceLineNo">200</span><a name="line.200"></a> +<span class="sourceLineNo">201</span> private int decodeOctet(final byte octet) {<a name="line.201"></a> +<span class="sourceLineNo">202</span> int decoded = -1;<a name="line.202"></a> +<span class="sourceLineNo">203</span> if ((octet & 0xff) < decodeTable.length) {<a name="line.203"></a> +<span class="sourceLineNo">204</span> decoded = decodeTable[octet];<a name="line.204"></a> +<span class="sourceLineNo">205</span> }<a name="line.205"></a> +<span class="sourceLineNo">206</span><a name="line.206"></a> +<span class="sourceLineNo">207</span> if (decoded == -1) {<a name="line.207"></a> +<span class="sourceLineNo">208</span> throw new IllegalArgumentException("Invalid octet in encoded value: " + (int)octet);<a name="line.208"></a> +<span class="sourceLineNo">209</span> }<a name="line.209"></a> +<span class="sourceLineNo">210</span><a name="line.210"></a> +<span class="sourceLineNo">211</span> return decoded;<a name="line.211"></a> +<span class="sourceLineNo">212</span> }<a name="line.212"></a> +<span class="sourceLineNo">213</span><a name="line.213"></a> +<span class="sourceLineNo">214</span> @Override<a name="line.214"></a> +<span class="sourceLineNo">215</span> void encode(final byte[] data, final int offset, final int length, final Context context) {<a name="line.215"></a> +<span class="sourceLineNo">216</span> if (context.eof) {<a name="line.216"></a> +<span class="sourceLineNo">217</span> return;<a name="line.217"></a> +<span class="sourceLineNo">218</span> }<a name="line.218"></a> +<span class="sourceLineNo">219</span><a name="line.219"></a> +<span class="sourceLineNo">220</span> if (length < 0) {<a name="line.220"></a> +<span class="sourceLineNo">221</span> context.eof = true;<a name="line.221"></a> +<span class="sourceLineNo">222</span> return;<a name="line.222"></a> +<span class="sourceLineNo">223</span> }<a name="line.223"></a> +<span class="sourceLineNo">224</span><a name="line.224"></a> +<span class="sourceLineNo">225</span> final int size = length * BYTES_PER_ENCODED_BLOCK;<a name="line.225"></a> +<span class="sourceLineNo">226</span> if (size < 0) {<a name="line.226"></a> +<span class="sourceLineNo">227</span> throw new IllegalArgumentException("Input length exceeds maximum size for encoded data: " + length);<a name="line.227"></a> +<span class="sourceLineNo">228</span> }<a name="line.228"></a> +<span class="sourceLineNo">229</span><a name="line.229"></a> +<span class="sourceLineNo">230</span> final byte[] buffer = ensureBufferSize(size, context);<a name="line.230"></a> +<span class="sourceLineNo">231</span><a name="line.231"></a> +<span class="sourceLineNo">232</span> final int end = offset + length;<a name="line.232"></a> +<span class="sourceLineNo">233</span> for (int i = offset; i < end; i++) {<a name="line.233"></a> +<span class="sourceLineNo">234</span> final int value = data[i];<a name="line.234"></a> +<span class="sourceLineNo">235</span> final int high = (value >> BITS_PER_ENCODED_BYTE) & MASK_4BITS;<a name="line.235"></a> +<span class="sourceLineNo">236</span> final int low = value & MASK_4BITS;<a name="line.236"></a> +<span class="sourceLineNo">237</span> buffer[context.pos++] = encodeTable[high];<a name="line.237"></a> +<span class="sourceLineNo">238</span> buffer[context.pos++] = encodeTable[low];<a name="line.238"></a> +<span class="sourceLineNo">239</span> }<a name="line.239"></a> +<span class="sourceLineNo">240</span> }<a name="line.240"></a> +<span class="sourceLineNo">241</span><a name="line.241"></a> +<span class="sourceLineNo">242</span> /**<a name="line.242"></a> +<span class="sourceLineNo">243</span> * Returns whether or not the {@code octet} is in the Base16 alphabet.<a name="line.243"></a> +<span class="sourceLineNo">244</span> *<a name="line.244"></a> +<span class="sourceLineNo">245</span> * @param octet The value to test.<a name="line.245"></a> +<span class="sourceLineNo">246</span> *<a name="line.246"></a> +<span class="sourceLineNo">247</span> * @return {@code true} if the value is defined in the the Base16 alphabet {@code false} otherwise.<a name="line.247"></a> +<span class="sourceLineNo">248</span> */<a name="line.248"></a> +<span class="sourceLineNo">249</span> @Override<a name="line.249"></a> +<span class="sourceLineNo">250</span> public boolean isInAlphabet(final byte octet) {<a name="line.250"></a> +<span class="sourceLineNo">251</span> return (octet & 0xff) < decodeTable.length && decodeTable[octet] != -1;<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span><a name="line.253"></a> +<span class="sourceLineNo">254</span> /**<a name="line.254"></a> +<span class="sourceLineNo">255</span> * Validates whether decoding allows an entire final trailing character that cannot be<a name="line.255"></a> +<span class="sourceLineNo">256</span> * used for a complete byte.<a name="line.256"></a> +<span class="sourceLineNo">257</span> *<a name="line.257"></a> +<span class="sourceLineNo">258</span> * @throws IllegalArgumentException if strict decoding is enabled<a name="line.258"></a> +<span class="sourceLineNo">259</span> */<a name="line.259"></a> +<span class="sourceLineNo">260</span> private void validateTrailingCharacter() {<a name="line.260"></a> +<span class="sourceLineNo">261</span> if (isStrictDecoding()) {<a name="line.261"></a> +<span class="sourceLineNo">262</span> throw new IllegalArgumentException("Strict decoding: Last encoded character is a valid base 16 alphabet" +<a name="line.262"></a> +<span class="sourceLineNo">263</span> "character but not a possible encoding. " +<a name="line.263"></a> +<span class="sourceLineNo">264</span> "Decoding requires at least two characters to create one byte.");<a name="line.264"></a> +<span class="sourceLineNo">265</span> }<a name="line.265"></a> +<span class="sourceLineNo">266</span> }<a name="line.266"></a> +<span class="sourceLineNo">267</span>}<a name="line.267"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base16InputStream.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base16InputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..0b5901dd8fa441f28a125eec22dacef942d5db59 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base16InputStream.html @@ -0,0 +1,153 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.CodecPolicy;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.io.InputStream;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>/**<a name="line.24"></a> +<span class="sourceLineNo">025</span> * Provides Base16 encoding and decoding in a streaming fashion (unlimited size).<a name="line.25"></a> +<span class="sourceLineNo">026</span> * <p><a name="line.26"></a> +<span class="sourceLineNo">027</span> * The default behavior of the Base16InputStream is to DECODE, whereas the default behavior of the<a name="line.27"></a> +<span class="sourceLineNo">028</span> * {@link Base16OutputStream} is to ENCODE, but this behavior can be overridden by using a different constructor.<a name="line.28"></a> +<span class="sourceLineNo">029</span> * </p><a name="line.29"></a> +<span class="sourceLineNo">030</span> *<a name="line.30"></a> +<span class="sourceLineNo">031</span> * @since 1.15<a name="line.31"></a> +<span class="sourceLineNo">032</span> */<a name="line.32"></a> +<span class="sourceLineNo">033</span>public class Base16InputStream extends BaseNCodecInputStream {<a name="line.33"></a> +<span class="sourceLineNo">034</span><a name="line.34"></a> +<span class="sourceLineNo">035</span> /**<a name="line.35"></a> +<span class="sourceLineNo">036</span> * Creates a Base16InputStream such that all data read is Base16-decoded from the original provided InputStream.<a name="line.36"></a> +<span class="sourceLineNo">037</span> *<a name="line.37"></a> +<span class="sourceLineNo">038</span> * @param in InputStream to wrap.<a name="line.38"></a> +<span class="sourceLineNo">039</span> */<a name="line.39"></a> +<span class="sourceLineNo">040</span> public Base16InputStream(final InputStream in) {<a name="line.40"></a> +<span class="sourceLineNo">041</span> this(in, false);<a name="line.41"></a> +<span class="sourceLineNo">042</span> }<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> +<span class="sourceLineNo">044</span> /**<a name="line.44"></a> +<span class="sourceLineNo">045</span> * Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original<a name="line.45"></a> +<span class="sourceLineNo">046</span> * provided InputStream.<a name="line.46"></a> +<span class="sourceLineNo">047</span> *<a name="line.47"></a> +<span class="sourceLineNo">048</span> * @param in InputStream to wrap.<a name="line.48"></a> +<span class="sourceLineNo">049</span> * @param doEncode true if we should encode all data read from us, false if we should decode.<a name="line.49"></a> +<span class="sourceLineNo">050</span> */<a name="line.50"></a> +<span class="sourceLineNo">051</span> public Base16InputStream(final InputStream in, final boolean doEncode) {<a name="line.51"></a> +<span class="sourceLineNo">052</span> this(in, doEncode, false);<a name="line.52"></a> +<span class="sourceLineNo">053</span> }<a name="line.53"></a> +<span class="sourceLineNo">054</span><a name="line.54"></a> +<span class="sourceLineNo">055</span> /**<a name="line.55"></a> +<span class="sourceLineNo">056</span> * Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original<a name="line.56"></a> +<span class="sourceLineNo">057</span> * provided InputStream.<a name="line.57"></a> +<span class="sourceLineNo">058</span> *<a name="line.58"></a> +<span class="sourceLineNo">059</span> * @param in InputStream to wrap.<a name="line.59"></a> +<span class="sourceLineNo">060</span> * @param doEncode true if we should encode all data read from us, false if we should decode.<a name="line.60"></a> +<span class="sourceLineNo">061</span> * @param lowerCase if {@code true} then use a lower-case Base16 alphabet.<a name="line.61"></a> +<span class="sourceLineNo">062</span> */<a name="line.62"></a> +<span class="sourceLineNo">063</span> public Base16InputStream(final InputStream in, final boolean doEncode,<a name="line.63"></a> +<span class="sourceLineNo">064</span> final boolean lowerCase) {<a name="line.64"></a> +<span class="sourceLineNo">065</span> this(in, doEncode, lowerCase, CodecPolicy.LENIENT);<a name="line.65"></a> +<span class="sourceLineNo">066</span> }<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> /**<a name="line.68"></a> +<span class="sourceLineNo">069</span> * Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original<a name="line.69"></a> +<span class="sourceLineNo">070</span> * provided InputStream.<a name="line.70"></a> +<span class="sourceLineNo">071</span> *<a name="line.71"></a> +<span class="sourceLineNo">072</span> * @param in InputStream to wrap.<a name="line.72"></a> +<span class="sourceLineNo">073</span> * @param doEncode true if we should encode all data read from us, false if we should decode.<a name="line.73"></a> +<span class="sourceLineNo">074</span> * @param lowerCase if {@code true} then use a lower-case Base16 alphabet.<a name="line.74"></a> +<span class="sourceLineNo">075</span> * @param decodingPolicy Decoding policy.<a name="line.75"></a> +<span class="sourceLineNo">076</span> */<a name="line.76"></a> +<span class="sourceLineNo">077</span> public Base16InputStream(final InputStream in, final boolean doEncode,<a name="line.77"></a> +<span class="sourceLineNo">078</span> final boolean lowerCase, final CodecPolicy decodingPolicy) {<a name="line.78"></a> +<span class="sourceLineNo">079</span> super(in, new Base16(lowerCase, decodingPolicy), doEncode);<a name="line.79"></a> +<span class="sourceLineNo">080</span> }<a name="line.80"></a> +<span class="sourceLineNo">081</span>}<a name="line.81"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base16OutputStream.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base16OutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..20f6534cc29fc188d423b637b6830d711147a064 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base16OutputStream.html @@ -0,0 +1,153 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.CodecPolicy;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.io.OutputStream;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>/**<a name="line.24"></a> +<span class="sourceLineNo">025</span> * Provides Hex encoding and decoding in a streaming fashion (unlimited size).<a name="line.25"></a> +<span class="sourceLineNo">026</span> * <p><a name="line.26"></a> +<span class="sourceLineNo">027</span> * The default behavior of the HexOutputStream is to ENCODE, whereas the default behavior of the<a name="line.27"></a> +<span class="sourceLineNo">028</span> * {@link Base16InputStream} is to DECODE. But this behavior can be overridden by using a different constructor.<a name="line.28"></a> +<span class="sourceLineNo">029</span> * </p><a name="line.29"></a> +<span class="sourceLineNo">030</span> *<a name="line.30"></a> +<span class="sourceLineNo">031</span> * @since 1.15<a name="line.31"></a> +<span class="sourceLineNo">032</span> */<a name="line.32"></a> +<span class="sourceLineNo">033</span>public class Base16OutputStream extends BaseNCodecOutputStream {<a name="line.33"></a> +<span class="sourceLineNo">034</span><a name="line.34"></a> +<span class="sourceLineNo">035</span> /**<a name="line.35"></a> +<span class="sourceLineNo">036</span> * Creates a Base16OutputStream such that all data written is Hex-encoded to the original provided OutputStream.<a name="line.36"></a> +<span class="sourceLineNo">037</span> *<a name="line.37"></a> +<span class="sourceLineNo">038</span> * @param out OutputStream to wrap.<a name="line.38"></a> +<span class="sourceLineNo">039</span> */<a name="line.39"></a> +<span class="sourceLineNo">040</span> public Base16OutputStream(final OutputStream out) {<a name="line.40"></a> +<span class="sourceLineNo">041</span> this(out, true);<a name="line.41"></a> +<span class="sourceLineNo">042</span> }<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> +<span class="sourceLineNo">044</span> /**<a name="line.44"></a> +<span class="sourceLineNo">045</span> * Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the<a name="line.45"></a> +<span class="sourceLineNo">046</span> * original provided OutputStream.<a name="line.46"></a> +<span class="sourceLineNo">047</span> *<a name="line.47"></a> +<span class="sourceLineNo">048</span> * @param out OutputStream to wrap.<a name="line.48"></a> +<span class="sourceLineNo">049</span> * @param doEncode true if we should encode all data written to us, false if we should decode.<a name="line.49"></a> +<span class="sourceLineNo">050</span> */<a name="line.50"></a> +<span class="sourceLineNo">051</span> public Base16OutputStream(final OutputStream out, final boolean doEncode) {<a name="line.51"></a> +<span class="sourceLineNo">052</span> this(out, doEncode, false);<a name="line.52"></a> +<span class="sourceLineNo">053</span> }<a name="line.53"></a> +<span class="sourceLineNo">054</span><a name="line.54"></a> +<span class="sourceLineNo">055</span> /**<a name="line.55"></a> +<span class="sourceLineNo">056</span> * Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the<a name="line.56"></a> +<span class="sourceLineNo">057</span> * original provided OutputStream.<a name="line.57"></a> +<span class="sourceLineNo">058</span> *<a name="line.58"></a> +<span class="sourceLineNo">059</span> * @param out OutputStream to wrap.<a name="line.59"></a> +<span class="sourceLineNo">060</span> * @param doEncode true if we should encode all data written to us, false if we should decode.<a name="line.60"></a> +<span class="sourceLineNo">061</span> * @param lowerCase if {@code true} then use a lower-case Base16 alphabet.<a name="line.61"></a> +<span class="sourceLineNo">062</span> */<a name="line.62"></a> +<span class="sourceLineNo">063</span> public Base16OutputStream(final OutputStream out, final boolean doEncode,<a name="line.63"></a> +<span class="sourceLineNo">064</span> final boolean lowerCase) {<a name="line.64"></a> +<span class="sourceLineNo">065</span> this(out, doEncode, lowerCase, CodecPolicy.LENIENT);<a name="line.65"></a> +<span class="sourceLineNo">066</span> }<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> /**<a name="line.68"></a> +<span class="sourceLineNo">069</span> * Creates a Base16OutputStream such that all data written is either Hex-encoded or Hex-decoded to the<a name="line.69"></a> +<span class="sourceLineNo">070</span> * original provided OutputStream.<a name="line.70"></a> +<span class="sourceLineNo">071</span> *<a name="line.71"></a> +<span class="sourceLineNo">072</span> * @param out OutputStream to wrap.<a name="line.72"></a> +<span class="sourceLineNo">073</span> * @param doEncode true if we should encode all data written to us, false if we should decode.<a name="line.73"></a> +<span class="sourceLineNo">074</span> * @param lowerCase if {@code true} then use a lower-case Base16 alphabet.<a name="line.74"></a> +<span class="sourceLineNo">075</span> * @param decodingPolicy Decoding policy.<a name="line.75"></a> +<span class="sourceLineNo">076</span> */<a name="line.76"></a> +<span class="sourceLineNo">077</span> public Base16OutputStream(final OutputStream out, final boolean doEncode,<a name="line.77"></a> +<span class="sourceLineNo">078</span> final boolean lowerCase, final CodecPolicy decodingPolicy) {<a name="line.78"></a> +<span class="sourceLineNo">079</span> super(out, new Base16(lowerCase, decodingPolicy), doEncode);<a name="line.79"></a> +<span class="sourceLineNo">080</span> }<a name="line.80"></a> +<span class="sourceLineNo">081</span>}<a name="line.81"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base32.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base32.html new file mode 100644 index 0000000000000000000000000000000000000000..7ff28073d0177fa9d036f1041db380470b0dc547 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base32.html @@ -0,0 +1,696 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.CodecPolicy;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>/**<a name="line.22"></a> +<span class="sourceLineNo">023</span> * Provides Base32 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a>.<a name="line.23"></a> +<span class="sourceLineNo">024</span> *<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * The class can be parameterized in the following manner with various constructors:<a name="line.26"></a> +<span class="sourceLineNo">027</span> * </p><a name="line.27"></a> +<span class="sourceLineNo">028</span> * <ul><a name="line.28"></a> +<span class="sourceLineNo">029</span> * <li>Whether to use the "base32hex" variant instead of the default "base32"</li><a name="line.29"></a> +<span class="sourceLineNo">030</span> * <li>Line length: Default 76. Line length that aren't multiples of 8 will still essentially end up being multiples of<a name="line.30"></a> +<span class="sourceLineNo">031</span> * 8 in the encoded data.<a name="line.31"></a> +<span class="sourceLineNo">032</span> * <li>Line separator: Default is CRLF ("\r\n")</li><a name="line.32"></a> +<span class="sourceLineNo">033</span> * </ul><a name="line.33"></a> +<span class="sourceLineNo">034</span> * <p><a name="line.34"></a> +<span class="sourceLineNo">035</span> * This class operates directly on byte streams, and not character streams.<a name="line.35"></a> +<span class="sourceLineNo">036</span> * </p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * <p><a name="line.37"></a> +<span class="sourceLineNo">038</span> * This class is thread-safe.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * </p><a name="line.39"></a> +<span class="sourceLineNo">040</span> *<a name="line.40"></a> +<span class="sourceLineNo">041</span> * @see <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a><a name="line.41"></a> +<span class="sourceLineNo">042</span> *<a name="line.42"></a> +<span class="sourceLineNo">043</span> * @since 1.5<a name="line.43"></a> +<span class="sourceLineNo">044</span> */<a name="line.44"></a> +<span class="sourceLineNo">045</span>public class Base32 extends BaseNCodec {<a name="line.45"></a> +<span class="sourceLineNo">046</span><a name="line.46"></a> +<span class="sourceLineNo">047</span> /**<a name="line.47"></a> +<span class="sourceLineNo">048</span> * BASE32 characters are 5 bits in length.<a name="line.48"></a> +<span class="sourceLineNo">049</span> * They are formed by taking a block of five octets to form a 40-bit string,<a name="line.49"></a> +<span class="sourceLineNo">050</span> * which is converted into eight BASE32 characters.<a name="line.50"></a> +<span class="sourceLineNo">051</span> */<a name="line.51"></a> +<span class="sourceLineNo">052</span> private static final int BITS_PER_ENCODED_BYTE = 5;<a name="line.52"></a> +<span class="sourceLineNo">053</span> private static final int BYTES_PER_ENCODED_BLOCK = 8;<a name="line.53"></a> +<span class="sourceLineNo">054</span> private static final int BYTES_PER_UNENCODED_BLOCK = 5;<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> /**<a name="line.56"></a> +<span class="sourceLineNo">057</span> * This array is a lookup table that translates Unicode characters drawn from the "Base32 Alphabet" (as specified<a name="line.57"></a> +<span class="sourceLineNo">058</span> * in Table 3 of RFC 4648) into their 5-bit positive integer equivalents. Characters that are not in the Base32<a name="line.58"></a> +<span class="sourceLineNo">059</span> * alphabet but fall within the bounds of the array are translated to -1.<a name="line.59"></a> +<span class="sourceLineNo">060</span> */<a name="line.60"></a> +<span class="sourceLineNo">061</span> private static final byte[] DECODE_TABLE = {<a name="line.61"></a> +<span class="sourceLineNo">062</span> // 0 1 2 3 4 5 6 7 8 9 A B C D E F<a name="line.62"></a> +<span class="sourceLineNo">063</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00-0f<a name="line.63"></a> +<span class="sourceLineNo">064</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10-1f<a name="line.64"></a> +<span class="sourceLineNo">065</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20-2f<a name="line.65"></a> +<span class="sourceLineNo">066</span> -1, -1, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, -1, -1, -1, // 30-3f 2-7<a name="line.66"></a> +<span class="sourceLineNo">067</span> -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 40-4f A-O<a name="line.67"></a> +<span class="sourceLineNo">068</span> 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // 50-5a P-Z<a name="line.68"></a> +<span class="sourceLineNo">069</span> -1, -1, -1, -1, -1, // 5b-5f<a name="line.69"></a> +<span class="sourceLineNo">070</span> -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 60-6f a-o<a name="line.70"></a> +<span class="sourceLineNo">071</span> 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // 70-7a p-z<a name="line.71"></a> +<span class="sourceLineNo">072</span> };<a name="line.72"></a> +<span class="sourceLineNo">073</span><a name="line.73"></a> +<span class="sourceLineNo">074</span> /**<a name="line.74"></a> +<span class="sourceLineNo">075</span> * This array is a lookup table that translates 5-bit positive integer index values into their "Base32 Alphabet"<a name="line.75"></a> +<span class="sourceLineNo">076</span> * equivalents as specified in Table 3 of RFC 4648.<a name="line.76"></a> +<span class="sourceLineNo">077</span> */<a name="line.77"></a> +<span class="sourceLineNo">078</span> private static final byte[] ENCODE_TABLE = {<a name="line.78"></a> +<span class="sourceLineNo">079</span> 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',<a name="line.79"></a> +<span class="sourceLineNo">080</span> 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',<a name="line.80"></a> +<span class="sourceLineNo">081</span> '2', '3', '4', '5', '6', '7',<a name="line.81"></a> +<span class="sourceLineNo">082</span> };<a name="line.82"></a> +<span class="sourceLineNo">083</span><a name="line.83"></a> +<span class="sourceLineNo">084</span> /**<a name="line.84"></a> +<span class="sourceLineNo">085</span> * This array is a lookup table that translates Unicode characters drawn from the "Base32 Hex Alphabet" (as<a name="line.85"></a> +<span class="sourceLineNo">086</span> * specified in Table 4 of RFC 4648) into their 5-bit positive integer equivalents. Characters that are not in the<a name="line.86"></a> +<span class="sourceLineNo">087</span> * Base32 Hex alphabet but fall within the bounds of the array are translated to -1.<a name="line.87"></a> +<span class="sourceLineNo">088</span> */<a name="line.88"></a> +<span class="sourceLineNo">089</span> private static final byte[] HEX_DECODE_TABLE = {<a name="line.89"></a> +<span class="sourceLineNo">090</span> // 0 1 2 3 4 5 6 7 8 9 A B C D E F<a name="line.90"></a> +<span class="sourceLineNo">091</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00-0f<a name="line.91"></a> +<span class="sourceLineNo">092</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10-1f<a name="line.92"></a> +<span class="sourceLineNo">093</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20-2f<a name="line.93"></a> +<span class="sourceLineNo">094</span> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, // 30-3f 0-9<a name="line.94"></a> +<span class="sourceLineNo">095</span> -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 40-4f A-O<a name="line.95"></a> +<span class="sourceLineNo">096</span> 25, 26, 27, 28, 29, 30, 31, // 50-56 P-V<a name="line.96"></a> +<span class="sourceLineNo">097</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, // 57-5f <a name="line.97"></a> +<span class="sourceLineNo">098</span> -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 60-6f a-o<a name="line.98"></a> +<span class="sourceLineNo">099</span> 25, 26, 27, 28, 29, 30, 31 // 70-76 p-v<a name="line.99"></a> +<span class="sourceLineNo">100</span> };<a name="line.100"></a> +<span class="sourceLineNo">101</span><a name="line.101"></a> +<span class="sourceLineNo">102</span> /**<a name="line.102"></a> +<span class="sourceLineNo">103</span> * This array is a lookup table that translates 5-bit positive integer index values into their<a name="line.103"></a> +<span class="sourceLineNo">104</span> * "Base32 Hex Alphabet" equivalents as specified in Table 4 of RFC 4648.<a name="line.104"></a> +<span class="sourceLineNo">105</span> */<a name="line.105"></a> +<span class="sourceLineNo">106</span> private static final byte[] HEX_ENCODE_TABLE = {<a name="line.106"></a> +<span class="sourceLineNo">107</span> '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',<a name="line.107"></a> +<span class="sourceLineNo">108</span> 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',<a name="line.108"></a> +<span class="sourceLineNo">109</span> 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',<a name="line.109"></a> +<span class="sourceLineNo">110</span> };<a name="line.110"></a> +<span class="sourceLineNo">111</span><a name="line.111"></a> +<span class="sourceLineNo">112</span> /** Mask used to extract 5 bits, used when encoding Base32 bytes */<a name="line.112"></a> +<span class="sourceLineNo">113</span> private static final int MASK_5BITS = 0x1f;<a name="line.113"></a> +<span class="sourceLineNo">114</span> /** Mask used to extract 4 bits, used when decoding final trailing character. */<a name="line.114"></a> +<span class="sourceLineNo">115</span> private static final long MASK_4BITS = 0x0fL;<a name="line.115"></a> +<span class="sourceLineNo">116</span> /** Mask used to extract 3 bits, used when decoding final trailing character. */<a name="line.116"></a> +<span class="sourceLineNo">117</span> private static final long MASK_3BITS = 0x07L;<a name="line.117"></a> +<span class="sourceLineNo">118</span> /** Mask used to extract 2 bits, used when decoding final trailing character. */<a name="line.118"></a> +<span class="sourceLineNo">119</span> private static final long MASK_2BITS = 0x03L;<a name="line.119"></a> +<span class="sourceLineNo">120</span> /** Mask used to extract 1 bits, used when decoding final trailing character. */<a name="line.120"></a> +<span class="sourceLineNo">121</span> private static final long MASK_1BITS = 0x01L;<a name="line.121"></a> +<span class="sourceLineNo">122</span><a name="line.122"></a> +<span class="sourceLineNo">123</span> // The static final fields above are used for the original static byte[] methods on Base32.<a name="line.123"></a> +<span class="sourceLineNo">124</span> // The private member fields below are used with the new streaming approach, which requires<a name="line.124"></a> +<span class="sourceLineNo">125</span> // some state be preserved between calls of encode() and decode().<a name="line.125"></a> +<span class="sourceLineNo">126</span><a name="line.126"></a> +<span class="sourceLineNo">127</span> /**<a name="line.127"></a> +<span class="sourceLineNo">128</span> * Place holder for the bytes we're dealing with for our based logic.<a name="line.128"></a> +<span class="sourceLineNo">129</span> * Bitwise operations store and extract the encoding or decoding from this variable.<a name="line.129"></a> +<span class="sourceLineNo">130</span> */<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> /**<a name="line.132"></a> +<span class="sourceLineNo">133</span> * Convenience variable to help us determine when our buffer is going to run out of room and needs resizing.<a name="line.133"></a> +<span class="sourceLineNo">134</span> * {@code decodeSize = {@link #BYTES_PER_ENCODED_BLOCK} - 1 + lineSeparator.length;}<a name="line.134"></a> +<span class="sourceLineNo">135</span> */<a name="line.135"></a> +<span class="sourceLineNo">136</span> private final int decodeSize;<a name="line.136"></a> +<span class="sourceLineNo">137</span><a name="line.137"></a> +<span class="sourceLineNo">138</span> /**<a name="line.138"></a> +<span class="sourceLineNo">139</span> * Decode table to use.<a name="line.139"></a> +<span class="sourceLineNo">140</span> */<a name="line.140"></a> +<span class="sourceLineNo">141</span> private final byte[] decodeTable;<a name="line.141"></a> +<span class="sourceLineNo">142</span><a name="line.142"></a> +<span class="sourceLineNo">143</span> /**<a name="line.143"></a> +<span class="sourceLineNo">144</span> * Convenience variable to help us determine when our buffer is going to run out of room and needs resizing.<a name="line.144"></a> +<span class="sourceLineNo">145</span> * {@code encodeSize = {@link #BYTES_PER_ENCODED_BLOCK} + lineSeparator.length;}<a name="line.145"></a> +<span class="sourceLineNo">146</span> */<a name="line.146"></a> +<span class="sourceLineNo">147</span> private final int encodeSize;<a name="line.147"></a> +<span class="sourceLineNo">148</span><a name="line.148"></a> +<span class="sourceLineNo">149</span> /**<a name="line.149"></a> +<span class="sourceLineNo">150</span> * Encode table to use.<a name="line.150"></a> +<span class="sourceLineNo">151</span> */<a name="line.151"></a> +<span class="sourceLineNo">152</span> private final byte[] encodeTable;<a name="line.152"></a> +<span class="sourceLineNo">153</span><a name="line.153"></a> +<span class="sourceLineNo">154</span> /**<a name="line.154"></a> +<span class="sourceLineNo">155</span> * Line separator for encoding. Not used when decoding. Only used if lineLength &gt; 0.<a name="line.155"></a> +<span class="sourceLineNo">156</span> */<a name="line.156"></a> +<span class="sourceLineNo">157</span> private final byte[] lineSeparator;<a name="line.157"></a> +<span class="sourceLineNo">158</span><a name="line.158"></a> +<span class="sourceLineNo">159</span> /**<a name="line.159"></a> +<span class="sourceLineNo">160</span> * Creates a Base32 codec used for decoding and encoding.<a name="line.160"></a> +<span class="sourceLineNo">161</span> * <p><a name="line.161"></a> +<span class="sourceLineNo">162</span> * When encoding the line length is 0 (no chunking).<a name="line.162"></a> +<span class="sourceLineNo">163</span> * </p><a name="line.163"></a> +<span class="sourceLineNo">164</span> *<a name="line.164"></a> +<span class="sourceLineNo">165</span> */<a name="line.165"></a> +<span class="sourceLineNo">166</span> public Base32() {<a name="line.166"></a> +<span class="sourceLineNo">167</span> this(false);<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span><a name="line.169"></a> +<span class="sourceLineNo">170</span> /**<a name="line.170"></a> +<span class="sourceLineNo">171</span> * Creates a Base32 codec used for decoding and encoding.<a name="line.171"></a> +<span class="sourceLineNo">172</span> * <p><a name="line.172"></a> +<span class="sourceLineNo">173</span> * When encoding the line length is 0 (no chunking).<a name="line.173"></a> +<span class="sourceLineNo">174</span> * </p><a name="line.174"></a> +<span class="sourceLineNo">175</span> * @param useHex if {@code true} then use Base32 Hex alphabet<a name="line.175"></a> +<span class="sourceLineNo">176</span> */<a name="line.176"></a> +<span class="sourceLineNo">177</span> public Base32(final boolean useHex) {<a name="line.177"></a> +<span class="sourceLineNo">178</span> this(0, null, useHex, PAD_DEFAULT);<a name="line.178"></a> +<span class="sourceLineNo">179</span> }<a name="line.179"></a> +<span class="sourceLineNo">180</span><a name="line.180"></a> +<span class="sourceLineNo">181</span> /**<a name="line.181"></a> +<span class="sourceLineNo">182</span> * Creates a Base32 codec used for decoding and encoding.<a name="line.182"></a> +<span class="sourceLineNo">183</span> * <p><a name="line.183"></a> +<span class="sourceLineNo">184</span> * When encoding the line length is 0 (no chunking).<a name="line.184"></a> +<span class="sourceLineNo">185</span> * </p><a name="line.185"></a> +<span class="sourceLineNo">186</span> * @param useHex if {@code true} then use Base32 Hex alphabet<a name="line.186"></a> +<span class="sourceLineNo">187</span> * @param padding byte used as padding byte.<a name="line.187"></a> +<span class="sourceLineNo">188</span> */<a name="line.188"></a> +<span class="sourceLineNo">189</span> public Base32(final boolean useHex, final byte padding) {<a name="line.189"></a> +<span class="sourceLineNo">190</span> this(0, null, useHex, padding);<a name="line.190"></a> +<span class="sourceLineNo">191</span> }<a name="line.191"></a> +<span class="sourceLineNo">192</span><a name="line.192"></a> +<span class="sourceLineNo">193</span> /**<a name="line.193"></a> +<span class="sourceLineNo">194</span> * Creates a Base32 codec used for decoding and encoding.<a name="line.194"></a> +<span class="sourceLineNo">195</span> * <p><a name="line.195"></a> +<span class="sourceLineNo">196</span> * When encoding the line length is 0 (no chunking).<a name="line.196"></a> +<span class="sourceLineNo">197</span> * </p><a name="line.197"></a> +<span class="sourceLineNo">198</span> * @param pad byte used as padding byte.<a name="line.198"></a> +<span class="sourceLineNo">199</span> */<a name="line.199"></a> +<span class="sourceLineNo">200</span> public Base32(final byte pad) {<a name="line.200"></a> +<span class="sourceLineNo">201</span> this(false, pad);<a name="line.201"></a> +<span class="sourceLineNo">202</span> }<a name="line.202"></a> +<span class="sourceLineNo">203</span><a name="line.203"></a> +<span class="sourceLineNo">204</span> /**<a name="line.204"></a> +<span class="sourceLineNo">205</span> * Creates a Base32 codec used for decoding and encoding.<a name="line.205"></a> +<span class="sourceLineNo">206</span> * <p><a name="line.206"></a> +<span class="sourceLineNo">207</span> * When encoding the line length is given in the constructor, the line separator is CRLF.<a name="line.207"></a> +<span class="sourceLineNo">208</span> * </p><a name="line.208"></a> +<span class="sourceLineNo">209</span> *<a name="line.209"></a> +<span class="sourceLineNo">210</span> * @param lineLength<a name="line.210"></a> +<span class="sourceLineNo">211</span> * Each line of encoded data will be at most of the given length (rounded down to nearest multiple of<a name="line.211"></a> +<span class="sourceLineNo">212</span> * 8). If lineLength &lt;= 0, then the output will not be divided into lines (chunks). Ignored when<a name="line.212"></a> +<span class="sourceLineNo">213</span> * decoding.<a name="line.213"></a> +<span class="sourceLineNo">214</span> */<a name="line.214"></a> +<span class="sourceLineNo">215</span> public Base32(final int lineLength) {<a name="line.215"></a> +<span class="sourceLineNo">216</span> this(lineLength, CHUNK_SEPARATOR);<a name="line.216"></a> +<span class="sourceLineNo">217</span> }<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> /**<a name="line.219"></a> +<span class="sourceLineNo">220</span> * Creates a Base32 codec used for decoding and encoding.<a name="line.220"></a> +<span class="sourceLineNo">221</span> * <p><a name="line.221"></a> +<span class="sourceLineNo">222</span> * When encoding the line length and line separator are given in the constructor.<a name="line.222"></a> +<span class="sourceLineNo">223</span> * </p><a name="line.223"></a> +<span class="sourceLineNo">224</span> * <p><a name="line.224"></a> +<span class="sourceLineNo">225</span> * Line lengths that aren't multiples of 8 will still essentially end up being multiples of 8 in the encoded data.<a name="line.225"></a> +<span class="sourceLineNo">226</span> * </p><a name="line.226"></a> +<span class="sourceLineNo">227</span> *<a name="line.227"></a> +<span class="sourceLineNo">228</span> * @param lineLength<a name="line.228"></a> +<span class="sourceLineNo">229</span> * Each line of encoded data will be at most of the given length (rounded down to nearest multiple of<a name="line.229"></a> +<span class="sourceLineNo">230</span> * 8). If lineLength &lt;= 0, then the output will not be divided into lines (chunks). Ignored when<a name="line.230"></a> +<span class="sourceLineNo">231</span> * decoding.<a name="line.231"></a> +<span class="sourceLineNo">232</span> * @param lineSeparator<a name="line.232"></a> +<span class="sourceLineNo">233</span> * Each line of encoded data will end with this sequence of bytes.<a name="line.233"></a> +<span class="sourceLineNo">234</span> * @throws IllegalArgumentException<a name="line.234"></a> +<span class="sourceLineNo">235</span> * Thrown when the {@code lineSeparator} contains Base32 characters.<a name="line.235"></a> +<span class="sourceLineNo">236</span> */<a name="line.236"></a> +<span class="sourceLineNo">237</span> public Base32(final int lineLength, final byte[] lineSeparator) {<a name="line.237"></a> +<span class="sourceLineNo">238</span> this(lineLength, lineSeparator, false, PAD_DEFAULT);<a name="line.238"></a> +<span class="sourceLineNo">239</span> }<a name="line.239"></a> +<span class="sourceLineNo">240</span><a name="line.240"></a> +<span class="sourceLineNo">241</span> /**<a name="line.241"></a> +<span class="sourceLineNo">242</span> * Creates a Base32 / Base32 Hex codec used for decoding and encoding.<a name="line.242"></a> +<span class="sourceLineNo">243</span> * <p><a name="line.243"></a> +<span class="sourceLineNo">244</span> * When encoding the line length and line separator are given in the constructor.<a name="line.244"></a> +<span class="sourceLineNo">245</span> * </p><a name="line.245"></a> +<span class="sourceLineNo">246</span> * <p><a name="line.246"></a> +<span class="sourceLineNo">247</span> * Line lengths that aren't multiples of 8 will still essentially end up being multiples of 8 in the encoded data.<a name="line.247"></a> +<span class="sourceLineNo">248</span> * </p><a name="line.248"></a> +<span class="sourceLineNo">249</span> *<a name="line.249"></a> +<span class="sourceLineNo">250</span> * @param lineLength<a name="line.250"></a> +<span class="sourceLineNo">251</span> * Each line of encoded data will be at most of the given length (rounded down to nearest multiple of<a name="line.251"></a> +<span class="sourceLineNo">252</span> * 8). If lineLength &lt;= 0, then the output will not be divided into lines (chunks). Ignored when<a name="line.252"></a> +<span class="sourceLineNo">253</span> * decoding.<a name="line.253"></a> +<span class="sourceLineNo">254</span> * @param lineSeparator<a name="line.254"></a> +<span class="sourceLineNo">255</span> * Each line of encoded data will end with this sequence of bytes.<a name="line.255"></a> +<span class="sourceLineNo">256</span> * @param useHex<a name="line.256"></a> +<span class="sourceLineNo">257</span> * if {@code true}, then use Base32 Hex alphabet, otherwise use Base32 alphabet<a name="line.257"></a> +<span class="sourceLineNo">258</span> * @throws IllegalArgumentException<a name="line.258"></a> +<span class="sourceLineNo">259</span> * Thrown when the {@code lineSeparator} contains Base32 characters. Or the<a name="line.259"></a> +<span class="sourceLineNo">260</span> * lineLength &gt; 0 and lineSeparator is null.<a name="line.260"></a> +<span class="sourceLineNo">261</span> */<a name="line.261"></a> +<span class="sourceLineNo">262</span> public Base32(final int lineLength, final byte[] lineSeparator, final boolean useHex) {<a name="line.262"></a> +<span class="sourceLineNo">263</span> this(lineLength, lineSeparator, useHex, PAD_DEFAULT);<a name="line.263"></a> +<span class="sourceLineNo">264</span> }<a name="line.264"></a> +<span class="sourceLineNo">265</span><a name="line.265"></a> +<span class="sourceLineNo">266</span> /**<a name="line.266"></a> +<span class="sourceLineNo">267</span> * Creates a Base32 / Base32 Hex codec used for decoding and encoding.<a name="line.267"></a> +<span class="sourceLineNo">268</span> * <p><a name="line.268"></a> +<span class="sourceLineNo">269</span> * When encoding the line length and line separator are given in the constructor.<a name="line.269"></a> +<span class="sourceLineNo">270</span> * </p><a name="line.270"></a> +<span class="sourceLineNo">271</span> * <p><a name="line.271"></a> +<span class="sourceLineNo">272</span> * Line lengths that aren't multiples of 8 will still essentially end up being multiples of 8 in the encoded data.<a name="line.272"></a> +<span class="sourceLineNo">273</span> * </p><a name="line.273"></a> +<span class="sourceLineNo">274</span> *<a name="line.274"></a> +<span class="sourceLineNo">275</span> * @param lineLength<a name="line.275"></a> +<span class="sourceLineNo">276</span> * Each line of encoded data will be at most of the given length (rounded down to nearest multiple of<a name="line.276"></a> +<span class="sourceLineNo">277</span> * 8). If lineLength &lt;= 0, then the output will not be divided into lines (chunks). Ignored when<a name="line.277"></a> +<span class="sourceLineNo">278</span> * decoding.<a name="line.278"></a> +<span class="sourceLineNo">279</span> * @param lineSeparator<a name="line.279"></a> +<span class="sourceLineNo">280</span> * Each line of encoded data will end with this sequence of bytes.<a name="line.280"></a> +<span class="sourceLineNo">281</span> * @param useHex<a name="line.281"></a> +<span class="sourceLineNo">282</span> * if {@code true}, then use Base32 Hex alphabet, otherwise use Base32 alphabet<a name="line.282"></a> +<span class="sourceLineNo">283</span> * @param padding byte used as padding byte.<a name="line.283"></a> +<span class="sourceLineNo">284</span> * @throws IllegalArgumentException<a name="line.284"></a> +<span class="sourceLineNo">285</span> * Thrown when the {@code lineSeparator} contains Base32 characters. Or the<a name="line.285"></a> +<span class="sourceLineNo">286</span> * lineLength &gt; 0 and lineSeparator is null.<a name="line.286"></a> +<span class="sourceLineNo">287</span> */<a name="line.287"></a> +<span class="sourceLineNo">288</span> public Base32(final int lineLength, final byte[] lineSeparator, final boolean useHex, final byte padding) {<a name="line.288"></a> +<span class="sourceLineNo">289</span> this(lineLength, lineSeparator, useHex, padding, DECODING_POLICY_DEFAULT);<a name="line.289"></a> +<span class="sourceLineNo">290</span> }<a name="line.290"></a> +<span class="sourceLineNo">291</span><a name="line.291"></a> +<span class="sourceLineNo">292</span> /**<a name="line.292"></a> +<span class="sourceLineNo">293</span> * Creates a Base32 / Base32 Hex codec used for decoding and encoding.<a name="line.293"></a> +<span class="sourceLineNo">294</span> * <p><a name="line.294"></a> +<span class="sourceLineNo">295</span> * When encoding the line length and line separator are given in the constructor.<a name="line.295"></a> +<span class="sourceLineNo">296</span> * </p><a name="line.296"></a> +<span class="sourceLineNo">297</span> * <p><a name="line.297"></a> +<span class="sourceLineNo">298</span> * Line lengths that aren't multiples of 8 will still essentially end up being multiples of 8 in the encoded data.<a name="line.298"></a> +<span class="sourceLineNo">299</span> * </p><a name="line.299"></a> +<span class="sourceLineNo">300</span> *<a name="line.300"></a> +<span class="sourceLineNo">301</span> * @param lineLength<a name="line.301"></a> +<span class="sourceLineNo">302</span> * Each line of encoded data will be at most of the given length (rounded down to nearest multiple of<a name="line.302"></a> +<span class="sourceLineNo">303</span> * 8). If lineLength &lt;= 0, then the output will not be divided into lines (chunks). Ignored when<a name="line.303"></a> +<span class="sourceLineNo">304</span> * decoding.<a name="line.304"></a> +<span class="sourceLineNo">305</span> * @param lineSeparator<a name="line.305"></a> +<span class="sourceLineNo">306</span> * Each line of encoded data will end with this sequence of bytes.<a name="line.306"></a> +<span class="sourceLineNo">307</span> * @param useHex<a name="line.307"></a> +<span class="sourceLineNo">308</span> * if {@code true}, then use Base32 Hex alphabet, otherwise use Base32 alphabet<a name="line.308"></a> +<span class="sourceLineNo">309</span> * @param padding byte used as padding byte.<a name="line.309"></a> +<span class="sourceLineNo">310</span> * @param decodingPolicy The decoding policy.<a name="line.310"></a> +<span class="sourceLineNo">311</span> * @throws IllegalArgumentException<a name="line.311"></a> +<span class="sourceLineNo">312</span> * Thrown when the {@code lineSeparator} contains Base32 characters. Or the<a name="line.312"></a> +<span class="sourceLineNo">313</span> * lineLength &gt; 0 and lineSeparator is null.<a name="line.313"></a> +<span class="sourceLineNo">314</span> * @since 1.15<a name="line.314"></a> +<span class="sourceLineNo">315</span> */<a name="line.315"></a> +<span class="sourceLineNo">316</span> public Base32(final int lineLength, final byte[] lineSeparator, final boolean useHex, final byte padding, CodecPolicy decodingPolicy) {<a name="line.316"></a> +<span class="sourceLineNo">317</span> super(BYTES_PER_UNENCODED_BLOCK, BYTES_PER_ENCODED_BLOCK, lineLength,<a name="line.317"></a> +<span class="sourceLineNo">318</span> lineSeparator == null ? 0 : lineSeparator.length, padding, decodingPolicy);<a name="line.318"></a> +<span class="sourceLineNo">319</span> if (useHex) {<a name="line.319"></a> +<span class="sourceLineNo">320</span> this.encodeTable = HEX_ENCODE_TABLE;<a name="line.320"></a> +<span class="sourceLineNo">321</span> this.decodeTable = HEX_DECODE_TABLE;<a name="line.321"></a> +<span class="sourceLineNo">322</span> } else {<a name="line.322"></a> +<span class="sourceLineNo">323</span> this.encodeTable = ENCODE_TABLE;<a name="line.323"></a> +<span class="sourceLineNo">324</span> this.decodeTable = DECODE_TABLE;<a name="line.324"></a> +<span class="sourceLineNo">325</span> }<a name="line.325"></a> +<span class="sourceLineNo">326</span> if (lineLength > 0) {<a name="line.326"></a> +<span class="sourceLineNo">327</span> if (lineSeparator == null) {<a name="line.327"></a> +<span class="sourceLineNo">328</span> throw new IllegalArgumentException("lineLength " + lineLength + " > 0, but lineSeparator is null");<a name="line.328"></a> +<span class="sourceLineNo">329</span> }<a name="line.329"></a> +<span class="sourceLineNo">330</span> // Must be done after initializing the tables<a name="line.330"></a> +<span class="sourceLineNo">331</span> if (containsAlphabetOrPad(lineSeparator)) {<a name="line.331"></a> +<span class="sourceLineNo">332</span> final String sep = StringUtils.newStringUtf8(lineSeparator);<a name="line.332"></a> +<span class="sourceLineNo">333</span> throw new IllegalArgumentException("lineSeparator must not contain Base32 characters: [" + sep + "]");<a name="line.333"></a> +<span class="sourceLineNo">334</span> }<a name="line.334"></a> +<span class="sourceLineNo">335</span> this.encodeSize = BYTES_PER_ENCODED_BLOCK + lineSeparator.length;<a name="line.335"></a> +<span class="sourceLineNo">336</span> this.lineSeparator = new byte[lineSeparator.length];<a name="line.336"></a> +<span class="sourceLineNo">337</span> System.arraycopy(lineSeparator, 0, this.lineSeparator, 0, lineSeparator.length);<a name="line.337"></a> +<span class="sourceLineNo">338</span> } else {<a name="line.338"></a> +<span class="sourceLineNo">339</span> this.encodeSize = BYTES_PER_ENCODED_BLOCK;<a name="line.339"></a> +<span class="sourceLineNo">340</span> this.lineSeparator = null;<a name="line.340"></a> +<span class="sourceLineNo">341</span> }<a name="line.341"></a> +<span class="sourceLineNo">342</span> this.decodeSize = this.encodeSize - 1;<a name="line.342"></a> +<span class="sourceLineNo">343</span><a name="line.343"></a> +<span class="sourceLineNo">344</span> if (isInAlphabet(padding) || isWhiteSpace(padding)) {<a name="line.344"></a> +<span class="sourceLineNo">345</span> throw new IllegalArgumentException("pad must not be in alphabet or whitespace");<a name="line.345"></a> +<span class="sourceLineNo">346</span> }<a name="line.346"></a> +<span class="sourceLineNo">347</span> }<a name="line.347"></a> +<span class="sourceLineNo">348</span><a name="line.348"></a> +<span class="sourceLineNo">349</span> /**<a name="line.349"></a> +<span class="sourceLineNo">350</span> * <p><a name="line.350"></a> +<span class="sourceLineNo">351</span> * Decodes all of the provided data, starting at inPos, for inAvail bytes. Should be called at least twice: once<a name="line.351"></a> +<span class="sourceLineNo">352</span> * with the data to decode, and once with inAvail set to "-1" to alert decoder that EOF has been reached. The "-1"<a name="line.352"></a> +<span class="sourceLineNo">353</span> * call is not necessary when decoding, but it doesn't hurt, either.<a name="line.353"></a> +<span class="sourceLineNo">354</span> * </p><a name="line.354"></a> +<span class="sourceLineNo">355</span> * <p><a name="line.355"></a> +<span class="sourceLineNo">356</span> * Ignores all non-Base32 characters. This is how chunked (e.g. 76 character) data is handled, since CR and LF are<a name="line.356"></a> +<span class="sourceLineNo">357</span> * silently ignored, but has implications for other bytes, too. This method subscribes to the garbage-in,<a name="line.357"></a> +<span class="sourceLineNo">358</span> * garbage-out philosophy: it will not check the provided data for validity.<a name="line.358"></a> +<span class="sourceLineNo">359</span> * </p><a name="line.359"></a> +<span class="sourceLineNo">360</span> * <p><a name="line.360"></a> +<span class="sourceLineNo">361</span> * Output is written to {@link org.apache.commons.codec.binary.BaseNCodec.Context#buffer Context#buffer} as 8-bit<a name="line.361"></a> +<span class="sourceLineNo">362</span> * octets, using {@link org.apache.commons.codec.binary.BaseNCodec.Context#pos Context#pos} as the buffer position<a name="line.362"></a> +<span class="sourceLineNo">363</span> * </p><a name="line.363"></a> +<span class="sourceLineNo">364</span> *<a name="line.364"></a> +<span class="sourceLineNo">365</span> * @param input byte[] array of ascii data to Base32 decode.<a name="line.365"></a> +<span class="sourceLineNo">366</span> * @param inPos Position to start reading data from.<a name="line.366"></a> +<span class="sourceLineNo">367</span> * @param inAvail Amount of bytes available from input for decoding.<a name="line.367"></a> +<span class="sourceLineNo">368</span> * @param context the context to be used<a name="line.368"></a> +<span class="sourceLineNo">369</span> */<a name="line.369"></a> +<span class="sourceLineNo">370</span> @Override<a name="line.370"></a> +<span class="sourceLineNo">371</span> void decode(final byte[] input, int inPos, final int inAvail, final Context context) {<a name="line.371"></a> +<span class="sourceLineNo">372</span> // package protected for access from I/O streams<a name="line.372"></a> +<span class="sourceLineNo">373</span><a name="line.373"></a> +<span class="sourceLineNo">374</span> if (context.eof) {<a name="line.374"></a> +<span class="sourceLineNo">375</span> return;<a name="line.375"></a> +<span class="sourceLineNo">376</span> }<a name="line.376"></a> +<span class="sourceLineNo">377</span> if (inAvail < 0) {<a name="line.377"></a> +<span class="sourceLineNo">378</span> context.eof = true;<a name="line.378"></a> +<span class="sourceLineNo">379</span> }<a name="line.379"></a> +<span class="sourceLineNo">380</span> for (int i = 0; i < inAvail; i++) {<a name="line.380"></a> +<span class="sourceLineNo">381</span> final byte b = input[inPos++];<a name="line.381"></a> +<span class="sourceLineNo">382</span> if (b == pad) {<a name="line.382"></a> +<span class="sourceLineNo">383</span> // We're done.<a name="line.383"></a> +<span class="sourceLineNo">384</span> context.eof = true;<a name="line.384"></a> +<span class="sourceLineNo">385</span> break;<a name="line.385"></a> +<span class="sourceLineNo">386</span> }<a name="line.386"></a> +<span class="sourceLineNo">387</span> final byte[] buffer = ensureBufferSize(decodeSize, context);<a name="line.387"></a> +<span class="sourceLineNo">388</span> if (b >= 0 && b < this.decodeTable.length) {<a name="line.388"></a> +<span class="sourceLineNo">389</span> final int result = this.decodeTable[b];<a name="line.389"></a> +<span class="sourceLineNo">390</span> if (result >= 0) {<a name="line.390"></a> +<span class="sourceLineNo">391</span> context.modulus = (context.modulus+1) % BYTES_PER_ENCODED_BLOCK;<a name="line.391"></a> +<span class="sourceLineNo">392</span> // collect decoded bytes<a name="line.392"></a> +<span class="sourceLineNo">393</span> context.lbitWorkArea = (context.lbitWorkArea << BITS_PER_ENCODED_BYTE) + result;<a name="line.393"></a> +<span class="sourceLineNo">394</span> if (context.modulus == 0) { // we can output the 5 bytes<a name="line.394"></a> +<span class="sourceLineNo">395</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 32) & MASK_8BITS);<a name="line.395"></a> +<span class="sourceLineNo">396</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 24) & MASK_8BITS);<a name="line.396"></a> +<span class="sourceLineNo">397</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 16) & MASK_8BITS);<a name="line.397"></a> +<span class="sourceLineNo">398</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 8) & MASK_8BITS);<a name="line.398"></a> +<span class="sourceLineNo">399</span> buffer[context.pos++] = (byte) (context.lbitWorkArea & MASK_8BITS);<a name="line.399"></a> +<span class="sourceLineNo">400</span> }<a name="line.400"></a> +<span class="sourceLineNo">401</span> }<a name="line.401"></a> +<span class="sourceLineNo">402</span> }<a name="line.402"></a> +<span class="sourceLineNo">403</span> }<a name="line.403"></a> +<span class="sourceLineNo">404</span><a name="line.404"></a> +<span class="sourceLineNo">405</span> // Two forms of EOF as far as Base32 decoder is concerned: actual<a name="line.405"></a> +<span class="sourceLineNo">406</span> // EOF (-1) and first time '=' character is encountered in stream.<a name="line.406"></a> +<span class="sourceLineNo">407</span> // This approach makes the '=' padding characters completely optional.<a name="line.407"></a> +<span class="sourceLineNo">408</span> if (context.eof && context.modulus > 0) { // if modulus == 0, nothing to do<a name="line.408"></a> +<span class="sourceLineNo">409</span> final byte[] buffer = ensureBufferSize(decodeSize, context);<a name="line.409"></a> +<span class="sourceLineNo">410</span><a name="line.410"></a> +<span class="sourceLineNo">411</span> // We ignore partial bytes, i.e. only multiples of 8 count.<a name="line.411"></a> +<span class="sourceLineNo">412</span> // Any combination not part of a valid encoding is either partially decoded<a name="line.412"></a> +<span class="sourceLineNo">413</span> // or will raise an exception. Possible trailing characters are 2, 4, 5, 7.<a name="line.413"></a> +<span class="sourceLineNo">414</span> // It is not possible to encode with 1, 3, 6 trailing characters.<a name="line.414"></a> +<span class="sourceLineNo">415</span> // For backwards compatibility 3 & 6 chars are decoded anyway rather than discarded.<a name="line.415"></a> +<span class="sourceLineNo">416</span> // See the encode(byte[]) method EOF section.<a name="line.416"></a> +<span class="sourceLineNo">417</span> switch (context.modulus) {<a name="line.417"></a> +<span class="sourceLineNo">418</span>// case 0 : // impossible, as excluded above<a name="line.418"></a> +<span class="sourceLineNo">419</span> case 1 : // 5 bits - either ignore entirely, or raise an exception<a name="line.419"></a> +<span class="sourceLineNo">420</span> validateTrailingCharacters();<a name="line.420"></a> +<span class="sourceLineNo">421</span> case 2 : // 10 bits, drop 2 and output one byte<a name="line.421"></a> +<span class="sourceLineNo">422</span> validateCharacter(MASK_2BITS, context);<a name="line.422"></a> +<span class="sourceLineNo">423</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 2) & MASK_8BITS);<a name="line.423"></a> +<span class="sourceLineNo">424</span> break;<a name="line.424"></a> +<span class="sourceLineNo">425</span> case 3 : // 15 bits, drop 7 and output 1 byte, or raise an exception<a name="line.425"></a> +<span class="sourceLineNo">426</span> validateTrailingCharacters();<a name="line.426"></a> +<span class="sourceLineNo">427</span> // Not possible from a valid encoding but decode anyway<a name="line.427"></a> +<span class="sourceLineNo">428</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 7) & MASK_8BITS);<a name="line.428"></a> +<span class="sourceLineNo">429</span> break;<a name="line.429"></a> +<span class="sourceLineNo">430</span> case 4 : // 20 bits = 2*8 + 4<a name="line.430"></a> +<span class="sourceLineNo">431</span> validateCharacter(MASK_4BITS, context);<a name="line.431"></a> +<span class="sourceLineNo">432</span> context.lbitWorkArea = context.lbitWorkArea >> 4; // drop 4 bits<a name="line.432"></a> +<span class="sourceLineNo">433</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 8) & MASK_8BITS);<a name="line.433"></a> +<span class="sourceLineNo">434</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea) & MASK_8BITS);<a name="line.434"></a> +<span class="sourceLineNo">435</span> break;<a name="line.435"></a> +<span class="sourceLineNo">436</span> case 5 : // 25 bits = 3*8 + 1<a name="line.436"></a> +<span class="sourceLineNo">437</span> validateCharacter(MASK_1BITS, context);<a name="line.437"></a> +<span class="sourceLineNo">438</span> context.lbitWorkArea = context.lbitWorkArea >> 1;<a name="line.438"></a> +<span class="sourceLineNo">439</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 16) & MASK_8BITS);<a name="line.439"></a> +<span class="sourceLineNo">440</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 8) & MASK_8BITS);<a name="line.440"></a> +<span class="sourceLineNo">441</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea) & MASK_8BITS);<a name="line.441"></a> +<span class="sourceLineNo">442</span> break;<a name="line.442"></a> +<span class="sourceLineNo">443</span> case 6 : // 30 bits = 3*8 + 6, or raise an exception<a name="line.443"></a> +<span class="sourceLineNo">444</span> validateTrailingCharacters();<a name="line.444"></a> +<span class="sourceLineNo">445</span> // Not possible from a valid encoding but decode anyway<a name="line.445"></a> +<span class="sourceLineNo">446</span> context.lbitWorkArea = context.lbitWorkArea >> 6;<a name="line.446"></a> +<span class="sourceLineNo">447</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 16) & MASK_8BITS);<a name="line.447"></a> +<span class="sourceLineNo">448</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 8) & MASK_8BITS);<a name="line.448"></a> +<span class="sourceLineNo">449</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea) & MASK_8BITS);<a name="line.449"></a> +<span class="sourceLineNo">450</span> break;<a name="line.450"></a> +<span class="sourceLineNo">451</span> case 7 : // 35 bits = 4*8 +3<a name="line.451"></a> +<span class="sourceLineNo">452</span> validateCharacter(MASK_3BITS, context);<a name="line.452"></a> +<span class="sourceLineNo">453</span> context.lbitWorkArea = context.lbitWorkArea >> 3;<a name="line.453"></a> +<span class="sourceLineNo">454</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 24) & MASK_8BITS);<a name="line.454"></a> +<span class="sourceLineNo">455</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 16) & MASK_8BITS);<a name="line.455"></a> +<span class="sourceLineNo">456</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea >> 8) & MASK_8BITS);<a name="line.456"></a> +<span class="sourceLineNo">457</span> buffer[context.pos++] = (byte) ((context.lbitWorkArea) & MASK_8BITS);<a name="line.457"></a> +<span class="sourceLineNo">458</span> break;<a name="line.458"></a> +<span class="sourceLineNo">459</span> default:<a name="line.459"></a> +<span class="sourceLineNo">460</span> // modulus can be 0-7, and we excluded 0,1 already<a name="line.460"></a> +<span class="sourceLineNo">461</span> throw new IllegalStateException("Impossible modulus " + context.modulus);<a name="line.461"></a> +<span class="sourceLineNo">462</span> }<a name="line.462"></a> +<span class="sourceLineNo">463</span> }<a name="line.463"></a> +<span class="sourceLineNo">464</span> }<a name="line.464"></a> +<span class="sourceLineNo">465</span><a name="line.465"></a> +<span class="sourceLineNo">466</span> /**<a name="line.466"></a> +<span class="sourceLineNo">467</span> * <p><a name="line.467"></a> +<span class="sourceLineNo">468</span> * Encodes all of the provided data, starting at inPos, for inAvail bytes. Must be called at least twice: once with<a name="line.468"></a> +<span class="sourceLineNo">469</span> * the data to encode, and once with inAvail set to "-1" to alert encoder that EOF has been reached, so flush last<a name="line.469"></a> +<span class="sourceLineNo">470</span> * remaining bytes (if not multiple of 5).<a name="line.470"></a> +<span class="sourceLineNo">471</span> * </p><a name="line.471"></a> +<span class="sourceLineNo">472</span> *<a name="line.472"></a> +<span class="sourceLineNo">473</span> * @param input<a name="line.473"></a> +<span class="sourceLineNo">474</span> * byte[] array of binary data to Base32 encode.<a name="line.474"></a> +<span class="sourceLineNo">475</span> * @param inPos<a name="line.475"></a> +<span class="sourceLineNo">476</span> * Position to start reading data from.<a name="line.476"></a> +<span class="sourceLineNo">477</span> * @param inAvail<a name="line.477"></a> +<span class="sourceLineNo">478</span> * Amount of bytes available from input for encoding.<a name="line.478"></a> +<span class="sourceLineNo">479</span> * @param context the context to be used<a name="line.479"></a> +<span class="sourceLineNo">480</span> */<a name="line.480"></a> +<span class="sourceLineNo">481</span> @Override<a name="line.481"></a> +<span class="sourceLineNo">482</span> void encode(final byte[] input, int inPos, final int inAvail, final Context context) {<a name="line.482"></a> +<span class="sourceLineNo">483</span> // package protected for access from I/O streams<a name="line.483"></a> +<span class="sourceLineNo">484</span><a name="line.484"></a> +<span class="sourceLineNo">485</span> if (context.eof) {<a name="line.485"></a> +<span class="sourceLineNo">486</span> return;<a name="line.486"></a> +<span class="sourceLineNo">487</span> }<a name="line.487"></a> +<span class="sourceLineNo">488</span> // inAvail < 0 is how we're informed of EOF in the underlying data we're<a name="line.488"></a> +<span class="sourceLineNo">489</span> // encoding.<a name="line.489"></a> +<span class="sourceLineNo">490</span> if (inAvail < 0) {<a name="line.490"></a> +<span class="sourceLineNo">491</span> context.eof = true;<a name="line.491"></a> +<span class="sourceLineNo">492</span> if (0 == context.modulus && lineLength == 0) {<a name="line.492"></a> +<span class="sourceLineNo">493</span> return; // no leftovers to process and not using chunking<a name="line.493"></a> +<span class="sourceLineNo">494</span> }<a name="line.494"></a> +<span class="sourceLineNo">495</span> final byte[] buffer = ensureBufferSize(encodeSize, context);<a name="line.495"></a> +<span class="sourceLineNo">496</span> final int savedPos = context.pos;<a name="line.496"></a> +<span class="sourceLineNo">497</span> switch (context.modulus) { // % 5<a name="line.497"></a> +<span class="sourceLineNo">498</span> case 0 :<a name="line.498"></a> +<span class="sourceLineNo">499</span> break;<a name="line.499"></a> +<span class="sourceLineNo">500</span> case 1 : // Only 1 octet; take top 5 bits then remainder<a name="line.500"></a> +<span class="sourceLineNo">501</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 3) & MASK_5BITS]; // 8-1*5 = 3<a name="line.501"></a> +<span class="sourceLineNo">502</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea << 2) & MASK_5BITS]; // 5-3=2<a name="line.502"></a> +<span class="sourceLineNo">503</span> buffer[context.pos++] = pad;<a name="line.503"></a> +<span class="sourceLineNo">504</span> buffer[context.pos++] = pad;<a name="line.504"></a> +<span class="sourceLineNo">505</span> buffer[context.pos++] = pad;<a name="line.505"></a> +<span class="sourceLineNo">506</span> buffer[context.pos++] = pad;<a name="line.506"></a> +<span class="sourceLineNo">507</span> buffer[context.pos++] = pad;<a name="line.507"></a> +<span class="sourceLineNo">508</span> buffer[context.pos++] = pad;<a name="line.508"></a> +<span class="sourceLineNo">509</span> break;<a name="line.509"></a> +<span class="sourceLineNo">510</span> case 2 : // 2 octets = 16 bits to use<a name="line.510"></a> +<span class="sourceLineNo">511</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 11) & MASK_5BITS]; // 16-1*5 = 11<a name="line.511"></a> +<span class="sourceLineNo">512</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 6) & MASK_5BITS]; // 16-2*5 = 6<a name="line.512"></a> +<span class="sourceLineNo">513</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 1) & MASK_5BITS]; // 16-3*5 = 1<a name="line.513"></a> +<span class="sourceLineNo">514</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea << 4) & MASK_5BITS]; // 5-1 = 4<a name="line.514"></a> +<span class="sourceLineNo">515</span> buffer[context.pos++] = pad;<a name="line.515"></a> +<span class="sourceLineNo">516</span> buffer[context.pos++] = pad;<a name="line.516"></a> +<span class="sourceLineNo">517</span> buffer[context.pos++] = pad;<a name="line.517"></a> +<span class="sourceLineNo">518</span> buffer[context.pos++] = pad;<a name="line.518"></a> +<span class="sourceLineNo">519</span> break;<a name="line.519"></a> +<span class="sourceLineNo">520</span> case 3 : // 3 octets = 24 bits to use<a name="line.520"></a> +<span class="sourceLineNo">521</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 19) & MASK_5BITS]; // 24-1*5 = 19<a name="line.521"></a> +<span class="sourceLineNo">522</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 14) & MASK_5BITS]; // 24-2*5 = 14<a name="line.522"></a> +<span class="sourceLineNo">523</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 9) & MASK_5BITS]; // 24-3*5 = 9<a name="line.523"></a> +<span class="sourceLineNo">524</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 4) & MASK_5BITS]; // 24-4*5 = 4<a name="line.524"></a> +<span class="sourceLineNo">525</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea << 1) & MASK_5BITS]; // 5-4 = 1<a name="line.525"></a> +<span class="sourceLineNo">526</span> buffer[context.pos++] = pad;<a name="line.526"></a> +<span class="sourceLineNo">527</span> buffer[context.pos++] = pad;<a name="line.527"></a> +<span class="sourceLineNo">528</span> buffer[context.pos++] = pad;<a name="line.528"></a> +<span class="sourceLineNo">529</span> break;<a name="line.529"></a> +<span class="sourceLineNo">530</span> case 4 : // 4 octets = 32 bits to use<a name="line.530"></a> +<span class="sourceLineNo">531</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 27) & MASK_5BITS]; // 32-1*5 = 27<a name="line.531"></a> +<span class="sourceLineNo">532</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 22) & MASK_5BITS]; // 32-2*5 = 22<a name="line.532"></a> +<span class="sourceLineNo">533</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 17) & MASK_5BITS]; // 32-3*5 = 17<a name="line.533"></a> +<span class="sourceLineNo">534</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 12) & MASK_5BITS]; // 32-4*5 = 12<a name="line.534"></a> +<span class="sourceLineNo">535</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 7) & MASK_5BITS]; // 32-5*5 = 7<a name="line.535"></a> +<span class="sourceLineNo">536</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 2) & MASK_5BITS]; // 32-6*5 = 2<a name="line.536"></a> +<span class="sourceLineNo">537</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea << 3) & MASK_5BITS]; // 5-2 = 3<a name="line.537"></a> +<span class="sourceLineNo">538</span> buffer[context.pos++] = pad;<a name="line.538"></a> +<span class="sourceLineNo">539</span> break;<a name="line.539"></a> +<span class="sourceLineNo">540</span> default:<a name="line.540"></a> +<span class="sourceLineNo">541</span> throw new IllegalStateException("Impossible modulus " + context.modulus);<a name="line.541"></a> +<span class="sourceLineNo">542</span> }<a name="line.542"></a> +<span class="sourceLineNo">543</span> context.currentLinePos += context.pos - savedPos; // keep track of current line position<a name="line.543"></a> +<span class="sourceLineNo">544</span> // if currentPos == 0 we are at the start of a line, so don't add CRLF<a name="line.544"></a> +<span class="sourceLineNo">545</span> if (lineLength > 0 && context.currentLinePos > 0){ // add chunk separator if required<a name="line.545"></a> +<span class="sourceLineNo">546</span> System.arraycopy(lineSeparator, 0, buffer, context.pos, lineSeparator.length);<a name="line.546"></a> +<span class="sourceLineNo">547</span> context.pos += lineSeparator.length;<a name="line.547"></a> +<span class="sourceLineNo">548</span> }<a name="line.548"></a> +<span class="sourceLineNo">549</span> } else {<a name="line.549"></a> +<span class="sourceLineNo">550</span> for (int i = 0; i < inAvail; i++) {<a name="line.550"></a> +<span class="sourceLineNo">551</span> final byte[] buffer = ensureBufferSize(encodeSize, context);<a name="line.551"></a> +<span class="sourceLineNo">552</span> context.modulus = (context.modulus+1) % BYTES_PER_UNENCODED_BLOCK;<a name="line.552"></a> +<span class="sourceLineNo">553</span> int b = input[inPos++];<a name="line.553"></a> +<span class="sourceLineNo">554</span> if (b < 0) {<a name="line.554"></a> +<span class="sourceLineNo">555</span> b += 256;<a name="line.555"></a> +<span class="sourceLineNo">556</span> }<a name="line.556"></a> +<span class="sourceLineNo">557</span> context.lbitWorkArea = (context.lbitWorkArea << 8) + b; // BITS_PER_BYTE<a name="line.557"></a> +<span class="sourceLineNo">558</span> if (0 == context.modulus) { // we have enough bytes to create our output<a name="line.558"></a> +<span class="sourceLineNo">559</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 35) & MASK_5BITS];<a name="line.559"></a> +<span class="sourceLineNo">560</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 30) & MASK_5BITS];<a name="line.560"></a> +<span class="sourceLineNo">561</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 25) & MASK_5BITS];<a name="line.561"></a> +<span class="sourceLineNo">562</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 20) & MASK_5BITS];<a name="line.562"></a> +<span class="sourceLineNo">563</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 15) & MASK_5BITS];<a name="line.563"></a> +<span class="sourceLineNo">564</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 10) & MASK_5BITS];<a name="line.564"></a> +<span class="sourceLineNo">565</span> buffer[context.pos++] = encodeTable[(int)(context.lbitWorkArea >> 5) & MASK_5BITS];<a name="line.565"></a> +<span class="sourceLineNo">566</span> buffer[context.pos++] = encodeTable[(int)context.lbitWorkArea & MASK_5BITS];<a name="line.566"></a> +<span class="sourceLineNo">567</span> context.currentLinePos += BYTES_PER_ENCODED_BLOCK;<a name="line.567"></a> +<span class="sourceLineNo">568</span> if (lineLength > 0 && lineLength <= context.currentLinePos) {<a name="line.568"></a> +<span class="sourceLineNo">569</span> System.arraycopy(lineSeparator, 0, buffer, context.pos, lineSeparator.length);<a name="line.569"></a> +<span class="sourceLineNo">570</span> context.pos += lineSeparator.length;<a name="line.570"></a> +<span class="sourceLineNo">571</span> context.currentLinePos = 0;<a name="line.571"></a> +<span class="sourceLineNo">572</span> }<a name="line.572"></a> +<span class="sourceLineNo">573</span> }<a name="line.573"></a> +<span class="sourceLineNo">574</span> }<a name="line.574"></a> +<span class="sourceLineNo">575</span> }<a name="line.575"></a> +<span class="sourceLineNo">576</span> }<a name="line.576"></a> +<span class="sourceLineNo">577</span><a name="line.577"></a> +<span class="sourceLineNo">578</span> /**<a name="line.578"></a> +<span class="sourceLineNo">579</span> * Returns whether or not the {@code octet} is in the Base32 alphabet.<a name="line.579"></a> +<span class="sourceLineNo">580</span> *<a name="line.580"></a> +<span class="sourceLineNo">581</span> * @param octet<a name="line.581"></a> +<span class="sourceLineNo">582</span> * The value to test<a name="line.582"></a> +<span class="sourceLineNo">583</span> * @return {@code true} if the value is defined in the the Base32 alphabet {@code false} otherwise.<a name="line.583"></a> +<span class="sourceLineNo">584</span> */<a name="line.584"></a> +<span class="sourceLineNo">585</span> @Override<a name="line.585"></a> +<span class="sourceLineNo">586</span> public boolean isInAlphabet(final byte octet) {<a name="line.586"></a> +<span class="sourceLineNo">587</span> return octet >= 0 && octet < decodeTable.length && decodeTable[octet] != -1;<a name="line.587"></a> +<span class="sourceLineNo">588</span> }<a name="line.588"></a> +<span class="sourceLineNo">589</span><a name="line.589"></a> +<span class="sourceLineNo">590</span> /**<a name="line.590"></a> +<span class="sourceLineNo">591</span> * Validates whether decoding the final trailing character is possible in the context<a name="line.591"></a> +<span class="sourceLineNo">592</span> * of the set of possible base 32 values.<a name="line.592"></a> +<span class="sourceLineNo">593</span> *<a name="line.593"></a> +<span class="sourceLineNo">594</span> * <p>The character is valid if the lower bits within the provided mask are zero. This<a name="line.594"></a> +<span class="sourceLineNo">595</span> * is used to test the final trailing base-32 digit is zero in the bits that will be discarded.<a name="line.595"></a> +<span class="sourceLineNo">596</span> *<a name="line.596"></a> +<span class="sourceLineNo">597</span> * @param emptyBitsMask The mask of the lower bits that should be empty<a name="line.597"></a> +<span class="sourceLineNo">598</span> * @param context the context to be used<a name="line.598"></a> +<span class="sourceLineNo">599</span> *<a name="line.599"></a> +<span class="sourceLineNo">600</span> * @throws IllegalArgumentException if the bits being checked contain any non-zero value<a name="line.600"></a> +<span class="sourceLineNo">601</span> */<a name="line.601"></a> +<span class="sourceLineNo">602</span> private void validateCharacter(final long emptyBitsMask, final Context context) {<a name="line.602"></a> +<span class="sourceLineNo">603</span> // Use the long bit work area<a name="line.603"></a> +<span class="sourceLineNo">604</span> if (isStrictDecoding() && (context.lbitWorkArea & emptyBitsMask) != 0) {<a name="line.604"></a> +<span class="sourceLineNo">605</span> throw new IllegalArgumentException(<a name="line.605"></a> +<span class="sourceLineNo">606</span> "Strict decoding: Last encoded character (before the paddings if any) is a valid base 32 alphabet but not a possible encoding. " +<a name="line.606"></a> +<span class="sourceLineNo">607</span> "Expected the discarded bits from the character to be zero.");<a name="line.607"></a> +<span class="sourceLineNo">608</span> }<a name="line.608"></a> +<span class="sourceLineNo">609</span> }<a name="line.609"></a> +<span class="sourceLineNo">610</span><a name="line.610"></a> +<span class="sourceLineNo">611</span> /**<a name="line.611"></a> +<span class="sourceLineNo">612</span> * Validates whether decoding allows final trailing characters that cannot be<a name="line.612"></a> +<span class="sourceLineNo">613</span> * created during encoding.<a name="line.613"></a> +<span class="sourceLineNo">614</span> *<a name="line.614"></a> +<span class="sourceLineNo">615</span> * @throws IllegalArgumentException if strict decoding is enabled<a name="line.615"></a> +<span class="sourceLineNo">616</span> */<a name="line.616"></a> +<span class="sourceLineNo">617</span> private void validateTrailingCharacters() {<a name="line.617"></a> +<span class="sourceLineNo">618</span> if (isStrictDecoding()) {<a name="line.618"></a> +<span class="sourceLineNo">619</span> throw new IllegalArgumentException(<a name="line.619"></a> +<span class="sourceLineNo">620</span> "Strict decoding: Last encoded character(s) (before the paddings if any) are valid base 32 alphabet but not a possible encoding. " +<a name="line.620"></a> +<span class="sourceLineNo">621</span> "Decoding requires either 2, 4, 5, or 7 trailing 5-bit characters to create bytes.");<a name="line.621"></a> +<span class="sourceLineNo">622</span> }<a name="line.622"></a> +<span class="sourceLineNo">623</span> }<a name="line.623"></a> +<span class="sourceLineNo">624</span>}<a name="line.624"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base32InputStream.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base32InputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..397e5202c5c1f0123989c587aabc26dd3c89c6a1 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base32InputStream.html @@ -0,0 +1,197 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.InputStream;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>import org.apache.commons.codec.CodecPolicy;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>/**<a name="line.24"></a> +<span class="sourceLineNo">025</span> * Provides Base32 encoding and decoding in a streaming fashion (unlimited size). When encoding the default lineLength<a name="line.25"></a> +<span class="sourceLineNo">026</span> * is 76 characters and the default lineEnding is CRLF, but these can be overridden by using the appropriate<a name="line.26"></a> +<span class="sourceLineNo">027</span> * constructor.<a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p><a name="line.28"></a> +<span class="sourceLineNo">029</span> * The default behavior of the Base32InputStream is to DECODE, whereas the default behavior of the Base32OutputStream<a name="line.29"></a> +<span class="sourceLineNo">030</span> * is to ENCODE, but this behavior can be overridden by using a different constructor.<a name="line.30"></a> +<span class="sourceLineNo">031</span> * </p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * <p><a name="line.32"></a> +<span class="sourceLineNo">033</span> * Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode<a name="line.33"></a> +<span class="sourceLineNo">034</span> * character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc).<a name="line.34"></a> +<span class="sourceLineNo">035</span> * </p><a name="line.35"></a> +<span class="sourceLineNo">036</span> * <p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * You can set the decoding behavior when the input bytes contain leftover trailing bits that cannot be created by a valid<a name="line.37"></a> +<span class="sourceLineNo">038</span> * encoding. These can be bits that are unused from the final character or entire characters. The default mode is<a name="line.38"></a> +<span class="sourceLineNo">039</span> * lenient decoding.<a name="line.39"></a> +<span class="sourceLineNo">040</span> * </p><a name="line.40"></a> +<span class="sourceLineNo">041</span> * <ul><a name="line.41"></a> +<span class="sourceLineNo">042</span> * <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible. The remainder are discarded.<a name="line.42"></a> +<span class="sourceLineNo">043</span> * <li>Strict: The decoding will raise an {@link IllegalArgumentException} if trailing bits are not part of a valid<a name="line.43"></a> +<span class="sourceLineNo">044</span> * encoding. Any unused bits from the final character must be zero. Impossible counts of entire final characters are not<a name="line.44"></a> +<span class="sourceLineNo">045</span> * allowed.<a name="line.45"></a> +<span class="sourceLineNo">046</span> * </ul><a name="line.46"></a> +<span class="sourceLineNo">047</span> * <p><a name="line.47"></a> +<span class="sourceLineNo">048</span> * When strict decoding is enabled it is expected that the decoded bytes will be re-encoded to a byte array that matches<a name="line.48"></a> +<span class="sourceLineNo">049</span> * the original, i.e. no changes occur on the final character. This requires that the input bytes use the same padding<a name="line.49"></a> +<span class="sourceLineNo">050</span> * and alphabet as the encoder.<a name="line.50"></a> +<span class="sourceLineNo">051</span> * </p><a name="line.51"></a> +<span class="sourceLineNo">052</span> * @see <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a><a name="line.52"></a> +<span class="sourceLineNo">053</span> * @since 1.5<a name="line.53"></a> +<span class="sourceLineNo">054</span> */<a name="line.54"></a> +<span class="sourceLineNo">055</span>public class Base32InputStream extends BaseNCodecInputStream {<a name="line.55"></a> +<span class="sourceLineNo">056</span><a name="line.56"></a> +<span class="sourceLineNo">057</span> /**<a name="line.57"></a> +<span class="sourceLineNo">058</span> * Creates a Base32InputStream such that all data read is Base32-decoded from the original provided InputStream.<a name="line.58"></a> +<span class="sourceLineNo">059</span> *<a name="line.59"></a> +<span class="sourceLineNo">060</span> * @param in<a name="line.60"></a> +<span class="sourceLineNo">061</span> * InputStream to wrap.<a name="line.61"></a> +<span class="sourceLineNo">062</span> */<a name="line.62"></a> +<span class="sourceLineNo">063</span> public Base32InputStream(final InputStream in) {<a name="line.63"></a> +<span class="sourceLineNo">064</span> this(in, false);<a name="line.64"></a> +<span class="sourceLineNo">065</span> }<a name="line.65"></a> +<span class="sourceLineNo">066</span><a name="line.66"></a> +<span class="sourceLineNo">067</span> /**<a name="line.67"></a> +<span class="sourceLineNo">068</span> * Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original<a name="line.68"></a> +<span class="sourceLineNo">069</span> * provided InputStream.<a name="line.69"></a> +<span class="sourceLineNo">070</span> *<a name="line.70"></a> +<span class="sourceLineNo">071</span> * @param in<a name="line.71"></a> +<span class="sourceLineNo">072</span> * InputStream to wrap.<a name="line.72"></a> +<span class="sourceLineNo">073</span> * @param doEncode<a name="line.73"></a> +<span class="sourceLineNo">074</span> * true if we should encode all data read from us, false if we should decode.<a name="line.74"></a> +<span class="sourceLineNo">075</span> */<a name="line.75"></a> +<span class="sourceLineNo">076</span> public Base32InputStream(final InputStream in, final boolean doEncode) {<a name="line.76"></a> +<span class="sourceLineNo">077</span> super(in, new Base32(false), doEncode);<a name="line.77"></a> +<span class="sourceLineNo">078</span> }<a name="line.78"></a> +<span class="sourceLineNo">079</span><a name="line.79"></a> +<span class="sourceLineNo">080</span> /**<a name="line.80"></a> +<span class="sourceLineNo">081</span> * Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original<a name="line.81"></a> +<span class="sourceLineNo">082</span> * provided InputStream.<a name="line.82"></a> +<span class="sourceLineNo">083</span> *<a name="line.83"></a> +<span class="sourceLineNo">084</span> * @param input<a name="line.84"></a> +<span class="sourceLineNo">085</span> * InputStream to wrap.<a name="line.85"></a> +<span class="sourceLineNo">086</span> * @param doEncode<a name="line.86"></a> +<span class="sourceLineNo">087</span> * true if we should encode all data read from us, false if we should decode.<a name="line.87"></a> +<span class="sourceLineNo">088</span> * @param lineLength<a name="line.88"></a> +<span class="sourceLineNo">089</span> * If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to<a name="line.89"></a> +<span class="sourceLineNo">090</span> * nearest multiple of 4). If lineLength &lt;= 0, the encoded data is not divided into lines. If doEncode<a name="line.90"></a> +<span class="sourceLineNo">091</span> * is false, lineLength is ignored.<a name="line.91"></a> +<span class="sourceLineNo">092</span> * @param lineSeparator<a name="line.92"></a> +<span class="sourceLineNo">093</span> * If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n).<a name="line.93"></a> +<span class="sourceLineNo">094</span> * If lineLength &lt;= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.<a name="line.94"></a> +<span class="sourceLineNo">095</span> */<a name="line.95"></a> +<span class="sourceLineNo">096</span> public Base32InputStream(final InputStream input, final boolean doEncode,<a name="line.96"></a> +<span class="sourceLineNo">097</span> final int lineLength, final byte[] lineSeparator) {<a name="line.97"></a> +<span class="sourceLineNo">098</span> super(input, new Base32(lineLength, lineSeparator), doEncode);<a name="line.98"></a> +<span class="sourceLineNo">099</span> }<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> /**<a name="line.101"></a> +<span class="sourceLineNo">102</span> * Creates a Base32InputStream such that all data read is either Base32-encoded or Base32-decoded from the original<a name="line.102"></a> +<span class="sourceLineNo">103</span> * provided InputStream.<a name="line.103"></a> +<span class="sourceLineNo">104</span> *<a name="line.104"></a> +<span class="sourceLineNo">105</span> * @param input<a name="line.105"></a> +<span class="sourceLineNo">106</span> * InputStream to wrap.<a name="line.106"></a> +<span class="sourceLineNo">107</span> * @param doEncode<a name="line.107"></a> +<span class="sourceLineNo">108</span> * true if we should encode all data read from us, false if we should decode.<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @param lineLength<a name="line.109"></a> +<span class="sourceLineNo">110</span> * If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to<a name="line.110"></a> +<span class="sourceLineNo">111</span> * nearest multiple of 4). If lineLength &lt;= 0, the encoded data is not divided into lines. If doEncode<a name="line.111"></a> +<span class="sourceLineNo">112</span> * is false, lineLength is ignored.<a name="line.112"></a> +<span class="sourceLineNo">113</span> * @param lineSeparator<a name="line.113"></a> +<span class="sourceLineNo">114</span> * If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n).<a name="line.114"></a> +<span class="sourceLineNo">115</span> * If lineLength &lt;= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.<a name="line.115"></a> +<span class="sourceLineNo">116</span> * @param decodingPolicy<a name="line.116"></a> +<span class="sourceLineNo">117</span> * The decoding policy.<a name="line.117"></a> +<span class="sourceLineNo">118</span> * @since 1.15<a name="line.118"></a> +<span class="sourceLineNo">119</span> */<a name="line.119"></a> +<span class="sourceLineNo">120</span> public Base32InputStream(final InputStream input, final boolean doEncode,<a name="line.120"></a> +<span class="sourceLineNo">121</span> final int lineLength, final byte[] lineSeparator, final CodecPolicy decodingPolicy) {<a name="line.121"></a> +<span class="sourceLineNo">122</span> super(input, new Base32(lineLength, lineSeparator, false, BaseNCodec.PAD_DEFAULT, decodingPolicy), doEncode);<a name="line.122"></a> +<span class="sourceLineNo">123</span> }<a name="line.123"></a> +<span class="sourceLineNo">124</span><a name="line.124"></a> +<span class="sourceLineNo">125</span>}<a name="line.125"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base32OutputStream.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base32OutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..08380a5316da03a36456e14157e5975c03ab34d1 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base32OutputStream.html @@ -0,0 +1,200 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.OutputStream;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>import org.apache.commons.codec.CodecPolicy;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>/**<a name="line.24"></a> +<span class="sourceLineNo">025</span> * Provides Base32 encoding and decoding in a streaming fashion (unlimited size). When encoding the default lineLength<a name="line.25"></a> +<span class="sourceLineNo">026</span> * is 76 characters and the default lineEnding is CRLF, but these can be overridden by using the appropriate<a name="line.26"></a> +<span class="sourceLineNo">027</span> * constructor.<a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p><a name="line.28"></a> +<span class="sourceLineNo">029</span> * The default behavior of the Base32OutputStream is to ENCODE, whereas the default behavior of the Base32InputStream<a name="line.29"></a> +<span class="sourceLineNo">030</span> * is to DECODE. But this behavior can be overridden by using a different constructor.<a name="line.30"></a> +<span class="sourceLineNo">031</span> * </p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * <p><a name="line.32"></a> +<span class="sourceLineNo">033</span> * Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode<a name="line.33"></a> +<span class="sourceLineNo">034</span> * character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc).<a name="line.34"></a> +<span class="sourceLineNo">035</span> * </p><a name="line.35"></a> +<span class="sourceLineNo">036</span> * <p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * <b>Note:</b> It is mandatory to close the stream after the last byte has been written to it, otherwise the<a name="line.37"></a> +<span class="sourceLineNo">038</span> * final padding will be omitted and the resulting data will be incomplete/inconsistent.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * </p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <p><a name="line.40"></a> +<span class="sourceLineNo">041</span> * You can set the decoding behavior when the input bytes contain leftover trailing bits that cannot be created by a valid<a name="line.41"></a> +<span class="sourceLineNo">042</span> * encoding. These can be bits that are unused from the final character or entire characters. The default mode is<a name="line.42"></a> +<span class="sourceLineNo">043</span> * lenient decoding.<a name="line.43"></a> +<span class="sourceLineNo">044</span> * </p><a name="line.44"></a> +<span class="sourceLineNo">045</span> * <ul><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible. The remainder are discarded.<a name="line.46"></a> +<span class="sourceLineNo">047</span> * <li>Strict: The decoding will raise an {@link IllegalArgumentException} if trailing bits are not part of a valid<a name="line.47"></a> +<span class="sourceLineNo">048</span> * encoding. Any unused bits from the final character must be zero. Impossible counts of entire final characters are not<a name="line.48"></a> +<span class="sourceLineNo">049</span> * allowed.<a name="line.49"></a> +<span class="sourceLineNo">050</span> * </ul><a name="line.50"></a> +<span class="sourceLineNo">051</span> * <p><a name="line.51"></a> +<span class="sourceLineNo">052</span> * When strict decoding is enabled it is expected that the decoded bytes will be re-encoded to a byte array that matches<a name="line.52"></a> +<span class="sourceLineNo">053</span> * the original, i.e. no changes occur on the final character. This requires that the input bytes use the same padding<a name="line.53"></a> +<span class="sourceLineNo">054</span> * and alphabet as the encoder.<a name="line.54"></a> +<span class="sourceLineNo">055</span> * </p><a name="line.55"></a> +<span class="sourceLineNo">056</span> * @see <a href="http://www.ietf.org/rfc/rfc4648.txt">RFC 4648</a><a name="line.56"></a> +<span class="sourceLineNo">057</span> * @since 1.5<a name="line.57"></a> +<span class="sourceLineNo">058</span> */<a name="line.58"></a> +<span class="sourceLineNo">059</span>public class Base32OutputStream extends BaseNCodecOutputStream {<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> /**<a name="line.61"></a> +<span class="sourceLineNo">062</span> * Creates a Base32OutputStream such that all data written is Base32-encoded to the original provided OutputStream.<a name="line.62"></a> +<span class="sourceLineNo">063</span> *<a name="line.63"></a> +<span class="sourceLineNo">064</span> * @param out<a name="line.64"></a> +<span class="sourceLineNo">065</span> * OutputStream to wrap.<a name="line.65"></a> +<span class="sourceLineNo">066</span> */<a name="line.66"></a> +<span class="sourceLineNo">067</span> public Base32OutputStream(final OutputStream out) {<a name="line.67"></a> +<span class="sourceLineNo">068</span> this(out, true);<a name="line.68"></a> +<span class="sourceLineNo">069</span> }<a name="line.69"></a> +<span class="sourceLineNo">070</span><a name="line.70"></a> +<span class="sourceLineNo">071</span> /**<a name="line.71"></a> +<span class="sourceLineNo">072</span> * Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the<a name="line.72"></a> +<span class="sourceLineNo">073</span> * original provided OutputStream.<a name="line.73"></a> +<span class="sourceLineNo">074</span> *<a name="line.74"></a> +<span class="sourceLineNo">075</span> * @param out<a name="line.75"></a> +<span class="sourceLineNo">076</span> * OutputStream to wrap.<a name="line.76"></a> +<span class="sourceLineNo">077</span> * @param doEncode<a name="line.77"></a> +<span class="sourceLineNo">078</span> * true if we should encode all data written to us, false if we should decode.<a name="line.78"></a> +<span class="sourceLineNo">079</span> */<a name="line.79"></a> +<span class="sourceLineNo">080</span> public Base32OutputStream(final OutputStream out, final boolean doEncode) {<a name="line.80"></a> +<span class="sourceLineNo">081</span> super(out, new Base32(false), doEncode);<a name="line.81"></a> +<span class="sourceLineNo">082</span> }<a name="line.82"></a> +<span class="sourceLineNo">083</span><a name="line.83"></a> +<span class="sourceLineNo">084</span> /**<a name="line.84"></a> +<span class="sourceLineNo">085</span> * Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the<a name="line.85"></a> +<span class="sourceLineNo">086</span> * original provided OutputStream.<a name="line.86"></a> +<span class="sourceLineNo">087</span> *<a name="line.87"></a> +<span class="sourceLineNo">088</span> * @param ouput<a name="line.88"></a> +<span class="sourceLineNo">089</span> * OutputStream to wrap.<a name="line.89"></a> +<span class="sourceLineNo">090</span> * @param doEncode<a name="line.90"></a> +<span class="sourceLineNo">091</span> * true if we should encode all data written to us, false if we should decode.<a name="line.91"></a> +<span class="sourceLineNo">092</span> * @param lineLength<a name="line.92"></a> +<span class="sourceLineNo">093</span> * If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to<a name="line.93"></a> +<span class="sourceLineNo">094</span> * nearest multiple of 4). If lineLength &lt;= 0, the encoded data is not divided into lines. If doEncode<a name="line.94"></a> +<span class="sourceLineNo">095</span> * is false, lineLength is ignored.<a name="line.95"></a> +<span class="sourceLineNo">096</span> * @param lineSeparator<a name="line.96"></a> +<span class="sourceLineNo">097</span> * If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n).<a name="line.97"></a> +<span class="sourceLineNo">098</span> * If lineLength &lt;= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.<a name="line.98"></a> +<span class="sourceLineNo">099</span> */<a name="line.99"></a> +<span class="sourceLineNo">100</span> public Base32OutputStream(final OutputStream ouput, final boolean doEncode,<a name="line.100"></a> +<span class="sourceLineNo">101</span> final int lineLength, final byte[] lineSeparator) {<a name="line.101"></a> +<span class="sourceLineNo">102</span> super(ouput, new Base32(lineLength, lineSeparator), doEncode);<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> /**<a name="line.105"></a> +<span class="sourceLineNo">106</span> * Creates a Base32OutputStream such that all data written is either Base32-encoded or Base32-decoded to the<a name="line.106"></a> +<span class="sourceLineNo">107</span> * original provided OutputStream.<a name="line.107"></a> +<span class="sourceLineNo">108</span> *<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @param ouput<a name="line.109"></a> +<span class="sourceLineNo">110</span> * OutputStream to wrap.<a name="line.110"></a> +<span class="sourceLineNo">111</span> * @param doEncode<a name="line.111"></a> +<span class="sourceLineNo">112</span> * true if we should encode all data written to us, false if we should decode.<a name="line.112"></a> +<span class="sourceLineNo">113</span> * @param lineLength<a name="line.113"></a> +<span class="sourceLineNo">114</span> * If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to<a name="line.114"></a> +<span class="sourceLineNo">115</span> * nearest multiple of 4). If lineLength &lt;= 0, the encoded data is not divided into lines. If doEncode<a name="line.115"></a> +<span class="sourceLineNo">116</span> * is false, lineLength is ignored.<a name="line.116"></a> +<span class="sourceLineNo">117</span> * @param lineSeparator<a name="line.117"></a> +<span class="sourceLineNo">118</span> * If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n).<a name="line.118"></a> +<span class="sourceLineNo">119</span> * If lineLength &lt;= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.<a name="line.119"></a> +<span class="sourceLineNo">120</span> * @param decodingPolicy The decoding policy.<a name="line.120"></a> +<span class="sourceLineNo">121</span> * @since 1.15<a name="line.121"></a> +<span class="sourceLineNo">122</span> */<a name="line.122"></a> +<span class="sourceLineNo">123</span> public Base32OutputStream(final OutputStream ouput, final boolean doEncode,<a name="line.123"></a> +<span class="sourceLineNo">124</span> final int lineLength, final byte[] lineSeparator, final CodecPolicy decodingPolicy) {<a name="line.124"></a> +<span class="sourceLineNo">125</span> super(ouput, new Base32(lineLength, lineSeparator, false, BaseNCodec.PAD_DEFAULT, decodingPolicy), doEncode);<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span><a name="line.127"></a> +<span class="sourceLineNo">128</span>}<a name="line.128"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base64.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base64.html new file mode 100644 index 0000000000000000000000000000000000000000..dea36ee1415c92218ffa14a32f7360c1992c6a2b --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base64.html @@ -0,0 +1,920 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.math.BigInteger;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.Objects;<a name="line.21"></a> +<span class="sourceLineNo">022</span><a name="line.22"></a> +<span class="sourceLineNo">023</span>import org.apache.commons.codec.CodecPolicy;<a name="line.23"></a> +<span class="sourceLineNo">024</span><a name="line.24"></a> +<span class="sourceLineNo">025</span>/**<a name="line.25"></a> +<span class="sourceLineNo">026</span> * Provides Base64 encoding and decoding as defined by <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>.<a name="line.26"></a> +<span class="sourceLineNo">027</span> *<a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p><a name="line.28"></a> +<span class="sourceLineNo">029</span> * This class implements section <cite>6.8. Base64 Content-Transfer-Encoding</cite> from RFC 2045 <cite>Multipurpose<a name="line.29"></a> +<span class="sourceLineNo">030</span> * Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</cite> by Freed and Borenstein.<a name="line.30"></a> +<span class="sourceLineNo">031</span> * </p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * <p><a name="line.32"></a> +<span class="sourceLineNo">033</span> * The class can be parameterized in the following manner with various constructors:<a name="line.33"></a> +<span class="sourceLineNo">034</span> * </p><a name="line.34"></a> +<span class="sourceLineNo">035</span> * <ul><a name="line.35"></a> +<span class="sourceLineNo">036</span> * <li>URL-safe mode: Default off.</li><a name="line.36"></a> +<span class="sourceLineNo">037</span> * <li>Line length: Default 76. Line length that aren't multiples of 4 will still essentially end up being multiples of<a name="line.37"></a> +<span class="sourceLineNo">038</span> * 4 in the encoded data.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <li>Line separator: Default is CRLF ("\r\n")</li><a name="line.39"></a> +<span class="sourceLineNo">040</span> * </ul><a name="line.40"></a> +<span class="sourceLineNo">041</span> * <p><a name="line.41"></a> +<span class="sourceLineNo">042</span> * The URL-safe parameter is only applied to encode operations. Decoding seamlessly handles both modes.<a name="line.42"></a> +<span class="sourceLineNo">043</span> * </p><a name="line.43"></a> +<span class="sourceLineNo">044</span> * <p><a name="line.44"></a> +<span class="sourceLineNo">045</span> * Since this class operates directly on byte streams, and not character streams, it is hard-coded to only<a name="line.45"></a> +<span class="sourceLineNo">046</span> * encode/decode character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252,<a name="line.46"></a> +<span class="sourceLineNo">047</span> * UTF-8, etc).<a name="line.47"></a> +<span class="sourceLineNo">048</span> * </p><a name="line.48"></a> +<span class="sourceLineNo">049</span> * <p><a name="line.49"></a> +<span class="sourceLineNo">050</span> * This class is thread-safe.<a name="line.50"></a> +<span class="sourceLineNo">051</span> * </p><a name="line.51"></a> +<span class="sourceLineNo">052</span> *<a name="line.52"></a> +<span class="sourceLineNo">053</span> * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a><a name="line.53"></a> +<span class="sourceLineNo">054</span> * @since 1.0<a name="line.54"></a> +<span class="sourceLineNo">055</span> */<a name="line.55"></a> +<span class="sourceLineNo">056</span>public class Base64 extends BaseNCodec {<a name="line.56"></a> +<span class="sourceLineNo">057</span><a name="line.57"></a> +<span class="sourceLineNo">058</span> /**<a name="line.58"></a> +<span class="sourceLineNo">059</span> * BASE32 characters are 6 bits in length.<a name="line.59"></a> +<span class="sourceLineNo">060</span> * They are formed by taking a block of 3 octets to form a 24-bit string,<a name="line.60"></a> +<span class="sourceLineNo">061</span> * which is converted into 4 BASE64 characters.<a name="line.61"></a> +<span class="sourceLineNo">062</span> */<a name="line.62"></a> +<span class="sourceLineNo">063</span> private static final int BITS_PER_ENCODED_BYTE = 6;<a name="line.63"></a> +<span class="sourceLineNo">064</span> private static final int BYTES_PER_UNENCODED_BLOCK = 3;<a name="line.64"></a> +<span class="sourceLineNo">065</span> private static final int BYTES_PER_ENCODED_BLOCK = 4;<a name="line.65"></a> +<span class="sourceLineNo">066</span><a name="line.66"></a> +<span class="sourceLineNo">067</span> /**<a name="line.67"></a> +<span class="sourceLineNo">068</span> * This array is a lookup table that translates 6-bit positive integer index values into their "Base64 Alphabet"<a name="line.68"></a> +<span class="sourceLineNo">069</span> * equivalents as specified in Table 1 of RFC 2045.<a name="line.69"></a> +<span class="sourceLineNo">070</span> *<a name="line.70"></a> +<span class="sourceLineNo">071</span> * Thanks to "commons" project in ws.apache.org for this code.<a name="line.71"></a> +<span class="sourceLineNo">072</span> * http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/<a name="line.72"></a> +<span class="sourceLineNo">073</span> */<a name="line.73"></a> +<span class="sourceLineNo">074</span> private static final byte[] STANDARD_ENCODE_TABLE = {<a name="line.74"></a> +<span class="sourceLineNo">075</span> 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',<a name="line.75"></a> +<span class="sourceLineNo">076</span> 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',<a name="line.76"></a> +<span class="sourceLineNo">077</span> 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',<a name="line.77"></a> +<span class="sourceLineNo">078</span> 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',<a name="line.78"></a> +<span class="sourceLineNo">079</span> '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'<a name="line.79"></a> +<span class="sourceLineNo">080</span> };<a name="line.80"></a> +<span class="sourceLineNo">081</span><a name="line.81"></a> +<span class="sourceLineNo">082</span> /**<a name="line.82"></a> +<span class="sourceLineNo">083</span> * This is a copy of the STANDARD_ENCODE_TABLE above, but with + and /<a name="line.83"></a> +<span class="sourceLineNo">084</span> * changed to - and _ to make the encoded Base64 results more URL-SAFE.<a name="line.84"></a> +<span class="sourceLineNo">085</span> * This table is only used when the Base64's mode is set to URL-SAFE.<a name="line.85"></a> +<span class="sourceLineNo">086</span> */<a name="line.86"></a> +<span class="sourceLineNo">087</span> private static final byte[] URL_SAFE_ENCODE_TABLE = {<a name="line.87"></a> +<span class="sourceLineNo">088</span> 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',<a name="line.88"></a> +<span class="sourceLineNo">089</span> 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',<a name="line.89"></a> +<span class="sourceLineNo">090</span> 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',<a name="line.90"></a> +<span class="sourceLineNo">091</span> 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',<a name="line.91"></a> +<span class="sourceLineNo">092</span> '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_'<a name="line.92"></a> +<span class="sourceLineNo">093</span> };<a name="line.93"></a> +<span class="sourceLineNo">094</span><a name="line.94"></a> +<span class="sourceLineNo">095</span> /**<a name="line.95"></a> +<span class="sourceLineNo">096</span> * This array is a lookup table that translates Unicode characters drawn from the "Base64 Alphabet" (as specified<a name="line.96"></a> +<span class="sourceLineNo">097</span> * in Table 1 of RFC 2045) into their 6-bit positive integer equivalents. Characters that are not in the Base64<a name="line.97"></a> +<span class="sourceLineNo">098</span> * alphabet but fall within the bounds of the array are translated to -1.<a name="line.98"></a> +<span class="sourceLineNo">099</span> *<a name="line.99"></a> +<span class="sourceLineNo">100</span> * Note: '+' and '-' both decode to 62. '/' and '_' both decode to 63. This means decoder seamlessly handles both<a name="line.100"></a> +<span class="sourceLineNo">101</span> * URL_SAFE and STANDARD base64. (The encoder, on the other hand, needs to know ahead of time what to emit).<a name="line.101"></a> +<span class="sourceLineNo">102</span> *<a name="line.102"></a> +<span class="sourceLineNo">103</span> * Thanks to "commons" project in ws.apache.org for this code.<a name="line.103"></a> +<span class="sourceLineNo">104</span> * http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/<a name="line.104"></a> +<span class="sourceLineNo">105</span> */<a name="line.105"></a> +<span class="sourceLineNo">106</span> private static final byte[] DECODE_TABLE = {<a name="line.106"></a> +<span class="sourceLineNo">107</span> // 0 1 2 3 4 5 6 7 8 9 A B C D E F<a name="line.107"></a> +<span class="sourceLineNo">108</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00-0f<a name="line.108"></a> +<span class="sourceLineNo">109</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10-1f<a name="line.109"></a> +<span class="sourceLineNo">110</span> -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, 62, -1, 63, // 20-2f + - /<a name="line.110"></a> +<span class="sourceLineNo">111</span> 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, // 30-3f 0-9<a name="line.111"></a> +<span class="sourceLineNo">112</span> -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 40-4f A-O<a name="line.112"></a> +<span class="sourceLineNo">113</span> 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63, // 50-5f P-Z _<a name="line.113"></a> +<span class="sourceLineNo">114</span> -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, // 60-6f a-o<a name="line.114"></a> +<span class="sourceLineNo">115</span> 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 // 70-7a p-z<a name="line.115"></a> +<span class="sourceLineNo">116</span> };<a name="line.116"></a> +<span class="sourceLineNo">117</span><a name="line.117"></a> +<span class="sourceLineNo">118</span> /**<a name="line.118"></a> +<span class="sourceLineNo">119</span> * Base64 uses 6-bit fields.<a name="line.119"></a> +<span class="sourceLineNo">120</span> */<a name="line.120"></a> +<span class="sourceLineNo">121</span> /** Mask used to extract 6 bits, used when encoding */<a name="line.121"></a> +<span class="sourceLineNo">122</span> private static final int MASK_6BITS = 0x3f;<a name="line.122"></a> +<span class="sourceLineNo">123</span> /** Mask used to extract 4 bits, used when decoding final trailing character. */<a name="line.123"></a> +<span class="sourceLineNo">124</span> private static final int MASK_4BITS = 0xf;<a name="line.124"></a> +<span class="sourceLineNo">125</span> /** Mask used to extract 2 bits, used when decoding final trailing character. */<a name="line.125"></a> +<span class="sourceLineNo">126</span> private static final int MASK_2BITS = 0x3;<a name="line.126"></a> +<span class="sourceLineNo">127</span><a name="line.127"></a> +<span class="sourceLineNo">128</span> // The static final fields above are used for the original static byte[] methods on Base64.<a name="line.128"></a> +<span class="sourceLineNo">129</span> // The private member fields below are used with the new streaming approach, which requires<a name="line.129"></a> +<span class="sourceLineNo">130</span> // some state be preserved between calls of encode() and decode().<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> /**<a name="line.132"></a> +<span class="sourceLineNo">133</span> * Decodes Base64 data into octets.<a name="line.133"></a> +<span class="sourceLineNo">134</span> * <p><a name="line.134"></a> +<span class="sourceLineNo">135</span> * <b>Note:</b> this method seamlessly handles data encoded in URL-safe or normal mode.<a name="line.135"></a> +<span class="sourceLineNo">136</span> * </p><a name="line.136"></a> +<span class="sourceLineNo">137</span> *<a name="line.137"></a> +<span class="sourceLineNo">138</span> * @param base64Data<a name="line.138"></a> +<span class="sourceLineNo">139</span> * Byte array containing Base64 data<a name="line.139"></a> +<span class="sourceLineNo">140</span> * @return Array containing decoded data.<a name="line.140"></a> +<span class="sourceLineNo">141</span> */<a name="line.141"></a> +<span class="sourceLineNo">142</span> public static byte[] decodeBase64(final byte[] base64Data) {<a name="line.142"></a> +<span class="sourceLineNo">143</span> return new Base64().decode(base64Data);<a name="line.143"></a> +<span class="sourceLineNo">144</span> }<a name="line.144"></a> +<span class="sourceLineNo">145</span><a name="line.145"></a> +<span class="sourceLineNo">146</span> /**<a name="line.146"></a> +<span class="sourceLineNo">147</span> * Decodes a Base64 String into octets.<a name="line.147"></a> +<span class="sourceLineNo">148</span> * <p><a name="line.148"></a> +<span class="sourceLineNo">149</span> * <b>Note:</b> this method seamlessly handles data encoded in URL-safe or normal mode.<a name="line.149"></a> +<span class="sourceLineNo">150</span> * </p><a name="line.150"></a> +<span class="sourceLineNo">151</span> *<a name="line.151"></a> +<span class="sourceLineNo">152</span> * @param base64String<a name="line.152"></a> +<span class="sourceLineNo">153</span> * String containing Base64 data<a name="line.153"></a> +<span class="sourceLineNo">154</span> * @return Array containing decoded data.<a name="line.154"></a> +<span class="sourceLineNo">155</span> * @since 1.4<a name="line.155"></a> +<span class="sourceLineNo">156</span> */<a name="line.156"></a> +<span class="sourceLineNo">157</span> public static byte[] decodeBase64(final String base64String) {<a name="line.157"></a> +<span class="sourceLineNo">158</span> return new Base64().decode(base64String);<a name="line.158"></a> +<span class="sourceLineNo">159</span> }<a name="line.159"></a> +<span class="sourceLineNo">160</span><a name="line.160"></a> +<span class="sourceLineNo">161</span> // Implementation of integer encoding used for crypto<a name="line.161"></a> +<span class="sourceLineNo">162</span> /**<a name="line.162"></a> +<span class="sourceLineNo">163</span> * Decodes a byte64-encoded integer according to crypto standards such as W3C's XML-Signature.<a name="line.163"></a> +<span class="sourceLineNo">164</span> *<a name="line.164"></a> +<span class="sourceLineNo">165</span> * @param pArray<a name="line.165"></a> +<span class="sourceLineNo">166</span> * a byte array containing base64 character data<a name="line.166"></a> +<span class="sourceLineNo">167</span> * @return A BigInteger<a name="line.167"></a> +<span class="sourceLineNo">168</span> * @since 1.4<a name="line.168"></a> +<span class="sourceLineNo">169</span> */<a name="line.169"></a> +<span class="sourceLineNo">170</span> public static BigInteger decodeInteger(final byte[] pArray) {<a name="line.170"></a> +<span class="sourceLineNo">171</span> return new BigInteger(1, decodeBase64(pArray));<a name="line.171"></a> +<span class="sourceLineNo">172</span> }<a name="line.172"></a> +<span class="sourceLineNo">173</span><a name="line.173"></a> +<span class="sourceLineNo">174</span> /**<a name="line.174"></a> +<span class="sourceLineNo">175</span> * Encodes binary data using the base64 algorithm but does not chunk the output.<a name="line.175"></a> +<span class="sourceLineNo">176</span> *<a name="line.176"></a> +<span class="sourceLineNo">177</span> * @param binaryData<a name="line.177"></a> +<span class="sourceLineNo">178</span> * binary data to encode<a name="line.178"></a> +<span class="sourceLineNo">179</span> * @return byte[] containing Base64 characters in their UTF-8 representation.<a name="line.179"></a> +<span class="sourceLineNo">180</span> */<a name="line.180"></a> +<span class="sourceLineNo">181</span> public static byte[] encodeBase64(final byte[] binaryData) {<a name="line.181"></a> +<span class="sourceLineNo">182</span> return encodeBase64(binaryData, false);<a name="line.182"></a> +<span class="sourceLineNo">183</span> }<a name="line.183"></a> +<span class="sourceLineNo">184</span><a name="line.184"></a> +<span class="sourceLineNo">185</span> /**<a name="line.185"></a> +<span class="sourceLineNo">186</span> * Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.<a name="line.186"></a> +<span class="sourceLineNo">187</span> *<a name="line.187"></a> +<span class="sourceLineNo">188</span> * @param binaryData<a name="line.188"></a> +<span class="sourceLineNo">189</span> * Array containing binary data to encode.<a name="line.189"></a> +<span class="sourceLineNo">190</span> * @param isChunked<a name="line.190"></a> +<span class="sourceLineNo">191</span> * if {@code true} this encoder will chunk the base64 output into 76 character blocks<a name="line.191"></a> +<span class="sourceLineNo">192</span> * @return Base64-encoded data.<a name="line.192"></a> +<span class="sourceLineNo">193</span> * @throws IllegalArgumentException<a name="line.193"></a> +<span class="sourceLineNo">194</span> * Thrown when the input array needs an output array bigger than {@link Integer#MAX_VALUE}<a name="line.194"></a> +<span class="sourceLineNo">195</span> */<a name="line.195"></a> +<span class="sourceLineNo">196</span> public static byte[] encodeBase64(final byte[] binaryData, final boolean isChunked) {<a name="line.196"></a> +<span class="sourceLineNo">197</span> return encodeBase64(binaryData, isChunked, false);<a name="line.197"></a> +<span class="sourceLineNo">198</span> }<a name="line.198"></a> +<span class="sourceLineNo">199</span><a name="line.199"></a> +<span class="sourceLineNo">200</span> /**<a name="line.200"></a> +<span class="sourceLineNo">201</span> * Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.<a name="line.201"></a> +<span class="sourceLineNo">202</span> *<a name="line.202"></a> +<span class="sourceLineNo">203</span> * @param binaryData<a name="line.203"></a> +<span class="sourceLineNo">204</span> * Array containing binary data to encode.<a name="line.204"></a> +<span class="sourceLineNo">205</span> * @param isChunked<a name="line.205"></a> +<span class="sourceLineNo">206</span> * if {@code true} this encoder will chunk the base64 output into 76 character blocks<a name="line.206"></a> +<span class="sourceLineNo">207</span> * @param urlSafe<a name="line.207"></a> +<span class="sourceLineNo">208</span> * if {@code true} this encoder will emit - and _ instead of the usual + and / characters.<a name="line.208"></a> +<span class="sourceLineNo">209</span> * <b>Note: no padding is added when encoding using the URL-safe alphabet.</b><a name="line.209"></a> +<span class="sourceLineNo">210</span> * @return Base64-encoded data.<a name="line.210"></a> +<span class="sourceLineNo">211</span> * @throws IllegalArgumentException<a name="line.211"></a> +<span class="sourceLineNo">212</span> * Thrown when the input array needs an output array bigger than {@link Integer#MAX_VALUE}<a name="line.212"></a> +<span class="sourceLineNo">213</span> * @since 1.4<a name="line.213"></a> +<span class="sourceLineNo">214</span> */<a name="line.214"></a> +<span class="sourceLineNo">215</span> public static byte[] encodeBase64(final byte[] binaryData, final boolean isChunked, final boolean urlSafe) {<a name="line.215"></a> +<span class="sourceLineNo">216</span> return encodeBase64(binaryData, isChunked, urlSafe, Integer.MAX_VALUE);<a name="line.216"></a> +<span class="sourceLineNo">217</span> }<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> /**<a name="line.219"></a> +<span class="sourceLineNo">220</span> * Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.<a name="line.220"></a> +<span class="sourceLineNo">221</span> *<a name="line.221"></a> +<span class="sourceLineNo">222</span> * @param binaryData<a name="line.222"></a> +<span class="sourceLineNo">223</span> * Array containing binary data to encode.<a name="line.223"></a> +<span class="sourceLineNo">224</span> * @param isChunked<a name="line.224"></a> +<span class="sourceLineNo">225</span> * if {@code true} this encoder will chunk the base64 output into 76 character blocks<a name="line.225"></a> +<span class="sourceLineNo">226</span> * @param urlSafe<a name="line.226"></a> +<span class="sourceLineNo">227</span> * if {@code true} this encoder will emit - and _ instead of the usual + and / characters.<a name="line.227"></a> +<span class="sourceLineNo">228</span> * <b>Note: no padding is added when encoding using the URL-safe alphabet.</b><a name="line.228"></a> +<span class="sourceLineNo">229</span> * @param maxResultSize<a name="line.229"></a> +<span class="sourceLineNo">230</span> * The maximum result size to accept.<a name="line.230"></a> +<span class="sourceLineNo">231</span> * @return Base64-encoded data.<a name="line.231"></a> +<span class="sourceLineNo">232</span> * @throws IllegalArgumentException<a name="line.232"></a> +<span class="sourceLineNo">233</span> * Thrown when the input array needs an output array bigger than maxResultSize<a name="line.233"></a> +<span class="sourceLineNo">234</span> * @since 1.4<a name="line.234"></a> +<span class="sourceLineNo">235</span> */<a name="line.235"></a> +<span class="sourceLineNo">236</span> public static byte[] encodeBase64(final byte[] binaryData, final boolean isChunked,<a name="line.236"></a> +<span class="sourceLineNo">237</span> final boolean urlSafe, final int maxResultSize) {<a name="line.237"></a> +<span class="sourceLineNo">238</span> if (binaryData == null || binaryData.length == 0) {<a name="line.238"></a> +<span class="sourceLineNo">239</span> return binaryData;<a name="line.239"></a> +<span class="sourceLineNo">240</span> }<a name="line.240"></a> +<span class="sourceLineNo">241</span><a name="line.241"></a> +<span class="sourceLineNo">242</span> // Create this so can use the super-class method<a name="line.242"></a> +<span class="sourceLineNo">243</span> // Also ensures that the same roundings are performed by the ctor and the code<a name="line.243"></a> +<span class="sourceLineNo">244</span> final Base64 b64 = isChunked ? new Base64(urlSafe) : new Base64(0, CHUNK_SEPARATOR, urlSafe);<a name="line.244"></a> +<span class="sourceLineNo">245</span> final long len = b64.getEncodedLength(binaryData);<a name="line.245"></a> +<span class="sourceLineNo">246</span> if (len > maxResultSize) {<a name="line.246"></a> +<span class="sourceLineNo">247</span> throw new IllegalArgumentException("Input array too big, the output array would be bigger (" +<a name="line.247"></a> +<span class="sourceLineNo">248</span> len +<a name="line.248"></a> +<span class="sourceLineNo">249</span> ") than the specified maximum size of " +<a name="line.249"></a> +<span class="sourceLineNo">250</span> maxResultSize);<a name="line.250"></a> +<span class="sourceLineNo">251</span> }<a name="line.251"></a> +<span class="sourceLineNo">252</span><a name="line.252"></a> +<span class="sourceLineNo">253</span> return b64.encode(binaryData);<a name="line.253"></a> +<span class="sourceLineNo">254</span> }<a name="line.254"></a> +<span class="sourceLineNo">255</span><a name="line.255"></a> +<span class="sourceLineNo">256</span> /**<a name="line.256"></a> +<span class="sourceLineNo">257</span> * Encodes binary data using the base64 algorithm and chunks the encoded output into 76 character blocks<a name="line.257"></a> +<span class="sourceLineNo">258</span> *<a name="line.258"></a> +<span class="sourceLineNo">259</span> * @param binaryData<a name="line.259"></a> +<span class="sourceLineNo">260</span> * binary data to encode<a name="line.260"></a> +<span class="sourceLineNo">261</span> * @return Base64 characters chunked in 76 character blocks<a name="line.261"></a> +<span class="sourceLineNo">262</span> */<a name="line.262"></a> +<span class="sourceLineNo">263</span> public static byte[] encodeBase64Chunked(final byte[] binaryData) {<a name="line.263"></a> +<span class="sourceLineNo">264</span> return encodeBase64(binaryData, true);<a name="line.264"></a> +<span class="sourceLineNo">265</span> }<a name="line.265"></a> +<span class="sourceLineNo">266</span><a name="line.266"></a> +<span class="sourceLineNo">267</span> /**<a name="line.267"></a> +<span class="sourceLineNo">268</span> * Encodes binary data using the base64 algorithm but does not chunk the output.<a name="line.268"></a> +<span class="sourceLineNo">269</span> *<a name="line.269"></a> +<span class="sourceLineNo">270</span> * NOTE: We changed the behavior of this method from multi-line chunking (commons-codec-1.4) to<a name="line.270"></a> +<span class="sourceLineNo">271</span> * single-line non-chunking (commons-codec-1.5).<a name="line.271"></a> +<span class="sourceLineNo">272</span> *<a name="line.272"></a> +<span class="sourceLineNo">273</span> * @param binaryData<a name="line.273"></a> +<span class="sourceLineNo">274</span> * binary data to encode<a name="line.274"></a> +<span class="sourceLineNo">275</span> * @return String containing Base64 characters.<a name="line.275"></a> +<span class="sourceLineNo">276</span> * @since 1.4 (NOTE: 1.4 chunked the output, whereas 1.5 does not).<a name="line.276"></a> +<span class="sourceLineNo">277</span> */<a name="line.277"></a> +<span class="sourceLineNo">278</span> public static String encodeBase64String(final byte[] binaryData) {<a name="line.278"></a> +<span class="sourceLineNo">279</span> return StringUtils.newStringUsAscii(encodeBase64(binaryData, false));<a name="line.279"></a> +<span class="sourceLineNo">280</span> }<a name="line.280"></a> +<span class="sourceLineNo">281</span><a name="line.281"></a> +<span class="sourceLineNo">282</span> /**<a name="line.282"></a> +<span class="sourceLineNo">283</span> * Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output. The<a name="line.283"></a> +<span class="sourceLineNo">284</span> * url-safe variation emits - and _ instead of + and / characters.<a name="line.284"></a> +<span class="sourceLineNo">285</span> * <b>Note: no padding is added.</b><a name="line.285"></a> +<span class="sourceLineNo">286</span> * @param binaryData<a name="line.286"></a> +<span class="sourceLineNo">287</span> * binary data to encode<a name="line.287"></a> +<span class="sourceLineNo">288</span> * @return byte[] containing Base64 characters in their UTF-8 representation.<a name="line.288"></a> +<span class="sourceLineNo">289</span> * @since 1.4<a name="line.289"></a> +<span class="sourceLineNo">290</span> */<a name="line.290"></a> +<span class="sourceLineNo">291</span> public static byte[] encodeBase64URLSafe(final byte[] binaryData) {<a name="line.291"></a> +<span class="sourceLineNo">292</span> return encodeBase64(binaryData, false, true);<a name="line.292"></a> +<span class="sourceLineNo">293</span> }<a name="line.293"></a> +<span class="sourceLineNo">294</span><a name="line.294"></a> +<span class="sourceLineNo">295</span> /**<a name="line.295"></a> +<span class="sourceLineNo">296</span> * Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output. The<a name="line.296"></a> +<span class="sourceLineNo">297</span> * url-safe variation emits - and _ instead of + and / characters.<a name="line.297"></a> +<span class="sourceLineNo">298</span> * <b>Note: no padding is added.</b><a name="line.298"></a> +<span class="sourceLineNo">299</span> * @param binaryData<a name="line.299"></a> +<span class="sourceLineNo">300</span> * binary data to encode<a name="line.300"></a> +<span class="sourceLineNo">301</span> * @return String containing Base64 characters<a name="line.301"></a> +<span class="sourceLineNo">302</span> * @since 1.4<a name="line.302"></a> +<span class="sourceLineNo">303</span> */<a name="line.303"></a> +<span class="sourceLineNo">304</span> public static String encodeBase64URLSafeString(final byte[] binaryData) {<a name="line.304"></a> +<span class="sourceLineNo">305</span> return StringUtils.newStringUsAscii(encodeBase64(binaryData, false, true));<a name="line.305"></a> +<span class="sourceLineNo">306</span> }<a name="line.306"></a> +<span class="sourceLineNo">307</span><a name="line.307"></a> +<span class="sourceLineNo">308</span> /**<a name="line.308"></a> +<span class="sourceLineNo">309</span> * Encodes to a byte64-encoded integer according to crypto standards such as W3C's XML-Signature.<a name="line.309"></a> +<span class="sourceLineNo">310</span> *<a name="line.310"></a> +<span class="sourceLineNo">311</span> * @param bigInteger<a name="line.311"></a> +<span class="sourceLineNo">312</span> * a BigInteger<a name="line.312"></a> +<span class="sourceLineNo">313</span> * @return A byte array containing base64 character data<a name="line.313"></a> +<span class="sourceLineNo">314</span> * @throws NullPointerException<a name="line.314"></a> +<span class="sourceLineNo">315</span> * if null is passed in<a name="line.315"></a> +<span class="sourceLineNo">316</span> * @since 1.4<a name="line.316"></a> +<span class="sourceLineNo">317</span> */<a name="line.317"></a> +<span class="sourceLineNo">318</span> public static byte[] encodeInteger(final BigInteger bigInteger) {<a name="line.318"></a> +<span class="sourceLineNo">319</span> Objects.requireNonNull(bigInteger, "bigInteger");<a name="line.319"></a> +<span class="sourceLineNo">320</span> return encodeBase64(toIntegerBytes(bigInteger), false);<a name="line.320"></a> +<span class="sourceLineNo">321</span> }<a name="line.321"></a> +<span class="sourceLineNo">322</span><a name="line.322"></a> +<span class="sourceLineNo">323</span> /**<a name="line.323"></a> +<span class="sourceLineNo">324</span> * Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. Currently the<a name="line.324"></a> +<span class="sourceLineNo">325</span> * method treats whitespace as valid.<a name="line.325"></a> +<span class="sourceLineNo">326</span> *<a name="line.326"></a> +<span class="sourceLineNo">327</span> * @param arrayOctet<a name="line.327"></a> +<span class="sourceLineNo">328</span> * byte array to test<a name="line.328"></a> +<span class="sourceLineNo">329</span> * @return {@code true} if all bytes are valid characters in the Base64 alphabet or if the byte array is empty;<a name="line.329"></a> +<span class="sourceLineNo">330</span> * {@code false}, otherwise<a name="line.330"></a> +<span class="sourceLineNo">331</span> * @deprecated 1.5 Use {@link #isBase64(byte[])}, will be removed in 2.0.<a name="line.331"></a> +<span class="sourceLineNo">332</span> */<a name="line.332"></a> +<span class="sourceLineNo">333</span> @Deprecated<a name="line.333"></a> +<span class="sourceLineNo">334</span> public static boolean isArrayByteBase64(final byte[] arrayOctet) {<a name="line.334"></a> +<span class="sourceLineNo">335</span> return isBase64(arrayOctet);<a name="line.335"></a> +<span class="sourceLineNo">336</span> }<a name="line.336"></a> +<span class="sourceLineNo">337</span><a name="line.337"></a> +<span class="sourceLineNo">338</span> /**<a name="line.338"></a> +<span class="sourceLineNo">339</span> * Returns whether or not the {@code octet} is in the base 64 alphabet.<a name="line.339"></a> +<span class="sourceLineNo">340</span> *<a name="line.340"></a> +<span class="sourceLineNo">341</span> * @param octet<a name="line.341"></a> +<span class="sourceLineNo">342</span> * The value to test<a name="line.342"></a> +<span class="sourceLineNo">343</span> * @return {@code true} if the value is defined in the the base 64 alphabet, {@code false} otherwise.<a name="line.343"></a> +<span class="sourceLineNo">344</span> * @since 1.4<a name="line.344"></a> +<span class="sourceLineNo">345</span> */<a name="line.345"></a> +<span class="sourceLineNo">346</span> public static boolean isBase64(final byte octet) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> return octet == PAD_DEFAULT || (octet >= 0 && octet < DECODE_TABLE.length && DECODE_TABLE[octet] != -1);<a name="line.347"></a> +<span class="sourceLineNo">348</span> }<a name="line.348"></a> +<span class="sourceLineNo">349</span><a name="line.349"></a> +<span class="sourceLineNo">350</span> /**<a name="line.350"></a> +<span class="sourceLineNo">351</span> * Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. Currently the<a name="line.351"></a> +<span class="sourceLineNo">352</span> * method treats whitespace as valid.<a name="line.352"></a> +<span class="sourceLineNo">353</span> *<a name="line.353"></a> +<span class="sourceLineNo">354</span> * @param arrayOctet<a name="line.354"></a> +<span class="sourceLineNo">355</span> * byte array to test<a name="line.355"></a> +<span class="sourceLineNo">356</span> * @return {@code true} if all bytes are valid characters in the Base64 alphabet or if the byte array is empty;<a name="line.356"></a> +<span class="sourceLineNo">357</span> * {@code false}, otherwise<a name="line.357"></a> +<span class="sourceLineNo">358</span> * @since 1.5<a name="line.358"></a> +<span class="sourceLineNo">359</span> */<a name="line.359"></a> +<span class="sourceLineNo">360</span> public static boolean isBase64(final byte[] arrayOctet) {<a name="line.360"></a> +<span class="sourceLineNo">361</span> for (int i = 0; i < arrayOctet.length; i++) {<a name="line.361"></a> +<span class="sourceLineNo">362</span> if (!isBase64(arrayOctet[i]) && !isWhiteSpace(arrayOctet[i])) {<a name="line.362"></a> +<span class="sourceLineNo">363</span> return false;<a name="line.363"></a> +<span class="sourceLineNo">364</span> }<a name="line.364"></a> +<span class="sourceLineNo">365</span> }<a name="line.365"></a> +<span class="sourceLineNo">366</span> return true;<a name="line.366"></a> +<span class="sourceLineNo">367</span> }<a name="line.367"></a> +<span class="sourceLineNo">368</span><a name="line.368"></a> +<span class="sourceLineNo">369</span> /**<a name="line.369"></a> +<span class="sourceLineNo">370</span> * Tests a given String to see if it contains only valid characters within the Base64 alphabet. Currently the<a name="line.370"></a> +<span class="sourceLineNo">371</span> * method treats whitespace as valid.<a name="line.371"></a> +<span class="sourceLineNo">372</span> *<a name="line.372"></a> +<span class="sourceLineNo">373</span> * @param base64<a name="line.373"></a> +<span class="sourceLineNo">374</span> * String to test<a name="line.374"></a> +<span class="sourceLineNo">375</span> * @return {@code true} if all characters in the String are valid characters in the Base64 alphabet or if<a name="line.375"></a> +<span class="sourceLineNo">376</span> * the String is empty; {@code false}, otherwise<a name="line.376"></a> +<span class="sourceLineNo">377</span> * @since 1.5<a name="line.377"></a> +<span class="sourceLineNo">378</span> */<a name="line.378"></a> +<span class="sourceLineNo">379</span> public static boolean isBase64(final String base64) {<a name="line.379"></a> +<span class="sourceLineNo">380</span> return isBase64(StringUtils.getBytesUtf8(base64));<a name="line.380"></a> +<span class="sourceLineNo">381</span> }<a name="line.381"></a> +<span class="sourceLineNo">382</span><a name="line.382"></a> +<span class="sourceLineNo">383</span> /**<a name="line.383"></a> +<span class="sourceLineNo">384</span> * Returns a byte-array representation of a {@code BigInteger} without sign bit.<a name="line.384"></a> +<span class="sourceLineNo">385</span> *<a name="line.385"></a> +<span class="sourceLineNo">386</span> * @param bigInt<a name="line.386"></a> +<span class="sourceLineNo">387</span> * {@code BigInteger} to be converted<a name="line.387"></a> +<span class="sourceLineNo">388</span> * @return a byte array representation of the BigInteger parameter<a name="line.388"></a> +<span class="sourceLineNo">389</span> */<a name="line.389"></a> +<span class="sourceLineNo">390</span> static byte[] toIntegerBytes(final BigInteger bigInt) {<a name="line.390"></a> +<span class="sourceLineNo">391</span> int bitlen = bigInt.bitLength();<a name="line.391"></a> +<span class="sourceLineNo">392</span> // round bitlen<a name="line.392"></a> +<span class="sourceLineNo">393</span> bitlen = ((bitlen + 7) >> 3) << 3;<a name="line.393"></a> +<span class="sourceLineNo">394</span> final byte[] bigBytes = bigInt.toByteArray();<a name="line.394"></a> +<span class="sourceLineNo">395</span><a name="line.395"></a> +<span class="sourceLineNo">396</span> if (((bigInt.bitLength() % 8) != 0) && (((bigInt.bitLength() / 8) + 1) == (bitlen / 8))) {<a name="line.396"></a> +<span class="sourceLineNo">397</span> return bigBytes;<a name="line.397"></a> +<span class="sourceLineNo">398</span> }<a name="line.398"></a> +<span class="sourceLineNo">399</span> // set up params for copying everything but sign bit<a name="line.399"></a> +<span class="sourceLineNo">400</span> int startSrc = 0;<a name="line.400"></a> +<span class="sourceLineNo">401</span> int len = bigBytes.length;<a name="line.401"></a> +<span class="sourceLineNo">402</span><a name="line.402"></a> +<span class="sourceLineNo">403</span> // if bigInt is exactly byte-aligned, just skip signbit in copy<a name="line.403"></a> +<span class="sourceLineNo">404</span> if ((bigInt.bitLength() % 8) == 0) {<a name="line.404"></a> +<span class="sourceLineNo">405</span> startSrc = 1;<a name="line.405"></a> +<span class="sourceLineNo">406</span> len--;<a name="line.406"></a> +<span class="sourceLineNo">407</span> }<a name="line.407"></a> +<span class="sourceLineNo">408</span> final int startDst = bitlen / 8 - len; // to pad w/ nulls as per spec<a name="line.408"></a> +<span class="sourceLineNo">409</span> final byte[] resizedBytes = new byte[bitlen / 8];<a name="line.409"></a> +<span class="sourceLineNo">410</span> System.arraycopy(bigBytes, startSrc, resizedBytes, startDst, len);<a name="line.410"></a> +<span class="sourceLineNo">411</span> return resizedBytes;<a name="line.411"></a> +<span class="sourceLineNo">412</span> }<a name="line.412"></a> +<span class="sourceLineNo">413</span><a name="line.413"></a> +<span class="sourceLineNo">414</span> /**<a name="line.414"></a> +<span class="sourceLineNo">415</span> * Encode table to use: either STANDARD or URL_SAFE. Note: the DECODE_TABLE above remains static because it is able<a name="line.415"></a> +<span class="sourceLineNo">416</span> * to decode both STANDARD and URL_SAFE streams, but the encodeTable must be a member variable so we can switch<a name="line.416"></a> +<span class="sourceLineNo">417</span> * between the two modes.<a name="line.417"></a> +<span class="sourceLineNo">418</span> */<a name="line.418"></a> +<span class="sourceLineNo">419</span> private final byte[] encodeTable;<a name="line.419"></a> +<span class="sourceLineNo">420</span><a name="line.420"></a> +<span class="sourceLineNo">421</span> // Only one decode table currently; keep for consistency with Base32 code<a name="line.421"></a> +<span class="sourceLineNo">422</span> private final byte[] decodeTable = DECODE_TABLE;<a name="line.422"></a> +<span class="sourceLineNo">423</span><a name="line.423"></a> +<span class="sourceLineNo">424</span> /**<a name="line.424"></a> +<span class="sourceLineNo">425</span> * Line separator for encoding. Not used when decoding. Only used if lineLength &gt; 0.<a name="line.425"></a> +<span class="sourceLineNo">426</span> */<a name="line.426"></a> +<span class="sourceLineNo">427</span> private final byte[] lineSeparator;<a name="line.427"></a> +<span class="sourceLineNo">428</span><a name="line.428"></a> +<span class="sourceLineNo">429</span> /**<a name="line.429"></a> +<span class="sourceLineNo">430</span> * Convenience variable to help us determine when our buffer is going to run out of room and needs resizing.<a name="line.430"></a> +<span class="sourceLineNo">431</span> * {@code decodeSize = 3 + lineSeparator.length;}<a name="line.431"></a> +<span class="sourceLineNo">432</span> */<a name="line.432"></a> +<span class="sourceLineNo">433</span> private final int decodeSize;<a name="line.433"></a> +<span class="sourceLineNo">434</span><a name="line.434"></a> +<span class="sourceLineNo">435</span> /**<a name="line.435"></a> +<span class="sourceLineNo">436</span> * Convenience variable to help us determine when our buffer is going to run out of room and needs resizing.<a name="line.436"></a> +<span class="sourceLineNo">437</span> * {@code encodeSize = 4 + lineSeparator.length;}<a name="line.437"></a> +<span class="sourceLineNo">438</span> */<a name="line.438"></a> +<span class="sourceLineNo">439</span> private final int encodeSize;<a name="line.439"></a> +<span class="sourceLineNo">440</span><a name="line.440"></a> +<span class="sourceLineNo">441</span> /**<a name="line.441"></a> +<span class="sourceLineNo">442</span> * Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.<a name="line.442"></a> +<span class="sourceLineNo">443</span> * <p><a name="line.443"></a> +<span class="sourceLineNo">444</span> * When encoding the line length is 0 (no chunking), and the encoding table is STANDARD_ENCODE_TABLE.<a name="line.444"></a> +<span class="sourceLineNo">445</span> * </p><a name="line.445"></a> +<span class="sourceLineNo">446</span> *<a name="line.446"></a> +<span class="sourceLineNo">447</span> * <p><a name="line.447"></a> +<span class="sourceLineNo">448</span> * When decoding all variants are supported.<a name="line.448"></a> +<span class="sourceLineNo">449</span> * </p><a name="line.449"></a> +<span class="sourceLineNo">450</span> */<a name="line.450"></a> +<span class="sourceLineNo">451</span> public Base64() {<a name="line.451"></a> +<span class="sourceLineNo">452</span> this(0);<a name="line.452"></a> +<span class="sourceLineNo">453</span> }<a name="line.453"></a> +<span class="sourceLineNo">454</span><a name="line.454"></a> +<span class="sourceLineNo">455</span> /**<a name="line.455"></a> +<span class="sourceLineNo">456</span> * Creates a Base64 codec used for decoding (all modes) and encoding in the given URL-safe mode.<a name="line.456"></a> +<span class="sourceLineNo">457</span> * <p><a name="line.457"></a> +<span class="sourceLineNo">458</span> * When encoding the line length is 76, the line separator is CRLF, and the encoding table is STANDARD_ENCODE_TABLE.<a name="line.458"></a> +<span class="sourceLineNo">459</span> * </p><a name="line.459"></a> +<span class="sourceLineNo">460</span> *<a name="line.460"></a> +<span class="sourceLineNo">461</span> * <p><a name="line.461"></a> +<span class="sourceLineNo">462</span> * When decoding all variants are supported.<a name="line.462"></a> +<span class="sourceLineNo">463</span> * </p><a name="line.463"></a> +<span class="sourceLineNo">464</span> *<a name="line.464"></a> +<span class="sourceLineNo">465</span> * @param urlSafe<a name="line.465"></a> +<span class="sourceLineNo">466</span> * if {@code true}, URL-safe encoding is used. In most cases this should be set to<a name="line.466"></a> +<span class="sourceLineNo">467</span> * {@code false}.<a name="line.467"></a> +<span class="sourceLineNo">468</span> * @since 1.4<a name="line.468"></a> +<span class="sourceLineNo">469</span> */<a name="line.469"></a> +<span class="sourceLineNo">470</span> public Base64(final boolean urlSafe) {<a name="line.470"></a> +<span class="sourceLineNo">471</span> this(MIME_CHUNK_SIZE, CHUNK_SEPARATOR, urlSafe);<a name="line.471"></a> +<span class="sourceLineNo">472</span> }<a name="line.472"></a> +<span class="sourceLineNo">473</span><a name="line.473"></a> +<span class="sourceLineNo">474</span> /**<a name="line.474"></a> +<span class="sourceLineNo">475</span> * Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.<a name="line.475"></a> +<span class="sourceLineNo">476</span> * <p><a name="line.476"></a> +<span class="sourceLineNo">477</span> * When encoding the line length is given in the constructor, the line separator is CRLF, and the encoding table is<a name="line.477"></a> +<span class="sourceLineNo">478</span> * STANDARD_ENCODE_TABLE.<a name="line.478"></a> +<span class="sourceLineNo">479</span> * </p><a name="line.479"></a> +<span class="sourceLineNo">480</span> * <p><a name="line.480"></a> +<span class="sourceLineNo">481</span> * Line lengths that aren't multiples of 4 will still essentially end up being multiples of 4 in the encoded data.<a name="line.481"></a> +<span class="sourceLineNo">482</span> * </p><a name="line.482"></a> +<span class="sourceLineNo">483</span> * <p><a name="line.483"></a> +<span class="sourceLineNo">484</span> * When decoding all variants are supported.<a name="line.484"></a> +<span class="sourceLineNo">485</span> * </p><a name="line.485"></a> +<span class="sourceLineNo">486</span> *<a name="line.486"></a> +<span class="sourceLineNo">487</span> * @param lineLength<a name="line.487"></a> +<span class="sourceLineNo">488</span> * Each line of encoded data will be at most of the given length (rounded down to nearest multiple of<a name="line.488"></a> +<span class="sourceLineNo">489</span> * 4). If lineLength &lt;= 0, then the output will not be divided into lines (chunks). Ignored when<a name="line.489"></a> +<span class="sourceLineNo">490</span> * decoding.<a name="line.490"></a> +<span class="sourceLineNo">491</span> * @since 1.4<a name="line.491"></a> +<span class="sourceLineNo">492</span> */<a name="line.492"></a> +<span class="sourceLineNo">493</span> public Base64(final int lineLength) {<a name="line.493"></a> +<span class="sourceLineNo">494</span> this(lineLength, CHUNK_SEPARATOR);<a name="line.494"></a> +<span class="sourceLineNo">495</span> }<a name="line.495"></a> +<span class="sourceLineNo">496</span><a name="line.496"></a> +<span class="sourceLineNo">497</span> /**<a name="line.497"></a> +<span class="sourceLineNo">498</span> * Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.<a name="line.498"></a> +<span class="sourceLineNo">499</span> * <p><a name="line.499"></a> +<span class="sourceLineNo">500</span> * When encoding the line length and line separator are given in the constructor, and the encoding table is<a name="line.500"></a> +<span class="sourceLineNo">501</span> * STANDARD_ENCODE_TABLE.<a name="line.501"></a> +<span class="sourceLineNo">502</span> * </p><a name="line.502"></a> +<span class="sourceLineNo">503</span> * <p><a name="line.503"></a> +<span class="sourceLineNo">504</span> * Line lengths that aren't multiples of 4 will still essentially end up being multiples of 4 in the encoded data.<a name="line.504"></a> +<span class="sourceLineNo">505</span> * </p><a name="line.505"></a> +<span class="sourceLineNo">506</span> * <p><a name="line.506"></a> +<span class="sourceLineNo">507</span> * When decoding all variants are supported.<a name="line.507"></a> +<span class="sourceLineNo">508</span> * </p><a name="line.508"></a> +<span class="sourceLineNo">509</span> *<a name="line.509"></a> +<span class="sourceLineNo">510</span> * @param lineLength<a name="line.510"></a> +<span class="sourceLineNo">511</span> * Each line of encoded data will be at most of the given length (rounded down to nearest multiple of<a name="line.511"></a> +<span class="sourceLineNo">512</span> * 4). If lineLength &lt;= 0, then the output will not be divided into lines (chunks). Ignored when<a name="line.512"></a> +<span class="sourceLineNo">513</span> * decoding.<a name="line.513"></a> +<span class="sourceLineNo">514</span> * @param lineSeparator<a name="line.514"></a> +<span class="sourceLineNo">515</span> * Each line of encoded data will end with this sequence of bytes.<a name="line.515"></a> +<span class="sourceLineNo">516</span> * @throws IllegalArgumentException<a name="line.516"></a> +<span class="sourceLineNo">517</span> * Thrown when the provided lineSeparator included some base64 characters.<a name="line.517"></a> +<span class="sourceLineNo">518</span> * @since 1.4<a name="line.518"></a> +<span class="sourceLineNo">519</span> */<a name="line.519"></a> +<span class="sourceLineNo">520</span> public Base64(final int lineLength, final byte[] lineSeparator) {<a name="line.520"></a> +<span class="sourceLineNo">521</span> this(lineLength, lineSeparator, false);<a name="line.521"></a> +<span class="sourceLineNo">522</span> }<a name="line.522"></a> +<span class="sourceLineNo">523</span><a name="line.523"></a> +<span class="sourceLineNo">524</span> /**<a name="line.524"></a> +<span class="sourceLineNo">525</span> * Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.<a name="line.525"></a> +<span class="sourceLineNo">526</span> * <p><a name="line.526"></a> +<span class="sourceLineNo">527</span> * When encoding the line length and line separator are given in the constructor, and the encoding table is<a name="line.527"></a> +<span class="sourceLineNo">528</span> * STANDARD_ENCODE_TABLE.<a name="line.528"></a> +<span class="sourceLineNo">529</span> * </p><a name="line.529"></a> +<span class="sourceLineNo">530</span> * <p><a name="line.530"></a> +<span class="sourceLineNo">531</span> * Line lengths that aren't multiples of 4 will still essentially end up being multiples of 4 in the encoded data.<a name="line.531"></a> +<span class="sourceLineNo">532</span> * </p><a name="line.532"></a> +<span class="sourceLineNo">533</span> * <p><a name="line.533"></a> +<span class="sourceLineNo">534</span> * When decoding all variants are supported.<a name="line.534"></a> +<span class="sourceLineNo">535</span> * </p><a name="line.535"></a> +<span class="sourceLineNo">536</span> *<a name="line.536"></a> +<span class="sourceLineNo">537</span> * @param lineLength<a name="line.537"></a> +<span class="sourceLineNo">538</span> * Each line of encoded data will be at most of the given length (rounded down to nearest multiple of<a name="line.538"></a> +<span class="sourceLineNo">539</span> * 4). If lineLength &lt;= 0, then the output will not be divided into lines (chunks). Ignored when<a name="line.539"></a> +<span class="sourceLineNo">540</span> * decoding.<a name="line.540"></a> +<span class="sourceLineNo">541</span> * @param lineSeparator<a name="line.541"></a> +<span class="sourceLineNo">542</span> * Each line of encoded data will end with this sequence of bytes.<a name="line.542"></a> +<span class="sourceLineNo">543</span> * @param urlSafe<a name="line.543"></a> +<span class="sourceLineNo">544</span> * Instead of emitting '+' and '/' we emit '-' and '_' respectively. urlSafe is only applied to encode<a name="line.544"></a> +<span class="sourceLineNo">545</span> * operations. Decoding seamlessly handles both modes.<a name="line.545"></a> +<span class="sourceLineNo">546</span> * <b>Note: no padding is added when using the URL-safe alphabet.</b><a name="line.546"></a> +<span class="sourceLineNo">547</span> * @throws IllegalArgumentException<a name="line.547"></a> +<span class="sourceLineNo">548</span> * Thrown when the {@code lineSeparator} contains Base64 characters.<a name="line.548"></a> +<span class="sourceLineNo">549</span> * @since 1.4<a name="line.549"></a> +<span class="sourceLineNo">550</span> */<a name="line.550"></a> +<span class="sourceLineNo">551</span> public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe) {<a name="line.551"></a> +<span class="sourceLineNo">552</span> this(lineLength, lineSeparator, urlSafe, DECODING_POLICY_DEFAULT);<a name="line.552"></a> +<span class="sourceLineNo">553</span> }<a name="line.553"></a> +<span class="sourceLineNo">554</span><a name="line.554"></a> +<span class="sourceLineNo">555</span> /**<a name="line.555"></a> +<span class="sourceLineNo">556</span> * Creates a Base64 codec used for decoding (all modes) and encoding in URL-unsafe mode.<a name="line.556"></a> +<span class="sourceLineNo">557</span> * <p><a name="line.557"></a> +<span class="sourceLineNo">558</span> * When encoding the line length and line separator are given in the constructor, and the encoding table is<a name="line.558"></a> +<span class="sourceLineNo">559</span> * STANDARD_ENCODE_TABLE.<a name="line.559"></a> +<span class="sourceLineNo">560</span> * </p><a name="line.560"></a> +<span class="sourceLineNo">561</span> * <p><a name="line.561"></a> +<span class="sourceLineNo">562</span> * Line lengths that aren't multiples of 4 will still essentially end up being multiples of 4 in the encoded data.<a name="line.562"></a> +<span class="sourceLineNo">563</span> * </p><a name="line.563"></a> +<span class="sourceLineNo">564</span> * <p><a name="line.564"></a> +<span class="sourceLineNo">565</span> * When decoding all variants are supported.<a name="line.565"></a> +<span class="sourceLineNo">566</span> * </p><a name="line.566"></a> +<span class="sourceLineNo">567</span> *<a name="line.567"></a> +<span class="sourceLineNo">568</span> * @param lineLength<a name="line.568"></a> +<span class="sourceLineNo">569</span> * Each line of encoded data will be at most of the given length (rounded down to nearest multiple of<a name="line.569"></a> +<span class="sourceLineNo">570</span> * 4). If lineLength &lt;= 0, then the output will not be divided into lines (chunks). Ignored when<a name="line.570"></a> +<span class="sourceLineNo">571</span> * decoding.<a name="line.571"></a> +<span class="sourceLineNo">572</span> * @param lineSeparator<a name="line.572"></a> +<span class="sourceLineNo">573</span> * Each line of encoded data will end with this sequence of bytes.<a name="line.573"></a> +<span class="sourceLineNo">574</span> * @param urlSafe<a name="line.574"></a> +<span class="sourceLineNo">575</span> * Instead of emitting '+' and '/' we emit '-' and '_' respectively. urlSafe is only applied to encode<a name="line.575"></a> +<span class="sourceLineNo">576</span> * operations. Decoding seamlessly handles both modes.<a name="line.576"></a> +<span class="sourceLineNo">577</span> * <b>Note: no padding is added when using the URL-safe alphabet.</b><a name="line.577"></a> +<span class="sourceLineNo">578</span> * @param decodingPolicy The decoding policy.<a name="line.578"></a> +<span class="sourceLineNo">579</span> * @throws IllegalArgumentException<a name="line.579"></a> +<span class="sourceLineNo">580</span> * Thrown when the {@code lineSeparator} contains Base64 characters.<a name="line.580"></a> +<span class="sourceLineNo">581</span> * @since 1.15<a name="line.581"></a> +<span class="sourceLineNo">582</span> */<a name="line.582"></a> +<span class="sourceLineNo">583</span> public Base64(final int lineLength, final byte[] lineSeparator, final boolean urlSafe, final CodecPolicy decodingPolicy) {<a name="line.583"></a> +<span class="sourceLineNo">584</span> super(BYTES_PER_UNENCODED_BLOCK, BYTES_PER_ENCODED_BLOCK,<a name="line.584"></a> +<span class="sourceLineNo">585</span> lineLength,<a name="line.585"></a> +<span class="sourceLineNo">586</span> lineSeparator == null ? 0 : lineSeparator.length,<a name="line.586"></a> +<span class="sourceLineNo">587</span> PAD_DEFAULT,<a name="line.587"></a> +<span class="sourceLineNo">588</span> decodingPolicy);<a name="line.588"></a> +<span class="sourceLineNo">589</span> // TODO could be simplified if there is no requirement to reject invalid line sep when length <=0<a name="line.589"></a> +<span class="sourceLineNo">590</span> // @see test case Base64Test.testConstructors()<a name="line.590"></a> +<span class="sourceLineNo">591</span> if (lineSeparator != null) {<a name="line.591"></a> +<span class="sourceLineNo">592</span> if (containsAlphabetOrPad(lineSeparator)) {<a name="line.592"></a> +<span class="sourceLineNo">593</span> final String sep = StringUtils.newStringUtf8(lineSeparator);<a name="line.593"></a> +<span class="sourceLineNo">594</span> throw new IllegalArgumentException("lineSeparator must not contain base64 characters: [" + sep + "]");<a name="line.594"></a> +<span class="sourceLineNo">595</span> }<a name="line.595"></a> +<span class="sourceLineNo">596</span> if (lineLength > 0){ // null line-sep forces no chunking rather than throwing IAE<a name="line.596"></a> +<span class="sourceLineNo">597</span> this.encodeSize = BYTES_PER_ENCODED_BLOCK + lineSeparator.length;<a name="line.597"></a> +<span class="sourceLineNo">598</span> this.lineSeparator = new byte[lineSeparator.length];<a name="line.598"></a> +<span class="sourceLineNo">599</span> System.arraycopy(lineSeparator, 0, this.lineSeparator, 0, lineSeparator.length);<a name="line.599"></a> +<span class="sourceLineNo">600</span> } else {<a name="line.600"></a> +<span class="sourceLineNo">601</span> this.encodeSize = BYTES_PER_ENCODED_BLOCK;<a name="line.601"></a> +<span class="sourceLineNo">602</span> this.lineSeparator = null;<a name="line.602"></a> +<span class="sourceLineNo">603</span> }<a name="line.603"></a> +<span class="sourceLineNo">604</span> } else {<a name="line.604"></a> +<span class="sourceLineNo">605</span> this.encodeSize = BYTES_PER_ENCODED_BLOCK;<a name="line.605"></a> +<span class="sourceLineNo">606</span> this.lineSeparator = null;<a name="line.606"></a> +<span class="sourceLineNo">607</span> }<a name="line.607"></a> +<span class="sourceLineNo">608</span> this.decodeSize = this.encodeSize - 1;<a name="line.608"></a> +<span class="sourceLineNo">609</span> this.encodeTable = urlSafe ? URL_SAFE_ENCODE_TABLE : STANDARD_ENCODE_TABLE;<a name="line.609"></a> +<span class="sourceLineNo">610</span> }<a name="line.610"></a> +<span class="sourceLineNo">611</span><a name="line.611"></a> +<span class="sourceLineNo">612</span> // Implementation of the Encoder Interface<a name="line.612"></a> +<span class="sourceLineNo">613</span><a name="line.613"></a> +<span class="sourceLineNo">614</span> /**<a name="line.614"></a> +<span class="sourceLineNo">615</span> * <p><a name="line.615"></a> +<span class="sourceLineNo">616</span> * Decodes all of the provided data, starting at inPos, for inAvail bytes. Should be called at least twice: once<a name="line.616"></a> +<span class="sourceLineNo">617</span> * with the data to decode, and once with inAvail set to "-1" to alert decoder that EOF has been reached. The "-1"<a name="line.617"></a> +<span class="sourceLineNo">618</span> * call is not necessary when decoding, but it doesn't hurt, either.<a name="line.618"></a> +<span class="sourceLineNo">619</span> * </p><a name="line.619"></a> +<span class="sourceLineNo">620</span> * <p><a name="line.620"></a> +<span class="sourceLineNo">621</span> * Ignores all non-base64 characters. This is how chunked (e.g. 76 character) data is handled, since CR and LF are<a name="line.621"></a> +<span class="sourceLineNo">622</span> * silently ignored, but has implications for other bytes, too. This method subscribes to the garbage-in,<a name="line.622"></a> +<span class="sourceLineNo">623</span> * garbage-out philosophy: it will not check the provided data for validity.<a name="line.623"></a> +<span class="sourceLineNo">624</span> * </p><a name="line.624"></a> +<span class="sourceLineNo">625</span> * <p><a name="line.625"></a> +<span class="sourceLineNo">626</span> * Thanks to "commons" project in ws.apache.org for the bitwise operations, and general approach.<a name="line.626"></a> +<span class="sourceLineNo">627</span> * http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/<a name="line.627"></a> +<span class="sourceLineNo">628</span> * </p><a name="line.628"></a> +<span class="sourceLineNo">629</span> *<a name="line.629"></a> +<span class="sourceLineNo">630</span> * @param in<a name="line.630"></a> +<span class="sourceLineNo">631</span> * byte[] array of ascii data to base64 decode.<a name="line.631"></a> +<span class="sourceLineNo">632</span> * @param inPos<a name="line.632"></a> +<span class="sourceLineNo">633</span> * Position to start reading data from.<a name="line.633"></a> +<span class="sourceLineNo">634</span> * @param inAvail<a name="line.634"></a> +<span class="sourceLineNo">635</span> * Amount of bytes available from input for decoding.<a name="line.635"></a> +<span class="sourceLineNo">636</span> * @param context<a name="line.636"></a> +<span class="sourceLineNo">637</span> * the context to be used<a name="line.637"></a> +<span class="sourceLineNo">638</span> */<a name="line.638"></a> +<span class="sourceLineNo">639</span> @Override<a name="line.639"></a> +<span class="sourceLineNo">640</span> void decode(final byte[] in, int inPos, final int inAvail, final Context context) {<a name="line.640"></a> +<span class="sourceLineNo">641</span> if (context.eof) {<a name="line.641"></a> +<span class="sourceLineNo">642</span> return;<a name="line.642"></a> +<span class="sourceLineNo">643</span> }<a name="line.643"></a> +<span class="sourceLineNo">644</span> if (inAvail < 0) {<a name="line.644"></a> +<span class="sourceLineNo">645</span> context.eof = true;<a name="line.645"></a> +<span class="sourceLineNo">646</span> }<a name="line.646"></a> +<span class="sourceLineNo">647</span> for (int i = 0; i < inAvail; i++) {<a name="line.647"></a> +<span class="sourceLineNo">648</span> final byte[] buffer = ensureBufferSize(decodeSize, context);<a name="line.648"></a> +<span class="sourceLineNo">649</span> final byte b = in[inPos++];<a name="line.649"></a> +<span class="sourceLineNo">650</span> if (b == pad) {<a name="line.650"></a> +<span class="sourceLineNo">651</span> // We're done.<a name="line.651"></a> +<span class="sourceLineNo">652</span> context.eof = true;<a name="line.652"></a> +<span class="sourceLineNo">653</span> break;<a name="line.653"></a> +<span class="sourceLineNo">654</span> }<a name="line.654"></a> +<span class="sourceLineNo">655</span> if (b >= 0 && b < DECODE_TABLE.length) {<a name="line.655"></a> +<span class="sourceLineNo">656</span> final int result = DECODE_TABLE[b];<a name="line.656"></a> +<span class="sourceLineNo">657</span> if (result >= 0) {<a name="line.657"></a> +<span class="sourceLineNo">658</span> context.modulus = (context.modulus+1) % BYTES_PER_ENCODED_BLOCK;<a name="line.658"></a> +<span class="sourceLineNo">659</span> context.ibitWorkArea = (context.ibitWorkArea << BITS_PER_ENCODED_BYTE) + result;<a name="line.659"></a> +<span class="sourceLineNo">660</span> if (context.modulus == 0) {<a name="line.660"></a> +<span class="sourceLineNo">661</span> buffer[context.pos++] = (byte) ((context.ibitWorkArea >> 16) & MASK_8BITS);<a name="line.661"></a> +<span class="sourceLineNo">662</span> buffer[context.pos++] = (byte) ((context.ibitWorkArea >> 8) & MASK_8BITS);<a name="line.662"></a> +<span class="sourceLineNo">663</span> buffer[context.pos++] = (byte) (context.ibitWorkArea & MASK_8BITS);<a name="line.663"></a> +<span class="sourceLineNo">664</span> }<a name="line.664"></a> +<span class="sourceLineNo">665</span> }<a name="line.665"></a> +<span class="sourceLineNo">666</span> }<a name="line.666"></a> +<span class="sourceLineNo">667</span> }<a name="line.667"></a> +<span class="sourceLineNo">668</span><a name="line.668"></a> +<span class="sourceLineNo">669</span> // Two forms of EOF as far as base64 decoder is concerned: actual<a name="line.669"></a> +<span class="sourceLineNo">670</span> // EOF (-1) and first time '=' character is encountered in stream.<a name="line.670"></a> +<span class="sourceLineNo">671</span> // This approach makes the '=' padding characters completely optional.<a name="line.671"></a> +<span class="sourceLineNo">672</span> if (context.eof && context.modulus != 0) {<a name="line.672"></a> +<span class="sourceLineNo">673</span> final byte[] buffer = ensureBufferSize(decodeSize, context);<a name="line.673"></a> +<span class="sourceLineNo">674</span><a name="line.674"></a> +<span class="sourceLineNo">675</span> // We have some spare bits remaining<a name="line.675"></a> +<span class="sourceLineNo">676</span> // Output all whole multiples of 8 bits and ignore the rest<a name="line.676"></a> +<span class="sourceLineNo">677</span> switch (context.modulus) {<a name="line.677"></a> +<span class="sourceLineNo">678</span>// case 0 : // impossible, as excluded above<a name="line.678"></a> +<span class="sourceLineNo">679</span> case 1 : // 6 bits - either ignore entirely, or raise an exception<a name="line.679"></a> +<span class="sourceLineNo">680</span> validateTrailingCharacter();<a name="line.680"></a> +<span class="sourceLineNo">681</span> break;<a name="line.681"></a> +<span class="sourceLineNo">682</span> case 2 : // 12 bits = 8 + 4<a name="line.682"></a> +<span class="sourceLineNo">683</span> validateCharacter(MASK_4BITS, context);<a name="line.683"></a> +<span class="sourceLineNo">684</span> context.ibitWorkArea = context.ibitWorkArea >> 4; // dump the extra 4 bits<a name="line.684"></a> +<span class="sourceLineNo">685</span> buffer[context.pos++] = (byte) ((context.ibitWorkArea) & MASK_8BITS);<a name="line.685"></a> +<span class="sourceLineNo">686</span> break;<a name="line.686"></a> +<span class="sourceLineNo">687</span> case 3 : // 18 bits = 8 + 8 + 2<a name="line.687"></a> +<span class="sourceLineNo">688</span> validateCharacter(MASK_2BITS, context);<a name="line.688"></a> +<span class="sourceLineNo">689</span> context.ibitWorkArea = context.ibitWorkArea >> 2; // dump 2 bits<a name="line.689"></a> +<span class="sourceLineNo">690</span> buffer[context.pos++] = (byte) ((context.ibitWorkArea >> 8) & MASK_8BITS);<a name="line.690"></a> +<span class="sourceLineNo">691</span> buffer[context.pos++] = (byte) ((context.ibitWorkArea) & MASK_8BITS);<a name="line.691"></a> +<span class="sourceLineNo">692</span> break;<a name="line.692"></a> +<span class="sourceLineNo">693</span> default:<a name="line.693"></a> +<span class="sourceLineNo">694</span> throw new IllegalStateException("Impossible modulus " + context.modulus);<a name="line.694"></a> +<span class="sourceLineNo">695</span> }<a name="line.695"></a> +<span class="sourceLineNo">696</span> }<a name="line.696"></a> +<span class="sourceLineNo">697</span> }<a name="line.697"></a> +<span class="sourceLineNo">698</span><a name="line.698"></a> +<span class="sourceLineNo">699</span> /**<a name="line.699"></a> +<span class="sourceLineNo">700</span> * <p><a name="line.700"></a> +<span class="sourceLineNo">701</span> * Encodes all of the provided data, starting at inPos, for inAvail bytes. Must be called at least twice: once with<a name="line.701"></a> +<span class="sourceLineNo">702</span> * the data to encode, and once with inAvail set to "-1" to alert encoder that EOF has been reached, to flush last<a name="line.702"></a> +<span class="sourceLineNo">703</span> * remaining bytes (if not multiple of 3).<a name="line.703"></a> +<span class="sourceLineNo">704</span> * </p><a name="line.704"></a> +<span class="sourceLineNo">705</span> * <p><b>Note: no padding is added when encoding using the URL-safe alphabet.</b></p><a name="line.705"></a> +<span class="sourceLineNo">706</span> * <p><a name="line.706"></a> +<span class="sourceLineNo">707</span> * Thanks to "commons" project in ws.apache.org for the bitwise operations, and general approach.<a name="line.707"></a> +<span class="sourceLineNo">708</span> * http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/util/<a name="line.708"></a> +<span class="sourceLineNo">709</span> * </p><a name="line.709"></a> +<span class="sourceLineNo">710</span> *<a name="line.710"></a> +<span class="sourceLineNo">711</span> * @param in<a name="line.711"></a> +<span class="sourceLineNo">712</span> * byte[] array of binary data to base64 encode.<a name="line.712"></a> +<span class="sourceLineNo">713</span> * @param inPos<a name="line.713"></a> +<span class="sourceLineNo">714</span> * Position to start reading data from.<a name="line.714"></a> +<span class="sourceLineNo">715</span> * @param inAvail<a name="line.715"></a> +<span class="sourceLineNo">716</span> * Amount of bytes available from input for encoding.<a name="line.716"></a> +<span class="sourceLineNo">717</span> * @param context<a name="line.717"></a> +<span class="sourceLineNo">718</span> * the context to be used<a name="line.718"></a> +<span class="sourceLineNo">719</span> */<a name="line.719"></a> +<span class="sourceLineNo">720</span> @Override<a name="line.720"></a> +<span class="sourceLineNo">721</span> void encode(final byte[] in, int inPos, final int inAvail, final Context context) {<a name="line.721"></a> +<span class="sourceLineNo">722</span> if (context.eof) {<a name="line.722"></a> +<span class="sourceLineNo">723</span> return;<a name="line.723"></a> +<span class="sourceLineNo">724</span> }<a name="line.724"></a> +<span class="sourceLineNo">725</span> // inAvail < 0 is how we're informed of EOF in the underlying data we're<a name="line.725"></a> +<span class="sourceLineNo">726</span> // encoding.<a name="line.726"></a> +<span class="sourceLineNo">727</span> if (inAvail < 0) {<a name="line.727"></a> +<span class="sourceLineNo">728</span> context.eof = true;<a name="line.728"></a> +<span class="sourceLineNo">729</span> if (0 == context.modulus && lineLength == 0) {<a name="line.729"></a> +<span class="sourceLineNo">730</span> return; // no leftovers to process and not using chunking<a name="line.730"></a> +<span class="sourceLineNo">731</span> }<a name="line.731"></a> +<span class="sourceLineNo">732</span> final byte[] buffer = ensureBufferSize(encodeSize, context);<a name="line.732"></a> +<span class="sourceLineNo">733</span> final int savedPos = context.pos;<a name="line.733"></a> +<span class="sourceLineNo">734</span> switch (context.modulus) { // 0-2<a name="line.734"></a> +<span class="sourceLineNo">735</span> case 0 : // nothing to do here<a name="line.735"></a> +<span class="sourceLineNo">736</span> break;<a name="line.736"></a> +<span class="sourceLineNo">737</span> case 1 : // 8 bits = 6 + 2<a name="line.737"></a> +<span class="sourceLineNo">738</span> // top 6 bits:<a name="line.738"></a> +<span class="sourceLineNo">739</span> buffer[context.pos++] = encodeTable[(context.ibitWorkArea >> 2) & MASK_6BITS];<a name="line.739"></a> +<span class="sourceLineNo">740</span> // remaining 2:<a name="line.740"></a> +<span class="sourceLineNo">741</span> buffer[context.pos++] = encodeTable[(context.ibitWorkArea << 4) & MASK_6BITS];<a name="line.741"></a> +<span class="sourceLineNo">742</span> // URL-SAFE skips the padding to further reduce size.<a name="line.742"></a> +<span class="sourceLineNo">743</span> if (encodeTable == STANDARD_ENCODE_TABLE) {<a name="line.743"></a> +<span class="sourceLineNo">744</span> buffer[context.pos++] = pad;<a name="line.744"></a> +<span class="sourceLineNo">745</span> buffer[context.pos++] = pad;<a name="line.745"></a> +<span class="sourceLineNo">746</span> }<a name="line.746"></a> +<span class="sourceLineNo">747</span> break;<a name="line.747"></a> +<span class="sourceLineNo">748</span><a name="line.748"></a> +<span class="sourceLineNo">749</span> case 2 : // 16 bits = 6 + 6 + 4<a name="line.749"></a> +<span class="sourceLineNo">750</span> buffer[context.pos++] = encodeTable[(context.ibitWorkArea >> 10) & MASK_6BITS];<a name="line.750"></a> +<span class="sourceLineNo">751</span> buffer[context.pos++] = encodeTable[(context.ibitWorkArea >> 4) & MASK_6BITS];<a name="line.751"></a> +<span class="sourceLineNo">752</span> buffer[context.pos++] = encodeTable[(context.ibitWorkArea << 2) & MASK_6BITS];<a name="line.752"></a> +<span class="sourceLineNo">753</span> // URL-SAFE skips the padding to further reduce size.<a name="line.753"></a> +<span class="sourceLineNo">754</span> if (encodeTable == STANDARD_ENCODE_TABLE) {<a name="line.754"></a> +<span class="sourceLineNo">755</span> buffer[context.pos++] = pad;<a name="line.755"></a> +<span class="sourceLineNo">756</span> }<a name="line.756"></a> +<span class="sourceLineNo">757</span> break;<a name="line.757"></a> +<span class="sourceLineNo">758</span> default:<a name="line.758"></a> +<span class="sourceLineNo">759</span> throw new IllegalStateException("Impossible modulus " + context.modulus);<a name="line.759"></a> +<span class="sourceLineNo">760</span> }<a name="line.760"></a> +<span class="sourceLineNo">761</span> context.currentLinePos += context.pos - savedPos; // keep track of current line position<a name="line.761"></a> +<span class="sourceLineNo">762</span> // if currentPos == 0 we are at the start of a line, so don't add CRLF<a name="line.762"></a> +<span class="sourceLineNo">763</span> if (lineLength > 0 && context.currentLinePos > 0) {<a name="line.763"></a> +<span class="sourceLineNo">764</span> System.arraycopy(lineSeparator, 0, buffer, context.pos, lineSeparator.length);<a name="line.764"></a> +<span class="sourceLineNo">765</span> context.pos += lineSeparator.length;<a name="line.765"></a> +<span class="sourceLineNo">766</span> }<a name="line.766"></a> +<span class="sourceLineNo">767</span> } else {<a name="line.767"></a> +<span class="sourceLineNo">768</span> for (int i = 0; i < inAvail; i++) {<a name="line.768"></a> +<span class="sourceLineNo">769</span> final byte[] buffer = ensureBufferSize(encodeSize, context);<a name="line.769"></a> +<span class="sourceLineNo">770</span> context.modulus = (context.modulus+1) % BYTES_PER_UNENCODED_BLOCK;<a name="line.770"></a> +<span class="sourceLineNo">771</span> int b = in[inPos++];<a name="line.771"></a> +<span class="sourceLineNo">772</span> if (b < 0) {<a name="line.772"></a> +<span class="sourceLineNo">773</span> b += 256;<a name="line.773"></a> +<span class="sourceLineNo">774</span> }<a name="line.774"></a> +<span class="sourceLineNo">775</span> context.ibitWorkArea = (context.ibitWorkArea << 8) + b; // BITS_PER_BYTE<a name="line.775"></a> +<span class="sourceLineNo">776</span> if (0 == context.modulus) { // 3 bytes = 24 bits = 4 * 6 bits to extract<a name="line.776"></a> +<span class="sourceLineNo">777</span> buffer[context.pos++] = encodeTable[(context.ibitWorkArea >> 18) & MASK_6BITS];<a name="line.777"></a> +<span class="sourceLineNo">778</span> buffer[context.pos++] = encodeTable[(context.ibitWorkArea >> 12) & MASK_6BITS];<a name="line.778"></a> +<span class="sourceLineNo">779</span> buffer[context.pos++] = encodeTable[(context.ibitWorkArea >> 6) & MASK_6BITS];<a name="line.779"></a> +<span class="sourceLineNo">780</span> buffer[context.pos++] = encodeTable[context.ibitWorkArea & MASK_6BITS];<a name="line.780"></a> +<span class="sourceLineNo">781</span> context.currentLinePos += BYTES_PER_ENCODED_BLOCK;<a name="line.781"></a> +<span class="sourceLineNo">782</span> if (lineLength > 0 && lineLength <= context.currentLinePos) {<a name="line.782"></a> +<span class="sourceLineNo">783</span> System.arraycopy(lineSeparator, 0, buffer, context.pos, lineSeparator.length);<a name="line.783"></a> +<span class="sourceLineNo">784</span> context.pos += lineSeparator.length;<a name="line.784"></a> +<span class="sourceLineNo">785</span> context.currentLinePos = 0;<a name="line.785"></a> +<span class="sourceLineNo">786</span> }<a name="line.786"></a> +<span class="sourceLineNo">787</span> }<a name="line.787"></a> +<span class="sourceLineNo">788</span> }<a name="line.788"></a> +<span class="sourceLineNo">789</span> }<a name="line.789"></a> +<span class="sourceLineNo">790</span> }<a name="line.790"></a> +<span class="sourceLineNo">791</span><a name="line.791"></a> +<span class="sourceLineNo">792</span> /**<a name="line.792"></a> +<span class="sourceLineNo">793</span> * Returns whether or not the {@code octet} is in the Base64 alphabet.<a name="line.793"></a> +<span class="sourceLineNo">794</span> *<a name="line.794"></a> +<span class="sourceLineNo">795</span> * @param octet<a name="line.795"></a> +<span class="sourceLineNo">796</span> * The value to test<a name="line.796"></a> +<span class="sourceLineNo">797</span> * @return {@code true} if the value is defined in the the Base64 alphabet {@code false} otherwise.<a name="line.797"></a> +<span class="sourceLineNo">798</span> */<a name="line.798"></a> +<span class="sourceLineNo">799</span> @Override<a name="line.799"></a> +<span class="sourceLineNo">800</span> protected boolean isInAlphabet(final byte octet) {<a name="line.800"></a> +<span class="sourceLineNo">801</span> return octet >= 0 && octet < decodeTable.length && decodeTable[octet] != -1;<a name="line.801"></a> +<span class="sourceLineNo">802</span> }<a name="line.802"></a> +<span class="sourceLineNo">803</span><a name="line.803"></a> +<span class="sourceLineNo">804</span> /**<a name="line.804"></a> +<span class="sourceLineNo">805</span> * Returns our current encode mode. True if we're URL-SAFE, false otherwise.<a name="line.805"></a> +<span class="sourceLineNo">806</span> *<a name="line.806"></a> +<span class="sourceLineNo">807</span> * @return true if we're in URL-SAFE mode, false otherwise.<a name="line.807"></a> +<span class="sourceLineNo">808</span> * @since 1.4<a name="line.808"></a> +<span class="sourceLineNo">809</span> */<a name="line.809"></a> +<span class="sourceLineNo">810</span> public boolean isUrlSafe() {<a name="line.810"></a> +<span class="sourceLineNo">811</span> return this.encodeTable == URL_SAFE_ENCODE_TABLE;<a name="line.811"></a> +<span class="sourceLineNo">812</span> }<a name="line.812"></a> +<span class="sourceLineNo">813</span><a name="line.813"></a> +<span class="sourceLineNo">814</span> /**<a name="line.814"></a> +<span class="sourceLineNo">815</span> * Validates whether decoding the final trailing character is possible in the context<a name="line.815"></a> +<span class="sourceLineNo">816</span> * of the set of possible base 64 values.<a name="line.816"></a> +<span class="sourceLineNo">817</span> *<a name="line.817"></a> +<span class="sourceLineNo">818</span> * <p>The character is valid if the lower bits within the provided mask are zero. This<a name="line.818"></a> +<span class="sourceLineNo">819</span> * is used to test the final trailing base-64 digit is zero in the bits that will be discarded.<a name="line.819"></a> +<span class="sourceLineNo">820</span> *<a name="line.820"></a> +<span class="sourceLineNo">821</span> * @param emptyBitsMask The mask of the lower bits that should be empty<a name="line.821"></a> +<span class="sourceLineNo">822</span> * @param context the context to be used<a name="line.822"></a> +<span class="sourceLineNo">823</span> *<a name="line.823"></a> +<span class="sourceLineNo">824</span> * @throws IllegalArgumentException if the bits being checked contain any non-zero value<a name="line.824"></a> +<span class="sourceLineNo">825</span> */<a name="line.825"></a> +<span class="sourceLineNo">826</span> private void validateCharacter(final int emptyBitsMask, final Context context) {<a name="line.826"></a> +<span class="sourceLineNo">827</span> if (isStrictDecoding() && (context.ibitWorkArea & emptyBitsMask) != 0) {<a name="line.827"></a> +<span class="sourceLineNo">828</span> throw new IllegalArgumentException(<a name="line.828"></a> +<span class="sourceLineNo">829</span> "Strict decoding: Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible encoding. " +<a name="line.829"></a> +<span class="sourceLineNo">830</span> "Expected the discarded bits from the character to be zero.");<a name="line.830"></a> +<span class="sourceLineNo">831</span> }<a name="line.831"></a> +<span class="sourceLineNo">832</span> }<a name="line.832"></a> +<span class="sourceLineNo">833</span><a name="line.833"></a> +<span class="sourceLineNo">834</span> /**<a name="line.834"></a> +<span class="sourceLineNo">835</span> * Validates whether decoding allows an entire final trailing character that cannot be<a name="line.835"></a> +<span class="sourceLineNo">836</span> * used for a complete byte.<a name="line.836"></a> +<span class="sourceLineNo">837</span> *<a name="line.837"></a> +<span class="sourceLineNo">838</span> * @throws IllegalArgumentException if strict decoding is enabled<a name="line.838"></a> +<span class="sourceLineNo">839</span> */<a name="line.839"></a> +<span class="sourceLineNo">840</span> private void validateTrailingCharacter() {<a name="line.840"></a> +<span class="sourceLineNo">841</span> if (isStrictDecoding()) {<a name="line.841"></a> +<span class="sourceLineNo">842</span> throw new IllegalArgumentException(<a name="line.842"></a> +<span class="sourceLineNo">843</span> "Strict decoding: Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible encoding. " +<a name="line.843"></a> +<span class="sourceLineNo">844</span> "Decoding requires at least two trailing 6-bit characters to create bytes.");<a name="line.844"></a> +<span class="sourceLineNo">845</span> }<a name="line.845"></a> +<span class="sourceLineNo">846</span> }<a name="line.846"></a> +<span class="sourceLineNo">847</span><a name="line.847"></a> +<span class="sourceLineNo">848</span>}<a name="line.848"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base64InputStream.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base64InputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..802574c9d62d319f9713049c61dc472fe78c1bdf --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base64InputStream.html @@ -0,0 +1,199 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.InputStream;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>import org.apache.commons.codec.CodecPolicy;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>/**<a name="line.24"></a> +<span class="sourceLineNo">025</span> * Provides Base64 encoding and decoding in a streaming fashion (unlimited size). When encoding the default lineLength<a name="line.25"></a> +<span class="sourceLineNo">026</span> * is 76 characters and the default lineEnding is CRLF, but these can be overridden by using the appropriate<a name="line.26"></a> +<span class="sourceLineNo">027</span> * constructor.<a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p><a name="line.28"></a> +<span class="sourceLineNo">029</span> * The default behavior of the Base64InputStream is to DECODE, whereas the default behavior of the Base64OutputStream<a name="line.29"></a> +<span class="sourceLineNo">030</span> * is to ENCODE, but this behavior can be overridden by using a different constructor.<a name="line.30"></a> +<span class="sourceLineNo">031</span> * </p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * <p><a name="line.32"></a> +<span class="sourceLineNo">033</span> * This class implements section <cite>6.8. Base64 Content-Transfer-Encoding</cite> from RFC 2045 <cite>Multipurpose<a name="line.33"></a> +<span class="sourceLineNo">034</span> * Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</cite> by Freed and Borenstein.<a name="line.34"></a> +<span class="sourceLineNo">035</span> * </p><a name="line.35"></a> +<span class="sourceLineNo">036</span> * <p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode<a name="line.37"></a> +<span class="sourceLineNo">038</span> * character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc).<a name="line.38"></a> +<span class="sourceLineNo">039</span> * </p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <p><a name="line.40"></a> +<span class="sourceLineNo">041</span> * You can set the decoding behavior when the input bytes contain leftover trailing bits that cannot be created by a valid<a name="line.41"></a> +<span class="sourceLineNo">042</span> * encoding. These can be bits that are unused from the final character or entire characters. The default mode is<a name="line.42"></a> +<span class="sourceLineNo">043</span> * lenient decoding.<a name="line.43"></a> +<span class="sourceLineNo">044</span> * </p><a name="line.44"></a> +<span class="sourceLineNo">045</span> * <ul><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible. The remainder are discarded.<a name="line.46"></a> +<span class="sourceLineNo">047</span> * <li>Strict: The decoding will raise an {@link IllegalArgumentException} if trailing bits are not part of a valid<a name="line.47"></a> +<span class="sourceLineNo">048</span> * encoding. Any unused bits from the final character must be zero. Impossible counts of entire final characters are not<a name="line.48"></a> +<span class="sourceLineNo">049</span> * allowed.<a name="line.49"></a> +<span class="sourceLineNo">050</span> * </ul><a name="line.50"></a> +<span class="sourceLineNo">051</span> * <p><a name="line.51"></a> +<span class="sourceLineNo">052</span> * When strict decoding is enabled it is expected that the decoded bytes will be re-encoded to a byte array that matches<a name="line.52"></a> +<span class="sourceLineNo">053</span> * the original, i.e. no changes occur on the final character. This requires that the input bytes use the same padding<a name="line.53"></a> +<span class="sourceLineNo">054</span> * and alphabet as the encoder.<a name="line.54"></a> +<span class="sourceLineNo">055</span> * </p><a name="line.55"></a> +<span class="sourceLineNo">056</span> * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a><a name="line.56"></a> +<span class="sourceLineNo">057</span> * @since 1.4<a name="line.57"></a> +<span class="sourceLineNo">058</span> */<a name="line.58"></a> +<span class="sourceLineNo">059</span>public class Base64InputStream extends BaseNCodecInputStream {<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> /**<a name="line.61"></a> +<span class="sourceLineNo">062</span> * Creates a Base64InputStream such that all data read is Base64-decoded from the original provided InputStream.<a name="line.62"></a> +<span class="sourceLineNo">063</span> *<a name="line.63"></a> +<span class="sourceLineNo">064</span> * @param in<a name="line.64"></a> +<span class="sourceLineNo">065</span> * InputStream to wrap.<a name="line.65"></a> +<span class="sourceLineNo">066</span> */<a name="line.66"></a> +<span class="sourceLineNo">067</span> public Base64InputStream(final InputStream in) {<a name="line.67"></a> +<span class="sourceLineNo">068</span> this(in, false);<a name="line.68"></a> +<span class="sourceLineNo">069</span> }<a name="line.69"></a> +<span class="sourceLineNo">070</span><a name="line.70"></a> +<span class="sourceLineNo">071</span> /**<a name="line.71"></a> +<span class="sourceLineNo">072</span> * Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original<a name="line.72"></a> +<span class="sourceLineNo">073</span> * provided InputStream.<a name="line.73"></a> +<span class="sourceLineNo">074</span> *<a name="line.74"></a> +<span class="sourceLineNo">075</span> * @param in<a name="line.75"></a> +<span class="sourceLineNo">076</span> * InputStream to wrap.<a name="line.76"></a> +<span class="sourceLineNo">077</span> * @param doEncode<a name="line.77"></a> +<span class="sourceLineNo">078</span> * true if we should encode all data read from us, false if we should decode.<a name="line.78"></a> +<span class="sourceLineNo">079</span> */<a name="line.79"></a> +<span class="sourceLineNo">080</span> public Base64InputStream(final InputStream in, final boolean doEncode) {<a name="line.80"></a> +<span class="sourceLineNo">081</span> super(in, new Base64(false), doEncode);<a name="line.81"></a> +<span class="sourceLineNo">082</span> }<a name="line.82"></a> +<span class="sourceLineNo">083</span><a name="line.83"></a> +<span class="sourceLineNo">084</span> /**<a name="line.84"></a> +<span class="sourceLineNo">085</span> * Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original<a name="line.85"></a> +<span class="sourceLineNo">086</span> * provided InputStream.<a name="line.86"></a> +<span class="sourceLineNo">087</span> *<a name="line.87"></a> +<span class="sourceLineNo">088</span> * @param in<a name="line.88"></a> +<span class="sourceLineNo">089</span> * InputStream to wrap.<a name="line.89"></a> +<span class="sourceLineNo">090</span> * @param doEncode<a name="line.90"></a> +<span class="sourceLineNo">091</span> * true if we should encode all data read from us, false if we should decode.<a name="line.91"></a> +<span class="sourceLineNo">092</span> * @param lineLength<a name="line.92"></a> +<span class="sourceLineNo">093</span> * If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to<a name="line.93"></a> +<span class="sourceLineNo">094</span> * nearest multiple of 4). If lineLength &lt;= 0, the encoded data is not divided into lines. If doEncode<a name="line.94"></a> +<span class="sourceLineNo">095</span> * is false, lineLength is ignored.<a name="line.95"></a> +<span class="sourceLineNo">096</span> * @param lineSeparator<a name="line.96"></a> +<span class="sourceLineNo">097</span> * If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n).<a name="line.97"></a> +<span class="sourceLineNo">098</span> * If lineLength &lt;= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.<a name="line.98"></a> +<span class="sourceLineNo">099</span> */<a name="line.99"></a> +<span class="sourceLineNo">100</span> public Base64InputStream(final InputStream in, final boolean doEncode,<a name="line.100"></a> +<span class="sourceLineNo">101</span> final int lineLength, final byte[] lineSeparator) {<a name="line.101"></a> +<span class="sourceLineNo">102</span> super(in, new Base64(lineLength, lineSeparator), doEncode);<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> /**<a name="line.105"></a> +<span class="sourceLineNo">106</span> * Creates a Base64InputStream such that all data read is either Base64-encoded or Base64-decoded from the original<a name="line.106"></a> +<span class="sourceLineNo">107</span> * provided InputStream.<a name="line.107"></a> +<span class="sourceLineNo">108</span> *<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @param in<a name="line.109"></a> +<span class="sourceLineNo">110</span> * InputStream to wrap.<a name="line.110"></a> +<span class="sourceLineNo">111</span> * @param doEncode<a name="line.111"></a> +<span class="sourceLineNo">112</span> * true if we should encode all data read from us, false if we should decode.<a name="line.112"></a> +<span class="sourceLineNo">113</span> * @param lineLength<a name="line.113"></a> +<span class="sourceLineNo">114</span> * If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to<a name="line.114"></a> +<span class="sourceLineNo">115</span> * nearest multiple of 4). If lineLength &lt;= 0, the encoded data is not divided into lines. If doEncode<a name="line.115"></a> +<span class="sourceLineNo">116</span> * is false, lineLength is ignored.<a name="line.116"></a> +<span class="sourceLineNo">117</span> * @param lineSeparator<a name="line.117"></a> +<span class="sourceLineNo">118</span> * If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n).<a name="line.118"></a> +<span class="sourceLineNo">119</span> * If lineLength &lt;= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.<a name="line.119"></a> +<span class="sourceLineNo">120</span> * @param decodingPolicy The decoding policy.<a name="line.120"></a> +<span class="sourceLineNo">121</span> * @since 1.15<a name="line.121"></a> +<span class="sourceLineNo">122</span> */<a name="line.122"></a> +<span class="sourceLineNo">123</span> public Base64InputStream(final InputStream in, final boolean doEncode,<a name="line.123"></a> +<span class="sourceLineNo">124</span> final int lineLength, final byte[] lineSeparator, final CodecPolicy decodingPolicy) {<a name="line.124"></a> +<span class="sourceLineNo">125</span> super(in, new Base64(lineLength, lineSeparator, false, decodingPolicy), doEncode);<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span>}<a name="line.127"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base64OutputStream.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base64OutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..542e9ce0f899089bd7fc0db56a62ab37ad20f01c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Base64OutputStream.html @@ -0,0 +1,203 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.OutputStream;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>import org.apache.commons.codec.CodecPolicy;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>/**<a name="line.24"></a> +<span class="sourceLineNo">025</span> * Provides Base64 encoding and decoding in a streaming fashion (unlimited size). When encoding the default lineLength<a name="line.25"></a> +<span class="sourceLineNo">026</span> * is 76 characters and the default lineEnding is CRLF, but these can be overridden by using the appropriate<a name="line.26"></a> +<span class="sourceLineNo">027</span> * constructor.<a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p><a name="line.28"></a> +<span class="sourceLineNo">029</span> * The default behavior of the Base64OutputStream is to ENCODE, whereas the default behavior of the Base64InputStream<a name="line.29"></a> +<span class="sourceLineNo">030</span> * is to DECODE. But this behavior can be overridden by using a different constructor.<a name="line.30"></a> +<span class="sourceLineNo">031</span> * </p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * <p><a name="line.32"></a> +<span class="sourceLineNo">033</span> * This class implements section <cite>6.8. Base64 Content-Transfer-Encoding</cite> from RFC 2045 <cite>Multipurpose<a name="line.33"></a> +<span class="sourceLineNo">034</span> * Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</cite> by Freed and Borenstein.<a name="line.34"></a> +<span class="sourceLineNo">035</span> * </p><a name="line.35"></a> +<span class="sourceLineNo">036</span> * <p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * Since this class operates directly on byte streams, and not character streams, it is hard-coded to only encode/decode<a name="line.37"></a> +<span class="sourceLineNo">038</span> * character encodings which are compatible with the lower 127 ASCII chart (ISO-8859-1, Windows-1252, UTF-8, etc).<a name="line.38"></a> +<span class="sourceLineNo">039</span> * </p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <p><a name="line.40"></a> +<span class="sourceLineNo">041</span> * <b>Note:</b> It is mandatory to close the stream after the last byte has been written to it, otherwise the<a name="line.41"></a> +<span class="sourceLineNo">042</span> * final padding will be omitted and the resulting data will be incomplete/inconsistent.<a name="line.42"></a> +<span class="sourceLineNo">043</span> * </p><a name="line.43"></a> +<span class="sourceLineNo">044</span> * <p><a name="line.44"></a> +<span class="sourceLineNo">045</span> * You can set the decoding behavior when the input bytes contain leftover trailing bits that cannot be created by a valid<a name="line.45"></a> +<span class="sourceLineNo">046</span> * encoding. These can be bits that are unused from the final character or entire characters. The default mode is<a name="line.46"></a> +<span class="sourceLineNo">047</span> * lenient decoding.<a name="line.47"></a> +<span class="sourceLineNo">048</span> * </p><a name="line.48"></a> +<span class="sourceLineNo">049</span> * <ul><a name="line.49"></a> +<span class="sourceLineNo">050</span> * <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible. The remainder are discarded.<a name="line.50"></a> +<span class="sourceLineNo">051</span> * <li>Strict: The decoding will raise an {@link IllegalArgumentException} if trailing bits are not part of a valid<a name="line.51"></a> +<span class="sourceLineNo">052</span> * encoding. Any unused bits from the final character must be zero. Impossible counts of entire final characters are not<a name="line.52"></a> +<span class="sourceLineNo">053</span> * allowed.<a name="line.53"></a> +<span class="sourceLineNo">054</span> * </ul><a name="line.54"></a> +<span class="sourceLineNo">055</span> * <p><a name="line.55"></a> +<span class="sourceLineNo">056</span> * When strict decoding is enabled it is expected that the decoded bytes will be re-encoded to a byte array that matches<a name="line.56"></a> +<span class="sourceLineNo">057</span> * the original, i.e. no changes occur on the final character. This requires that the input bytes use the same padding<a name="line.57"></a> +<span class="sourceLineNo">058</span> * and alphabet as the encoder.<a name="line.58"></a> +<span class="sourceLineNo">059</span> * </p><a name="line.59"></a> +<span class="sourceLineNo">060</span> * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a><a name="line.60"></a> +<span class="sourceLineNo">061</span> * @since 1.4<a name="line.61"></a> +<span class="sourceLineNo">062</span> */<a name="line.62"></a> +<span class="sourceLineNo">063</span>public class Base64OutputStream extends BaseNCodecOutputStream {<a name="line.63"></a> +<span class="sourceLineNo">064</span><a name="line.64"></a> +<span class="sourceLineNo">065</span> /**<a name="line.65"></a> +<span class="sourceLineNo">066</span> * Creates a Base64OutputStream such that all data written is Base64-encoded to the original provided OutputStream.<a name="line.66"></a> +<span class="sourceLineNo">067</span> *<a name="line.67"></a> +<span class="sourceLineNo">068</span> * @param out<a name="line.68"></a> +<span class="sourceLineNo">069</span> * OutputStream to wrap.<a name="line.69"></a> +<span class="sourceLineNo">070</span> */<a name="line.70"></a> +<span class="sourceLineNo">071</span> public Base64OutputStream(final OutputStream out) {<a name="line.71"></a> +<span class="sourceLineNo">072</span> this(out, true);<a name="line.72"></a> +<span class="sourceLineNo">073</span> }<a name="line.73"></a> +<span class="sourceLineNo">074</span><a name="line.74"></a> +<span class="sourceLineNo">075</span> /**<a name="line.75"></a> +<span class="sourceLineNo">076</span> * Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the<a name="line.76"></a> +<span class="sourceLineNo">077</span> * original provided OutputStream.<a name="line.77"></a> +<span class="sourceLineNo">078</span> *<a name="line.78"></a> +<span class="sourceLineNo">079</span> * @param out<a name="line.79"></a> +<span class="sourceLineNo">080</span> * OutputStream to wrap.<a name="line.80"></a> +<span class="sourceLineNo">081</span> * @param doEncode<a name="line.81"></a> +<span class="sourceLineNo">082</span> * true if we should encode all data written to us, false if we should decode.<a name="line.82"></a> +<span class="sourceLineNo">083</span> */<a name="line.83"></a> +<span class="sourceLineNo">084</span> public Base64OutputStream(final OutputStream out, final boolean doEncode) {<a name="line.84"></a> +<span class="sourceLineNo">085</span> super(out,new Base64(false), doEncode);<a name="line.85"></a> +<span class="sourceLineNo">086</span> }<a name="line.86"></a> +<span class="sourceLineNo">087</span><a name="line.87"></a> +<span class="sourceLineNo">088</span> /**<a name="line.88"></a> +<span class="sourceLineNo">089</span> * Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the<a name="line.89"></a> +<span class="sourceLineNo">090</span> * original provided OutputStream.<a name="line.90"></a> +<span class="sourceLineNo">091</span> *<a name="line.91"></a> +<span class="sourceLineNo">092</span> * @param out<a name="line.92"></a> +<span class="sourceLineNo">093</span> * OutputStream to wrap.<a name="line.93"></a> +<span class="sourceLineNo">094</span> * @param doEncode<a name="line.94"></a> +<span class="sourceLineNo">095</span> * true if we should encode all data written to us, false if we should decode.<a name="line.95"></a> +<span class="sourceLineNo">096</span> * @param lineLength<a name="line.96"></a> +<span class="sourceLineNo">097</span> * If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to<a name="line.97"></a> +<span class="sourceLineNo">098</span> * nearest multiple of 4). If lineLength &lt;= 0, the encoded data is not divided into lines. If doEncode<a name="line.98"></a> +<span class="sourceLineNo">099</span> * is false, lineLength is ignored.<a name="line.99"></a> +<span class="sourceLineNo">100</span> * @param lineSeparator<a name="line.100"></a> +<span class="sourceLineNo">101</span> * If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n).<a name="line.101"></a> +<span class="sourceLineNo">102</span> * If lineLength &lt;= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.<a name="line.102"></a> +<span class="sourceLineNo">103</span> */<a name="line.103"></a> +<span class="sourceLineNo">104</span> public Base64OutputStream(final OutputStream out, final boolean doEncode,<a name="line.104"></a> +<span class="sourceLineNo">105</span> final int lineLength, final byte[] lineSeparator) {<a name="line.105"></a> +<span class="sourceLineNo">106</span> super(out, new Base64(lineLength, lineSeparator), doEncode);<a name="line.106"></a> +<span class="sourceLineNo">107</span> }<a name="line.107"></a> +<span class="sourceLineNo">108</span><a name="line.108"></a> +<span class="sourceLineNo">109</span> /**<a name="line.109"></a> +<span class="sourceLineNo">110</span> * Creates a Base64OutputStream such that all data written is either Base64-encoded or Base64-decoded to the<a name="line.110"></a> +<span class="sourceLineNo">111</span> * original provided OutputStream.<a name="line.111"></a> +<span class="sourceLineNo">112</span> *<a name="line.112"></a> +<span class="sourceLineNo">113</span> * @param out<a name="line.113"></a> +<span class="sourceLineNo">114</span> * OutputStream to wrap.<a name="line.114"></a> +<span class="sourceLineNo">115</span> * @param doEncode<a name="line.115"></a> +<span class="sourceLineNo">116</span> * true if we should encode all data written to us, false if we should decode.<a name="line.116"></a> +<span class="sourceLineNo">117</span> * @param lineLength<a name="line.117"></a> +<span class="sourceLineNo">118</span> * If doEncode is true, each line of encoded data will contain lineLength characters (rounded down to<a name="line.118"></a> +<span class="sourceLineNo">119</span> * nearest multiple of 4). If lineLength &lt;= 0, the encoded data is not divided into lines. If doEncode<a name="line.119"></a> +<span class="sourceLineNo">120</span> * is false, lineLength is ignored.<a name="line.120"></a> +<span class="sourceLineNo">121</span> * @param lineSeparator<a name="line.121"></a> +<span class="sourceLineNo">122</span> * If doEncode is true, each line of encoded data will be terminated with this byte sequence (e.g. \r\n).<a name="line.122"></a> +<span class="sourceLineNo">123</span> * If lineLength &lt;= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.<a name="line.123"></a> +<span class="sourceLineNo">124</span> * @param decodingPolicy The decoding policy.<a name="line.124"></a> +<span class="sourceLineNo">125</span> * @since 1.15<a name="line.125"></a> +<span class="sourceLineNo">126</span> */<a name="line.126"></a> +<span class="sourceLineNo">127</span> public Base64OutputStream(final OutputStream out, final boolean doEncode,<a name="line.127"></a> +<span class="sourceLineNo">128</span> final int lineLength, final byte[] lineSeparator, final CodecPolicy decodingPolicy) {<a name="line.128"></a> +<span class="sourceLineNo">129</span> super(out, new Base64(lineLength, lineSeparator, false, decodingPolicy), doEncode);<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span>}<a name="line.131"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BaseNCodec.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BaseNCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..ec23ea210c13cea09ed4207a7c6742223736edcf --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BaseNCodec.html @@ -0,0 +1,796 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.Arrays;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.Objects;<a name="line.21"></a> +<span class="sourceLineNo">022</span><a name="line.22"></a> +<span class="sourceLineNo">023</span>import org.apache.commons.codec.BinaryDecoder;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import org.apache.commons.codec.BinaryEncoder;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import org.apache.commons.codec.CodecPolicy;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import org.apache.commons.codec.DecoderException;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import org.apache.commons.codec.EncoderException;<a name="line.27"></a> +<span class="sourceLineNo">028</span><a name="line.28"></a> +<span class="sourceLineNo">029</span>/**<a name="line.29"></a> +<span class="sourceLineNo">030</span> * Abstract superclass for Base-N encoders and decoders.<a name="line.30"></a> +<span class="sourceLineNo">031</span> *<a name="line.31"></a> +<span class="sourceLineNo">032</span> * <p><a name="line.32"></a> +<span class="sourceLineNo">033</span> * This class is thread-safe.<a name="line.33"></a> +<span class="sourceLineNo">034</span> * </p><a name="line.34"></a> +<span class="sourceLineNo">035</span> *<a name="line.35"></a> +<span class="sourceLineNo">036</span> * You can set the decoding behavior when the input bytes contain leftover trailing bits that cannot be created by a valid<a name="line.36"></a> +<span class="sourceLineNo">037</span> * encoding. These can be bits that are unused from the final character or entire characters. The default mode is<a name="line.37"></a> +<span class="sourceLineNo">038</span> * lenient decoding.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <ul><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible. The remainder are discarded.<a name="line.40"></a> +<span class="sourceLineNo">041</span> * <li>Strict: The decoding will raise an {@link IllegalArgumentException} if trailing bits are not part of a valid<a name="line.41"></a> +<span class="sourceLineNo">042</span> * encoding. Any unused bits from the final character must be zero. Impossible counts of entire final characters are not<a name="line.42"></a> +<span class="sourceLineNo">043</span> * allowed.<a name="line.43"></a> +<span class="sourceLineNo">044</span> * </ul><a name="line.44"></a> +<span class="sourceLineNo">045</span> * <p><a name="line.45"></a> +<span class="sourceLineNo">046</span> * When strict decoding is enabled it is expected that the decoded bytes will be re-encoded to a byte array that matches<a name="line.46"></a> +<span class="sourceLineNo">047</span> * the original, i.e. no changes occur on the final character. This requires that the input bytes use the same padding<a name="line.47"></a> +<span class="sourceLineNo">048</span> * and alphabet as the encoder.<a name="line.48"></a> +<span class="sourceLineNo">049</span> * </p><a name="line.49"></a> +<span class="sourceLineNo">050</span> */<a name="line.50"></a> +<span class="sourceLineNo">051</span>public abstract class BaseNCodec implements BinaryEncoder, BinaryDecoder {<a name="line.51"></a> +<span class="sourceLineNo">052</span><a name="line.52"></a> +<span class="sourceLineNo">053</span> /**<a name="line.53"></a> +<span class="sourceLineNo">054</span> * Holds thread context so classes can be thread-safe.<a name="line.54"></a> +<span class="sourceLineNo">055</span> *<a name="line.55"></a> +<span class="sourceLineNo">056</span> * This class is not itself thread-safe; each thread must allocate its own copy.<a name="line.56"></a> +<span class="sourceLineNo">057</span> *<a name="line.57"></a> +<span class="sourceLineNo">058</span> * @since 1.7<a name="line.58"></a> +<span class="sourceLineNo">059</span> */<a name="line.59"></a> +<span class="sourceLineNo">060</span> static class Context {<a name="line.60"></a> +<span class="sourceLineNo">061</span><a name="line.61"></a> +<span class="sourceLineNo">062</span> /**<a name="line.62"></a> +<span class="sourceLineNo">063</span> * Place holder for the bytes we're dealing with for our based logic.<a name="line.63"></a> +<span class="sourceLineNo">064</span> * Bitwise operations store and extract the encoding or decoding from this variable.<a name="line.64"></a> +<span class="sourceLineNo">065</span> */<a name="line.65"></a> +<span class="sourceLineNo">066</span> int ibitWorkArea;<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> /**<a name="line.68"></a> +<span class="sourceLineNo">069</span> * Place holder for the bytes we're dealing with for our based logic.<a name="line.69"></a> +<span class="sourceLineNo">070</span> * Bitwise operations store and extract the encoding or decoding from this variable.<a name="line.70"></a> +<span class="sourceLineNo">071</span> */<a name="line.71"></a> +<span class="sourceLineNo">072</span> long lbitWorkArea;<a name="line.72"></a> +<span class="sourceLineNo">073</span><a name="line.73"></a> +<span class="sourceLineNo">074</span> /**<a name="line.74"></a> +<span class="sourceLineNo">075</span> * Buffer for streaming.<a name="line.75"></a> +<span class="sourceLineNo">076</span> */<a name="line.76"></a> +<span class="sourceLineNo">077</span> byte[] buffer;<a name="line.77"></a> +<span class="sourceLineNo">078</span><a name="line.78"></a> +<span class="sourceLineNo">079</span> /**<a name="line.79"></a> +<span class="sourceLineNo">080</span> * Position where next character should be written in the buffer.<a name="line.80"></a> +<span class="sourceLineNo">081</span> */<a name="line.81"></a> +<span class="sourceLineNo">082</span> int pos;<a name="line.82"></a> +<span class="sourceLineNo">083</span><a name="line.83"></a> +<span class="sourceLineNo">084</span> /**<a name="line.84"></a> +<span class="sourceLineNo">085</span> * Position where next character should be read from the buffer.<a name="line.85"></a> +<span class="sourceLineNo">086</span> */<a name="line.86"></a> +<span class="sourceLineNo">087</span> int readPos;<a name="line.87"></a> +<span class="sourceLineNo">088</span><a name="line.88"></a> +<span class="sourceLineNo">089</span> /**<a name="line.89"></a> +<span class="sourceLineNo">090</span> * Boolean flag to indicate the EOF has been reached. Once EOF has been reached, this object becomes useless,<a name="line.90"></a> +<span class="sourceLineNo">091</span> * and must be thrown away.<a name="line.91"></a> +<span class="sourceLineNo">092</span> */<a name="line.92"></a> +<span class="sourceLineNo">093</span> boolean eof;<a name="line.93"></a> +<span class="sourceLineNo">094</span><a name="line.94"></a> +<span class="sourceLineNo">095</span> /**<a name="line.95"></a> +<span class="sourceLineNo">096</span> * Variable tracks how many characters have been written to the current line. Only used when encoding. We use<a name="line.96"></a> +<span class="sourceLineNo">097</span> * it to make sure each encoded line never goes beyond lineLength (if lineLength &gt; 0).<a name="line.97"></a> +<span class="sourceLineNo">098</span> */<a name="line.98"></a> +<span class="sourceLineNo">099</span> int currentLinePos;<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> /**<a name="line.101"></a> +<span class="sourceLineNo">102</span> * Writes to the buffer only occur after every 3/5 reads when encoding, and every 4/8 reads when decoding. This<a name="line.102"></a> +<span class="sourceLineNo">103</span> * variable helps track that.<a name="line.103"></a> +<span class="sourceLineNo">104</span> */<a name="line.104"></a> +<span class="sourceLineNo">105</span> int modulus;<a name="line.105"></a> +<span class="sourceLineNo">106</span><a name="line.106"></a> +<span class="sourceLineNo">107</span> Context() {<a name="line.107"></a> +<span class="sourceLineNo">108</span> }<a name="line.108"></a> +<span class="sourceLineNo">109</span><a name="line.109"></a> +<span class="sourceLineNo">110</span> /**<a name="line.110"></a> +<span class="sourceLineNo">111</span> * Returns a String useful for debugging (especially within a debugger.)<a name="line.111"></a> +<span class="sourceLineNo">112</span> *<a name="line.112"></a> +<span class="sourceLineNo">113</span> * @return a String useful for debugging.<a name="line.113"></a> +<span class="sourceLineNo">114</span> */<a name="line.114"></a> +<span class="sourceLineNo">115</span> @SuppressWarnings("boxing") // OK to ignore boxing here<a name="line.115"></a> +<span class="sourceLineNo">116</span> @Override<a name="line.116"></a> +<span class="sourceLineNo">117</span> public String toString() {<a name="line.117"></a> +<span class="sourceLineNo">118</span> return String.format("%s[buffer=%s, currentLinePos=%s, eof=%s, ibitWorkArea=%s, lbitWorkArea=%s, " +<a name="line.118"></a> +<span class="sourceLineNo">119</span> "modulus=%s, pos=%s, readPos=%s]", this.getClass().getSimpleName(), Arrays.toString(buffer),<a name="line.119"></a> +<span class="sourceLineNo">120</span> currentLinePos, eof, ibitWorkArea, lbitWorkArea, modulus, pos, readPos);<a name="line.120"></a> +<span class="sourceLineNo">121</span> }<a name="line.121"></a> +<span class="sourceLineNo">122</span> }<a name="line.122"></a> +<span class="sourceLineNo">123</span><a name="line.123"></a> +<span class="sourceLineNo">124</span> /**<a name="line.124"></a> +<span class="sourceLineNo">125</span> * EOF<a name="line.125"></a> +<span class="sourceLineNo">126</span> *<a name="line.126"></a> +<span class="sourceLineNo">127</span> * @since 1.7<a name="line.127"></a> +<span class="sourceLineNo">128</span> */<a name="line.128"></a> +<span class="sourceLineNo">129</span> static final int EOF = -1;<a name="line.129"></a> +<span class="sourceLineNo">130</span><a name="line.130"></a> +<span class="sourceLineNo">131</span> /**<a name="line.131"></a> +<span class="sourceLineNo">132</span> * MIME chunk size per RFC 2045 section 6.8.<a name="line.132"></a> +<span class="sourceLineNo">133</span> *<a name="line.133"></a> +<span class="sourceLineNo">134</span> * <p><a name="line.134"></a> +<span class="sourceLineNo">135</span> * The {@value} character limit does not count the trailing CRLF, but counts all other characters, including any<a name="line.135"></a> +<span class="sourceLineNo">136</span> * equal signs.<a name="line.136"></a> +<span class="sourceLineNo">137</span> * </p><a name="line.137"></a> +<span class="sourceLineNo">138</span> *<a name="line.138"></a> +<span class="sourceLineNo">139</span> * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 section 6.8</a><a name="line.139"></a> +<span class="sourceLineNo">140</span> */<a name="line.140"></a> +<span class="sourceLineNo">141</span> public static final int MIME_CHUNK_SIZE = 76;<a name="line.141"></a> +<span class="sourceLineNo">142</span><a name="line.142"></a> +<span class="sourceLineNo">143</span> /**<a name="line.143"></a> +<span class="sourceLineNo">144</span> * PEM chunk size per RFC 1421 section 4.3.2.4.<a name="line.144"></a> +<span class="sourceLineNo">145</span> *<a name="line.145"></a> +<span class="sourceLineNo">146</span> * <p><a name="line.146"></a> +<span class="sourceLineNo">147</span> * The {@value} character limit does not count the trailing CRLF, but counts all other characters, including any<a name="line.147"></a> +<span class="sourceLineNo">148</span> * equal signs.<a name="line.148"></a> +<span class="sourceLineNo">149</span> * </p><a name="line.149"></a> +<span class="sourceLineNo">150</span> *<a name="line.150"></a> +<span class="sourceLineNo">151</span> * @see <a href="http://tools.ietf.org/html/rfc1421">RFC 1421 section 4.3.2.4</a><a name="line.151"></a> +<span class="sourceLineNo">152</span> */<a name="line.152"></a> +<span class="sourceLineNo">153</span> public static final int PEM_CHUNK_SIZE = 64;<a name="line.153"></a> +<span class="sourceLineNo">154</span><a name="line.154"></a> +<span class="sourceLineNo">155</span> private static final int DEFAULT_BUFFER_RESIZE_FACTOR = 2;<a name="line.155"></a> +<span class="sourceLineNo">156</span><a name="line.156"></a> +<span class="sourceLineNo">157</span> /**<a name="line.157"></a> +<span class="sourceLineNo">158</span> * Defines the default buffer size - currently {@value}<a name="line.158"></a> +<span class="sourceLineNo">159</span> * - must be large enough for at least one encoded block+separator<a name="line.159"></a> +<span class="sourceLineNo">160</span> */<a name="line.160"></a> +<span class="sourceLineNo">161</span> private static final int DEFAULT_BUFFER_SIZE = 8192;<a name="line.161"></a> +<span class="sourceLineNo">162</span><a name="line.162"></a> +<span class="sourceLineNo">163</span> /**<a name="line.163"></a> +<span class="sourceLineNo">164</span> * The maximum size buffer to allocate.<a name="line.164"></a> +<span class="sourceLineNo">165</span> *<a name="line.165"></a> +<span class="sourceLineNo">166</span> * <p>This is set to the same size used in the JDK {@code java.util.ArrayList}:</p><a name="line.166"></a> +<span class="sourceLineNo">167</span> * <blockquote><a name="line.167"></a> +<span class="sourceLineNo">168</span> * Some VMs reserve some header words in an array.<a name="line.168"></a> +<span class="sourceLineNo">169</span> * Attempts to allocate larger arrays may result in<a name="line.169"></a> +<span class="sourceLineNo">170</span> * OutOfMemoryError: Requested array size exceeds VM limit.<a name="line.170"></a> +<span class="sourceLineNo">171</span> * </blockquote><a name="line.171"></a> +<span class="sourceLineNo">172</span> */<a name="line.172"></a> +<span class="sourceLineNo">173</span> private static final int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8;<a name="line.173"></a> +<span class="sourceLineNo">174</span><a name="line.174"></a> +<span class="sourceLineNo">175</span> /** Mask used to extract 8 bits, used in decoding bytes */<a name="line.175"></a> +<span class="sourceLineNo">176</span> protected static final int MASK_8BITS = 0xff;<a name="line.176"></a> +<span class="sourceLineNo">177</span><a name="line.177"></a> +<span class="sourceLineNo">178</span> /**<a name="line.178"></a> +<span class="sourceLineNo">179</span> * Byte used to pad output.<a name="line.179"></a> +<span class="sourceLineNo">180</span> */<a name="line.180"></a> +<span class="sourceLineNo">181</span> protected static final byte PAD_DEFAULT = '='; // Allow static access to default<a name="line.181"></a> +<span class="sourceLineNo">182</span><a name="line.182"></a> +<span class="sourceLineNo">183</span> /**<a name="line.183"></a> +<span class="sourceLineNo">184</span> * The default decoding policy.<a name="line.184"></a> +<span class="sourceLineNo">185</span> * @since 1.15<a name="line.185"></a> +<span class="sourceLineNo">186</span> */<a name="line.186"></a> +<span class="sourceLineNo">187</span> protected static final CodecPolicy DECODING_POLICY_DEFAULT = CodecPolicy.LENIENT;<a name="line.187"></a> +<span class="sourceLineNo">188</span><a name="line.188"></a> +<span class="sourceLineNo">189</span> /**<a name="line.189"></a> +<span class="sourceLineNo">190</span> * Chunk separator per RFC 2045 section 2.1.<a name="line.190"></a> +<span class="sourceLineNo">191</span> *<a name="line.191"></a> +<span class="sourceLineNo">192</span> * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 section 2.1</a><a name="line.192"></a> +<span class="sourceLineNo">193</span> */<a name="line.193"></a> +<span class="sourceLineNo">194</span> static final byte[] CHUNK_SEPARATOR = {'\r', '\n'};<a name="line.194"></a> +<span class="sourceLineNo">195</span><a name="line.195"></a> +<span class="sourceLineNo">196</span> /**<a name="line.196"></a> +<span class="sourceLineNo">197</span> * Compares two {@code int} values numerically treating the values<a name="line.197"></a> +<span class="sourceLineNo">198</span> * as unsigned. Taken from JDK 1.8.<a name="line.198"></a> +<span class="sourceLineNo">199</span> *<a name="line.199"></a> +<span class="sourceLineNo">200</span> * <p>TODO: Replace with JDK 1.8 Integer::compareUnsigned(int, int).</p><a name="line.200"></a> +<span class="sourceLineNo">201</span> *<a name="line.201"></a> +<span class="sourceLineNo">202</span> * @param x the first {@code int} to compare<a name="line.202"></a> +<span class="sourceLineNo">203</span> * @param y the second {@code int} to compare<a name="line.203"></a> +<span class="sourceLineNo">204</span> * @return the value {@code 0} if {@code x == y}; a value less<a name="line.204"></a> +<span class="sourceLineNo">205</span> * than {@code 0} if {@code x < y} as unsigned values; and<a name="line.205"></a> +<span class="sourceLineNo">206</span> * a value greater than {@code 0} if {@code x > y} as<a name="line.206"></a> +<span class="sourceLineNo">207</span> * unsigned values<a name="line.207"></a> +<span class="sourceLineNo">208</span> */<a name="line.208"></a> +<span class="sourceLineNo">209</span> private static int compareUnsigned(final int x, final int y) {<a name="line.209"></a> +<span class="sourceLineNo">210</span> return Integer.compare(x + Integer.MIN_VALUE, y + Integer.MIN_VALUE);<a name="line.210"></a> +<span class="sourceLineNo">211</span> }<a name="line.211"></a> +<span class="sourceLineNo">212</span><a name="line.212"></a> +<span class="sourceLineNo">213</span> /**<a name="line.213"></a> +<span class="sourceLineNo">214</span> * Create a positive capacity at least as large the minimum required capacity.<a name="line.214"></a> +<span class="sourceLineNo">215</span> * If the minimum capacity is negative then this throws an OutOfMemoryError as no array<a name="line.215"></a> +<span class="sourceLineNo">216</span> * can be allocated.<a name="line.216"></a> +<span class="sourceLineNo">217</span> *<a name="line.217"></a> +<span class="sourceLineNo">218</span> * @param minCapacity the minimum capacity<a name="line.218"></a> +<span class="sourceLineNo">219</span> * @return the capacity<a name="line.219"></a> +<span class="sourceLineNo">220</span> * @throws OutOfMemoryError if the {@code minCapacity} is negative<a name="line.220"></a> +<span class="sourceLineNo">221</span> */<a name="line.221"></a> +<span class="sourceLineNo">222</span> private static int createPositiveCapacity(final int minCapacity) {<a name="line.222"></a> +<span class="sourceLineNo">223</span> if (minCapacity < 0) {<a name="line.223"></a> +<span class="sourceLineNo">224</span> // overflow<a name="line.224"></a> +<span class="sourceLineNo">225</span> throw new OutOfMemoryError("Unable to allocate array size: " + (minCapacity & 0xffffffffL));<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span> // This is called when we require buffer expansion to a very big array.<a name="line.227"></a> +<span class="sourceLineNo">228</span> // Use the conservative maximum buffer size if possible, otherwise the biggest required.<a name="line.228"></a> +<span class="sourceLineNo">229</span> //<a name="line.229"></a> +<span class="sourceLineNo">230</span> // Note: In this situation JDK 1.8 java.util.ArrayList returns Integer.MAX_VALUE.<a name="line.230"></a> +<span class="sourceLineNo">231</span> // This excludes some VMs that can exceed MAX_BUFFER_SIZE but not allocate a full<a name="line.231"></a> +<span class="sourceLineNo">232</span> // Integer.MAX_VALUE length array.<a name="line.232"></a> +<span class="sourceLineNo">233</span> // The result is that we may have to allocate an array of this size more than once if<a name="line.233"></a> +<span class="sourceLineNo">234</span> // the capacity must be expanded again.<a name="line.234"></a> +<span class="sourceLineNo">235</span> return (minCapacity > MAX_BUFFER_SIZE) ?<a name="line.235"></a> +<span class="sourceLineNo">236</span> minCapacity :<a name="line.236"></a> +<span class="sourceLineNo">237</span> MAX_BUFFER_SIZE;<a name="line.237"></a> +<span class="sourceLineNo">238</span> }<a name="line.238"></a> +<span class="sourceLineNo">239</span><a name="line.239"></a> +<span class="sourceLineNo">240</span> /**<a name="line.240"></a> +<span class="sourceLineNo">241</span> * Gets a copy of the chunk separator per RFC 2045 section 2.1.<a name="line.241"></a> +<span class="sourceLineNo">242</span> *<a name="line.242"></a> +<span class="sourceLineNo">243</span> * @return the chunk separator<a name="line.243"></a> +<span class="sourceLineNo">244</span> * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 section 2.1</a><a name="line.244"></a> +<span class="sourceLineNo">245</span> * @since 1.15<a name="line.245"></a> +<span class="sourceLineNo">246</span> */<a name="line.246"></a> +<span class="sourceLineNo">247</span> public static byte[] getChunkSeparator() {<a name="line.247"></a> +<span class="sourceLineNo">248</span> return CHUNK_SEPARATOR.clone();<a name="line.248"></a> +<span class="sourceLineNo">249</span> }<a name="line.249"></a> +<span class="sourceLineNo">250</span><a name="line.250"></a> +<span class="sourceLineNo">251</span> /**<a name="line.251"></a> +<span class="sourceLineNo">252</span> * Checks if a byte value is whitespace or not.<a name="line.252"></a> +<span class="sourceLineNo">253</span> * Whitespace is taken to mean: space, tab, CR, LF<a name="line.253"></a> +<span class="sourceLineNo">254</span> * @param byteToCheck<a name="line.254"></a> +<span class="sourceLineNo">255</span> * the byte to check<a name="line.255"></a> +<span class="sourceLineNo">256</span> * @return true if byte is whitespace, false otherwise<a name="line.256"></a> +<span class="sourceLineNo">257</span> */<a name="line.257"></a> +<span class="sourceLineNo">258</span> protected static boolean isWhiteSpace(final byte byteToCheck) {<a name="line.258"></a> +<span class="sourceLineNo">259</span> switch (byteToCheck) {<a name="line.259"></a> +<span class="sourceLineNo">260</span> case ' ' :<a name="line.260"></a> +<span class="sourceLineNo">261</span> case '\n' :<a name="line.261"></a> +<span class="sourceLineNo">262</span> case '\r' :<a name="line.262"></a> +<span class="sourceLineNo">263</span> case '\t' :<a name="line.263"></a> +<span class="sourceLineNo">264</span> return true;<a name="line.264"></a> +<span class="sourceLineNo">265</span> default :<a name="line.265"></a> +<span class="sourceLineNo">266</span> return false;<a name="line.266"></a> +<span class="sourceLineNo">267</span> }<a name="line.267"></a> +<span class="sourceLineNo">268</span> }<a name="line.268"></a> +<span class="sourceLineNo">269</span><a name="line.269"></a> +<span class="sourceLineNo">270</span> /**<a name="line.270"></a> +<span class="sourceLineNo">271</span> * Increases our buffer by the {@link #DEFAULT_BUFFER_RESIZE_FACTOR}.<a name="line.271"></a> +<span class="sourceLineNo">272</span> * @param context the context to be used<a name="line.272"></a> +<span class="sourceLineNo">273</span> * @param minCapacity the minimum required capacity<a name="line.273"></a> +<span class="sourceLineNo">274</span> * @return the resized byte[] buffer<a name="line.274"></a> +<span class="sourceLineNo">275</span> * @throws OutOfMemoryError if the {@code minCapacity} is negative<a name="line.275"></a> +<span class="sourceLineNo">276</span> */<a name="line.276"></a> +<span class="sourceLineNo">277</span> private static byte[] resizeBuffer(final Context context, final int minCapacity) {<a name="line.277"></a> +<span class="sourceLineNo">278</span> // Overflow-conscious code treats the min and new capacity as unsigned.<a name="line.278"></a> +<span class="sourceLineNo">279</span> final int oldCapacity = context.buffer.length;<a name="line.279"></a> +<span class="sourceLineNo">280</span> int newCapacity = oldCapacity * DEFAULT_BUFFER_RESIZE_FACTOR;<a name="line.280"></a> +<span class="sourceLineNo">281</span> if (compareUnsigned(newCapacity, minCapacity) < 0) {<a name="line.281"></a> +<span class="sourceLineNo">282</span> newCapacity = minCapacity;<a name="line.282"></a> +<span class="sourceLineNo">283</span> }<a name="line.283"></a> +<span class="sourceLineNo">284</span> if (compareUnsigned(newCapacity, MAX_BUFFER_SIZE) > 0) {<a name="line.284"></a> +<span class="sourceLineNo">285</span> newCapacity = createPositiveCapacity(minCapacity);<a name="line.285"></a> +<span class="sourceLineNo">286</span> }<a name="line.286"></a> +<span class="sourceLineNo">287</span><a name="line.287"></a> +<span class="sourceLineNo">288</span> final byte[] b = new byte[newCapacity];<a name="line.288"></a> +<span class="sourceLineNo">289</span> System.arraycopy(context.buffer, 0, b, 0, context.buffer.length);<a name="line.289"></a> +<span class="sourceLineNo">290</span> context.buffer = b;<a name="line.290"></a> +<span class="sourceLineNo">291</span> return b;<a name="line.291"></a> +<span class="sourceLineNo">292</span> }<a name="line.292"></a> +<span class="sourceLineNo">293</span><a name="line.293"></a> +<span class="sourceLineNo">294</span> /**<a name="line.294"></a> +<span class="sourceLineNo">295</span> * @deprecated Use {@link #pad}. Will be removed in 2.0.<a name="line.295"></a> +<span class="sourceLineNo">296</span> */<a name="line.296"></a> +<span class="sourceLineNo">297</span> @Deprecated<a name="line.297"></a> +<span class="sourceLineNo">298</span> protected final byte PAD = PAD_DEFAULT; // instance variable just in case it needs to vary later<a name="line.298"></a> +<span class="sourceLineNo">299</span><a name="line.299"></a> +<span class="sourceLineNo">300</span> protected final byte pad; // instance variable just in case it needs to vary later<a name="line.300"></a> +<span class="sourceLineNo">301</span><a name="line.301"></a> +<span class="sourceLineNo">302</span> /** Number of bytes in each full block of unencoded data, e.g. 4 for Base64 and 5 for Base32 */<a name="line.302"></a> +<span class="sourceLineNo">303</span> private final int unencodedBlockSize;<a name="line.303"></a> +<span class="sourceLineNo">304</span><a name="line.304"></a> +<span class="sourceLineNo">305</span> /** Number of bytes in each full block of encoded data, e.g. 3 for Base64 and 8 for Base32 */<a name="line.305"></a> +<span class="sourceLineNo">306</span> private final int encodedBlockSize;<a name="line.306"></a> +<span class="sourceLineNo">307</span><a name="line.307"></a> +<span class="sourceLineNo">308</span> /**<a name="line.308"></a> +<span class="sourceLineNo">309</span> * Chunksize for encoding. Not used when decoding.<a name="line.309"></a> +<span class="sourceLineNo">310</span> * A value of zero or less implies no chunking of the encoded data.<a name="line.310"></a> +<span class="sourceLineNo">311</span> * Rounded down to nearest multiple of encodedBlockSize.<a name="line.311"></a> +<span class="sourceLineNo">312</span> */<a name="line.312"></a> +<span class="sourceLineNo">313</span> protected final int lineLength;<a name="line.313"></a> +<span class="sourceLineNo">314</span><a name="line.314"></a> +<span class="sourceLineNo">315</span> /**<a name="line.315"></a> +<span class="sourceLineNo">316</span> * Size of chunk separator. Not used unless {@link #lineLength} &gt; 0.<a name="line.316"></a> +<span class="sourceLineNo">317</span> */<a name="line.317"></a> +<span class="sourceLineNo">318</span> private final int chunkSeparatorLength;<a name="line.318"></a> +<span class="sourceLineNo">319</span><a name="line.319"></a> +<span class="sourceLineNo">320</span> /**<a name="line.320"></a> +<span class="sourceLineNo">321</span> * Defines the decoding behavior when the input bytes contain leftover trailing bits that<a name="line.321"></a> +<span class="sourceLineNo">322</span> * cannot be created by a valid encoding. These can be bits that are unused from the final<a name="line.322"></a> +<span class="sourceLineNo">323</span> * character or entire characters. The default mode is lenient decoding. Set this to<a name="line.323"></a> +<span class="sourceLineNo">324</span> * {@code true} to enable strict decoding.<a name="line.324"></a> +<span class="sourceLineNo">325</span> * <ul><a name="line.325"></a> +<span class="sourceLineNo">326</span> * <li>Lenient: Any trailing bits are composed into 8-bit bytes where possible.<a name="line.326"></a> +<span class="sourceLineNo">327</span> * The remainder are discarded.<a name="line.327"></a> +<span class="sourceLineNo">328</span> * <li>Strict: The decoding will raise an {@link IllegalArgumentException} if trailing bits<a name="line.328"></a> +<span class="sourceLineNo">329</span> * are not part of a valid encoding. Any unused bits from the final character must<a name="line.329"></a> +<span class="sourceLineNo">330</span> * be zero. Impossible counts of entire final characters are not allowed.<a name="line.330"></a> +<span class="sourceLineNo">331</span> * </ul><a name="line.331"></a> +<span class="sourceLineNo">332</span> *<a name="line.332"></a> +<span class="sourceLineNo">333</span> * <p>When strict decoding is enabled it is expected that the decoded bytes will be re-encoded<a name="line.333"></a> +<span class="sourceLineNo">334</span> * to a byte array that matches the original, i.e. no changes occur on the final<a name="line.334"></a> +<span class="sourceLineNo">335</span> * character. This requires that the input bytes use the same padding and alphabet<a name="line.335"></a> +<span class="sourceLineNo">336</span> * as the encoder.<a name="line.336"></a> +<span class="sourceLineNo">337</span> */<a name="line.337"></a> +<span class="sourceLineNo">338</span> private final CodecPolicy decodingPolicy;<a name="line.338"></a> +<span class="sourceLineNo">339</span><a name="line.339"></a> +<span class="sourceLineNo">340</span> /**<a name="line.340"></a> +<span class="sourceLineNo">341</span> * Note {@code lineLength} is rounded down to the nearest multiple of the encoded block size.<a name="line.341"></a> +<span class="sourceLineNo">342</span> * If {@code chunkSeparatorLength} is zero, then chunking is disabled.<a name="line.342"></a> +<span class="sourceLineNo">343</span> * @param unencodedBlockSize the size of an unencoded block (e.g. Base64 = 3)<a name="line.343"></a> +<span class="sourceLineNo">344</span> * @param encodedBlockSize the size of an encoded block (e.g. Base64 = 4)<a name="line.344"></a> +<span class="sourceLineNo">345</span> * @param lineLength if &gt; 0, use chunking with a length {@code lineLength}<a name="line.345"></a> +<span class="sourceLineNo">346</span> * @param chunkSeparatorLength the chunk separator length, if relevant<a name="line.346"></a> +<span class="sourceLineNo">347</span> */<a name="line.347"></a> +<span class="sourceLineNo">348</span> protected BaseNCodec(final int unencodedBlockSize, final int encodedBlockSize,<a name="line.348"></a> +<span class="sourceLineNo">349</span> final int lineLength, final int chunkSeparatorLength) {<a name="line.349"></a> +<span class="sourceLineNo">350</span> this(unencodedBlockSize, encodedBlockSize, lineLength, chunkSeparatorLength, PAD_DEFAULT);<a name="line.350"></a> +<span class="sourceLineNo">351</span> }<a name="line.351"></a> +<span class="sourceLineNo">352</span><a name="line.352"></a> +<span class="sourceLineNo">353</span> /**<a name="line.353"></a> +<span class="sourceLineNo">354</span> * Note {@code lineLength} is rounded down to the nearest multiple of the encoded block size.<a name="line.354"></a> +<span class="sourceLineNo">355</span> * If {@code chunkSeparatorLength} is zero, then chunking is disabled.<a name="line.355"></a> +<span class="sourceLineNo">356</span> * @param unencodedBlockSize the size of an unencoded block (e.g. Base64 = 3)<a name="line.356"></a> +<span class="sourceLineNo">357</span> * @param encodedBlockSize the size of an encoded block (e.g. Base64 = 4)<a name="line.357"></a> +<span class="sourceLineNo">358</span> * @param lineLength if &gt; 0, use chunking with a length {@code lineLength}<a name="line.358"></a> +<span class="sourceLineNo">359</span> * @param chunkSeparatorLength the chunk separator length, if relevant<a name="line.359"></a> +<span class="sourceLineNo">360</span> * @param pad byte used as padding byte.<a name="line.360"></a> +<span class="sourceLineNo">361</span> */<a name="line.361"></a> +<span class="sourceLineNo">362</span> protected BaseNCodec(final int unencodedBlockSize, final int encodedBlockSize,<a name="line.362"></a> +<span class="sourceLineNo">363</span> final int lineLength, final int chunkSeparatorLength, final byte pad) {<a name="line.363"></a> +<span class="sourceLineNo">364</span> this(unencodedBlockSize, encodedBlockSize, lineLength, chunkSeparatorLength, pad, DECODING_POLICY_DEFAULT);<a name="line.364"></a> +<span class="sourceLineNo">365</span> }<a name="line.365"></a> +<span class="sourceLineNo">366</span><a name="line.366"></a> +<span class="sourceLineNo">367</span> /**<a name="line.367"></a> +<span class="sourceLineNo">368</span> * Note {@code lineLength} is rounded down to the nearest multiple of the encoded block size.<a name="line.368"></a> +<span class="sourceLineNo">369</span> * If {@code chunkSeparatorLength} is zero, then chunking is disabled.<a name="line.369"></a> +<span class="sourceLineNo">370</span> * @param unencodedBlockSize the size of an unencoded block (e.g. Base64 = 3)<a name="line.370"></a> +<span class="sourceLineNo">371</span> * @param encodedBlockSize the size of an encoded block (e.g. Base64 = 4)<a name="line.371"></a> +<span class="sourceLineNo">372</span> * @param lineLength if &gt; 0, use chunking with a length {@code lineLength}<a name="line.372"></a> +<span class="sourceLineNo">373</span> * @param chunkSeparatorLength the chunk separator length, if relevant<a name="line.373"></a> +<span class="sourceLineNo">374</span> * @param pad byte used as padding byte.<a name="line.374"></a> +<span class="sourceLineNo">375</span> * @param decodingPolicy Decoding policy.<a name="line.375"></a> +<span class="sourceLineNo">376</span> * @since 1.15<a name="line.376"></a> +<span class="sourceLineNo">377</span> */<a name="line.377"></a> +<span class="sourceLineNo">378</span> protected BaseNCodec(final int unencodedBlockSize, final int encodedBlockSize,<a name="line.378"></a> +<span class="sourceLineNo">379</span> final int lineLength, final int chunkSeparatorLength, final byte pad, final CodecPolicy decodingPolicy) {<a name="line.379"></a> +<span class="sourceLineNo">380</span> this.unencodedBlockSize = unencodedBlockSize;<a name="line.380"></a> +<span class="sourceLineNo">381</span> this.encodedBlockSize = encodedBlockSize;<a name="line.381"></a> +<span class="sourceLineNo">382</span> final boolean useChunking = lineLength > 0 && chunkSeparatorLength > 0;<a name="line.382"></a> +<span class="sourceLineNo">383</span> this.lineLength = useChunking ? (lineLength / encodedBlockSize) * encodedBlockSize : 0;<a name="line.383"></a> +<span class="sourceLineNo">384</span> this.chunkSeparatorLength = chunkSeparatorLength;<a name="line.384"></a> +<span class="sourceLineNo">385</span> this.pad = pad;<a name="line.385"></a> +<span class="sourceLineNo">386</span> this.decodingPolicy = Objects.requireNonNull(decodingPolicy, "codecPolicy");<a name="line.386"></a> +<span class="sourceLineNo">387</span> }<a name="line.387"></a> +<span class="sourceLineNo">388</span><a name="line.388"></a> +<span class="sourceLineNo">389</span> /**<a name="line.389"></a> +<span class="sourceLineNo">390</span> * Returns the amount of buffered data available for reading.<a name="line.390"></a> +<span class="sourceLineNo">391</span> *<a name="line.391"></a> +<span class="sourceLineNo">392</span> * @param context the context to be used<a name="line.392"></a> +<span class="sourceLineNo">393</span> * @return The amount of buffered data available for reading.<a name="line.393"></a> +<span class="sourceLineNo">394</span> */<a name="line.394"></a> +<span class="sourceLineNo">395</span> int available(final Context context) { // package protected for access from I/O streams<a name="line.395"></a> +<span class="sourceLineNo">396</span> return context.buffer != null ? context.pos - context.readPos : 0;<a name="line.396"></a> +<span class="sourceLineNo">397</span> }<a name="line.397"></a> +<span class="sourceLineNo">398</span><a name="line.398"></a> +<span class="sourceLineNo">399</span> /**<a name="line.399"></a> +<span class="sourceLineNo">400</span> * Tests a given byte array to see if it contains any characters within the alphabet or PAD.<a name="line.400"></a> +<span class="sourceLineNo">401</span> *<a name="line.401"></a> +<span class="sourceLineNo">402</span> * Intended for use in checking line-ending arrays<a name="line.402"></a> +<span class="sourceLineNo">403</span> *<a name="line.403"></a> +<span class="sourceLineNo">404</span> * @param arrayOctet<a name="line.404"></a> +<span class="sourceLineNo">405</span> * byte array to test<a name="line.405"></a> +<span class="sourceLineNo">406</span> * @return {@code true} if any byte is a valid character in the alphabet or PAD; {@code false} otherwise<a name="line.406"></a> +<span class="sourceLineNo">407</span> */<a name="line.407"></a> +<span class="sourceLineNo">408</span> protected boolean containsAlphabetOrPad(final byte[] arrayOctet) {<a name="line.408"></a> +<span class="sourceLineNo">409</span> if (arrayOctet == null) {<a name="line.409"></a> +<span class="sourceLineNo">410</span> return false;<a name="line.410"></a> +<span class="sourceLineNo">411</span> }<a name="line.411"></a> +<span class="sourceLineNo">412</span> for (final byte element : arrayOctet) {<a name="line.412"></a> +<span class="sourceLineNo">413</span> if (pad == element || isInAlphabet(element)) {<a name="line.413"></a> +<span class="sourceLineNo">414</span> return true;<a name="line.414"></a> +<span class="sourceLineNo">415</span> }<a name="line.415"></a> +<span class="sourceLineNo">416</span> }<a name="line.416"></a> +<span class="sourceLineNo">417</span> return false;<a name="line.417"></a> +<span class="sourceLineNo">418</span> }<a name="line.418"></a> +<span class="sourceLineNo">419</span><a name="line.419"></a> +<span class="sourceLineNo">420</span> /**<a name="line.420"></a> +<span class="sourceLineNo">421</span> * Decodes a byte[] containing characters in the Base-N alphabet.<a name="line.421"></a> +<span class="sourceLineNo">422</span> *<a name="line.422"></a> +<span class="sourceLineNo">423</span> * @param pArray<a name="line.423"></a> +<span class="sourceLineNo">424</span> * A byte array containing Base-N character data<a name="line.424"></a> +<span class="sourceLineNo">425</span> * @return a byte array containing binary data<a name="line.425"></a> +<span class="sourceLineNo">426</span> */<a name="line.426"></a> +<span class="sourceLineNo">427</span> @Override<a name="line.427"></a> +<span class="sourceLineNo">428</span> public byte[] decode(final byte[] pArray) {<a name="line.428"></a> +<span class="sourceLineNo">429</span> if (pArray == null || pArray.length == 0) {<a name="line.429"></a> +<span class="sourceLineNo">430</span> return pArray;<a name="line.430"></a> +<span class="sourceLineNo">431</span> }<a name="line.431"></a> +<span class="sourceLineNo">432</span> final Context context = new Context();<a name="line.432"></a> +<span class="sourceLineNo">433</span> decode(pArray, 0, pArray.length, context);<a name="line.433"></a> +<span class="sourceLineNo">434</span> decode(pArray, 0, EOF, context); // Notify decoder of EOF.<a name="line.434"></a> +<span class="sourceLineNo">435</span> final byte[] result = new byte[context.pos];<a name="line.435"></a> +<span class="sourceLineNo">436</span> readResults(result, 0, result.length, context);<a name="line.436"></a> +<span class="sourceLineNo">437</span> return result;<a name="line.437"></a> +<span class="sourceLineNo">438</span> }<a name="line.438"></a> +<span class="sourceLineNo">439</span><a name="line.439"></a> +<span class="sourceLineNo">440</span> // package protected for access from I/O streams<a name="line.440"></a> +<span class="sourceLineNo">441</span> abstract void decode(byte[] pArray, int i, int length, Context context);<a name="line.441"></a> +<span class="sourceLineNo">442</span><a name="line.442"></a> +<span class="sourceLineNo">443</span> /**<a name="line.443"></a> +<span class="sourceLineNo">444</span> * Decodes an Object using the Base-N algorithm. This method is provided in order to satisfy the requirements of<a name="line.444"></a> +<span class="sourceLineNo">445</span> * the Decoder interface, and will throw a DecoderException if the supplied object is not of type byte[] or String.<a name="line.445"></a> +<span class="sourceLineNo">446</span> *<a name="line.446"></a> +<span class="sourceLineNo">447</span> * @param obj<a name="line.447"></a> +<span class="sourceLineNo">448</span> * Object to decode<a name="line.448"></a> +<span class="sourceLineNo">449</span> * @return An object (of type byte[]) containing the binary data which corresponds to the byte[] or String<a name="line.449"></a> +<span class="sourceLineNo">450</span> * supplied.<a name="line.450"></a> +<span class="sourceLineNo">451</span> * @throws DecoderException<a name="line.451"></a> +<span class="sourceLineNo">452</span> * if the parameter supplied is not of type byte[]<a name="line.452"></a> +<span class="sourceLineNo">453</span> */<a name="line.453"></a> +<span class="sourceLineNo">454</span> @Override<a name="line.454"></a> +<span class="sourceLineNo">455</span> public Object decode(final Object obj) throws DecoderException {<a name="line.455"></a> +<span class="sourceLineNo">456</span> if (obj instanceof byte[]) {<a name="line.456"></a> +<span class="sourceLineNo">457</span> return decode((byte[]) obj);<a name="line.457"></a> +<span class="sourceLineNo">458</span> } else if (obj instanceof String) {<a name="line.458"></a> +<span class="sourceLineNo">459</span> return decode((String) obj);<a name="line.459"></a> +<span class="sourceLineNo">460</span> } else {<a name="line.460"></a> +<span class="sourceLineNo">461</span> throw new DecoderException("Parameter supplied to Base-N decode is not a byte[] or a String");<a name="line.461"></a> +<span class="sourceLineNo">462</span> }<a name="line.462"></a> +<span class="sourceLineNo">463</span> }<a name="line.463"></a> +<span class="sourceLineNo">464</span><a name="line.464"></a> +<span class="sourceLineNo">465</span> /**<a name="line.465"></a> +<span class="sourceLineNo">466</span> * Decodes a String containing characters in the Base-N alphabet.<a name="line.466"></a> +<span class="sourceLineNo">467</span> *<a name="line.467"></a> +<span class="sourceLineNo">468</span> * @param pArray<a name="line.468"></a> +<span class="sourceLineNo">469</span> * A String containing Base-N character data<a name="line.469"></a> +<span class="sourceLineNo">470</span> * @return a byte array containing binary data<a name="line.470"></a> +<span class="sourceLineNo">471</span> */<a name="line.471"></a> +<span class="sourceLineNo">472</span> public byte[] decode(final String pArray) {<a name="line.472"></a> +<span class="sourceLineNo">473</span> return decode(StringUtils.getBytesUtf8(pArray));<a name="line.473"></a> +<span class="sourceLineNo">474</span> }<a name="line.474"></a> +<span class="sourceLineNo">475</span><a name="line.475"></a> +<span class="sourceLineNo">476</span> /**<a name="line.476"></a> +<span class="sourceLineNo">477</span> * Encodes a byte[] containing binary data, into a byte[] containing characters in the alphabet.<a name="line.477"></a> +<span class="sourceLineNo">478</span> *<a name="line.478"></a> +<span class="sourceLineNo">479</span> * @param pArray<a name="line.479"></a> +<span class="sourceLineNo">480</span> * a byte array containing binary data<a name="line.480"></a> +<span class="sourceLineNo">481</span> * @return A byte array containing only the base N alphabetic character data<a name="line.481"></a> +<span class="sourceLineNo">482</span> */<a name="line.482"></a> +<span class="sourceLineNo">483</span> @Override<a name="line.483"></a> +<span class="sourceLineNo">484</span> public byte[] encode(final byte[] pArray) {<a name="line.484"></a> +<span class="sourceLineNo">485</span> if (pArray == null || pArray.length == 0) {<a name="line.485"></a> +<span class="sourceLineNo">486</span> return pArray;<a name="line.486"></a> +<span class="sourceLineNo">487</span> }<a name="line.487"></a> +<span class="sourceLineNo">488</span> return encode(pArray, 0, pArray.length);<a name="line.488"></a> +<span class="sourceLineNo">489</span> }<a name="line.489"></a> +<span class="sourceLineNo">490</span><a name="line.490"></a> +<span class="sourceLineNo">491</span> /**<a name="line.491"></a> +<span class="sourceLineNo">492</span> * Encodes a byte[] containing binary data, into a byte[] containing<a name="line.492"></a> +<span class="sourceLineNo">493</span> * characters in the alphabet.<a name="line.493"></a> +<span class="sourceLineNo">494</span> *<a name="line.494"></a> +<span class="sourceLineNo">495</span> * @param pArray<a name="line.495"></a> +<span class="sourceLineNo">496</span> * a byte array containing binary data<a name="line.496"></a> +<span class="sourceLineNo">497</span> * @param offset<a name="line.497"></a> +<span class="sourceLineNo">498</span> * initial offset of the subarray.<a name="line.498"></a> +<span class="sourceLineNo">499</span> * @param length<a name="line.499"></a> +<span class="sourceLineNo">500</span> * length of the subarray.<a name="line.500"></a> +<span class="sourceLineNo">501</span> * @return A byte array containing only the base N alphabetic character data<a name="line.501"></a> +<span class="sourceLineNo">502</span> * @since 1.11<a name="line.502"></a> +<span class="sourceLineNo">503</span> */<a name="line.503"></a> +<span class="sourceLineNo">504</span> public byte[] encode(final byte[] pArray, final int offset, final int length) {<a name="line.504"></a> +<span class="sourceLineNo">505</span> if (pArray == null || pArray.length == 0) {<a name="line.505"></a> +<span class="sourceLineNo">506</span> return pArray;<a name="line.506"></a> +<span class="sourceLineNo">507</span> }<a name="line.507"></a> +<span class="sourceLineNo">508</span> final Context context = new Context();<a name="line.508"></a> +<span class="sourceLineNo">509</span> encode(pArray, offset, length, context);<a name="line.509"></a> +<span class="sourceLineNo">510</span> encode(pArray, offset, EOF, context); // Notify encoder of EOF.<a name="line.510"></a> +<span class="sourceLineNo">511</span> final byte[] buf = new byte[context.pos - context.readPos];<a name="line.511"></a> +<span class="sourceLineNo">512</span> readResults(buf, 0, buf.length, context);<a name="line.512"></a> +<span class="sourceLineNo">513</span> return buf;<a name="line.513"></a> +<span class="sourceLineNo">514</span> }<a name="line.514"></a> +<span class="sourceLineNo">515</span><a name="line.515"></a> +<span class="sourceLineNo">516</span> // package protected for access from I/O streams<a name="line.516"></a> +<span class="sourceLineNo">517</span> abstract void encode(byte[] pArray, int i, int length, Context context);<a name="line.517"></a> +<span class="sourceLineNo">518</span><a name="line.518"></a> +<span class="sourceLineNo">519</span> /**<a name="line.519"></a> +<span class="sourceLineNo">520</span> * Encodes an Object using the Base-N algorithm. This method is provided in order to satisfy the requirements of<a name="line.520"></a> +<span class="sourceLineNo">521</span> * the Encoder interface, and will throw an EncoderException if the supplied object is not of type byte[].<a name="line.521"></a> +<span class="sourceLineNo">522</span> *<a name="line.522"></a> +<span class="sourceLineNo">523</span> * @param obj<a name="line.523"></a> +<span class="sourceLineNo">524</span> * Object to encode<a name="line.524"></a> +<span class="sourceLineNo">525</span> * @return An object (of type byte[]) containing the Base-N encoded data which corresponds to the byte[] supplied.<a name="line.525"></a> +<span class="sourceLineNo">526</span> * @throws EncoderException<a name="line.526"></a> +<span class="sourceLineNo">527</span> * if the parameter supplied is not of type byte[]<a name="line.527"></a> +<span class="sourceLineNo">528</span> */<a name="line.528"></a> +<span class="sourceLineNo">529</span> @Override<a name="line.529"></a> +<span class="sourceLineNo">530</span> public Object encode(final Object obj) throws EncoderException {<a name="line.530"></a> +<span class="sourceLineNo">531</span> if (!(obj instanceof byte[])) {<a name="line.531"></a> +<span class="sourceLineNo">532</span> throw new EncoderException("Parameter supplied to Base-N encode is not a byte[]");<a name="line.532"></a> +<span class="sourceLineNo">533</span> }<a name="line.533"></a> +<span class="sourceLineNo">534</span> return encode((byte[]) obj);<a name="line.534"></a> +<span class="sourceLineNo">535</span> }<a name="line.535"></a> +<span class="sourceLineNo">536</span><a name="line.536"></a> +<span class="sourceLineNo">537</span> /**<a name="line.537"></a> +<span class="sourceLineNo">538</span> * Encodes a byte[] containing binary data, into a String containing characters in the appropriate alphabet.<a name="line.538"></a> +<span class="sourceLineNo">539</span> * Uses UTF8 encoding.<a name="line.539"></a> +<span class="sourceLineNo">540</span> *<a name="line.540"></a> +<span class="sourceLineNo">541</span> * @param pArray a byte array containing binary data<a name="line.541"></a> +<span class="sourceLineNo">542</span> * @return String containing only character data in the appropriate alphabet.<a name="line.542"></a> +<span class="sourceLineNo">543</span> * @since 1.5<a name="line.543"></a> +<span class="sourceLineNo">544</span> * This is a duplicate of {@link #encodeToString(byte[])}; it was merged during refactoring.<a name="line.544"></a> +<span class="sourceLineNo">545</span> */<a name="line.545"></a> +<span class="sourceLineNo">546</span> public String encodeAsString(final byte[] pArray){<a name="line.546"></a> +<span class="sourceLineNo">547</span> return StringUtils.newStringUtf8(encode(pArray));<a name="line.547"></a> +<span class="sourceLineNo">548</span> }<a name="line.548"></a> +<span class="sourceLineNo">549</span><a name="line.549"></a> +<span class="sourceLineNo">550</span> /**<a name="line.550"></a> +<span class="sourceLineNo">551</span> * Encodes a byte[] containing binary data, into a String containing characters in the Base-N alphabet.<a name="line.551"></a> +<span class="sourceLineNo">552</span> * Uses UTF8 encoding.<a name="line.552"></a> +<span class="sourceLineNo">553</span> *<a name="line.553"></a> +<span class="sourceLineNo">554</span> * @param pArray<a name="line.554"></a> +<span class="sourceLineNo">555</span> * a byte array containing binary data<a name="line.555"></a> +<span class="sourceLineNo">556</span> * @return A String containing only Base-N character data<a name="line.556"></a> +<span class="sourceLineNo">557</span> */<a name="line.557"></a> +<span class="sourceLineNo">558</span> public String encodeToString(final byte[] pArray) {<a name="line.558"></a> +<span class="sourceLineNo">559</span> return StringUtils.newStringUtf8(encode(pArray));<a name="line.559"></a> +<span class="sourceLineNo">560</span> }<a name="line.560"></a> +<span class="sourceLineNo">561</span><a name="line.561"></a> +<span class="sourceLineNo">562</span> /**<a name="line.562"></a> +<span class="sourceLineNo">563</span> * Ensure that the buffer has room for {@code size} bytes<a name="line.563"></a> +<span class="sourceLineNo">564</span> *<a name="line.564"></a> +<span class="sourceLineNo">565</span> * @param size minimum spare space required<a name="line.565"></a> +<span class="sourceLineNo">566</span> * @param context the context to be used<a name="line.566"></a> +<span class="sourceLineNo">567</span> * @return the buffer<a name="line.567"></a> +<span class="sourceLineNo">568</span> */<a name="line.568"></a> +<span class="sourceLineNo">569</span> protected byte[] ensureBufferSize(final int size, final Context context){<a name="line.569"></a> +<span class="sourceLineNo">570</span> if (context.buffer == null) {<a name="line.570"></a> +<span class="sourceLineNo">571</span> context.buffer = new byte[Math.max(size, getDefaultBufferSize())];<a name="line.571"></a> +<span class="sourceLineNo">572</span> context.pos = 0;<a name="line.572"></a> +<span class="sourceLineNo">573</span> context.readPos = 0;<a name="line.573"></a> +<span class="sourceLineNo">574</span><a name="line.574"></a> +<span class="sourceLineNo">575</span> // Overflow-conscious:<a name="line.575"></a> +<span class="sourceLineNo">576</span> // x + y > z == x + y - z > 0<a name="line.576"></a> +<span class="sourceLineNo">577</span> } else if (context.pos + size - context.buffer.length > 0) {<a name="line.577"></a> +<span class="sourceLineNo">578</span> return resizeBuffer(context, context.pos + size);<a name="line.578"></a> +<span class="sourceLineNo">579</span> }<a name="line.579"></a> +<span class="sourceLineNo">580</span> return context.buffer;<a name="line.580"></a> +<span class="sourceLineNo">581</span> }<a name="line.581"></a> +<span class="sourceLineNo">582</span><a name="line.582"></a> +<span class="sourceLineNo">583</span> /**<a name="line.583"></a> +<span class="sourceLineNo">584</span> * Returns the decoding behavior policy.<a name="line.584"></a> +<span class="sourceLineNo">585</span> * <a name="line.585"></a> +<span class="sourceLineNo">586</span> * <p><a name="line.586"></a> +<span class="sourceLineNo">587</span> * The default is lenient. If the decoding policy is strict, then decoding will raise an<a name="line.587"></a> +<span class="sourceLineNo">588</span> * {@link IllegalArgumentException} if trailing bits are not part of a valid encoding. Decoding will compose<a name="line.588"></a> +<span class="sourceLineNo">589</span> * trailing bits into 8-bit bytes and discard the remainder.<a name="line.589"></a> +<span class="sourceLineNo">590</span> * </p><a name="line.590"></a> +<span class="sourceLineNo">591</span> *<a name="line.591"></a> +<span class="sourceLineNo">592</span> * @return true if using strict decoding<a name="line.592"></a> +<span class="sourceLineNo">593</span> * @since 1.15<a name="line.593"></a> +<span class="sourceLineNo">594</span> */<a name="line.594"></a> +<span class="sourceLineNo">595</span> public CodecPolicy getCodecPolicy() {<a name="line.595"></a> +<span class="sourceLineNo">596</span> return decodingPolicy;<a name="line.596"></a> +<span class="sourceLineNo">597</span> }<a name="line.597"></a> +<span class="sourceLineNo">598</span><a name="line.598"></a> +<span class="sourceLineNo">599</span> /**<a name="line.599"></a> +<span class="sourceLineNo">600</span> * Get the default buffer size. Can be overridden.<a name="line.600"></a> +<span class="sourceLineNo">601</span> *<a name="line.601"></a> +<span class="sourceLineNo">602</span> * @return the default buffer size.<a name="line.602"></a> +<span class="sourceLineNo">603</span> */<a name="line.603"></a> +<span class="sourceLineNo">604</span> protected int getDefaultBufferSize() {<a name="line.604"></a> +<span class="sourceLineNo">605</span> return DEFAULT_BUFFER_SIZE;<a name="line.605"></a> +<span class="sourceLineNo">606</span> }<a name="line.606"></a> +<span class="sourceLineNo">607</span><a name="line.607"></a> +<span class="sourceLineNo">608</span> /**<a name="line.608"></a> +<span class="sourceLineNo">609</span> * Calculates the amount of space needed to encode the supplied array.<a name="line.609"></a> +<span class="sourceLineNo">610</span> *<a name="line.610"></a> +<span class="sourceLineNo">611</span> * @param pArray byte[] array which will later be encoded<a name="line.611"></a> +<span class="sourceLineNo">612</span> *<a name="line.612"></a> +<span class="sourceLineNo">613</span> * @return amount of space needed to encoded the supplied array.<a name="line.613"></a> +<span class="sourceLineNo">614</span> * Returns a long since a max-len array will require &gt; Integer.MAX_VALUE<a name="line.614"></a> +<span class="sourceLineNo">615</span> */<a name="line.615"></a> +<span class="sourceLineNo">616</span> public long getEncodedLength(final byte[] pArray) {<a name="line.616"></a> +<span class="sourceLineNo">617</span> // Calculate non-chunked size - rounded up to allow for padding<a name="line.617"></a> +<span class="sourceLineNo">618</span> // cast to long is needed to avoid possibility of overflow<a name="line.618"></a> +<span class="sourceLineNo">619</span> long len = ((pArray.length + unencodedBlockSize-1) / unencodedBlockSize) * (long) encodedBlockSize;<a name="line.619"></a> +<span class="sourceLineNo">620</span> if (lineLength > 0) { // We're using chunking<a name="line.620"></a> +<span class="sourceLineNo">621</span> // Round up to nearest multiple<a name="line.621"></a> +<span class="sourceLineNo">622</span> len += ((len + lineLength-1) / lineLength) * chunkSeparatorLength;<a name="line.622"></a> +<span class="sourceLineNo">623</span> }<a name="line.623"></a> +<span class="sourceLineNo">624</span> return len;<a name="line.624"></a> +<span class="sourceLineNo">625</span> }<a name="line.625"></a> +<span class="sourceLineNo">626</span><a name="line.626"></a> +<span class="sourceLineNo">627</span> /**<a name="line.627"></a> +<span class="sourceLineNo">628</span> * Returns true if this object has buffered data for reading.<a name="line.628"></a> +<span class="sourceLineNo">629</span> *<a name="line.629"></a> +<span class="sourceLineNo">630</span> * @param context the context to be used<a name="line.630"></a> +<span class="sourceLineNo">631</span> * @return true if there is data still available for reading.<a name="line.631"></a> +<span class="sourceLineNo">632</span> */<a name="line.632"></a> +<span class="sourceLineNo">633</span> boolean hasData(final Context context) { // package protected for access from I/O streams<a name="line.633"></a> +<span class="sourceLineNo">634</span> return context.buffer != null;<a name="line.634"></a> +<span class="sourceLineNo">635</span> }<a name="line.635"></a> +<span class="sourceLineNo">636</span><a name="line.636"></a> +<span class="sourceLineNo">637</span> /**<a name="line.637"></a> +<span class="sourceLineNo">638</span> * Returns whether or not the {@code octet} is in the current alphabet.<a name="line.638"></a> +<span class="sourceLineNo">639</span> * Does not allow whitespace or pad.<a name="line.639"></a> +<span class="sourceLineNo">640</span> *<a name="line.640"></a> +<span class="sourceLineNo">641</span> * @param value The value to test<a name="line.641"></a> +<span class="sourceLineNo">642</span> *<a name="line.642"></a> +<span class="sourceLineNo">643</span> * @return {@code true} if the value is defined in the current alphabet, {@code false} otherwise.<a name="line.643"></a> +<span class="sourceLineNo">644</span> */<a name="line.644"></a> +<span class="sourceLineNo">645</span> protected abstract boolean isInAlphabet(byte value);<a name="line.645"></a> +<span class="sourceLineNo">646</span><a name="line.646"></a> +<span class="sourceLineNo">647</span> /**<a name="line.647"></a> +<span class="sourceLineNo">648</span> * Tests a given byte array to see if it contains only valid characters within the alphabet.<a name="line.648"></a> +<span class="sourceLineNo">649</span> * The method optionally treats whitespace and pad as valid.<a name="line.649"></a> +<span class="sourceLineNo">650</span> *<a name="line.650"></a> +<span class="sourceLineNo">651</span> * @param arrayOctet byte array to test<a name="line.651"></a> +<span class="sourceLineNo">652</span> * @param allowWSPad if {@code true}, then whitespace and PAD are also allowed<a name="line.652"></a> +<span class="sourceLineNo">653</span> *<a name="line.653"></a> +<span class="sourceLineNo">654</span> * @return {@code true} if all bytes are valid characters in the alphabet or if the byte array is empty;<a name="line.654"></a> +<span class="sourceLineNo">655</span> * {@code false}, otherwise<a name="line.655"></a> +<span class="sourceLineNo">656</span> */<a name="line.656"></a> +<span class="sourceLineNo">657</span> public boolean isInAlphabet(final byte[] arrayOctet, final boolean allowWSPad) {<a name="line.657"></a> +<span class="sourceLineNo">658</span> for (final byte octet : arrayOctet) {<a name="line.658"></a> +<span class="sourceLineNo">659</span> if (!isInAlphabet(octet) &&<a name="line.659"></a> +<span class="sourceLineNo">660</span> (!allowWSPad || (octet != pad) && !isWhiteSpace(octet))) {<a name="line.660"></a> +<span class="sourceLineNo">661</span> return false;<a name="line.661"></a> +<span class="sourceLineNo">662</span> }<a name="line.662"></a> +<span class="sourceLineNo">663</span> }<a name="line.663"></a> +<span class="sourceLineNo">664</span> return true;<a name="line.664"></a> +<span class="sourceLineNo">665</span> }<a name="line.665"></a> +<span class="sourceLineNo">666</span><a name="line.666"></a> +<span class="sourceLineNo">667</span> /**<a name="line.667"></a> +<span class="sourceLineNo">668</span> * Tests a given String to see if it contains only valid characters within the alphabet.<a name="line.668"></a> +<span class="sourceLineNo">669</span> * The method treats whitespace and PAD as valid.<a name="line.669"></a> +<span class="sourceLineNo">670</span> *<a name="line.670"></a> +<span class="sourceLineNo">671</span> * @param basen String to test<a name="line.671"></a> +<span class="sourceLineNo">672</span> * @return {@code true} if all characters in the String are valid characters in the alphabet or if<a name="line.672"></a> +<span class="sourceLineNo">673</span> * the String is empty; {@code false}, otherwise<a name="line.673"></a> +<span class="sourceLineNo">674</span> * @see #isInAlphabet(byte[], boolean)<a name="line.674"></a> +<span class="sourceLineNo">675</span> */<a name="line.675"></a> +<span class="sourceLineNo">676</span> public boolean isInAlphabet(final String basen) {<a name="line.676"></a> +<span class="sourceLineNo">677</span> return isInAlphabet(StringUtils.getBytesUtf8(basen), true);<a name="line.677"></a> +<span class="sourceLineNo">678</span> }<a name="line.678"></a> +<span class="sourceLineNo">679</span><a name="line.679"></a> +<span class="sourceLineNo">680</span> /**<a name="line.680"></a> +<span class="sourceLineNo">681</span> * Returns true if decoding behavior is strict. Decoding will raise an {@link IllegalArgumentException} if trailing<a name="line.681"></a> +<span class="sourceLineNo">682</span> * bits are not part of a valid encoding.<a name="line.682"></a> +<span class="sourceLineNo">683</span> *<a name="line.683"></a> +<span class="sourceLineNo">684</span> * <p><a name="line.684"></a> +<span class="sourceLineNo">685</span> * The default is false for lenient decoding. Decoding will compose trailing bits into 8-bit bytes and discard the<a name="line.685"></a> +<span class="sourceLineNo">686</span> * remainder.<a name="line.686"></a> +<span class="sourceLineNo">687</span> * </p><a name="line.687"></a> +<span class="sourceLineNo">688</span> *<a name="line.688"></a> +<span class="sourceLineNo">689</span> * @return true if using strict decoding<a name="line.689"></a> +<span class="sourceLineNo">690</span> * @since 1.15<a name="line.690"></a> +<span class="sourceLineNo">691</span> */<a name="line.691"></a> +<span class="sourceLineNo">692</span> public boolean isStrictDecoding() {<a name="line.692"></a> +<span class="sourceLineNo">693</span> return decodingPolicy == CodecPolicy.STRICT;<a name="line.693"></a> +<span class="sourceLineNo">694</span> }<a name="line.694"></a> +<span class="sourceLineNo">695</span><a name="line.695"></a> +<span class="sourceLineNo">696</span> /**<a name="line.696"></a> +<span class="sourceLineNo">697</span> * Extracts buffered data into the provided byte[] array, starting at position bPos, up to a maximum of bAvail<a name="line.697"></a> +<span class="sourceLineNo">698</span> * bytes. Returns how many bytes were actually extracted.<a name="line.698"></a> +<span class="sourceLineNo">699</span> * <p><a name="line.699"></a> +<span class="sourceLineNo">700</span> * Package protected for access from I/O streams.<a name="line.700"></a> +<span class="sourceLineNo">701</span> *<a name="line.701"></a> +<span class="sourceLineNo">702</span> * @param b<a name="line.702"></a> +<span class="sourceLineNo">703</span> * byte[] array to extract the buffered data into.<a name="line.703"></a> +<span class="sourceLineNo">704</span> * @param bPos<a name="line.704"></a> +<span class="sourceLineNo">705</span> * position in byte[] array to start extraction at.<a name="line.705"></a> +<span class="sourceLineNo">706</span> * @param bAvail<a name="line.706"></a> +<span class="sourceLineNo">707</span> * amount of bytes we're allowed to extract. We may extract fewer (if fewer are available).<a name="line.707"></a> +<span class="sourceLineNo">708</span> * @param context<a name="line.708"></a> +<span class="sourceLineNo">709</span> * the context to be used<a name="line.709"></a> +<span class="sourceLineNo">710</span> * @return The number of bytes successfully extracted into the provided byte[] array.<a name="line.710"></a> +<span class="sourceLineNo">711</span> */<a name="line.711"></a> +<span class="sourceLineNo">712</span> int readResults(final byte[] b, final int bPos, final int bAvail, final Context context) {<a name="line.712"></a> +<span class="sourceLineNo">713</span> if (context.buffer != null) {<a name="line.713"></a> +<span class="sourceLineNo">714</span> final int len = Math.min(available(context), bAvail);<a name="line.714"></a> +<span class="sourceLineNo">715</span> System.arraycopy(context.buffer, context.readPos, b, bPos, len);<a name="line.715"></a> +<span class="sourceLineNo">716</span> context.readPos += len;<a name="line.716"></a> +<span class="sourceLineNo">717</span> if (context.readPos >= context.pos) {<a name="line.717"></a> +<span class="sourceLineNo">718</span> context.buffer = null; // so hasData() will return false, and this method can return -1<a name="line.718"></a> +<span class="sourceLineNo">719</span> }<a name="line.719"></a> +<span class="sourceLineNo">720</span> return len;<a name="line.720"></a> +<span class="sourceLineNo">721</span> }<a name="line.721"></a> +<span class="sourceLineNo">722</span> return context.eof ? EOF : 0;<a name="line.722"></a> +<span class="sourceLineNo">723</span> }<a name="line.723"></a> +<span class="sourceLineNo">724</span>}<a name="line.724"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BaseNCodecInputStream.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BaseNCodecInputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..2d6f7d39861e1f1aa8b5406cd5a6c196c9878a23 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BaseNCodecInputStream.html @@ -0,0 +1,298 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import static org.apache.commons.codec.binary.BaseNCodec.EOF;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.io.FilterInputStream;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.io.IOException;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.io.InputStream;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.Objects;<a name="line.25"></a> +<span class="sourceLineNo">026</span><a name="line.26"></a> +<span class="sourceLineNo">027</span>import org.apache.commons.codec.binary.BaseNCodec.Context;<a name="line.27"></a> +<span class="sourceLineNo">028</span><a name="line.28"></a> +<span class="sourceLineNo">029</span>/**<a name="line.29"></a> +<span class="sourceLineNo">030</span> * Abstract superclass for Base-N input streams.<a name="line.30"></a> +<span class="sourceLineNo">031</span> *<a name="line.31"></a> +<span class="sourceLineNo">032</span> * @since 1.5<a name="line.32"></a> +<span class="sourceLineNo">033</span> */<a name="line.33"></a> +<span class="sourceLineNo">034</span>public class BaseNCodecInputStream extends FilterInputStream {<a name="line.34"></a> +<span class="sourceLineNo">035</span><a name="line.35"></a> +<span class="sourceLineNo">036</span> private final BaseNCodec baseNCodec;<a name="line.36"></a> +<span class="sourceLineNo">037</span><a name="line.37"></a> +<span class="sourceLineNo">038</span> private final boolean doEncode;<a name="line.38"></a> +<span class="sourceLineNo">039</span><a name="line.39"></a> +<span class="sourceLineNo">040</span> private final byte[] singleByte = new byte[1];<a name="line.40"></a> +<span class="sourceLineNo">041</span><a name="line.41"></a> +<span class="sourceLineNo">042</span> private final Context context = new Context();<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> +<span class="sourceLineNo">044</span> protected BaseNCodecInputStream(final InputStream input, final BaseNCodec baseNCodec, final boolean doEncode) {<a name="line.44"></a> +<span class="sourceLineNo">045</span> super(input);<a name="line.45"></a> +<span class="sourceLineNo">046</span> this.doEncode = doEncode;<a name="line.46"></a> +<span class="sourceLineNo">047</span> this.baseNCodec = baseNCodec;<a name="line.47"></a> +<span class="sourceLineNo">048</span> }<a name="line.48"></a> +<span class="sourceLineNo">049</span><a name="line.49"></a> +<span class="sourceLineNo">050</span> /**<a name="line.50"></a> +<span class="sourceLineNo">051</span> * {@inheritDoc}<a name="line.51"></a> +<span class="sourceLineNo">052</span> *<a name="line.52"></a> +<span class="sourceLineNo">053</span> * @return {@code 0} if the {@link InputStream} has reached {@code EOF},<a name="line.53"></a> +<span class="sourceLineNo">054</span> * {@code 1} otherwise<a name="line.54"></a> +<span class="sourceLineNo">055</span> * @since 1.7<a name="line.55"></a> +<span class="sourceLineNo">056</span> */<a name="line.56"></a> +<span class="sourceLineNo">057</span> @Override<a name="line.57"></a> +<span class="sourceLineNo">058</span> public int available() throws IOException {<a name="line.58"></a> +<span class="sourceLineNo">059</span> // Note: the logic is similar to the InflaterInputStream:<a name="line.59"></a> +<span class="sourceLineNo">060</span> // as long as we have not reached EOF, indicate that there is more<a name="line.60"></a> +<span class="sourceLineNo">061</span> // data available. As we do not know for sure how much data is left,<a name="line.61"></a> +<span class="sourceLineNo">062</span> // just return 1 as a safe guess.<a name="line.62"></a> +<span class="sourceLineNo">063</span><a name="line.63"></a> +<span class="sourceLineNo">064</span> return context.eof ? 0 : 1;<a name="line.64"></a> +<span class="sourceLineNo">065</span> }<a name="line.65"></a> +<span class="sourceLineNo">066</span><a name="line.66"></a> +<span class="sourceLineNo">067</span> /**<a name="line.67"></a> +<span class="sourceLineNo">068</span> * Returns true if decoding behavior is strict. Decoding will raise an<a name="line.68"></a> +<span class="sourceLineNo">069</span> * {@link IllegalArgumentException} if trailing bits are not part of a valid encoding.<a name="line.69"></a> +<span class="sourceLineNo">070</span> *<a name="line.70"></a> +<span class="sourceLineNo">071</span> * <p>The default is false for lenient encoding. Decoding will compose trailing bits<a name="line.71"></a> +<span class="sourceLineNo">072</span> * into 8-bit bytes and discard the remainder.<a name="line.72"></a> +<span class="sourceLineNo">073</span> *<a name="line.73"></a> +<span class="sourceLineNo">074</span> * @return true if using strict decoding<a name="line.74"></a> +<span class="sourceLineNo">075</span> * @since 1.15<a name="line.75"></a> +<span class="sourceLineNo">076</span> */<a name="line.76"></a> +<span class="sourceLineNo">077</span> public boolean isStrictDecoding() {<a name="line.77"></a> +<span class="sourceLineNo">078</span> return baseNCodec.isStrictDecoding();<a name="line.78"></a> +<span class="sourceLineNo">079</span> }<a name="line.79"></a> +<span class="sourceLineNo">080</span><a name="line.80"></a> +<span class="sourceLineNo">081</span> /**<a name="line.81"></a> +<span class="sourceLineNo">082</span> * Marks the current position in this input stream.<a name="line.82"></a> +<span class="sourceLineNo">083</span> * <p>The {@link #mark} method of {@link BaseNCodecInputStream} does nothing.</p><a name="line.83"></a> +<span class="sourceLineNo">084</span> *<a name="line.84"></a> +<span class="sourceLineNo">085</span> * @param readLimit the maximum limit of bytes that can be read before the mark position becomes invalid.<a name="line.85"></a> +<span class="sourceLineNo">086</span> * @see #markSupported()<a name="line.86"></a> +<span class="sourceLineNo">087</span> * @since 1.7<a name="line.87"></a> +<span class="sourceLineNo">088</span> */<a name="line.88"></a> +<span class="sourceLineNo">089</span> @Override<a name="line.89"></a> +<span class="sourceLineNo">090</span> public synchronized void mark(final int readLimit) {<a name="line.90"></a> +<span class="sourceLineNo">091</span> // noop<a name="line.91"></a> +<span class="sourceLineNo">092</span> }<a name="line.92"></a> +<span class="sourceLineNo">093</span><a name="line.93"></a> +<span class="sourceLineNo">094</span> /**<a name="line.94"></a> +<span class="sourceLineNo">095</span> * {@inheritDoc}<a name="line.95"></a> +<span class="sourceLineNo">096</span> *<a name="line.96"></a> +<span class="sourceLineNo">097</span> * @return Always returns {@code false}<a name="line.97"></a> +<span class="sourceLineNo">098</span> */<a name="line.98"></a> +<span class="sourceLineNo">099</span> @Override<a name="line.99"></a> +<span class="sourceLineNo">100</span> public boolean markSupported() {<a name="line.100"></a> +<span class="sourceLineNo">101</span> return false; // not an easy job to support marks<a name="line.101"></a> +<span class="sourceLineNo">102</span> }<a name="line.102"></a> +<span class="sourceLineNo">103</span><a name="line.103"></a> +<span class="sourceLineNo">104</span> /**<a name="line.104"></a> +<span class="sourceLineNo">105</span> * Reads one {@code byte} from this input stream.<a name="line.105"></a> +<span class="sourceLineNo">106</span> *<a name="line.106"></a> +<span class="sourceLineNo">107</span> * @return the byte as an integer in the range 0 to 255. Returns -1 if EOF has been reached.<a name="line.107"></a> +<span class="sourceLineNo">108</span> * @throws IOException<a name="line.108"></a> +<span class="sourceLineNo">109</span> * if an I/O error occurs.<a name="line.109"></a> +<span class="sourceLineNo">110</span> */<a name="line.110"></a> +<span class="sourceLineNo">111</span> @Override<a name="line.111"></a> +<span class="sourceLineNo">112</span> public int read() throws IOException {<a name="line.112"></a> +<span class="sourceLineNo">113</span> int r = read(singleByte, 0, 1);<a name="line.113"></a> +<span class="sourceLineNo">114</span> while (r == 0) {<a name="line.114"></a> +<span class="sourceLineNo">115</span> r = read(singleByte, 0, 1);<a name="line.115"></a> +<span class="sourceLineNo">116</span> }<a name="line.116"></a> +<span class="sourceLineNo">117</span> if (r > 0) {<a name="line.117"></a> +<span class="sourceLineNo">118</span> final byte b = singleByte[0];<a name="line.118"></a> +<span class="sourceLineNo">119</span> return b < 0 ? 256 + b : b;<a name="line.119"></a> +<span class="sourceLineNo">120</span> }<a name="line.120"></a> +<span class="sourceLineNo">121</span> return EOF;<a name="line.121"></a> +<span class="sourceLineNo">122</span> }<a name="line.122"></a> +<span class="sourceLineNo">123</span><a name="line.123"></a> +<span class="sourceLineNo">124</span> /**<a name="line.124"></a> +<span class="sourceLineNo">125</span> * Attempts to read {@code len} bytes into the specified {@code b} array starting at {@code offset}<a name="line.125"></a> +<span class="sourceLineNo">126</span> * from this InputStream.<a name="line.126"></a> +<span class="sourceLineNo">127</span> *<a name="line.127"></a> +<span class="sourceLineNo">128</span> * @param array<a name="line.128"></a> +<span class="sourceLineNo">129</span> * destination byte array<a name="line.129"></a> +<span class="sourceLineNo">130</span> * @param offset<a name="line.130"></a> +<span class="sourceLineNo">131</span> * where to start writing the bytes<a name="line.131"></a> +<span class="sourceLineNo">132</span> * @param len<a name="line.132"></a> +<span class="sourceLineNo">133</span> * maximum number of bytes to read<a name="line.133"></a> +<span class="sourceLineNo">134</span> *<a name="line.134"></a> +<span class="sourceLineNo">135</span> * @return number of bytes read<a name="line.135"></a> +<span class="sourceLineNo">136</span> * @throws IOException<a name="line.136"></a> +<span class="sourceLineNo">137</span> * if an I/O error occurs.<a name="line.137"></a> +<span class="sourceLineNo">138</span> * @throws NullPointerException<a name="line.138"></a> +<span class="sourceLineNo">139</span> * if the byte array parameter is null<a name="line.139"></a> +<span class="sourceLineNo">140</span> * @throws IndexOutOfBoundsException<a name="line.140"></a> +<span class="sourceLineNo">141</span> * if offset, len or buffer size are invalid<a name="line.141"></a> +<span class="sourceLineNo">142</span> */<a name="line.142"></a> +<span class="sourceLineNo">143</span> @Override<a name="line.143"></a> +<span class="sourceLineNo">144</span> public int read(final byte array[], final int offset, final int len) throws IOException {<a name="line.144"></a> +<span class="sourceLineNo">145</span> Objects.requireNonNull(array, "array");<a name="line.145"></a> +<span class="sourceLineNo">146</span> if (offset < 0 || len < 0) {<a name="line.146"></a> +<span class="sourceLineNo">147</span> throw new IndexOutOfBoundsException();<a name="line.147"></a> +<span class="sourceLineNo">148</span> } else if (offset > array.length || offset + len > array.length) {<a name="line.148"></a> +<span class="sourceLineNo">149</span> throw new IndexOutOfBoundsException();<a name="line.149"></a> +<span class="sourceLineNo">150</span> } else if (len == 0) {<a name="line.150"></a> +<span class="sourceLineNo">151</span> return 0;<a name="line.151"></a> +<span class="sourceLineNo">152</span> } else {<a name="line.152"></a> +<span class="sourceLineNo">153</span> int readLen = 0;<a name="line.153"></a> +<span class="sourceLineNo">154</span> /*<a name="line.154"></a> +<span class="sourceLineNo">155</span> Rationale for while-loop on (readLen == 0):<a name="line.155"></a> +<span class="sourceLineNo">156</span> -----<a name="line.156"></a> +<span class="sourceLineNo">157</span> Base32.readResults() usually returns > 0 or EOF (-1). In the<a name="line.157"></a> +<span class="sourceLineNo">158</span> rare case where it returns 0, we just keep trying.<a name="line.158"></a> +<span class="sourceLineNo">159</span><a name="line.159"></a> +<span class="sourceLineNo">160</span> This is essentially an undocumented contract for InputStream<a name="line.160"></a> +<span class="sourceLineNo">161</span> implementors that want their code to work properly with<a name="line.161"></a> +<span class="sourceLineNo">162</span> java.io.InputStreamReader, since the latter hates it when<a name="line.162"></a> +<span class="sourceLineNo">163</span> InputStream.read(byte[]) returns a zero. Unfortunately our<a name="line.163"></a> +<span class="sourceLineNo">164</span> readResults() call must return 0 if a large amount of the data<a name="line.164"></a> +<span class="sourceLineNo">165</span> being decoded was non-base32, so this while-loop enables proper<a name="line.165"></a> +<span class="sourceLineNo">166</span> interop with InputStreamReader for that scenario.<a name="line.166"></a> +<span class="sourceLineNo">167</span> -----<a name="line.167"></a> +<span class="sourceLineNo">168</span> This is a fix for CODEC-101<a name="line.168"></a> +<span class="sourceLineNo">169</span> */<a name="line.169"></a> +<span class="sourceLineNo">170</span> while (readLen == 0) {<a name="line.170"></a> +<span class="sourceLineNo">171</span> if (!baseNCodec.hasData(context)) {<a name="line.171"></a> +<span class="sourceLineNo">172</span> final byte[] buf = new byte[doEncode ? 4096 : 8192];<a name="line.172"></a> +<span class="sourceLineNo">173</span> final int c = in.read(buf);<a name="line.173"></a> +<span class="sourceLineNo">174</span> if (doEncode) {<a name="line.174"></a> +<span class="sourceLineNo">175</span> baseNCodec.encode(buf, 0, c, context);<a name="line.175"></a> +<span class="sourceLineNo">176</span> } else {<a name="line.176"></a> +<span class="sourceLineNo">177</span> baseNCodec.decode(buf, 0, c, context);<a name="line.177"></a> +<span class="sourceLineNo">178</span> }<a name="line.178"></a> +<span class="sourceLineNo">179</span> }<a name="line.179"></a> +<span class="sourceLineNo">180</span> readLen = baseNCodec.readResults(array, offset, len, context);<a name="line.180"></a> +<span class="sourceLineNo">181</span> }<a name="line.181"></a> +<span class="sourceLineNo">182</span> return readLen;<a name="line.182"></a> +<span class="sourceLineNo">183</span> }<a name="line.183"></a> +<span class="sourceLineNo">184</span> }<a name="line.184"></a> +<span class="sourceLineNo">185</span><a name="line.185"></a> +<span class="sourceLineNo">186</span> /**<a name="line.186"></a> +<span class="sourceLineNo">187</span> * Repositions this stream to the position at the time the mark method was last called on this input stream.<a name="line.187"></a> +<span class="sourceLineNo">188</span> * <p><a name="line.188"></a> +<span class="sourceLineNo">189</span> * The {@link #reset} method of {@link BaseNCodecInputStream} does nothing except throw an {@link IOException}.<a name="line.189"></a> +<span class="sourceLineNo">190</span> *<a name="line.190"></a> +<span class="sourceLineNo">191</span> * @throws IOException if this method is invoked<a name="line.191"></a> +<span class="sourceLineNo">192</span> * @since 1.7<a name="line.192"></a> +<span class="sourceLineNo">193</span> */<a name="line.193"></a> +<span class="sourceLineNo">194</span> @Override<a name="line.194"></a> +<span class="sourceLineNo">195</span> public synchronized void reset() throws IOException {<a name="line.195"></a> +<span class="sourceLineNo">196</span> throw new IOException("mark/reset not supported");<a name="line.196"></a> +<span class="sourceLineNo">197</span> }<a name="line.197"></a> +<span class="sourceLineNo">198</span><a name="line.198"></a> +<span class="sourceLineNo">199</span> /**<a name="line.199"></a> +<span class="sourceLineNo">200</span> * {@inheritDoc}<a name="line.200"></a> +<span class="sourceLineNo">201</span> *<a name="line.201"></a> +<span class="sourceLineNo">202</span> * @throws IllegalArgumentException if the provided skip length is negative<a name="line.202"></a> +<span class="sourceLineNo">203</span> * @since 1.7<a name="line.203"></a> +<span class="sourceLineNo">204</span> */<a name="line.204"></a> +<span class="sourceLineNo">205</span> @Override<a name="line.205"></a> +<span class="sourceLineNo">206</span> public long skip(final long n) throws IOException {<a name="line.206"></a> +<span class="sourceLineNo">207</span> if (n < 0) {<a name="line.207"></a> +<span class="sourceLineNo">208</span> throw new IllegalArgumentException("Negative skip length: " + n);<a name="line.208"></a> +<span class="sourceLineNo">209</span> }<a name="line.209"></a> +<span class="sourceLineNo">210</span><a name="line.210"></a> +<span class="sourceLineNo">211</span> // skip in chunks of 512 bytes<a name="line.211"></a> +<span class="sourceLineNo">212</span> final byte[] b = new byte[512];<a name="line.212"></a> +<span class="sourceLineNo">213</span> long todo = n;<a name="line.213"></a> +<span class="sourceLineNo">214</span><a name="line.214"></a> +<span class="sourceLineNo">215</span> while (todo > 0) {<a name="line.215"></a> +<span class="sourceLineNo">216</span> int len = (int) Math.min(b.length, todo);<a name="line.216"></a> +<span class="sourceLineNo">217</span> len = this.read(b, 0, len);<a name="line.217"></a> +<span class="sourceLineNo">218</span> if (len == EOF) {<a name="line.218"></a> +<span class="sourceLineNo">219</span> break;<a name="line.219"></a> +<span class="sourceLineNo">220</span> }<a name="line.220"></a> +<span class="sourceLineNo">221</span> todo -= len;<a name="line.221"></a> +<span class="sourceLineNo">222</span> }<a name="line.222"></a> +<span class="sourceLineNo">223</span><a name="line.223"></a> +<span class="sourceLineNo">224</span> return n - todo;<a name="line.224"></a> +<span class="sourceLineNo">225</span> }<a name="line.225"></a> +<span class="sourceLineNo">226</span>}<a name="line.226"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BaseNCodecOutputStream.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BaseNCodecOutputStream.html new file mode 100644 index 0000000000000000000000000000000000000000..01ea2839302515400e3367cce2f19eaf43fbdab4 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BaseNCodecOutputStream.html @@ -0,0 +1,267 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import static org.apache.commons.codec.binary.BaseNCodec.EOF;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.io.FilterOutputStream;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.io.IOException;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.io.OutputStream;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.Objects;<a name="line.25"></a> +<span class="sourceLineNo">026</span><a name="line.26"></a> +<span class="sourceLineNo">027</span>import org.apache.commons.codec.binary.BaseNCodec.Context;<a name="line.27"></a> +<span class="sourceLineNo">028</span><a name="line.28"></a> +<span class="sourceLineNo">029</span>/**<a name="line.29"></a> +<span class="sourceLineNo">030</span> * Abstract superclass for Base-N output streams.<a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * To write the EOF marker without closing the stream, call {@link #eof()} or use an <a<a name="line.32"></a> +<span class="sourceLineNo">033</span> * href="https://commons.apache.org/proper/commons-io/">Apache Commons IO</a> <a href=<a name="line.33"></a> +<span class="sourceLineNo">034</span> * "https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/output/CloseShieldOutputStream.html"<a name="line.34"></a> +<span class="sourceLineNo">035</span> * >CloseShieldOutputStream</a>.<a name="line.35"></a> +<span class="sourceLineNo">036</span> * </p><a name="line.36"></a> +<span class="sourceLineNo">037</span> *<a name="line.37"></a> +<span class="sourceLineNo">038</span> * @since 1.5<a name="line.38"></a> +<span class="sourceLineNo">039</span> */<a name="line.39"></a> +<span class="sourceLineNo">040</span>public class BaseNCodecOutputStream extends FilterOutputStream {<a name="line.40"></a> +<span class="sourceLineNo">041</span><a name="line.41"></a> +<span class="sourceLineNo">042</span> private final boolean doEncode;<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> +<span class="sourceLineNo">044</span> private final BaseNCodec baseNCodec;<a name="line.44"></a> +<span class="sourceLineNo">045</span><a name="line.45"></a> +<span class="sourceLineNo">046</span> private final byte[] singleByte = new byte[1];<a name="line.46"></a> +<span class="sourceLineNo">047</span><a name="line.47"></a> +<span class="sourceLineNo">048</span> private final Context context = new Context();<a name="line.48"></a> +<span class="sourceLineNo">049</span><a name="line.49"></a> +<span class="sourceLineNo">050</span> /**<a name="line.50"></a> +<span class="sourceLineNo">051</span> * TODO should this be protected?<a name="line.51"></a> +<span class="sourceLineNo">052</span> *<a name="line.52"></a> +<span class="sourceLineNo">053</span> * @param output the underlying output or null.<a name="line.53"></a> +<span class="sourceLineNo">054</span> * @param basedCodec a BaseNCodec.<a name="line.54"></a> +<span class="sourceLineNo">055</span> * @param doEncode true to encode, false to decode, TODO should be an enum?<a name="line.55"></a> +<span class="sourceLineNo">056</span> */<a name="line.56"></a> +<span class="sourceLineNo">057</span> public BaseNCodecOutputStream(final OutputStream output, final BaseNCodec basedCodec, final boolean doEncode) {<a name="line.57"></a> +<span class="sourceLineNo">058</span> super(output);<a name="line.58"></a> +<span class="sourceLineNo">059</span> this.baseNCodec = basedCodec;<a name="line.59"></a> +<span class="sourceLineNo">060</span> this.doEncode = doEncode;<a name="line.60"></a> +<span class="sourceLineNo">061</span> }<a name="line.61"></a> +<span class="sourceLineNo">062</span><a name="line.62"></a> +<span class="sourceLineNo">063</span> /**<a name="line.63"></a> +<span class="sourceLineNo">064</span> * Closes this output stream and releases any system resources associated with the stream.<a name="line.64"></a> +<span class="sourceLineNo">065</span> * <p><a name="line.65"></a> +<span class="sourceLineNo">066</span> * To write the EOF marker without closing the stream, call {@link #eof()} or use an<a name="line.66"></a> +<span class="sourceLineNo">067</span> * <a href="https://commons.apache.org/proper/commons-io/">Apache Commons IO</a> <a href=<a name="line.67"></a> +<span class="sourceLineNo">068</span> * "https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/output/CloseShieldOutputStream.html"<a name="line.68"></a> +<span class="sourceLineNo">069</span> * >CloseShieldOutputStream</a>.<a name="line.69"></a> +<span class="sourceLineNo">070</span> * </p><a name="line.70"></a> +<span class="sourceLineNo">071</span> *<a name="line.71"></a> +<span class="sourceLineNo">072</span> * @throws IOException<a name="line.72"></a> +<span class="sourceLineNo">073</span> * if an I/O error occurs.<a name="line.73"></a> +<span class="sourceLineNo">074</span> */<a name="line.74"></a> +<span class="sourceLineNo">075</span> @Override<a name="line.75"></a> +<span class="sourceLineNo">076</span> public void close() throws IOException {<a name="line.76"></a> +<span class="sourceLineNo">077</span> eof();<a name="line.77"></a> +<span class="sourceLineNo">078</span> flush();<a name="line.78"></a> +<span class="sourceLineNo">079</span> out.close();<a name="line.79"></a> +<span class="sourceLineNo">080</span> }<a name="line.80"></a> +<span class="sourceLineNo">081</span><a name="line.81"></a> +<span class="sourceLineNo">082</span> /**<a name="line.82"></a> +<span class="sourceLineNo">083</span> * Writes EOF.<a name="line.83"></a> +<span class="sourceLineNo">084</span> *<a name="line.84"></a> +<span class="sourceLineNo">085</span> * @throws IOException<a name="line.85"></a> +<span class="sourceLineNo">086</span> * if an I/O error occurs.<a name="line.86"></a> +<span class="sourceLineNo">087</span> * @since 1.11<a name="line.87"></a> +<span class="sourceLineNo">088</span> */<a name="line.88"></a> +<span class="sourceLineNo">089</span> public void eof() throws IOException {<a name="line.89"></a> +<span class="sourceLineNo">090</span> // Notify encoder of EOF (-1).<a name="line.90"></a> +<span class="sourceLineNo">091</span> if (doEncode) {<a name="line.91"></a> +<span class="sourceLineNo">092</span> baseNCodec.encode(singleByte, 0, EOF, context);<a name="line.92"></a> +<span class="sourceLineNo">093</span> } else {<a name="line.93"></a> +<span class="sourceLineNo">094</span> baseNCodec.decode(singleByte, 0, EOF, context);<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span> }<a name="line.96"></a> +<span class="sourceLineNo">097</span><a name="line.97"></a> +<span class="sourceLineNo">098</span> /**<a name="line.98"></a> +<span class="sourceLineNo">099</span> * Flushes this output stream and forces any buffered output bytes to be written out to the stream.<a name="line.99"></a> +<span class="sourceLineNo">100</span> *<a name="line.100"></a> +<span class="sourceLineNo">101</span> * @throws IOException<a name="line.101"></a> +<span class="sourceLineNo">102</span> * if an I/O error occurs.<a name="line.102"></a> +<span class="sourceLineNo">103</span> */<a name="line.103"></a> +<span class="sourceLineNo">104</span> @Override<a name="line.104"></a> +<span class="sourceLineNo">105</span> public void flush() throws IOException {<a name="line.105"></a> +<span class="sourceLineNo">106</span> flush(true);<a name="line.106"></a> +<span class="sourceLineNo">107</span> }<a name="line.107"></a> +<span class="sourceLineNo">108</span><a name="line.108"></a> +<span class="sourceLineNo">109</span> /**<a name="line.109"></a> +<span class="sourceLineNo">110</span> * Flushes this output stream and forces any buffered output bytes to be written out to the stream. If propagate is<a name="line.110"></a> +<span class="sourceLineNo">111</span> * true, the wrapped stream will also be flushed.<a name="line.111"></a> +<span class="sourceLineNo">112</span> *<a name="line.112"></a> +<span class="sourceLineNo">113</span> * @param propagate<a name="line.113"></a> +<span class="sourceLineNo">114</span> * boolean flag to indicate whether the wrapped OutputStream should also be flushed.<a name="line.114"></a> +<span class="sourceLineNo">115</span> * @throws IOException<a name="line.115"></a> +<span class="sourceLineNo">116</span> * if an I/O error occurs.<a name="line.116"></a> +<span class="sourceLineNo">117</span> */<a name="line.117"></a> +<span class="sourceLineNo">118</span> private void flush(final boolean propagate) throws IOException {<a name="line.118"></a> +<span class="sourceLineNo">119</span> final int avail = baseNCodec.available(context);<a name="line.119"></a> +<span class="sourceLineNo">120</span> if (avail > 0) {<a name="line.120"></a> +<span class="sourceLineNo">121</span> final byte[] buf = new byte[avail];<a name="line.121"></a> +<span class="sourceLineNo">122</span> final int c = baseNCodec.readResults(buf, 0, avail, context);<a name="line.122"></a> +<span class="sourceLineNo">123</span> if (c > 0) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> out.write(buf, 0, c);<a name="line.124"></a> +<span class="sourceLineNo">125</span> }<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span> if (propagate) {<a name="line.127"></a> +<span class="sourceLineNo">128</span> out.flush();<a name="line.128"></a> +<span class="sourceLineNo">129</span> }<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> /**<a name="line.132"></a> +<span class="sourceLineNo">133</span> * Returns true if decoding behavior is strict. Decoding will raise an<a name="line.133"></a> +<span class="sourceLineNo">134</span> * {@link IllegalArgumentException} if trailing bits are not part of a valid encoding.<a name="line.134"></a> +<span class="sourceLineNo">135</span> *<a name="line.135"></a> +<span class="sourceLineNo">136</span> * <p>The default is false for lenient encoding. Decoding will compose trailing bits<a name="line.136"></a> +<span class="sourceLineNo">137</span> * into 8-bit bytes and discard the remainder.<a name="line.137"></a> +<span class="sourceLineNo">138</span> *<a name="line.138"></a> +<span class="sourceLineNo">139</span> * @return true if using strict decoding<a name="line.139"></a> +<span class="sourceLineNo">140</span> * @since 1.15<a name="line.140"></a> +<span class="sourceLineNo">141</span> */<a name="line.141"></a> +<span class="sourceLineNo">142</span> public boolean isStrictDecoding() {<a name="line.142"></a> +<span class="sourceLineNo">143</span> return baseNCodec.isStrictDecoding();<a name="line.143"></a> +<span class="sourceLineNo">144</span> }<a name="line.144"></a> +<span class="sourceLineNo">145</span><a name="line.145"></a> +<span class="sourceLineNo">146</span> /**<a name="line.146"></a> +<span class="sourceLineNo">147</span> * Writes {@code len} bytes from the specified {@code b} array starting at {@code offset} to this<a name="line.147"></a> +<span class="sourceLineNo">148</span> * output stream.<a name="line.148"></a> +<span class="sourceLineNo">149</span> *<a name="line.149"></a> +<span class="sourceLineNo">150</span> * @param array<a name="line.150"></a> +<span class="sourceLineNo">151</span> * source byte array<a name="line.151"></a> +<span class="sourceLineNo">152</span> * @param offset<a name="line.152"></a> +<span class="sourceLineNo">153</span> * where to start reading the bytes<a name="line.153"></a> +<span class="sourceLineNo">154</span> * @param len<a name="line.154"></a> +<span class="sourceLineNo">155</span> * maximum number of bytes to write<a name="line.155"></a> +<span class="sourceLineNo">156</span> *<a name="line.156"></a> +<span class="sourceLineNo">157</span> * @throws IOException<a name="line.157"></a> +<span class="sourceLineNo">158</span> * if an I/O error occurs.<a name="line.158"></a> +<span class="sourceLineNo">159</span> * @throws NullPointerException<a name="line.159"></a> +<span class="sourceLineNo">160</span> * if the byte array parameter is null<a name="line.160"></a> +<span class="sourceLineNo">161</span> * @throws IndexOutOfBoundsException<a name="line.161"></a> +<span class="sourceLineNo">162</span> * if offset, len or buffer size are invalid<a name="line.162"></a> +<span class="sourceLineNo">163</span> */<a name="line.163"></a> +<span class="sourceLineNo">164</span> @Override<a name="line.164"></a> +<span class="sourceLineNo">165</span> public void write(final byte array[], final int offset, final int len) throws IOException {<a name="line.165"></a> +<span class="sourceLineNo">166</span> Objects.requireNonNull(array, "array");<a name="line.166"></a> +<span class="sourceLineNo">167</span> if (offset < 0 || len < 0) {<a name="line.167"></a> +<span class="sourceLineNo">168</span> throw new IndexOutOfBoundsException();<a name="line.168"></a> +<span class="sourceLineNo">169</span> } else if (offset > array.length || offset + len > array.length) {<a name="line.169"></a> +<span class="sourceLineNo">170</span> throw new IndexOutOfBoundsException();<a name="line.170"></a> +<span class="sourceLineNo">171</span> } else if (len > 0) {<a name="line.171"></a> +<span class="sourceLineNo">172</span> if (doEncode) {<a name="line.172"></a> +<span class="sourceLineNo">173</span> baseNCodec.encode(array, offset, len, context);<a name="line.173"></a> +<span class="sourceLineNo">174</span> } else {<a name="line.174"></a> +<span class="sourceLineNo">175</span> baseNCodec.decode(array, offset, len, context);<a name="line.175"></a> +<span class="sourceLineNo">176</span> }<a name="line.176"></a> +<span class="sourceLineNo">177</span> flush(false);<a name="line.177"></a> +<span class="sourceLineNo">178</span> }<a name="line.178"></a> +<span class="sourceLineNo">179</span> }<a name="line.179"></a> +<span class="sourceLineNo">180</span><a name="line.180"></a> +<span class="sourceLineNo">181</span> /**<a name="line.181"></a> +<span class="sourceLineNo">182</span> * Writes the specified {@code byte} to this output stream.<a name="line.182"></a> +<span class="sourceLineNo">183</span> *<a name="line.183"></a> +<span class="sourceLineNo">184</span> * @param i<a name="line.184"></a> +<span class="sourceLineNo">185</span> * source byte<a name="line.185"></a> +<span class="sourceLineNo">186</span> * @throws IOException<a name="line.186"></a> +<span class="sourceLineNo">187</span> * if an I/O error occurs.<a name="line.187"></a> +<span class="sourceLineNo">188</span> */<a name="line.188"></a> +<span class="sourceLineNo">189</span> @Override<a name="line.189"></a> +<span class="sourceLineNo">190</span> public void write(final int i) throws IOException {<a name="line.190"></a> +<span class="sourceLineNo">191</span> singleByte[0] = (byte) i;<a name="line.191"></a> +<span class="sourceLineNo">192</span> write(singleByte, 0, 1);<a name="line.192"></a> +<span class="sourceLineNo">193</span> }<a name="line.193"></a> +<span class="sourceLineNo">194</span><a name="line.194"></a> +<span class="sourceLineNo">195</span>}<a name="line.195"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BinaryCodec.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BinaryCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..9c49bb511bb17ed33f8dca12a0458b6dbd3dc7e8 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/BinaryCodec.html @@ -0,0 +1,372 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.BinaryDecoder;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import org.apache.commons.codec.BinaryEncoder;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import org.apache.commons.codec.DecoderException;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import org.apache.commons.codec.EncoderException;<a name="line.23"></a> +<span class="sourceLineNo">024</span><a name="line.24"></a> +<span class="sourceLineNo">025</span>/**<a name="line.25"></a> +<span class="sourceLineNo">026</span> * Converts between byte arrays and strings of "0"s and "1"s.<a name="line.26"></a> +<span class="sourceLineNo">027</span> *<a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p>This class is immutable and thread-safe.</p><a name="line.28"></a> +<span class="sourceLineNo">029</span> *<a name="line.29"></a> +<span class="sourceLineNo">030</span> * TODO: may want to add more bit vector functions like and/or/xor/nand<a name="line.30"></a> +<span class="sourceLineNo">031</span> * TODO: also might be good to generate boolean[] from byte[] et cetera.<a name="line.31"></a> +<span class="sourceLineNo">032</span> *<a name="line.32"></a> +<span class="sourceLineNo">033</span> * @since 1.3<a name="line.33"></a> +<span class="sourceLineNo">034</span> */<a name="line.34"></a> +<span class="sourceLineNo">035</span>public class BinaryCodec implements BinaryDecoder, BinaryEncoder {<a name="line.35"></a> +<span class="sourceLineNo">036</span> /*<a name="line.36"></a> +<span class="sourceLineNo">037</span> * tried to avoid using ArrayUtils to minimize dependencies while using these empty arrays - dep is just not worth<a name="line.37"></a> +<span class="sourceLineNo">038</span> * it.<a name="line.38"></a> +<span class="sourceLineNo">039</span> */<a name="line.39"></a> +<span class="sourceLineNo">040</span> /** Empty char array. */<a name="line.40"></a> +<span class="sourceLineNo">041</span> private static final char[] EMPTY_CHAR_ARRAY = new char[0];<a name="line.41"></a> +<span class="sourceLineNo">042</span><a name="line.42"></a> +<span class="sourceLineNo">043</span> /** Empty byte array. */<a name="line.43"></a> +<span class="sourceLineNo">044</span> private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];<a name="line.44"></a> +<span class="sourceLineNo">045</span><a name="line.45"></a> +<span class="sourceLineNo">046</span> /** Mask for bit 0 of a byte. */<a name="line.46"></a> +<span class="sourceLineNo">047</span> private static final int BIT_0 = 1;<a name="line.47"></a> +<span class="sourceLineNo">048</span><a name="line.48"></a> +<span class="sourceLineNo">049</span> /** Mask for bit 1 of a byte. */<a name="line.49"></a> +<span class="sourceLineNo">050</span> private static final int BIT_1 = 0x02;<a name="line.50"></a> +<span class="sourceLineNo">051</span><a name="line.51"></a> +<span class="sourceLineNo">052</span> /** Mask for bit 2 of a byte. */<a name="line.52"></a> +<span class="sourceLineNo">053</span> private static final int BIT_2 = 0x04;<a name="line.53"></a> +<span class="sourceLineNo">054</span><a name="line.54"></a> +<span class="sourceLineNo">055</span> /** Mask for bit 3 of a byte. */<a name="line.55"></a> +<span class="sourceLineNo">056</span> private static final int BIT_3 = 0x08;<a name="line.56"></a> +<span class="sourceLineNo">057</span><a name="line.57"></a> +<span class="sourceLineNo">058</span> /** Mask for bit 4 of a byte. */<a name="line.58"></a> +<span class="sourceLineNo">059</span> private static final int BIT_4 = 0x10;<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> /** Mask for bit 5 of a byte. */<a name="line.61"></a> +<span class="sourceLineNo">062</span> private static final int BIT_5 = 0x20;<a name="line.62"></a> +<span class="sourceLineNo">063</span><a name="line.63"></a> +<span class="sourceLineNo">064</span> /** Mask for bit 6 of a byte. */<a name="line.64"></a> +<span class="sourceLineNo">065</span> private static final int BIT_6 = 0x40;<a name="line.65"></a> +<span class="sourceLineNo">066</span><a name="line.66"></a> +<span class="sourceLineNo">067</span> /** Mask for bit 7 of a byte. */<a name="line.67"></a> +<span class="sourceLineNo">068</span> private static final int BIT_7 = 0x80;<a name="line.68"></a> +<span class="sourceLineNo">069</span><a name="line.69"></a> +<span class="sourceLineNo">070</span> private static final int[] BITS = {BIT_0, BIT_1, BIT_2, BIT_3, BIT_4, BIT_5, BIT_6, BIT_7};<a name="line.70"></a> +<span class="sourceLineNo">071</span><a name="line.71"></a> +<span class="sourceLineNo">072</span> /**<a name="line.72"></a> +<span class="sourceLineNo">073</span> * Decodes a byte array where each byte represents an ASCII '0' or '1'.<a name="line.73"></a> +<span class="sourceLineNo">074</span> *<a name="line.74"></a> +<span class="sourceLineNo">075</span> * @param ascii<a name="line.75"></a> +<span class="sourceLineNo">076</span> * each byte represents an ASCII '0' or '1'<a name="line.76"></a> +<span class="sourceLineNo">077</span> * @return the raw encoded binary where each bit corresponds to a byte in the byte array argument<a name="line.77"></a> +<span class="sourceLineNo">078</span> */<a name="line.78"></a> +<span class="sourceLineNo">079</span> public static byte[] fromAscii(final byte[] ascii) {<a name="line.79"></a> +<span class="sourceLineNo">080</span> if (isEmpty(ascii)) {<a name="line.80"></a> +<span class="sourceLineNo">081</span> return EMPTY_BYTE_ARRAY;<a name="line.81"></a> +<span class="sourceLineNo">082</span> }<a name="line.82"></a> +<span class="sourceLineNo">083</span> // get length/8 times bytes with 3 bit shifts to the right of the length<a name="line.83"></a> +<span class="sourceLineNo">084</span> final byte[] l_raw = new byte[ascii.length >> 3];<a name="line.84"></a> +<span class="sourceLineNo">085</span> /*<a name="line.85"></a> +<span class="sourceLineNo">086</span> * We decr index jj by 8 as we go along to not recompute indices using multiplication every time inside the<a name="line.86"></a> +<span class="sourceLineNo">087</span> * loop.<a name="line.87"></a> +<span class="sourceLineNo">088</span> */<a name="line.88"></a> +<span class="sourceLineNo">089</span> for (int ii = 0, jj = ascii.length - 1; ii < l_raw.length; ii++, jj -= 8) {<a name="line.89"></a> +<span class="sourceLineNo">090</span> for (int bits = 0; bits < BITS.length; ++bits) {<a name="line.90"></a> +<span class="sourceLineNo">091</span> if (ascii[jj - bits] == '1') {<a name="line.91"></a> +<span class="sourceLineNo">092</span> l_raw[ii] |= BITS[bits];<a name="line.92"></a> +<span class="sourceLineNo">093</span> }<a name="line.93"></a> +<span class="sourceLineNo">094</span> }<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span> return l_raw;<a name="line.96"></a> +<span class="sourceLineNo">097</span> }<a name="line.97"></a> +<span class="sourceLineNo">098</span><a name="line.98"></a> +<span class="sourceLineNo">099</span> // ------------------------------------------------------------------------<a name="line.99"></a> +<span class="sourceLineNo">100</span> //<a name="line.100"></a> +<span class="sourceLineNo">101</span> // static codec operations<a name="line.101"></a> +<span class="sourceLineNo">102</span> //<a name="line.102"></a> +<span class="sourceLineNo">103</span> // ------------------------------------------------------------------------<a name="line.103"></a> +<span class="sourceLineNo">104</span> /**<a name="line.104"></a> +<span class="sourceLineNo">105</span> * Decodes a char array where each char represents an ASCII '0' or '1'.<a name="line.105"></a> +<span class="sourceLineNo">106</span> *<a name="line.106"></a> +<span class="sourceLineNo">107</span> * @param ascii<a name="line.107"></a> +<span class="sourceLineNo">108</span> * each char represents an ASCII '0' or '1'<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @return the raw encoded binary where each bit corresponds to a char in the char array argument<a name="line.109"></a> +<span class="sourceLineNo">110</span> */<a name="line.110"></a> +<span class="sourceLineNo">111</span> public static byte[] fromAscii(final char[] ascii) {<a name="line.111"></a> +<span class="sourceLineNo">112</span> if (ascii == null || ascii.length == 0) {<a name="line.112"></a> +<span class="sourceLineNo">113</span> return EMPTY_BYTE_ARRAY;<a name="line.113"></a> +<span class="sourceLineNo">114</span> }<a name="line.114"></a> +<span class="sourceLineNo">115</span> // get length/8 times bytes with 3 bit shifts to the right of the length<a name="line.115"></a> +<span class="sourceLineNo">116</span> final byte[] l_raw = new byte[ascii.length >> 3];<a name="line.116"></a> +<span class="sourceLineNo">117</span> /*<a name="line.117"></a> +<span class="sourceLineNo">118</span> * We decr index jj by 8 as we go along to not recompute indices using multiplication every time inside the<a name="line.118"></a> +<span class="sourceLineNo">119</span> * loop.<a name="line.119"></a> +<span class="sourceLineNo">120</span> */<a name="line.120"></a> +<span class="sourceLineNo">121</span> for (int ii = 0, jj = ascii.length - 1; ii < l_raw.length; ii++, jj -= 8) {<a name="line.121"></a> +<span class="sourceLineNo">122</span> for (int bits = 0; bits < BITS.length; ++bits) {<a name="line.122"></a> +<span class="sourceLineNo">123</span> if (ascii[jj - bits] == '1') {<a name="line.123"></a> +<span class="sourceLineNo">124</span> l_raw[ii] |= BITS[bits];<a name="line.124"></a> +<span class="sourceLineNo">125</span> }<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span> }<a name="line.127"></a> +<span class="sourceLineNo">128</span> return l_raw;<a name="line.128"></a> +<span class="sourceLineNo">129</span> }<a name="line.129"></a> +<span class="sourceLineNo">130</span><a name="line.130"></a> +<span class="sourceLineNo">131</span> /**<a name="line.131"></a> +<span class="sourceLineNo">132</span> * Returns {@code true} if the given array is {@code null} or empty (size 0.)<a name="line.132"></a> +<span class="sourceLineNo">133</span> *<a name="line.133"></a> +<span class="sourceLineNo">134</span> * @param array<a name="line.134"></a> +<span class="sourceLineNo">135</span> * the source array<a name="line.135"></a> +<span class="sourceLineNo">136</span> * @return {@code true} if the given array is {@code null} or empty (size 0.)<a name="line.136"></a> +<span class="sourceLineNo">137</span> */<a name="line.137"></a> +<span class="sourceLineNo">138</span> private static boolean isEmpty(final byte[] array) {<a name="line.138"></a> +<span class="sourceLineNo">139</span> return array == null || array.length == 0;<a name="line.139"></a> +<span class="sourceLineNo">140</span> }<a name="line.140"></a> +<span class="sourceLineNo">141</span><a name="line.141"></a> +<span class="sourceLineNo">142</span> /**<a name="line.142"></a> +<span class="sourceLineNo">143</span> * Converts an array of raw binary data into an array of ASCII 0 and 1 character bytes - each byte is a truncated<a name="line.143"></a> +<span class="sourceLineNo">144</span> * char.<a name="line.144"></a> +<span class="sourceLineNo">145</span> *<a name="line.145"></a> +<span class="sourceLineNo">146</span> * @param raw<a name="line.146"></a> +<span class="sourceLineNo">147</span> * the raw binary data to convert<a name="line.147"></a> +<span class="sourceLineNo">148</span> * @return an array of 0 and 1 character bytes for each bit of the argument<a name="line.148"></a> +<span class="sourceLineNo">149</span> * @see org.apache.commons.codec.BinaryEncoder#encode(byte[])<a name="line.149"></a> +<span class="sourceLineNo">150</span> */<a name="line.150"></a> +<span class="sourceLineNo">151</span> public static byte[] toAsciiBytes(final byte[] raw) {<a name="line.151"></a> +<span class="sourceLineNo">152</span> if (isEmpty(raw)) {<a name="line.152"></a> +<span class="sourceLineNo">153</span> return EMPTY_BYTE_ARRAY;<a name="line.153"></a> +<span class="sourceLineNo">154</span> }<a name="line.154"></a> +<span class="sourceLineNo">155</span> // get 8 times the bytes with 3 bit shifts to the left of the length<a name="line.155"></a> +<span class="sourceLineNo">156</span> final byte[] l_ascii = new byte[raw.length << 3];<a name="line.156"></a> +<span class="sourceLineNo">157</span> /*<a name="line.157"></a> +<span class="sourceLineNo">158</span> * We decr index jj by 8 as we go along to not recompute indices using multiplication every time inside the<a name="line.158"></a> +<span class="sourceLineNo">159</span> * loop.<a name="line.159"></a> +<span class="sourceLineNo">160</span> */<a name="line.160"></a> +<span class="sourceLineNo">161</span> for (int ii = 0, jj = l_ascii.length - 1; ii < raw.length; ii++, jj -= 8) {<a name="line.161"></a> +<span class="sourceLineNo">162</span> for (int bits = 0; bits < BITS.length; ++bits) {<a name="line.162"></a> +<span class="sourceLineNo">163</span> if ((raw[ii] & BITS[bits]) == 0) {<a name="line.163"></a> +<span class="sourceLineNo">164</span> l_ascii[jj - bits] = '0';<a name="line.164"></a> +<span class="sourceLineNo">165</span> } else {<a name="line.165"></a> +<span class="sourceLineNo">166</span> l_ascii[jj - bits] = '1';<a name="line.166"></a> +<span class="sourceLineNo">167</span> }<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span> }<a name="line.169"></a> +<span class="sourceLineNo">170</span> return l_ascii;<a name="line.170"></a> +<span class="sourceLineNo">171</span> }<a name="line.171"></a> +<span class="sourceLineNo">172</span><a name="line.172"></a> +<span class="sourceLineNo">173</span> /**<a name="line.173"></a> +<span class="sourceLineNo">174</span> * Converts an array of raw binary data into an array of ASCII 0 and 1 characters.<a name="line.174"></a> +<span class="sourceLineNo">175</span> *<a name="line.175"></a> +<span class="sourceLineNo">176</span> * @param raw<a name="line.176"></a> +<span class="sourceLineNo">177</span> * the raw binary data to convert<a name="line.177"></a> +<span class="sourceLineNo">178</span> * @return an array of 0 and 1 characters for each bit of the argument<a name="line.178"></a> +<span class="sourceLineNo">179</span> * @see org.apache.commons.codec.BinaryEncoder#encode(byte[])<a name="line.179"></a> +<span class="sourceLineNo">180</span> */<a name="line.180"></a> +<span class="sourceLineNo">181</span> public static char[] toAsciiChars(final byte[] raw) {<a name="line.181"></a> +<span class="sourceLineNo">182</span> if (isEmpty(raw)) {<a name="line.182"></a> +<span class="sourceLineNo">183</span> return EMPTY_CHAR_ARRAY;<a name="line.183"></a> +<span class="sourceLineNo">184</span> }<a name="line.184"></a> +<span class="sourceLineNo">185</span> // get 8 times the bytes with 3 bit shifts to the left of the length<a name="line.185"></a> +<span class="sourceLineNo">186</span> final char[] l_ascii = new char[raw.length << 3];<a name="line.186"></a> +<span class="sourceLineNo">187</span> /*<a name="line.187"></a> +<span class="sourceLineNo">188</span> * We decr index jj by 8 as we go along to not recompute indices using multiplication every time inside the<a name="line.188"></a> +<span class="sourceLineNo">189</span> * loop.<a name="line.189"></a> +<span class="sourceLineNo">190</span> */<a name="line.190"></a> +<span class="sourceLineNo">191</span> for (int ii = 0, jj = l_ascii.length - 1; ii < raw.length; ii++, jj -= 8) {<a name="line.191"></a> +<span class="sourceLineNo">192</span> for (int bits = 0; bits < BITS.length; ++bits) {<a name="line.192"></a> +<span class="sourceLineNo">193</span> if ((raw[ii] & BITS[bits]) == 0) {<a name="line.193"></a> +<span class="sourceLineNo">194</span> l_ascii[jj - bits] = '0';<a name="line.194"></a> +<span class="sourceLineNo">195</span> } else {<a name="line.195"></a> +<span class="sourceLineNo">196</span> l_ascii[jj - bits] = '1';<a name="line.196"></a> +<span class="sourceLineNo">197</span> }<a name="line.197"></a> +<span class="sourceLineNo">198</span> }<a name="line.198"></a> +<span class="sourceLineNo">199</span> }<a name="line.199"></a> +<span class="sourceLineNo">200</span> return l_ascii;<a name="line.200"></a> +<span class="sourceLineNo">201</span> }<a name="line.201"></a> +<span class="sourceLineNo">202</span><a name="line.202"></a> +<span class="sourceLineNo">203</span> /**<a name="line.203"></a> +<span class="sourceLineNo">204</span> * Converts an array of raw binary data into a String of ASCII 0 and 1 characters.<a name="line.204"></a> +<span class="sourceLineNo">205</span> *<a name="line.205"></a> +<span class="sourceLineNo">206</span> * @param raw<a name="line.206"></a> +<span class="sourceLineNo">207</span> * the raw binary data to convert<a name="line.207"></a> +<span class="sourceLineNo">208</span> * @return a String of 0 and 1 characters representing the binary data<a name="line.208"></a> +<span class="sourceLineNo">209</span> * @see org.apache.commons.codec.BinaryEncoder#encode(byte[])<a name="line.209"></a> +<span class="sourceLineNo">210</span> */<a name="line.210"></a> +<span class="sourceLineNo">211</span> public static String toAsciiString(final byte[] raw) {<a name="line.211"></a> +<span class="sourceLineNo">212</span> return new String(toAsciiChars(raw));<a name="line.212"></a> +<span class="sourceLineNo">213</span> }<a name="line.213"></a> +<span class="sourceLineNo">214</span><a name="line.214"></a> +<span class="sourceLineNo">215</span> /**<a name="line.215"></a> +<span class="sourceLineNo">216</span> * Decodes a byte array where each byte represents an ASCII '0' or '1'.<a name="line.216"></a> +<span class="sourceLineNo">217</span> *<a name="line.217"></a> +<span class="sourceLineNo">218</span> * @param ascii<a name="line.218"></a> +<span class="sourceLineNo">219</span> * each byte represents an ASCII '0' or '1'<a name="line.219"></a> +<span class="sourceLineNo">220</span> * @return the raw encoded binary where each bit corresponds to a byte in the byte array argument<a name="line.220"></a> +<span class="sourceLineNo">221</span> * @see org.apache.commons.codec.Decoder#decode(Object)<a name="line.221"></a> +<span class="sourceLineNo">222</span> */<a name="line.222"></a> +<span class="sourceLineNo">223</span> @Override<a name="line.223"></a> +<span class="sourceLineNo">224</span> public byte[] decode(final byte[] ascii) {<a name="line.224"></a> +<span class="sourceLineNo">225</span> return fromAscii(ascii);<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span><a name="line.227"></a> +<span class="sourceLineNo">228</span> /**<a name="line.228"></a> +<span class="sourceLineNo">229</span> * Decodes a byte array where each byte represents an ASCII '0' or '1'.<a name="line.229"></a> +<span class="sourceLineNo">230</span> *<a name="line.230"></a> +<span class="sourceLineNo">231</span> * @param ascii<a name="line.231"></a> +<span class="sourceLineNo">232</span> * each byte represents an ASCII '0' or '1'<a name="line.232"></a> +<span class="sourceLineNo">233</span> * @return the raw encoded binary where each bit corresponds to a byte in the byte array argument<a name="line.233"></a> +<span class="sourceLineNo">234</span> * @throws DecoderException<a name="line.234"></a> +<span class="sourceLineNo">235</span> * if argument is not a byte[], char[] or String<a name="line.235"></a> +<span class="sourceLineNo">236</span> * @see org.apache.commons.codec.Decoder#decode(Object)<a name="line.236"></a> +<span class="sourceLineNo">237</span> */<a name="line.237"></a> +<span class="sourceLineNo">238</span> @Override<a name="line.238"></a> +<span class="sourceLineNo">239</span> public Object decode(final Object ascii) throws DecoderException {<a name="line.239"></a> +<span class="sourceLineNo">240</span> if (ascii == null) {<a name="line.240"></a> +<span class="sourceLineNo">241</span> return EMPTY_BYTE_ARRAY;<a name="line.241"></a> +<span class="sourceLineNo">242</span> }<a name="line.242"></a> +<span class="sourceLineNo">243</span> if (ascii instanceof byte[]) {<a name="line.243"></a> +<span class="sourceLineNo">244</span> return fromAscii((byte[]) ascii);<a name="line.244"></a> +<span class="sourceLineNo">245</span> }<a name="line.245"></a> +<span class="sourceLineNo">246</span> if (ascii instanceof char[]) {<a name="line.246"></a> +<span class="sourceLineNo">247</span> return fromAscii((char[]) ascii);<a name="line.247"></a> +<span class="sourceLineNo">248</span> }<a name="line.248"></a> +<span class="sourceLineNo">249</span> if (ascii instanceof String) {<a name="line.249"></a> +<span class="sourceLineNo">250</span> return fromAscii(((String) ascii).toCharArray());<a name="line.250"></a> +<span class="sourceLineNo">251</span> }<a name="line.251"></a> +<span class="sourceLineNo">252</span> throw new DecoderException("argument not a byte array");<a name="line.252"></a> +<span class="sourceLineNo">253</span> }<a name="line.253"></a> +<span class="sourceLineNo">254</span><a name="line.254"></a> +<span class="sourceLineNo">255</span> /**<a name="line.255"></a> +<span class="sourceLineNo">256</span> * Converts an array of raw binary data into an array of ASCII 0 and 1 characters.<a name="line.256"></a> +<span class="sourceLineNo">257</span> *<a name="line.257"></a> +<span class="sourceLineNo">258</span> * @param raw<a name="line.258"></a> +<span class="sourceLineNo">259</span> * the raw binary data to convert<a name="line.259"></a> +<span class="sourceLineNo">260</span> * @return 0 and 1 ASCII character bytes one for each bit of the argument<a name="line.260"></a> +<span class="sourceLineNo">261</span> * @see org.apache.commons.codec.BinaryEncoder#encode(byte[])<a name="line.261"></a> +<span class="sourceLineNo">262</span> */<a name="line.262"></a> +<span class="sourceLineNo">263</span> @Override<a name="line.263"></a> +<span class="sourceLineNo">264</span> public byte[] encode(final byte[] raw) {<a name="line.264"></a> +<span class="sourceLineNo">265</span> return toAsciiBytes(raw);<a name="line.265"></a> +<span class="sourceLineNo">266</span> }<a name="line.266"></a> +<span class="sourceLineNo">267</span><a name="line.267"></a> +<span class="sourceLineNo">268</span> /**<a name="line.268"></a> +<span class="sourceLineNo">269</span> * Converts an array of raw binary data into an array of ASCII 0 and 1 chars.<a name="line.269"></a> +<span class="sourceLineNo">270</span> *<a name="line.270"></a> +<span class="sourceLineNo">271</span> * @param raw<a name="line.271"></a> +<span class="sourceLineNo">272</span> * the raw binary data to convert<a name="line.272"></a> +<span class="sourceLineNo">273</span> * @return 0 and 1 ASCII character chars one for each bit of the argument<a name="line.273"></a> +<span class="sourceLineNo">274</span> * @throws EncoderException<a name="line.274"></a> +<span class="sourceLineNo">275</span> * if the argument is not a byte[]<a name="line.275"></a> +<span class="sourceLineNo">276</span> * @see org.apache.commons.codec.Encoder#encode(Object)<a name="line.276"></a> +<span class="sourceLineNo">277</span> */<a name="line.277"></a> +<span class="sourceLineNo">278</span> @Override<a name="line.278"></a> +<span class="sourceLineNo">279</span> public Object encode(final Object raw) throws EncoderException {<a name="line.279"></a> +<span class="sourceLineNo">280</span> if (!(raw instanceof byte[])) {<a name="line.280"></a> +<span class="sourceLineNo">281</span> throw new EncoderException("argument not a byte array");<a name="line.281"></a> +<span class="sourceLineNo">282</span> }<a name="line.282"></a> +<span class="sourceLineNo">283</span> return toAsciiChars((byte[]) raw);<a name="line.283"></a> +<span class="sourceLineNo">284</span> }<a name="line.284"></a> +<span class="sourceLineNo">285</span><a name="line.285"></a> +<span class="sourceLineNo">286</span> /**<a name="line.286"></a> +<span class="sourceLineNo">287</span> * Decodes a String where each char of the String represents an ASCII '0' or '1'.<a name="line.287"></a> +<span class="sourceLineNo">288</span> *<a name="line.288"></a> +<span class="sourceLineNo">289</span> * @param ascii<a name="line.289"></a> +<span class="sourceLineNo">290</span> * String of '0' and '1' characters<a name="line.290"></a> +<span class="sourceLineNo">291</span> * @return the raw encoded binary where each bit corresponds to a byte in the byte array argument<a name="line.291"></a> +<span class="sourceLineNo">292</span> * @see org.apache.commons.codec.Decoder#decode(Object)<a name="line.292"></a> +<span class="sourceLineNo">293</span> */<a name="line.293"></a> +<span class="sourceLineNo">294</span> public byte[] toByteArray(final String ascii) {<a name="line.294"></a> +<span class="sourceLineNo">295</span> if (ascii == null) {<a name="line.295"></a> +<span class="sourceLineNo">296</span> return EMPTY_BYTE_ARRAY;<a name="line.296"></a> +<span class="sourceLineNo">297</span> }<a name="line.297"></a> +<span class="sourceLineNo">298</span> return fromAscii(ascii.toCharArray());<a name="line.298"></a> +<span class="sourceLineNo">299</span> }<a name="line.299"></a> +<span class="sourceLineNo">300</span>}<a name="line.300"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/CharSequenceUtils.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/CharSequenceUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..c96c02f71aaba7388d85ebeb6642d83cd365c159 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/CharSequenceUtils.html @@ -0,0 +1,154 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>package org.apache.commons.codec.binary;<a name="line.17"></a> +<span class="sourceLineNo">018</span><a name="line.18"></a> +<span class="sourceLineNo">019</span>/**<a name="line.19"></a> +<span class="sourceLineNo">020</span> * <p><a name="line.20"></a> +<span class="sourceLineNo">021</span> * Operations on {@link CharSequence} that are {@code null} safe.<a name="line.21"></a> +<span class="sourceLineNo">022</span> * </p><a name="line.22"></a> +<span class="sourceLineNo">023</span> * <p><a name="line.23"></a> +<span class="sourceLineNo">024</span> * Copied from Apache Commons Lang r1586295 on April 10, 2014 (day of 3.3.2 release).<a name="line.24"></a> +<span class="sourceLineNo">025</span> * </p><a name="line.25"></a> +<span class="sourceLineNo">026</span> *<a name="line.26"></a> +<span class="sourceLineNo">027</span> * @see CharSequence<a name="line.27"></a> +<span class="sourceLineNo">028</span> * @since 1.10<a name="line.28"></a> +<span class="sourceLineNo">029</span> */<a name="line.29"></a> +<span class="sourceLineNo">030</span>public class CharSequenceUtils {<a name="line.30"></a> +<span class="sourceLineNo">031</span><a name="line.31"></a> +<span class="sourceLineNo">032</span> /**<a name="line.32"></a> +<span class="sourceLineNo">033</span> * Green implementation of regionMatches.<a name="line.33"></a> +<span class="sourceLineNo">034</span> * <a name="line.34"></a> +<span class="sourceLineNo">035</span> * <p>Note: This function differs from the current implementation in Apache Commons Lang<a name="line.35"></a> +<span class="sourceLineNo">036</span> * where the input indices are not valid. It is only used within this package.<a name="line.36"></a> +<span class="sourceLineNo">037</span> *<a name="line.37"></a> +<span class="sourceLineNo">038</span> * @param cs<a name="line.38"></a> +<span class="sourceLineNo">039</span> * the {@code CharSequence} to be processed<a name="line.39"></a> +<span class="sourceLineNo">040</span> * @param ignoreCase<a name="line.40"></a> +<span class="sourceLineNo">041</span> * whether or not to be case insensitive<a name="line.41"></a> +<span class="sourceLineNo">042</span> * @param thisStart<a name="line.42"></a> +<span class="sourceLineNo">043</span> * the index to start on the {@code cs} CharSequence<a name="line.43"></a> +<span class="sourceLineNo">044</span> * @param substring<a name="line.44"></a> +<span class="sourceLineNo">045</span> * the {@code CharSequence} to be looked for<a name="line.45"></a> +<span class="sourceLineNo">046</span> * @param start<a name="line.46"></a> +<span class="sourceLineNo">047</span> * the index to start on the {@code substring} CharSequence<a name="line.47"></a> +<span class="sourceLineNo">048</span> * @param length<a name="line.48"></a> +<span class="sourceLineNo">049</span> * character length of the region<a name="line.49"></a> +<span class="sourceLineNo">050</span> * @return whether the region matched<a name="line.50"></a> +<span class="sourceLineNo">051</span> */<a name="line.51"></a> +<span class="sourceLineNo">052</span> static boolean regionMatches(final CharSequence cs, final boolean ignoreCase, final int thisStart,<a name="line.52"></a> +<span class="sourceLineNo">053</span> final CharSequence substring, final int start, final int length) {<a name="line.53"></a> +<span class="sourceLineNo">054</span> if (cs instanceof String && substring instanceof String) {<a name="line.54"></a> +<span class="sourceLineNo">055</span> return ((String) cs).regionMatches(ignoreCase, thisStart, (String) substring, start, length);<a name="line.55"></a> +<span class="sourceLineNo">056</span> }<a name="line.56"></a> +<span class="sourceLineNo">057</span> int index1 = thisStart;<a name="line.57"></a> +<span class="sourceLineNo">058</span> int index2 = start;<a name="line.58"></a> +<span class="sourceLineNo">059</span> int tmpLen = length;<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> while (tmpLen-- > 0) {<a name="line.61"></a> +<span class="sourceLineNo">062</span> final char c1 = cs.charAt(index1++);<a name="line.62"></a> +<span class="sourceLineNo">063</span> final char c2 = substring.charAt(index2++);<a name="line.63"></a> +<span class="sourceLineNo">064</span><a name="line.64"></a> +<span class="sourceLineNo">065</span> if (c1 == c2) {<a name="line.65"></a> +<span class="sourceLineNo">066</span> continue;<a name="line.66"></a> +<span class="sourceLineNo">067</span> }<a name="line.67"></a> +<span class="sourceLineNo">068</span><a name="line.68"></a> +<span class="sourceLineNo">069</span> if (!ignoreCase) {<a name="line.69"></a> +<span class="sourceLineNo">070</span> return false;<a name="line.70"></a> +<span class="sourceLineNo">071</span> }<a name="line.71"></a> +<span class="sourceLineNo">072</span><a name="line.72"></a> +<span class="sourceLineNo">073</span> // The same check as in String.regionMatches():<a name="line.73"></a> +<span class="sourceLineNo">074</span> if (Character.toUpperCase(c1) != Character.toUpperCase(c2) &&<a name="line.74"></a> +<span class="sourceLineNo">075</span> Character.toLowerCase(c1) != Character.toLowerCase(c2)) {<a name="line.75"></a> +<span class="sourceLineNo">076</span> return false;<a name="line.76"></a> +<span class="sourceLineNo">077</span> }<a name="line.77"></a> +<span class="sourceLineNo">078</span> }<a name="line.78"></a> +<span class="sourceLineNo">079</span><a name="line.79"></a> +<span class="sourceLineNo">080</span> return true;<a name="line.80"></a> +<span class="sourceLineNo">081</span> }<a name="line.81"></a> +<span class="sourceLineNo">082</span>}<a name="line.82"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Hex.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Hex.html new file mode 100644 index 0000000000000000000000000000000000000000..bbdb8b1f15b7c5ec00ee270700a5921672d294cb --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/Hex.html @@ -0,0 +1,638 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.nio.ByteBuffer;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.nio.charset.Charset;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.nio.charset.StandardCharsets;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>import org.apache.commons.codec.BinaryDecoder;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import org.apache.commons.codec.BinaryEncoder;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import org.apache.commons.codec.CharEncoding;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import org.apache.commons.codec.DecoderException;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import org.apache.commons.codec.EncoderException;<a name="line.28"></a> +<span class="sourceLineNo">029</span><a name="line.29"></a> +<span class="sourceLineNo">030</span>/**<a name="line.30"></a> +<span class="sourceLineNo">031</span> * Converts hexadecimal Strings. The Charset used for certain operation can be set, the default is set in<a name="line.31"></a> +<span class="sourceLineNo">032</span> * {@link #DEFAULT_CHARSET_NAME}<a name="line.32"></a> +<span class="sourceLineNo">033</span> *<a name="line.33"></a> +<span class="sourceLineNo">034</span> * This class is thread-safe.<a name="line.34"></a> +<span class="sourceLineNo">035</span> *<a name="line.35"></a> +<span class="sourceLineNo">036</span> * @since 1.1<a name="line.36"></a> +<span class="sourceLineNo">037</span> */<a name="line.37"></a> +<span class="sourceLineNo">038</span>public class Hex implements BinaryEncoder, BinaryDecoder {<a name="line.38"></a> +<span class="sourceLineNo">039</span><a name="line.39"></a> +<span class="sourceLineNo">040</span> /**<a name="line.40"></a> +<span class="sourceLineNo">041</span> * Default charset is {@link StandardCharsets#UTF_8}.<a name="line.41"></a> +<span class="sourceLineNo">042</span> *<a name="line.42"></a> +<span class="sourceLineNo">043</span> * @since 1.7<a name="line.43"></a> +<span class="sourceLineNo">044</span> */<a name="line.44"></a> +<span class="sourceLineNo">045</span> public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;<a name="line.45"></a> +<span class="sourceLineNo">046</span><a name="line.46"></a> +<span class="sourceLineNo">047</span> /**<a name="line.47"></a> +<span class="sourceLineNo">048</span> * Default charset name is {@link CharEncoding#UTF_8}.<a name="line.48"></a> +<span class="sourceLineNo">049</span> *<a name="line.49"></a> +<span class="sourceLineNo">050</span> * @since 1.4<a name="line.50"></a> +<span class="sourceLineNo">051</span> */<a name="line.51"></a> +<span class="sourceLineNo">052</span> public static final String DEFAULT_CHARSET_NAME = CharEncoding.UTF_8;<a name="line.52"></a> +<span class="sourceLineNo">053</span><a name="line.53"></a> +<span class="sourceLineNo">054</span> /**<a name="line.54"></a> +<span class="sourceLineNo">055</span> * Used to build output as hex.<a name="line.55"></a> +<span class="sourceLineNo">056</span> */<a name="line.56"></a> +<span class="sourceLineNo">057</span> private static final char[] DIGITS_LOWER = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd',<a name="line.57"></a> +<span class="sourceLineNo">058</span> 'e', 'f' };<a name="line.58"></a> +<span class="sourceLineNo">059</span><a name="line.59"></a> +<span class="sourceLineNo">060</span> /**<a name="line.60"></a> +<span class="sourceLineNo">061</span> * Used to build output as hex.<a name="line.61"></a> +<span class="sourceLineNo">062</span> */<a name="line.62"></a> +<span class="sourceLineNo">063</span> private static final char[] DIGITS_UPPER = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D',<a name="line.63"></a> +<span class="sourceLineNo">064</span> 'E', 'F' };<a name="line.64"></a> +<span class="sourceLineNo">065</span><a name="line.65"></a> +<span class="sourceLineNo">066</span> /**<a name="line.66"></a> +<span class="sourceLineNo">067</span> * Converts an array of characters representing hexadecimal values into an array of bytes of those same values. The<a name="line.67"></a> +<span class="sourceLineNo">068</span> * returned array will be half the length of the passed array, as it takes two characters to represent any given<a name="line.68"></a> +<span class="sourceLineNo">069</span> * byte. An exception is thrown if the passed char array has an odd number of elements.<a name="line.69"></a> +<span class="sourceLineNo">070</span> *<a name="line.70"></a> +<span class="sourceLineNo">071</span> * @param data An array of characters containing hexadecimal digits<a name="line.71"></a> +<span class="sourceLineNo">072</span> * @return A byte array containing binary data decoded from the supplied char array.<a name="line.72"></a> +<span class="sourceLineNo">073</span> * @throws DecoderException Thrown if an odd number of characters or illegal characters are supplied<a name="line.73"></a> +<span class="sourceLineNo">074</span> */<a name="line.74"></a> +<span class="sourceLineNo">075</span> public static byte[] decodeHex(final char[] data) throws DecoderException {<a name="line.75"></a> +<span class="sourceLineNo">076</span> final byte[] out = new byte[data.length >> 1];<a name="line.76"></a> +<span class="sourceLineNo">077</span> decodeHex(data, out, 0);<a name="line.77"></a> +<span class="sourceLineNo">078</span> return out;<a name="line.78"></a> +<span class="sourceLineNo">079</span> }<a name="line.79"></a> +<span class="sourceLineNo">080</span><a name="line.80"></a> +<span class="sourceLineNo">081</span> /**<a name="line.81"></a> +<span class="sourceLineNo">082</span> * Converts an array of characters representing hexadecimal values into an array of bytes of those same values. The<a name="line.82"></a> +<span class="sourceLineNo">083</span> * returned array will be half the length of the passed array, as it takes two characters to represent any given<a name="line.83"></a> +<span class="sourceLineNo">084</span> * byte. An exception is thrown if the passed char array has an odd number of elements.<a name="line.84"></a> +<span class="sourceLineNo">085</span> *<a name="line.85"></a> +<span class="sourceLineNo">086</span> * @param data An array of characters containing hexadecimal digits<a name="line.86"></a> +<span class="sourceLineNo">087</span> * @param out A byte array to contain the binary data decoded from the supplied char array.<a name="line.87"></a> +<span class="sourceLineNo">088</span> * @param outOffset The position within {@code out} to start writing the decoded bytes.<a name="line.88"></a> +<span class="sourceLineNo">089</span> * @return the number of bytes written to {@code out}.<a name="line.89"></a> +<span class="sourceLineNo">090</span> * @throws DecoderException Thrown if an odd number of characters or illegal characters are supplied<a name="line.90"></a> +<span class="sourceLineNo">091</span> * @since 1.15<a name="line.91"></a> +<span class="sourceLineNo">092</span> */<a name="line.92"></a> +<span class="sourceLineNo">093</span> public static int decodeHex(final char[] data, final byte[] out, final int outOffset) throws DecoderException {<a name="line.93"></a> +<span class="sourceLineNo">094</span> final int len = data.length;<a name="line.94"></a> +<span class="sourceLineNo">095</span><a name="line.95"></a> +<span class="sourceLineNo">096</span> if ((len & 0x01) != 0) {<a name="line.96"></a> +<span class="sourceLineNo">097</span> throw new DecoderException("Odd number of characters.");<a name="line.97"></a> +<span class="sourceLineNo">098</span> }<a name="line.98"></a> +<span class="sourceLineNo">099</span><a name="line.99"></a> +<span class="sourceLineNo">100</span> final int outLen = len >> 1;<a name="line.100"></a> +<span class="sourceLineNo">101</span> if (out.length - outOffset < outLen) {<a name="line.101"></a> +<span class="sourceLineNo">102</span> throw new DecoderException("Output array is not large enough to accommodate decoded data.");<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> // two characters form the hex value.<a name="line.105"></a> +<span class="sourceLineNo">106</span> for (int i = outOffset, j = 0; j < len; i++) {<a name="line.106"></a> +<span class="sourceLineNo">107</span> int f = toDigit(data[j], j) << 4;<a name="line.107"></a> +<span class="sourceLineNo">108</span> j++;<a name="line.108"></a> +<span class="sourceLineNo">109</span> f = f | toDigit(data[j], j);<a name="line.109"></a> +<span class="sourceLineNo">110</span> j++;<a name="line.110"></a> +<span class="sourceLineNo">111</span> out[i] = (byte) (f & 0xFF);<a name="line.111"></a> +<span class="sourceLineNo">112</span> }<a name="line.112"></a> +<span class="sourceLineNo">113</span><a name="line.113"></a> +<span class="sourceLineNo">114</span> return outLen;<a name="line.114"></a> +<span class="sourceLineNo">115</span> }<a name="line.115"></a> +<span class="sourceLineNo">116</span><a name="line.116"></a> +<span class="sourceLineNo">117</span> /**<a name="line.117"></a> +<span class="sourceLineNo">118</span> * Converts a String representing hexadecimal values into an array of bytes of those same values. The returned array<a name="line.118"></a> +<span class="sourceLineNo">119</span> * will be half the length of the passed String, as it takes two characters to represent any given byte. An<a name="line.119"></a> +<span class="sourceLineNo">120</span> * exception is thrown if the passed String has an odd number of elements.<a name="line.120"></a> +<span class="sourceLineNo">121</span> *<a name="line.121"></a> +<span class="sourceLineNo">122</span> * @param data A String containing hexadecimal digits<a name="line.122"></a> +<span class="sourceLineNo">123</span> * @return A byte array containing binary data decoded from the supplied char array.<a name="line.123"></a> +<span class="sourceLineNo">124</span> * @throws DecoderException Thrown if an odd number of characters or illegal characters are supplied<a name="line.124"></a> +<span class="sourceLineNo">125</span> * @since 1.11<a name="line.125"></a> +<span class="sourceLineNo">126</span> */ <a name="line.126"></a> +<span class="sourceLineNo">127</span> public static byte[] decodeHex(final String data) throws DecoderException {<a name="line.127"></a> +<span class="sourceLineNo">128</span> return decodeHex(data.toCharArray());<a name="line.128"></a> +<span class="sourceLineNo">129</span> }<a name="line.129"></a> +<span class="sourceLineNo">130</span><a name="line.130"></a> +<span class="sourceLineNo">131</span> /**<a name="line.131"></a> +<span class="sourceLineNo">132</span> * Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.<a name="line.132"></a> +<span class="sourceLineNo">133</span> * The returned array will be double the length of the passed array, as it takes two characters to represent any<a name="line.133"></a> +<span class="sourceLineNo">134</span> * given byte.<a name="line.134"></a> +<span class="sourceLineNo">135</span> *<a name="line.135"></a> +<span class="sourceLineNo">136</span> * @param data a byte[] to convert to hex characters<a name="line.136"></a> +<span class="sourceLineNo">137</span> * @return A char[] containing lower-case hexadecimal characters<a name="line.137"></a> +<span class="sourceLineNo">138</span> */<a name="line.138"></a> +<span class="sourceLineNo">139</span> public static char[] encodeHex(final byte[] data) {<a name="line.139"></a> +<span class="sourceLineNo">140</span> return encodeHex(data, true);<a name="line.140"></a> +<span class="sourceLineNo">141</span> }<a name="line.141"></a> +<span class="sourceLineNo">142</span><a name="line.142"></a> +<span class="sourceLineNo">143</span> /**<a name="line.143"></a> +<span class="sourceLineNo">144</span> * Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.<a name="line.144"></a> +<span class="sourceLineNo">145</span> * The returned array will be double the length of the passed array, as it takes two characters to represent any<a name="line.145"></a> +<span class="sourceLineNo">146</span> * given byte.<a name="line.146"></a> +<span class="sourceLineNo">147</span> *<a name="line.147"></a> +<span class="sourceLineNo">148</span> * @param data a byte[] to convert to Hex characters<a name="line.148"></a> +<span class="sourceLineNo">149</span> * @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase<a name="line.149"></a> +<span class="sourceLineNo">150</span> * @return A char[] containing hexadecimal characters in the selected case<a name="line.150"></a> +<span class="sourceLineNo">151</span> * @since 1.4<a name="line.151"></a> +<span class="sourceLineNo">152</span> */<a name="line.152"></a> +<span class="sourceLineNo">153</span> public static char[] encodeHex(final byte[] data, final boolean toLowerCase) {<a name="line.153"></a> +<span class="sourceLineNo">154</span> return encodeHex(data, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER);<a name="line.154"></a> +<span class="sourceLineNo">155</span> }<a name="line.155"></a> +<span class="sourceLineNo">156</span><a name="line.156"></a> +<span class="sourceLineNo">157</span> /**<a name="line.157"></a> +<span class="sourceLineNo">158</span> * Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.<a name="line.158"></a> +<span class="sourceLineNo">159</span> * The returned array will be double the length of the passed array, as it takes two characters to represent any<a name="line.159"></a> +<span class="sourceLineNo">160</span> * given byte.<a name="line.160"></a> +<span class="sourceLineNo">161</span> *<a name="line.161"></a> +<span class="sourceLineNo">162</span> * @param data a byte[] to convert to hex characters<a name="line.162"></a> +<span class="sourceLineNo">163</span> * @param toDigits the output alphabet (must contain at least 16 chars)<a name="line.163"></a> +<span class="sourceLineNo">164</span> * @return A char[] containing the appropriate characters from the alphabet For best results, this should be either<a name="line.164"></a> +<span class="sourceLineNo">165</span> * upper- or lower-case hex.<a name="line.165"></a> +<span class="sourceLineNo">166</span> * @since 1.4<a name="line.166"></a> +<span class="sourceLineNo">167</span> */<a name="line.167"></a> +<span class="sourceLineNo">168</span> protected static char[] encodeHex(final byte[] data, final char[] toDigits) {<a name="line.168"></a> +<span class="sourceLineNo">169</span> final int l = data.length;<a name="line.169"></a> +<span class="sourceLineNo">170</span> final char[] out = new char[l << 1];<a name="line.170"></a> +<span class="sourceLineNo">171</span> encodeHex(data, 0, data.length, toDigits, out, 0);<a name="line.171"></a> +<span class="sourceLineNo">172</span> return out;<a name="line.172"></a> +<span class="sourceLineNo">173</span> }<a name="line.173"></a> +<span class="sourceLineNo">174</span><a name="line.174"></a> +<span class="sourceLineNo">175</span> /**<a name="line.175"></a> +<span class="sourceLineNo">176</span> * Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.<a name="line.176"></a> +<span class="sourceLineNo">177</span> *<a name="line.177"></a> +<span class="sourceLineNo">178</span> * @param data a byte[] to convert to hex characters<a name="line.178"></a> +<span class="sourceLineNo">179</span> * @param dataOffset the position in {@code data} to start encoding from<a name="line.179"></a> +<span class="sourceLineNo">180</span> * @param dataLen the number of bytes from {@code dataOffset} to encode<a name="line.180"></a> +<span class="sourceLineNo">181</span> * @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase<a name="line.181"></a> +<span class="sourceLineNo">182</span> * @return A char[] containing the appropriate characters from the alphabet For best results, this should be either<a name="line.182"></a> +<span class="sourceLineNo">183</span> * upper- or lower-case hex.<a name="line.183"></a> +<span class="sourceLineNo">184</span> * @since 1.15<a name="line.184"></a> +<span class="sourceLineNo">185</span> */<a name="line.185"></a> +<span class="sourceLineNo">186</span> public static char[] encodeHex(final byte[] data, final int dataOffset, final int dataLen,<a name="line.186"></a> +<span class="sourceLineNo">187</span> final boolean toLowerCase) {<a name="line.187"></a> +<span class="sourceLineNo">188</span> final char[] out = new char[dataLen << 1];<a name="line.188"></a> +<span class="sourceLineNo">189</span> encodeHex(data, dataOffset, dataLen, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER, out, 0);<a name="line.189"></a> +<span class="sourceLineNo">190</span> return out;<a name="line.190"></a> +<span class="sourceLineNo">191</span> }<a name="line.191"></a> +<span class="sourceLineNo">192</span><a name="line.192"></a> +<span class="sourceLineNo">193</span> /**<a name="line.193"></a> +<span class="sourceLineNo">194</span> * Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.<a name="line.194"></a> +<span class="sourceLineNo">195</span> *<a name="line.195"></a> +<span class="sourceLineNo">196</span> * @param data a byte[] to convert to hex characters<a name="line.196"></a> +<span class="sourceLineNo">197</span> * @param dataOffset the position in {@code data} to start encoding from<a name="line.197"></a> +<span class="sourceLineNo">198</span> * @param dataLen the number of bytes from {@code dataOffset} to encode<a name="line.198"></a> +<span class="sourceLineNo">199</span> * @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase<a name="line.199"></a> +<span class="sourceLineNo">200</span> * @param out a char[] which will hold the resultant appropriate characters from the alphabet.<a name="line.200"></a> +<span class="sourceLineNo">201</span> * @param outOffset the position within {@code out} at which to start writing the encoded characters.<a name="line.201"></a> +<span class="sourceLineNo">202</span> * @since 1.15<a name="line.202"></a> +<span class="sourceLineNo">203</span> */<a name="line.203"></a> +<span class="sourceLineNo">204</span> public static void encodeHex(final byte[] data, final int dataOffset, final int dataLen,<a name="line.204"></a> +<span class="sourceLineNo">205</span> final boolean toLowerCase, final char[] out, final int outOffset) {<a name="line.205"></a> +<span class="sourceLineNo">206</span> encodeHex(data, dataOffset, dataLen, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER, out, outOffset);<a name="line.206"></a> +<span class="sourceLineNo">207</span> }<a name="line.207"></a> +<span class="sourceLineNo">208</span><a name="line.208"></a> +<span class="sourceLineNo">209</span> /**<a name="line.209"></a> +<span class="sourceLineNo">210</span> * Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.<a name="line.210"></a> +<span class="sourceLineNo">211</span> *<a name="line.211"></a> +<span class="sourceLineNo">212</span> * @param data a byte[] to convert to hex characters<a name="line.212"></a> +<span class="sourceLineNo">213</span> * @param dataOffset the position in {@code data} to start encoding from<a name="line.213"></a> +<span class="sourceLineNo">214</span> * @param dataLen the number of bytes from {@code dataOffset} to encode<a name="line.214"></a> +<span class="sourceLineNo">215</span> * @param toDigits the output alphabet (must contain at least 16 chars)<a name="line.215"></a> +<span class="sourceLineNo">216</span> * @param out a char[] which will hold the resultant appropriate characters from the alphabet.<a name="line.216"></a> +<span class="sourceLineNo">217</span> * @param outOffset the position within {@code out} at which to start writing the encoded characters.<a name="line.217"></a> +<span class="sourceLineNo">218</span> */<a name="line.218"></a> +<span class="sourceLineNo">219</span> private static void encodeHex(final byte[] data, final int dataOffset, final int dataLen, final char[] toDigits,<a name="line.219"></a> +<span class="sourceLineNo">220</span> final char[] out, final int outOffset) {<a name="line.220"></a> +<span class="sourceLineNo">221</span> // two characters form the hex value.<a name="line.221"></a> +<span class="sourceLineNo">222</span> for (int i = dataOffset, j = outOffset; i < dataOffset + dataLen; i++) {<a name="line.222"></a> +<span class="sourceLineNo">223</span> out[j++] = toDigits[(0xF0 & data[i]) >>> 4];<a name="line.223"></a> +<span class="sourceLineNo">224</span> out[j++] = toDigits[0x0F & data[i]];<a name="line.224"></a> +<span class="sourceLineNo">225</span> }<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span><a name="line.227"></a> +<span class="sourceLineNo">228</span> /**<a name="line.228"></a> +<span class="sourceLineNo">229</span> * Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order. The<a name="line.229"></a> +<span class="sourceLineNo">230</span> * returned array will be double the length of the passed array, as it takes two characters to represent any given<a name="line.230"></a> +<span class="sourceLineNo">231</span> * byte.<a name="line.231"></a> +<span class="sourceLineNo">232</span> *<a name="line.232"></a> +<span class="sourceLineNo">233</span> * <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method<a name="line.233"></a> +<span class="sourceLineNo">234</span> * the value {@link ByteBuffer#remaining() remaining()} will be zero.</p><a name="line.234"></a> +<span class="sourceLineNo">235</span> *<a name="line.235"></a> +<span class="sourceLineNo">236</span> * @param data a byte buffer to convert to hex characters<a name="line.236"></a> +<span class="sourceLineNo">237</span> * @return A char[] containing lower-case hexadecimal characters<a name="line.237"></a> +<span class="sourceLineNo">238</span> * @since 1.11<a name="line.238"></a> +<span class="sourceLineNo">239</span> */<a name="line.239"></a> +<span class="sourceLineNo">240</span> public static char[] encodeHex(final ByteBuffer data) {<a name="line.240"></a> +<span class="sourceLineNo">241</span> return encodeHex(data, true);<a name="line.241"></a> +<span class="sourceLineNo">242</span> }<a name="line.242"></a> +<span class="sourceLineNo">243</span><a name="line.243"></a> +<span class="sourceLineNo">244</span> /**<a name="line.244"></a> +<span class="sourceLineNo">245</span> * Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order. The<a name="line.245"></a> +<span class="sourceLineNo">246</span> * returned array will be double the length of the passed array, as it takes two characters to represent any given<a name="line.246"></a> +<span class="sourceLineNo">247</span> * byte.<a name="line.247"></a> +<span class="sourceLineNo">248</span> *<a name="line.248"></a> +<span class="sourceLineNo">249</span> * <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method<a name="line.249"></a> +<span class="sourceLineNo">250</span> * the value {@link ByteBuffer#remaining() remaining()} will be zero.</p><a name="line.250"></a> +<span class="sourceLineNo">251</span> *<a name="line.251"></a> +<span class="sourceLineNo">252</span> * @param data a byte buffer to convert to hex characters<a name="line.252"></a> +<span class="sourceLineNo">253</span> * @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase<a name="line.253"></a> +<span class="sourceLineNo">254</span> * @return A char[] containing hexadecimal characters in the selected case<a name="line.254"></a> +<span class="sourceLineNo">255</span> * @since 1.11<a name="line.255"></a> +<span class="sourceLineNo">256</span> */<a name="line.256"></a> +<span class="sourceLineNo">257</span> public static char[] encodeHex(final ByteBuffer data, final boolean toLowerCase) {<a name="line.257"></a> +<span class="sourceLineNo">258</span> return encodeHex(data, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER);<a name="line.258"></a> +<span class="sourceLineNo">259</span> }<a name="line.259"></a> +<span class="sourceLineNo">260</span><a name="line.260"></a> +<span class="sourceLineNo">261</span> /**<a name="line.261"></a> +<span class="sourceLineNo">262</span> * Converts a byte buffer into an array of characters representing the hexadecimal values of each byte in order. The<a name="line.262"></a> +<span class="sourceLineNo">263</span> * returned array will be double the length of the passed array, as it takes two characters to represent any given<a name="line.263"></a> +<span class="sourceLineNo">264</span> * byte.<a name="line.264"></a> +<span class="sourceLineNo">265</span> *<a name="line.265"></a> +<span class="sourceLineNo">266</span> * <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method<a name="line.266"></a> +<span class="sourceLineNo">267</span> * the value {@link ByteBuffer#remaining() remaining()} will be zero.</p><a name="line.267"></a> +<span class="sourceLineNo">268</span> *<a name="line.268"></a> +<span class="sourceLineNo">269</span> * @param byteBuffer a byte buffer to convert to hex characters<a name="line.269"></a> +<span class="sourceLineNo">270</span> * @param toDigits the output alphabet (must be at least 16 characters)<a name="line.270"></a> +<span class="sourceLineNo">271</span> * @return A char[] containing the appropriate characters from the alphabet For best results, this should be either<a name="line.271"></a> +<span class="sourceLineNo">272</span> * upper- or lower-case hex.<a name="line.272"></a> +<span class="sourceLineNo">273</span> * @since 1.11<a name="line.273"></a> +<span class="sourceLineNo">274</span> */<a name="line.274"></a> +<span class="sourceLineNo">275</span> protected static char[] encodeHex(final ByteBuffer byteBuffer, final char[] toDigits) {<a name="line.275"></a> +<span class="sourceLineNo">276</span> return encodeHex(toByteArray(byteBuffer), toDigits);<a name="line.276"></a> +<span class="sourceLineNo">277</span> }<a name="line.277"></a> +<span class="sourceLineNo">278</span><a name="line.278"></a> +<span class="sourceLineNo">279</span> /**<a name="line.279"></a> +<span class="sourceLineNo">280</span> * Converts an array of bytes into a String representing the hexadecimal values of each byte in order. The returned<a name="line.280"></a> +<span class="sourceLineNo">281</span> * String will be double the length of the passed array, as it takes two characters to represent any given byte.<a name="line.281"></a> +<span class="sourceLineNo">282</span> *<a name="line.282"></a> +<span class="sourceLineNo">283</span> * @param data a byte[] to convert to hex characters<a name="line.283"></a> +<span class="sourceLineNo">284</span> * @return A String containing lower-case hexadecimal characters<a name="line.284"></a> +<span class="sourceLineNo">285</span> * @since 1.4<a name="line.285"></a> +<span class="sourceLineNo">286</span> */<a name="line.286"></a> +<span class="sourceLineNo">287</span> public static String encodeHexString(final byte[] data) {<a name="line.287"></a> +<span class="sourceLineNo">288</span> return new String(encodeHex(data));<a name="line.288"></a> +<span class="sourceLineNo">289</span> }<a name="line.289"></a> +<span class="sourceLineNo">290</span><a name="line.290"></a> +<span class="sourceLineNo">291</span> /**<a name="line.291"></a> +<span class="sourceLineNo">292</span> * Converts an array of bytes into a String representing the hexadecimal values of each byte in order. The returned<a name="line.292"></a> +<span class="sourceLineNo">293</span> * String will be double the length of the passed array, as it takes two characters to represent any given byte.<a name="line.293"></a> +<span class="sourceLineNo">294</span> *<a name="line.294"></a> +<span class="sourceLineNo">295</span> * @param data a byte[] to convert to hex characters<a name="line.295"></a> +<span class="sourceLineNo">296</span> * @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase<a name="line.296"></a> +<span class="sourceLineNo">297</span> * @return A String containing lower-case hexadecimal characters<a name="line.297"></a> +<span class="sourceLineNo">298</span> * @since 1.11<a name="line.298"></a> +<span class="sourceLineNo">299</span> */<a name="line.299"></a> +<span class="sourceLineNo">300</span> public static String encodeHexString(final byte[] data, final boolean toLowerCase) {<a name="line.300"></a> +<span class="sourceLineNo">301</span> return new String(encodeHex(data, toLowerCase));<a name="line.301"></a> +<span class="sourceLineNo">302</span> }<a name="line.302"></a> +<span class="sourceLineNo">303</span><a name="line.303"></a> +<span class="sourceLineNo">304</span> /**<a name="line.304"></a> +<span class="sourceLineNo">305</span> * Converts a byte buffer into a String representing the hexadecimal values of each byte in order. The returned<a name="line.305"></a> +<span class="sourceLineNo">306</span> * String will be double the length of the passed array, as it takes two characters to represent any given byte.<a name="line.306"></a> +<span class="sourceLineNo">307</span> *<a name="line.307"></a> +<span class="sourceLineNo">308</span> * <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method<a name="line.308"></a> +<span class="sourceLineNo">309</span> * the value {@link ByteBuffer#remaining() remaining()} will be zero.</p><a name="line.309"></a> +<span class="sourceLineNo">310</span> *<a name="line.310"></a> +<span class="sourceLineNo">311</span> * @param data a byte buffer to convert to hex characters<a name="line.311"></a> +<span class="sourceLineNo">312</span> * @return A String containing lower-case hexadecimal characters<a name="line.312"></a> +<span class="sourceLineNo">313</span> * @since 1.11<a name="line.313"></a> +<span class="sourceLineNo">314</span> */<a name="line.314"></a> +<span class="sourceLineNo">315</span> public static String encodeHexString(final ByteBuffer data) {<a name="line.315"></a> +<span class="sourceLineNo">316</span> return new String(encodeHex(data));<a name="line.316"></a> +<span class="sourceLineNo">317</span> }<a name="line.317"></a> +<span class="sourceLineNo">318</span><a name="line.318"></a> +<span class="sourceLineNo">319</span> /**<a name="line.319"></a> +<span class="sourceLineNo">320</span> * Converts a byte buffer into a String representing the hexadecimal values of each byte in order. The returned<a name="line.320"></a> +<span class="sourceLineNo">321</span> * String will be double the length of the passed array, as it takes two characters to represent any given byte.<a name="line.321"></a> +<span class="sourceLineNo">322</span> *<a name="line.322"></a> +<span class="sourceLineNo">323</span> * <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method<a name="line.323"></a> +<span class="sourceLineNo">324</span> * the value {@link ByteBuffer#remaining() remaining()} will be zero.</p><a name="line.324"></a> +<span class="sourceLineNo">325</span> *<a name="line.325"></a> +<span class="sourceLineNo">326</span> * @param data a byte buffer to convert to hex characters<a name="line.326"></a> +<span class="sourceLineNo">327</span> * @param toLowerCase {@code true} converts to lowercase, {@code false} to uppercase<a name="line.327"></a> +<span class="sourceLineNo">328</span> * @return A String containing lower-case hexadecimal characters<a name="line.328"></a> +<span class="sourceLineNo">329</span> * @since 1.11<a name="line.329"></a> +<span class="sourceLineNo">330</span> */<a name="line.330"></a> +<span class="sourceLineNo">331</span> public static String encodeHexString(final ByteBuffer data, final boolean toLowerCase) {<a name="line.331"></a> +<span class="sourceLineNo">332</span> return new String(encodeHex(data, toLowerCase));<a name="line.332"></a> +<span class="sourceLineNo">333</span> }<a name="line.333"></a> +<span class="sourceLineNo">334</span><a name="line.334"></a> +<span class="sourceLineNo">335</span> /**<a name="line.335"></a> +<span class="sourceLineNo">336</span> * Convert the byte buffer to a byte array. All bytes identified by<a name="line.336"></a> +<span class="sourceLineNo">337</span> * {@link ByteBuffer#remaining()} will be used.<a name="line.337"></a> +<span class="sourceLineNo">338</span> *<a name="line.338"></a> +<span class="sourceLineNo">339</span> * @param byteBuffer the byte buffer<a name="line.339"></a> +<span class="sourceLineNo">340</span> * @return the byte[]<a name="line.340"></a> +<span class="sourceLineNo">341</span> */<a name="line.341"></a> +<span class="sourceLineNo">342</span> private static byte[] toByteArray(final ByteBuffer byteBuffer) {<a name="line.342"></a> +<span class="sourceLineNo">343</span> final int remaining = byteBuffer.remaining();<a name="line.343"></a> +<span class="sourceLineNo">344</span> // Use the underlying buffer if possible<a name="line.344"></a> +<span class="sourceLineNo">345</span> if (byteBuffer.hasArray()) {<a name="line.345"></a> +<span class="sourceLineNo">346</span> final byte[] byteArray = byteBuffer.array();<a name="line.346"></a> +<span class="sourceLineNo">347</span> if (remaining == byteArray.length) {<a name="line.347"></a> +<span class="sourceLineNo">348</span> byteBuffer.position(remaining);<a name="line.348"></a> +<span class="sourceLineNo">349</span> return byteArray;<a name="line.349"></a> +<span class="sourceLineNo">350</span> }<a name="line.350"></a> +<span class="sourceLineNo">351</span> }<a name="line.351"></a> +<span class="sourceLineNo">352</span> // Copy the bytes<a name="line.352"></a> +<span class="sourceLineNo">353</span> final byte[] byteArray = new byte[remaining];<a name="line.353"></a> +<span class="sourceLineNo">354</span> byteBuffer.get(byteArray);<a name="line.354"></a> +<span class="sourceLineNo">355</span> return byteArray;<a name="line.355"></a> +<span class="sourceLineNo">356</span> }<a name="line.356"></a> +<span class="sourceLineNo">357</span><a name="line.357"></a> +<span class="sourceLineNo">358</span> /**<a name="line.358"></a> +<span class="sourceLineNo">359</span> * Converts a hexadecimal character to an integer.<a name="line.359"></a> +<span class="sourceLineNo">360</span> *<a name="line.360"></a> +<span class="sourceLineNo">361</span> * @param ch A character to convert to an integer digit<a name="line.361"></a> +<span class="sourceLineNo">362</span> * @param index The index of the character in the source<a name="line.362"></a> +<span class="sourceLineNo">363</span> * @return An integer<a name="line.363"></a> +<span class="sourceLineNo">364</span> * @throws DecoderException Thrown if ch is an illegal hex character<a name="line.364"></a> +<span class="sourceLineNo">365</span> */<a name="line.365"></a> +<span class="sourceLineNo">366</span> protected static int toDigit(final char ch, final int index) throws DecoderException {<a name="line.366"></a> +<span class="sourceLineNo">367</span> final int digit = Character.digit(ch, 16);<a name="line.367"></a> +<span class="sourceLineNo">368</span> if (digit == -1) {<a name="line.368"></a> +<span class="sourceLineNo">369</span> throw new DecoderException("Illegal hexadecimal character " + ch + " at index " + index);<a name="line.369"></a> +<span class="sourceLineNo">370</span> }<a name="line.370"></a> +<span class="sourceLineNo">371</span> return digit;<a name="line.371"></a> +<span class="sourceLineNo">372</span> }<a name="line.372"></a> +<span class="sourceLineNo">373</span><a name="line.373"></a> +<span class="sourceLineNo">374</span> private final Charset charset;<a name="line.374"></a> +<span class="sourceLineNo">375</span><a name="line.375"></a> +<span class="sourceLineNo">376</span> /**<a name="line.376"></a> +<span class="sourceLineNo">377</span> * Creates a new codec with the default charset name {@link #DEFAULT_CHARSET}<a name="line.377"></a> +<span class="sourceLineNo">378</span> */<a name="line.378"></a> +<span class="sourceLineNo">379</span> public Hex() {<a name="line.379"></a> +<span class="sourceLineNo">380</span> // use default encoding<a name="line.380"></a> +<span class="sourceLineNo">381</span> this.charset = DEFAULT_CHARSET;<a name="line.381"></a> +<span class="sourceLineNo">382</span> }<a name="line.382"></a> +<span class="sourceLineNo">383</span><a name="line.383"></a> +<span class="sourceLineNo">384</span> /**<a name="line.384"></a> +<span class="sourceLineNo">385</span> * Creates a new codec with the given Charset.<a name="line.385"></a> +<span class="sourceLineNo">386</span> *<a name="line.386"></a> +<span class="sourceLineNo">387</span> * @param charset the charset.<a name="line.387"></a> +<span class="sourceLineNo">388</span> * @since 1.7<a name="line.388"></a> +<span class="sourceLineNo">389</span> */<a name="line.389"></a> +<span class="sourceLineNo">390</span> public Hex(final Charset charset) {<a name="line.390"></a> +<span class="sourceLineNo">391</span> this.charset = charset;<a name="line.391"></a> +<span class="sourceLineNo">392</span> }<a name="line.392"></a> +<span class="sourceLineNo">393</span><a name="line.393"></a> +<span class="sourceLineNo">394</span> /**<a name="line.394"></a> +<span class="sourceLineNo">395</span> * Creates a new codec with the given charset name.<a name="line.395"></a> +<span class="sourceLineNo">396</span> *<a name="line.396"></a> +<span class="sourceLineNo">397</span> * @param charsetName the charset name.<a name="line.397"></a> +<span class="sourceLineNo">398</span> * @throws java.nio.charset.UnsupportedCharsetException If the named charset is unavailable<a name="line.398"></a> +<span class="sourceLineNo">399</span> * @since 1.4<a name="line.399"></a> +<span class="sourceLineNo">400</span> * @since 1.7 throws UnsupportedCharsetException if the named charset is unavailable<a name="line.400"></a> +<span class="sourceLineNo">401</span> */<a name="line.401"></a> +<span class="sourceLineNo">402</span> public Hex(final String charsetName) {<a name="line.402"></a> +<span class="sourceLineNo">403</span> this(Charset.forName(charsetName));<a name="line.403"></a> +<span class="sourceLineNo">404</span> }<a name="line.404"></a> +<span class="sourceLineNo">405</span><a name="line.405"></a> +<span class="sourceLineNo">406</span> /**<a name="line.406"></a> +<span class="sourceLineNo">407</span> * Converts an array of character bytes representing hexadecimal values into an array of bytes of those same values.<a name="line.407"></a> +<span class="sourceLineNo">408</span> * The returned array will be half the length of the passed array, as it takes two characters to represent any given<a name="line.408"></a> +<span class="sourceLineNo">409</span> * byte. An exception is thrown if the passed char array has an odd number of elements.<a name="line.409"></a> +<span class="sourceLineNo">410</span> *<a name="line.410"></a> +<span class="sourceLineNo">411</span> * @param array An array of character bytes containing hexadecimal digits<a name="line.411"></a> +<span class="sourceLineNo">412</span> * @return A byte array containing binary data decoded from the supplied byte array (representing characters).<a name="line.412"></a> +<span class="sourceLineNo">413</span> * @throws DecoderException Thrown if an odd number of characters is supplied to this function<a name="line.413"></a> +<span class="sourceLineNo">414</span> * @see #decodeHex(char[])<a name="line.414"></a> +<span class="sourceLineNo">415</span> */<a name="line.415"></a> +<span class="sourceLineNo">416</span> @Override<a name="line.416"></a> +<span class="sourceLineNo">417</span> public byte[] decode(final byte[] array) throws DecoderException {<a name="line.417"></a> +<span class="sourceLineNo">418</span> return decodeHex(new String(array, getCharset()).toCharArray());<a name="line.418"></a> +<span class="sourceLineNo">419</span> }<a name="line.419"></a> +<span class="sourceLineNo">420</span><a name="line.420"></a> +<span class="sourceLineNo">421</span> /**<a name="line.421"></a> +<span class="sourceLineNo">422</span> * Converts a buffer of character bytes representing hexadecimal values into an array of bytes of those same values.<a name="line.422"></a> +<span class="sourceLineNo">423</span> * The returned array will be half the length of the passed array, as it takes two characters to represent any given<a name="line.423"></a> +<span class="sourceLineNo">424</span> * byte. An exception is thrown if the passed char array has an odd number of elements.<a name="line.424"></a> +<span class="sourceLineNo">425</span> *<a name="line.425"></a> +<span class="sourceLineNo">426</span> * <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method<a name="line.426"></a> +<span class="sourceLineNo">427</span> * the value {@link ByteBuffer#remaining() remaining()} will be zero.</p><a name="line.427"></a> +<span class="sourceLineNo">428</span> *<a name="line.428"></a> +<span class="sourceLineNo">429</span> * @param buffer An array of character bytes containing hexadecimal digits<a name="line.429"></a> +<span class="sourceLineNo">430</span> * @return A byte array containing binary data decoded from the supplied byte array (representing characters).<a name="line.430"></a> +<span class="sourceLineNo">431</span> * @throws DecoderException Thrown if an odd number of characters is supplied to this function<a name="line.431"></a> +<span class="sourceLineNo">432</span> * @see #decodeHex(char[])<a name="line.432"></a> +<span class="sourceLineNo">433</span> * @since 1.11<a name="line.433"></a> +<span class="sourceLineNo">434</span> */<a name="line.434"></a> +<span class="sourceLineNo">435</span> public byte[] decode(final ByteBuffer buffer) throws DecoderException {<a name="line.435"></a> +<span class="sourceLineNo">436</span> return decodeHex(new String(toByteArray(buffer), getCharset()).toCharArray());<a name="line.436"></a> +<span class="sourceLineNo">437</span> }<a name="line.437"></a> +<span class="sourceLineNo">438</span><a name="line.438"></a> +<span class="sourceLineNo">439</span> /**<a name="line.439"></a> +<span class="sourceLineNo">440</span> * Converts a String or an array of character bytes representing hexadecimal values into an array of bytes of those<a name="line.440"></a> +<span class="sourceLineNo">441</span> * same values. The returned array will be half the length of the passed String or array, as it takes two characters<a name="line.441"></a> +<span class="sourceLineNo">442</span> * to represent any given byte. An exception is thrown if the passed char array has an odd number of elements.<a name="line.442"></a> +<span class="sourceLineNo">443</span> *<a name="line.443"></a> +<span class="sourceLineNo">444</span> * @param object A String, ByteBuffer, byte[], or an array of character bytes containing hexadecimal digits<a name="line.444"></a> +<span class="sourceLineNo">445</span> * @return A byte array containing binary data decoded from the supplied byte array (representing characters).<a name="line.445"></a> +<span class="sourceLineNo">446</span> * @throws DecoderException Thrown if an odd number of characters is supplied to this function or the object is not<a name="line.446"></a> +<span class="sourceLineNo">447</span> * a String or char[]<a name="line.447"></a> +<span class="sourceLineNo">448</span> * @see #decodeHex(char[])<a name="line.448"></a> +<span class="sourceLineNo">449</span> */<a name="line.449"></a> +<span class="sourceLineNo">450</span> @Override<a name="line.450"></a> +<span class="sourceLineNo">451</span> public Object decode(final Object object) throws DecoderException {<a name="line.451"></a> +<span class="sourceLineNo">452</span> if (object instanceof String) {<a name="line.452"></a> +<span class="sourceLineNo">453</span> return decode(((String) object).toCharArray());<a name="line.453"></a> +<span class="sourceLineNo">454</span> } else if (object instanceof byte[]) {<a name="line.454"></a> +<span class="sourceLineNo">455</span> return decode((byte[]) object);<a name="line.455"></a> +<span class="sourceLineNo">456</span> } else if (object instanceof ByteBuffer) {<a name="line.456"></a> +<span class="sourceLineNo">457</span> return decode((ByteBuffer) object);<a name="line.457"></a> +<span class="sourceLineNo">458</span> } else {<a name="line.458"></a> +<span class="sourceLineNo">459</span> try {<a name="line.459"></a> +<span class="sourceLineNo">460</span> return decodeHex((char[]) object);<a name="line.460"></a> +<span class="sourceLineNo">461</span> } catch (final ClassCastException e) {<a name="line.461"></a> +<span class="sourceLineNo">462</span> throw new DecoderException(e.getMessage(), e);<a name="line.462"></a> +<span class="sourceLineNo">463</span> }<a name="line.463"></a> +<span class="sourceLineNo">464</span> }<a name="line.464"></a> +<span class="sourceLineNo">465</span> }<a name="line.465"></a> +<span class="sourceLineNo">466</span><a name="line.466"></a> +<span class="sourceLineNo">467</span> /**<a name="line.467"></a> +<span class="sourceLineNo">468</span> * Converts an array of bytes into an array of bytes for the characters representing the hexadecimal values of each<a name="line.468"></a> +<span class="sourceLineNo">469</span> * byte in order. The returned array will be double the length of the passed array, as it takes two characters to<a name="line.469"></a> +<span class="sourceLineNo">470</span> * represent any given byte.<a name="line.470"></a> +<span class="sourceLineNo">471</span> * <p><a name="line.471"></a> +<span class="sourceLineNo">472</span> * The conversion from hexadecimal characters to the returned bytes is performed with the charset named by<a name="line.472"></a> +<span class="sourceLineNo">473</span> * {@link #getCharset()}.<a name="line.473"></a> +<span class="sourceLineNo">474</span> * </p><a name="line.474"></a> +<span class="sourceLineNo">475</span> *<a name="line.475"></a> +<span class="sourceLineNo">476</span> * @param array a byte[] to convert to hex characters<a name="line.476"></a> +<span class="sourceLineNo">477</span> * @return A byte[] containing the bytes of the lower-case hexadecimal characters<a name="line.477"></a> +<span class="sourceLineNo">478</span> * @since 1.7 No longer throws IllegalStateException if the charsetName is invalid.<a name="line.478"></a> +<span class="sourceLineNo">479</span> * @see #encodeHex(byte[])<a name="line.479"></a> +<span class="sourceLineNo">480</span> */<a name="line.480"></a> +<span class="sourceLineNo">481</span> @Override<a name="line.481"></a> +<span class="sourceLineNo">482</span> public byte[] encode(final byte[] array) {<a name="line.482"></a> +<span class="sourceLineNo">483</span> return encodeHexString(array).getBytes(this.getCharset());<a name="line.483"></a> +<span class="sourceLineNo">484</span> }<a name="line.484"></a> +<span class="sourceLineNo">485</span><a name="line.485"></a> +<span class="sourceLineNo">486</span> /**<a name="line.486"></a> +<span class="sourceLineNo">487</span> * Converts byte buffer into an array of bytes for the characters representing the hexadecimal values of each byte<a name="line.487"></a> +<span class="sourceLineNo">488</span> * in order. The returned array will be double the length of the passed array, as it takes two characters to<a name="line.488"></a> +<span class="sourceLineNo">489</span> * represent any given byte.<a name="line.489"></a> +<span class="sourceLineNo">490</span> *<a name="line.490"></a> +<span class="sourceLineNo">491</span> * <p>The conversion from hexadecimal characters to the returned bytes is performed with the charset named by<a name="line.491"></a> +<span class="sourceLineNo">492</span> * {@link #getCharset()}.</p><a name="line.492"></a> +<span class="sourceLineNo">493</span> *<a name="line.493"></a> +<span class="sourceLineNo">494</span> * <p>All bytes identified by {@link ByteBuffer#remaining()} will be used; after this method<a name="line.494"></a> +<span class="sourceLineNo">495</span> * the value {@link ByteBuffer#remaining() remaining()} will be zero.</p><a name="line.495"></a> +<span class="sourceLineNo">496</span> *<a name="line.496"></a> +<span class="sourceLineNo">497</span> * @param array a byte buffer to convert to hex characters<a name="line.497"></a> +<span class="sourceLineNo">498</span> * @return A byte[] containing the bytes of the lower-case hexadecimal characters<a name="line.498"></a> +<span class="sourceLineNo">499</span> * @see #encodeHex(byte[])<a name="line.499"></a> +<span class="sourceLineNo">500</span> * @since 1.11<a name="line.500"></a> +<span class="sourceLineNo">501</span> */<a name="line.501"></a> +<span class="sourceLineNo">502</span> public byte[] encode(final ByteBuffer array) {<a name="line.502"></a> +<span class="sourceLineNo">503</span> return encodeHexString(array).getBytes(this.getCharset());<a name="line.503"></a> +<span class="sourceLineNo">504</span> }<a name="line.504"></a> +<span class="sourceLineNo">505</span><a name="line.505"></a> +<span class="sourceLineNo">506</span> /**<a name="line.506"></a> +<span class="sourceLineNo">507</span> * Converts a String or an array of bytes into an array of characters representing the hexadecimal values of each<a name="line.507"></a> +<span class="sourceLineNo">508</span> * byte in order. The returned array will be double the length of the passed String or array, as it takes two<a name="line.508"></a> +<span class="sourceLineNo">509</span> * characters to represent any given byte.<a name="line.509"></a> +<span class="sourceLineNo">510</span> * <p><a name="line.510"></a> +<span class="sourceLineNo">511</span> * The conversion from hexadecimal characters to bytes to be encoded to performed with the charset named by<a name="line.511"></a> +<span class="sourceLineNo">512</span> * {@link #getCharset()}.<a name="line.512"></a> +<span class="sourceLineNo">513</span> * </p><a name="line.513"></a> +<span class="sourceLineNo">514</span> *<a name="line.514"></a> +<span class="sourceLineNo">515</span> * @param object a String, ByteBuffer, or byte[] to convert to hex characters<a name="line.515"></a> +<span class="sourceLineNo">516</span> * @return A char[] containing lower-case hexadecimal characters<a name="line.516"></a> +<span class="sourceLineNo">517</span> * @throws EncoderException Thrown if the given object is not a String or byte[]<a name="line.517"></a> +<span class="sourceLineNo">518</span> * @see #encodeHex(byte[])<a name="line.518"></a> +<span class="sourceLineNo">519</span> */<a name="line.519"></a> +<span class="sourceLineNo">520</span> @Override<a name="line.520"></a> +<span class="sourceLineNo">521</span> public Object encode(final Object object) throws EncoderException {<a name="line.521"></a> +<span class="sourceLineNo">522</span> byte[] byteArray;<a name="line.522"></a> +<span class="sourceLineNo">523</span> if (object instanceof String) {<a name="line.523"></a> +<span class="sourceLineNo">524</span> byteArray = ((String) object).getBytes(this.getCharset());<a name="line.524"></a> +<span class="sourceLineNo">525</span> } else if (object instanceof ByteBuffer) {<a name="line.525"></a> +<span class="sourceLineNo">526</span> byteArray = toByteArray((ByteBuffer) object);<a name="line.526"></a> +<span class="sourceLineNo">527</span> } else {<a name="line.527"></a> +<span class="sourceLineNo">528</span> try {<a name="line.528"></a> +<span class="sourceLineNo">529</span> byteArray = (byte[]) object;<a name="line.529"></a> +<span class="sourceLineNo">530</span> } catch (final ClassCastException e) {<a name="line.530"></a> +<span class="sourceLineNo">531</span> throw new EncoderException(e.getMessage(), e);<a name="line.531"></a> +<span class="sourceLineNo">532</span> }<a name="line.532"></a> +<span class="sourceLineNo">533</span> }<a name="line.533"></a> +<span class="sourceLineNo">534</span> return encodeHex(byteArray);<a name="line.534"></a> +<span class="sourceLineNo">535</span> }<a name="line.535"></a> +<span class="sourceLineNo">536</span><a name="line.536"></a> +<span class="sourceLineNo">537</span> /**<a name="line.537"></a> +<span class="sourceLineNo">538</span> * Gets the charset.<a name="line.538"></a> +<span class="sourceLineNo">539</span> *<a name="line.539"></a> +<span class="sourceLineNo">540</span> * @return the charset.<a name="line.540"></a> +<span class="sourceLineNo">541</span> * @since 1.7<a name="line.541"></a> +<span class="sourceLineNo">542</span> */<a name="line.542"></a> +<span class="sourceLineNo">543</span> public Charset getCharset() {<a name="line.543"></a> +<span class="sourceLineNo">544</span> return this.charset;<a name="line.544"></a> +<span class="sourceLineNo">545</span> }<a name="line.545"></a> +<span class="sourceLineNo">546</span><a name="line.546"></a> +<span class="sourceLineNo">547</span> /**<a name="line.547"></a> +<span class="sourceLineNo">548</span> * Gets the charset name.<a name="line.548"></a> +<span class="sourceLineNo">549</span> *<a name="line.549"></a> +<span class="sourceLineNo">550</span> * @return the charset name.<a name="line.550"></a> +<span class="sourceLineNo">551</span> * @since 1.4<a name="line.551"></a> +<span class="sourceLineNo">552</span> */<a name="line.552"></a> +<span class="sourceLineNo">553</span> public String getCharsetName() {<a name="line.553"></a> +<span class="sourceLineNo">554</span> return this.charset.name();<a name="line.554"></a> +<span class="sourceLineNo">555</span> }<a name="line.555"></a> +<span class="sourceLineNo">556</span><a name="line.556"></a> +<span class="sourceLineNo">557</span> /**<a name="line.557"></a> +<span class="sourceLineNo">558</span> * Returns a string representation of the object, which includes the charset name.<a name="line.558"></a> +<span class="sourceLineNo">559</span> *<a name="line.559"></a> +<span class="sourceLineNo">560</span> * @return a string representation of the object.<a name="line.560"></a> +<span class="sourceLineNo">561</span> */<a name="line.561"></a> +<span class="sourceLineNo">562</span> @Override<a name="line.562"></a> +<span class="sourceLineNo">563</span> public String toString() {<a name="line.563"></a> +<span class="sourceLineNo">564</span> return super.toString() + "[charsetName=" + this.charset + "]";<a name="line.564"></a> +<span class="sourceLineNo">565</span> }<a name="line.565"></a> +<span class="sourceLineNo">566</span>}<a name="line.566"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/StringUtils.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/StringUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..63373dfaa6b19a9a5ab02b223a6b34c7987e6891 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/binary/StringUtils.html @@ -0,0 +1,491 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.binary;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.UnsupportedEncodingException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.nio.ByteBuffer;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.nio.charset.Charset;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.nio.charset.StandardCharsets;<a name="line.23"></a> +<span class="sourceLineNo">024</span><a name="line.24"></a> +<span class="sourceLineNo">025</span>import org.apache.commons.codec.CharEncoding;<a name="line.25"></a> +<span class="sourceLineNo">026</span><a name="line.26"></a> +<span class="sourceLineNo">027</span>/**<a name="line.27"></a> +<span class="sourceLineNo">028</span> * Converts String to and from bytes using the encodings required by the Java specification. These encodings are<a name="line.28"></a> +<span class="sourceLineNo">029</span> * specified in <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html"><a name="line.29"></a> +<span class="sourceLineNo">030</span> * Standard charsets</a>.<a name="line.30"></a> +<span class="sourceLineNo">031</span> *<a name="line.31"></a> +<span class="sourceLineNo">032</span> * <p>This class is immutable and thread-safe.</p><a name="line.32"></a> +<span class="sourceLineNo">033</span> *<a name="line.33"></a> +<span class="sourceLineNo">034</span> * @see CharEncoding<a name="line.34"></a> +<span class="sourceLineNo">035</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.35"></a> +<span class="sourceLineNo">036</span> * @since 1.4<a name="line.36"></a> +<span class="sourceLineNo">037</span> */<a name="line.37"></a> +<span class="sourceLineNo">038</span>public class StringUtils {<a name="line.38"></a> +<span class="sourceLineNo">039</span><a name="line.39"></a> +<span class="sourceLineNo">040</span> /**<a name="line.40"></a> +<span class="sourceLineNo">041</span> * <p><a name="line.41"></a> +<span class="sourceLineNo">042</span> * Compares two CharSequences, returning {@code true} if they represent equal sequences of characters.<a name="line.42"></a> +<span class="sourceLineNo">043</span> * </p><a name="line.43"></a> +<span class="sourceLineNo">044</span> *<a name="line.44"></a> +<span class="sourceLineNo">045</span> * <p><a name="line.45"></a> +<span class="sourceLineNo">046</span> * {@code null}s are handled without exceptions. Two {@code null} references are considered to be equal.<a name="line.46"></a> +<span class="sourceLineNo">047</span> * The comparison is case sensitive.<a name="line.47"></a> +<span class="sourceLineNo">048</span> * </p><a name="line.48"></a> +<span class="sourceLineNo">049</span> *<a name="line.49"></a> +<span class="sourceLineNo">050</span> * <pre><a name="line.50"></a> +<span class="sourceLineNo">051</span> * StringUtils.equals(null, null) = true<a name="line.51"></a> +<span class="sourceLineNo">052</span> * StringUtils.equals(null, "abc") = false<a name="line.52"></a> +<span class="sourceLineNo">053</span> * StringUtils.equals("abc", null) = false<a name="line.53"></a> +<span class="sourceLineNo">054</span> * StringUtils.equals("abc", "abc") = true<a name="line.54"></a> +<span class="sourceLineNo">055</span> * StringUtils.equals("abc", "ABC") = false<a name="line.55"></a> +<span class="sourceLineNo">056</span> * </pre><a name="line.56"></a> +<span class="sourceLineNo">057</span> *<a name="line.57"></a> +<span class="sourceLineNo">058</span> * <p><a name="line.58"></a> +<span class="sourceLineNo">059</span> * Copied from Apache Commons Lang r1583482 on April 10, 2014 (day of 3.3.2 release).<a name="line.59"></a> +<span class="sourceLineNo">060</span> * </p><a name="line.60"></a> +<span class="sourceLineNo">061</span> *<a name="line.61"></a> +<span class="sourceLineNo">062</span> * @see Object#equals(Object)<a name="line.62"></a> +<span class="sourceLineNo">063</span> * @param cs1<a name="line.63"></a> +<span class="sourceLineNo">064</span> * the first CharSequence, may be {@code null}<a name="line.64"></a> +<span class="sourceLineNo">065</span> * @param cs2<a name="line.65"></a> +<span class="sourceLineNo">066</span> * the second CharSequence, may be {@code null}<a name="line.66"></a> +<span class="sourceLineNo">067</span> * @return {@code true} if the CharSequences are equal (case-sensitive), or both {@code null}<a name="line.67"></a> +<span class="sourceLineNo">068</span> * @since 1.10<a name="line.68"></a> +<span class="sourceLineNo">069</span> */<a name="line.69"></a> +<span class="sourceLineNo">070</span> public static boolean equals(final CharSequence cs1, final CharSequence cs2) {<a name="line.70"></a> +<span class="sourceLineNo">071</span> if (cs1 == cs2) {<a name="line.71"></a> +<span class="sourceLineNo">072</span> return true;<a name="line.72"></a> +<span class="sourceLineNo">073</span> }<a name="line.73"></a> +<span class="sourceLineNo">074</span> if (cs1 == null || cs2 == null) {<a name="line.74"></a> +<span class="sourceLineNo">075</span> return false;<a name="line.75"></a> +<span class="sourceLineNo">076</span> }<a name="line.76"></a> +<span class="sourceLineNo">077</span> if (cs1 instanceof String && cs2 instanceof String) {<a name="line.77"></a> +<span class="sourceLineNo">078</span> return cs1.equals(cs2);<a name="line.78"></a> +<span class="sourceLineNo">079</span> }<a name="line.79"></a> +<span class="sourceLineNo">080</span> return cs1.length() == cs2.length() && CharSequenceUtils.regionMatches(cs1, false, 0, cs2, 0, cs1.length());<a name="line.80"></a> +<span class="sourceLineNo">081</span> }<a name="line.81"></a> +<span class="sourceLineNo">082</span><a name="line.82"></a> +<span class="sourceLineNo">083</span> /**<a name="line.83"></a> +<span class="sourceLineNo">084</span> * Calls {@link String#getBytes(Charset)}<a name="line.84"></a> +<span class="sourceLineNo">085</span> *<a name="line.85"></a> +<span class="sourceLineNo">086</span> * @param string<a name="line.86"></a> +<span class="sourceLineNo">087</span> * The string to encode (if null, return null).<a name="line.87"></a> +<span class="sourceLineNo">088</span> * @param charset<a name="line.88"></a> +<span class="sourceLineNo">089</span> * The {@link Charset} to encode the {@code String}<a name="line.89"></a> +<span class="sourceLineNo">090</span> * @return the encoded bytes<a name="line.90"></a> +<span class="sourceLineNo">091</span> */<a name="line.91"></a> +<span class="sourceLineNo">092</span> private static ByteBuffer getByteBuffer(final String string, final Charset charset) {<a name="line.92"></a> +<span class="sourceLineNo">093</span> if (string == null) {<a name="line.93"></a> +<span class="sourceLineNo">094</span> return null;<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span> return ByteBuffer.wrap(string.getBytes(charset));<a name="line.96"></a> +<span class="sourceLineNo">097</span> }<a name="line.97"></a> +<span class="sourceLineNo">098</span><a name="line.98"></a> +<span class="sourceLineNo">099</span> /**<a name="line.99"></a> +<span class="sourceLineNo">100</span> * Encodes the given string into a byte buffer using the UTF-8 charset, storing the result into a new byte<a name="line.100"></a> +<span class="sourceLineNo">101</span> * array.<a name="line.101"></a> +<span class="sourceLineNo">102</span> *<a name="line.102"></a> +<span class="sourceLineNo">103</span> * @param string<a name="line.103"></a> +<span class="sourceLineNo">104</span> * the String to encode, may be {@code null}<a name="line.104"></a> +<span class="sourceLineNo">105</span> * @return encoded bytes, or {@code null} if the input string was {@code null}<a name="line.105"></a> +<span class="sourceLineNo">106</span> * @throws NullPointerException<a name="line.106"></a> +<span class="sourceLineNo">107</span> * Thrown if {@link StandardCharsets#UTF_8} is not initialized, which should never happen since it is<a name="line.107"></a> +<span class="sourceLineNo">108</span> * required by the Java platform specification.<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.109"></a> +<span class="sourceLineNo">110</span> * @see #getBytesUnchecked(String, String)<a name="line.110"></a> +<span class="sourceLineNo">111</span> * @since 1.11<a name="line.111"></a> +<span class="sourceLineNo">112</span> */<a name="line.112"></a> +<span class="sourceLineNo">113</span> public static ByteBuffer getByteBufferUtf8(final String string) {<a name="line.113"></a> +<span class="sourceLineNo">114</span> return getByteBuffer(string, StandardCharsets.UTF_8);<a name="line.114"></a> +<span class="sourceLineNo">115</span> }<a name="line.115"></a> +<span class="sourceLineNo">116</span><a name="line.116"></a> +<span class="sourceLineNo">117</span> /**<a name="line.117"></a> +<span class="sourceLineNo">118</span> * Calls {@link String#getBytes(Charset)}<a name="line.118"></a> +<span class="sourceLineNo">119</span> *<a name="line.119"></a> +<span class="sourceLineNo">120</span> * @param string<a name="line.120"></a> +<span class="sourceLineNo">121</span> * The string to encode (if null, return null).<a name="line.121"></a> +<span class="sourceLineNo">122</span> * @param charset<a name="line.122"></a> +<span class="sourceLineNo">123</span> * The {@link Charset} to encode the {@code String}<a name="line.123"></a> +<span class="sourceLineNo">124</span> * @return the encoded bytes<a name="line.124"></a> +<span class="sourceLineNo">125</span> */<a name="line.125"></a> +<span class="sourceLineNo">126</span> private static byte[] getBytes(final String string, final Charset charset) {<a name="line.126"></a> +<span class="sourceLineNo">127</span> if (string == null) {<a name="line.127"></a> +<span class="sourceLineNo">128</span> return null;<a name="line.128"></a> +<span class="sourceLineNo">129</span> }<a name="line.129"></a> +<span class="sourceLineNo">130</span> return string.getBytes(charset);<a name="line.130"></a> +<span class="sourceLineNo">131</span> }<a name="line.131"></a> +<span class="sourceLineNo">132</span><a name="line.132"></a> +<span class="sourceLineNo">133</span> /**<a name="line.133"></a> +<span class="sourceLineNo">134</span> * Encodes the given string into a sequence of bytes using the ISO-8859-1 charset, storing the result into a new<a name="line.134"></a> +<span class="sourceLineNo">135</span> * byte array.<a name="line.135"></a> +<span class="sourceLineNo">136</span> *<a name="line.136"></a> +<span class="sourceLineNo">137</span> * @param string<a name="line.137"></a> +<span class="sourceLineNo">138</span> * the String to encode, may be {@code null}<a name="line.138"></a> +<span class="sourceLineNo">139</span> * @return encoded bytes, or {@code null} if the input string was {@code null}<a name="line.139"></a> +<span class="sourceLineNo">140</span> * @throws NullPointerException<a name="line.140"></a> +<span class="sourceLineNo">141</span> * Thrown if {@link StandardCharsets#ISO_8859_1} is not initialized, which should never happen since it is<a name="line.141"></a> +<span class="sourceLineNo">142</span> * required by the Java platform specification.<a name="line.142"></a> +<span class="sourceLineNo">143</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.143"></a> +<span class="sourceLineNo">144</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.144"></a> +<span class="sourceLineNo">145</span> * @see #getBytesUnchecked(String, String)<a name="line.145"></a> +<span class="sourceLineNo">146</span> */<a name="line.146"></a> +<span class="sourceLineNo">147</span> public static byte[] getBytesIso8859_1(final String string) {<a name="line.147"></a> +<span class="sourceLineNo">148</span> return getBytes(string, StandardCharsets.ISO_8859_1);<a name="line.148"></a> +<span class="sourceLineNo">149</span> }<a name="line.149"></a> +<span class="sourceLineNo">150</span><a name="line.150"></a> +<span class="sourceLineNo">151</span><a name="line.151"></a> +<span class="sourceLineNo">152</span> /**<a name="line.152"></a> +<span class="sourceLineNo">153</span> * Encodes the given string into a sequence of bytes using the named charset, storing the result into a new byte<a name="line.153"></a> +<span class="sourceLineNo">154</span> * array.<a name="line.154"></a> +<span class="sourceLineNo">155</span> * <p><a name="line.155"></a> +<span class="sourceLineNo">156</span> * This method catches {@link UnsupportedEncodingException} and rethrows it as {@link IllegalStateException}, which<a name="line.156"></a> +<span class="sourceLineNo">157</span> * should never happen for a required charset name. Use this method when the encoding is required to be in the JRE.<a name="line.157"></a> +<span class="sourceLineNo">158</span> * </p><a name="line.158"></a> +<span class="sourceLineNo">159</span> *<a name="line.159"></a> +<span class="sourceLineNo">160</span> * @param string<a name="line.160"></a> +<span class="sourceLineNo">161</span> * the String to encode, may be {@code null}<a name="line.161"></a> +<span class="sourceLineNo">162</span> * @param charsetName<a name="line.162"></a> +<span class="sourceLineNo">163</span> * The name of a required {@link java.nio.charset.Charset}<a name="line.163"></a> +<span class="sourceLineNo">164</span> * @return encoded bytes, or {@code null} if the input string was {@code null}<a name="line.164"></a> +<span class="sourceLineNo">165</span> * @throws IllegalStateException<a name="line.165"></a> +<span class="sourceLineNo">166</span> * Thrown when a {@link UnsupportedEncodingException} is caught, which should never happen for a<a name="line.166"></a> +<span class="sourceLineNo">167</span> * required charset name.<a name="line.167"></a> +<span class="sourceLineNo">168</span> * @see CharEncoding<a name="line.168"></a> +<span class="sourceLineNo">169</span> * @see String#getBytes(String)<a name="line.169"></a> +<span class="sourceLineNo">170</span> */<a name="line.170"></a> +<span class="sourceLineNo">171</span> public static byte[] getBytesUnchecked(final String string, final String charsetName) {<a name="line.171"></a> +<span class="sourceLineNo">172</span> if (string == null) {<a name="line.172"></a> +<span class="sourceLineNo">173</span> return null;<a name="line.173"></a> +<span class="sourceLineNo">174</span> }<a name="line.174"></a> +<span class="sourceLineNo">175</span> try {<a name="line.175"></a> +<span class="sourceLineNo">176</span> return string.getBytes(charsetName);<a name="line.176"></a> +<span class="sourceLineNo">177</span> } catch (final UnsupportedEncodingException e) {<a name="line.177"></a> +<span class="sourceLineNo">178</span> throw StringUtils.newIllegalStateException(charsetName, e);<a name="line.178"></a> +<span class="sourceLineNo">179</span> }<a name="line.179"></a> +<span class="sourceLineNo">180</span> }<a name="line.180"></a> +<span class="sourceLineNo">181</span><a name="line.181"></a> +<span class="sourceLineNo">182</span> /**<a name="line.182"></a> +<span class="sourceLineNo">183</span> * Encodes the given string into a sequence of bytes using the US-ASCII charset, storing the result into a new byte<a name="line.183"></a> +<span class="sourceLineNo">184</span> * array.<a name="line.184"></a> +<span class="sourceLineNo">185</span> *<a name="line.185"></a> +<span class="sourceLineNo">186</span> * @param string<a name="line.186"></a> +<span class="sourceLineNo">187</span> * the String to encode, may be {@code null}<a name="line.187"></a> +<span class="sourceLineNo">188</span> * @return encoded bytes, or {@code null} if the input string was {@code null}<a name="line.188"></a> +<span class="sourceLineNo">189</span> * @throws NullPointerException<a name="line.189"></a> +<span class="sourceLineNo">190</span> * Thrown if {@link StandardCharsets#US_ASCII} is not initialized, which should never happen since it is<a name="line.190"></a> +<span class="sourceLineNo">191</span> * required by the Java platform specification.<a name="line.191"></a> +<span class="sourceLineNo">192</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.192"></a> +<span class="sourceLineNo">193</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.193"></a> +<span class="sourceLineNo">194</span> * @see #getBytesUnchecked(String, String)<a name="line.194"></a> +<span class="sourceLineNo">195</span> */<a name="line.195"></a> +<span class="sourceLineNo">196</span> public static byte[] getBytesUsAscii(final String string) {<a name="line.196"></a> +<span class="sourceLineNo">197</span> return getBytes(string, StandardCharsets.US_ASCII);<a name="line.197"></a> +<span class="sourceLineNo">198</span> }<a name="line.198"></a> +<span class="sourceLineNo">199</span><a name="line.199"></a> +<span class="sourceLineNo">200</span> /**<a name="line.200"></a> +<span class="sourceLineNo">201</span> * Encodes the given string into a sequence of bytes using the UTF-16 charset, storing the result into a new byte<a name="line.201"></a> +<span class="sourceLineNo">202</span> * array.<a name="line.202"></a> +<span class="sourceLineNo">203</span> *<a name="line.203"></a> +<span class="sourceLineNo">204</span> * @param string<a name="line.204"></a> +<span class="sourceLineNo">205</span> * the String to encode, may be {@code null}<a name="line.205"></a> +<span class="sourceLineNo">206</span> * @return encoded bytes, or {@code null} if the input string was {@code null}<a name="line.206"></a> +<span class="sourceLineNo">207</span> * @throws NullPointerException<a name="line.207"></a> +<span class="sourceLineNo">208</span> * Thrown if {@link StandardCharsets#UTF_16} is not initialized, which should never happen since it is<a name="line.208"></a> +<span class="sourceLineNo">209</span> * required by the Java platform specification.<a name="line.209"></a> +<span class="sourceLineNo">210</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.210"></a> +<span class="sourceLineNo">211</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.211"></a> +<span class="sourceLineNo">212</span> * @see #getBytesUnchecked(String, String)<a name="line.212"></a> +<span class="sourceLineNo">213</span> */<a name="line.213"></a> +<span class="sourceLineNo">214</span> public static byte[] getBytesUtf16(final String string) {<a name="line.214"></a> +<span class="sourceLineNo">215</span> return getBytes(string, StandardCharsets.UTF_16);<a name="line.215"></a> +<span class="sourceLineNo">216</span> }<a name="line.216"></a> +<span class="sourceLineNo">217</span><a name="line.217"></a> +<span class="sourceLineNo">218</span> /**<a name="line.218"></a> +<span class="sourceLineNo">219</span> * Encodes the given string into a sequence of bytes using the UTF-16BE charset, storing the result into a new byte<a name="line.219"></a> +<span class="sourceLineNo">220</span> * array.<a name="line.220"></a> +<span class="sourceLineNo">221</span> *<a name="line.221"></a> +<span class="sourceLineNo">222</span> * @param string<a name="line.222"></a> +<span class="sourceLineNo">223</span> * the String to encode, may be {@code null}<a name="line.223"></a> +<span class="sourceLineNo">224</span> * @return encoded bytes, or {@code null} if the input string was {@code null}<a name="line.224"></a> +<span class="sourceLineNo">225</span> * @throws NullPointerException<a name="line.225"></a> +<span class="sourceLineNo">226</span> * Thrown if {@link StandardCharsets#UTF_16BE} is not initialized, which should never happen since it is<a name="line.226"></a> +<span class="sourceLineNo">227</span> * required by the Java platform specification.<a name="line.227"></a> +<span class="sourceLineNo">228</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.228"></a> +<span class="sourceLineNo">229</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.229"></a> +<span class="sourceLineNo">230</span> * @see #getBytesUnchecked(String, String)<a name="line.230"></a> +<span class="sourceLineNo">231</span> */<a name="line.231"></a> +<span class="sourceLineNo">232</span> public static byte[] getBytesUtf16Be(final String string) {<a name="line.232"></a> +<span class="sourceLineNo">233</span> return getBytes(string, StandardCharsets.UTF_16BE);<a name="line.233"></a> +<span class="sourceLineNo">234</span> }<a name="line.234"></a> +<span class="sourceLineNo">235</span><a name="line.235"></a> +<span class="sourceLineNo">236</span> /**<a name="line.236"></a> +<span class="sourceLineNo">237</span> * Encodes the given string into a sequence of bytes using the UTF-16LE charset, storing the result into a new byte<a name="line.237"></a> +<span class="sourceLineNo">238</span> * array.<a name="line.238"></a> +<span class="sourceLineNo">239</span> *<a name="line.239"></a> +<span class="sourceLineNo">240</span> * @param string<a name="line.240"></a> +<span class="sourceLineNo">241</span> * the String to encode, may be {@code null}<a name="line.241"></a> +<span class="sourceLineNo">242</span> * @return encoded bytes, or {@code null} if the input string was {@code null}<a name="line.242"></a> +<span class="sourceLineNo">243</span> * @throws NullPointerException<a name="line.243"></a> +<span class="sourceLineNo">244</span> * Thrown if {@link StandardCharsets#UTF_16LE} is not initialized, which should never happen since it is<a name="line.244"></a> +<span class="sourceLineNo">245</span> * required by the Java platform specification.<a name="line.245"></a> +<span class="sourceLineNo">246</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.246"></a> +<span class="sourceLineNo">247</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.247"></a> +<span class="sourceLineNo">248</span> * @see #getBytesUnchecked(String, String)<a name="line.248"></a> +<span class="sourceLineNo">249</span> */<a name="line.249"></a> +<span class="sourceLineNo">250</span> public static byte[] getBytesUtf16Le(final String string) {<a name="line.250"></a> +<span class="sourceLineNo">251</span> return getBytes(string, StandardCharsets.UTF_16LE);<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span><a name="line.253"></a> +<span class="sourceLineNo">254</span> /**<a name="line.254"></a> +<span class="sourceLineNo">255</span> * Encodes the given string into a sequence of bytes using the UTF-8 charset, storing the result into a new byte<a name="line.255"></a> +<span class="sourceLineNo">256</span> * array.<a name="line.256"></a> +<span class="sourceLineNo">257</span> *<a name="line.257"></a> +<span class="sourceLineNo">258</span> * @param string<a name="line.258"></a> +<span class="sourceLineNo">259</span> * the String to encode, may be {@code null}<a name="line.259"></a> +<span class="sourceLineNo">260</span> * @return encoded bytes, or {@code null} if the input string was {@code null}<a name="line.260"></a> +<span class="sourceLineNo">261</span> * @throws NullPointerException<a name="line.261"></a> +<span class="sourceLineNo">262</span> * Thrown if {@link StandardCharsets#UTF_8} is not initialized, which should never happen since it is<a name="line.262"></a> +<span class="sourceLineNo">263</span> * required by the Java platform specification.<a name="line.263"></a> +<span class="sourceLineNo">264</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.264"></a> +<span class="sourceLineNo">265</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.265"></a> +<span class="sourceLineNo">266</span> * @see #getBytesUnchecked(String, String)<a name="line.266"></a> +<span class="sourceLineNo">267</span> */<a name="line.267"></a> +<span class="sourceLineNo">268</span> public static byte[] getBytesUtf8(final String string) {<a name="line.268"></a> +<span class="sourceLineNo">269</span> return getBytes(string, StandardCharsets.UTF_8);<a name="line.269"></a> +<span class="sourceLineNo">270</span> }<a name="line.270"></a> +<span class="sourceLineNo">271</span><a name="line.271"></a> +<span class="sourceLineNo">272</span> private static IllegalStateException newIllegalStateException(final String charsetName,<a name="line.272"></a> +<span class="sourceLineNo">273</span> final UnsupportedEncodingException e) {<a name="line.273"></a> +<span class="sourceLineNo">274</span> return new IllegalStateException(charsetName + ": " + e);<a name="line.274"></a> +<span class="sourceLineNo">275</span> }<a name="line.275"></a> +<span class="sourceLineNo">276</span><a name="line.276"></a> +<span class="sourceLineNo">277</span> /**<a name="line.277"></a> +<span class="sourceLineNo">278</span> * Constructs a new {@code String} by decoding the specified array of bytes using the given charset.<a name="line.278"></a> +<span class="sourceLineNo">279</span> *<a name="line.279"></a> +<span class="sourceLineNo">280</span> * @param bytes<a name="line.280"></a> +<span class="sourceLineNo">281</span> * The bytes to be decoded into characters<a name="line.281"></a> +<span class="sourceLineNo">282</span> * @param charset<a name="line.282"></a> +<span class="sourceLineNo">283</span> * The {@link Charset} to encode the {@code String}; not {@code null}<a name="line.283"></a> +<span class="sourceLineNo">284</span> * @return A new {@code String} decoded from the specified array of bytes using the given charset,<a name="line.284"></a> +<span class="sourceLineNo">285</span> * or {@code null} if the input byte array was {@code null}.<a name="line.285"></a> +<span class="sourceLineNo">286</span> * @throws NullPointerException<a name="line.286"></a> +<span class="sourceLineNo">287</span> * Thrown if charset is {@code null}<a name="line.287"></a> +<span class="sourceLineNo">288</span> */<a name="line.288"></a> +<span class="sourceLineNo">289</span> private static String newString(final byte[] bytes, final Charset charset) {<a name="line.289"></a> +<span class="sourceLineNo">290</span> return bytes == null ? null : new String(bytes, charset);<a name="line.290"></a> +<span class="sourceLineNo">291</span> }<a name="line.291"></a> +<span class="sourceLineNo">292</span><a name="line.292"></a> +<span class="sourceLineNo">293</span> /**<a name="line.293"></a> +<span class="sourceLineNo">294</span> * Constructs a new {@code String} by decoding the specified array of bytes using the given charset.<a name="line.294"></a> +<span class="sourceLineNo">295</span> * <p><a name="line.295"></a> +<span class="sourceLineNo">296</span> * This method catches {@link UnsupportedEncodingException} and re-throws it as {@link IllegalStateException}, which<a name="line.296"></a> +<span class="sourceLineNo">297</span> * should never happen for a required charset name. Use this method when the encoding is required to be in the JRE.<a name="line.297"></a> +<span class="sourceLineNo">298</span> * </p><a name="line.298"></a> +<span class="sourceLineNo">299</span> *<a name="line.299"></a> +<span class="sourceLineNo">300</span> * @param bytes<a name="line.300"></a> +<span class="sourceLineNo">301</span> * The bytes to be decoded into characters, may be {@code null}<a name="line.301"></a> +<span class="sourceLineNo">302</span> * @param charsetName<a name="line.302"></a> +<span class="sourceLineNo">303</span> * The name of a required {@link java.nio.charset.Charset}<a name="line.303"></a> +<span class="sourceLineNo">304</span> * @return A new {@code String} decoded from the specified array of bytes using the given charset,<a name="line.304"></a> +<span class="sourceLineNo">305</span> * or {@code null} if the input byte array was {@code null}.<a name="line.305"></a> +<span class="sourceLineNo">306</span> * @throws IllegalStateException<a name="line.306"></a> +<span class="sourceLineNo">307</span> * Thrown when a {@link UnsupportedEncodingException} is caught, which should never happen for a<a name="line.307"></a> +<span class="sourceLineNo">308</span> * required charset name.<a name="line.308"></a> +<span class="sourceLineNo">309</span> * @see CharEncoding<a name="line.309"></a> +<span class="sourceLineNo">310</span> * @see String#String(byte[], String)<a name="line.310"></a> +<span class="sourceLineNo">311</span> */<a name="line.311"></a> +<span class="sourceLineNo">312</span> public static String newString(final byte[] bytes, final String charsetName) {<a name="line.312"></a> +<span class="sourceLineNo">313</span> if (bytes == null) {<a name="line.313"></a> +<span class="sourceLineNo">314</span> return null;<a name="line.314"></a> +<span class="sourceLineNo">315</span> }<a name="line.315"></a> +<span class="sourceLineNo">316</span> try {<a name="line.316"></a> +<span class="sourceLineNo">317</span> return new String(bytes, charsetName);<a name="line.317"></a> +<span class="sourceLineNo">318</span> } catch (final UnsupportedEncodingException e) {<a name="line.318"></a> +<span class="sourceLineNo">319</span> throw StringUtils.newIllegalStateException(charsetName, e);<a name="line.319"></a> +<span class="sourceLineNo">320</span> }<a name="line.320"></a> +<span class="sourceLineNo">321</span> }<a name="line.321"></a> +<span class="sourceLineNo">322</span><a name="line.322"></a> +<span class="sourceLineNo">323</span> /**<a name="line.323"></a> +<span class="sourceLineNo">324</span> * Constructs a new {@code String} by decoding the specified array of bytes using the ISO-8859-1 charset.<a name="line.324"></a> +<span class="sourceLineNo">325</span> *<a name="line.325"></a> +<span class="sourceLineNo">326</span> * @param bytes<a name="line.326"></a> +<span class="sourceLineNo">327</span> * The bytes to be decoded into characters, may be {@code null}<a name="line.327"></a> +<span class="sourceLineNo">328</span> * @return A new {@code String} decoded from the specified array of bytes using the ISO-8859-1 charset, or<a name="line.328"></a> +<span class="sourceLineNo">329</span> * {@code null} if the input byte array was {@code null}.<a name="line.329"></a> +<span class="sourceLineNo">330</span> * @throws NullPointerException<a name="line.330"></a> +<span class="sourceLineNo">331</span> * Thrown if {@link StandardCharsets#ISO_8859_1} is not initialized, which should never happen since it is<a name="line.331"></a> +<span class="sourceLineNo">332</span> * required by the Java platform specification.<a name="line.332"></a> +<span class="sourceLineNo">333</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.333"></a> +<span class="sourceLineNo">334</span> */<a name="line.334"></a> +<span class="sourceLineNo">335</span> public static String newStringIso8859_1(final byte[] bytes) {<a name="line.335"></a> +<span class="sourceLineNo">336</span> return newString(bytes, StandardCharsets.ISO_8859_1);<a name="line.336"></a> +<span class="sourceLineNo">337</span> }<a name="line.337"></a> +<span class="sourceLineNo">338</span><a name="line.338"></a> +<span class="sourceLineNo">339</span> /**<a name="line.339"></a> +<span class="sourceLineNo">340</span> * Constructs a new {@code String} by decoding the specified array of bytes using the US-ASCII charset.<a name="line.340"></a> +<span class="sourceLineNo">341</span> *<a name="line.341"></a> +<span class="sourceLineNo">342</span> * @param bytes<a name="line.342"></a> +<span class="sourceLineNo">343</span> * The bytes to be decoded into characters<a name="line.343"></a> +<span class="sourceLineNo">344</span> * @return A new {@code String} decoded from the specified array of bytes using the US-ASCII charset,<a name="line.344"></a> +<span class="sourceLineNo">345</span> * or {@code null} if the input byte array was {@code null}.<a name="line.345"></a> +<span class="sourceLineNo">346</span> * @throws NullPointerException<a name="line.346"></a> +<span class="sourceLineNo">347</span> * Thrown if {@link StandardCharsets#US_ASCII} is not initialized, which should never happen since it is<a name="line.347"></a> +<span class="sourceLineNo">348</span> * required by the Java platform specification.<a name="line.348"></a> +<span class="sourceLineNo">349</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.349"></a> +<span class="sourceLineNo">350</span> */<a name="line.350"></a> +<span class="sourceLineNo">351</span> public static String newStringUsAscii(final byte[] bytes) {<a name="line.351"></a> +<span class="sourceLineNo">352</span> return newString(bytes, StandardCharsets.US_ASCII);<a name="line.352"></a> +<span class="sourceLineNo">353</span> }<a name="line.353"></a> +<span class="sourceLineNo">354</span><a name="line.354"></a> +<span class="sourceLineNo">355</span> /**<a name="line.355"></a> +<span class="sourceLineNo">356</span> * Constructs a new {@code String} by decoding the specified array of bytes using the UTF-16 charset.<a name="line.356"></a> +<span class="sourceLineNo">357</span> *<a name="line.357"></a> +<span class="sourceLineNo">358</span> * @param bytes<a name="line.358"></a> +<span class="sourceLineNo">359</span> * The bytes to be decoded into characters<a name="line.359"></a> +<span class="sourceLineNo">360</span> * @return A new {@code String} decoded from the specified array of bytes using the UTF-16 charset<a name="line.360"></a> +<span class="sourceLineNo">361</span> * or {@code null} if the input byte array was {@code null}.<a name="line.361"></a> +<span class="sourceLineNo">362</span> * @throws NullPointerException<a name="line.362"></a> +<span class="sourceLineNo">363</span> * Thrown if {@link StandardCharsets#UTF_16} is not initialized, which should never happen since it is<a name="line.363"></a> +<span class="sourceLineNo">364</span> * required by the Java platform specification.<a name="line.364"></a> +<span class="sourceLineNo">365</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.365"></a> +<span class="sourceLineNo">366</span> */<a name="line.366"></a> +<span class="sourceLineNo">367</span> public static String newStringUtf16(final byte[] bytes) {<a name="line.367"></a> +<span class="sourceLineNo">368</span> return newString(bytes, StandardCharsets.UTF_16);<a name="line.368"></a> +<span class="sourceLineNo">369</span> }<a name="line.369"></a> +<span class="sourceLineNo">370</span><a name="line.370"></a> +<span class="sourceLineNo">371</span> /**<a name="line.371"></a> +<span class="sourceLineNo">372</span> * Constructs a new {@code String} by decoding the specified array of bytes using the UTF-16BE charset.<a name="line.372"></a> +<span class="sourceLineNo">373</span> *<a name="line.373"></a> +<span class="sourceLineNo">374</span> * @param bytes<a name="line.374"></a> +<span class="sourceLineNo">375</span> * The bytes to be decoded into characters<a name="line.375"></a> +<span class="sourceLineNo">376</span> * @return A new {@code String} decoded from the specified array of bytes using the UTF-16BE charset,<a name="line.376"></a> +<span class="sourceLineNo">377</span> * or {@code null} if the input byte array was {@code null}.<a name="line.377"></a> +<span class="sourceLineNo">378</span> * @throws NullPointerException<a name="line.378"></a> +<span class="sourceLineNo">379</span> * Thrown if {@link StandardCharsets#UTF_16BE} is not initialized, which should never happen since it is<a name="line.379"></a> +<span class="sourceLineNo">380</span> * required by the Java platform specification.<a name="line.380"></a> +<span class="sourceLineNo">381</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.381"></a> +<span class="sourceLineNo">382</span> */<a name="line.382"></a> +<span class="sourceLineNo">383</span> public static String newStringUtf16Be(final byte[] bytes) {<a name="line.383"></a> +<span class="sourceLineNo">384</span> return newString(bytes, StandardCharsets.UTF_16BE);<a name="line.384"></a> +<span class="sourceLineNo">385</span> }<a name="line.385"></a> +<span class="sourceLineNo">386</span><a name="line.386"></a> +<span class="sourceLineNo">387</span> /**<a name="line.387"></a> +<span class="sourceLineNo">388</span> * Constructs a new {@code String} by decoding the specified array of bytes using the UTF-16LE charset.<a name="line.388"></a> +<span class="sourceLineNo">389</span> *<a name="line.389"></a> +<span class="sourceLineNo">390</span> * @param bytes<a name="line.390"></a> +<span class="sourceLineNo">391</span> * The bytes to be decoded into characters<a name="line.391"></a> +<span class="sourceLineNo">392</span> * @return A new {@code String} decoded from the specified array of bytes using the UTF-16LE charset,<a name="line.392"></a> +<span class="sourceLineNo">393</span> * or {@code null} if the input byte array was {@code null}.<a name="line.393"></a> +<span class="sourceLineNo">394</span> * @throws NullPointerException<a name="line.394"></a> +<span class="sourceLineNo">395</span> * Thrown if {@link StandardCharsets#UTF_16LE} is not initialized, which should never happen since it is<a name="line.395"></a> +<span class="sourceLineNo">396</span> * required by the Java platform specification.<a name="line.396"></a> +<span class="sourceLineNo">397</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.397"></a> +<span class="sourceLineNo">398</span> */<a name="line.398"></a> +<span class="sourceLineNo">399</span> public static String newStringUtf16Le(final byte[] bytes) {<a name="line.399"></a> +<span class="sourceLineNo">400</span> return newString(bytes, StandardCharsets.UTF_16LE);<a name="line.400"></a> +<span class="sourceLineNo">401</span> }<a name="line.401"></a> +<span class="sourceLineNo">402</span><a name="line.402"></a> +<span class="sourceLineNo">403</span> /**<a name="line.403"></a> +<span class="sourceLineNo">404</span> * Constructs a new {@code String} by decoding the specified array of bytes using the UTF-8 charset.<a name="line.404"></a> +<span class="sourceLineNo">405</span> *<a name="line.405"></a> +<span class="sourceLineNo">406</span> * @param bytes<a name="line.406"></a> +<span class="sourceLineNo">407</span> * The bytes to be decoded into characters<a name="line.407"></a> +<span class="sourceLineNo">408</span> * @return A new {@code String} decoded from the specified array of bytes using the UTF-8 charset,<a name="line.408"></a> +<span class="sourceLineNo">409</span> * or {@code null} if the input byte array was {@code null}.<a name="line.409"></a> +<span class="sourceLineNo">410</span> * @throws NullPointerException<a name="line.410"></a> +<span class="sourceLineNo">411</span> * Thrown if {@link StandardCharsets#UTF_8} is not initialized, which should never happen since it is<a name="line.411"></a> +<span class="sourceLineNo">412</span> * required by the Java platform specification.<a name="line.412"></a> +<span class="sourceLineNo">413</span> * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException<a name="line.413"></a> +<span class="sourceLineNo">414</span> */<a name="line.414"></a> +<span class="sourceLineNo">415</span> public static String newStringUtf8(final byte[] bytes) {<a name="line.415"></a> +<span class="sourceLineNo">416</span> return newString(bytes, StandardCharsets.UTF_8);<a name="line.416"></a> +<span class="sourceLineNo">417</span> }<a name="line.417"></a> +<span class="sourceLineNo">418</span><a name="line.418"></a> +<span class="sourceLineNo">419</span>}<a name="line.419"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/cli/Digest.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/cli/Digest.html new file mode 100644 index 0000000000000000000000000000000000000000..965585406b9575df61074304d425b7ef1742dc89 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/cli/Digest.html @@ -0,0 +1,222 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>package org.apache.commons.codec.cli;<a name="line.17"></a> +<span class="sourceLineNo">018</span><a name="line.18"></a> +<span class="sourceLineNo">019</span>import java.io.File;<a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.IOException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.nio.charset.Charset;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.security.MessageDigest;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.Arrays;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.Locale;<a name="line.24"></a> +<span class="sourceLineNo">025</span><a name="line.25"></a> +<span class="sourceLineNo">026</span>import org.apache.commons.codec.binary.Hex;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import org.apache.commons.codec.digest.DigestUtils;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import org.apache.commons.codec.digest.MessageDigestAlgorithms;<a name="line.28"></a> +<span class="sourceLineNo">029</span><a name="line.29"></a> +<span class="sourceLineNo">030</span>/**<a name="line.30"></a> +<span class="sourceLineNo">031</span> * A minimal command line to run digest over files, directories or a string<a name="line.31"></a> +<span class="sourceLineNo">032</span> *<a name="line.32"></a> +<span class="sourceLineNo">033</span> * @see #main(String[])<a name="line.33"></a> +<span class="sourceLineNo">034</span> * @since 1.11<a name="line.34"></a> +<span class="sourceLineNo">035</span> */<a name="line.35"></a> +<span class="sourceLineNo">036</span>public class Digest {<a name="line.36"></a> +<span class="sourceLineNo">037</span><a name="line.37"></a> +<span class="sourceLineNo">038</span> /**<a name="line.38"></a> +<span class="sourceLineNo">039</span> * Runs the digest algorithm in {@code args[0]} on the file in {@code args[1]}. If there is no {@code args[1]}, use<a name="line.39"></a> +<span class="sourceLineNo">040</span> * standard input.<a name="line.40"></a> +<span class="sourceLineNo">041</span> *<a name="line.41"></a> +<span class="sourceLineNo">042</span> * <p><a name="line.42"></a> +<span class="sourceLineNo">043</span> * The algorithm can also be {@code ALL} or {@code *} to output one line for each known algorithm.<a name="line.43"></a> +<span class="sourceLineNo">044</span> * </p><a name="line.44"></a> +<span class="sourceLineNo">045</span> *<a name="line.45"></a> +<span class="sourceLineNo">046</span> * @param args<a name="line.46"></a> +<span class="sourceLineNo">047</span> * {@code args[0]} is one of {@link MessageDigestAlgorithms} name,<a name="line.47"></a> +<span class="sourceLineNo">048</span> * {@link MessageDigest} name, {@code ALL}, or {@code *}.<a name="line.48"></a> +<span class="sourceLineNo">049</span> * {@code args[1+]} is a FILE/DIRECTORY/String.<a name="line.49"></a> +<span class="sourceLineNo">050</span> * @throws IOException if an error occurs<a name="line.50"></a> +<span class="sourceLineNo">051</span> */<a name="line.51"></a> +<span class="sourceLineNo">052</span> public static void main(final String[] args) throws IOException {<a name="line.52"></a> +<span class="sourceLineNo">053</span> new Digest(args).run();<a name="line.53"></a> +<span class="sourceLineNo">054</span> }<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> private final String algorithm;<a name="line.56"></a> +<span class="sourceLineNo">057</span> private final String[] args;<a name="line.57"></a> +<span class="sourceLineNo">058</span> private final String[] inputs;<a name="line.58"></a> +<span class="sourceLineNo">059</span><a name="line.59"></a> +<span class="sourceLineNo">060</span> private Digest(final String[] args) {<a name="line.60"></a> +<span class="sourceLineNo">061</span> if (args == null) {<a name="line.61"></a> +<span class="sourceLineNo">062</span> throw new IllegalArgumentException("args");<a name="line.62"></a> +<span class="sourceLineNo">063</span> }<a name="line.63"></a> +<span class="sourceLineNo">064</span> if (args.length == 0) {<a name="line.64"></a> +<span class="sourceLineNo">065</span> throw new IllegalArgumentException(<a name="line.65"></a> +<span class="sourceLineNo">066</span> String.format("Usage: java %s [algorithm] [FILE|DIRECTORY|string] ...", Digest.class.getName()));<a name="line.66"></a> +<span class="sourceLineNo">067</span> }<a name="line.67"></a> +<span class="sourceLineNo">068</span> this.args = args;<a name="line.68"></a> +<span class="sourceLineNo">069</span> algorithm = args[0];<a name="line.69"></a> +<span class="sourceLineNo">070</span> if (args.length <= 1) {<a name="line.70"></a> +<span class="sourceLineNo">071</span> inputs = null;<a name="line.71"></a> +<span class="sourceLineNo">072</span> } else {<a name="line.72"></a> +<span class="sourceLineNo">073</span> inputs = new String[args.length -1];<a name="line.73"></a> +<span class="sourceLineNo">074</span> System.arraycopy(args, 1, inputs, 0, inputs.length);<a name="line.74"></a> +<span class="sourceLineNo">075</span> }<a name="line.75"></a> +<span class="sourceLineNo">076</span> }<a name="line.76"></a> +<span class="sourceLineNo">077</span><a name="line.77"></a> +<span class="sourceLineNo">078</span> private void println(final String prefix, final byte[] digest) {<a name="line.78"></a> +<span class="sourceLineNo">079</span> println(prefix, digest, null);<a name="line.79"></a> +<span class="sourceLineNo">080</span> }<a name="line.80"></a> +<span class="sourceLineNo">081</span><a name="line.81"></a> +<span class="sourceLineNo">082</span> private void println(final String prefix, final byte[] digest, final String fileName) {<a name="line.82"></a> +<span class="sourceLineNo">083</span> // The standard appears to be to print<a name="line.83"></a> +<span class="sourceLineNo">084</span> // hex, space, then either space or '*' followed by file name<a name="line.84"></a> +<span class="sourceLineNo">085</span> // where '*' is used for binary files<a name="line.85"></a> +<span class="sourceLineNo">086</span> // shasum(1) has a -b option which generates " *" separator<a name="line.86"></a> +<span class="sourceLineNo">087</span> // we don't distinguish binary files at present<a name="line.87"></a> +<span class="sourceLineNo">088</span> System.out.println(prefix + Hex.encodeHexString(digest) + (fileName != null ? " " + fileName : ""));<a name="line.88"></a> +<span class="sourceLineNo">089</span> }<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> private void run() throws IOException {<a name="line.91"></a> +<span class="sourceLineNo">092</span> if (algorithm.equalsIgnoreCase("ALL") || algorithm.equals("*")) {<a name="line.92"></a> +<span class="sourceLineNo">093</span> run(MessageDigestAlgorithms.values());<a name="line.93"></a> +<span class="sourceLineNo">094</span> return;<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span> final MessageDigest messageDigest = DigestUtils.getDigest(algorithm, null);<a name="line.96"></a> +<span class="sourceLineNo">097</span> if (messageDigest != null) {<a name="line.97"></a> +<span class="sourceLineNo">098</span> run("", messageDigest);<a name="line.98"></a> +<span class="sourceLineNo">099</span> } else {<a name="line.99"></a> +<span class="sourceLineNo">100</span> run("", DigestUtils.getDigest(algorithm.toUpperCase(Locale.ROOT)));<a name="line.100"></a> +<span class="sourceLineNo">101</span> }<a name="line.101"></a> +<span class="sourceLineNo">102</span> }<a name="line.102"></a> +<span class="sourceLineNo">103</span><a name="line.103"></a> +<span class="sourceLineNo">104</span> private void run(final String[] digestAlgorithms) throws IOException {<a name="line.104"></a> +<span class="sourceLineNo">105</span> for (final String messageDigestAlgorithm : digestAlgorithms) {<a name="line.105"></a> +<span class="sourceLineNo">106</span> if (DigestUtils.isAvailable(messageDigestAlgorithm)) {<a name="line.106"></a> +<span class="sourceLineNo">107</span> run(messageDigestAlgorithm + " ", messageDigestAlgorithm);<a name="line.107"></a> +<span class="sourceLineNo">108</span> }<a name="line.108"></a> +<span class="sourceLineNo">109</span> }<a name="line.109"></a> +<span class="sourceLineNo">110</span> }<a name="line.110"></a> +<span class="sourceLineNo">111</span><a name="line.111"></a> +<span class="sourceLineNo">112</span> private void run(final String prefix, final MessageDigest messageDigest) throws IOException {<a name="line.112"></a> +<span class="sourceLineNo">113</span> if (inputs == null) {<a name="line.113"></a> +<span class="sourceLineNo">114</span> println(prefix, DigestUtils.digest(messageDigest, System.in));<a name="line.114"></a> +<span class="sourceLineNo">115</span> return;<a name="line.115"></a> +<span class="sourceLineNo">116</span> }<a name="line.116"></a> +<span class="sourceLineNo">117</span> for (final String source : inputs) {<a name="line.117"></a> +<span class="sourceLineNo">118</span> final File file = new File(source);<a name="line.118"></a> +<span class="sourceLineNo">119</span> if (file.isFile()) {<a name="line.119"></a> +<span class="sourceLineNo">120</span> println(prefix, DigestUtils.digest(messageDigest, file), source);<a name="line.120"></a> +<span class="sourceLineNo">121</span> } else if (file.isDirectory()) {<a name="line.121"></a> +<span class="sourceLineNo">122</span> final File[] listFiles = file.listFiles();<a name="line.122"></a> +<span class="sourceLineNo">123</span> if (listFiles != null) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> run(prefix, messageDigest, listFiles);<a name="line.124"></a> +<span class="sourceLineNo">125</span> }<a name="line.125"></a> +<span class="sourceLineNo">126</span> } else {<a name="line.126"></a> +<span class="sourceLineNo">127</span> // use the default charset for the command-line parameter<a name="line.127"></a> +<span class="sourceLineNo">128</span> final byte[] bytes = source.getBytes(Charset.defaultCharset());<a name="line.128"></a> +<span class="sourceLineNo">129</span> println(prefix, DigestUtils.digest(messageDigest, bytes));<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span> }<a name="line.131"></a> +<span class="sourceLineNo">132</span> }<a name="line.132"></a> +<span class="sourceLineNo">133</span><a name="line.133"></a> +<span class="sourceLineNo">134</span> private void run(final String prefix, final MessageDigest messageDigest, final File[] files) throws IOException {<a name="line.134"></a> +<span class="sourceLineNo">135</span> for (final File file : files) {<a name="line.135"></a> +<span class="sourceLineNo">136</span> if (file.isFile()) {<a name="line.136"></a> +<span class="sourceLineNo">137</span> println(prefix, DigestUtils.digest(messageDigest, file), file.getName());<a name="line.137"></a> +<span class="sourceLineNo">138</span> }<a name="line.138"></a> +<span class="sourceLineNo">139</span> }<a name="line.139"></a> +<span class="sourceLineNo">140</span> }<a name="line.140"></a> +<span class="sourceLineNo">141</span><a name="line.141"></a> +<span class="sourceLineNo">142</span> private void run(final String prefix, final String messageDigestAlgorithm) throws IOException {<a name="line.142"></a> +<span class="sourceLineNo">143</span> run(prefix, DigestUtils.getDigest(messageDigestAlgorithm));<a name="line.143"></a> +<span class="sourceLineNo">144</span> }<a name="line.144"></a> +<span class="sourceLineNo">145</span><a name="line.145"></a> +<span class="sourceLineNo">146</span> @Override<a name="line.146"></a> +<span class="sourceLineNo">147</span> public String toString() {<a name="line.147"></a> +<span class="sourceLineNo">148</span> return String.format("%s %s", super.toString(), Arrays.toString(args));<a name="line.148"></a> +<span class="sourceLineNo">149</span> }<a name="line.149"></a> +<span class="sourceLineNo">150</span>}<a name="line.150"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/Crypt.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/Crypt.html new file mode 100644 index 0000000000000000000000000000000000000000..af6310488df488ba3b7dbee63dd170453526d75f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/Crypt.html @@ -0,0 +1,241 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>package org.apache.commons.codec.digest;<a name="line.17"></a> +<span class="sourceLineNo">018</span><a name="line.18"></a> +<span class="sourceLineNo">019</span>import java.nio.charset.StandardCharsets;<a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.security.SecureRandom;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.concurrent.ThreadLocalRandom;<a name="line.21"></a> +<span class="sourceLineNo">022</span><a name="line.22"></a> +<span class="sourceLineNo">023</span>/**<a name="line.23"></a> +<span class="sourceLineNo">024</span> * GNU libc crypt(3) compatible hash method.<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * See {@link #crypt(String, String)} for further details.<a name="line.26"></a> +<span class="sourceLineNo">027</span> * <p><a name="line.27"></a> +<span class="sourceLineNo">028</span> * This class is immutable and thread-safe.<a name="line.28"></a> +<span class="sourceLineNo">029</span> *<a name="line.29"></a> +<span class="sourceLineNo">030</span> * @since 1.7<a name="line.30"></a> +<span class="sourceLineNo">031</span> */<a name="line.31"></a> +<span class="sourceLineNo">032</span>public class Crypt {<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span> /**<a name="line.34"></a> +<span class="sourceLineNo">035</span> * Encrypts a password in a crypt(3) compatible way.<a name="line.35"></a> +<span class="sourceLineNo">036</span> * <p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * A random salt and the default algorithm (currently SHA-512) are used. See {@link #crypt(String, String)} for<a name="line.37"></a> +<span class="sourceLineNo">038</span> * details.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * </p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <p><a name="line.40"></a> +<span class="sourceLineNo">041</span> * A salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.41"></a> +<span class="sourceLineNo">042</span> * {@link SecureRandom} to generate your own salts and calling {@link #crypt(byte[], String)}.<a name="line.42"></a> +<span class="sourceLineNo">043</span> * </p><a name="line.43"></a> +<span class="sourceLineNo">044</span> *<a name="line.44"></a> +<span class="sourceLineNo">045</span> * @param keyBytes<a name="line.45"></a> +<span class="sourceLineNo">046</span> * plaintext password<a name="line.46"></a> +<span class="sourceLineNo">047</span> * @return hash value<a name="line.47"></a> +<span class="sourceLineNo">048</span> * @throws IllegalArgumentException<a name="line.48"></a> +<span class="sourceLineNo">049</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.49"></a> +<span class="sourceLineNo">050</span> */<a name="line.50"></a> +<span class="sourceLineNo">051</span> public static String crypt(final byte[] keyBytes) {<a name="line.51"></a> +<span class="sourceLineNo">052</span> return crypt(keyBytes, null);<a name="line.52"></a> +<span class="sourceLineNo">053</span> }<a name="line.53"></a> +<span class="sourceLineNo">054</span><a name="line.54"></a> +<span class="sourceLineNo">055</span> /**<a name="line.55"></a> +<span class="sourceLineNo">056</span> * Encrypts a password in a crypt(3) compatible way.<a name="line.56"></a> +<span class="sourceLineNo">057</span> * <p><a name="line.57"></a> +<span class="sourceLineNo">058</span> * If no salt is provided, a random salt and the default algorithm (currently SHA-512) will be used. See<a name="line.58"></a> +<span class="sourceLineNo">059</span> * {@link #crypt(String, String)} for details.<a name="line.59"></a> +<span class="sourceLineNo">060</span> *<a name="line.60"></a> +<span class="sourceLineNo">061</span> * @param keyBytes<a name="line.61"></a> +<span class="sourceLineNo">062</span> * plaintext password<a name="line.62"></a> +<span class="sourceLineNo">063</span> * @param salt<a name="line.63"></a> +<span class="sourceLineNo">064</span> * real salt value without prefix or "rounds=". The salt may be null,<a name="line.64"></a> +<span class="sourceLineNo">065</span> * in which case a salt is generated for you using {@link ThreadLocalRandom};<a name="line.65"></a> +<span class="sourceLineNo">066</span> * for more secure salts consider using {@link SecureRandom} to<a name="line.66"></a> +<span class="sourceLineNo">067</span> * generate your own salts.<a name="line.67"></a> +<span class="sourceLineNo">068</span> * @return hash value<a name="line.68"></a> +<span class="sourceLineNo">069</span> * @throws IllegalArgumentException<a name="line.69"></a> +<span class="sourceLineNo">070</span> * if the salt does not match the allowed pattern<a name="line.70"></a> +<span class="sourceLineNo">071</span> * @throws IllegalArgumentException<a name="line.71"></a> +<span class="sourceLineNo">072</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.72"></a> +<span class="sourceLineNo">073</span> */<a name="line.73"></a> +<span class="sourceLineNo">074</span> public static String crypt(final byte[] keyBytes, final String salt) {<a name="line.74"></a> +<span class="sourceLineNo">075</span> if (salt == null) {<a name="line.75"></a> +<span class="sourceLineNo">076</span> return Sha2Crypt.sha512Crypt(keyBytes);<a name="line.76"></a> +<span class="sourceLineNo">077</span> } else if (salt.startsWith(Sha2Crypt.SHA512_PREFIX)) {<a name="line.77"></a> +<span class="sourceLineNo">078</span> return Sha2Crypt.sha512Crypt(keyBytes, salt);<a name="line.78"></a> +<span class="sourceLineNo">079</span> } else if (salt.startsWith(Sha2Crypt.SHA256_PREFIX)) {<a name="line.79"></a> +<span class="sourceLineNo">080</span> return Sha2Crypt.sha256Crypt(keyBytes, salt);<a name="line.80"></a> +<span class="sourceLineNo">081</span> } else if (salt.startsWith(Md5Crypt.MD5_PREFIX)) {<a name="line.81"></a> +<span class="sourceLineNo">082</span> return Md5Crypt.md5Crypt(keyBytes, salt);<a name="line.82"></a> +<span class="sourceLineNo">083</span> } else {<a name="line.83"></a> +<span class="sourceLineNo">084</span> return UnixCrypt.crypt(keyBytes, salt);<a name="line.84"></a> +<span class="sourceLineNo">085</span> }<a name="line.85"></a> +<span class="sourceLineNo">086</span> }<a name="line.86"></a> +<span class="sourceLineNo">087</span><a name="line.87"></a> +<span class="sourceLineNo">088</span> /**<a name="line.88"></a> +<span class="sourceLineNo">089</span> * Calculates the digest using the strongest crypt(3) algorithm.<a name="line.89"></a> +<span class="sourceLineNo">090</span> * <p><a name="line.90"></a> +<span class="sourceLineNo">091</span> * A random salt and the default algorithm (currently SHA-512) are used.<a name="line.91"></a> +<span class="sourceLineNo">092</span> * </p><a name="line.92"></a> +<span class="sourceLineNo">093</span> * <p><a name="line.93"></a> +<span class="sourceLineNo">094</span> * A salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.94"></a> +<span class="sourceLineNo">095</span> * {@link SecureRandom} to generate your own salts and calling {@link #crypt(String, String)}.<a name="line.95"></a> +<span class="sourceLineNo">096</span> * </p><a name="line.96"></a> +<span class="sourceLineNo">097</span> *<a name="line.97"></a> +<span class="sourceLineNo">098</span> * @see #crypt(String, String)<a name="line.98"></a> +<span class="sourceLineNo">099</span> * @param key<a name="line.99"></a> +<span class="sourceLineNo">100</span> * plaintext password<a name="line.100"></a> +<span class="sourceLineNo">101</span> * @return hash value<a name="line.101"></a> +<span class="sourceLineNo">102</span> * @throws IllegalArgumentException<a name="line.102"></a> +<span class="sourceLineNo">103</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.103"></a> +<span class="sourceLineNo">104</span> */<a name="line.104"></a> +<span class="sourceLineNo">105</span> public static String crypt(final String key) {<a name="line.105"></a> +<span class="sourceLineNo">106</span> return crypt(key, null);<a name="line.106"></a> +<span class="sourceLineNo">107</span> }<a name="line.107"></a> +<span class="sourceLineNo">108</span><a name="line.108"></a> +<span class="sourceLineNo">109</span> /**<a name="line.109"></a> +<span class="sourceLineNo">110</span> * Encrypts a password in a crypt(3) compatible way.<a name="line.110"></a> +<span class="sourceLineNo">111</span> * <p><a name="line.111"></a> +<span class="sourceLineNo">112</span> * The exact algorithm depends on the format of the salt string:<a name="line.112"></a> +<span class="sourceLineNo">113</span> * <ul><a name="line.113"></a> +<span class="sourceLineNo">114</span> * <li>SHA-512 salts start with {@code $6$} and are up to 16 chars long.<a name="line.114"></a> +<span class="sourceLineNo">115</span> * <li>SHA-256 salts start with {@code $5$} and are up to 16 chars long<a name="line.115"></a> +<span class="sourceLineNo">116</span> * <li>MD5 salts start with {@code $1$} and are up to 8 chars long<a name="line.116"></a> +<span class="sourceLineNo">117</span> * <li>DES, the traditional UnixCrypt algorithm is used with only 2 chars<a name="line.117"></a> +<span class="sourceLineNo">118</span> * <li>Only the first 8 chars of the passwords are used in the DES algorithm!<a name="line.118"></a> +<span class="sourceLineNo">119</span> * </ul><a name="line.119"></a> +<span class="sourceLineNo">120</span> * The magic strings {@code "$apr1$"} and {@code "$2a$"} are not recognized by this method as its output should be<a name="line.120"></a> +<span class="sourceLineNo">121</span> * identical with that of the libc implementation.<a name="line.121"></a> +<span class="sourceLineNo">122</span> * <p><a name="line.122"></a> +<span class="sourceLineNo">123</span> * The rest of the salt string is drawn from the set {@code [a-zA-Z0-9./]} and is cut at the maximum length of if a<a name="line.123"></a> +<span class="sourceLineNo">124</span> * {@code "$"} sign is encountered. It is therefore valid to enter a complete hash value as salt to e.g. verify a<a name="line.124"></a> +<span class="sourceLineNo">125</span> * password with:<a name="line.125"></a> +<span class="sourceLineNo">126</span> *<a name="line.126"></a> +<span class="sourceLineNo">127</span> * <pre><a name="line.127"></a> +<span class="sourceLineNo">128</span> * storedPwd.equals(crypt(enteredPwd, storedPwd))<a name="line.128"></a> +<span class="sourceLineNo">129</span> * </pre><a name="line.129"></a> +<span class="sourceLineNo">130</span> * <p><a name="line.130"></a> +<span class="sourceLineNo">131</span> * The resulting string starts with the marker string ({@code $n$}), where n is the same as the input salt.<a name="line.131"></a> +<span class="sourceLineNo">132</span> * The salt is then appended, followed by a {@code "$"} sign.<a name="line.132"></a> +<span class="sourceLineNo">133</span> * This is followed by the actual hash value.<a name="line.133"></a> +<span class="sourceLineNo">134</span> * For DES the string only contains the salt and actual hash.<a name="line.134"></a> +<span class="sourceLineNo">135</span> * The total length is dependent on the algorithm used:<a name="line.135"></a> +<span class="sourceLineNo">136</span> * <ul><a name="line.136"></a> +<span class="sourceLineNo">137</span> * <li>SHA-512: 106 chars<a name="line.137"></a> +<span class="sourceLineNo">138</span> * <li>SHA-256: 63 chars<a name="line.138"></a> +<span class="sourceLineNo">139</span> * <li>MD5: 34 chars<a name="line.139"></a> +<span class="sourceLineNo">140</span> * <li>DES: 13 chars<a name="line.140"></a> +<span class="sourceLineNo">141</span> * </ul><a name="line.141"></a> +<span class="sourceLineNo">142</span> * <p><a name="line.142"></a> +<span class="sourceLineNo">143</span> * Example:<a name="line.143"></a> +<span class="sourceLineNo">144</span> *<a name="line.144"></a> +<span class="sourceLineNo">145</span> * <pre><a name="line.145"></a> +<span class="sourceLineNo">146</span> * crypt("secret", "$1$xxxx") =&gt; "$1$xxxx$aMkevjfEIpa35Bh3G4bAc."<a name="line.146"></a> +<span class="sourceLineNo">147</span> * crypt("secret", "xx") =&gt; "xxWAum7tHdIUw"<a name="line.147"></a> +<span class="sourceLineNo">148</span> * </pre><a name="line.148"></a> +<span class="sourceLineNo">149</span> * <p><a name="line.149"></a> +<span class="sourceLineNo">150</span> * This method comes in a variation that accepts a byte[] array to support input strings that are not encoded in<a name="line.150"></a> +<span class="sourceLineNo">151</span> * UTF-8 but e.g. in ISO-8859-1 where equal characters result in different byte values.<a name="line.151"></a> +<span class="sourceLineNo">152</span> *<a name="line.152"></a> +<span class="sourceLineNo">153</span> * @see "The man page of the libc crypt (3) function."<a name="line.153"></a> +<span class="sourceLineNo">154</span> * @param key<a name="line.154"></a> +<span class="sourceLineNo">155</span> * plaintext password as entered by the used<a name="line.155"></a> +<span class="sourceLineNo">156</span> * @param salt<a name="line.156"></a> +<span class="sourceLineNo">157</span> * real salt value without prefix or "rounds=". The salt may be null, in which case a<a name="line.157"></a> +<span class="sourceLineNo">158</span> * salt is generated for you using {@link ThreadLocalRandom}; for more secure salts<a name="line.158"></a> +<span class="sourceLineNo">159</span> * consider using {@link SecureRandom} to generate your own salts.<a name="line.159"></a> +<span class="sourceLineNo">160</span> * @return hash value, i.e. encrypted password including the salt string<a name="line.160"></a> +<span class="sourceLineNo">161</span> * @throws IllegalArgumentException<a name="line.161"></a> +<span class="sourceLineNo">162</span> * if the salt does not match the allowed pattern<a name="line.162"></a> +<span class="sourceLineNo">163</span> * @throws IllegalArgumentException<a name="line.163"></a> +<span class="sourceLineNo">164</span> * when a {@link java.security.NoSuchAlgorithmException} is caught. *<a name="line.164"></a> +<span class="sourceLineNo">165</span> */<a name="line.165"></a> +<span class="sourceLineNo">166</span> public static String crypt(final String key, final String salt) {<a name="line.166"></a> +<span class="sourceLineNo">167</span> return crypt(key.getBytes(StandardCharsets.UTF_8), salt);<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span>}<a name="line.169"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/DigestUtils.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/DigestUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..b52f0bea824564fa261ae66c14179b8daa827137 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/DigestUtils.html @@ -0,0 +1,1809 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.digest;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.BufferedInputStream;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.io.File;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.io.FileInputStream;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.io.IOException;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.io.InputStream;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.io.RandomAccessFile;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.nio.ByteBuffer;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import java.nio.channels.FileChannel;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import java.nio.file.Files;<a name="line.28"></a> +<span class="sourceLineNo">029</span>import java.nio.file.OpenOption;<a name="line.29"></a> +<span class="sourceLineNo">030</span>import java.nio.file.Path;<a name="line.30"></a> +<span class="sourceLineNo">031</span>import java.security.MessageDigest;<a name="line.31"></a> +<span class="sourceLineNo">032</span>import java.security.NoSuchAlgorithmException;<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span>import org.apache.commons.codec.binary.Hex;<a name="line.34"></a> +<span class="sourceLineNo">035</span>import org.apache.commons.codec.binary.StringUtils;<a name="line.35"></a> +<span class="sourceLineNo">036</span><a name="line.36"></a> +<span class="sourceLineNo">037</span>/**<a name="line.37"></a> +<span class="sourceLineNo">038</span> * Operations to simplify common {@link java.security.MessageDigest} tasks.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * This class is immutable and thread-safe.<a name="line.39"></a> +<span class="sourceLineNo">040</span> * However the MessageDigest instances it creates generally won't be.<a name="line.40"></a> +<span class="sourceLineNo">041</span> * <p><a name="line.41"></a> +<span class="sourceLineNo">042</span> * The {@link MessageDigestAlgorithms} class provides constants for standard<a name="line.42"></a> +<span class="sourceLineNo">043</span> * digest algorithms that can be used with the {@link #getDigest(String)} method<a name="line.43"></a> +<span class="sourceLineNo">044</span> * and other methods that require the Digest algorithm name.<a name="line.44"></a> +<span class="sourceLineNo">045</span> * <p><a name="line.45"></a> +<span class="sourceLineNo">046</span> * Note: the class has short-hand methods for all the algorithms present as standard in Java 6.<a name="line.46"></a> +<span class="sourceLineNo">047</span> * This approach requires lots of methods for each algorithm, and quickly becomes unwieldy.<a name="line.47"></a> +<span class="sourceLineNo">048</span> * The following code works with all algorithms:<a name="line.48"></a> +<span class="sourceLineNo">049</span> * <pre><a name="line.49"></a> +<span class="sourceLineNo">050</span> * import static org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_224;<a name="line.50"></a> +<span class="sourceLineNo">051</span> * ...<a name="line.51"></a> +<span class="sourceLineNo">052</span> * byte [] digest = new DigestUtils(SHA_224).digest(dataToDigest);<a name="line.52"></a> +<span class="sourceLineNo">053</span> * String hdigest = new DigestUtils(SHA_224).digestAsHex(new File("pom.xml"));<a name="line.53"></a> +<span class="sourceLineNo">054</span> * </pre><a name="line.54"></a> +<span class="sourceLineNo">055</span> * @see MessageDigestAlgorithms<a name="line.55"></a> +<span class="sourceLineNo">056</span> */<a name="line.56"></a> +<span class="sourceLineNo">057</span>public class DigestUtils {<a name="line.57"></a> +<span class="sourceLineNo">058</span><a name="line.58"></a> +<span class="sourceLineNo">059</span> private static final int STREAM_BUFFER_LENGTH = 1024;<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> /**<a name="line.61"></a> +<span class="sourceLineNo">062</span> * Reads through a byte array and returns the digest for the data. Provided for symmetry with other methods.<a name="line.62"></a> +<span class="sourceLineNo">063</span> *<a name="line.63"></a> +<span class="sourceLineNo">064</span> * @param messageDigest<a name="line.64"></a> +<span class="sourceLineNo">065</span> * The MessageDigest to use (e.g. MD5)<a name="line.65"></a> +<span class="sourceLineNo">066</span> * @param data<a name="line.66"></a> +<span class="sourceLineNo">067</span> * Data to digest<a name="line.67"></a> +<span class="sourceLineNo">068</span> * @return the digest<a name="line.68"></a> +<span class="sourceLineNo">069</span> * @since 1.11<a name="line.69"></a> +<span class="sourceLineNo">070</span> */<a name="line.70"></a> +<span class="sourceLineNo">071</span> public static byte[] digest(final MessageDigest messageDigest, final byte[] data) {<a name="line.71"></a> +<span class="sourceLineNo">072</span> return messageDigest.digest(data);<a name="line.72"></a> +<span class="sourceLineNo">073</span> }<a name="line.73"></a> +<span class="sourceLineNo">074</span><a name="line.74"></a> +<span class="sourceLineNo">075</span> /**<a name="line.75"></a> +<span class="sourceLineNo">076</span> * Reads through a ByteBuffer and returns the digest for the data<a name="line.76"></a> +<span class="sourceLineNo">077</span> *<a name="line.77"></a> +<span class="sourceLineNo">078</span> * @param messageDigest<a name="line.78"></a> +<span class="sourceLineNo">079</span> * The MessageDigest to use (e.g. MD5)<a name="line.79"></a> +<span class="sourceLineNo">080</span> * @param data<a name="line.80"></a> +<span class="sourceLineNo">081</span> * Data to digest<a name="line.81"></a> +<span class="sourceLineNo">082</span> * @return the digest<a name="line.82"></a> +<span class="sourceLineNo">083</span> *<a name="line.83"></a> +<span class="sourceLineNo">084</span> * @since 1.11<a name="line.84"></a> +<span class="sourceLineNo">085</span> */<a name="line.85"></a> +<span class="sourceLineNo">086</span> public static byte[] digest(final MessageDigest messageDigest, final ByteBuffer data) {<a name="line.86"></a> +<span class="sourceLineNo">087</span> messageDigest.update(data);<a name="line.87"></a> +<span class="sourceLineNo">088</span> return messageDigest.digest();<a name="line.88"></a> +<span class="sourceLineNo">089</span> }<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> /**<a name="line.91"></a> +<span class="sourceLineNo">092</span> * Reads through a File and returns the digest for the data<a name="line.92"></a> +<span class="sourceLineNo">093</span> *<a name="line.93"></a> +<span class="sourceLineNo">094</span> * @param messageDigest<a name="line.94"></a> +<span class="sourceLineNo">095</span> * The MessageDigest to use (e.g. MD5)<a name="line.95"></a> +<span class="sourceLineNo">096</span> * @param data<a name="line.96"></a> +<span class="sourceLineNo">097</span> * Data to digest<a name="line.97"></a> +<span class="sourceLineNo">098</span> * @return the digest<a name="line.98"></a> +<span class="sourceLineNo">099</span> * @throws IOException<a name="line.99"></a> +<span class="sourceLineNo">100</span> * On error reading from the stream<a name="line.100"></a> +<span class="sourceLineNo">101</span> * @since 1.11<a name="line.101"></a> +<span class="sourceLineNo">102</span> */<a name="line.102"></a> +<span class="sourceLineNo">103</span> public static byte[] digest(final MessageDigest messageDigest, final File data) throws IOException {<a name="line.103"></a> +<span class="sourceLineNo">104</span> return updateDigest(messageDigest, data).digest();<a name="line.104"></a> +<span class="sourceLineNo">105</span> }<a name="line.105"></a> +<span class="sourceLineNo">106</span><a name="line.106"></a> +<span class="sourceLineNo">107</span> /**<a name="line.107"></a> +<span class="sourceLineNo">108</span> * Reads through an InputStream and returns the digest for the data<a name="line.108"></a> +<span class="sourceLineNo">109</span> *<a name="line.109"></a> +<span class="sourceLineNo">110</span> * @param messageDigest<a name="line.110"></a> +<span class="sourceLineNo">111</span> * The MessageDigest to use (e.g. MD5)<a name="line.111"></a> +<span class="sourceLineNo">112</span> * @param data<a name="line.112"></a> +<span class="sourceLineNo">113</span> * Data to digest<a name="line.113"></a> +<span class="sourceLineNo">114</span> * @return the digest<a name="line.114"></a> +<span class="sourceLineNo">115</span> * @throws IOException<a name="line.115"></a> +<span class="sourceLineNo">116</span> * On error reading from the stream<a name="line.116"></a> +<span class="sourceLineNo">117</span> * @since 1.11 (was private)<a name="line.117"></a> +<span class="sourceLineNo">118</span> */<a name="line.118"></a> +<span class="sourceLineNo">119</span> public static byte[] digest(final MessageDigest messageDigest, final InputStream data) throws IOException {<a name="line.119"></a> +<span class="sourceLineNo">120</span> return updateDigest(messageDigest, data).digest();<a name="line.120"></a> +<span class="sourceLineNo">121</span> }<a name="line.121"></a> +<span class="sourceLineNo">122</span><a name="line.122"></a> +<span class="sourceLineNo">123</span> /**<a name="line.123"></a> +<span class="sourceLineNo">124</span> * Reads through a File and returns the digest for the data<a name="line.124"></a> +<span class="sourceLineNo">125</span> *<a name="line.125"></a> +<span class="sourceLineNo">126</span> * @param messageDigest<a name="line.126"></a> +<span class="sourceLineNo">127</span> * The MessageDigest to use (e.g. MD5)<a name="line.127"></a> +<span class="sourceLineNo">128</span> * @param data<a name="line.128"></a> +<span class="sourceLineNo">129</span> * Data to digest<a name="line.129"></a> +<span class="sourceLineNo">130</span> * @param options<a name="line.130"></a> +<span class="sourceLineNo">131</span> * options How to open the file<a name="line.131"></a> +<span class="sourceLineNo">132</span> * @return the digest<a name="line.132"></a> +<span class="sourceLineNo">133</span> * @throws IOException<a name="line.133"></a> +<span class="sourceLineNo">134</span> * On error reading from the stream<a name="line.134"></a> +<span class="sourceLineNo">135</span> * @since 1.14<a name="line.135"></a> +<span class="sourceLineNo">136</span> */<a name="line.136"></a> +<span class="sourceLineNo">137</span> public static byte[] digest(final MessageDigest messageDigest, final Path data, final OpenOption... options)<a name="line.137"></a> +<span class="sourceLineNo">138</span> throws IOException {<a name="line.138"></a> +<span class="sourceLineNo">139</span> return updateDigest(messageDigest, data, options).digest();<a name="line.139"></a> +<span class="sourceLineNo">140</span> }<a name="line.140"></a> +<span class="sourceLineNo">141</span><a name="line.141"></a> +<span class="sourceLineNo">142</span> /**<a name="line.142"></a> +<span class="sourceLineNo">143</span> * Reads through a RandomAccessFile using non-blocking-io (NIO) and returns the digest for the data<a name="line.143"></a> +<span class="sourceLineNo">144</span> *<a name="line.144"></a> +<span class="sourceLineNo">145</span> * @param messageDigest The MessageDigest to use (e.g. MD5)<a name="line.145"></a> +<span class="sourceLineNo">146</span> * @param data Data to digest<a name="line.146"></a> +<span class="sourceLineNo">147</span> * @return the digest<a name="line.147"></a> +<span class="sourceLineNo">148</span> * @throws IOException On error reading from the stream<a name="line.148"></a> +<span class="sourceLineNo">149</span> * @since 1.14<a name="line.149"></a> +<span class="sourceLineNo">150</span> */<a name="line.150"></a> +<span class="sourceLineNo">151</span> public static byte[] digest(final MessageDigest messageDigest, final RandomAccessFile data) throws IOException {<a name="line.151"></a> +<span class="sourceLineNo">152</span> return updateDigest(messageDigest, data).digest();<a name="line.152"></a> +<span class="sourceLineNo">153</span> }<a name="line.153"></a> +<span class="sourceLineNo">154</span><a name="line.154"></a> +<span class="sourceLineNo">155</span> /**<a name="line.155"></a> +<span class="sourceLineNo">156</span> * Returns a {@code MessageDigest} for the given {@code algorithm}.<a name="line.156"></a> +<span class="sourceLineNo">157</span> *<a name="line.157"></a> +<span class="sourceLineNo">158</span> * @param algorithm<a name="line.158"></a> +<span class="sourceLineNo">159</span> * the name of the algorithm requested. See <a<a name="line.159"></a> +<span class="sourceLineNo">160</span> * href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA"<a name="line.160"></a> +<span class="sourceLineNo">161</span> * >Appendix A in the Java Cryptography Architecture Reference Guide</a> for information about standard<a name="line.161"></a> +<span class="sourceLineNo">162</span> * algorithm names.<a name="line.162"></a> +<span class="sourceLineNo">163</span> * @return A digest instance.<a name="line.163"></a> +<span class="sourceLineNo">164</span> * @see MessageDigest#getInstance(String)<a name="line.164"></a> +<span class="sourceLineNo">165</span> * @throws IllegalArgumentException<a name="line.165"></a> +<span class="sourceLineNo">166</span> * when a {@link NoSuchAlgorithmException} is caught.<a name="line.166"></a> +<span class="sourceLineNo">167</span> */<a name="line.167"></a> +<span class="sourceLineNo">168</span> public static MessageDigest getDigest(final String algorithm) {<a name="line.168"></a> +<span class="sourceLineNo">169</span> try {<a name="line.169"></a> +<span class="sourceLineNo">170</span> return MessageDigest.getInstance(algorithm);<a name="line.170"></a> +<span class="sourceLineNo">171</span> } catch (final NoSuchAlgorithmException e) {<a name="line.171"></a> +<span class="sourceLineNo">172</span> throw new IllegalArgumentException(e);<a name="line.172"></a> +<span class="sourceLineNo">173</span> }<a name="line.173"></a> +<span class="sourceLineNo">174</span> }<a name="line.174"></a> +<span class="sourceLineNo">175</span><a name="line.175"></a> +<span class="sourceLineNo">176</span> /**<a name="line.176"></a> +<span class="sourceLineNo">177</span> * Returns a {@code MessageDigest} for the given {@code algorithm} or a default if there is a problem<a name="line.177"></a> +<span class="sourceLineNo">178</span> * getting the algorithm.<a name="line.178"></a> +<span class="sourceLineNo">179</span> *<a name="line.179"></a> +<span class="sourceLineNo">180</span> * @param algorithm<a name="line.180"></a> +<span class="sourceLineNo">181</span> * the name of the algorithm requested. See<a name="line.181"></a> +<span class="sourceLineNo">182</span> * <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA" ><a name="line.182"></a> +<span class="sourceLineNo">183</span> * Appendix A in the Java Cryptography Architecture Reference Guide</a> for information about standard<a name="line.183"></a> +<span class="sourceLineNo">184</span> * algorithm names.<a name="line.184"></a> +<span class="sourceLineNo">185</span> * @param defaultMessageDigest<a name="line.185"></a> +<span class="sourceLineNo">186</span> * The default MessageDigest.<a name="line.186"></a> +<span class="sourceLineNo">187</span> * @return A digest instance.<a name="line.187"></a> +<span class="sourceLineNo">188</span> * @see MessageDigest#getInstance(String)<a name="line.188"></a> +<span class="sourceLineNo">189</span> * @throws IllegalArgumentException<a name="line.189"></a> +<span class="sourceLineNo">190</span> * when a {@link NoSuchAlgorithmException} is caught.<a name="line.190"></a> +<span class="sourceLineNo">191</span> * @since 1.11<a name="line.191"></a> +<span class="sourceLineNo">192</span> */<a name="line.192"></a> +<span class="sourceLineNo">193</span> public static MessageDigest getDigest(final String algorithm, final MessageDigest defaultMessageDigest) {<a name="line.193"></a> +<span class="sourceLineNo">194</span> try {<a name="line.194"></a> +<span class="sourceLineNo">195</span> return MessageDigest.getInstance(algorithm);<a name="line.195"></a> +<span class="sourceLineNo">196</span> } catch (final Exception e) {<a name="line.196"></a> +<span class="sourceLineNo">197</span> return defaultMessageDigest;<a name="line.197"></a> +<span class="sourceLineNo">198</span> }<a name="line.198"></a> +<span class="sourceLineNo">199</span> }<a name="line.199"></a> +<span class="sourceLineNo">200</span><a name="line.200"></a> +<span class="sourceLineNo">201</span> /**<a name="line.201"></a> +<span class="sourceLineNo">202</span> * Returns an MD2 MessageDigest.<a name="line.202"></a> +<span class="sourceLineNo">203</span> *<a name="line.203"></a> +<span class="sourceLineNo">204</span> * @return An MD2 digest instance.<a name="line.204"></a> +<span class="sourceLineNo">205</span> * @throws IllegalArgumentException<a name="line.205"></a> +<span class="sourceLineNo">206</span> * when a {@link NoSuchAlgorithmException} is caught, which should never happen because MD2 is a<a name="line.206"></a> +<span class="sourceLineNo">207</span> * built-in algorithm<a name="line.207"></a> +<span class="sourceLineNo">208</span> * @see MessageDigestAlgorithms#MD2<a name="line.208"></a> +<span class="sourceLineNo">209</span> * @since 1.7<a name="line.209"></a> +<span class="sourceLineNo">210</span> */<a name="line.210"></a> +<span class="sourceLineNo">211</span> public static MessageDigest getMd2Digest() {<a name="line.211"></a> +<span class="sourceLineNo">212</span> return getDigest(MessageDigestAlgorithms.MD2);<a name="line.212"></a> +<span class="sourceLineNo">213</span> }<a name="line.213"></a> +<span class="sourceLineNo">214</span><a name="line.214"></a> +<span class="sourceLineNo">215</span> /**<a name="line.215"></a> +<span class="sourceLineNo">216</span> * Returns an MD5 MessageDigest.<a name="line.216"></a> +<span class="sourceLineNo">217</span> *<a name="line.217"></a> +<span class="sourceLineNo">218</span> * @return An MD5 digest instance.<a name="line.218"></a> +<span class="sourceLineNo">219</span> * @throws IllegalArgumentException<a name="line.219"></a> +<span class="sourceLineNo">220</span> * when a {@link NoSuchAlgorithmException} is caught, which should never happen because MD5 is a<a name="line.220"></a> +<span class="sourceLineNo">221</span> * built-in algorithm<a name="line.221"></a> +<span class="sourceLineNo">222</span> * @see MessageDigestAlgorithms#MD5<a name="line.222"></a> +<span class="sourceLineNo">223</span> */<a name="line.223"></a> +<span class="sourceLineNo">224</span> public static MessageDigest getMd5Digest() {<a name="line.224"></a> +<span class="sourceLineNo">225</span> return getDigest(MessageDigestAlgorithms.MD5);<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span><a name="line.227"></a> +<span class="sourceLineNo">228</span> /**<a name="line.228"></a> +<span class="sourceLineNo">229</span> * Returns an SHA-1 digest.<a name="line.229"></a> +<span class="sourceLineNo">230</span> *<a name="line.230"></a> +<span class="sourceLineNo">231</span> * @return An SHA-1 digest instance.<a name="line.231"></a> +<span class="sourceLineNo">232</span> * @throws IllegalArgumentException<a name="line.232"></a> +<span class="sourceLineNo">233</span> * when a {@link NoSuchAlgorithmException} is caught, which should never happen because SHA-1 is a<a name="line.233"></a> +<span class="sourceLineNo">234</span> * built-in algorithm<a name="line.234"></a> +<span class="sourceLineNo">235</span> * @see MessageDigestAlgorithms#SHA_1<a name="line.235"></a> +<span class="sourceLineNo">236</span> * @since 1.7<a name="line.236"></a> +<span class="sourceLineNo">237</span> */<a name="line.237"></a> +<span class="sourceLineNo">238</span> public static MessageDigest getSha1Digest() {<a name="line.238"></a> +<span class="sourceLineNo">239</span> return getDigest(MessageDigestAlgorithms.SHA_1);<a name="line.239"></a> +<span class="sourceLineNo">240</span> }<a name="line.240"></a> +<span class="sourceLineNo">241</span><a name="line.241"></a> +<span class="sourceLineNo">242</span> /**<a name="line.242"></a> +<span class="sourceLineNo">243</span> * Returns an SHA-256 digest.<a name="line.243"></a> +<span class="sourceLineNo">244</span> *<a name="line.244"></a> +<span class="sourceLineNo">245</span> * @return An SHA-256 digest instance.<a name="line.245"></a> +<span class="sourceLineNo">246</span> * @throws IllegalArgumentException<a name="line.246"></a> +<span class="sourceLineNo">247</span> * when a {@link NoSuchAlgorithmException} is caught, which should never happen because SHA-256 is a<a name="line.247"></a> +<span class="sourceLineNo">248</span> * built-in algorithm<a name="line.248"></a> +<span class="sourceLineNo">249</span> * @see MessageDigestAlgorithms#SHA_256<a name="line.249"></a> +<span class="sourceLineNo">250</span> */<a name="line.250"></a> +<span class="sourceLineNo">251</span> public static MessageDigest getSha256Digest() {<a name="line.251"></a> +<span class="sourceLineNo">252</span> return getDigest(MessageDigestAlgorithms.SHA_256);<a name="line.252"></a> +<span class="sourceLineNo">253</span> }<a name="line.253"></a> +<span class="sourceLineNo">254</span><a name="line.254"></a> +<span class="sourceLineNo">255</span> /**<a name="line.255"></a> +<span class="sourceLineNo">256</span> * Returns an SHA3-224 digest.<a name="line.256"></a> +<span class="sourceLineNo">257</span> *<a name="line.257"></a> +<span class="sourceLineNo">258</span> * @return An SHA3-224 digest instance.<a name="line.258"></a> +<span class="sourceLineNo">259</span> * @throws IllegalArgumentException<a name="line.259"></a> +<span class="sourceLineNo">260</span> * when a {@link NoSuchAlgorithmException} is caught, which should not happen on<a name="line.260"></a> +<span class="sourceLineNo">261</span> * Oracle Java 9 andgreater.<a name="line.261"></a> +<span class="sourceLineNo">262</span> * @see MessageDigestAlgorithms#SHA3_224<a name="line.262"></a> +<span class="sourceLineNo">263</span> * @since 1.12<a name="line.263"></a> +<span class="sourceLineNo">264</span> */<a name="line.264"></a> +<span class="sourceLineNo">265</span> public static MessageDigest getSha3_224Digest() {<a name="line.265"></a> +<span class="sourceLineNo">266</span> return getDigest(MessageDigestAlgorithms.SHA3_224);<a name="line.266"></a> +<span class="sourceLineNo">267</span> }<a name="line.267"></a> +<span class="sourceLineNo">268</span><a name="line.268"></a> +<span class="sourceLineNo">269</span> /**<a name="line.269"></a> +<span class="sourceLineNo">270</span> * Returns an SHA3-256 digest.<a name="line.270"></a> +<span class="sourceLineNo">271</span> *<a name="line.271"></a> +<span class="sourceLineNo">272</span> * @return An SHA3-256 digest instance.<a name="line.272"></a> +<span class="sourceLineNo">273</span> * @throws IllegalArgumentException<a name="line.273"></a> +<span class="sourceLineNo">274</span> * when a {@link NoSuchAlgorithmException} is caught, which should not happen on<a name="line.274"></a> +<span class="sourceLineNo">275</span> * Oracle Java 9 and greater.<a name="line.275"></a> +<span class="sourceLineNo">276</span> * @see MessageDigestAlgorithms#SHA3_256<a name="line.276"></a> +<span class="sourceLineNo">277</span> * @since 1.12<a name="line.277"></a> +<span class="sourceLineNo">278</span> */<a name="line.278"></a> +<span class="sourceLineNo">279</span> public static MessageDigest getSha3_256Digest() {<a name="line.279"></a> +<span class="sourceLineNo">280</span> return getDigest(MessageDigestAlgorithms.SHA3_256);<a name="line.280"></a> +<span class="sourceLineNo">281</span> }<a name="line.281"></a> +<span class="sourceLineNo">282</span><a name="line.282"></a> +<span class="sourceLineNo">283</span> /**<a name="line.283"></a> +<span class="sourceLineNo">284</span> * Returns an SHA3-384 digest.<a name="line.284"></a> +<span class="sourceLineNo">285</span> *<a name="line.285"></a> +<span class="sourceLineNo">286</span> * @return An SHA3-384 digest instance.<a name="line.286"></a> +<span class="sourceLineNo">287</span> * @throws IllegalArgumentException<a name="line.287"></a> +<span class="sourceLineNo">288</span> * when a {@link NoSuchAlgorithmException} is caught, which should not happen on<a name="line.288"></a> +<span class="sourceLineNo">289</span> * Oracle Java 9 and greater.<a name="line.289"></a> +<span class="sourceLineNo">290</span> * @see MessageDigestAlgorithms#SHA3_384<a name="line.290"></a> +<span class="sourceLineNo">291</span> * @since 1.12<a name="line.291"></a> +<span class="sourceLineNo">292</span> */<a name="line.292"></a> +<span class="sourceLineNo">293</span> public static MessageDigest getSha3_384Digest() {<a name="line.293"></a> +<span class="sourceLineNo">294</span> return getDigest(MessageDigestAlgorithms.SHA3_384);<a name="line.294"></a> +<span class="sourceLineNo">295</span> }<a name="line.295"></a> +<span class="sourceLineNo">296</span><a name="line.296"></a> +<span class="sourceLineNo">297</span> /**<a name="line.297"></a> +<span class="sourceLineNo">298</span> * Returns an SHA3-512 digest.<a name="line.298"></a> +<span class="sourceLineNo">299</span> *<a name="line.299"></a> +<span class="sourceLineNo">300</span> * @return An SHA3-512 digest instance.<a name="line.300"></a> +<span class="sourceLineNo">301</span> * @throws IllegalArgumentException<a name="line.301"></a> +<span class="sourceLineNo">302</span> * when a {@link NoSuchAlgorithmException} is caught, which should not happen<a name="line.302"></a> +<span class="sourceLineNo">303</span> * on Oracle Java 9 and greater.<a name="line.303"></a> +<span class="sourceLineNo">304</span> * @see MessageDigestAlgorithms#SHA3_512<a name="line.304"></a> +<span class="sourceLineNo">305</span> * @since 1.12<a name="line.305"></a> +<span class="sourceLineNo">306</span> */<a name="line.306"></a> +<span class="sourceLineNo">307</span> public static MessageDigest getSha3_512Digest() {<a name="line.307"></a> +<span class="sourceLineNo">308</span> return getDigest(MessageDigestAlgorithms.SHA3_512);<a name="line.308"></a> +<span class="sourceLineNo">309</span> }<a name="line.309"></a> +<span class="sourceLineNo">310</span><a name="line.310"></a> +<span class="sourceLineNo">311</span> /**<a name="line.311"></a> +<span class="sourceLineNo">312</span> * Returns an SHA-384 digest.<a name="line.312"></a> +<span class="sourceLineNo">313</span> *<a name="line.313"></a> +<span class="sourceLineNo">314</span> * @return An SHA-384 digest instance.<a name="line.314"></a> +<span class="sourceLineNo">315</span> * @throws IllegalArgumentException<a name="line.315"></a> +<span class="sourceLineNo">316</span> * when a {@link NoSuchAlgorithmException} is caught, which should never happen<a name="line.316"></a> +<span class="sourceLineNo">317</span> * because SHA-384 is a built-in algorithm<a name="line.317"></a> +<span class="sourceLineNo">318</span> * @see MessageDigestAlgorithms#SHA_384<a name="line.318"></a> +<span class="sourceLineNo">319</span> */<a name="line.319"></a> +<span class="sourceLineNo">320</span> public static MessageDigest getSha384Digest() {<a name="line.320"></a> +<span class="sourceLineNo">321</span> return getDigest(MessageDigestAlgorithms.SHA_384);<a name="line.321"></a> +<span class="sourceLineNo">322</span> }<a name="line.322"></a> +<span class="sourceLineNo">323</span><a name="line.323"></a> +<span class="sourceLineNo">324</span> /**<a name="line.324"></a> +<span class="sourceLineNo">325</span> * Returns an SHA-512/224 digest.<a name="line.325"></a> +<span class="sourceLineNo">326</span> *<a name="line.326"></a> +<span class="sourceLineNo">327</span> * @return An SHA-512/224 digest instance.<a name="line.327"></a> +<span class="sourceLineNo">328</span> * @throws IllegalArgumentException<a name="line.328"></a> +<span class="sourceLineNo">329</span> * when a {@link NoSuchAlgorithmException} is caught.<a name="line.329"></a> +<span class="sourceLineNo">330</span> * @see MessageDigestAlgorithms#SHA_512_224<a name="line.330"></a> +<span class="sourceLineNo">331</span> */<a name="line.331"></a> +<span class="sourceLineNo">332</span> public static MessageDigest getSha512_224Digest() {<a name="line.332"></a> +<span class="sourceLineNo">333</span> return getDigest(MessageDigestAlgorithms.SHA_512_224);<a name="line.333"></a> +<span class="sourceLineNo">334</span> }<a name="line.334"></a> +<span class="sourceLineNo">335</span><a name="line.335"></a> +<span class="sourceLineNo">336</span> /**<a name="line.336"></a> +<span class="sourceLineNo">337</span> * Returns an SHA-512/256 digest.<a name="line.337"></a> +<span class="sourceLineNo">338</span> *<a name="line.338"></a> +<span class="sourceLineNo">339</span> * @return An SHA-512/256 digest instance.<a name="line.339"></a> +<span class="sourceLineNo">340</span> * @throws IllegalArgumentException<a name="line.340"></a> +<span class="sourceLineNo">341</span> * when a {@link NoSuchAlgorithmException} is caught.<a name="line.341"></a> +<span class="sourceLineNo">342</span> * @see MessageDigestAlgorithms#SHA_512_224<a name="line.342"></a> +<span class="sourceLineNo">343</span> */<a name="line.343"></a> +<span class="sourceLineNo">344</span> public static MessageDigest getSha512_256Digest() {<a name="line.344"></a> +<span class="sourceLineNo">345</span> return getDigest(MessageDigestAlgorithms.SHA_512_256);<a name="line.345"></a> +<span class="sourceLineNo">346</span> }<a name="line.346"></a> +<span class="sourceLineNo">347</span><a name="line.347"></a> +<span class="sourceLineNo">348</span> /**<a name="line.348"></a> +<span class="sourceLineNo">349</span> * Returns an SHA-512 digest.<a name="line.349"></a> +<span class="sourceLineNo">350</span> *<a name="line.350"></a> +<span class="sourceLineNo">351</span> * @return An SHA-512 digest instance.<a name="line.351"></a> +<span class="sourceLineNo">352</span> * @throws IllegalArgumentException<a name="line.352"></a> +<span class="sourceLineNo">353</span> * when a {@link NoSuchAlgorithmException} is caught, which should never happen<a name="line.353"></a> +<span class="sourceLineNo">354</span> * because SHA-512 is a built-in algorithm<a name="line.354"></a> +<span class="sourceLineNo">355</span> * @see MessageDigestAlgorithms#SHA_512<a name="line.355"></a> +<span class="sourceLineNo">356</span> */<a name="line.356"></a> +<span class="sourceLineNo">357</span> public static MessageDigest getSha512Digest() {<a name="line.357"></a> +<span class="sourceLineNo">358</span> return getDigest(MessageDigestAlgorithms.SHA_512);<a name="line.358"></a> +<span class="sourceLineNo">359</span> }<a name="line.359"></a> +<span class="sourceLineNo">360</span><a name="line.360"></a> +<span class="sourceLineNo">361</span> /**<a name="line.361"></a> +<span class="sourceLineNo">362</span> * Returns an SHA-1 digest.<a name="line.362"></a> +<span class="sourceLineNo">363</span> *<a name="line.363"></a> +<span class="sourceLineNo">364</span> * @return An SHA-1 digest instance.<a name="line.364"></a> +<span class="sourceLineNo">365</span> * @throws IllegalArgumentException<a name="line.365"></a> +<span class="sourceLineNo">366</span> * when a {@link NoSuchAlgorithmException} is caught<a name="line.366"></a> +<span class="sourceLineNo">367</span> * @deprecated (1.11) Use {@link #getSha1Digest()}<a name="line.367"></a> +<span class="sourceLineNo">368</span> */<a name="line.368"></a> +<span class="sourceLineNo">369</span> @Deprecated<a name="line.369"></a> +<span class="sourceLineNo">370</span> public static MessageDigest getShaDigest() {<a name="line.370"></a> +<span class="sourceLineNo">371</span> return getSha1Digest();<a name="line.371"></a> +<span class="sourceLineNo">372</span> }<a name="line.372"></a> +<span class="sourceLineNo">373</span><a name="line.373"></a> +<span class="sourceLineNo">374</span> /**<a name="line.374"></a> +<span class="sourceLineNo">375</span> * Test whether the algorithm is supported.<a name="line.375"></a> +<span class="sourceLineNo">376</span> * @param messageDigestAlgorithm the algorithm name<a name="line.376"></a> +<span class="sourceLineNo">377</span> * @return {@code true} if the algorithm can be found<a name="line.377"></a> +<span class="sourceLineNo">378</span> * @since 1.11<a name="line.378"></a> +<span class="sourceLineNo">379</span> */<a name="line.379"></a> +<span class="sourceLineNo">380</span> public static boolean isAvailable(final String messageDigestAlgorithm) {<a name="line.380"></a> +<span class="sourceLineNo">381</span> return getDigest(messageDigestAlgorithm, null) != null;<a name="line.381"></a> +<span class="sourceLineNo">382</span> }<a name="line.382"></a> +<span class="sourceLineNo">383</span><a name="line.383"></a> +<span class="sourceLineNo">384</span> /**<a name="line.384"></a> +<span class="sourceLineNo">385</span> * Calculates the MD2 digest and returns the value as a 16 element {@code byte[]}.<a name="line.385"></a> +<span class="sourceLineNo">386</span> *<a name="line.386"></a> +<span class="sourceLineNo">387</span> * @param data<a name="line.387"></a> +<span class="sourceLineNo">388</span> * Data to digest<a name="line.388"></a> +<span class="sourceLineNo">389</span> * @return MD2 digest<a name="line.389"></a> +<span class="sourceLineNo">390</span> * @since 1.7<a name="line.390"></a> +<span class="sourceLineNo">391</span> */<a name="line.391"></a> +<span class="sourceLineNo">392</span> public static byte[] md2(final byte[] data) {<a name="line.392"></a> +<span class="sourceLineNo">393</span> return getMd2Digest().digest(data);<a name="line.393"></a> +<span class="sourceLineNo">394</span> }<a name="line.394"></a> +<span class="sourceLineNo">395</span><a name="line.395"></a> +<span class="sourceLineNo">396</span> /**<a name="line.396"></a> +<span class="sourceLineNo">397</span> * Calculates the MD2 digest and returns the value as a 16 element {@code byte[]}.<a name="line.397"></a> +<span class="sourceLineNo">398</span> *<a name="line.398"></a> +<span class="sourceLineNo">399</span> * @param data<a name="line.399"></a> +<span class="sourceLineNo">400</span> * Data to digest<a name="line.400"></a> +<span class="sourceLineNo">401</span> * @return MD2 digest<a name="line.401"></a> +<span class="sourceLineNo">402</span> * @throws IOException<a name="line.402"></a> +<span class="sourceLineNo">403</span> * On error reading from the stream<a name="line.403"></a> +<span class="sourceLineNo">404</span> * @since 1.7<a name="line.404"></a> +<span class="sourceLineNo">405</span> */<a name="line.405"></a> +<span class="sourceLineNo">406</span> public static byte[] md2(final InputStream data) throws IOException {<a name="line.406"></a> +<span class="sourceLineNo">407</span> return digest(getMd2Digest(), data);<a name="line.407"></a> +<span class="sourceLineNo">408</span> }<a name="line.408"></a> +<span class="sourceLineNo">409</span><a name="line.409"></a> +<span class="sourceLineNo">410</span> /**<a name="line.410"></a> +<span class="sourceLineNo">411</span> * Calculates the MD2 digest and returns the value as a 16 element {@code byte[]}.<a name="line.411"></a> +<span class="sourceLineNo">412</span> *<a name="line.412"></a> +<span class="sourceLineNo">413</span> * @param data<a name="line.413"></a> +<span class="sourceLineNo">414</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.414"></a> +<span class="sourceLineNo">415</span> * @return MD2 digest<a name="line.415"></a> +<span class="sourceLineNo">416</span> * @since 1.7<a name="line.416"></a> +<span class="sourceLineNo">417</span> */<a name="line.417"></a> +<span class="sourceLineNo">418</span> public static byte[] md2(final String data) {<a name="line.418"></a> +<span class="sourceLineNo">419</span> return md2(StringUtils.getBytesUtf8(data));<a name="line.419"></a> +<span class="sourceLineNo">420</span> }<a name="line.420"></a> +<span class="sourceLineNo">421</span><a name="line.421"></a> +<span class="sourceLineNo">422</span> /**<a name="line.422"></a> +<span class="sourceLineNo">423</span> * Calculates the MD2 digest and returns the value as a 32 character hex string.<a name="line.423"></a> +<span class="sourceLineNo">424</span> *<a name="line.424"></a> +<span class="sourceLineNo">425</span> * @param data<a name="line.425"></a> +<span class="sourceLineNo">426</span> * Data to digest<a name="line.426"></a> +<span class="sourceLineNo">427</span> * @return MD2 digest as a hex string<a name="line.427"></a> +<span class="sourceLineNo">428</span> * @since 1.7<a name="line.428"></a> +<span class="sourceLineNo">429</span> */<a name="line.429"></a> +<span class="sourceLineNo">430</span> public static String md2Hex(final byte[] data) {<a name="line.430"></a> +<span class="sourceLineNo">431</span> return Hex.encodeHexString(md2(data));<a name="line.431"></a> +<span class="sourceLineNo">432</span> }<a name="line.432"></a> +<span class="sourceLineNo">433</span><a name="line.433"></a> +<span class="sourceLineNo">434</span> /**<a name="line.434"></a> +<span class="sourceLineNo">435</span> * Calculates the MD2 digest and returns the value as a 32 character hex string.<a name="line.435"></a> +<span class="sourceLineNo">436</span> *<a name="line.436"></a> +<span class="sourceLineNo">437</span> * @param data<a name="line.437"></a> +<span class="sourceLineNo">438</span> * Data to digest<a name="line.438"></a> +<span class="sourceLineNo">439</span> * @return MD2 digest as a hex string<a name="line.439"></a> +<span class="sourceLineNo">440</span> * @throws IOException<a name="line.440"></a> +<span class="sourceLineNo">441</span> * On error reading from the stream<a name="line.441"></a> +<span class="sourceLineNo">442</span> * @since 1.7<a name="line.442"></a> +<span class="sourceLineNo">443</span> */<a name="line.443"></a> +<span class="sourceLineNo">444</span> public static String md2Hex(final InputStream data) throws IOException {<a name="line.444"></a> +<span class="sourceLineNo">445</span> return Hex.encodeHexString(md2(data));<a name="line.445"></a> +<span class="sourceLineNo">446</span> }<a name="line.446"></a> +<span class="sourceLineNo">447</span><a name="line.447"></a> +<span class="sourceLineNo">448</span> /**<a name="line.448"></a> +<span class="sourceLineNo">449</span> * Calculates the MD2 digest and returns the value as a 32 character hex string.<a name="line.449"></a> +<span class="sourceLineNo">450</span> *<a name="line.450"></a> +<span class="sourceLineNo">451</span> * @param data<a name="line.451"></a> +<span class="sourceLineNo">452</span> * Data to digest<a name="line.452"></a> +<span class="sourceLineNo">453</span> * @return MD2 digest as a hex string<a name="line.453"></a> +<span class="sourceLineNo">454</span> * @since 1.7<a name="line.454"></a> +<span class="sourceLineNo">455</span> */<a name="line.455"></a> +<span class="sourceLineNo">456</span> public static String md2Hex(final String data) {<a name="line.456"></a> +<span class="sourceLineNo">457</span> return Hex.encodeHexString(md2(data));<a name="line.457"></a> +<span class="sourceLineNo">458</span> }<a name="line.458"></a> +<span class="sourceLineNo">459</span><a name="line.459"></a> +<span class="sourceLineNo">460</span> /**<a name="line.460"></a> +<span class="sourceLineNo">461</span> * Calculates the MD5 digest and returns the value as a 16 element {@code byte[]}.<a name="line.461"></a> +<span class="sourceLineNo">462</span> *<a name="line.462"></a> +<span class="sourceLineNo">463</span> * @param data<a name="line.463"></a> +<span class="sourceLineNo">464</span> * Data to digest<a name="line.464"></a> +<span class="sourceLineNo">465</span> * @return MD5 digest<a name="line.465"></a> +<span class="sourceLineNo">466</span> */<a name="line.466"></a> +<span class="sourceLineNo">467</span> public static byte[] md5(final byte[] data) {<a name="line.467"></a> +<span class="sourceLineNo">468</span> return getMd5Digest().digest(data);<a name="line.468"></a> +<span class="sourceLineNo">469</span> }<a name="line.469"></a> +<span class="sourceLineNo">470</span><a name="line.470"></a> +<span class="sourceLineNo">471</span> /**<a name="line.471"></a> +<span class="sourceLineNo">472</span> * Calculates the MD5 digest and returns the value as a 16 element {@code byte[]}.<a name="line.472"></a> +<span class="sourceLineNo">473</span> *<a name="line.473"></a> +<span class="sourceLineNo">474</span> * @param data<a name="line.474"></a> +<span class="sourceLineNo">475</span> * Data to digest<a name="line.475"></a> +<span class="sourceLineNo">476</span> * @return MD5 digest<a name="line.476"></a> +<span class="sourceLineNo">477</span> * @throws IOException<a name="line.477"></a> +<span class="sourceLineNo">478</span> * On error reading from the stream<a name="line.478"></a> +<span class="sourceLineNo">479</span> * @since 1.4<a name="line.479"></a> +<span class="sourceLineNo">480</span> */<a name="line.480"></a> +<span class="sourceLineNo">481</span> public static byte[] md5(final InputStream data) throws IOException {<a name="line.481"></a> +<span class="sourceLineNo">482</span> return digest(getMd5Digest(), data);<a name="line.482"></a> +<span class="sourceLineNo">483</span> }<a name="line.483"></a> +<span class="sourceLineNo">484</span><a name="line.484"></a> +<span class="sourceLineNo">485</span> /**<a name="line.485"></a> +<span class="sourceLineNo">486</span> * Calculates the MD5 digest and returns the value as a 16 element {@code byte[]}.<a name="line.486"></a> +<span class="sourceLineNo">487</span> *<a name="line.487"></a> +<span class="sourceLineNo">488</span> * @param data<a name="line.488"></a> +<span class="sourceLineNo">489</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.489"></a> +<span class="sourceLineNo">490</span> * @return MD5 digest<a name="line.490"></a> +<span class="sourceLineNo">491</span> */<a name="line.491"></a> +<span class="sourceLineNo">492</span> public static byte[] md5(final String data) {<a name="line.492"></a> +<span class="sourceLineNo">493</span> return md5(StringUtils.getBytesUtf8(data));<a name="line.493"></a> +<span class="sourceLineNo">494</span> }<a name="line.494"></a> +<span class="sourceLineNo">495</span><a name="line.495"></a> +<span class="sourceLineNo">496</span> /**<a name="line.496"></a> +<span class="sourceLineNo">497</span> * Calculates the MD5 digest and returns the value as a 32 character hex string.<a name="line.497"></a> +<span class="sourceLineNo">498</span> *<a name="line.498"></a> +<span class="sourceLineNo">499</span> * @param data<a name="line.499"></a> +<span class="sourceLineNo">500</span> * Data to digest<a name="line.500"></a> +<span class="sourceLineNo">501</span> * @return MD5 digest as a hex string<a name="line.501"></a> +<span class="sourceLineNo">502</span> */<a name="line.502"></a> +<span class="sourceLineNo">503</span> public static String md5Hex(final byte[] data) {<a name="line.503"></a> +<span class="sourceLineNo">504</span> return Hex.encodeHexString(md5(data));<a name="line.504"></a> +<span class="sourceLineNo">505</span> }<a name="line.505"></a> +<span class="sourceLineNo">506</span><a name="line.506"></a> +<span class="sourceLineNo">507</span> /**<a name="line.507"></a> +<span class="sourceLineNo">508</span> * Calculates the MD5 digest and returns the value as a 32 character hex string.<a name="line.508"></a> +<span class="sourceLineNo">509</span> *<a name="line.509"></a> +<span class="sourceLineNo">510</span> * @param data<a name="line.510"></a> +<span class="sourceLineNo">511</span> * Data to digest<a name="line.511"></a> +<span class="sourceLineNo">512</span> * @return MD5 digest as a hex string<a name="line.512"></a> +<span class="sourceLineNo">513</span> * @throws IOException<a name="line.513"></a> +<span class="sourceLineNo">514</span> * On error reading from the stream<a name="line.514"></a> +<span class="sourceLineNo">515</span> * @since 1.4<a name="line.515"></a> +<span class="sourceLineNo">516</span> */<a name="line.516"></a> +<span class="sourceLineNo">517</span> public static String md5Hex(final InputStream data) throws IOException {<a name="line.517"></a> +<span class="sourceLineNo">518</span> return Hex.encodeHexString(md5(data));<a name="line.518"></a> +<span class="sourceLineNo">519</span> }<a name="line.519"></a> +<span class="sourceLineNo">520</span><a name="line.520"></a> +<span class="sourceLineNo">521</span> /**<a name="line.521"></a> +<span class="sourceLineNo">522</span> * Calculates the MD5 digest and returns the value as a 32 character hex string.<a name="line.522"></a> +<span class="sourceLineNo">523</span> *<a name="line.523"></a> +<span class="sourceLineNo">524</span> * @param data<a name="line.524"></a> +<span class="sourceLineNo">525</span> * Data to digest<a name="line.525"></a> +<span class="sourceLineNo">526</span> * @return MD5 digest as a hex string<a name="line.526"></a> +<span class="sourceLineNo">527</span> */<a name="line.527"></a> +<span class="sourceLineNo">528</span> public static String md5Hex(final String data) {<a name="line.528"></a> +<span class="sourceLineNo">529</span> return Hex.encodeHexString(md5(data));<a name="line.529"></a> +<span class="sourceLineNo">530</span> }<a name="line.530"></a> +<span class="sourceLineNo">531</span><a name="line.531"></a> +<span class="sourceLineNo">532</span> /**<a name="line.532"></a> +<span class="sourceLineNo">533</span> * Calculates the SHA-1 digest and returns the value as a {@code byte[]}.<a name="line.533"></a> +<span class="sourceLineNo">534</span> *<a name="line.534"></a> +<span class="sourceLineNo">535</span> * @param data<a name="line.535"></a> +<span class="sourceLineNo">536</span> * Data to digest<a name="line.536"></a> +<span class="sourceLineNo">537</span> * @return SHA-1 digest<a name="line.537"></a> +<span class="sourceLineNo">538</span> * @deprecated (1.11) Use {@link #sha1(byte[])}<a name="line.538"></a> +<span class="sourceLineNo">539</span> */<a name="line.539"></a> +<span class="sourceLineNo">540</span> @Deprecated<a name="line.540"></a> +<span class="sourceLineNo">541</span> public static byte[] sha(final byte[] data) {<a name="line.541"></a> +<span class="sourceLineNo">542</span> return sha1(data);<a name="line.542"></a> +<span class="sourceLineNo">543</span> }<a name="line.543"></a> +<span class="sourceLineNo">544</span><a name="line.544"></a> +<span class="sourceLineNo">545</span> /**<a name="line.545"></a> +<span class="sourceLineNo">546</span> * Calculates the SHA-1 digest and returns the value as a {@code byte[]}.<a name="line.546"></a> +<span class="sourceLineNo">547</span> *<a name="line.547"></a> +<span class="sourceLineNo">548</span> * @param data<a name="line.548"></a> +<span class="sourceLineNo">549</span> * Data to digest<a name="line.549"></a> +<span class="sourceLineNo">550</span> * @return SHA-1 digest<a name="line.550"></a> +<span class="sourceLineNo">551</span> * @throws IOException<a name="line.551"></a> +<span class="sourceLineNo">552</span> * On error reading from the stream<a name="line.552"></a> +<span class="sourceLineNo">553</span> * @since 1.4<a name="line.553"></a> +<span class="sourceLineNo">554</span> * @deprecated (1.11) Use {@link #sha1(InputStream)}<a name="line.554"></a> +<span class="sourceLineNo">555</span> */<a name="line.555"></a> +<span class="sourceLineNo">556</span> @Deprecated<a name="line.556"></a> +<span class="sourceLineNo">557</span> public static byte[] sha(final InputStream data) throws IOException {<a name="line.557"></a> +<span class="sourceLineNo">558</span> return sha1(data);<a name="line.558"></a> +<span class="sourceLineNo">559</span> }<a name="line.559"></a> +<span class="sourceLineNo">560</span><a name="line.560"></a> +<span class="sourceLineNo">561</span> /**<a name="line.561"></a> +<span class="sourceLineNo">562</span> * Calculates the SHA-1 digest and returns the value as a {@code byte[]}.<a name="line.562"></a> +<span class="sourceLineNo">563</span> *<a name="line.563"></a> +<span class="sourceLineNo">564</span> * @param data<a name="line.564"></a> +<span class="sourceLineNo">565</span> * Data to digest<a name="line.565"></a> +<span class="sourceLineNo">566</span> * @return SHA-1 digest<a name="line.566"></a> +<span class="sourceLineNo">567</span> * @deprecated (1.11) Use {@link #sha1(String)}<a name="line.567"></a> +<span class="sourceLineNo">568</span> */<a name="line.568"></a> +<span class="sourceLineNo">569</span> @Deprecated<a name="line.569"></a> +<span class="sourceLineNo">570</span> public static byte[] sha(final String data) {<a name="line.570"></a> +<span class="sourceLineNo">571</span> return sha1(data);<a name="line.571"></a> +<span class="sourceLineNo">572</span> }<a name="line.572"></a> +<span class="sourceLineNo">573</span><a name="line.573"></a> +<span class="sourceLineNo">574</span> /**<a name="line.574"></a> +<span class="sourceLineNo">575</span> * Calculates the SHA-1 digest and returns the value as a {@code byte[]}.<a name="line.575"></a> +<span class="sourceLineNo">576</span> *<a name="line.576"></a> +<span class="sourceLineNo">577</span> * @param data<a name="line.577"></a> +<span class="sourceLineNo">578</span> * Data to digest<a name="line.578"></a> +<span class="sourceLineNo">579</span> * @return SHA-1 digest<a name="line.579"></a> +<span class="sourceLineNo">580</span> * @since 1.7<a name="line.580"></a> +<span class="sourceLineNo">581</span> */<a name="line.581"></a> +<span class="sourceLineNo">582</span> public static byte[] sha1(final byte[] data) {<a name="line.582"></a> +<span class="sourceLineNo">583</span> return getSha1Digest().digest(data);<a name="line.583"></a> +<span class="sourceLineNo">584</span> }<a name="line.584"></a> +<span class="sourceLineNo">585</span><a name="line.585"></a> +<span class="sourceLineNo">586</span> /**<a name="line.586"></a> +<span class="sourceLineNo">587</span> * Calculates the SHA-1 digest and returns the value as a {@code byte[]}.<a name="line.587"></a> +<span class="sourceLineNo">588</span> *<a name="line.588"></a> +<span class="sourceLineNo">589</span> * @param data<a name="line.589"></a> +<span class="sourceLineNo">590</span> * Data to digest<a name="line.590"></a> +<span class="sourceLineNo">591</span> * @return SHA-1 digest<a name="line.591"></a> +<span class="sourceLineNo">592</span> * @throws IOException<a name="line.592"></a> +<span class="sourceLineNo">593</span> * On error reading from the stream<a name="line.593"></a> +<span class="sourceLineNo">594</span> * @since 1.7<a name="line.594"></a> +<span class="sourceLineNo">595</span> */<a name="line.595"></a> +<span class="sourceLineNo">596</span> public static byte[] sha1(final InputStream data) throws IOException {<a name="line.596"></a> +<span class="sourceLineNo">597</span> return digest(getSha1Digest(), data);<a name="line.597"></a> +<span class="sourceLineNo">598</span> }<a name="line.598"></a> +<span class="sourceLineNo">599</span><a name="line.599"></a> +<span class="sourceLineNo">600</span> /**<a name="line.600"></a> +<span class="sourceLineNo">601</span> * Calculates the SHA-1 digest and returns the value as a {@code byte[]}.<a name="line.601"></a> +<span class="sourceLineNo">602</span> *<a name="line.602"></a> +<span class="sourceLineNo">603</span> * @param data<a name="line.603"></a> +<span class="sourceLineNo">604</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.604"></a> +<span class="sourceLineNo">605</span> * @return SHA-1 digest<a name="line.605"></a> +<span class="sourceLineNo">606</span> */<a name="line.606"></a> +<span class="sourceLineNo">607</span> public static byte[] sha1(final String data) {<a name="line.607"></a> +<span class="sourceLineNo">608</span> return sha1(StringUtils.getBytesUtf8(data));<a name="line.608"></a> +<span class="sourceLineNo">609</span> }<a name="line.609"></a> +<span class="sourceLineNo">610</span><a name="line.610"></a> +<span class="sourceLineNo">611</span> /**<a name="line.611"></a> +<span class="sourceLineNo">612</span> * Calculates the SHA-1 digest and returns the value as a hex string.<a name="line.612"></a> +<span class="sourceLineNo">613</span> *<a name="line.613"></a> +<span class="sourceLineNo">614</span> * @param data<a name="line.614"></a> +<span class="sourceLineNo">615</span> * Data to digest<a name="line.615"></a> +<span class="sourceLineNo">616</span> * @return SHA-1 digest as a hex string<a name="line.616"></a> +<span class="sourceLineNo">617</span> * @since 1.7<a name="line.617"></a> +<span class="sourceLineNo">618</span> */<a name="line.618"></a> +<span class="sourceLineNo">619</span> public static String sha1Hex(final byte[] data) {<a name="line.619"></a> +<span class="sourceLineNo">620</span> return Hex.encodeHexString(sha1(data));<a name="line.620"></a> +<span class="sourceLineNo">621</span> }<a name="line.621"></a> +<span class="sourceLineNo">622</span><a name="line.622"></a> +<span class="sourceLineNo">623</span> /**<a name="line.623"></a> +<span class="sourceLineNo">624</span> * Calculates the SHA-1 digest and returns the value as a hex string.<a name="line.624"></a> +<span class="sourceLineNo">625</span> *<a name="line.625"></a> +<span class="sourceLineNo">626</span> * @param data<a name="line.626"></a> +<span class="sourceLineNo">627</span> * Data to digest<a name="line.627"></a> +<span class="sourceLineNo">628</span> * @return SHA-1 digest as a hex string<a name="line.628"></a> +<span class="sourceLineNo">629</span> * @throws IOException<a name="line.629"></a> +<span class="sourceLineNo">630</span> * On error reading from the stream<a name="line.630"></a> +<span class="sourceLineNo">631</span> * @since 1.7<a name="line.631"></a> +<span class="sourceLineNo">632</span> */<a name="line.632"></a> +<span class="sourceLineNo">633</span> public static String sha1Hex(final InputStream data) throws IOException {<a name="line.633"></a> +<span class="sourceLineNo">634</span> return Hex.encodeHexString(sha1(data));<a name="line.634"></a> +<span class="sourceLineNo">635</span> }<a name="line.635"></a> +<span class="sourceLineNo">636</span><a name="line.636"></a> +<span class="sourceLineNo">637</span> /**<a name="line.637"></a> +<span class="sourceLineNo">638</span> * Calculates the SHA-1 digest and returns the value as a hex string.<a name="line.638"></a> +<span class="sourceLineNo">639</span> *<a name="line.639"></a> +<span class="sourceLineNo">640</span> * @param data<a name="line.640"></a> +<span class="sourceLineNo">641</span> * Data to digest<a name="line.641"></a> +<span class="sourceLineNo">642</span> * @return SHA-1 digest as a hex string<a name="line.642"></a> +<span class="sourceLineNo">643</span> * @since 1.7<a name="line.643"></a> +<span class="sourceLineNo">644</span> */<a name="line.644"></a> +<span class="sourceLineNo">645</span> public static String sha1Hex(final String data) {<a name="line.645"></a> +<span class="sourceLineNo">646</span> return Hex.encodeHexString(sha1(data));<a name="line.646"></a> +<span class="sourceLineNo">647</span> }<a name="line.647"></a> +<span class="sourceLineNo">648</span><a name="line.648"></a> +<span class="sourceLineNo">649</span> /**<a name="line.649"></a> +<span class="sourceLineNo">650</span> * Calculates the SHA-256 digest and returns the value as a {@code byte[]}.<a name="line.650"></a> +<span class="sourceLineNo">651</span> *<a name="line.651"></a> +<span class="sourceLineNo">652</span> * @param data<a name="line.652"></a> +<span class="sourceLineNo">653</span> * Data to digest<a name="line.653"></a> +<span class="sourceLineNo">654</span> * @return SHA-256 digest<a name="line.654"></a> +<span class="sourceLineNo">655</span> * @since 1.4<a name="line.655"></a> +<span class="sourceLineNo">656</span> */<a name="line.656"></a> +<span class="sourceLineNo">657</span> public static byte[] sha256(final byte[] data) {<a name="line.657"></a> +<span class="sourceLineNo">658</span> return getSha256Digest().digest(data);<a name="line.658"></a> +<span class="sourceLineNo">659</span> }<a name="line.659"></a> +<span class="sourceLineNo">660</span><a name="line.660"></a> +<span class="sourceLineNo">661</span> /**<a name="line.661"></a> +<span class="sourceLineNo">662</span> * Calculates the SHA-256 digest and returns the value as a {@code byte[]}.<a name="line.662"></a> +<span class="sourceLineNo">663</span> *<a name="line.663"></a> +<span class="sourceLineNo">664</span> * @param data<a name="line.664"></a> +<span class="sourceLineNo">665</span> * Data to digest<a name="line.665"></a> +<span class="sourceLineNo">666</span> * @return SHA-256 digest<a name="line.666"></a> +<span class="sourceLineNo">667</span> * @throws IOException<a name="line.667"></a> +<span class="sourceLineNo">668</span> * On error reading from the stream<a name="line.668"></a> +<span class="sourceLineNo">669</span> * @since 1.4<a name="line.669"></a> +<span class="sourceLineNo">670</span> */<a name="line.670"></a> +<span class="sourceLineNo">671</span> public static byte[] sha256(final InputStream data) throws IOException {<a name="line.671"></a> +<span class="sourceLineNo">672</span> return digest(getSha256Digest(), data);<a name="line.672"></a> +<span class="sourceLineNo">673</span> }<a name="line.673"></a> +<span class="sourceLineNo">674</span><a name="line.674"></a> +<span class="sourceLineNo">675</span> /**<a name="line.675"></a> +<span class="sourceLineNo">676</span> * Calculates the SHA-256 digest and returns the value as a {@code byte[]}.<a name="line.676"></a> +<span class="sourceLineNo">677</span> *<a name="line.677"></a> +<span class="sourceLineNo">678</span> * @param data<a name="line.678"></a> +<span class="sourceLineNo">679</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.679"></a> +<span class="sourceLineNo">680</span> * @return SHA-256 digest<a name="line.680"></a> +<span class="sourceLineNo">681</span> * @since 1.4<a name="line.681"></a> +<span class="sourceLineNo">682</span> */<a name="line.682"></a> +<span class="sourceLineNo">683</span> public static byte[] sha256(final String data) {<a name="line.683"></a> +<span class="sourceLineNo">684</span> return sha256(StringUtils.getBytesUtf8(data));<a name="line.684"></a> +<span class="sourceLineNo">685</span> }<a name="line.685"></a> +<span class="sourceLineNo">686</span><a name="line.686"></a> +<span class="sourceLineNo">687</span> /**<a name="line.687"></a> +<span class="sourceLineNo">688</span> * Calculates the SHA-256 digest and returns the value as a hex string.<a name="line.688"></a> +<span class="sourceLineNo">689</span> *<a name="line.689"></a> +<span class="sourceLineNo">690</span> * @param data<a name="line.690"></a> +<span class="sourceLineNo">691</span> * Data to digest<a name="line.691"></a> +<span class="sourceLineNo">692</span> * @return SHA-256 digest as a hex string<a name="line.692"></a> +<span class="sourceLineNo">693</span> * @since 1.4<a name="line.693"></a> +<span class="sourceLineNo">694</span> */<a name="line.694"></a> +<span class="sourceLineNo">695</span> public static String sha256Hex(final byte[] data) {<a name="line.695"></a> +<span class="sourceLineNo">696</span> return Hex.encodeHexString(sha256(data));<a name="line.696"></a> +<span class="sourceLineNo">697</span> }<a name="line.697"></a> +<span class="sourceLineNo">698</span><a name="line.698"></a> +<span class="sourceLineNo">699</span> /**<a name="line.699"></a> +<span class="sourceLineNo">700</span> * Calculates the SHA-256 digest and returns the value as a hex string.<a name="line.700"></a> +<span class="sourceLineNo">701</span> *<a name="line.701"></a> +<span class="sourceLineNo">702</span> * @param data<a name="line.702"></a> +<span class="sourceLineNo">703</span> * Data to digest<a name="line.703"></a> +<span class="sourceLineNo">704</span> * @return SHA-256 digest as a hex string<a name="line.704"></a> +<span class="sourceLineNo">705</span> * @throws IOException<a name="line.705"></a> +<span class="sourceLineNo">706</span> * On error reading from the stream<a name="line.706"></a> +<span class="sourceLineNo">707</span> * @since 1.4<a name="line.707"></a> +<span class="sourceLineNo">708</span> */<a name="line.708"></a> +<span class="sourceLineNo">709</span> public static String sha256Hex(final InputStream data) throws IOException {<a name="line.709"></a> +<span class="sourceLineNo">710</span> return Hex.encodeHexString(sha256(data));<a name="line.710"></a> +<span class="sourceLineNo">711</span> }<a name="line.711"></a> +<span class="sourceLineNo">712</span><a name="line.712"></a> +<span class="sourceLineNo">713</span> /**<a name="line.713"></a> +<span class="sourceLineNo">714</span> * Calculates the SHA-256 digest and returns the value as a hex string.<a name="line.714"></a> +<span class="sourceLineNo">715</span> *<a name="line.715"></a> +<span class="sourceLineNo">716</span> * @param data<a name="line.716"></a> +<span class="sourceLineNo">717</span> * Data to digest<a name="line.717"></a> +<span class="sourceLineNo">718</span> * @return SHA-256 digest as a hex string<a name="line.718"></a> +<span class="sourceLineNo">719</span> * @since 1.4<a name="line.719"></a> +<span class="sourceLineNo">720</span> */<a name="line.720"></a> +<span class="sourceLineNo">721</span> public static String sha256Hex(final String data) {<a name="line.721"></a> +<span class="sourceLineNo">722</span> return Hex.encodeHexString(sha256(data));<a name="line.722"></a> +<span class="sourceLineNo">723</span> }<a name="line.723"></a> +<span class="sourceLineNo">724</span><a name="line.724"></a> +<span class="sourceLineNo">725</span> /**<a name="line.725"></a> +<span class="sourceLineNo">726</span> * Calculates the SHA3-224 digest and returns the value as a {@code byte[]}.<a name="line.726"></a> +<span class="sourceLineNo">727</span> *<a name="line.727"></a> +<span class="sourceLineNo">728</span> * @param data<a name="line.728"></a> +<span class="sourceLineNo">729</span> * Data to digest<a name="line.729"></a> +<span class="sourceLineNo">730</span> * @return SHA3-224 digest<a name="line.730"></a> +<span class="sourceLineNo">731</span> * @since 1.12<a name="line.731"></a> +<span class="sourceLineNo">732</span> */<a name="line.732"></a> +<span class="sourceLineNo">733</span> public static byte[] sha3_224(final byte[] data) {<a name="line.733"></a> +<span class="sourceLineNo">734</span> return getSha3_224Digest().digest(data);<a name="line.734"></a> +<span class="sourceLineNo">735</span> }<a name="line.735"></a> +<span class="sourceLineNo">736</span><a name="line.736"></a> +<span class="sourceLineNo">737</span> /**<a name="line.737"></a> +<span class="sourceLineNo">738</span> * Calculates the SHA3-224 digest and returns the value as a {@code byte[]}.<a name="line.738"></a> +<span class="sourceLineNo">739</span> *<a name="line.739"></a> +<span class="sourceLineNo">740</span> * @param data<a name="line.740"></a> +<span class="sourceLineNo">741</span> * Data to digest<a name="line.741"></a> +<span class="sourceLineNo">742</span> * @return SHA3-224 digest<a name="line.742"></a> +<span class="sourceLineNo">743</span> * @throws IOException<a name="line.743"></a> +<span class="sourceLineNo">744</span> * On error reading from the stream<a name="line.744"></a> +<span class="sourceLineNo">745</span> * @since 1.12<a name="line.745"></a> +<span class="sourceLineNo">746</span> */<a name="line.746"></a> +<span class="sourceLineNo">747</span> public static byte[] sha3_224(final InputStream data) throws IOException {<a name="line.747"></a> +<span class="sourceLineNo">748</span> return digest(getSha3_224Digest(), data);<a name="line.748"></a> +<span class="sourceLineNo">749</span> }<a name="line.749"></a> +<span class="sourceLineNo">750</span><a name="line.750"></a> +<span class="sourceLineNo">751</span> /**<a name="line.751"></a> +<span class="sourceLineNo">752</span> * Calculates the SHA3-224 digest and returns the value as a {@code byte[]}.<a name="line.752"></a> +<span class="sourceLineNo">753</span> *<a name="line.753"></a> +<span class="sourceLineNo">754</span> * @param data<a name="line.754"></a> +<span class="sourceLineNo">755</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.755"></a> +<span class="sourceLineNo">756</span> * @return SHA3-224 digest<a name="line.756"></a> +<span class="sourceLineNo">757</span> * @since 1.12<a name="line.757"></a> +<span class="sourceLineNo">758</span> */<a name="line.758"></a> +<span class="sourceLineNo">759</span> public static byte[] sha3_224(final String data) {<a name="line.759"></a> +<span class="sourceLineNo">760</span> return sha3_224(StringUtils.getBytesUtf8(data));<a name="line.760"></a> +<span class="sourceLineNo">761</span> }<a name="line.761"></a> +<span class="sourceLineNo">762</span><a name="line.762"></a> +<span class="sourceLineNo">763</span> /**<a name="line.763"></a> +<span class="sourceLineNo">764</span> * Calculates the SHA3-224 digest and returns the value as a hex string.<a name="line.764"></a> +<span class="sourceLineNo">765</span> *<a name="line.765"></a> +<span class="sourceLineNo">766</span> * @param data<a name="line.766"></a> +<span class="sourceLineNo">767</span> * Data to digest<a name="line.767"></a> +<span class="sourceLineNo">768</span> * @return SHA3-224 digest as a hex string<a name="line.768"></a> +<span class="sourceLineNo">769</span> * @since 1.12<a name="line.769"></a> +<span class="sourceLineNo">770</span> */<a name="line.770"></a> +<span class="sourceLineNo">771</span> public static String sha3_224Hex(final byte[] data) {<a name="line.771"></a> +<span class="sourceLineNo">772</span> return Hex.encodeHexString(sha3_224(data));<a name="line.772"></a> +<span class="sourceLineNo">773</span> }<a name="line.773"></a> +<span class="sourceLineNo">774</span><a name="line.774"></a> +<span class="sourceLineNo">775</span> /**<a name="line.775"></a> +<span class="sourceLineNo">776</span> * Calculates the SHA3-224 digest and returns the value as a hex string.<a name="line.776"></a> +<span class="sourceLineNo">777</span> *<a name="line.777"></a> +<span class="sourceLineNo">778</span> * @param data<a name="line.778"></a> +<span class="sourceLineNo">779</span> * Data to digest<a name="line.779"></a> +<span class="sourceLineNo">780</span> * @return SHA3-224 digest as a hex string<a name="line.780"></a> +<span class="sourceLineNo">781</span> * @throws IOException<a name="line.781"></a> +<span class="sourceLineNo">782</span> * On error reading from the stream<a name="line.782"></a> +<span class="sourceLineNo">783</span> * @since 1.12<a name="line.783"></a> +<span class="sourceLineNo">784</span> */<a name="line.784"></a> +<span class="sourceLineNo">785</span> public static String sha3_224Hex(final InputStream data) throws IOException {<a name="line.785"></a> +<span class="sourceLineNo">786</span> return Hex.encodeHexString(sha3_224(data));<a name="line.786"></a> +<span class="sourceLineNo">787</span> }<a name="line.787"></a> +<span class="sourceLineNo">788</span><a name="line.788"></a> +<span class="sourceLineNo">789</span> /**<a name="line.789"></a> +<span class="sourceLineNo">790</span> * Calculates the SHA3-224 digest and returns the value as a hex string.<a name="line.790"></a> +<span class="sourceLineNo">791</span> *<a name="line.791"></a> +<span class="sourceLineNo">792</span> * @param data<a name="line.792"></a> +<span class="sourceLineNo">793</span> * Data to digest<a name="line.793"></a> +<span class="sourceLineNo">794</span> * @return SHA3-224 digest as a hex string<a name="line.794"></a> +<span class="sourceLineNo">795</span> * @since 1.12<a name="line.795"></a> +<span class="sourceLineNo">796</span> */<a name="line.796"></a> +<span class="sourceLineNo">797</span> public static String sha3_224Hex(final String data) {<a name="line.797"></a> +<span class="sourceLineNo">798</span> return Hex.encodeHexString(sha3_224(data));<a name="line.798"></a> +<span class="sourceLineNo">799</span> }<a name="line.799"></a> +<span class="sourceLineNo">800</span><a name="line.800"></a> +<span class="sourceLineNo">801</span> /**<a name="line.801"></a> +<span class="sourceLineNo">802</span> * Calculates the SHA3-256 digest and returns the value as a {@code byte[]}.<a name="line.802"></a> +<span class="sourceLineNo">803</span> *<a name="line.803"></a> +<span class="sourceLineNo">804</span> * @param data<a name="line.804"></a> +<span class="sourceLineNo">805</span> * Data to digest<a name="line.805"></a> +<span class="sourceLineNo">806</span> * @return SHA3-256 digest<a name="line.806"></a> +<span class="sourceLineNo">807</span> * @since 1.12<a name="line.807"></a> +<span class="sourceLineNo">808</span> */<a name="line.808"></a> +<span class="sourceLineNo">809</span> public static byte[] sha3_256(final byte[] data) {<a name="line.809"></a> +<span class="sourceLineNo">810</span> return getSha3_256Digest().digest(data);<a name="line.810"></a> +<span class="sourceLineNo">811</span> }<a name="line.811"></a> +<span class="sourceLineNo">812</span><a name="line.812"></a> +<span class="sourceLineNo">813</span> /**<a name="line.813"></a> +<span class="sourceLineNo">814</span> * Calculates the SHA3-256 digest and returns the value as a {@code byte[]}.<a name="line.814"></a> +<span class="sourceLineNo">815</span> *<a name="line.815"></a> +<span class="sourceLineNo">816</span> * @param data<a name="line.816"></a> +<span class="sourceLineNo">817</span> * Data to digest<a name="line.817"></a> +<span class="sourceLineNo">818</span> * @return SHA3-256 digest<a name="line.818"></a> +<span class="sourceLineNo">819</span> * @throws IOException<a name="line.819"></a> +<span class="sourceLineNo">820</span> * On error reading from the stream<a name="line.820"></a> +<span class="sourceLineNo">821</span> * @since 1.12<a name="line.821"></a> +<span class="sourceLineNo">822</span> */<a name="line.822"></a> +<span class="sourceLineNo">823</span> public static byte[] sha3_256(final InputStream data) throws IOException {<a name="line.823"></a> +<span class="sourceLineNo">824</span> return digest(getSha3_256Digest(), data);<a name="line.824"></a> +<span class="sourceLineNo">825</span> }<a name="line.825"></a> +<span class="sourceLineNo">826</span><a name="line.826"></a> +<span class="sourceLineNo">827</span> /**<a name="line.827"></a> +<span class="sourceLineNo">828</span> * Calculates the SHA3-256 digest and returns the value as a {@code byte[]}.<a name="line.828"></a> +<span class="sourceLineNo">829</span> *<a name="line.829"></a> +<span class="sourceLineNo">830</span> * @param data<a name="line.830"></a> +<span class="sourceLineNo">831</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.831"></a> +<span class="sourceLineNo">832</span> * @return SHA3-256 digest<a name="line.832"></a> +<span class="sourceLineNo">833</span> * @since 1.12<a name="line.833"></a> +<span class="sourceLineNo">834</span> */<a name="line.834"></a> +<span class="sourceLineNo">835</span> public static byte[] sha3_256(final String data) {<a name="line.835"></a> +<span class="sourceLineNo">836</span> return sha3_256(StringUtils.getBytesUtf8(data));<a name="line.836"></a> +<span class="sourceLineNo">837</span> }<a name="line.837"></a> +<span class="sourceLineNo">838</span><a name="line.838"></a> +<span class="sourceLineNo">839</span> /**<a name="line.839"></a> +<span class="sourceLineNo">840</span> * Calculates the SHA3-256 digest and returns the value as a hex string.<a name="line.840"></a> +<span class="sourceLineNo">841</span> *<a name="line.841"></a> +<span class="sourceLineNo">842</span> * @param data<a name="line.842"></a> +<span class="sourceLineNo">843</span> * Data to digest<a name="line.843"></a> +<span class="sourceLineNo">844</span> * @return SHA3-256 digest as a hex string<a name="line.844"></a> +<span class="sourceLineNo">845</span> * @since 1.12<a name="line.845"></a> +<span class="sourceLineNo">846</span> */<a name="line.846"></a> +<span class="sourceLineNo">847</span> public static String sha3_256Hex(final byte[] data) {<a name="line.847"></a> +<span class="sourceLineNo">848</span> return Hex.encodeHexString(sha3_256(data));<a name="line.848"></a> +<span class="sourceLineNo">849</span> }<a name="line.849"></a> +<span class="sourceLineNo">850</span><a name="line.850"></a> +<span class="sourceLineNo">851</span> /**<a name="line.851"></a> +<span class="sourceLineNo">852</span> * Calculates the SHA3-256 digest and returns the value as a hex string.<a name="line.852"></a> +<span class="sourceLineNo">853</span> *<a name="line.853"></a> +<span class="sourceLineNo">854</span> * @param data<a name="line.854"></a> +<span class="sourceLineNo">855</span> * Data to digest<a name="line.855"></a> +<span class="sourceLineNo">856</span> * @return SHA3-256 digest as a hex string<a name="line.856"></a> +<span class="sourceLineNo">857</span> * @throws IOException<a name="line.857"></a> +<span class="sourceLineNo">858</span> * On error reading from the stream<a name="line.858"></a> +<span class="sourceLineNo">859</span> * @since 1.12<a name="line.859"></a> +<span class="sourceLineNo">860</span> */<a name="line.860"></a> +<span class="sourceLineNo">861</span> public static String sha3_256Hex(final InputStream data) throws IOException {<a name="line.861"></a> +<span class="sourceLineNo">862</span> return Hex.encodeHexString(sha3_256(data));<a name="line.862"></a> +<span class="sourceLineNo">863</span> }<a name="line.863"></a> +<span class="sourceLineNo">864</span><a name="line.864"></a> +<span class="sourceLineNo">865</span> /**<a name="line.865"></a> +<span class="sourceLineNo">866</span> * Calculates the SHA3-256 digest and returns the value as a hex string.<a name="line.866"></a> +<span class="sourceLineNo">867</span> *<a name="line.867"></a> +<span class="sourceLineNo">868</span> * @param data<a name="line.868"></a> +<span class="sourceLineNo">869</span> * Data to digest<a name="line.869"></a> +<span class="sourceLineNo">870</span> * @return SHA3-256 digest as a hex string<a name="line.870"></a> +<span class="sourceLineNo">871</span> * @since 1.12<a name="line.871"></a> +<span class="sourceLineNo">872</span> */<a name="line.872"></a> +<span class="sourceLineNo">873</span> public static String sha3_256Hex(final String data) {<a name="line.873"></a> +<span class="sourceLineNo">874</span> return Hex.encodeHexString(sha3_256(data));<a name="line.874"></a> +<span class="sourceLineNo">875</span> }<a name="line.875"></a> +<span class="sourceLineNo">876</span><a name="line.876"></a> +<span class="sourceLineNo">877</span> /**<a name="line.877"></a> +<span class="sourceLineNo">878</span> * Calculates the SHA3-384 digest and returns the value as a {@code byte[]}.<a name="line.878"></a> +<span class="sourceLineNo">879</span> *<a name="line.879"></a> +<span class="sourceLineNo">880</span> * @param data<a name="line.880"></a> +<span class="sourceLineNo">881</span> * Data to digest<a name="line.881"></a> +<span class="sourceLineNo">882</span> * @return SHA3-384 digest<a name="line.882"></a> +<span class="sourceLineNo">883</span> * @since 1.12<a name="line.883"></a> +<span class="sourceLineNo">884</span> */<a name="line.884"></a> +<span class="sourceLineNo">885</span> public static byte[] sha3_384(final byte[] data) {<a name="line.885"></a> +<span class="sourceLineNo">886</span> return getSha3_384Digest().digest(data);<a name="line.886"></a> +<span class="sourceLineNo">887</span> }<a name="line.887"></a> +<span class="sourceLineNo">888</span><a name="line.888"></a> +<span class="sourceLineNo">889</span> /**<a name="line.889"></a> +<span class="sourceLineNo">890</span> * Calculates the SHA3-384 digest and returns the value as a {@code byte[]}.<a name="line.890"></a> +<span class="sourceLineNo">891</span> *<a name="line.891"></a> +<span class="sourceLineNo">892</span> * @param data<a name="line.892"></a> +<span class="sourceLineNo">893</span> * Data to digest<a name="line.893"></a> +<span class="sourceLineNo">894</span> * @return SHA3-384 digest<a name="line.894"></a> +<span class="sourceLineNo">895</span> * @throws IOException<a name="line.895"></a> +<span class="sourceLineNo">896</span> * On error reading from the stream<a name="line.896"></a> +<span class="sourceLineNo">897</span> * @since 1.12<a name="line.897"></a> +<span class="sourceLineNo">898</span> */<a name="line.898"></a> +<span class="sourceLineNo">899</span> public static byte[] sha3_384(final InputStream data) throws IOException {<a name="line.899"></a> +<span class="sourceLineNo">900</span> return digest(getSha3_384Digest(), data);<a name="line.900"></a> +<span class="sourceLineNo">901</span> }<a name="line.901"></a> +<span class="sourceLineNo">902</span><a name="line.902"></a> +<span class="sourceLineNo">903</span> /**<a name="line.903"></a> +<span class="sourceLineNo">904</span> * Calculates the SHA3-384 digest and returns the value as a {@code byte[]}.<a name="line.904"></a> +<span class="sourceLineNo">905</span> *<a name="line.905"></a> +<span class="sourceLineNo">906</span> * @param data<a name="line.906"></a> +<span class="sourceLineNo">907</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.907"></a> +<span class="sourceLineNo">908</span> * @return SHA3-384 digest<a name="line.908"></a> +<span class="sourceLineNo">909</span> * @since 1.12<a name="line.909"></a> +<span class="sourceLineNo">910</span> */<a name="line.910"></a> +<span class="sourceLineNo">911</span> public static byte[] sha3_384(final String data) {<a name="line.911"></a> +<span class="sourceLineNo">912</span> return sha3_384(StringUtils.getBytesUtf8(data));<a name="line.912"></a> +<span class="sourceLineNo">913</span> }<a name="line.913"></a> +<span class="sourceLineNo">914</span><a name="line.914"></a> +<span class="sourceLineNo">915</span> /**<a name="line.915"></a> +<span class="sourceLineNo">916</span> * Calculates the SHA3-384 digest and returns the value as a hex string.<a name="line.916"></a> +<span class="sourceLineNo">917</span> *<a name="line.917"></a> +<span class="sourceLineNo">918</span> * @param data<a name="line.918"></a> +<span class="sourceLineNo">919</span> * Data to digest<a name="line.919"></a> +<span class="sourceLineNo">920</span> * @return SHA3-384 digest as a hex string<a name="line.920"></a> +<span class="sourceLineNo">921</span> * @since 1.12<a name="line.921"></a> +<span class="sourceLineNo">922</span> */<a name="line.922"></a> +<span class="sourceLineNo">923</span> public static String sha3_384Hex(final byte[] data) {<a name="line.923"></a> +<span class="sourceLineNo">924</span> return Hex.encodeHexString(sha3_384(data));<a name="line.924"></a> +<span class="sourceLineNo">925</span> }<a name="line.925"></a> +<span class="sourceLineNo">926</span><a name="line.926"></a> +<span class="sourceLineNo">927</span> /**<a name="line.927"></a> +<span class="sourceLineNo">928</span> * Calculates the SHA3-384 digest and returns the value as a hex string.<a name="line.928"></a> +<span class="sourceLineNo">929</span> *<a name="line.929"></a> +<span class="sourceLineNo">930</span> * @param data<a name="line.930"></a> +<span class="sourceLineNo">931</span> * Data to digest<a name="line.931"></a> +<span class="sourceLineNo">932</span> * @return SHA3-384 digest as a hex string<a name="line.932"></a> +<span class="sourceLineNo">933</span> * @throws IOException<a name="line.933"></a> +<span class="sourceLineNo">934</span> * On error reading from the stream<a name="line.934"></a> +<span class="sourceLineNo">935</span> * @since 1.12<a name="line.935"></a> +<span class="sourceLineNo">936</span> */<a name="line.936"></a> +<span class="sourceLineNo">937</span> public static String sha3_384Hex(final InputStream data) throws IOException {<a name="line.937"></a> +<span class="sourceLineNo">938</span> return Hex.encodeHexString(sha3_384(data));<a name="line.938"></a> +<span class="sourceLineNo">939</span> }<a name="line.939"></a> +<span class="sourceLineNo">940</span><a name="line.940"></a> +<span class="sourceLineNo">941</span> /**<a name="line.941"></a> +<span class="sourceLineNo">942</span> * Calculates the SHA3-384 digest and returns the value as a hex string.<a name="line.942"></a> +<span class="sourceLineNo">943</span> *<a name="line.943"></a> +<span class="sourceLineNo">944</span> * @param data<a name="line.944"></a> +<span class="sourceLineNo">945</span> * Data to digest<a name="line.945"></a> +<span class="sourceLineNo">946</span> * @return SHA3-384 digest as a hex string<a name="line.946"></a> +<span class="sourceLineNo">947</span> * @since 1.12<a name="line.947"></a> +<span class="sourceLineNo">948</span> */<a name="line.948"></a> +<span class="sourceLineNo">949</span> public static String sha3_384Hex(final String data) {<a name="line.949"></a> +<span class="sourceLineNo">950</span> return Hex.encodeHexString(sha3_384(data));<a name="line.950"></a> +<span class="sourceLineNo">951</span> }<a name="line.951"></a> +<span class="sourceLineNo">952</span><a name="line.952"></a> +<span class="sourceLineNo">953</span> /**<a name="line.953"></a> +<span class="sourceLineNo">954</span> * Calculates the SHA3-512 digest and returns the value as a {@code byte[]}.<a name="line.954"></a> +<span class="sourceLineNo">955</span> *<a name="line.955"></a> +<span class="sourceLineNo">956</span> * @param data<a name="line.956"></a> +<span class="sourceLineNo">957</span> * Data to digest<a name="line.957"></a> +<span class="sourceLineNo">958</span> * @return SHA3-512 digest<a name="line.958"></a> +<span class="sourceLineNo">959</span> * @since 1.12<a name="line.959"></a> +<span class="sourceLineNo">960</span> */<a name="line.960"></a> +<span class="sourceLineNo">961</span> public static byte[] sha3_512(final byte[] data) {<a name="line.961"></a> +<span class="sourceLineNo">962</span> return getSha3_512Digest().digest(data);<a name="line.962"></a> +<span class="sourceLineNo">963</span> }<a name="line.963"></a> +<span class="sourceLineNo">964</span><a name="line.964"></a> +<span class="sourceLineNo">965</span> /**<a name="line.965"></a> +<span class="sourceLineNo">966</span> * Calculates the SHA3-512 digest and returns the value as a {@code byte[]}.<a name="line.966"></a> +<span class="sourceLineNo">967</span> *<a name="line.967"></a> +<span class="sourceLineNo">968</span> * @param data<a name="line.968"></a> +<span class="sourceLineNo">969</span> * Data to digest<a name="line.969"></a> +<span class="sourceLineNo">970</span> * @return SHA3-512 digest<a name="line.970"></a> +<span class="sourceLineNo">971</span> * @throws IOException<a name="line.971"></a> +<span class="sourceLineNo">972</span> * On error reading from the stream<a name="line.972"></a> +<span class="sourceLineNo">973</span> * @since 1.12<a name="line.973"></a> +<span class="sourceLineNo">974</span> */<a name="line.974"></a> +<span class="sourceLineNo">975</span> public static byte[] sha3_512(final InputStream data) throws IOException {<a name="line.975"></a> +<span class="sourceLineNo">976</span> return digest(getSha3_512Digest(), data);<a name="line.976"></a> +<span class="sourceLineNo">977</span> }<a name="line.977"></a> +<span class="sourceLineNo">978</span><a name="line.978"></a> +<span class="sourceLineNo">979</span> /**<a name="line.979"></a> +<span class="sourceLineNo">980</span> * Calculates the SHA3-512 digest and returns the value as a {@code byte[]}.<a name="line.980"></a> +<span class="sourceLineNo">981</span> *<a name="line.981"></a> +<span class="sourceLineNo">982</span> * @param data<a name="line.982"></a> +<span class="sourceLineNo">983</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.983"></a> +<span class="sourceLineNo">984</span> * @return SHA3-512 digest<a name="line.984"></a> +<span class="sourceLineNo">985</span> * @since 1.12<a name="line.985"></a> +<span class="sourceLineNo">986</span> */<a name="line.986"></a> +<span class="sourceLineNo">987</span> public static byte[] sha3_512(final String data) {<a name="line.987"></a> +<span class="sourceLineNo">988</span> return sha3_512(StringUtils.getBytesUtf8(data));<a name="line.988"></a> +<span class="sourceLineNo">989</span> }<a name="line.989"></a> +<span class="sourceLineNo">990</span><a name="line.990"></a> +<span class="sourceLineNo">991</span> /**<a name="line.991"></a> +<span class="sourceLineNo">992</span> * Calculates the SHA3-512 digest and returns the value as a hex string.<a name="line.992"></a> +<span class="sourceLineNo">993</span> *<a name="line.993"></a> +<span class="sourceLineNo">994</span> * @param data<a name="line.994"></a> +<span class="sourceLineNo">995</span> * Data to digest<a name="line.995"></a> +<span class="sourceLineNo">996</span> * @return SHA3-512 digest as a hex string<a name="line.996"></a> +<span class="sourceLineNo">997</span> * @since 1.12<a name="line.997"></a> +<span class="sourceLineNo">998</span> */<a name="line.998"></a> +<span class="sourceLineNo">999</span> public static String sha3_512Hex(final byte[] data) {<a name="line.999"></a> +<span class="sourceLineNo">1000</span> return Hex.encodeHexString(sha3_512(data));<a name="line.1000"></a> +<span class="sourceLineNo">1001</span> }<a name="line.1001"></a> +<span class="sourceLineNo">1002</span><a name="line.1002"></a> +<span class="sourceLineNo">1003</span> /**<a name="line.1003"></a> +<span class="sourceLineNo">1004</span> * Calculates the SHA3-512 digest and returns the value as a hex string.<a name="line.1004"></a> +<span class="sourceLineNo">1005</span> *<a name="line.1005"></a> +<span class="sourceLineNo">1006</span> * @param data<a name="line.1006"></a> +<span class="sourceLineNo">1007</span> * Data to digest<a name="line.1007"></a> +<span class="sourceLineNo">1008</span> * @return SHA3-512 digest as a hex string<a name="line.1008"></a> +<span class="sourceLineNo">1009</span> * @throws IOException<a name="line.1009"></a> +<span class="sourceLineNo">1010</span> * On error reading from the stream<a name="line.1010"></a> +<span class="sourceLineNo">1011</span> * @since 1.12<a name="line.1011"></a> +<span class="sourceLineNo">1012</span> */<a name="line.1012"></a> +<span class="sourceLineNo">1013</span> public static String sha3_512Hex(final InputStream data) throws IOException {<a name="line.1013"></a> +<span class="sourceLineNo">1014</span> return Hex.encodeHexString(sha3_512(data));<a name="line.1014"></a> +<span class="sourceLineNo">1015</span> }<a name="line.1015"></a> +<span class="sourceLineNo">1016</span><a name="line.1016"></a> +<span class="sourceLineNo">1017</span> /**<a name="line.1017"></a> +<span class="sourceLineNo">1018</span> * Calculates the SHA3-512 digest and returns the value as a hex string.<a name="line.1018"></a> +<span class="sourceLineNo">1019</span> *<a name="line.1019"></a> +<span class="sourceLineNo">1020</span> * @param data<a name="line.1020"></a> +<span class="sourceLineNo">1021</span> * Data to digest<a name="line.1021"></a> +<span class="sourceLineNo">1022</span> * @return SHA3-512 digest as a hex string<a name="line.1022"></a> +<span class="sourceLineNo">1023</span> * @since 1.12<a name="line.1023"></a> +<span class="sourceLineNo">1024</span> */<a name="line.1024"></a> +<span class="sourceLineNo">1025</span> public static String sha3_512Hex(final String data) {<a name="line.1025"></a> +<span class="sourceLineNo">1026</span> return Hex.encodeHexString(sha3_512(data));<a name="line.1026"></a> +<span class="sourceLineNo">1027</span> }<a name="line.1027"></a> +<span class="sourceLineNo">1028</span><a name="line.1028"></a> +<span class="sourceLineNo">1029</span> /**<a name="line.1029"></a> +<span class="sourceLineNo">1030</span> * Calculates the SHA-384 digest and returns the value as a {@code byte[]}.<a name="line.1030"></a> +<span class="sourceLineNo">1031</span> *<a name="line.1031"></a> +<span class="sourceLineNo">1032</span> * @param data<a name="line.1032"></a> +<span class="sourceLineNo">1033</span> * Data to digest<a name="line.1033"></a> +<span class="sourceLineNo">1034</span> * @return SHA-384 digest<a name="line.1034"></a> +<span class="sourceLineNo">1035</span> * @since 1.4<a name="line.1035"></a> +<span class="sourceLineNo">1036</span> */<a name="line.1036"></a> +<span class="sourceLineNo">1037</span> public static byte[] sha384(final byte[] data) {<a name="line.1037"></a> +<span class="sourceLineNo">1038</span> return getSha384Digest().digest(data);<a name="line.1038"></a> +<span class="sourceLineNo">1039</span> }<a name="line.1039"></a> +<span class="sourceLineNo">1040</span><a name="line.1040"></a> +<span class="sourceLineNo">1041</span> /**<a name="line.1041"></a> +<span class="sourceLineNo">1042</span> * Calculates the SHA-384 digest and returns the value as a {@code byte[]}.<a name="line.1042"></a> +<span class="sourceLineNo">1043</span> *<a name="line.1043"></a> +<span class="sourceLineNo">1044</span> * @param data<a name="line.1044"></a> +<span class="sourceLineNo">1045</span> * Data to digest<a name="line.1045"></a> +<span class="sourceLineNo">1046</span> * @return SHA-384 digest<a name="line.1046"></a> +<span class="sourceLineNo">1047</span> * @throws IOException<a name="line.1047"></a> +<span class="sourceLineNo">1048</span> * On error reading from the stream<a name="line.1048"></a> +<span class="sourceLineNo">1049</span> * @since 1.4<a name="line.1049"></a> +<span class="sourceLineNo">1050</span> */<a name="line.1050"></a> +<span class="sourceLineNo">1051</span> public static byte[] sha384(final InputStream data) throws IOException {<a name="line.1051"></a> +<span class="sourceLineNo">1052</span> return digest(getSha384Digest(), data);<a name="line.1052"></a> +<span class="sourceLineNo">1053</span> }<a name="line.1053"></a> +<span class="sourceLineNo">1054</span><a name="line.1054"></a> +<span class="sourceLineNo">1055</span> /**<a name="line.1055"></a> +<span class="sourceLineNo">1056</span> * Calculates the SHA-384 digest and returns the value as a {@code byte[]}.<a name="line.1056"></a> +<span class="sourceLineNo">1057</span> *<a name="line.1057"></a> +<span class="sourceLineNo">1058</span> * @param data<a name="line.1058"></a> +<span class="sourceLineNo">1059</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.1059"></a> +<span class="sourceLineNo">1060</span> * @return SHA-384 digest<a name="line.1060"></a> +<span class="sourceLineNo">1061</span> * @since 1.4<a name="line.1061"></a> +<span class="sourceLineNo">1062</span> */<a name="line.1062"></a> +<span class="sourceLineNo">1063</span> public static byte[] sha384(final String data) {<a name="line.1063"></a> +<span class="sourceLineNo">1064</span> return sha384(StringUtils.getBytesUtf8(data));<a name="line.1064"></a> +<span class="sourceLineNo">1065</span> }<a name="line.1065"></a> +<span class="sourceLineNo">1066</span><a name="line.1066"></a> +<span class="sourceLineNo">1067</span> /**<a name="line.1067"></a> +<span class="sourceLineNo">1068</span> * Calculates the SHA-384 digest and returns the value as a hex string.<a name="line.1068"></a> +<span class="sourceLineNo">1069</span> *<a name="line.1069"></a> +<span class="sourceLineNo">1070</span> * @param data<a name="line.1070"></a> +<span class="sourceLineNo">1071</span> * Data to digest<a name="line.1071"></a> +<span class="sourceLineNo">1072</span> * @return SHA-384 digest as a hex string<a name="line.1072"></a> +<span class="sourceLineNo">1073</span> * @since 1.4<a name="line.1073"></a> +<span class="sourceLineNo">1074</span> */<a name="line.1074"></a> +<span class="sourceLineNo">1075</span> public static String sha384Hex(final byte[] data) {<a name="line.1075"></a> +<span class="sourceLineNo">1076</span> return Hex.encodeHexString(sha384(data));<a name="line.1076"></a> +<span class="sourceLineNo">1077</span> }<a name="line.1077"></a> +<span class="sourceLineNo">1078</span><a name="line.1078"></a> +<span class="sourceLineNo">1079</span> /**<a name="line.1079"></a> +<span class="sourceLineNo">1080</span> * Calculates the SHA-384 digest and returns the value as a hex string.<a name="line.1080"></a> +<span class="sourceLineNo">1081</span> *<a name="line.1081"></a> +<span class="sourceLineNo">1082</span> * @param data<a name="line.1082"></a> +<span class="sourceLineNo">1083</span> * Data to digest<a name="line.1083"></a> +<span class="sourceLineNo">1084</span> * @return SHA-384 digest as a hex string<a name="line.1084"></a> +<span class="sourceLineNo">1085</span> * @throws IOException<a name="line.1085"></a> +<span class="sourceLineNo">1086</span> * On error reading from the stream<a name="line.1086"></a> +<span class="sourceLineNo">1087</span> * @since 1.4<a name="line.1087"></a> +<span class="sourceLineNo">1088</span> */<a name="line.1088"></a> +<span class="sourceLineNo">1089</span> public static String sha384Hex(final InputStream data) throws IOException {<a name="line.1089"></a> +<span class="sourceLineNo">1090</span> return Hex.encodeHexString(sha384(data));<a name="line.1090"></a> +<span class="sourceLineNo">1091</span> }<a name="line.1091"></a> +<span class="sourceLineNo">1092</span><a name="line.1092"></a> +<span class="sourceLineNo">1093</span> /**<a name="line.1093"></a> +<span class="sourceLineNo">1094</span> * Calculates the SHA-384 digest and returns the value as a hex string.<a name="line.1094"></a> +<span class="sourceLineNo">1095</span> *<a name="line.1095"></a> +<span class="sourceLineNo">1096</span> * @param data<a name="line.1096"></a> +<span class="sourceLineNo">1097</span> * Data to digest<a name="line.1097"></a> +<span class="sourceLineNo">1098</span> * @return SHA-384 digest as a hex string<a name="line.1098"></a> +<span class="sourceLineNo">1099</span> * @since 1.4<a name="line.1099"></a> +<span class="sourceLineNo">1100</span> */<a name="line.1100"></a> +<span class="sourceLineNo">1101</span> public static String sha384Hex(final String data) {<a name="line.1101"></a> +<span class="sourceLineNo">1102</span> return Hex.encodeHexString(sha384(data));<a name="line.1102"></a> +<span class="sourceLineNo">1103</span> }<a name="line.1103"></a> +<span class="sourceLineNo">1104</span><a name="line.1104"></a> +<span class="sourceLineNo">1105</span> /**<a name="line.1105"></a> +<span class="sourceLineNo">1106</span> * Calculates the SHA-512 digest and returns the value as a {@code byte[]}.<a name="line.1106"></a> +<span class="sourceLineNo">1107</span> *<a name="line.1107"></a> +<span class="sourceLineNo">1108</span> * @param data<a name="line.1108"></a> +<span class="sourceLineNo">1109</span> * Data to digest<a name="line.1109"></a> +<span class="sourceLineNo">1110</span> * @return SHA-512 digest<a name="line.1110"></a> +<span class="sourceLineNo">1111</span> * @since 1.4<a name="line.1111"></a> +<span class="sourceLineNo">1112</span> */<a name="line.1112"></a> +<span class="sourceLineNo">1113</span> public static byte[] sha512(final byte[] data) {<a name="line.1113"></a> +<span class="sourceLineNo">1114</span> return getSha512Digest().digest(data);<a name="line.1114"></a> +<span class="sourceLineNo">1115</span> }<a name="line.1115"></a> +<span class="sourceLineNo">1116</span><a name="line.1116"></a> +<span class="sourceLineNo">1117</span> /**<a name="line.1117"></a> +<span class="sourceLineNo">1118</span> * Calculates the SHA-512 digest and returns the value as a {@code byte[]}.<a name="line.1118"></a> +<span class="sourceLineNo">1119</span> *<a name="line.1119"></a> +<span class="sourceLineNo">1120</span> * @param data<a name="line.1120"></a> +<span class="sourceLineNo">1121</span> * Data to digest<a name="line.1121"></a> +<span class="sourceLineNo">1122</span> * @return SHA-512 digest<a name="line.1122"></a> +<span class="sourceLineNo">1123</span> * @throws IOException<a name="line.1123"></a> +<span class="sourceLineNo">1124</span> * On error reading from the stream<a name="line.1124"></a> +<span class="sourceLineNo">1125</span> * @since 1.4<a name="line.1125"></a> +<span class="sourceLineNo">1126</span> */<a name="line.1126"></a> +<span class="sourceLineNo">1127</span> public static byte[] sha512(final InputStream data) throws IOException {<a name="line.1127"></a> +<span class="sourceLineNo">1128</span> return digest(getSha512Digest(), data);<a name="line.1128"></a> +<span class="sourceLineNo">1129</span> }<a name="line.1129"></a> +<span class="sourceLineNo">1130</span><a name="line.1130"></a> +<span class="sourceLineNo">1131</span> /**<a name="line.1131"></a> +<span class="sourceLineNo">1132</span> * Calculates the SHA-512 digest and returns the value as a {@code byte[]}.<a name="line.1132"></a> +<span class="sourceLineNo">1133</span> *<a name="line.1133"></a> +<span class="sourceLineNo">1134</span> * @param data<a name="line.1134"></a> +<span class="sourceLineNo">1135</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.1135"></a> +<span class="sourceLineNo">1136</span> * @return SHA-512 digest<a name="line.1136"></a> +<span class="sourceLineNo">1137</span> * @since 1.4<a name="line.1137"></a> +<span class="sourceLineNo">1138</span> */<a name="line.1138"></a> +<span class="sourceLineNo">1139</span> public static byte[] sha512(final String data) {<a name="line.1139"></a> +<span class="sourceLineNo">1140</span> return sha512(StringUtils.getBytesUtf8(data));<a name="line.1140"></a> +<span class="sourceLineNo">1141</span> }<a name="line.1141"></a> +<span class="sourceLineNo">1142</span><a name="line.1142"></a> +<span class="sourceLineNo">1143</span> /**<a name="line.1143"></a> +<span class="sourceLineNo">1144</span> * Calculates the SHA-512/224 digest and returns the value as a {@code byte[]}.<a name="line.1144"></a> +<span class="sourceLineNo">1145</span> *<a name="line.1145"></a> +<span class="sourceLineNo">1146</span> * @param data<a name="line.1146"></a> +<span class="sourceLineNo">1147</span> * Data to digest<a name="line.1147"></a> +<span class="sourceLineNo">1148</span> * @return SHA-512/224 digest<a name="line.1148"></a> +<span class="sourceLineNo">1149</span> * @since 1.14<a name="line.1149"></a> +<span class="sourceLineNo">1150</span> */<a name="line.1150"></a> +<span class="sourceLineNo">1151</span> public static byte[] sha512_224(final byte[] data) {<a name="line.1151"></a> +<span class="sourceLineNo">1152</span> return getSha512_224Digest().digest(data);<a name="line.1152"></a> +<span class="sourceLineNo">1153</span> }<a name="line.1153"></a> +<span class="sourceLineNo">1154</span><a name="line.1154"></a> +<span class="sourceLineNo">1155</span> /**<a name="line.1155"></a> +<span class="sourceLineNo">1156</span> * Calculates the SHA-512/224 digest and returns the value as a {@code byte[]}.<a name="line.1156"></a> +<span class="sourceLineNo">1157</span> *<a name="line.1157"></a> +<span class="sourceLineNo">1158</span> * @param data<a name="line.1158"></a> +<span class="sourceLineNo">1159</span> * Data to digest<a name="line.1159"></a> +<span class="sourceLineNo">1160</span> * @return SHA-512/224 digest<a name="line.1160"></a> +<span class="sourceLineNo">1161</span> * @throws IOException<a name="line.1161"></a> +<span class="sourceLineNo">1162</span> * On error reading from the stream<a name="line.1162"></a> +<span class="sourceLineNo">1163</span> * @since 1.14<a name="line.1163"></a> +<span class="sourceLineNo">1164</span> */<a name="line.1164"></a> +<span class="sourceLineNo">1165</span> public static byte[] sha512_224(final InputStream data) throws IOException {<a name="line.1165"></a> +<span class="sourceLineNo">1166</span> return digest(getSha512_224Digest(), data);<a name="line.1166"></a> +<span class="sourceLineNo">1167</span> }<a name="line.1167"></a> +<span class="sourceLineNo">1168</span><a name="line.1168"></a> +<span class="sourceLineNo">1169</span> /**<a name="line.1169"></a> +<span class="sourceLineNo">1170</span> * Calculates the SHA-512/224 digest and returns the value as a {@code byte[]}.<a name="line.1170"></a> +<span class="sourceLineNo">1171</span> *<a name="line.1171"></a> +<span class="sourceLineNo">1172</span> * @param data<a name="line.1172"></a> +<span class="sourceLineNo">1173</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.1173"></a> +<span class="sourceLineNo">1174</span> * @return SHA-512/224 digest<a name="line.1174"></a> +<span class="sourceLineNo">1175</span> * @since 1.14<a name="line.1175"></a> +<span class="sourceLineNo">1176</span> */<a name="line.1176"></a> +<span class="sourceLineNo">1177</span> public static byte[] sha512_224(final String data) {<a name="line.1177"></a> +<span class="sourceLineNo">1178</span> return sha512_224(StringUtils.getBytesUtf8(data));<a name="line.1178"></a> +<span class="sourceLineNo">1179</span> }<a name="line.1179"></a> +<span class="sourceLineNo">1180</span><a name="line.1180"></a> +<span class="sourceLineNo">1181</span> /**<a name="line.1181"></a> +<span class="sourceLineNo">1182</span> * Calculates the SHA-512/224 digest and returns the value as a hex string.<a name="line.1182"></a> +<span class="sourceLineNo">1183</span> *<a name="line.1183"></a> +<span class="sourceLineNo">1184</span> * @param data<a name="line.1184"></a> +<span class="sourceLineNo">1185</span> * Data to digest<a name="line.1185"></a> +<span class="sourceLineNo">1186</span> * @return SHA-512/224 digest as a hex string<a name="line.1186"></a> +<span class="sourceLineNo">1187</span> * @since 1.14<a name="line.1187"></a> +<span class="sourceLineNo">1188</span> */<a name="line.1188"></a> +<span class="sourceLineNo">1189</span> public static String sha512_224Hex(final byte[] data) {<a name="line.1189"></a> +<span class="sourceLineNo">1190</span> return Hex.encodeHexString(sha512_224(data));<a name="line.1190"></a> +<span class="sourceLineNo">1191</span> }<a name="line.1191"></a> +<span class="sourceLineNo">1192</span><a name="line.1192"></a> +<span class="sourceLineNo">1193</span> /**<a name="line.1193"></a> +<span class="sourceLineNo">1194</span> * Calculates the SHA-512/224 digest and returns the value as a hex string.<a name="line.1194"></a> +<span class="sourceLineNo">1195</span> *<a name="line.1195"></a> +<span class="sourceLineNo">1196</span> * @param data<a name="line.1196"></a> +<span class="sourceLineNo">1197</span> * Data to digest<a name="line.1197"></a> +<span class="sourceLineNo">1198</span> * @return SHA-512/224 digest as a hex string<a name="line.1198"></a> +<span class="sourceLineNo">1199</span> * @throws IOException<a name="line.1199"></a> +<span class="sourceLineNo">1200</span> * On error reading from the stream<a name="line.1200"></a> +<span class="sourceLineNo">1201</span> * @since 1.14<a name="line.1201"></a> +<span class="sourceLineNo">1202</span> */<a name="line.1202"></a> +<span class="sourceLineNo">1203</span> public static String sha512_224Hex(final InputStream data) throws IOException {<a name="line.1203"></a> +<span class="sourceLineNo">1204</span> return Hex.encodeHexString(sha512_224(data));<a name="line.1204"></a> +<span class="sourceLineNo">1205</span> }<a name="line.1205"></a> +<span class="sourceLineNo">1206</span><a name="line.1206"></a> +<span class="sourceLineNo">1207</span> /**<a name="line.1207"></a> +<span class="sourceLineNo">1208</span> * Calculates the SHA-512/224 digest and returns the value as a hex string.<a name="line.1208"></a> +<span class="sourceLineNo">1209</span> *<a name="line.1209"></a> +<span class="sourceLineNo">1210</span> * @param data<a name="line.1210"></a> +<span class="sourceLineNo">1211</span> * Data to digest<a name="line.1211"></a> +<span class="sourceLineNo">1212</span> * @return SHA-512/224 digest as a hex string<a name="line.1212"></a> +<span class="sourceLineNo">1213</span> * @since 1.14<a name="line.1213"></a> +<span class="sourceLineNo">1214</span> */<a name="line.1214"></a> +<span class="sourceLineNo">1215</span> public static String sha512_224Hex(final String data) {<a name="line.1215"></a> +<span class="sourceLineNo">1216</span> return Hex.encodeHexString(sha512_224(data));<a name="line.1216"></a> +<span class="sourceLineNo">1217</span> }<a name="line.1217"></a> +<span class="sourceLineNo">1218</span><a name="line.1218"></a> +<span class="sourceLineNo">1219</span> /**<a name="line.1219"></a> +<span class="sourceLineNo">1220</span> * Calculates the SHA-512/256 digest and returns the value as a {@code byte[]}.<a name="line.1220"></a> +<span class="sourceLineNo">1221</span> *<a name="line.1221"></a> +<span class="sourceLineNo">1222</span> * @param data<a name="line.1222"></a> +<span class="sourceLineNo">1223</span> * Data to digest<a name="line.1223"></a> +<span class="sourceLineNo">1224</span> * @return SHA-512/256 digest<a name="line.1224"></a> +<span class="sourceLineNo">1225</span> * @since 1.14<a name="line.1225"></a> +<span class="sourceLineNo">1226</span> */<a name="line.1226"></a> +<span class="sourceLineNo">1227</span> public static byte[] sha512_256(final byte[] data) {<a name="line.1227"></a> +<span class="sourceLineNo">1228</span> return getSha512_256Digest().digest(data);<a name="line.1228"></a> +<span class="sourceLineNo">1229</span> }<a name="line.1229"></a> +<span class="sourceLineNo">1230</span><a name="line.1230"></a> +<span class="sourceLineNo">1231</span> /**<a name="line.1231"></a> +<span class="sourceLineNo">1232</span> * Calculates the SHA-512/256 digest and returns the value as a {@code byte[]}.<a name="line.1232"></a> +<span class="sourceLineNo">1233</span> *<a name="line.1233"></a> +<span class="sourceLineNo">1234</span> * @param data<a name="line.1234"></a> +<span class="sourceLineNo">1235</span> * Data to digest<a name="line.1235"></a> +<span class="sourceLineNo">1236</span> * @return SHA-512/256 digest<a name="line.1236"></a> +<span class="sourceLineNo">1237</span> * @throws IOException<a name="line.1237"></a> +<span class="sourceLineNo">1238</span> * On error reading from the stream<a name="line.1238"></a> +<span class="sourceLineNo">1239</span> * @since 1.14<a name="line.1239"></a> +<span class="sourceLineNo">1240</span> */<a name="line.1240"></a> +<span class="sourceLineNo">1241</span> public static byte[] sha512_256(final InputStream data) throws IOException {<a name="line.1241"></a> +<span class="sourceLineNo">1242</span> return digest(getSha512_256Digest(), data);<a name="line.1242"></a> +<span class="sourceLineNo">1243</span> }<a name="line.1243"></a> +<span class="sourceLineNo">1244</span><a name="line.1244"></a> +<span class="sourceLineNo">1245</span> /**<a name="line.1245"></a> +<span class="sourceLineNo">1246</span> * Calculates the SHA-512/256 digest and returns the value as a {@code byte[]}.<a name="line.1246"></a> +<span class="sourceLineNo">1247</span> *<a name="line.1247"></a> +<span class="sourceLineNo">1248</span> * @param data<a name="line.1248"></a> +<span class="sourceLineNo">1249</span> * Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.1249"></a> +<span class="sourceLineNo">1250</span> * @return SHA-512/224 digest<a name="line.1250"></a> +<span class="sourceLineNo">1251</span> * @since 1.14<a name="line.1251"></a> +<span class="sourceLineNo">1252</span> */<a name="line.1252"></a> +<span class="sourceLineNo">1253</span> public static byte[] sha512_256(final String data) {<a name="line.1253"></a> +<span class="sourceLineNo">1254</span> return sha512_256(StringUtils.getBytesUtf8(data));<a name="line.1254"></a> +<span class="sourceLineNo">1255</span> }<a name="line.1255"></a> +<span class="sourceLineNo">1256</span><a name="line.1256"></a> +<span class="sourceLineNo">1257</span> /**<a name="line.1257"></a> +<span class="sourceLineNo">1258</span> * Calculates the SHA-512/256 digest and returns the value as a hex string.<a name="line.1258"></a> +<span class="sourceLineNo">1259</span> *<a name="line.1259"></a> +<span class="sourceLineNo">1260</span> * @param data<a name="line.1260"></a> +<span class="sourceLineNo">1261</span> * Data to digest<a name="line.1261"></a> +<span class="sourceLineNo">1262</span> * @return SHA-512/256 digest as a hex string<a name="line.1262"></a> +<span class="sourceLineNo">1263</span> * @since 1.14<a name="line.1263"></a> +<span class="sourceLineNo">1264</span> */<a name="line.1264"></a> +<span class="sourceLineNo">1265</span> public static String sha512_256Hex(final byte[] data) {<a name="line.1265"></a> +<span class="sourceLineNo">1266</span> return Hex.encodeHexString(sha512_256(data));<a name="line.1266"></a> +<span class="sourceLineNo">1267</span> }<a name="line.1267"></a> +<span class="sourceLineNo">1268</span><a name="line.1268"></a> +<span class="sourceLineNo">1269</span> /**<a name="line.1269"></a> +<span class="sourceLineNo">1270</span> * Calculates the SHA-512/256 digest and returns the value as a hex string.<a name="line.1270"></a> +<span class="sourceLineNo">1271</span> *<a name="line.1271"></a> +<span class="sourceLineNo">1272</span> * @param data<a name="line.1272"></a> +<span class="sourceLineNo">1273</span> * Data to digest<a name="line.1273"></a> +<span class="sourceLineNo">1274</span> * @return SHA-512/256 digest as a hex string<a name="line.1274"></a> +<span class="sourceLineNo">1275</span> * @throws IOException<a name="line.1275"></a> +<span class="sourceLineNo">1276</span> * On error reading from the stream<a name="line.1276"></a> +<span class="sourceLineNo">1277</span> * @since 1.14<a name="line.1277"></a> +<span class="sourceLineNo">1278</span> */<a name="line.1278"></a> +<span class="sourceLineNo">1279</span> public static String sha512_256Hex(final InputStream data) throws IOException {<a name="line.1279"></a> +<span class="sourceLineNo">1280</span> return Hex.encodeHexString(sha512_256(data));<a name="line.1280"></a> +<span class="sourceLineNo">1281</span> }<a name="line.1281"></a> +<span class="sourceLineNo">1282</span><a name="line.1282"></a> +<span class="sourceLineNo">1283</span> /**<a name="line.1283"></a> +<span class="sourceLineNo">1284</span> * Calculates the SHA-512/256 digest and returns the value as a hex string.<a name="line.1284"></a> +<span class="sourceLineNo">1285</span> *<a name="line.1285"></a> +<span class="sourceLineNo">1286</span> * @param data<a name="line.1286"></a> +<span class="sourceLineNo">1287</span> * Data to digest<a name="line.1287"></a> +<span class="sourceLineNo">1288</span> * @return SHA-512/256 digest as a hex string<a name="line.1288"></a> +<span class="sourceLineNo">1289</span> * @since 1.14<a name="line.1289"></a> +<span class="sourceLineNo">1290</span> */<a name="line.1290"></a> +<span class="sourceLineNo">1291</span> public static String sha512_256Hex(final String data) {<a name="line.1291"></a> +<span class="sourceLineNo">1292</span> return Hex.encodeHexString(sha512_256(data));<a name="line.1292"></a> +<span class="sourceLineNo">1293</span> }<a name="line.1293"></a> +<span class="sourceLineNo">1294</span><a name="line.1294"></a> +<span class="sourceLineNo">1295</span> /**<a name="line.1295"></a> +<span class="sourceLineNo">1296</span> * Calculates the SHA-512 digest and returns the value as a hex string.<a name="line.1296"></a> +<span class="sourceLineNo">1297</span> *<a name="line.1297"></a> +<span class="sourceLineNo">1298</span> * @param data<a name="line.1298"></a> +<span class="sourceLineNo">1299</span> * Data to digest<a name="line.1299"></a> +<span class="sourceLineNo">1300</span> * @return SHA-512 digest as a hex string<a name="line.1300"></a> +<span class="sourceLineNo">1301</span> * @since 1.4<a name="line.1301"></a> +<span class="sourceLineNo">1302</span> */<a name="line.1302"></a> +<span class="sourceLineNo">1303</span> public static String sha512Hex(final byte[] data) {<a name="line.1303"></a> +<span class="sourceLineNo">1304</span> return Hex.encodeHexString(sha512(data));<a name="line.1304"></a> +<span class="sourceLineNo">1305</span> }<a name="line.1305"></a> +<span class="sourceLineNo">1306</span><a name="line.1306"></a> +<span class="sourceLineNo">1307</span> /**<a name="line.1307"></a> +<span class="sourceLineNo">1308</span> * Calculates the SHA-512 digest and returns the value as a hex string.<a name="line.1308"></a> +<span class="sourceLineNo">1309</span> *<a name="line.1309"></a> +<span class="sourceLineNo">1310</span> * @param data<a name="line.1310"></a> +<span class="sourceLineNo">1311</span> * Data to digest<a name="line.1311"></a> +<span class="sourceLineNo">1312</span> * @return SHA-512 digest as a hex string<a name="line.1312"></a> +<span class="sourceLineNo">1313</span> * @throws IOException<a name="line.1313"></a> +<span class="sourceLineNo">1314</span> * On error reading from the stream<a name="line.1314"></a> +<span class="sourceLineNo">1315</span> * @since 1.4<a name="line.1315"></a> +<span class="sourceLineNo">1316</span> */<a name="line.1316"></a> +<span class="sourceLineNo">1317</span> public static String sha512Hex(final InputStream data) throws IOException {<a name="line.1317"></a> +<span class="sourceLineNo">1318</span> return Hex.encodeHexString(sha512(data));<a name="line.1318"></a> +<span class="sourceLineNo">1319</span> }<a name="line.1319"></a> +<span class="sourceLineNo">1320</span><a name="line.1320"></a> +<span class="sourceLineNo">1321</span> /**<a name="line.1321"></a> +<span class="sourceLineNo">1322</span> * Calculates the SHA-512 digest and returns the value as a hex string.<a name="line.1322"></a> +<span class="sourceLineNo">1323</span> *<a name="line.1323"></a> +<span class="sourceLineNo">1324</span> * @param data<a name="line.1324"></a> +<span class="sourceLineNo">1325</span> * Data to digest<a name="line.1325"></a> +<span class="sourceLineNo">1326</span> * @return SHA-512 digest as a hex string<a name="line.1326"></a> +<span class="sourceLineNo">1327</span> * @since 1.4<a name="line.1327"></a> +<span class="sourceLineNo">1328</span> */<a name="line.1328"></a> +<span class="sourceLineNo">1329</span> public static String sha512Hex(final String data) {<a name="line.1329"></a> +<span class="sourceLineNo">1330</span> return Hex.encodeHexString(sha512(data));<a name="line.1330"></a> +<span class="sourceLineNo">1331</span> }<a name="line.1331"></a> +<span class="sourceLineNo">1332</span><a name="line.1332"></a> +<span class="sourceLineNo">1333</span> /**<a name="line.1333"></a> +<span class="sourceLineNo">1334</span> * Calculates the SHA-1 digest and returns the value as a hex string.<a name="line.1334"></a> +<span class="sourceLineNo">1335</span> *<a name="line.1335"></a> +<span class="sourceLineNo">1336</span> * @param data<a name="line.1336"></a> +<span class="sourceLineNo">1337</span> * Data to digest<a name="line.1337"></a> +<span class="sourceLineNo">1338</span> * @return SHA-1 digest as a hex string<a name="line.1338"></a> +<span class="sourceLineNo">1339</span> * @deprecated (1.11) Use {@link #sha1Hex(byte[])}<a name="line.1339"></a> +<span class="sourceLineNo">1340</span> */<a name="line.1340"></a> +<span class="sourceLineNo">1341</span> @Deprecated<a name="line.1341"></a> +<span class="sourceLineNo">1342</span> public static String shaHex(final byte[] data) {<a name="line.1342"></a> +<span class="sourceLineNo">1343</span> return sha1Hex(data);<a name="line.1343"></a> +<span class="sourceLineNo">1344</span> }<a name="line.1344"></a> +<span class="sourceLineNo">1345</span><a name="line.1345"></a> +<span class="sourceLineNo">1346</span> /**<a name="line.1346"></a> +<span class="sourceLineNo">1347</span> * Calculates the SHA-1 digest and returns the value as a hex string.<a name="line.1347"></a> +<span class="sourceLineNo">1348</span> *<a name="line.1348"></a> +<span class="sourceLineNo">1349</span> * @param data<a name="line.1349"></a> +<span class="sourceLineNo">1350</span> * Data to digest<a name="line.1350"></a> +<span class="sourceLineNo">1351</span> * @return SHA-1 digest as a hex string<a name="line.1351"></a> +<span class="sourceLineNo">1352</span> * @throws IOException<a name="line.1352"></a> +<span class="sourceLineNo">1353</span> * On error reading from the stream<a name="line.1353"></a> +<span class="sourceLineNo">1354</span> * @since 1.4<a name="line.1354"></a> +<span class="sourceLineNo">1355</span> * @deprecated (1.11) Use {@link #sha1Hex(InputStream)}<a name="line.1355"></a> +<span class="sourceLineNo">1356</span> */<a name="line.1356"></a> +<span class="sourceLineNo">1357</span> @Deprecated<a name="line.1357"></a> +<span class="sourceLineNo">1358</span> public static String shaHex(final InputStream data) throws IOException {<a name="line.1358"></a> +<span class="sourceLineNo">1359</span> return sha1Hex(data);<a name="line.1359"></a> +<span class="sourceLineNo">1360</span> }<a name="line.1360"></a> +<span class="sourceLineNo">1361</span><a name="line.1361"></a> +<span class="sourceLineNo">1362</span> /**<a name="line.1362"></a> +<span class="sourceLineNo">1363</span> * Calculates the SHA-1 digest and returns the value as a hex string.<a name="line.1363"></a> +<span class="sourceLineNo">1364</span> *<a name="line.1364"></a> +<span class="sourceLineNo">1365</span> * @param data<a name="line.1365"></a> +<span class="sourceLineNo">1366</span> * Data to digest<a name="line.1366"></a> +<span class="sourceLineNo">1367</span> * @return SHA-1 digest as a hex string<a name="line.1367"></a> +<span class="sourceLineNo">1368</span> * @deprecated (1.11) Use {@link #sha1Hex(String)}<a name="line.1368"></a> +<span class="sourceLineNo">1369</span> */<a name="line.1369"></a> +<span class="sourceLineNo">1370</span> @Deprecated<a name="line.1370"></a> +<span class="sourceLineNo">1371</span> public static String shaHex(final String data) {<a name="line.1371"></a> +<span class="sourceLineNo">1372</span> return sha1Hex(data);<a name="line.1372"></a> +<span class="sourceLineNo">1373</span> }<a name="line.1373"></a> +<span class="sourceLineNo">1374</span><a name="line.1374"></a> +<span class="sourceLineNo">1375</span> /**<a name="line.1375"></a> +<span class="sourceLineNo">1376</span> * Updates the given {@link MessageDigest}.<a name="line.1376"></a> +<span class="sourceLineNo">1377</span> *<a name="line.1377"></a> +<span class="sourceLineNo">1378</span> * @param messageDigest<a name="line.1378"></a> +<span class="sourceLineNo">1379</span> * the {@link MessageDigest} to update<a name="line.1379"></a> +<span class="sourceLineNo">1380</span> * @param valueToDigest<a name="line.1380"></a> +<span class="sourceLineNo">1381</span> * the value to update the {@link MessageDigest} with<a name="line.1381"></a> +<span class="sourceLineNo">1382</span> * @return the updated {@link MessageDigest}<a name="line.1382"></a> +<span class="sourceLineNo">1383</span> * @since 1.7<a name="line.1383"></a> +<span class="sourceLineNo">1384</span> */<a name="line.1384"></a> +<span class="sourceLineNo">1385</span> public static MessageDigest updateDigest(final MessageDigest messageDigest, final byte[] valueToDigest) {<a name="line.1385"></a> +<span class="sourceLineNo">1386</span> messageDigest.update(valueToDigest);<a name="line.1386"></a> +<span class="sourceLineNo">1387</span> return messageDigest;<a name="line.1387"></a> +<span class="sourceLineNo">1388</span> }<a name="line.1388"></a> +<span class="sourceLineNo">1389</span><a name="line.1389"></a> +<span class="sourceLineNo">1390</span> /**<a name="line.1390"></a> +<span class="sourceLineNo">1391</span> * Updates the given {@link MessageDigest}.<a name="line.1391"></a> +<span class="sourceLineNo">1392</span> *<a name="line.1392"></a> +<span class="sourceLineNo">1393</span> * @param messageDigest<a name="line.1393"></a> +<span class="sourceLineNo">1394</span> * the {@link MessageDigest} to update<a name="line.1394"></a> +<span class="sourceLineNo">1395</span> * @param valueToDigest<a name="line.1395"></a> +<span class="sourceLineNo">1396</span> * the value to update the {@link MessageDigest} with<a name="line.1396"></a> +<span class="sourceLineNo">1397</span> * @return the updated {@link MessageDigest}<a name="line.1397"></a> +<span class="sourceLineNo">1398</span> * @since 1.11<a name="line.1398"></a> +<span class="sourceLineNo">1399</span> */<a name="line.1399"></a> +<span class="sourceLineNo">1400</span> public static MessageDigest updateDigest(final MessageDigest messageDigest, final ByteBuffer valueToDigest) {<a name="line.1400"></a> +<span class="sourceLineNo">1401</span> messageDigest.update(valueToDigest);<a name="line.1401"></a> +<span class="sourceLineNo">1402</span> return messageDigest;<a name="line.1402"></a> +<span class="sourceLineNo">1403</span> }<a name="line.1403"></a> +<span class="sourceLineNo">1404</span><a name="line.1404"></a> +<span class="sourceLineNo">1405</span> /**<a name="line.1405"></a> +<span class="sourceLineNo">1406</span> * Reads through a File and updates the digest for the data<a name="line.1406"></a> +<span class="sourceLineNo">1407</span> *<a name="line.1407"></a> +<span class="sourceLineNo">1408</span> * @param digest<a name="line.1408"></a> +<span class="sourceLineNo">1409</span> * The MessageDigest to use (e.g. MD5)<a name="line.1409"></a> +<span class="sourceLineNo">1410</span> * @param data<a name="line.1410"></a> +<span class="sourceLineNo">1411</span> * Data to digest<a name="line.1411"></a> +<span class="sourceLineNo">1412</span> * @return the digest<a name="line.1412"></a> +<span class="sourceLineNo">1413</span> * @throws IOException<a name="line.1413"></a> +<span class="sourceLineNo">1414</span> * On error reading from the stream<a name="line.1414"></a> +<span class="sourceLineNo">1415</span> * @since 1.11<a name="line.1415"></a> +<span class="sourceLineNo">1416</span> */<a name="line.1416"></a> +<span class="sourceLineNo">1417</span> public static MessageDigest updateDigest(final MessageDigest digest, final File data) throws IOException {<a name="line.1417"></a> +<span class="sourceLineNo">1418</span> try (final BufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(data))) {<a name="line.1418"></a> +<span class="sourceLineNo">1419</span> return updateDigest(digest, inputStream);<a name="line.1419"></a> +<span class="sourceLineNo">1420</span> }<a name="line.1420"></a> +<span class="sourceLineNo">1421</span> }<a name="line.1421"></a> +<span class="sourceLineNo">1422</span><a name="line.1422"></a> +<span class="sourceLineNo">1423</span> /**<a name="line.1423"></a> +<span class="sourceLineNo">1424</span> * Reads through a RandomAccessFile and updates the digest for the data using non-blocking-io (NIO).<a name="line.1424"></a> +<span class="sourceLineNo">1425</span> *<a name="line.1425"></a> +<span class="sourceLineNo">1426</span> * TODO Decide if this should be public.<a name="line.1426"></a> +<span class="sourceLineNo">1427</span> *<a name="line.1427"></a> +<span class="sourceLineNo">1428</span> * @param digest The MessageDigest to use (e.g. MD5)<a name="line.1428"></a> +<span class="sourceLineNo">1429</span> * @param data Data to digest<a name="line.1429"></a> +<span class="sourceLineNo">1430</span> * @return the digest<a name="line.1430"></a> +<span class="sourceLineNo">1431</span> * @throws IOException On error reading from the stream<a name="line.1431"></a> +<span class="sourceLineNo">1432</span> * @since 1.14<a name="line.1432"></a> +<span class="sourceLineNo">1433</span> */<a name="line.1433"></a> +<span class="sourceLineNo">1434</span> private static MessageDigest updateDigest(final MessageDigest digest, final FileChannel data) throws IOException {<a name="line.1434"></a> +<span class="sourceLineNo">1435</span> final ByteBuffer buffer = ByteBuffer.allocate(STREAM_BUFFER_LENGTH);<a name="line.1435"></a> +<span class="sourceLineNo">1436</span> while (data.read(buffer) > 0) {<a name="line.1436"></a> +<span class="sourceLineNo">1437</span> buffer.flip();<a name="line.1437"></a> +<span class="sourceLineNo">1438</span> digest.update(buffer);<a name="line.1438"></a> +<span class="sourceLineNo">1439</span> buffer.clear();<a name="line.1439"></a> +<span class="sourceLineNo">1440</span> }<a name="line.1440"></a> +<span class="sourceLineNo">1441</span> return digest;<a name="line.1441"></a> +<span class="sourceLineNo">1442</span> }<a name="line.1442"></a> +<span class="sourceLineNo">1443</span><a name="line.1443"></a> +<span class="sourceLineNo">1444</span> /**<a name="line.1444"></a> +<span class="sourceLineNo">1445</span> * Reads through an InputStream and updates the digest for the data<a name="line.1445"></a> +<span class="sourceLineNo">1446</span> *<a name="line.1446"></a> +<span class="sourceLineNo">1447</span> * @param digest<a name="line.1447"></a> +<span class="sourceLineNo">1448</span> * The MessageDigest to use (e.g. MD5)<a name="line.1448"></a> +<span class="sourceLineNo">1449</span> * @param inputStream<a name="line.1449"></a> +<span class="sourceLineNo">1450</span> * Data to digest<a name="line.1450"></a> +<span class="sourceLineNo">1451</span> * @return the digest<a name="line.1451"></a> +<span class="sourceLineNo">1452</span> * @throws IOException<a name="line.1452"></a> +<span class="sourceLineNo">1453</span> * On error reading from the stream<a name="line.1453"></a> +<span class="sourceLineNo">1454</span> * @since 1.8<a name="line.1454"></a> +<span class="sourceLineNo">1455</span> */<a name="line.1455"></a> +<span class="sourceLineNo">1456</span> public static MessageDigest updateDigest(final MessageDigest digest, final InputStream inputStream)<a name="line.1456"></a> +<span class="sourceLineNo">1457</span> throws IOException {<a name="line.1457"></a> +<span class="sourceLineNo">1458</span> final byte[] buffer = new byte[STREAM_BUFFER_LENGTH];<a name="line.1458"></a> +<span class="sourceLineNo">1459</span> int read = inputStream.read(buffer, 0, STREAM_BUFFER_LENGTH);<a name="line.1459"></a> +<span class="sourceLineNo">1460</span><a name="line.1460"></a> +<span class="sourceLineNo">1461</span> while (read > -1) {<a name="line.1461"></a> +<span class="sourceLineNo">1462</span> digest.update(buffer, 0, read);<a name="line.1462"></a> +<span class="sourceLineNo">1463</span> read = inputStream.read(buffer, 0, STREAM_BUFFER_LENGTH);<a name="line.1463"></a> +<span class="sourceLineNo">1464</span> }<a name="line.1464"></a> +<span class="sourceLineNo">1465</span><a name="line.1465"></a> +<span class="sourceLineNo">1466</span> return digest;<a name="line.1466"></a> +<span class="sourceLineNo">1467</span> }<a name="line.1467"></a> +<span class="sourceLineNo">1468</span><a name="line.1468"></a> +<span class="sourceLineNo">1469</span> /**<a name="line.1469"></a> +<span class="sourceLineNo">1470</span> * Reads through a Path and updates the digest for the data<a name="line.1470"></a> +<span class="sourceLineNo">1471</span> *<a name="line.1471"></a> +<span class="sourceLineNo">1472</span> * @param digest<a name="line.1472"></a> +<span class="sourceLineNo">1473</span> * The MessageDigest to use (e.g. MD5)<a name="line.1473"></a> +<span class="sourceLineNo">1474</span> * @param path<a name="line.1474"></a> +<span class="sourceLineNo">1475</span> * Data to digest<a name="line.1475"></a> +<span class="sourceLineNo">1476</span> * @param options<a name="line.1476"></a> +<span class="sourceLineNo">1477</span> * options How to open the file<a name="line.1477"></a> +<span class="sourceLineNo">1478</span> * @return the digest<a name="line.1478"></a> +<span class="sourceLineNo">1479</span> * @throws IOException<a name="line.1479"></a> +<span class="sourceLineNo">1480</span> * On error reading from the stream<a name="line.1480"></a> +<span class="sourceLineNo">1481</span> * @since 1.14<a name="line.1481"></a> +<span class="sourceLineNo">1482</span> */<a name="line.1482"></a> +<span class="sourceLineNo">1483</span> public static MessageDigest updateDigest(final MessageDigest digest, final Path path, final OpenOption... options)<a name="line.1483"></a> +<span class="sourceLineNo">1484</span> throws IOException {<a name="line.1484"></a> +<span class="sourceLineNo">1485</span> try (final BufferedInputStream inputStream = new BufferedInputStream(Files.newInputStream(path, options))) {<a name="line.1485"></a> +<span class="sourceLineNo">1486</span> return updateDigest(digest, inputStream);<a name="line.1486"></a> +<span class="sourceLineNo">1487</span> }<a name="line.1487"></a> +<span class="sourceLineNo">1488</span> }<a name="line.1488"></a> +<span class="sourceLineNo">1489</span><a name="line.1489"></a> +<span class="sourceLineNo">1490</span> /**<a name="line.1490"></a> +<span class="sourceLineNo">1491</span> * Reads through a RandomAccessFile and updates the digest for the data using non-blocking-io (NIO)<a name="line.1491"></a> +<span class="sourceLineNo">1492</span> *<a name="line.1492"></a> +<span class="sourceLineNo">1493</span> * @param digest The MessageDigest to use (e.g. MD5)<a name="line.1493"></a> +<span class="sourceLineNo">1494</span> * @param data Data to digest<a name="line.1494"></a> +<span class="sourceLineNo">1495</span> * @return the digest<a name="line.1495"></a> +<span class="sourceLineNo">1496</span> * @throws IOException On error reading from the stream<a name="line.1496"></a> +<span class="sourceLineNo">1497</span> * @since 1.14<a name="line.1497"></a> +<span class="sourceLineNo">1498</span> */<a name="line.1498"></a> +<span class="sourceLineNo">1499</span> public static MessageDigest updateDigest(final MessageDigest digest, final RandomAccessFile data)<a name="line.1499"></a> +<span class="sourceLineNo">1500</span> throws IOException {<a name="line.1500"></a> +<span class="sourceLineNo">1501</span> return updateDigest(digest, data.getChannel());<a name="line.1501"></a> +<span class="sourceLineNo">1502</span> }<a name="line.1502"></a> +<span class="sourceLineNo">1503</span><a name="line.1503"></a> +<span class="sourceLineNo">1504</span> /**<a name="line.1504"></a> +<span class="sourceLineNo">1505</span> * Updates the given {@link MessageDigest} from a String (converted to bytes using UTF-8).<a name="line.1505"></a> +<span class="sourceLineNo">1506</span> * <p><a name="line.1506"></a> +<span class="sourceLineNo">1507</span> * To update the digest using a different charset for the conversion,<a name="line.1507"></a> +<span class="sourceLineNo">1508</span> * convert the String to a byte array using<a name="line.1508"></a> +<span class="sourceLineNo">1509</span> * {@link String#getBytes(java.nio.charset.Charset)} and pass that<a name="line.1509"></a> +<span class="sourceLineNo">1510</span> * to the {@link DigestUtils#updateDigest(MessageDigest, byte[])} method<a name="line.1510"></a> +<span class="sourceLineNo">1511</span> *<a name="line.1511"></a> +<span class="sourceLineNo">1512</span> * @param messageDigest<a name="line.1512"></a> +<span class="sourceLineNo">1513</span> * the {@link MessageDigest} to update<a name="line.1513"></a> +<span class="sourceLineNo">1514</span> * @param valueToDigest<a name="line.1514"></a> +<span class="sourceLineNo">1515</span> * the value to update the {@link MessageDigest} with;<a name="line.1515"></a> +<span class="sourceLineNo">1516</span> * converted to bytes using {@link StringUtils#getBytesUtf8(String)}<a name="line.1516"></a> +<span class="sourceLineNo">1517</span> * @return the updated {@link MessageDigest}<a name="line.1517"></a> +<span class="sourceLineNo">1518</span> * @since 1.7<a name="line.1518"></a> +<span class="sourceLineNo">1519</span> */<a name="line.1519"></a> +<span class="sourceLineNo">1520</span> public static MessageDigest updateDigest(final MessageDigest messageDigest, final String valueToDigest) {<a name="line.1520"></a> +<span class="sourceLineNo">1521</span> messageDigest.update(StringUtils.getBytesUtf8(valueToDigest));<a name="line.1521"></a> +<span class="sourceLineNo">1522</span> return messageDigest;<a name="line.1522"></a> +<span class="sourceLineNo">1523</span> }<a name="line.1523"></a> +<span class="sourceLineNo">1524</span><a name="line.1524"></a> +<span class="sourceLineNo">1525</span> private final MessageDigest messageDigest;<a name="line.1525"></a> +<span class="sourceLineNo">1526</span><a name="line.1526"></a> +<span class="sourceLineNo">1527</span> /**<a name="line.1527"></a> +<span class="sourceLineNo">1528</span> * Preserves binary compatibility only.<a name="line.1528"></a> +<span class="sourceLineNo">1529</span> * As for previous versions does not provide useful behavior<a name="line.1529"></a> +<span class="sourceLineNo">1530</span> * @deprecated since 1.11; only useful to preserve binary compatibility<a name="line.1530"></a> +<span class="sourceLineNo">1531</span> */<a name="line.1531"></a> +<span class="sourceLineNo">1532</span> @Deprecated<a name="line.1532"></a> +<span class="sourceLineNo">1533</span> public DigestUtils() {<a name="line.1533"></a> +<span class="sourceLineNo">1534</span> this.messageDigest = null;<a name="line.1534"></a> +<span class="sourceLineNo">1535</span> }<a name="line.1535"></a> +<span class="sourceLineNo">1536</span><a name="line.1536"></a> +<span class="sourceLineNo">1537</span> /**<a name="line.1537"></a> +<span class="sourceLineNo">1538</span> * Creates an instance using the provided {@link MessageDigest} parameter.<a name="line.1538"></a> +<span class="sourceLineNo">1539</span> *<a name="line.1539"></a> +<span class="sourceLineNo">1540</span> * This can then be used to create digests using methods such as<a name="line.1540"></a> +<span class="sourceLineNo">1541</span> * {@link #digest(byte[])} and {@link #digestAsHex(File)}.<a name="line.1541"></a> +<span class="sourceLineNo">1542</span> *<a name="line.1542"></a> +<span class="sourceLineNo">1543</span> * @param digest the {@link MessageDigest} to use<a name="line.1543"></a> +<span class="sourceLineNo">1544</span> * @since 1.11<a name="line.1544"></a> +<span class="sourceLineNo">1545</span> */<a name="line.1545"></a> +<span class="sourceLineNo">1546</span> public DigestUtils(final MessageDigest digest) {<a name="line.1546"></a> +<span class="sourceLineNo">1547</span> this.messageDigest = digest;<a name="line.1547"></a> +<span class="sourceLineNo">1548</span> }<a name="line.1548"></a> +<span class="sourceLineNo">1549</span><a name="line.1549"></a> +<span class="sourceLineNo">1550</span> /**<a name="line.1550"></a> +<span class="sourceLineNo">1551</span> * Creates an instance using the provided {@link MessageDigest} parameter.<a name="line.1551"></a> +<span class="sourceLineNo">1552</span> *<a name="line.1552"></a> +<span class="sourceLineNo">1553</span> * This can then be used to create digests using methods such as<a name="line.1553"></a> +<span class="sourceLineNo">1554</span> * {@link #digest(byte[])} and {@link #digestAsHex(File)}.<a name="line.1554"></a> +<span class="sourceLineNo">1555</span> *<a name="line.1555"></a> +<span class="sourceLineNo">1556</span> * @param name the name of the {@link MessageDigest} to use<a name="line.1556"></a> +<span class="sourceLineNo">1557</span> * @see #getDigest(String)<a name="line.1557"></a> +<span class="sourceLineNo">1558</span> * @throws IllegalArgumentException<a name="line.1558"></a> +<span class="sourceLineNo">1559</span> * when a {@link NoSuchAlgorithmException} is caught.<a name="line.1559"></a> +<span class="sourceLineNo">1560</span> * @since 1.11<a name="line.1560"></a> +<span class="sourceLineNo">1561</span> */<a name="line.1561"></a> +<span class="sourceLineNo">1562</span> public DigestUtils(final String name) {<a name="line.1562"></a> +<span class="sourceLineNo">1563</span> this(getDigest(name));<a name="line.1563"></a> +<span class="sourceLineNo">1564</span> }<a name="line.1564"></a> +<span class="sourceLineNo">1565</span><a name="line.1565"></a> +<span class="sourceLineNo">1566</span> /**<a name="line.1566"></a> +<span class="sourceLineNo">1567</span> * Reads through a byte array and returns the digest for the data.<a name="line.1567"></a> +<span class="sourceLineNo">1568</span> *<a name="line.1568"></a> +<span class="sourceLineNo">1569</span> * @param data<a name="line.1569"></a> +<span class="sourceLineNo">1570</span> * Data to digest<a name="line.1570"></a> +<span class="sourceLineNo">1571</span> * @return the digest<a name="line.1571"></a> +<span class="sourceLineNo">1572</span> * @since 1.11<a name="line.1572"></a> +<span class="sourceLineNo">1573</span> */<a name="line.1573"></a> +<span class="sourceLineNo">1574</span> public byte[] digest(final byte[] data) {<a name="line.1574"></a> +<span class="sourceLineNo">1575</span> return updateDigest(messageDigest, data).digest();<a name="line.1575"></a> +<span class="sourceLineNo">1576</span> }<a name="line.1576"></a> +<span class="sourceLineNo">1577</span><a name="line.1577"></a> +<span class="sourceLineNo">1578</span> /**<a name="line.1578"></a> +<span class="sourceLineNo">1579</span> * Reads through a ByteBuffer and returns the digest for the data<a name="line.1579"></a> +<span class="sourceLineNo">1580</span> *<a name="line.1580"></a> +<span class="sourceLineNo">1581</span> * @param data<a name="line.1581"></a> +<span class="sourceLineNo">1582</span> * Data to digest<a name="line.1582"></a> +<span class="sourceLineNo">1583</span> * @return the digest<a name="line.1583"></a> +<span class="sourceLineNo">1584</span> *<a name="line.1584"></a> +<span class="sourceLineNo">1585</span> * @since 1.11<a name="line.1585"></a> +<span class="sourceLineNo">1586</span> */<a name="line.1586"></a> +<span class="sourceLineNo">1587</span> public byte[] digest(final ByteBuffer data) {<a name="line.1587"></a> +<span class="sourceLineNo">1588</span> return updateDigest(messageDigest, data).digest();<a name="line.1588"></a> +<span class="sourceLineNo">1589</span> }<a name="line.1589"></a> +<span class="sourceLineNo">1590</span><a name="line.1590"></a> +<span class="sourceLineNo">1591</span> /**<a name="line.1591"></a> +<span class="sourceLineNo">1592</span> * Reads through a File and returns the digest for the data<a name="line.1592"></a> +<span class="sourceLineNo">1593</span> *<a name="line.1593"></a> +<span class="sourceLineNo">1594</span> * @param data<a name="line.1594"></a> +<span class="sourceLineNo">1595</span> * Data to digest<a name="line.1595"></a> +<span class="sourceLineNo">1596</span> * @return the digest<a name="line.1596"></a> +<span class="sourceLineNo">1597</span> * @throws IOException<a name="line.1597"></a> +<span class="sourceLineNo">1598</span> * On error reading from the stream<a name="line.1598"></a> +<span class="sourceLineNo">1599</span> * @since 1.11<a name="line.1599"></a> +<span class="sourceLineNo">1600</span> */<a name="line.1600"></a> +<span class="sourceLineNo">1601</span> public byte[] digest(final File data) throws IOException {<a name="line.1601"></a> +<span class="sourceLineNo">1602</span> return updateDigest(messageDigest, data).digest();<a name="line.1602"></a> +<span class="sourceLineNo">1603</span> }<a name="line.1603"></a> +<span class="sourceLineNo">1604</span><a name="line.1604"></a> +<span class="sourceLineNo">1605</span> /**<a name="line.1605"></a> +<span class="sourceLineNo">1606</span> * Reads through an InputStream and returns the digest for the data<a name="line.1606"></a> +<span class="sourceLineNo">1607</span> *<a name="line.1607"></a> +<span class="sourceLineNo">1608</span> * @param data<a name="line.1608"></a> +<span class="sourceLineNo">1609</span> * Data to digest<a name="line.1609"></a> +<span class="sourceLineNo">1610</span> * @return the digest<a name="line.1610"></a> +<span class="sourceLineNo">1611</span> * @throws IOException<a name="line.1611"></a> +<span class="sourceLineNo">1612</span> * On error reading from the stream<a name="line.1612"></a> +<span class="sourceLineNo">1613</span> * @since 1.11<a name="line.1613"></a> +<span class="sourceLineNo">1614</span> */<a name="line.1614"></a> +<span class="sourceLineNo">1615</span> public byte[] digest(final InputStream data) throws IOException {<a name="line.1615"></a> +<span class="sourceLineNo">1616</span> return updateDigest(messageDigest, data).digest();<a name="line.1616"></a> +<span class="sourceLineNo">1617</span> }<a name="line.1617"></a> +<span class="sourceLineNo">1618</span><a name="line.1618"></a> +<span class="sourceLineNo">1619</span> /**<a name="line.1619"></a> +<span class="sourceLineNo">1620</span> * Reads through a File and returns the digest for the data<a name="line.1620"></a> +<span class="sourceLineNo">1621</span> *<a name="line.1621"></a> +<span class="sourceLineNo">1622</span> * @param data<a name="line.1622"></a> +<span class="sourceLineNo">1623</span> * Data to digest<a name="line.1623"></a> +<span class="sourceLineNo">1624</span> * @param options<a name="line.1624"></a> +<span class="sourceLineNo">1625</span> * options How to open the file<a name="line.1625"></a> +<span class="sourceLineNo">1626</span> * @return the digest<a name="line.1626"></a> +<span class="sourceLineNo">1627</span> * @throws IOException<a name="line.1627"></a> +<span class="sourceLineNo">1628</span> * On error reading from the stream<a name="line.1628"></a> +<span class="sourceLineNo">1629</span> * @since 1.14<a name="line.1629"></a> +<span class="sourceLineNo">1630</span> */<a name="line.1630"></a> +<span class="sourceLineNo">1631</span> public byte[] digest(final Path data, final OpenOption... options) throws IOException {<a name="line.1631"></a> +<span class="sourceLineNo">1632</span> return updateDigest(messageDigest, data, options).digest();<a name="line.1632"></a> +<span class="sourceLineNo">1633</span> }<a name="line.1633"></a> +<span class="sourceLineNo">1634</span><a name="line.1634"></a> +<span class="sourceLineNo">1635</span> /**<a name="line.1635"></a> +<span class="sourceLineNo">1636</span> * Reads through a byte array and returns the digest for the data.<a name="line.1636"></a> +<span class="sourceLineNo">1637</span> *<a name="line.1637"></a> +<span class="sourceLineNo">1638</span> * @param data<a name="line.1638"></a> +<span class="sourceLineNo">1639</span> * Data to digest treated as UTF-8 string<a name="line.1639"></a> +<span class="sourceLineNo">1640</span> * @return the digest<a name="line.1640"></a> +<span class="sourceLineNo">1641</span> * @since 1.11<a name="line.1641"></a> +<span class="sourceLineNo">1642</span> */<a name="line.1642"></a> +<span class="sourceLineNo">1643</span> public byte[] digest(final String data) {<a name="line.1643"></a> +<span class="sourceLineNo">1644</span> return updateDigest(messageDigest, data).digest();<a name="line.1644"></a> +<span class="sourceLineNo">1645</span> }<a name="line.1645"></a> +<span class="sourceLineNo">1646</span><a name="line.1646"></a> +<span class="sourceLineNo">1647</span> /**<a name="line.1647"></a> +<span class="sourceLineNo">1648</span> * Reads through a byte array and returns the digest for the data.<a name="line.1648"></a> +<span class="sourceLineNo">1649</span> *<a name="line.1649"></a> +<span class="sourceLineNo">1650</span> * @param data<a name="line.1650"></a> +<span class="sourceLineNo">1651</span> * Data to digest<a name="line.1651"></a> +<span class="sourceLineNo">1652</span> * @return the digest as a hex string<a name="line.1652"></a> +<span class="sourceLineNo">1653</span> * @since 1.11<a name="line.1653"></a> +<span class="sourceLineNo">1654</span> */<a name="line.1654"></a> +<span class="sourceLineNo">1655</span> public String digestAsHex(final byte[] data) {<a name="line.1655"></a> +<span class="sourceLineNo">1656</span> return Hex.encodeHexString(digest(data));<a name="line.1656"></a> +<span class="sourceLineNo">1657</span> }<a name="line.1657"></a> +<span class="sourceLineNo">1658</span><a name="line.1658"></a> +<span class="sourceLineNo">1659</span> /**<a name="line.1659"></a> +<span class="sourceLineNo">1660</span> * Reads through a ByteBuffer and returns the digest for the data<a name="line.1660"></a> +<span class="sourceLineNo">1661</span> *<a name="line.1661"></a> +<span class="sourceLineNo">1662</span> * @param data<a name="line.1662"></a> +<span class="sourceLineNo">1663</span> * Data to digest<a name="line.1663"></a> +<span class="sourceLineNo">1664</span> * @return the digest as a hex string<a name="line.1664"></a> +<span class="sourceLineNo">1665</span> *<a name="line.1665"></a> +<span class="sourceLineNo">1666</span> * @since 1.11<a name="line.1666"></a> +<span class="sourceLineNo">1667</span> */<a name="line.1667"></a> +<span class="sourceLineNo">1668</span> public String digestAsHex(final ByteBuffer data) {<a name="line.1668"></a> +<span class="sourceLineNo">1669</span> return Hex.encodeHexString(digest(data));<a name="line.1669"></a> +<span class="sourceLineNo">1670</span> }<a name="line.1670"></a> +<span class="sourceLineNo">1671</span><a name="line.1671"></a> +<span class="sourceLineNo">1672</span> /**<a name="line.1672"></a> +<span class="sourceLineNo">1673</span> * Reads through a File and returns the digest for the data<a name="line.1673"></a> +<span class="sourceLineNo">1674</span> *<a name="line.1674"></a> +<span class="sourceLineNo">1675</span> * @param data<a name="line.1675"></a> +<span class="sourceLineNo">1676</span> * Data to digest<a name="line.1676"></a> +<span class="sourceLineNo">1677</span> * @return the digest as a hex string<a name="line.1677"></a> +<span class="sourceLineNo">1678</span> * @throws IOException<a name="line.1678"></a> +<span class="sourceLineNo">1679</span> * On error reading from the stream<a name="line.1679"></a> +<span class="sourceLineNo">1680</span> * @since 1.11<a name="line.1680"></a> +<span class="sourceLineNo">1681</span> */<a name="line.1681"></a> +<span class="sourceLineNo">1682</span> public String digestAsHex(final File data) throws IOException {<a name="line.1682"></a> +<span class="sourceLineNo">1683</span> return Hex.encodeHexString(digest(data));<a name="line.1683"></a> +<span class="sourceLineNo">1684</span> }<a name="line.1684"></a> +<span class="sourceLineNo">1685</span><a name="line.1685"></a> +<span class="sourceLineNo">1686</span> /**<a name="line.1686"></a> +<span class="sourceLineNo">1687</span> * Reads through an InputStream and returns the digest for the data<a name="line.1687"></a> +<span class="sourceLineNo">1688</span> *<a name="line.1688"></a> +<span class="sourceLineNo">1689</span> * @param data<a name="line.1689"></a> +<span class="sourceLineNo">1690</span> * Data to digest<a name="line.1690"></a> +<span class="sourceLineNo">1691</span> * @return the digest as a hex string<a name="line.1691"></a> +<span class="sourceLineNo">1692</span> * @throws IOException<a name="line.1692"></a> +<span class="sourceLineNo">1693</span> * On error reading from the stream<a name="line.1693"></a> +<span class="sourceLineNo">1694</span> * @since 1.11<a name="line.1694"></a> +<span class="sourceLineNo">1695</span> */<a name="line.1695"></a> +<span class="sourceLineNo">1696</span> public String digestAsHex(final InputStream data) throws IOException {<a name="line.1696"></a> +<span class="sourceLineNo">1697</span> return Hex.encodeHexString(digest(data));<a name="line.1697"></a> +<span class="sourceLineNo">1698</span> }<a name="line.1698"></a> +<span class="sourceLineNo">1699</span><a name="line.1699"></a> +<span class="sourceLineNo">1700</span> /**<a name="line.1700"></a> +<span class="sourceLineNo">1701</span> * Reads through a File and returns the digest for the data<a name="line.1701"></a> +<span class="sourceLineNo">1702</span> *<a name="line.1702"></a> +<span class="sourceLineNo">1703</span> * @param data<a name="line.1703"></a> +<span class="sourceLineNo">1704</span> * Data to digest<a name="line.1704"></a> +<span class="sourceLineNo">1705</span> * @param options<a name="line.1705"></a> +<span class="sourceLineNo">1706</span> * options How to open the file<a name="line.1706"></a> +<span class="sourceLineNo">1707</span> * @return the digest as a hex string<a name="line.1707"></a> +<span class="sourceLineNo">1708</span> * @throws IOException<a name="line.1708"></a> +<span class="sourceLineNo">1709</span> * On error reading from the stream<a name="line.1709"></a> +<span class="sourceLineNo">1710</span> * @since 1.11<a name="line.1710"></a> +<span class="sourceLineNo">1711</span> */<a name="line.1711"></a> +<span class="sourceLineNo">1712</span> public String digestAsHex(final Path data, final OpenOption... options) throws IOException {<a name="line.1712"></a> +<span class="sourceLineNo">1713</span> return Hex.encodeHexString(digest(data, options));<a name="line.1713"></a> +<span class="sourceLineNo">1714</span> }<a name="line.1714"></a> +<span class="sourceLineNo">1715</span><a name="line.1715"></a> +<span class="sourceLineNo">1716</span> /**<a name="line.1716"></a> +<span class="sourceLineNo">1717</span> * Reads through a byte array and returns the digest for the data.<a name="line.1717"></a> +<span class="sourceLineNo">1718</span> *<a name="line.1718"></a> +<span class="sourceLineNo">1719</span> * @param data<a name="line.1719"></a> +<span class="sourceLineNo">1720</span> * Data to digest treated as UTF-8 string<a name="line.1720"></a> +<span class="sourceLineNo">1721</span> * @return the digest as a hex string<a name="line.1721"></a> +<span class="sourceLineNo">1722</span> * @since 1.11<a name="line.1722"></a> +<span class="sourceLineNo">1723</span> */<a name="line.1723"></a> +<span class="sourceLineNo">1724</span> public String digestAsHex(final String data) {<a name="line.1724"></a> +<span class="sourceLineNo">1725</span> return Hex.encodeHexString(digest(data));<a name="line.1725"></a> +<span class="sourceLineNo">1726</span> }<a name="line.1726"></a> +<span class="sourceLineNo">1727</span><a name="line.1727"></a> +<span class="sourceLineNo">1728</span> /**<a name="line.1728"></a> +<span class="sourceLineNo">1729</span> * Returns the message digest instance.<a name="line.1729"></a> +<span class="sourceLineNo">1730</span> * @return the message digest instance<a name="line.1730"></a> +<span class="sourceLineNo">1731</span> * @since 1.11<a name="line.1731"></a> +<span class="sourceLineNo">1732</span> */<a name="line.1732"></a> +<span class="sourceLineNo">1733</span> public MessageDigest getMessageDigest() {<a name="line.1733"></a> +<span class="sourceLineNo">1734</span> return messageDigest;<a name="line.1734"></a> +<span class="sourceLineNo">1735</span> }<a name="line.1735"></a> +<span class="sourceLineNo">1736</span><a name="line.1736"></a> +<span class="sourceLineNo">1737</span>}<a name="line.1737"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/HmacAlgorithms.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/HmacAlgorithms.html new file mode 100644 index 0000000000000000000000000000000000000000..a20b5baef2e16331cea7fe3943368e617b0804ce --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/HmacAlgorithms.html @@ -0,0 +1,197 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.digest;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Standard {@link HmacUtils} algorithm names from the <cite>Java Cryptography Architecture Standard Algorithm Name<a name="line.21"></a> +<span class="sourceLineNo">022</span> * Documentation</cite>.<a name="line.22"></a> +<span class="sourceLineNo">023</span> *<a name="line.23"></a> +<span class="sourceLineNo">024</span> * <p><a name="line.24"></a> +<span class="sourceLineNo">025</span> * <strong>Note: Not all JCE implementations support all the algorithms in this enum.</strong><a name="line.25"></a> +<span class="sourceLineNo">026</span> * </p><a name="line.26"></a> +<span class="sourceLineNo">027</span> *<a name="line.27"></a> +<span class="sourceLineNo">028</span> * @see <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"> Java<a name="line.28"></a> +<span class="sourceLineNo">029</span> * 6 Cryptography Architecture Sun Providers Documentation</a><a name="line.29"></a> +<span class="sourceLineNo">030</span> * @see <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"> Java<a name="line.30"></a> +<span class="sourceLineNo">031</span> * 7 Cryptography Architecture Sun Providers Documentation</a><a name="line.31"></a> +<span class="sourceLineNo">032</span> * @see <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"> Java<a name="line.32"></a> +<span class="sourceLineNo">033</span> * 8 Cryptography Architecture Sun Providers Documentation</a><a name="line.33"></a> +<span class="sourceLineNo">034</span> * @see <a href=<a name="line.34"></a> +<span class="sourceLineNo">035</span> * "http://docs.oracle.com/javase/9/security/oracleproviders.htm#JSSEC-GUID-A47B1249-593C-4C38-A0D0-68FA7681E0A7"><a name="line.35"></a> +<span class="sourceLineNo">036</span> * Java 9 Cryptography Architecture Sun Providers Documentation</a><a name="line.36"></a> +<span class="sourceLineNo">037</span> * @since 1.10<a name="line.37"></a> +<span class="sourceLineNo">038</span> */<a name="line.38"></a> +<span class="sourceLineNo">039</span>public enum HmacAlgorithms {<a name="line.39"></a> +<span class="sourceLineNo">040</span><a name="line.40"></a> +<span class="sourceLineNo">041</span> /**<a name="line.41"></a> +<span class="sourceLineNo">042</span> * The HmacMD5 Message Authentication Code (MAC) algorithm specified in RFC 2104 and RFC 1321.<a name="line.42"></a> +<span class="sourceLineNo">043</span> * <p><a name="line.43"></a> +<span class="sourceLineNo">044</span> * Every implementation of the Java platform is required to support this standard MAC algorithm.<a name="line.44"></a> +<span class="sourceLineNo">045</span> * </p><a name="line.45"></a> +<span class="sourceLineNo">046</span> */<a name="line.46"></a> +<span class="sourceLineNo">047</span> HMAC_MD5("HmacMD5"),<a name="line.47"></a> +<span class="sourceLineNo">048</span><a name="line.48"></a> +<span class="sourceLineNo">049</span> /**<a name="line.49"></a> +<span class="sourceLineNo">050</span> * The HmacSHA1 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.<a name="line.50"></a> +<span class="sourceLineNo">051</span> * <p><a name="line.51"></a> +<span class="sourceLineNo">052</span> * Every implementation of the Java platform is required to support this standard MAC algorithm.<a name="line.52"></a> +<span class="sourceLineNo">053</span> * </p><a name="line.53"></a> +<span class="sourceLineNo">054</span> */<a name="line.54"></a> +<span class="sourceLineNo">055</span> HMAC_SHA_1("HmacSHA1"),<a name="line.55"></a> +<span class="sourceLineNo">056</span><a name="line.56"></a> +<span class="sourceLineNo">057</span> /**<a name="line.57"></a> +<span class="sourceLineNo">058</span> * The HmacSHA224 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.<a name="line.58"></a> +<span class="sourceLineNo">059</span> * <p><a name="line.59"></a> +<span class="sourceLineNo">060</span> * Every implementation of the Java 8+ platform is required to support this standard MAC algorithm.<a name="line.60"></a> +<span class="sourceLineNo">061</span> * </p><a name="line.61"></a> +<span class="sourceLineNo">062</span> * @since 1.11<a name="line.62"></a> +<span class="sourceLineNo">063</span> */<a name="line.63"></a> +<span class="sourceLineNo">064</span> HMAC_SHA_224("HmacSHA224"),<a name="line.64"></a> +<span class="sourceLineNo">065</span><a name="line.65"></a> +<span class="sourceLineNo">066</span> /**<a name="line.66"></a> +<span class="sourceLineNo">067</span> * The HmacSHA256 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.<a name="line.67"></a> +<span class="sourceLineNo">068</span> * <p><a name="line.68"></a> +<span class="sourceLineNo">069</span> * Every implementation of the Java platform is required to support this standard MAC algorithm.<a name="line.69"></a> +<span class="sourceLineNo">070</span> * </p><a name="line.70"></a> +<span class="sourceLineNo">071</span> */<a name="line.71"></a> +<span class="sourceLineNo">072</span> HMAC_SHA_256("HmacSHA256"),<a name="line.72"></a> +<span class="sourceLineNo">073</span><a name="line.73"></a> +<span class="sourceLineNo">074</span> /**<a name="line.74"></a> +<span class="sourceLineNo">075</span> * The HmacSHA384 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.<a name="line.75"></a> +<span class="sourceLineNo">076</span> * <p><a name="line.76"></a> +<span class="sourceLineNo">077</span> * This MAC algorithm is <em>optional</em>; not all implementations support it.<a name="line.77"></a> +<span class="sourceLineNo">078</span> * </p><a name="line.78"></a> +<span class="sourceLineNo">079</span> */<a name="line.79"></a> +<span class="sourceLineNo">080</span> HMAC_SHA_384("HmacSHA384"),<a name="line.80"></a> +<span class="sourceLineNo">081</span><a name="line.81"></a> +<span class="sourceLineNo">082</span> /**<a name="line.82"></a> +<span class="sourceLineNo">083</span> * The HmacSHA512 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.<a name="line.83"></a> +<span class="sourceLineNo">084</span> * <p><a name="line.84"></a> +<span class="sourceLineNo">085</span> * This MAC algorithm is <em>optional</em>; not all implementations support it.<a name="line.85"></a> +<span class="sourceLineNo">086</span> * </p><a name="line.86"></a> +<span class="sourceLineNo">087</span> */<a name="line.87"></a> +<span class="sourceLineNo">088</span> HMAC_SHA_512("HmacSHA512");<a name="line.88"></a> +<span class="sourceLineNo">089</span><a name="line.89"></a> +<span class="sourceLineNo">090</span> private final String name;<a name="line.90"></a> +<span class="sourceLineNo">091</span><a name="line.91"></a> +<span class="sourceLineNo">092</span> private HmacAlgorithms(final String algorithm) {<a name="line.92"></a> +<span class="sourceLineNo">093</span> this.name = algorithm;<a name="line.93"></a> +<span class="sourceLineNo">094</span> }<a name="line.94"></a> +<span class="sourceLineNo">095</span><a name="line.95"></a> +<span class="sourceLineNo">096</span> /**<a name="line.96"></a> +<span class="sourceLineNo">097</span> * Gets the algorithm name.<a name="line.97"></a> +<span class="sourceLineNo">098</span> *<a name="line.98"></a> +<span class="sourceLineNo">099</span> * @return the algorithm name.<a name="line.99"></a> +<span class="sourceLineNo">100</span> * @since 1.11<a name="line.100"></a> +<span class="sourceLineNo">101</span> */<a name="line.101"></a> +<span class="sourceLineNo">102</span> public String getName() {<a name="line.102"></a> +<span class="sourceLineNo">103</span> return name;<a name="line.103"></a> +<span class="sourceLineNo">104</span> }<a name="line.104"></a> +<span class="sourceLineNo">105</span><a name="line.105"></a> +<span class="sourceLineNo">106</span> /**<a name="line.106"></a> +<span class="sourceLineNo">107</span> * The algorithm name<a name="line.107"></a> +<span class="sourceLineNo">108</span> *<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @see <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"><a name="line.109"></a> +<span class="sourceLineNo">110</span> * Java 6 Cryptography Architecture Sun Providers Documentation</a><a name="line.110"></a> +<span class="sourceLineNo">111</span> * @see <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"><a name="line.111"></a> +<span class="sourceLineNo">112</span> * Java 7 Cryptography Architecture Sun Providers Documentation</a><a name="line.112"></a> +<span class="sourceLineNo">113</span> * @see <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#SunJCEProvider"><a name="line.113"></a> +<span class="sourceLineNo">114</span> * Java 8 Cryptography Architecture Sun Providers Documentation</a><a name="line.114"></a> +<span class="sourceLineNo">115</span> * @see <a href=<a name="line.115"></a> +<span class="sourceLineNo">116</span> * "http://docs.oracle.com/javase/9/security/oracleproviders.htm#JSSEC-GUID-A47B1249-593C-4C38-A0D0-68FA7681E0A7"><a name="line.116"></a> +<span class="sourceLineNo">117</span> * Java 9 Cryptography Architecture Sun Providers Documentation</a><a name="line.117"></a> +<span class="sourceLineNo">118</span> * @return The algorithm name ("HmacSHA512" for example)<a name="line.118"></a> +<span class="sourceLineNo">119</span> */<a name="line.119"></a> +<span class="sourceLineNo">120</span> @Override<a name="line.120"></a> +<span class="sourceLineNo">121</span> public String toString() {<a name="line.121"></a> +<span class="sourceLineNo">122</span> return name;<a name="line.122"></a> +<span class="sourceLineNo">123</span> }<a name="line.123"></a> +<span class="sourceLineNo">124</span><a name="line.124"></a> +<span class="sourceLineNo">125</span>}<a name="line.125"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/HmacUtils.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/HmacUtils.html new file mode 100644 index 0000000000000000000000000000000000000000..a79332cd47e6686667dd3f7556e295bf5d51dad8 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/HmacUtils.html @@ -0,0 +1,1156 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.digest;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.BufferedInputStream;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.io.File;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.io.FileInputStream;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.io.IOException;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.io.InputStream;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.nio.ByteBuffer;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.security.InvalidKeyException;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import java.security.Key;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import java.security.NoSuchAlgorithmException;<a name="line.28"></a> +<span class="sourceLineNo">029</span><a name="line.29"></a> +<span class="sourceLineNo">030</span>import javax.crypto.Mac;<a name="line.30"></a> +<span class="sourceLineNo">031</span>import javax.crypto.spec.SecretKeySpec;<a name="line.31"></a> +<span class="sourceLineNo">032</span><a name="line.32"></a> +<span class="sourceLineNo">033</span>import org.apache.commons.codec.binary.Hex;<a name="line.33"></a> +<span class="sourceLineNo">034</span>import org.apache.commons.codec.binary.StringUtils;<a name="line.34"></a> +<span class="sourceLineNo">035</span><a name="line.35"></a> +<span class="sourceLineNo">036</span>/**<a name="line.36"></a> +<span class="sourceLineNo">037</span> * Simplifies common {@link javax.crypto.Mac} tasks. This class is immutable and thread-safe.<a name="line.37"></a> +<span class="sourceLineNo">038</span> * However the Mac may not be.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <strong>Note: Not all JCE implementations support all algorithms. If not supported, an IllegalArgumentException is<a name="line.40"></a> +<span class="sourceLineNo">041</span> * thrown.</strong><a name="line.41"></a> +<span class="sourceLineNo">042</span> * <p><a name="line.42"></a> +<span class="sourceLineNo">043</span> * Sample usage:<a name="line.43"></a> +<span class="sourceLineNo">044</span> * <pre><a name="line.44"></a> +<span class="sourceLineNo">045</span> * import static HmacAlgorithms.*;<a name="line.45"></a> +<span class="sourceLineNo">046</span> * byte[] key = {1,2,3,4}; // don't use this actual key!<a name="line.46"></a> +<span class="sourceLineNo">047</span> * String valueToDigest = "The quick brown fox jumps over the lazy dog";<a name="line.47"></a> +<span class="sourceLineNo">048</span> * byte[] hmac = new HmacUtils(HMAC_SHA_224, key).hmac(valueToDigest);<a name="line.48"></a> +<span class="sourceLineNo">049</span> * // Mac re-use<a name="line.49"></a> +<span class="sourceLineNo">050</span> * HmacUtils hm1 = new HmacUtils("HmacAlgoName", key); // use a valid name here!<a name="line.50"></a> +<span class="sourceLineNo">051</span> * String hexPom = hm1.hmacHex(new File("pom.xml"));<a name="line.51"></a> +<span class="sourceLineNo">052</span> * String hexNot = hm1.hmacHex(new File("NOTICE.txt"));<a name="line.52"></a> +<span class="sourceLineNo">053</span> * </pre><a name="line.53"></a> +<span class="sourceLineNo">054</span> * @since 1.10<a name="line.54"></a> +<span class="sourceLineNo">055</span> */<a name="line.55"></a> +<span class="sourceLineNo">056</span>public final class HmacUtils {<a name="line.56"></a> +<span class="sourceLineNo">057</span><a name="line.57"></a> +<span class="sourceLineNo">058</span> private static final int STREAM_BUFFER_LENGTH = 1024;<a name="line.58"></a> +<span class="sourceLineNo">059</span><a name="line.59"></a> +<span class="sourceLineNo">060</span> /**<a name="line.60"></a> +<span class="sourceLineNo">061</span> * Returns whether this algorithm is available<a name="line.61"></a> +<span class="sourceLineNo">062</span> *<a name="line.62"></a> +<span class="sourceLineNo">063</span> *@param name the name to check<a name="line.63"></a> +<span class="sourceLineNo">064</span> * @return whether this algorithm is available<a name="line.64"></a> +<span class="sourceLineNo">065</span> * @since 1.11<a name="line.65"></a> +<span class="sourceLineNo">066</span> */<a name="line.66"></a> +<span class="sourceLineNo">067</span> public static boolean isAvailable(final String name) {<a name="line.67"></a> +<span class="sourceLineNo">068</span> try {<a name="line.68"></a> +<span class="sourceLineNo">069</span> Mac.getInstance(name);<a name="line.69"></a> +<span class="sourceLineNo">070</span> return true;<a name="line.70"></a> +<span class="sourceLineNo">071</span> } catch (final NoSuchAlgorithmException e) {<a name="line.71"></a> +<span class="sourceLineNo">072</span> return false;<a name="line.72"></a> +<span class="sourceLineNo">073</span> }<a name="line.73"></a> +<span class="sourceLineNo">074</span> }<a name="line.74"></a> +<span class="sourceLineNo">075</span><a name="line.75"></a> +<span class="sourceLineNo">076</span> /**<a name="line.76"></a> +<span class="sourceLineNo">077</span> * Returns whether this algorithm is available<a name="line.77"></a> +<span class="sourceLineNo">078</span> *<a name="line.78"></a> +<span class="sourceLineNo">079</span> *@param name the name to check<a name="line.79"></a> +<span class="sourceLineNo">080</span> * @return whether this algorithm is available<a name="line.80"></a> +<span class="sourceLineNo">081</span> * @since 1.11<a name="line.81"></a> +<span class="sourceLineNo">082</span> */<a name="line.82"></a> +<span class="sourceLineNo">083</span> public static boolean isAvailable(final HmacAlgorithms name) {<a name="line.83"></a> +<span class="sourceLineNo">084</span> try {<a name="line.84"></a> +<span class="sourceLineNo">085</span> Mac.getInstance(name.getName());<a name="line.85"></a> +<span class="sourceLineNo">086</span> return true;<a name="line.86"></a> +<span class="sourceLineNo">087</span> } catch (final NoSuchAlgorithmException e) {<a name="line.87"></a> +<span class="sourceLineNo">088</span> return false;<a name="line.88"></a> +<span class="sourceLineNo">089</span> }<a name="line.89"></a> +<span class="sourceLineNo">090</span> }<a name="line.90"></a> +<span class="sourceLineNo">091</span><a name="line.91"></a> +<span class="sourceLineNo">092</span> /**<a name="line.92"></a> +<span class="sourceLineNo">093</span> * Returns an initialized {@code Mac} for the HmacMD5 algorithm.<a name="line.93"></a> +<span class="sourceLineNo">094</span> * <p><a name="line.94"></a> +<span class="sourceLineNo">095</span> * Every implementation of the Java platform is required to support this standard Mac algorithm.<a name="line.95"></a> +<span class="sourceLineNo">096</span> * </p><a name="line.96"></a> +<span class="sourceLineNo">097</span> *<a name="line.97"></a> +<span class="sourceLineNo">098</span> * @param key<a name="line.98"></a> +<span class="sourceLineNo">099</span> * The key for the keyed digest (must not be null)<a name="line.99"></a> +<span class="sourceLineNo">100</span> * @return A Mac instance initialized with the given key.<a name="line.100"></a> +<span class="sourceLineNo">101</span> * @see Mac#getInstance(String)<a name="line.101"></a> +<span class="sourceLineNo">102</span> * @see Mac#init(Key)<a name="line.102"></a> +<span class="sourceLineNo">103</span> * @throws IllegalArgumentException<a name="line.103"></a> +<span class="sourceLineNo">104</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.104"></a> +<span class="sourceLineNo">105</span> * @deprecated (1.11) Use {@code getInitializedMac(HmacAlgorithms.HMAC_MD5, byte[])}<a name="line.105"></a> +<span class="sourceLineNo">106</span> */<a name="line.106"></a> +<span class="sourceLineNo">107</span> @Deprecated<a name="line.107"></a> +<span class="sourceLineNo">108</span> public static Mac getHmacMd5(final byte[] key) {<a name="line.108"></a> +<span class="sourceLineNo">109</span> return getInitializedMac(HmacAlgorithms.HMAC_MD5, key);<a name="line.109"></a> +<span class="sourceLineNo">110</span> }<a name="line.110"></a> +<span class="sourceLineNo">111</span><a name="line.111"></a> +<span class="sourceLineNo">112</span> /**<a name="line.112"></a> +<span class="sourceLineNo">113</span> * Returns an initialized {@code Mac} for the HmacSHA1 algorithm.<a name="line.113"></a> +<span class="sourceLineNo">114</span> * <p><a name="line.114"></a> +<span class="sourceLineNo">115</span> * Every implementation of the Java platform is required to support this standard Mac algorithm.<a name="line.115"></a> +<span class="sourceLineNo">116</span> * </p><a name="line.116"></a> +<span class="sourceLineNo">117</span> *<a name="line.117"></a> +<span class="sourceLineNo">118</span> * @param key<a name="line.118"></a> +<span class="sourceLineNo">119</span> * The key for the keyed digest (must not be null)<a name="line.119"></a> +<span class="sourceLineNo">120</span> * @return A Mac instance initialized with the given key.<a name="line.120"></a> +<span class="sourceLineNo">121</span> * @see Mac#getInstance(String)<a name="line.121"></a> +<span class="sourceLineNo">122</span> * @see Mac#init(Key)<a name="line.122"></a> +<span class="sourceLineNo">123</span> * @throws IllegalArgumentException<a name="line.123"></a> +<span class="sourceLineNo">124</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.124"></a> +<span class="sourceLineNo">125</span> * @deprecated (1.11) Use {@code getInitializedMac(HmacAlgorithms.HMAC_SHA_1, byte[])}<a name="line.125"></a> +<span class="sourceLineNo">126</span> */<a name="line.126"></a> +<span class="sourceLineNo">127</span> @Deprecated<a name="line.127"></a> +<span class="sourceLineNo">128</span> public static Mac getHmacSha1(final byte[] key) {<a name="line.128"></a> +<span class="sourceLineNo">129</span> return getInitializedMac(HmacAlgorithms.HMAC_SHA_1, key);<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> /**<a name="line.132"></a> +<span class="sourceLineNo">133</span> * Returns an initialized {@code Mac} for the HmacSHA256 algorithm.<a name="line.133"></a> +<span class="sourceLineNo">134</span> * <p><a name="line.134"></a> +<span class="sourceLineNo">135</span> * Every implementation of the Java platform is required to support this standard Mac algorithm.<a name="line.135"></a> +<span class="sourceLineNo">136</span> * </p><a name="line.136"></a> +<span class="sourceLineNo">137</span> *<a name="line.137"></a> +<span class="sourceLineNo">138</span> * @param key<a name="line.138"></a> +<span class="sourceLineNo">139</span> * The key for the keyed digest (must not be null)<a name="line.139"></a> +<span class="sourceLineNo">140</span> * @return A Mac instance initialized with the given key.<a name="line.140"></a> +<span class="sourceLineNo">141</span> * @see Mac#getInstance(String)<a name="line.141"></a> +<span class="sourceLineNo">142</span> * @see Mac#init(Key)<a name="line.142"></a> +<span class="sourceLineNo">143</span> * @throws IllegalArgumentException<a name="line.143"></a> +<span class="sourceLineNo">144</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.144"></a> +<span class="sourceLineNo">145</span> * @deprecated (1.11) Use {@code getInitializedMac(HmacAlgorithms.HMAC_SHA_256, byte[])}<a name="line.145"></a> +<span class="sourceLineNo">146</span> */<a name="line.146"></a> +<span class="sourceLineNo">147</span> @Deprecated<a name="line.147"></a> +<span class="sourceLineNo">148</span> public static Mac getHmacSha256(final byte[] key) {<a name="line.148"></a> +<span class="sourceLineNo">149</span> return getInitializedMac(HmacAlgorithms.HMAC_SHA_256, key);<a name="line.149"></a> +<span class="sourceLineNo">150</span> }<a name="line.150"></a> +<span class="sourceLineNo">151</span><a name="line.151"></a> +<span class="sourceLineNo">152</span> /**<a name="line.152"></a> +<span class="sourceLineNo">153</span> * Returns an initialized {@code Mac} for the HmacSHA384 algorithm.<a name="line.153"></a> +<span class="sourceLineNo">154</span> * <p><a name="line.154"></a> +<span class="sourceLineNo">155</span> * Every implementation of the Java platform is <em>not</em> required to support this Mac algorithm.<a name="line.155"></a> +<span class="sourceLineNo">156</span> * </p><a name="line.156"></a> +<span class="sourceLineNo">157</span> *<a name="line.157"></a> +<span class="sourceLineNo">158</span> * @param key<a name="line.158"></a> +<span class="sourceLineNo">159</span> * The key for the keyed digest (must not be null)<a name="line.159"></a> +<span class="sourceLineNo">160</span> * @return A Mac instance initialized with the given key.<a name="line.160"></a> +<span class="sourceLineNo">161</span> * @see Mac#getInstance(String)<a name="line.161"></a> +<span class="sourceLineNo">162</span> * @see Mac#init(Key)<a name="line.162"></a> +<span class="sourceLineNo">163</span> * @throws IllegalArgumentException<a name="line.163"></a> +<span class="sourceLineNo">164</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.164"></a> +<span class="sourceLineNo">165</span> * @deprecated (1.11) Use {@code getInitializedMac(HmacAlgorithms.HMAC_SHA_384, byte[])}<a name="line.165"></a> +<span class="sourceLineNo">166</span> */<a name="line.166"></a> +<span class="sourceLineNo">167</span> @Deprecated<a name="line.167"></a> +<span class="sourceLineNo">168</span> public static Mac getHmacSha384(final byte[] key) {<a name="line.168"></a> +<span class="sourceLineNo">169</span> return getInitializedMac(HmacAlgorithms.HMAC_SHA_384, key);<a name="line.169"></a> +<span class="sourceLineNo">170</span> }<a name="line.170"></a> +<span class="sourceLineNo">171</span><a name="line.171"></a> +<span class="sourceLineNo">172</span> /**<a name="line.172"></a> +<span class="sourceLineNo">173</span> * Returns an initialized {@code Mac} for the HmacSHA512 algorithm.<a name="line.173"></a> +<span class="sourceLineNo">174</span> * <p><a name="line.174"></a> +<span class="sourceLineNo">175</span> * Every implementation of the Java platform is <em>not</em> required to support this Mac algorithm.<a name="line.175"></a> +<span class="sourceLineNo">176</span> * </p><a name="line.176"></a> +<span class="sourceLineNo">177</span> *<a name="line.177"></a> +<span class="sourceLineNo">178</span> * @param key<a name="line.178"></a> +<span class="sourceLineNo">179</span> * The key for the keyed digest (must not be null)<a name="line.179"></a> +<span class="sourceLineNo">180</span> * @return A Mac instance initialized with the given key.<a name="line.180"></a> +<span class="sourceLineNo">181</span> * @see Mac#getInstance(String)<a name="line.181"></a> +<span class="sourceLineNo">182</span> * @see Mac#init(Key)<a name="line.182"></a> +<span class="sourceLineNo">183</span> * @throws IllegalArgumentException<a name="line.183"></a> +<span class="sourceLineNo">184</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.184"></a> +<span class="sourceLineNo">185</span> * @deprecated (1.11) Use {@code getInitializedMac(HmacAlgorithms.HMAC_SHA_512, byte[])}<a name="line.185"></a> +<span class="sourceLineNo">186</span> */<a name="line.186"></a> +<span class="sourceLineNo">187</span> @Deprecated<a name="line.187"></a> +<span class="sourceLineNo">188</span> public static Mac getHmacSha512(final byte[] key) {<a name="line.188"></a> +<span class="sourceLineNo">189</span> return getInitializedMac(HmacAlgorithms.HMAC_SHA_512, key);<a name="line.189"></a> +<span class="sourceLineNo">190</span> }<a name="line.190"></a> +<span class="sourceLineNo">191</span><a name="line.191"></a> +<span class="sourceLineNo">192</span> /**<a name="line.192"></a> +<span class="sourceLineNo">193</span> * Returns an initialized {@code Mac} for the given {@code algorithm}.<a name="line.193"></a> +<span class="sourceLineNo">194</span> *<a name="line.194"></a> +<span class="sourceLineNo">195</span> * @param algorithm<a name="line.195"></a> +<span class="sourceLineNo">196</span> * the name of the algorithm requested. See<a name="line.196"></a> +<span class="sourceLineNo">197</span> * <a href= "http://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA"<a name="line.197"></a> +<span class="sourceLineNo">198</span> * >Appendix A in the Java Cryptography Architecture Reference Guide</a> for information about standard<a name="line.198"></a> +<span class="sourceLineNo">199</span> * algorithm names.<a name="line.199"></a> +<span class="sourceLineNo">200</span> * @param key<a name="line.200"></a> +<span class="sourceLineNo">201</span> * The key for the keyed digest (must not be null)<a name="line.201"></a> +<span class="sourceLineNo">202</span> * @return A Mac instance initialized with the given key.<a name="line.202"></a> +<span class="sourceLineNo">203</span> * @see Mac#getInstance(String)<a name="line.203"></a> +<span class="sourceLineNo">204</span> * @see Mac#init(Key)<a name="line.204"></a> +<span class="sourceLineNo">205</span> * @throws IllegalArgumentException<a name="line.205"></a> +<span class="sourceLineNo">206</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.206"></a> +<span class="sourceLineNo">207</span> */<a name="line.207"></a> +<span class="sourceLineNo">208</span> public static Mac getInitializedMac(final HmacAlgorithms algorithm, final byte[] key) {<a name="line.208"></a> +<span class="sourceLineNo">209</span> return getInitializedMac(algorithm.getName(), key);<a name="line.209"></a> +<span class="sourceLineNo">210</span> }<a name="line.210"></a> +<span class="sourceLineNo">211</span><a name="line.211"></a> +<span class="sourceLineNo">212</span> /**<a name="line.212"></a> +<span class="sourceLineNo">213</span> * Returns an initialized {@code Mac} for the given {@code algorithm}.<a name="line.213"></a> +<span class="sourceLineNo">214</span> *<a name="line.214"></a> +<span class="sourceLineNo">215</span> * @param algorithm<a name="line.215"></a> +<span class="sourceLineNo">216</span> * the name of the algorithm requested. See<a name="line.216"></a> +<span class="sourceLineNo">217</span> * <a href= "http://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA"<a name="line.217"></a> +<span class="sourceLineNo">218</span> * >Appendix A in the Java Cryptography Architecture Reference Guide</a> for information about standard<a name="line.218"></a> +<span class="sourceLineNo">219</span> * algorithm names.<a name="line.219"></a> +<span class="sourceLineNo">220</span> * @param key<a name="line.220"></a> +<span class="sourceLineNo">221</span> * The key for the keyed digest (must not be null)<a name="line.221"></a> +<span class="sourceLineNo">222</span> * @return A Mac instance initialized with the given key.<a name="line.222"></a> +<span class="sourceLineNo">223</span> * @see Mac#getInstance(String)<a name="line.223"></a> +<span class="sourceLineNo">224</span> * @see Mac#init(Key)<a name="line.224"></a> +<span class="sourceLineNo">225</span> * @throws IllegalArgumentException<a name="line.225"></a> +<span class="sourceLineNo">226</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.226"></a> +<span class="sourceLineNo">227</span> */<a name="line.227"></a> +<span class="sourceLineNo">228</span> public static Mac getInitializedMac(final String algorithm, final byte[] key) {<a name="line.228"></a> +<span class="sourceLineNo">229</span><a name="line.229"></a> +<span class="sourceLineNo">230</span> if (key == null) {<a name="line.230"></a> +<span class="sourceLineNo">231</span> throw new IllegalArgumentException("Null key");<a name="line.231"></a> +<span class="sourceLineNo">232</span> }<a name="line.232"></a> +<span class="sourceLineNo">233</span><a name="line.233"></a> +<span class="sourceLineNo">234</span> try {<a name="line.234"></a> +<span class="sourceLineNo">235</span> final SecretKeySpec keySpec = new SecretKeySpec(key, algorithm);<a name="line.235"></a> +<span class="sourceLineNo">236</span> final Mac mac = Mac.getInstance(algorithm);<a name="line.236"></a> +<span class="sourceLineNo">237</span> mac.init(keySpec);<a name="line.237"></a> +<span class="sourceLineNo">238</span> return mac;<a name="line.238"></a> +<span class="sourceLineNo">239</span> } catch (final NoSuchAlgorithmException e) {<a name="line.239"></a> +<span class="sourceLineNo">240</span> throw new IllegalArgumentException(e);<a name="line.240"></a> +<span class="sourceLineNo">241</span> } catch (final InvalidKeyException e) {<a name="line.241"></a> +<span class="sourceLineNo">242</span> throw new IllegalArgumentException(e);<a name="line.242"></a> +<span class="sourceLineNo">243</span> }<a name="line.243"></a> +<span class="sourceLineNo">244</span> }<a name="line.244"></a> +<span class="sourceLineNo">245</span><a name="line.245"></a> +<span class="sourceLineNo">246</span> // hmacMd5<a name="line.246"></a> +<span class="sourceLineNo">247</span><a name="line.247"></a> +<span class="sourceLineNo">248</span> /**<a name="line.248"></a> +<span class="sourceLineNo">249</span> * Returns a HmacMD5 Message Authentication Code (MAC) for the given key and value.<a name="line.249"></a> +<span class="sourceLineNo">250</span> *<a name="line.250"></a> +<span class="sourceLineNo">251</span> * @param key<a name="line.251"></a> +<span class="sourceLineNo">252</span> * The key for the keyed digest (must not be null)<a name="line.252"></a> +<span class="sourceLineNo">253</span> * @param valueToDigest<a name="line.253"></a> +<span class="sourceLineNo">254</span> * The value (data) which should to digest (maybe empty or null)<a name="line.254"></a> +<span class="sourceLineNo">255</span> * @return HmacMD5 MAC for the given key and value<a name="line.255"></a> +<span class="sourceLineNo">256</span> * @throws IllegalArgumentException<a name="line.256"></a> +<span class="sourceLineNo">257</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.257"></a> +<span class="sourceLineNo">258</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmac(byte[])}<a name="line.258"></a> +<span class="sourceLineNo">259</span> */<a name="line.259"></a> +<span class="sourceLineNo">260</span> @Deprecated<a name="line.260"></a> +<span class="sourceLineNo">261</span> public static byte[] hmacMd5(final byte[] key, final byte[] valueToDigest) {<a name="line.261"></a> +<span class="sourceLineNo">262</span> return new HmacUtils(HmacAlgorithms.HMAC_MD5, key).hmac(valueToDigest);<a name="line.262"></a> +<span class="sourceLineNo">263</span> }<a name="line.263"></a> +<span class="sourceLineNo">264</span><a name="line.264"></a> +<span class="sourceLineNo">265</span> /**<a name="line.265"></a> +<span class="sourceLineNo">266</span> * Returns a HmacMD5 Message Authentication Code (MAC) for the given key and value.<a name="line.266"></a> +<span class="sourceLineNo">267</span> *<a name="line.267"></a> +<span class="sourceLineNo">268</span> * @param key<a name="line.268"></a> +<span class="sourceLineNo">269</span> * The key for the keyed digest (must not be null)<a name="line.269"></a> +<span class="sourceLineNo">270</span> * @param valueToDigest<a name="line.270"></a> +<span class="sourceLineNo">271</span> * The value (data) which should to digest<a name="line.271"></a> +<span class="sourceLineNo">272</span> * <p><a name="line.272"></a> +<span class="sourceLineNo">273</span> * The InputStream must not be null and will not be closed<a name="line.273"></a> +<span class="sourceLineNo">274</span> * </p><a name="line.274"></a> +<span class="sourceLineNo">275</span> * @return HmacMD5 MAC for the given key and value<a name="line.275"></a> +<span class="sourceLineNo">276</span> * @throws IOException<a name="line.276"></a> +<span class="sourceLineNo">277</span> * If an I/O error occurs.<a name="line.277"></a> +<span class="sourceLineNo">278</span> * @throws IllegalArgumentException<a name="line.278"></a> +<span class="sourceLineNo">279</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.279"></a> +<span class="sourceLineNo">280</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmac(InputStream)}<a name="line.280"></a> +<span class="sourceLineNo">281</span> */<a name="line.281"></a> +<span class="sourceLineNo">282</span> @Deprecated<a name="line.282"></a> +<span class="sourceLineNo">283</span> public static byte[] hmacMd5(final byte[] key, final InputStream valueToDigest) throws IOException {<a name="line.283"></a> +<span class="sourceLineNo">284</span> return new HmacUtils(HmacAlgorithms.HMAC_MD5, key).hmac(valueToDigest);<a name="line.284"></a> +<span class="sourceLineNo">285</span> }<a name="line.285"></a> +<span class="sourceLineNo">286</span><a name="line.286"></a> +<span class="sourceLineNo">287</span> /**<a name="line.287"></a> +<span class="sourceLineNo">288</span> * Returns a HmacMD5 Message Authentication Code (MAC) for the given key and value.<a name="line.288"></a> +<span class="sourceLineNo">289</span> *<a name="line.289"></a> +<span class="sourceLineNo">290</span> * @param key<a name="line.290"></a> +<span class="sourceLineNo">291</span> * The key for the keyed digest (must not be null)<a name="line.291"></a> +<span class="sourceLineNo">292</span> * @param valueToDigest<a name="line.292"></a> +<span class="sourceLineNo">293</span> * The value (data) which should to digest (maybe empty or null)<a name="line.293"></a> +<span class="sourceLineNo">294</span> * @return HmacMD5 MAC for the given key and value<a name="line.294"></a> +<span class="sourceLineNo">295</span> * @throws IllegalArgumentException<a name="line.295"></a> +<span class="sourceLineNo">296</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.296"></a> +<span class="sourceLineNo">297</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_MD5, String).hmac(String)}<a name="line.297"></a> +<span class="sourceLineNo">298</span> */<a name="line.298"></a> +<span class="sourceLineNo">299</span> @Deprecated<a name="line.299"></a> +<span class="sourceLineNo">300</span> public static byte[] hmacMd5(final String key, final String valueToDigest) {<a name="line.300"></a> +<span class="sourceLineNo">301</span> return new HmacUtils(HmacAlgorithms.HMAC_MD5, key).hmac(valueToDigest);<a name="line.301"></a> +<span class="sourceLineNo">302</span> }<a name="line.302"></a> +<span class="sourceLineNo">303</span><a name="line.303"></a> +<span class="sourceLineNo">304</span> /**<a name="line.304"></a> +<span class="sourceLineNo">305</span> * Returns a HmacMD5 Message Authentication Code (MAC) as a hex string (lowercase) for the given key and value.<a name="line.305"></a> +<span class="sourceLineNo">306</span> *<a name="line.306"></a> +<span class="sourceLineNo">307</span> * @param key<a name="line.307"></a> +<span class="sourceLineNo">308</span> * The key for the keyed digest (must not be null)<a name="line.308"></a> +<span class="sourceLineNo">309</span> * @param valueToDigest<a name="line.309"></a> +<span class="sourceLineNo">310</span> * The value (data) which should to digest (maybe empty or null)<a name="line.310"></a> +<span class="sourceLineNo">311</span> * @return HmacMD5 MAC for the given key and value as a hex string (lowercase)<a name="line.311"></a> +<span class="sourceLineNo">312</span> * @throws IllegalArgumentException<a name="line.312"></a> +<span class="sourceLineNo">313</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.313"></a> +<span class="sourceLineNo">314</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmacHex(byte[])}<a name="line.314"></a> +<span class="sourceLineNo">315</span> */<a name="line.315"></a> +<span class="sourceLineNo">316</span> @Deprecated<a name="line.316"></a> +<span class="sourceLineNo">317</span> public static String hmacMd5Hex(final byte[] key, final byte[] valueToDigest) {<a name="line.317"></a> +<span class="sourceLineNo">318</span> return new HmacUtils(HmacAlgorithms.HMAC_MD5, key).hmacHex(valueToDigest);<a name="line.318"></a> +<span class="sourceLineNo">319</span> }<a name="line.319"></a> +<span class="sourceLineNo">320</span><a name="line.320"></a> +<span class="sourceLineNo">321</span> /**<a name="line.321"></a> +<span class="sourceLineNo">322</span> * Returns a HmacMD5 Message Authentication Code (MAC) as a hex string (lowercase) for the given key and value.<a name="line.322"></a> +<span class="sourceLineNo">323</span> *<a name="line.323"></a> +<span class="sourceLineNo">324</span> * @param key<a name="line.324"></a> +<span class="sourceLineNo">325</span> * The key for the keyed digest (must not be null)<a name="line.325"></a> +<span class="sourceLineNo">326</span> * @param valueToDigest<a name="line.326"></a> +<span class="sourceLineNo">327</span> * The value (data) which should to digest<a name="line.327"></a> +<span class="sourceLineNo">328</span> * <p><a name="line.328"></a> +<span class="sourceLineNo">329</span> * The InputStream must not be null and will not be closed<a name="line.329"></a> +<span class="sourceLineNo">330</span> * </p><a name="line.330"></a> +<span class="sourceLineNo">331</span> * @return HmacMD5 MAC for the given key and value as a hex string (lowercase)<a name="line.331"></a> +<span class="sourceLineNo">332</span> * @throws IOException<a name="line.332"></a> +<span class="sourceLineNo">333</span> * If an I/O error occurs.<a name="line.333"></a> +<span class="sourceLineNo">334</span> * @throws IllegalArgumentException<a name="line.334"></a> +<span class="sourceLineNo">335</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.335"></a> +<span class="sourceLineNo">336</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_MD5, byte[]).hmacHex(InputStream)}<a name="line.336"></a> +<span class="sourceLineNo">337</span> */<a name="line.337"></a> +<span class="sourceLineNo">338</span> @Deprecated<a name="line.338"></a> +<span class="sourceLineNo">339</span> public static String hmacMd5Hex(final byte[] key, final InputStream valueToDigest) throws IOException {<a name="line.339"></a> +<span class="sourceLineNo">340</span> return new HmacUtils(HmacAlgorithms.HMAC_MD5, key).hmacHex(valueToDigest);<a name="line.340"></a> +<span class="sourceLineNo">341</span> }<a name="line.341"></a> +<span class="sourceLineNo">342</span><a name="line.342"></a> +<span class="sourceLineNo">343</span> /**<a name="line.343"></a> +<span class="sourceLineNo">344</span> * Returns a HmacMD5 Message Authentication Code (MAC) as a hex string (lowercase) for the given key and value.<a name="line.344"></a> +<span class="sourceLineNo">345</span> *<a name="line.345"></a> +<span class="sourceLineNo">346</span> * @param key<a name="line.346"></a> +<span class="sourceLineNo">347</span> * The key for the keyed digest (must not be null)<a name="line.347"></a> +<span class="sourceLineNo">348</span> * @param valueToDigest<a name="line.348"></a> +<span class="sourceLineNo">349</span> * The value (data) which should to digest (maybe empty or null)<a name="line.349"></a> +<span class="sourceLineNo">350</span> * @return HmacMD5 MAC for the given key and value as a hex string (lowercase)<a name="line.350"></a> +<span class="sourceLineNo">351</span> * @throws IllegalArgumentException<a name="line.351"></a> +<span class="sourceLineNo">352</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.352"></a> +<span class="sourceLineNo">353</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_MD5, String).hmacHex(String)}<a name="line.353"></a> +<span class="sourceLineNo">354</span> */<a name="line.354"></a> +<span class="sourceLineNo">355</span> @Deprecated<a name="line.355"></a> +<span class="sourceLineNo">356</span> public static String hmacMd5Hex(final String key, final String valueToDigest) {<a name="line.356"></a> +<span class="sourceLineNo">357</span> return new HmacUtils(HmacAlgorithms.HMAC_MD5, key).hmacHex(valueToDigest);<a name="line.357"></a> +<span class="sourceLineNo">358</span> }<a name="line.358"></a> +<span class="sourceLineNo">359</span><a name="line.359"></a> +<span class="sourceLineNo">360</span> // hmacSha1<a name="line.360"></a> +<span class="sourceLineNo">361</span><a name="line.361"></a> +<span class="sourceLineNo">362</span> /**<a name="line.362"></a> +<span class="sourceLineNo">363</span> * Returns a HmacSHA1 Message Authentication Code (MAC) for the given key and value.<a name="line.363"></a> +<span class="sourceLineNo">364</span> *<a name="line.364"></a> +<span class="sourceLineNo">365</span> * @param key<a name="line.365"></a> +<span class="sourceLineNo">366</span> * The key for the keyed digest (must not be null)<a name="line.366"></a> +<span class="sourceLineNo">367</span> * @param valueToDigest<a name="line.367"></a> +<span class="sourceLineNo">368</span> * The value (data) which should to digest (maybe empty or null)<a name="line.368"></a> +<span class="sourceLineNo">369</span> * @return HmacSHA1 MAC for the given key and value<a name="line.369"></a> +<span class="sourceLineNo">370</span> * @throws IllegalArgumentException<a name="line.370"></a> +<span class="sourceLineNo">371</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.371"></a> +<span class="sourceLineNo">372</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmac(byte[])}<a name="line.372"></a> +<span class="sourceLineNo">373</span> */<a name="line.373"></a> +<span class="sourceLineNo">374</span> @Deprecated<a name="line.374"></a> +<span class="sourceLineNo">375</span> public static byte[] hmacSha1(final byte[] key, final byte[] valueToDigest) {<a name="line.375"></a> +<span class="sourceLineNo">376</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_1, key).hmac(valueToDigest);<a name="line.376"></a> +<span class="sourceLineNo">377</span> }<a name="line.377"></a> +<span class="sourceLineNo">378</span><a name="line.378"></a> +<span class="sourceLineNo">379</span> /**<a name="line.379"></a> +<span class="sourceLineNo">380</span> * Returns a HmacSHA1 Message Authentication Code (MAC) for the given key and value.<a name="line.380"></a> +<span class="sourceLineNo">381</span> *<a name="line.381"></a> +<span class="sourceLineNo">382</span> * @param key<a name="line.382"></a> +<span class="sourceLineNo">383</span> * The key for the keyed digest (must not be null)<a name="line.383"></a> +<span class="sourceLineNo">384</span> * @param valueToDigest<a name="line.384"></a> +<span class="sourceLineNo">385</span> * The value (data) which should to digest<a name="line.385"></a> +<span class="sourceLineNo">386</span> * <p><a name="line.386"></a> +<span class="sourceLineNo">387</span> * The InputStream must not be null and will not be closed<a name="line.387"></a> +<span class="sourceLineNo">388</span> * </p><a name="line.388"></a> +<span class="sourceLineNo">389</span> * @return HmacSHA1 MAC for the given key and value<a name="line.389"></a> +<span class="sourceLineNo">390</span> * @throws IOException<a name="line.390"></a> +<span class="sourceLineNo">391</span> * If an I/O error occurs.<a name="line.391"></a> +<span class="sourceLineNo">392</span> * @throws IllegalArgumentException<a name="line.392"></a> +<span class="sourceLineNo">393</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.393"></a> +<span class="sourceLineNo">394</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmac(InputStream)}<a name="line.394"></a> +<span class="sourceLineNo">395</span> */<a name="line.395"></a> +<span class="sourceLineNo">396</span> @Deprecated<a name="line.396"></a> +<span class="sourceLineNo">397</span> public static byte[] hmacSha1(final byte[] key, final InputStream valueToDigest) throws IOException {<a name="line.397"></a> +<span class="sourceLineNo">398</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_1, key).hmac(valueToDigest);<a name="line.398"></a> +<span class="sourceLineNo">399</span> }<a name="line.399"></a> +<span class="sourceLineNo">400</span><a name="line.400"></a> +<span class="sourceLineNo">401</span> /**<a name="line.401"></a> +<span class="sourceLineNo">402</span> * Returns a HmacSHA1 Message Authentication Code (MAC) for the given key and value.<a name="line.402"></a> +<span class="sourceLineNo">403</span> *<a name="line.403"></a> +<span class="sourceLineNo">404</span> * @param key<a name="line.404"></a> +<span class="sourceLineNo">405</span> * The key for the keyed digest (must not be null)<a name="line.405"></a> +<span class="sourceLineNo">406</span> * @param valueToDigest<a name="line.406"></a> +<span class="sourceLineNo">407</span> * The value (data) which should to digest (maybe empty or null)<a name="line.407"></a> +<span class="sourceLineNo">408</span> * @return HmacSHA1 MAC for the given key and value<a name="line.408"></a> +<span class="sourceLineNo">409</span> * @throws IllegalArgumentException<a name="line.409"></a> +<span class="sourceLineNo">410</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.410"></a> +<span class="sourceLineNo">411</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_1, String).hmac(String)}<a name="line.411"></a> +<span class="sourceLineNo">412</span> */<a name="line.412"></a> +<span class="sourceLineNo">413</span> @Deprecated<a name="line.413"></a> +<span class="sourceLineNo">414</span> public static byte[] hmacSha1(final String key, final String valueToDigest) {<a name="line.414"></a> +<span class="sourceLineNo">415</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_1, key).hmac(valueToDigest);<a name="line.415"></a> +<span class="sourceLineNo">416</span> }<a name="line.416"></a> +<span class="sourceLineNo">417</span><a name="line.417"></a> +<span class="sourceLineNo">418</span> /**<a name="line.418"></a> +<span class="sourceLineNo">419</span> * Returns a HmacSHA1 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.419"></a> +<span class="sourceLineNo">420</span> *<a name="line.420"></a> +<span class="sourceLineNo">421</span> * @param key<a name="line.421"></a> +<span class="sourceLineNo">422</span> * The key for the keyed digest (must not be null)<a name="line.422"></a> +<span class="sourceLineNo">423</span> * @param valueToDigest<a name="line.423"></a> +<span class="sourceLineNo">424</span> * The value (data) which should to digest (maybe empty or null)<a name="line.424"></a> +<span class="sourceLineNo">425</span> * @return HmacSHA1 MAC for the given key and value as hex string (lowercase)<a name="line.425"></a> +<span class="sourceLineNo">426</span> * @throws IllegalArgumentException<a name="line.426"></a> +<span class="sourceLineNo">427</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.427"></a> +<span class="sourceLineNo">428</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmacHex(byte[])}<a name="line.428"></a> +<span class="sourceLineNo">429</span> */<a name="line.429"></a> +<span class="sourceLineNo">430</span> @Deprecated<a name="line.430"></a> +<span class="sourceLineNo">431</span> public static String hmacSha1Hex(final byte[] key, final byte[] valueToDigest) {<a name="line.431"></a> +<span class="sourceLineNo">432</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_1, key).hmacHex(valueToDigest);<a name="line.432"></a> +<span class="sourceLineNo">433</span> }<a name="line.433"></a> +<span class="sourceLineNo">434</span><a name="line.434"></a> +<span class="sourceLineNo">435</span> /**<a name="line.435"></a> +<span class="sourceLineNo">436</span> * Returns a HmacSHA1 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.436"></a> +<span class="sourceLineNo">437</span> *<a name="line.437"></a> +<span class="sourceLineNo">438</span> * @param key<a name="line.438"></a> +<span class="sourceLineNo">439</span> * The key for the keyed digest (must not be null)<a name="line.439"></a> +<span class="sourceLineNo">440</span> * @param valueToDigest<a name="line.440"></a> +<span class="sourceLineNo">441</span> * The value (data) which should to digest<a name="line.441"></a> +<span class="sourceLineNo">442</span> * <p><a name="line.442"></a> +<span class="sourceLineNo">443</span> * The InputStream must not be null and will not be closed<a name="line.443"></a> +<span class="sourceLineNo">444</span> * </p><a name="line.444"></a> +<span class="sourceLineNo">445</span> * @return HmacSHA1 MAC for the given key and value as hex string (lowercase)<a name="line.445"></a> +<span class="sourceLineNo">446</span> * @throws IOException<a name="line.446"></a> +<span class="sourceLineNo">447</span> * If an I/O error occurs.<a name="line.447"></a> +<span class="sourceLineNo">448</span> * @throws IllegalArgumentException<a name="line.448"></a> +<span class="sourceLineNo">449</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.449"></a> +<span class="sourceLineNo">450</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_1, byte[]).hmacHex(InputStream)}<a name="line.450"></a> +<span class="sourceLineNo">451</span> */<a name="line.451"></a> +<span class="sourceLineNo">452</span> @Deprecated<a name="line.452"></a> +<span class="sourceLineNo">453</span> public static String hmacSha1Hex(final byte[] key, final InputStream valueToDigest) throws IOException {<a name="line.453"></a> +<span class="sourceLineNo">454</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_1, key).hmacHex(valueToDigest);<a name="line.454"></a> +<span class="sourceLineNo">455</span> }<a name="line.455"></a> +<span class="sourceLineNo">456</span><a name="line.456"></a> +<span class="sourceLineNo">457</span> /**<a name="line.457"></a> +<span class="sourceLineNo">458</span> * Returns a HmacSHA1 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.458"></a> +<span class="sourceLineNo">459</span> *<a name="line.459"></a> +<span class="sourceLineNo">460</span> * @param key<a name="line.460"></a> +<span class="sourceLineNo">461</span> * The key for the keyed digest (must not be null)<a name="line.461"></a> +<span class="sourceLineNo">462</span> * @param valueToDigest<a name="line.462"></a> +<span class="sourceLineNo">463</span> * The value (data) which should to digest (maybe empty or null)<a name="line.463"></a> +<span class="sourceLineNo">464</span> * @return HmacSHA1 MAC for the given key and value as hex string (lowercase)<a name="line.464"></a> +<span class="sourceLineNo">465</span> * @throws IllegalArgumentException<a name="line.465"></a> +<span class="sourceLineNo">466</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.466"></a> +<span class="sourceLineNo">467</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_1, String).hmacHex(String)}<a name="line.467"></a> +<span class="sourceLineNo">468</span> */<a name="line.468"></a> +<span class="sourceLineNo">469</span> @Deprecated<a name="line.469"></a> +<span class="sourceLineNo">470</span> public static String hmacSha1Hex(final String key, final String valueToDigest) {<a name="line.470"></a> +<span class="sourceLineNo">471</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_1, key).hmacHex(valueToDigest);<a name="line.471"></a> +<span class="sourceLineNo">472</span> }<a name="line.472"></a> +<span class="sourceLineNo">473</span><a name="line.473"></a> +<span class="sourceLineNo">474</span> // hmacSha256<a name="line.474"></a> +<span class="sourceLineNo">475</span><a name="line.475"></a> +<span class="sourceLineNo">476</span> /**<a name="line.476"></a> +<span class="sourceLineNo">477</span> * Returns a HmacSHA256 Message Authentication Code (MAC) for the given key and value.<a name="line.477"></a> +<span class="sourceLineNo">478</span> *<a name="line.478"></a> +<span class="sourceLineNo">479</span> * @param key<a name="line.479"></a> +<span class="sourceLineNo">480</span> * The key for the keyed digest (must not be null)<a name="line.480"></a> +<span class="sourceLineNo">481</span> * @param valueToDigest<a name="line.481"></a> +<span class="sourceLineNo">482</span> * The value (data) which should to digest (maybe empty or null)<a name="line.482"></a> +<span class="sourceLineNo">483</span> * @return HmacSHA256 MAC for the given key and value<a name="line.483"></a> +<span class="sourceLineNo">484</span> * @throws IllegalArgumentException<a name="line.484"></a> +<span class="sourceLineNo">485</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.485"></a> +<span class="sourceLineNo">486</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmac(byte[])}<a name="line.486"></a> +<span class="sourceLineNo">487</span> */<a name="line.487"></a> +<span class="sourceLineNo">488</span> @Deprecated<a name="line.488"></a> +<span class="sourceLineNo">489</span> public static byte[] hmacSha256(final byte[] key, final byte[] valueToDigest) {<a name="line.489"></a> +<span class="sourceLineNo">490</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_256, key).hmac(valueToDigest);<a name="line.490"></a> +<span class="sourceLineNo">491</span> }<a name="line.491"></a> +<span class="sourceLineNo">492</span><a name="line.492"></a> +<span class="sourceLineNo">493</span> /**<a name="line.493"></a> +<span class="sourceLineNo">494</span> * Returns a HmacSHA256 Message Authentication Code (MAC) for the given key and value.<a name="line.494"></a> +<span class="sourceLineNo">495</span> *<a name="line.495"></a> +<span class="sourceLineNo">496</span> * @param key<a name="line.496"></a> +<span class="sourceLineNo">497</span> * The key for the keyed digest (must not be null)<a name="line.497"></a> +<span class="sourceLineNo">498</span> * @param valueToDigest<a name="line.498"></a> +<span class="sourceLineNo">499</span> * The value (data) which should to digest<a name="line.499"></a> +<span class="sourceLineNo">500</span> * <p><a name="line.500"></a> +<span class="sourceLineNo">501</span> * The InputStream must not be null and will not be closed<a name="line.501"></a> +<span class="sourceLineNo">502</span> * </p><a name="line.502"></a> +<span class="sourceLineNo">503</span> * @return HmacSHA256 MAC for the given key and value<a name="line.503"></a> +<span class="sourceLineNo">504</span> * @throws IOException<a name="line.504"></a> +<span class="sourceLineNo">505</span> * If an I/O error occurs.<a name="line.505"></a> +<span class="sourceLineNo">506</span> * @throws IllegalArgumentException<a name="line.506"></a> +<span class="sourceLineNo">507</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.507"></a> +<span class="sourceLineNo">508</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmac(InputStream)}<a name="line.508"></a> +<span class="sourceLineNo">509</span> */<a name="line.509"></a> +<span class="sourceLineNo">510</span> @Deprecated<a name="line.510"></a> +<span class="sourceLineNo">511</span> public static byte[] hmacSha256(final byte[] key, final InputStream valueToDigest) throws IOException {<a name="line.511"></a> +<span class="sourceLineNo">512</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_256, key).hmac(valueToDigest);<a name="line.512"></a> +<span class="sourceLineNo">513</span> }<a name="line.513"></a> +<span class="sourceLineNo">514</span><a name="line.514"></a> +<span class="sourceLineNo">515</span> /**<a name="line.515"></a> +<span class="sourceLineNo">516</span> * Returns a HmacSHA256 Message Authentication Code (MAC) for the given key and value.<a name="line.516"></a> +<span class="sourceLineNo">517</span> *<a name="line.517"></a> +<span class="sourceLineNo">518</span> * @param key<a name="line.518"></a> +<span class="sourceLineNo">519</span> * The key for the keyed digest (must not be null)<a name="line.519"></a> +<span class="sourceLineNo">520</span> * @param valueToDigest<a name="line.520"></a> +<span class="sourceLineNo">521</span> * The value (data) which should to digest (maybe empty or null)<a name="line.521"></a> +<span class="sourceLineNo">522</span> * @return HmacSHA256 MAC for the given key and value<a name="line.522"></a> +<span class="sourceLineNo">523</span> * @throws IllegalArgumentException<a name="line.523"></a> +<span class="sourceLineNo">524</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.524"></a> +<span class="sourceLineNo">525</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_256, String).hmac(String)}<a name="line.525"></a> +<span class="sourceLineNo">526</span> */<a name="line.526"></a> +<span class="sourceLineNo">527</span> @Deprecated<a name="line.527"></a> +<span class="sourceLineNo">528</span> public static byte[] hmacSha256(final String key, final String valueToDigest) {<a name="line.528"></a> +<span class="sourceLineNo">529</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_256, key).hmac(valueToDigest);<a name="line.529"></a> +<span class="sourceLineNo">530</span> }<a name="line.530"></a> +<span class="sourceLineNo">531</span><a name="line.531"></a> +<span class="sourceLineNo">532</span> /**<a name="line.532"></a> +<span class="sourceLineNo">533</span> * Returns a HmacSHA256 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.533"></a> +<span class="sourceLineNo">534</span> *<a name="line.534"></a> +<span class="sourceLineNo">535</span> * @param key<a name="line.535"></a> +<span class="sourceLineNo">536</span> * The key for the keyed digest (must not be null)<a name="line.536"></a> +<span class="sourceLineNo">537</span> * @param valueToDigest<a name="line.537"></a> +<span class="sourceLineNo">538</span> * The value (data) which should to digest (maybe empty or null)<a name="line.538"></a> +<span class="sourceLineNo">539</span> * @return HmacSHA256 MAC for the given key and value as hex string (lowercase)<a name="line.539"></a> +<span class="sourceLineNo">540</span> * @throws IllegalArgumentException<a name="line.540"></a> +<span class="sourceLineNo">541</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.541"></a> +<span class="sourceLineNo">542</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmacHex(byte[])}<a name="line.542"></a> +<span class="sourceLineNo">543</span> */<a name="line.543"></a> +<span class="sourceLineNo">544</span> @Deprecated<a name="line.544"></a> +<span class="sourceLineNo">545</span> public static String hmacSha256Hex(final byte[] key, final byte[] valueToDigest) {<a name="line.545"></a> +<span class="sourceLineNo">546</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_256, key).hmacHex(valueToDigest);<a name="line.546"></a> +<span class="sourceLineNo">547</span> }<a name="line.547"></a> +<span class="sourceLineNo">548</span><a name="line.548"></a> +<span class="sourceLineNo">549</span> /**<a name="line.549"></a> +<span class="sourceLineNo">550</span> * Returns a HmacSHA256 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.550"></a> +<span class="sourceLineNo">551</span> *<a name="line.551"></a> +<span class="sourceLineNo">552</span> * @param key<a name="line.552"></a> +<span class="sourceLineNo">553</span> * The key for the keyed digest (must not be null)<a name="line.553"></a> +<span class="sourceLineNo">554</span> * @param valueToDigest<a name="line.554"></a> +<span class="sourceLineNo">555</span> * The value (data) which should to digest<a name="line.555"></a> +<span class="sourceLineNo">556</span> * <p><a name="line.556"></a> +<span class="sourceLineNo">557</span> * The InputStream must not be null and will not be closed<a name="line.557"></a> +<span class="sourceLineNo">558</span> * </p><a name="line.558"></a> +<span class="sourceLineNo">559</span> * @return HmacSHA256 MAC for the given key and value as hex string (lowercase)<a name="line.559"></a> +<span class="sourceLineNo">560</span> * @throws IOException<a name="line.560"></a> +<span class="sourceLineNo">561</span> * If an I/O error occurs.<a name="line.561"></a> +<span class="sourceLineNo">562</span> * @throws IllegalArgumentException<a name="line.562"></a> +<span class="sourceLineNo">563</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.563"></a> +<span class="sourceLineNo">564</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_256, byte[]).hmacHex(InputStream)}<a name="line.564"></a> +<span class="sourceLineNo">565</span> */<a name="line.565"></a> +<span class="sourceLineNo">566</span> @Deprecated<a name="line.566"></a> +<span class="sourceLineNo">567</span> public static String hmacSha256Hex(final byte[] key, final InputStream valueToDigest) throws IOException {<a name="line.567"></a> +<span class="sourceLineNo">568</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_256, key).hmacHex(valueToDigest);<a name="line.568"></a> +<span class="sourceLineNo">569</span> }<a name="line.569"></a> +<span class="sourceLineNo">570</span><a name="line.570"></a> +<span class="sourceLineNo">571</span> /**<a name="line.571"></a> +<span class="sourceLineNo">572</span> * Returns a HmacSHA256 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.572"></a> +<span class="sourceLineNo">573</span> *<a name="line.573"></a> +<span class="sourceLineNo">574</span> * @param key<a name="line.574"></a> +<span class="sourceLineNo">575</span> * The key for the keyed digest (must not be null)<a name="line.575"></a> +<span class="sourceLineNo">576</span> * @param valueToDigest<a name="line.576"></a> +<span class="sourceLineNo">577</span> * The value (data) which should to digest (maybe empty or null)<a name="line.577"></a> +<span class="sourceLineNo">578</span> * @return HmacSHA256 MAC for the given key and value as hex string (lowercase)<a name="line.578"></a> +<span class="sourceLineNo">579</span> * @throws IllegalArgumentException<a name="line.579"></a> +<span class="sourceLineNo">580</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.580"></a> +<span class="sourceLineNo">581</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_256, String).hmacHex(String)}<a name="line.581"></a> +<span class="sourceLineNo">582</span> */<a name="line.582"></a> +<span class="sourceLineNo">583</span> @Deprecated<a name="line.583"></a> +<span class="sourceLineNo">584</span> public static String hmacSha256Hex(final String key, final String valueToDigest) {<a name="line.584"></a> +<span class="sourceLineNo">585</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_256, key).hmacHex(valueToDigest);<a name="line.585"></a> +<span class="sourceLineNo">586</span> }<a name="line.586"></a> +<span class="sourceLineNo">587</span><a name="line.587"></a> +<span class="sourceLineNo">588</span> // hmacSha384<a name="line.588"></a> +<span class="sourceLineNo">589</span><a name="line.589"></a> +<span class="sourceLineNo">590</span> /**<a name="line.590"></a> +<span class="sourceLineNo">591</span> * Returns a HmacSHA384 Message Authentication Code (MAC) for the given key and value.<a name="line.591"></a> +<span class="sourceLineNo">592</span> *<a name="line.592"></a> +<span class="sourceLineNo">593</span> * @param key<a name="line.593"></a> +<span class="sourceLineNo">594</span> * The key for the keyed digest (must not be null)<a name="line.594"></a> +<span class="sourceLineNo">595</span> * @param valueToDigest<a name="line.595"></a> +<span class="sourceLineNo">596</span> * The value (data) which should to digest (maybe empty or null)<a name="line.596"></a> +<span class="sourceLineNo">597</span> * @return HmacSHA384 MAC for the given key and value<a name="line.597"></a> +<span class="sourceLineNo">598</span> * @throws IllegalArgumentException<a name="line.598"></a> +<span class="sourceLineNo">599</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.599"></a> +<span class="sourceLineNo">600</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmac(byte[])}<a name="line.600"></a> +<span class="sourceLineNo">601</span> */<a name="line.601"></a> +<span class="sourceLineNo">602</span> @Deprecated<a name="line.602"></a> +<span class="sourceLineNo">603</span> public static byte[] hmacSha384(final byte[] key, final byte[] valueToDigest) {<a name="line.603"></a> +<span class="sourceLineNo">604</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_384, key).hmac(valueToDigest);<a name="line.604"></a> +<span class="sourceLineNo">605</span> }<a name="line.605"></a> +<span class="sourceLineNo">606</span><a name="line.606"></a> +<span class="sourceLineNo">607</span> /**<a name="line.607"></a> +<span class="sourceLineNo">608</span> * Returns a HmacSHA384 Message Authentication Code (MAC) for the given key and value.<a name="line.608"></a> +<span class="sourceLineNo">609</span> *<a name="line.609"></a> +<span class="sourceLineNo">610</span> * @param key<a name="line.610"></a> +<span class="sourceLineNo">611</span> * The key for the keyed digest (must not be null)<a name="line.611"></a> +<span class="sourceLineNo">612</span> * @param valueToDigest<a name="line.612"></a> +<span class="sourceLineNo">613</span> * The value (data) which should to digest<a name="line.613"></a> +<span class="sourceLineNo">614</span> * <p><a name="line.614"></a> +<span class="sourceLineNo">615</span> * The InputStream must not be null and will not be closed<a name="line.615"></a> +<span class="sourceLineNo">616</span> * </p><a name="line.616"></a> +<span class="sourceLineNo">617</span> * @return HmacSHA384 MAC for the given key and value<a name="line.617"></a> +<span class="sourceLineNo">618</span> * @throws IOException<a name="line.618"></a> +<span class="sourceLineNo">619</span> * If an I/O error occurs.<a name="line.619"></a> +<span class="sourceLineNo">620</span> * @throws IllegalArgumentException<a name="line.620"></a> +<span class="sourceLineNo">621</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.621"></a> +<span class="sourceLineNo">622</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmac(InputStream)}<a name="line.622"></a> +<span class="sourceLineNo">623</span> */<a name="line.623"></a> +<span class="sourceLineNo">624</span> @Deprecated<a name="line.624"></a> +<span class="sourceLineNo">625</span> public static byte[] hmacSha384(final byte[] key, final InputStream valueToDigest) throws IOException {<a name="line.625"></a> +<span class="sourceLineNo">626</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_384, key).hmac(valueToDigest);<a name="line.626"></a> +<span class="sourceLineNo">627</span> }<a name="line.627"></a> +<span class="sourceLineNo">628</span><a name="line.628"></a> +<span class="sourceLineNo">629</span> /**<a name="line.629"></a> +<span class="sourceLineNo">630</span> * Returns a HmacSHA384 Message Authentication Code (MAC) for the given key and value.<a name="line.630"></a> +<span class="sourceLineNo">631</span> *<a name="line.631"></a> +<span class="sourceLineNo">632</span> * @param key<a name="line.632"></a> +<span class="sourceLineNo">633</span> * The key for the keyed digest (must not be null)<a name="line.633"></a> +<span class="sourceLineNo">634</span> * @param valueToDigest<a name="line.634"></a> +<span class="sourceLineNo">635</span> * The value (data) which should to digest (maybe empty or null)<a name="line.635"></a> +<span class="sourceLineNo">636</span> * @return HmacSHA384 MAC for the given key and value<a name="line.636"></a> +<span class="sourceLineNo">637</span> * @throws IllegalArgumentException<a name="line.637"></a> +<span class="sourceLineNo">638</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.638"></a> +<span class="sourceLineNo">639</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_384, String).hmac(String)}<a name="line.639"></a> +<span class="sourceLineNo">640</span> */<a name="line.640"></a> +<span class="sourceLineNo">641</span> @Deprecated<a name="line.641"></a> +<span class="sourceLineNo">642</span> public static byte[] hmacSha384(final String key, final String valueToDigest) {<a name="line.642"></a> +<span class="sourceLineNo">643</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_384, key).hmac(valueToDigest);<a name="line.643"></a> +<span class="sourceLineNo">644</span> }<a name="line.644"></a> +<span class="sourceLineNo">645</span><a name="line.645"></a> +<span class="sourceLineNo">646</span> /**<a name="line.646"></a> +<span class="sourceLineNo">647</span> * Returns a HmacSHA384 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.647"></a> +<span class="sourceLineNo">648</span> *<a name="line.648"></a> +<span class="sourceLineNo">649</span> * @param key<a name="line.649"></a> +<span class="sourceLineNo">650</span> * The key for the keyed digest (must not be null)<a name="line.650"></a> +<span class="sourceLineNo">651</span> * @param valueToDigest<a name="line.651"></a> +<span class="sourceLineNo">652</span> * The value (data) which should to digest (maybe empty or null)<a name="line.652"></a> +<span class="sourceLineNo">653</span> * @return HmacSHA384 MAC for the given key and value as hex string (lowercase)<a name="line.653"></a> +<span class="sourceLineNo">654</span> * @throws IllegalArgumentException<a name="line.654"></a> +<span class="sourceLineNo">655</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.655"></a> +<span class="sourceLineNo">656</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmacHex(byte[])}<a name="line.656"></a> +<span class="sourceLineNo">657</span> */<a name="line.657"></a> +<span class="sourceLineNo">658</span> @Deprecated<a name="line.658"></a> +<span class="sourceLineNo">659</span> public static String hmacSha384Hex(final byte[] key, final byte[] valueToDigest) {<a name="line.659"></a> +<span class="sourceLineNo">660</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_384, key).hmacHex(valueToDigest);<a name="line.660"></a> +<span class="sourceLineNo">661</span> }<a name="line.661"></a> +<span class="sourceLineNo">662</span><a name="line.662"></a> +<span class="sourceLineNo">663</span> /**<a name="line.663"></a> +<span class="sourceLineNo">664</span> * Returns a HmacSHA384 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.664"></a> +<span class="sourceLineNo">665</span> *<a name="line.665"></a> +<span class="sourceLineNo">666</span> * @param key<a name="line.666"></a> +<span class="sourceLineNo">667</span> * The key for the keyed digest (must not be null)<a name="line.667"></a> +<span class="sourceLineNo">668</span> * @param valueToDigest<a name="line.668"></a> +<span class="sourceLineNo">669</span> * The value (data) which should to digest<a name="line.669"></a> +<span class="sourceLineNo">670</span> * <p><a name="line.670"></a> +<span class="sourceLineNo">671</span> * The InputStream must not be null and will not be closed<a name="line.671"></a> +<span class="sourceLineNo">672</span> * </p><a name="line.672"></a> +<span class="sourceLineNo">673</span> * @return HmacSHA384 MAC for the given key and value as hex string (lowercase)<a name="line.673"></a> +<span class="sourceLineNo">674</span> * @throws IOException<a name="line.674"></a> +<span class="sourceLineNo">675</span> * If an I/O error occurs.<a name="line.675"></a> +<span class="sourceLineNo">676</span> * @throws IllegalArgumentException<a name="line.676"></a> +<span class="sourceLineNo">677</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.677"></a> +<span class="sourceLineNo">678</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_384, byte[]).hmacHex(InputStream)}<a name="line.678"></a> +<span class="sourceLineNo">679</span> */<a name="line.679"></a> +<span class="sourceLineNo">680</span> @Deprecated<a name="line.680"></a> +<span class="sourceLineNo">681</span> public static String hmacSha384Hex(final byte[] key, final InputStream valueToDigest) throws IOException {<a name="line.681"></a> +<span class="sourceLineNo">682</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_384, key).hmacHex(valueToDigest);<a name="line.682"></a> +<span class="sourceLineNo">683</span> }<a name="line.683"></a> +<span class="sourceLineNo">684</span><a name="line.684"></a> +<span class="sourceLineNo">685</span> /**<a name="line.685"></a> +<span class="sourceLineNo">686</span> * Returns a HmacSHA384 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.686"></a> +<span class="sourceLineNo">687</span> *<a name="line.687"></a> +<span class="sourceLineNo">688</span> * @param key<a name="line.688"></a> +<span class="sourceLineNo">689</span> * The key for the keyed digest (must not be null)<a name="line.689"></a> +<span class="sourceLineNo">690</span> * @param valueToDigest<a name="line.690"></a> +<span class="sourceLineNo">691</span> * The value (data) which should to digest (maybe empty or null)<a name="line.691"></a> +<span class="sourceLineNo">692</span> * @return HmacSHA384 MAC for the given key and value as hex string (lowercase)<a name="line.692"></a> +<span class="sourceLineNo">693</span> * @throws IllegalArgumentException<a name="line.693"></a> +<span class="sourceLineNo">694</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.694"></a> +<span class="sourceLineNo">695</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_384, String).hmacHex(String)}<a name="line.695"></a> +<span class="sourceLineNo">696</span> */<a name="line.696"></a> +<span class="sourceLineNo">697</span> @Deprecated<a name="line.697"></a> +<span class="sourceLineNo">698</span> public static String hmacSha384Hex(final String key, final String valueToDigest) {<a name="line.698"></a> +<span class="sourceLineNo">699</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_384, key).hmacHex(valueToDigest);<a name="line.699"></a> +<span class="sourceLineNo">700</span> }<a name="line.700"></a> +<span class="sourceLineNo">701</span><a name="line.701"></a> +<span class="sourceLineNo">702</span> // hmacSha512<a name="line.702"></a> +<span class="sourceLineNo">703</span><a name="line.703"></a> +<span class="sourceLineNo">704</span> /**<a name="line.704"></a> +<span class="sourceLineNo">705</span> * Returns a HmacSHA512 Message Authentication Code (MAC) for the given key and value.<a name="line.705"></a> +<span class="sourceLineNo">706</span> *<a name="line.706"></a> +<span class="sourceLineNo">707</span> * @param key<a name="line.707"></a> +<span class="sourceLineNo">708</span> * The key for the keyed digest (must not be null)<a name="line.708"></a> +<span class="sourceLineNo">709</span> * @param valueToDigest<a name="line.709"></a> +<span class="sourceLineNo">710</span> * The value (data) which should to digest (maybe empty or null)<a name="line.710"></a> +<span class="sourceLineNo">711</span> * @return HmacSHA512 MAC for the given key and value<a name="line.711"></a> +<span class="sourceLineNo">712</span> * @throws IllegalArgumentException<a name="line.712"></a> +<span class="sourceLineNo">713</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.713"></a> +<span class="sourceLineNo">714</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmac(byte[])}<a name="line.714"></a> +<span class="sourceLineNo">715</span> */<a name="line.715"></a> +<span class="sourceLineNo">716</span> @Deprecated<a name="line.716"></a> +<span class="sourceLineNo">717</span> public static byte[] hmacSha512(final byte[] key, final byte[] valueToDigest) {<a name="line.717"></a> +<span class="sourceLineNo">718</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_512, key).hmac(valueToDigest);<a name="line.718"></a> +<span class="sourceLineNo">719</span> }<a name="line.719"></a> +<span class="sourceLineNo">720</span><a name="line.720"></a> +<span class="sourceLineNo">721</span> /**<a name="line.721"></a> +<span class="sourceLineNo">722</span> * Returns a HmacSHA512 Message Authentication Code (MAC) for the given key and value.<a name="line.722"></a> +<span class="sourceLineNo">723</span> *<a name="line.723"></a> +<span class="sourceLineNo">724</span> * @param key<a name="line.724"></a> +<span class="sourceLineNo">725</span> * The key for the keyed digest (must not be null)<a name="line.725"></a> +<span class="sourceLineNo">726</span> * @param valueToDigest<a name="line.726"></a> +<span class="sourceLineNo">727</span> * The value (data) which should to digest<a name="line.727"></a> +<span class="sourceLineNo">728</span> * <p><a name="line.728"></a> +<span class="sourceLineNo">729</span> * The InputStream must not be null and will not be closed<a name="line.729"></a> +<span class="sourceLineNo">730</span> * </p><a name="line.730"></a> +<span class="sourceLineNo">731</span> * @return HmacSHA512 MAC for the given key and value<a name="line.731"></a> +<span class="sourceLineNo">732</span> * @throws IOException<a name="line.732"></a> +<span class="sourceLineNo">733</span> * If an I/O error occurs.<a name="line.733"></a> +<span class="sourceLineNo">734</span> * @throws IllegalArgumentException<a name="line.734"></a> +<span class="sourceLineNo">735</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.735"></a> +<span class="sourceLineNo">736</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmac(InputStream)}<a name="line.736"></a> +<span class="sourceLineNo">737</span> */<a name="line.737"></a> +<span class="sourceLineNo">738</span> @Deprecated<a name="line.738"></a> +<span class="sourceLineNo">739</span> public static byte[] hmacSha512(final byte[] key, final InputStream valueToDigest) throws IOException {<a name="line.739"></a> +<span class="sourceLineNo">740</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_512, key).hmac(valueToDigest);<a name="line.740"></a> +<span class="sourceLineNo">741</span> }<a name="line.741"></a> +<span class="sourceLineNo">742</span><a name="line.742"></a> +<span class="sourceLineNo">743</span> /**<a name="line.743"></a> +<span class="sourceLineNo">744</span> * Returns a HmacSHA512 Message Authentication Code (MAC) for the given key and value.<a name="line.744"></a> +<span class="sourceLineNo">745</span> *<a name="line.745"></a> +<span class="sourceLineNo">746</span> * @param key<a name="line.746"></a> +<span class="sourceLineNo">747</span> * The key for the keyed digest (must not be null)<a name="line.747"></a> +<span class="sourceLineNo">748</span> * @param valueToDigest<a name="line.748"></a> +<span class="sourceLineNo">749</span> * The value (data) which should to digest (maybe empty or null)<a name="line.749"></a> +<span class="sourceLineNo">750</span> * @return HmacSHA512 MAC for the given key and value<a name="line.750"></a> +<span class="sourceLineNo">751</span> * @throws IllegalArgumentException<a name="line.751"></a> +<span class="sourceLineNo">752</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.752"></a> +<span class="sourceLineNo">753</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_512, String).hmac(String)}<a name="line.753"></a> +<span class="sourceLineNo">754</span> */<a name="line.754"></a> +<span class="sourceLineNo">755</span> @Deprecated<a name="line.755"></a> +<span class="sourceLineNo">756</span> public static byte[] hmacSha512(final String key, final String valueToDigest) {<a name="line.756"></a> +<span class="sourceLineNo">757</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_512, key).hmac(valueToDigest);<a name="line.757"></a> +<span class="sourceLineNo">758</span> }<a name="line.758"></a> +<span class="sourceLineNo">759</span><a name="line.759"></a> +<span class="sourceLineNo">760</span> /**<a name="line.760"></a> +<span class="sourceLineNo">761</span> * Returns a HmacSHA512 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.761"></a> +<span class="sourceLineNo">762</span> *<a name="line.762"></a> +<span class="sourceLineNo">763</span> * @param key<a name="line.763"></a> +<span class="sourceLineNo">764</span> * The key for the keyed digest (must not be null)<a name="line.764"></a> +<span class="sourceLineNo">765</span> * @param valueToDigest<a name="line.765"></a> +<span class="sourceLineNo">766</span> * The value (data) which should to digest (maybe empty or null)<a name="line.766"></a> +<span class="sourceLineNo">767</span> * @return HmacSHA512 MAC for the given key and value as hex string (lowercase)<a name="line.767"></a> +<span class="sourceLineNo">768</span> * @throws IllegalArgumentException<a name="line.768"></a> +<span class="sourceLineNo">769</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.769"></a> +<span class="sourceLineNo">770</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmacHex(byte[])}<a name="line.770"></a> +<span class="sourceLineNo">771</span> */<a name="line.771"></a> +<span class="sourceLineNo">772</span> @Deprecated<a name="line.772"></a> +<span class="sourceLineNo">773</span> public static String hmacSha512Hex(final byte[] key, final byte[] valueToDigest) {<a name="line.773"></a> +<span class="sourceLineNo">774</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_512, key).hmacHex(valueToDigest);<a name="line.774"></a> +<span class="sourceLineNo">775</span> }<a name="line.775"></a> +<span class="sourceLineNo">776</span><a name="line.776"></a> +<span class="sourceLineNo">777</span> /**<a name="line.777"></a> +<span class="sourceLineNo">778</span> * Returns a HmacSHA512 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.778"></a> +<span class="sourceLineNo">779</span> *<a name="line.779"></a> +<span class="sourceLineNo">780</span> * @param key<a name="line.780"></a> +<span class="sourceLineNo">781</span> * The key for the keyed digest (must not be null)<a name="line.781"></a> +<span class="sourceLineNo">782</span> * @param valueToDigest<a name="line.782"></a> +<span class="sourceLineNo">783</span> * The value (data) which should to digest<a name="line.783"></a> +<span class="sourceLineNo">784</span> * <p><a name="line.784"></a> +<span class="sourceLineNo">785</span> * The InputStream must not be null and will not be closed<a name="line.785"></a> +<span class="sourceLineNo">786</span> * </p><a name="line.786"></a> +<span class="sourceLineNo">787</span> * @return HmacSHA512 MAC for the given key and value as hex string (lowercase)<a name="line.787"></a> +<span class="sourceLineNo">788</span> * @throws IOException<a name="line.788"></a> +<span class="sourceLineNo">789</span> * If an I/O error occurs.<a name="line.789"></a> +<span class="sourceLineNo">790</span> * @throws IllegalArgumentException<a name="line.790"></a> +<span class="sourceLineNo">791</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.791"></a> +<span class="sourceLineNo">792</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_512, byte[]).hmacHex(InputStream)}<a name="line.792"></a> +<span class="sourceLineNo">793</span> */<a name="line.793"></a> +<span class="sourceLineNo">794</span> @Deprecated<a name="line.794"></a> +<span class="sourceLineNo">795</span> public static String hmacSha512Hex(final byte[] key, final InputStream valueToDigest) throws IOException {<a name="line.795"></a> +<span class="sourceLineNo">796</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_512, key).hmacHex(valueToDigest);<a name="line.796"></a> +<span class="sourceLineNo">797</span> }<a name="line.797"></a> +<span class="sourceLineNo">798</span><a name="line.798"></a> +<span class="sourceLineNo">799</span> /**<a name="line.799"></a> +<span class="sourceLineNo">800</span> * Returns a HmacSHA512 Message Authentication Code (MAC) as hex string (lowercase) for the given key and value.<a name="line.800"></a> +<span class="sourceLineNo">801</span> *<a name="line.801"></a> +<span class="sourceLineNo">802</span> * @param key<a name="line.802"></a> +<span class="sourceLineNo">803</span> * The key for the keyed digest (must not be null)<a name="line.803"></a> +<span class="sourceLineNo">804</span> * @param valueToDigest<a name="line.804"></a> +<span class="sourceLineNo">805</span> * The value (data) which should to digest (maybe empty or null)<a name="line.805"></a> +<span class="sourceLineNo">806</span> * @return HmacSHA512 MAC for the given key and value as hex string (lowercase)<a name="line.806"></a> +<span class="sourceLineNo">807</span> * @throws IllegalArgumentException<a name="line.807"></a> +<span class="sourceLineNo">808</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.808"></a> +<span class="sourceLineNo">809</span> * @deprecated (1.11) Use {@code new HmacUtils(HmacAlgorithms.HMAC_SHA_512, String).hmacHex(String)}<a name="line.809"></a> +<span class="sourceLineNo">810</span> */<a name="line.810"></a> +<span class="sourceLineNo">811</span> @Deprecated<a name="line.811"></a> +<span class="sourceLineNo">812</span> public static String hmacSha512Hex(final String key, final String valueToDigest) {<a name="line.812"></a> +<span class="sourceLineNo">813</span> return new HmacUtils(HmacAlgorithms.HMAC_SHA_512, key).hmacHex(valueToDigest);<a name="line.813"></a> +<span class="sourceLineNo">814</span> }<a name="line.814"></a> +<span class="sourceLineNo">815</span><a name="line.815"></a> +<span class="sourceLineNo">816</span> // update<a name="line.816"></a> +<span class="sourceLineNo">817</span><a name="line.817"></a> +<span class="sourceLineNo">818</span> /**<a name="line.818"></a> +<span class="sourceLineNo">819</span> * Resets and then updates the given {@link Mac} with the value.<a name="line.819"></a> +<span class="sourceLineNo">820</span> *<a name="line.820"></a> +<span class="sourceLineNo">821</span> * @param mac<a name="line.821"></a> +<span class="sourceLineNo">822</span> * the initialized {@link Mac} to update<a name="line.822"></a> +<span class="sourceLineNo">823</span> * @param valueToDigest<a name="line.823"></a> +<span class="sourceLineNo">824</span> * the value to update the {@link Mac} with (maybe null or empty)<a name="line.824"></a> +<span class="sourceLineNo">825</span> * @return the updated {@link Mac}<a name="line.825"></a> +<span class="sourceLineNo">826</span> * @throws IllegalStateException<a name="line.826"></a> +<span class="sourceLineNo">827</span> * if the Mac was not initialized<a name="line.827"></a> +<span class="sourceLineNo">828</span> */<a name="line.828"></a> +<span class="sourceLineNo">829</span> public static Mac updateHmac(final Mac mac, final byte[] valueToDigest) {<a name="line.829"></a> +<span class="sourceLineNo">830</span> mac.reset();<a name="line.830"></a> +<span class="sourceLineNo">831</span> mac.update(valueToDigest);<a name="line.831"></a> +<span class="sourceLineNo">832</span> return mac;<a name="line.832"></a> +<span class="sourceLineNo">833</span> }<a name="line.833"></a> +<span class="sourceLineNo">834</span><a name="line.834"></a> +<span class="sourceLineNo">835</span> /**<a name="line.835"></a> +<span class="sourceLineNo">836</span> * Resets and then updates the given {@link Mac} with the value.<a name="line.836"></a> +<span class="sourceLineNo">837</span> *<a name="line.837"></a> +<span class="sourceLineNo">838</span> * @param mac<a name="line.838"></a> +<span class="sourceLineNo">839</span> * the initialized {@link Mac} to update<a name="line.839"></a> +<span class="sourceLineNo">840</span> * @param valueToDigest<a name="line.840"></a> +<span class="sourceLineNo">841</span> * the value to update the {@link Mac} with<a name="line.841"></a> +<span class="sourceLineNo">842</span> * <p><a name="line.842"></a> +<span class="sourceLineNo">843</span> * The InputStream must not be null and will not be closed<a name="line.843"></a> +<span class="sourceLineNo">844</span> * </p><a name="line.844"></a> +<span class="sourceLineNo">845</span> * @return the updated {@link Mac}<a name="line.845"></a> +<span class="sourceLineNo">846</span> * @throws IOException<a name="line.846"></a> +<span class="sourceLineNo">847</span> * If an I/O error occurs.<a name="line.847"></a> +<span class="sourceLineNo">848</span> * @throws IllegalStateException<a name="line.848"></a> +<span class="sourceLineNo">849</span> * If the Mac was not initialized<a name="line.849"></a> +<span class="sourceLineNo">850</span> */<a name="line.850"></a> +<span class="sourceLineNo">851</span> public static Mac updateHmac(final Mac mac, final InputStream valueToDigest) throws IOException {<a name="line.851"></a> +<span class="sourceLineNo">852</span> mac.reset();<a name="line.852"></a> +<span class="sourceLineNo">853</span> final byte[] buffer = new byte[STREAM_BUFFER_LENGTH];<a name="line.853"></a> +<span class="sourceLineNo">854</span> int read = valueToDigest.read(buffer, 0, STREAM_BUFFER_LENGTH);<a name="line.854"></a> +<span class="sourceLineNo">855</span><a name="line.855"></a> +<span class="sourceLineNo">856</span> while (read > -1) {<a name="line.856"></a> +<span class="sourceLineNo">857</span> mac.update(buffer, 0, read);<a name="line.857"></a> +<span class="sourceLineNo">858</span> read = valueToDigest.read(buffer, 0, STREAM_BUFFER_LENGTH);<a name="line.858"></a> +<span class="sourceLineNo">859</span> }<a name="line.859"></a> +<span class="sourceLineNo">860</span><a name="line.860"></a> +<span class="sourceLineNo">861</span> return mac;<a name="line.861"></a> +<span class="sourceLineNo">862</span> }<a name="line.862"></a> +<span class="sourceLineNo">863</span><a name="line.863"></a> +<span class="sourceLineNo">864</span> /**<a name="line.864"></a> +<span class="sourceLineNo">865</span> * Resets and then updates the given {@link Mac} with the value.<a name="line.865"></a> +<span class="sourceLineNo">866</span> *<a name="line.866"></a> +<span class="sourceLineNo">867</span> * @param mac<a name="line.867"></a> +<span class="sourceLineNo">868</span> * the initialized {@link Mac} to update<a name="line.868"></a> +<span class="sourceLineNo">869</span> * @param valueToDigest<a name="line.869"></a> +<span class="sourceLineNo">870</span> * the value to update the {@link Mac} with (maybe null or empty)<a name="line.870"></a> +<span class="sourceLineNo">871</span> * @return the updated {@link Mac}<a name="line.871"></a> +<span class="sourceLineNo">872</span> * @throws IllegalStateException<a name="line.872"></a> +<span class="sourceLineNo">873</span> * if the Mac was not initialized<a name="line.873"></a> +<span class="sourceLineNo">874</span> */<a name="line.874"></a> +<span class="sourceLineNo">875</span> public static Mac updateHmac(final Mac mac, final String valueToDigest) {<a name="line.875"></a> +<span class="sourceLineNo">876</span> mac.reset();<a name="line.876"></a> +<span class="sourceLineNo">877</span> mac.update(StringUtils.getBytesUtf8(valueToDigest));<a name="line.877"></a> +<span class="sourceLineNo">878</span> return mac;<a name="line.878"></a> +<span class="sourceLineNo">879</span> }<a name="line.879"></a> +<span class="sourceLineNo">880</span><a name="line.880"></a> +<span class="sourceLineNo">881</span> /**<a name="line.881"></a> +<span class="sourceLineNo">882</span> * Preserves binary compatibility only.<a name="line.882"></a> +<span class="sourceLineNo">883</span> * As for previous versions does not provide useful behavior<a name="line.883"></a> +<span class="sourceLineNo">884</span> * @deprecated since 1.11; only useful to preserve binary compatibility<a name="line.884"></a> +<span class="sourceLineNo">885</span> */<a name="line.885"></a> +<span class="sourceLineNo">886</span> @Deprecated<a name="line.886"></a> +<span class="sourceLineNo">887</span> public HmacUtils() {<a name="line.887"></a> +<span class="sourceLineNo">888</span> this(null);<a name="line.888"></a> +<span class="sourceLineNo">889</span> }<a name="line.889"></a> +<span class="sourceLineNo">890</span><a name="line.890"></a> +<span class="sourceLineNo">891</span> private final Mac mac;<a name="line.891"></a> +<span class="sourceLineNo">892</span><a name="line.892"></a> +<span class="sourceLineNo">893</span> private HmacUtils(final Mac mac) {<a name="line.893"></a> +<span class="sourceLineNo">894</span> this.mac = mac;<a name="line.894"></a> +<span class="sourceLineNo">895</span> }<a name="line.895"></a> +<span class="sourceLineNo">896</span><a name="line.896"></a> +<span class="sourceLineNo">897</span> /**<a name="line.897"></a> +<span class="sourceLineNo">898</span> * Creates an instance using the provided algorithm type.<a name="line.898"></a> +<span class="sourceLineNo">899</span> *<a name="line.899"></a> +<span class="sourceLineNo">900</span> * @param algorithm to use<a name="line.900"></a> +<span class="sourceLineNo">901</span> * @param key the key to use<a name="line.901"></a> +<span class="sourceLineNo">902</span> * @throws IllegalArgumentException<a name="line.902"></a> +<span class="sourceLineNo">903</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.903"></a> +<span class="sourceLineNo">904</span> * @since 1.11<a name="line.904"></a> +<span class="sourceLineNo">905</span> */<a name="line.905"></a> +<span class="sourceLineNo">906</span> public HmacUtils(final String algorithm, final byte[] key) {<a name="line.906"></a> +<span class="sourceLineNo">907</span> this(getInitializedMac(algorithm, key));<a name="line.907"></a> +<span class="sourceLineNo">908</span> }<a name="line.908"></a> +<span class="sourceLineNo">909</span><a name="line.909"></a> +<span class="sourceLineNo">910</span> /**<a name="line.910"></a> +<span class="sourceLineNo">911</span> * Creates an instance using the provided algorithm type.<a name="line.911"></a> +<span class="sourceLineNo">912</span> *<a name="line.912"></a> +<span class="sourceLineNo">913</span> * @param algorithm to use<a name="line.913"></a> +<span class="sourceLineNo">914</span> * @param key the key to use<a name="line.914"></a> +<span class="sourceLineNo">915</span> * @throws IllegalArgumentException<a name="line.915"></a> +<span class="sourceLineNo">916</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.916"></a> +<span class="sourceLineNo">917</span> * @since 1.11<a name="line.917"></a> +<span class="sourceLineNo">918</span> */<a name="line.918"></a> +<span class="sourceLineNo">919</span> public HmacUtils(final String algorithm, final String key) {<a name="line.919"></a> +<span class="sourceLineNo">920</span> this(algorithm, StringUtils.getBytesUtf8(key));<a name="line.920"></a> +<span class="sourceLineNo">921</span> }<a name="line.921"></a> +<span class="sourceLineNo">922</span><a name="line.922"></a> +<span class="sourceLineNo">923</span> /**<a name="line.923"></a> +<span class="sourceLineNo">924</span> * Creates an instance using the provided algorithm type.<a name="line.924"></a> +<span class="sourceLineNo">925</span> *<a name="line.925"></a> +<span class="sourceLineNo">926</span> * @param algorithm to use<a name="line.926"></a> +<span class="sourceLineNo">927</span> * @param key the key to use<a name="line.927"></a> +<span class="sourceLineNo">928</span> * @throws IllegalArgumentException<a name="line.928"></a> +<span class="sourceLineNo">929</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.929"></a> +<span class="sourceLineNo">930</span> * @since 1.11<a name="line.930"></a> +<span class="sourceLineNo">931</span> */<a name="line.931"></a> +<span class="sourceLineNo">932</span> public HmacUtils(final HmacAlgorithms algorithm, final String key) {<a name="line.932"></a> +<span class="sourceLineNo">933</span> this(algorithm.getName(), StringUtils.getBytesUtf8(key));<a name="line.933"></a> +<span class="sourceLineNo">934</span> }<a name="line.934"></a> +<span class="sourceLineNo">935</span><a name="line.935"></a> +<span class="sourceLineNo">936</span> /**<a name="line.936"></a> +<span class="sourceLineNo">937</span> * Creates an instance using the provided algorithm type.<a name="line.937"></a> +<span class="sourceLineNo">938</span> *<a name="line.938"></a> +<span class="sourceLineNo">939</span> * @param algorithm to use.<a name="line.939"></a> +<span class="sourceLineNo">940</span> * @param key the key to use<a name="line.940"></a> +<span class="sourceLineNo">941</span> * @throws IllegalArgumentException<a name="line.941"></a> +<span class="sourceLineNo">942</span> * when a {@link NoSuchAlgorithmException} is caught or key is null or key is invalid.<a name="line.942"></a> +<span class="sourceLineNo">943</span> * @since 1.11<a name="line.943"></a> +<span class="sourceLineNo">944</span> */<a name="line.944"></a> +<span class="sourceLineNo">945</span> public HmacUtils(final HmacAlgorithms algorithm, final byte[] key) {<a name="line.945"></a> +<span class="sourceLineNo">946</span> this(algorithm.getName(), key);<a name="line.946"></a> +<span class="sourceLineNo">947</span> }<a name="line.947"></a> +<span class="sourceLineNo">948</span><a name="line.948"></a> +<span class="sourceLineNo">949</span> /**<a name="line.949"></a> +<span class="sourceLineNo">950</span> * Returns the digest for the input data.<a name="line.950"></a> +<span class="sourceLineNo">951</span> *<a name="line.951"></a> +<span class="sourceLineNo">952</span> * @param valueToDigest the input to use<a name="line.952"></a> +<span class="sourceLineNo">953</span> * @return the digest as a byte[]<a name="line.953"></a> +<span class="sourceLineNo">954</span> * @since 1.11<a name="line.954"></a> +<span class="sourceLineNo">955</span> */<a name="line.955"></a> +<span class="sourceLineNo">956</span> public byte[] hmac(final byte[] valueToDigest) {<a name="line.956"></a> +<span class="sourceLineNo">957</span> return mac.doFinal(valueToDigest);<a name="line.957"></a> +<span class="sourceLineNo">958</span> }<a name="line.958"></a> +<span class="sourceLineNo">959</span><a name="line.959"></a> +<span class="sourceLineNo">960</span> /**<a name="line.960"></a> +<span class="sourceLineNo">961</span> * Returns the digest for the input data.<a name="line.961"></a> +<span class="sourceLineNo">962</span> *<a name="line.962"></a> +<span class="sourceLineNo">963</span> * @param valueToDigest the input to use<a name="line.963"></a> +<span class="sourceLineNo">964</span> * @return the digest as a hex String<a name="line.964"></a> +<span class="sourceLineNo">965</span> * @since 1.11<a name="line.965"></a> +<span class="sourceLineNo">966</span> */<a name="line.966"></a> +<span class="sourceLineNo">967</span> public String hmacHex(final byte[] valueToDigest) {<a name="line.967"></a> +<span class="sourceLineNo">968</span> return Hex.encodeHexString(hmac(valueToDigest));<a name="line.968"></a> +<span class="sourceLineNo">969</span> }<a name="line.969"></a> +<span class="sourceLineNo">970</span><a name="line.970"></a> +<span class="sourceLineNo">971</span> /**<a name="line.971"></a> +<span class="sourceLineNo">972</span> * Returns the digest for the input data.<a name="line.972"></a> +<span class="sourceLineNo">973</span> *<a name="line.973"></a> +<span class="sourceLineNo">974</span> * @param valueToDigest the input to use, treated as UTF-8<a name="line.974"></a> +<span class="sourceLineNo">975</span> * @return the digest as a byte[]<a name="line.975"></a> +<span class="sourceLineNo">976</span> * @since 1.11<a name="line.976"></a> +<span class="sourceLineNo">977</span> */<a name="line.977"></a> +<span class="sourceLineNo">978</span> public byte[] hmac(final String valueToDigest) {<a name="line.978"></a> +<span class="sourceLineNo">979</span> return mac.doFinal(StringUtils.getBytesUtf8(valueToDigest));<a name="line.979"></a> +<span class="sourceLineNo">980</span> }<a name="line.980"></a> +<span class="sourceLineNo">981</span><a name="line.981"></a> +<span class="sourceLineNo">982</span> /**<a name="line.982"></a> +<span class="sourceLineNo">983</span> * Returns the digest for the input data.<a name="line.983"></a> +<span class="sourceLineNo">984</span> *<a name="line.984"></a> +<span class="sourceLineNo">985</span> * @param valueToDigest the input to use, treated as UTF-8<a name="line.985"></a> +<span class="sourceLineNo">986</span> * @return the digest as a hex String<a name="line.986"></a> +<span class="sourceLineNo">987</span> * @since 1.11<a name="line.987"></a> +<span class="sourceLineNo">988</span> */<a name="line.988"></a> +<span class="sourceLineNo">989</span> public String hmacHex(final String valueToDigest) {<a name="line.989"></a> +<span class="sourceLineNo">990</span> return Hex.encodeHexString(hmac(valueToDigest));<a name="line.990"></a> +<span class="sourceLineNo">991</span> }<a name="line.991"></a> +<span class="sourceLineNo">992</span><a name="line.992"></a> +<span class="sourceLineNo">993</span> /**<a name="line.993"></a> +<span class="sourceLineNo">994</span> * Returns the digest for the input data.<a name="line.994"></a> +<span class="sourceLineNo">995</span> *<a name="line.995"></a> +<span class="sourceLineNo">996</span> * @param valueToDigest the input to use<a name="line.996"></a> +<span class="sourceLineNo">997</span> * @return the digest as a byte[]<a name="line.997"></a> +<span class="sourceLineNo">998</span> * @since 1.11<a name="line.998"></a> +<span class="sourceLineNo">999</span> */<a name="line.999"></a> +<span class="sourceLineNo">1000</span> public byte[] hmac(final ByteBuffer valueToDigest) {<a name="line.1000"></a> +<span class="sourceLineNo">1001</span> mac.update(valueToDigest);<a name="line.1001"></a> +<span class="sourceLineNo">1002</span> return mac.doFinal();<a name="line.1002"></a> +<span class="sourceLineNo">1003</span> }<a name="line.1003"></a> +<span class="sourceLineNo">1004</span><a name="line.1004"></a> +<span class="sourceLineNo">1005</span> /**<a name="line.1005"></a> +<span class="sourceLineNo">1006</span> * Returns the digest for the input data.<a name="line.1006"></a> +<span class="sourceLineNo">1007</span> *<a name="line.1007"></a> +<span class="sourceLineNo">1008</span> * @param valueToDigest the input to use<a name="line.1008"></a> +<span class="sourceLineNo">1009</span> * @return the digest as a hex String<a name="line.1009"></a> +<span class="sourceLineNo">1010</span> * @since 1.11<a name="line.1010"></a> +<span class="sourceLineNo">1011</span> */<a name="line.1011"></a> +<span class="sourceLineNo">1012</span> public String hmacHex(final ByteBuffer valueToDigest) {<a name="line.1012"></a> +<span class="sourceLineNo">1013</span> return Hex.encodeHexString(hmac(valueToDigest));<a name="line.1013"></a> +<span class="sourceLineNo">1014</span> }<a name="line.1014"></a> +<span class="sourceLineNo">1015</span><a name="line.1015"></a> +<span class="sourceLineNo">1016</span> /**<a name="line.1016"></a> +<span class="sourceLineNo">1017</span> * Returns the digest for the stream.<a name="line.1017"></a> +<span class="sourceLineNo">1018</span> *<a name="line.1018"></a> +<span class="sourceLineNo">1019</span> * @param valueToDigest<a name="line.1019"></a> +<span class="sourceLineNo">1020</span> * the data to use<a name="line.1020"></a> +<span class="sourceLineNo">1021</span> * <p><a name="line.1021"></a> +<span class="sourceLineNo">1022</span> * The InputStream must not be null and will not be closed<a name="line.1022"></a> +<span class="sourceLineNo">1023</span> * </p><a name="line.1023"></a> +<span class="sourceLineNo">1024</span> * @return the digest<a name="line.1024"></a> +<span class="sourceLineNo">1025</span> * @throws IOException<a name="line.1025"></a> +<span class="sourceLineNo">1026</span> * If an I/O error occurs.<a name="line.1026"></a> +<span class="sourceLineNo">1027</span> * @since 1.11<a name="line.1027"></a> +<span class="sourceLineNo">1028</span> */<a name="line.1028"></a> +<span class="sourceLineNo">1029</span> public byte[] hmac(final InputStream valueToDigest) throws IOException {<a name="line.1029"></a> +<span class="sourceLineNo">1030</span> final byte[] buffer = new byte[STREAM_BUFFER_LENGTH];<a name="line.1030"></a> +<span class="sourceLineNo">1031</span> int read;<a name="line.1031"></a> +<span class="sourceLineNo">1032</span><a name="line.1032"></a> +<span class="sourceLineNo">1033</span> while ((read = valueToDigest.read(buffer, 0, STREAM_BUFFER_LENGTH) ) > -1) {<a name="line.1033"></a> +<span class="sourceLineNo">1034</span> mac.update(buffer, 0, read);<a name="line.1034"></a> +<span class="sourceLineNo">1035</span> }<a name="line.1035"></a> +<span class="sourceLineNo">1036</span> return mac.doFinal();<a name="line.1036"></a> +<span class="sourceLineNo">1037</span> }<a name="line.1037"></a> +<span class="sourceLineNo">1038</span><a name="line.1038"></a> +<span class="sourceLineNo">1039</span> /**<a name="line.1039"></a> +<span class="sourceLineNo">1040</span> * Returns the digest for the stream.<a name="line.1040"></a> +<span class="sourceLineNo">1041</span> *<a name="line.1041"></a> +<span class="sourceLineNo">1042</span> * @param valueToDigest<a name="line.1042"></a> +<span class="sourceLineNo">1043</span> * the data to use<a name="line.1043"></a> +<span class="sourceLineNo">1044</span> * <p><a name="line.1044"></a> +<span class="sourceLineNo">1045</span> * The InputStream must not be null and will not be closed<a name="line.1045"></a> +<span class="sourceLineNo">1046</span> * </p><a name="line.1046"></a> +<span class="sourceLineNo">1047</span> * @return the digest as a hex String<a name="line.1047"></a> +<span class="sourceLineNo">1048</span> * @throws IOException<a name="line.1048"></a> +<span class="sourceLineNo">1049</span> * If an I/O error occurs.<a name="line.1049"></a> +<span class="sourceLineNo">1050</span> * @since 1.11<a name="line.1050"></a> +<span class="sourceLineNo">1051</span> */<a name="line.1051"></a> +<span class="sourceLineNo">1052</span> public String hmacHex(final InputStream valueToDigest) throws IOException {<a name="line.1052"></a> +<span class="sourceLineNo">1053</span> return Hex.encodeHexString(hmac(valueToDigest));<a name="line.1053"></a> +<span class="sourceLineNo">1054</span> }<a name="line.1054"></a> +<span class="sourceLineNo">1055</span><a name="line.1055"></a> +<span class="sourceLineNo">1056</span> /**<a name="line.1056"></a> +<span class="sourceLineNo">1057</span> * Returns the digest for the file.<a name="line.1057"></a> +<span class="sourceLineNo">1058</span> *<a name="line.1058"></a> +<span class="sourceLineNo">1059</span> * @param valueToDigest the file to use<a name="line.1059"></a> +<span class="sourceLineNo">1060</span> * @return the digest<a name="line.1060"></a> +<span class="sourceLineNo">1061</span> * @throws IOException<a name="line.1061"></a> +<span class="sourceLineNo">1062</span> * If an I/O error occurs.<a name="line.1062"></a> +<span class="sourceLineNo">1063</span> * @since 1.11<a name="line.1063"></a> +<span class="sourceLineNo">1064</span> */<a name="line.1064"></a> +<span class="sourceLineNo">1065</span> public byte[] hmac(final File valueToDigest) throws IOException {<a name="line.1065"></a> +<span class="sourceLineNo">1066</span> try (final BufferedInputStream stream = new BufferedInputStream(new FileInputStream(valueToDigest))) {<a name="line.1066"></a> +<span class="sourceLineNo">1067</span> return hmac(stream);<a name="line.1067"></a> +<span class="sourceLineNo">1068</span> }<a name="line.1068"></a> +<span class="sourceLineNo">1069</span> }<a name="line.1069"></a> +<span class="sourceLineNo">1070</span><a name="line.1070"></a> +<span class="sourceLineNo">1071</span> /**<a name="line.1071"></a> +<span class="sourceLineNo">1072</span> * Returns the digest for the file.<a name="line.1072"></a> +<span class="sourceLineNo">1073</span> *<a name="line.1073"></a> +<span class="sourceLineNo">1074</span> * @param valueToDigest the file to use<a name="line.1074"></a> +<span class="sourceLineNo">1075</span> * @return the digest as a hex String<a name="line.1075"></a> +<span class="sourceLineNo">1076</span> * @throws IOException<a name="line.1076"></a> +<span class="sourceLineNo">1077</span> * If an I/O error occurs.<a name="line.1077"></a> +<span class="sourceLineNo">1078</span> * @since 1.11<a name="line.1078"></a> +<span class="sourceLineNo">1079</span> */<a name="line.1079"></a> +<span class="sourceLineNo">1080</span> public String hmacHex(final File valueToDigest) throws IOException {<a name="line.1080"></a> +<span class="sourceLineNo">1081</span> return Hex.encodeHexString(hmac(valueToDigest));<a name="line.1081"></a> +<span class="sourceLineNo">1082</span> }<a name="line.1082"></a> +<span class="sourceLineNo">1083</span><a name="line.1083"></a> +<span class="sourceLineNo">1084</span>}<a name="line.1084"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/Md5Crypt.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/Md5Crypt.html new file mode 100644 index 0000000000000000000000000000000000000000..2eb92e1d0b2fc7f3cac770a90ce7b824ab38c501 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/Md5Crypt.html @@ -0,0 +1,477 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>package org.apache.commons.codec.digest;<a name="line.17"></a> +<span class="sourceLineNo">018</span><a name="line.18"></a> +<span class="sourceLineNo">019</span>import java.nio.charset.StandardCharsets;<a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.security.MessageDigest;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.security.SecureRandom;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.Arrays;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.Random;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.concurrent.ThreadLocalRandom;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.regex.Matcher;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.regex.Pattern;<a name="line.26"></a> +<span class="sourceLineNo">027</span><a name="line.27"></a> +<span class="sourceLineNo">028</span>/**<a name="line.28"></a> +<span class="sourceLineNo">029</span> * The libc crypt() "$1$" and Apache "$apr1$" MD5-based hash algorithm.<a name="line.29"></a> +<span class="sourceLineNo">030</span> * <p><a name="line.30"></a> +<span class="sourceLineNo">031</span> * Based on the public domain ("beer-ware") C implementation from Poul-Henning Kamp which was found at: <a<a name="line.31"></a> +<span class="sourceLineNo">032</span> * href="http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libcrypt/crypt-md5.c?rev=1.1;content-type=text%2Fplain"><a name="line.32"></a> +<span class="sourceLineNo">033</span> * crypt-md5.c @ freebsd.org</a><a name="line.33"></a> +<span class="sourceLineNo">034</span> * </p><a name="line.34"></a> +<span class="sourceLineNo">035</span> * <p><a name="line.35"></a> +<span class="sourceLineNo">036</span> * Source:<a name="line.36"></a> +<span class="sourceLineNo">037</span> * </p><a name="line.37"></a> +<span class="sourceLineNo">038</span> * <pre><a name="line.38"></a> +<span class="sourceLineNo">039</span> * $FreeBSD: src/lib/libcrypt/crypt-md5.c,v 1.1 1999/01/21 13:50:09 brandon Exp $<a name="line.39"></a> +<span class="sourceLineNo">040</span> * </pre><a name="line.40"></a> +<span class="sourceLineNo">041</span> * <p><a name="line.41"></a> +<span class="sourceLineNo">042</span> * Conversion to Kotlin and from there to Java in 2012.<a name="line.42"></a> +<span class="sourceLineNo">043</span> * </p><a name="line.43"></a> +<span class="sourceLineNo">044</span> * <p><a name="line.44"></a> +<span class="sourceLineNo">045</span> * The C style comments are from the original C code, the ones with "//" from the port.<a name="line.45"></a> +<span class="sourceLineNo">046</span> * </p><a name="line.46"></a> +<span class="sourceLineNo">047</span> * <p><a name="line.47"></a> +<span class="sourceLineNo">048</span> * This class is immutable and thread-safe.<a name="line.48"></a> +<span class="sourceLineNo">049</span> * </p><a name="line.49"></a> +<span class="sourceLineNo">050</span> *<a name="line.50"></a> +<span class="sourceLineNo">051</span> * @since 1.7<a name="line.51"></a> +<span class="sourceLineNo">052</span> */<a name="line.52"></a> +<span class="sourceLineNo">053</span>public class Md5Crypt {<a name="line.53"></a> +<span class="sourceLineNo">054</span><a name="line.54"></a> +<span class="sourceLineNo">055</span> /** The Identifier of the Apache variant. */<a name="line.55"></a> +<span class="sourceLineNo">056</span> static final String APR1_PREFIX = "$apr1$";<a name="line.56"></a> +<span class="sourceLineNo">057</span><a name="line.57"></a> +<span class="sourceLineNo">058</span> /** The number of bytes of the final hash. */<a name="line.58"></a> +<span class="sourceLineNo">059</span> private static final int BLOCKSIZE = 16;<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> /** The Identifier of this crypt() variant. */<a name="line.61"></a> +<span class="sourceLineNo">062</span> static final String MD5_PREFIX = "$1$";<a name="line.62"></a> +<span class="sourceLineNo">063</span><a name="line.63"></a> +<span class="sourceLineNo">064</span> /** The number of rounds of the big loop. */<a name="line.64"></a> +<span class="sourceLineNo">065</span> private static final int ROUNDS = 1000;<a name="line.65"></a> +<span class="sourceLineNo">066</span><a name="line.66"></a> +<span class="sourceLineNo">067</span> /**<a name="line.67"></a> +<span class="sourceLineNo">068</span> * See {@link #apr1Crypt(byte[], String)} for details.<a name="line.68"></a> +<span class="sourceLineNo">069</span> * <p><a name="line.69"></a> +<span class="sourceLineNo">070</span> * A salt is generated for you using {@link SecureRandom}; your own {@link Random} in<a name="line.70"></a> +<span class="sourceLineNo">071</span> * {@link #apr1Crypt(byte[], Random)}.<a name="line.71"></a> +<span class="sourceLineNo">072</span> * </p><a name="line.72"></a> +<span class="sourceLineNo">073</span> *<a name="line.73"></a> +<span class="sourceLineNo">074</span> * @param keyBytes plaintext string to hash.<a name="line.74"></a> +<span class="sourceLineNo">075</span> * @return the hash value<a name="line.75"></a> +<span class="sourceLineNo">076</span> * @throws IllegalArgumentException when a {@link java.security.NoSuchAlgorithmException} is caught. *<a name="line.76"></a> +<span class="sourceLineNo">077</span> * @see #apr1Crypt(byte[], String)<a name="line.77"></a> +<span class="sourceLineNo">078</span> */<a name="line.78"></a> +<span class="sourceLineNo">079</span> public static String apr1Crypt(final byte[] keyBytes) {<a name="line.79"></a> +<span class="sourceLineNo">080</span> return apr1Crypt(keyBytes, APR1_PREFIX + B64.getRandomSalt(8));<a name="line.80"></a> +<span class="sourceLineNo">081</span> }<a name="line.81"></a> +<span class="sourceLineNo">082</span><a name="line.82"></a> +<span class="sourceLineNo">083</span> /**<a name="line.83"></a> +<span class="sourceLineNo">084</span> * See {@link #apr1Crypt(byte[], String)} for details.<a name="line.84"></a> +<span class="sourceLineNo">085</span> * <p><a name="line.85"></a> +<span class="sourceLineNo">086</span> * A salt is generated for you using the user provided {@link Random}.<a name="line.86"></a> +<span class="sourceLineNo">087</span> * </p><a name="line.87"></a> +<span class="sourceLineNo">088</span> *<a name="line.88"></a> +<span class="sourceLineNo">089</span> * @param keyBytes plaintext string to hash.<a name="line.89"></a> +<span class="sourceLineNo">090</span> * @param random the instance of {@link Random} to use for generating the salt. Consider using {@link SecureRandom}<a name="line.90"></a> +<span class="sourceLineNo">091</span> * or {@link ThreadLocalRandom}.<a name="line.91"></a> +<span class="sourceLineNo">092</span> * @return the hash value<a name="line.92"></a> +<span class="sourceLineNo">093</span> * @throws IllegalArgumentException when a {@link java.security.NoSuchAlgorithmException} is caught. *<a name="line.93"></a> +<span class="sourceLineNo">094</span> * @see #apr1Crypt(byte[], String)<a name="line.94"></a> +<span class="sourceLineNo">095</span> * @since 1.12<a name="line.95"></a> +<span class="sourceLineNo">096</span> */<a name="line.96"></a> +<span class="sourceLineNo">097</span> public static String apr1Crypt(final byte[] keyBytes, final Random random) {<a name="line.97"></a> +<span class="sourceLineNo">098</span> return apr1Crypt(keyBytes, APR1_PREFIX + B64.getRandomSalt(8, random));<a name="line.98"></a> +<span class="sourceLineNo">099</span> }<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> /**<a name="line.101"></a> +<span class="sourceLineNo">102</span> * See {@link #apr1Crypt(String, String)} for details.<a name="line.102"></a> +<span class="sourceLineNo">103</span> * <p><a name="line.103"></a> +<span class="sourceLineNo">104</span> * A salt is generated for you using {@link SecureRandom}<a name="line.104"></a> +<span class="sourceLineNo">105</span> * </p><a name="line.105"></a> +<span class="sourceLineNo">106</span> *<a name="line.106"></a> +<span class="sourceLineNo">107</span> * @param keyBytes<a name="line.107"></a> +<span class="sourceLineNo">108</span> * plaintext string to hash.<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @param salt<a name="line.109"></a> +<span class="sourceLineNo">110</span> * An APR1 salt. The salt may be null, in which case a salt is generated for you using<a name="line.110"></a> +<span class="sourceLineNo">111</span> * {@link ThreadLocalRandom}; for more secure salts consider using {@link SecureRandom} to generate your<a name="line.111"></a> +<span class="sourceLineNo">112</span> * own salts.<a name="line.112"></a> +<span class="sourceLineNo">113</span> * @return the hash value<a name="line.113"></a> +<span class="sourceLineNo">114</span> * @throws IllegalArgumentException<a name="line.114"></a> +<span class="sourceLineNo">115</span> * if the salt does not match the allowed pattern<a name="line.115"></a> +<span class="sourceLineNo">116</span> * @throws IllegalArgumentException<a name="line.116"></a> +<span class="sourceLineNo">117</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.117"></a> +<span class="sourceLineNo">118</span> */<a name="line.118"></a> +<span class="sourceLineNo">119</span> public static String apr1Crypt(final byte[] keyBytes, String salt) {<a name="line.119"></a> +<span class="sourceLineNo">120</span> // to make the md5Crypt regex happy<a name="line.120"></a> +<span class="sourceLineNo">121</span> if (salt != null && !salt.startsWith(APR1_PREFIX)) {<a name="line.121"></a> +<span class="sourceLineNo">122</span> salt = APR1_PREFIX + salt;<a name="line.122"></a> +<span class="sourceLineNo">123</span> }<a name="line.123"></a> +<span class="sourceLineNo">124</span> return Md5Crypt.md5Crypt(keyBytes, salt, APR1_PREFIX);<a name="line.124"></a> +<span class="sourceLineNo">125</span> }<a name="line.125"></a> +<span class="sourceLineNo">126</span><a name="line.126"></a> +<span class="sourceLineNo">127</span> /**<a name="line.127"></a> +<span class="sourceLineNo">128</span> * See {@link #apr1Crypt(String, String)} for details.<a name="line.128"></a> +<span class="sourceLineNo">129</span> * <p><a name="line.129"></a> +<span class="sourceLineNo">130</span> * A salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.130"></a> +<span class="sourceLineNo">131</span> * {@link SecureRandom} to generate your own salts and calling {@link #apr1Crypt(byte[], String)}.<a name="line.131"></a> +<span class="sourceLineNo">132</span> * </p><a name="line.132"></a> +<span class="sourceLineNo">133</span> *<a name="line.133"></a> +<span class="sourceLineNo">134</span> * @param keyBytes<a name="line.134"></a> +<span class="sourceLineNo">135</span> * plaintext string to hash.<a name="line.135"></a> +<span class="sourceLineNo">136</span> * @return the hash value<a name="line.136"></a> +<span class="sourceLineNo">137</span> * @throws IllegalArgumentException<a name="line.137"></a> +<span class="sourceLineNo">138</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.138"></a> +<span class="sourceLineNo">139</span> * @see #apr1Crypt(byte[], String)<a name="line.139"></a> +<span class="sourceLineNo">140</span> */<a name="line.140"></a> +<span class="sourceLineNo">141</span> public static String apr1Crypt(final String keyBytes) {<a name="line.141"></a> +<span class="sourceLineNo">142</span> return apr1Crypt(keyBytes.getBytes(StandardCharsets.UTF_8));<a name="line.142"></a> +<span class="sourceLineNo">143</span> }<a name="line.143"></a> +<span class="sourceLineNo">144</span><a name="line.144"></a> +<span class="sourceLineNo">145</span> /**<a name="line.145"></a> +<span class="sourceLineNo">146</span> * Generates an Apache htpasswd compatible "$apr1$" MD5 based hash value.<a name="line.146"></a> +<span class="sourceLineNo">147</span> * <p><a name="line.147"></a> +<span class="sourceLineNo">148</span> * The algorithm is identical to the crypt(3) "$1$" one but produces different outputs due to the different salt<a name="line.148"></a> +<span class="sourceLineNo">149</span> * prefix.<a name="line.149"></a> +<span class="sourceLineNo">150</span> *<a name="line.150"></a> +<span class="sourceLineNo">151</span> * @param keyBytes<a name="line.151"></a> +<span class="sourceLineNo">152</span> * plaintext string to hash.<a name="line.152"></a> +<span class="sourceLineNo">153</span> * @param salt<a name="line.153"></a> +<span class="sourceLineNo">154</span> * salt string including the prefix and optionally garbage at the end. The salt may be null, in which<a name="line.154"></a> +<span class="sourceLineNo">155</span> * case a salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.155"></a> +<span class="sourceLineNo">156</span> * {@link SecureRandom} to generate your own salts.<a name="line.156"></a> +<span class="sourceLineNo">157</span> * @return the hash value<a name="line.157"></a> +<span class="sourceLineNo">158</span> * @throws IllegalArgumentException<a name="line.158"></a> +<span class="sourceLineNo">159</span> * if the salt does not match the allowed pattern<a name="line.159"></a> +<span class="sourceLineNo">160</span> * @throws IllegalArgumentException<a name="line.160"></a> +<span class="sourceLineNo">161</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.161"></a> +<span class="sourceLineNo">162</span> */<a name="line.162"></a> +<span class="sourceLineNo">163</span> public static String apr1Crypt(final String keyBytes, final String salt) {<a name="line.163"></a> +<span class="sourceLineNo">164</span> return apr1Crypt(keyBytes.getBytes(StandardCharsets.UTF_8), salt);<a name="line.164"></a> +<span class="sourceLineNo">165</span> }<a name="line.165"></a> +<span class="sourceLineNo">166</span><a name="line.166"></a> +<span class="sourceLineNo">167</span> /**<a name="line.167"></a> +<span class="sourceLineNo">168</span> * Generates a libc6 crypt() compatible "$1$" hash value.<a name="line.168"></a> +<span class="sourceLineNo">169</span> * <p><a name="line.169"></a> +<span class="sourceLineNo">170</span> * See {@link #md5Crypt(byte[], String)} for details.<a name="line.170"></a> +<span class="sourceLineNo">171</span> *</p><a name="line.171"></a> +<span class="sourceLineNo">172</span> * <p><a name="line.172"></a> +<span class="sourceLineNo">173</span> * A salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.173"></a> +<span class="sourceLineNo">174</span> * {@link SecureRandom} to generate your own salts and calling {@link #md5Crypt(byte[], String)}.<a name="line.174"></a> +<span class="sourceLineNo">175</span> * </p><a name="line.175"></a> +<span class="sourceLineNo">176</span> * @param keyBytes<a name="line.176"></a> +<span class="sourceLineNo">177</span> * plaintext string to hash.<a name="line.177"></a> +<span class="sourceLineNo">178</span> * @return the hash value<a name="line.178"></a> +<span class="sourceLineNo">179</span> * @throws IllegalArgumentException<a name="line.179"></a> +<span class="sourceLineNo">180</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.180"></a> +<span class="sourceLineNo">181</span> * @see #md5Crypt(byte[], String)<a name="line.181"></a> +<span class="sourceLineNo">182</span> */<a name="line.182"></a> +<span class="sourceLineNo">183</span> public static String md5Crypt(final byte[] keyBytes) {<a name="line.183"></a> +<span class="sourceLineNo">184</span> return md5Crypt(keyBytes, MD5_PREFIX + B64.getRandomSalt(8));<a name="line.184"></a> +<span class="sourceLineNo">185</span> }<a name="line.185"></a> +<span class="sourceLineNo">186</span><a name="line.186"></a> +<span class="sourceLineNo">187</span> /**<a name="line.187"></a> +<span class="sourceLineNo">188</span> * Generates a libc6 crypt() compatible "$1$" hash value.<a name="line.188"></a> +<span class="sourceLineNo">189</span> * <p><a name="line.189"></a> +<span class="sourceLineNo">190</span> * See {@link #md5Crypt(byte[], String)} for details.<a name="line.190"></a> +<span class="sourceLineNo">191</span> *</p><a name="line.191"></a> +<span class="sourceLineNo">192</span> * <p><a name="line.192"></a> +<span class="sourceLineNo">193</span> * A salt is generated for you using the instance of {@link Random} you supply.<a name="line.193"></a> +<span class="sourceLineNo">194</span> * </p><a name="line.194"></a> +<span class="sourceLineNo">195</span> * @param keyBytes<a name="line.195"></a> +<span class="sourceLineNo">196</span> * plaintext string to hash.<a name="line.196"></a> +<span class="sourceLineNo">197</span> * @param random<a name="line.197"></a> +<span class="sourceLineNo">198</span> * the instance of {@link Random} to use for generating the salt. Consider using {@link SecureRandom}<a name="line.198"></a> +<span class="sourceLineNo">199</span> * or {@link ThreadLocalRandom}.<a name="line.199"></a> +<span class="sourceLineNo">200</span> * @return the hash value<a name="line.200"></a> +<span class="sourceLineNo">201</span> * @throws IllegalArgumentException<a name="line.201"></a> +<span class="sourceLineNo">202</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.202"></a> +<span class="sourceLineNo">203</span> * @see #md5Crypt(byte[], String)<a name="line.203"></a> +<span class="sourceLineNo">204</span> * @since 1.12<a name="line.204"></a> +<span class="sourceLineNo">205</span> */<a name="line.205"></a> +<span class="sourceLineNo">206</span> public static String md5Crypt(final byte[] keyBytes, final Random random) {<a name="line.206"></a> +<span class="sourceLineNo">207</span> return md5Crypt(keyBytes, MD5_PREFIX + B64.getRandomSalt(8, random));<a name="line.207"></a> +<span class="sourceLineNo">208</span> }<a name="line.208"></a> +<span class="sourceLineNo">209</span><a name="line.209"></a> +<span class="sourceLineNo">210</span> /**<a name="line.210"></a> +<span class="sourceLineNo">211</span> * Generates a libc crypt() compatible "$1$" MD5 based hash value.<a name="line.211"></a> +<span class="sourceLineNo">212</span> * <p><a name="line.212"></a> +<span class="sourceLineNo">213</span> * See {@link Crypt#crypt(String, String)} for details. We use {@link SecureRandom} for seed generation by<a name="line.213"></a> +<span class="sourceLineNo">214</span> * default.<a name="line.214"></a> +<span class="sourceLineNo">215</span> * </p><a name="line.215"></a> +<span class="sourceLineNo">216</span> *<a name="line.216"></a> +<span class="sourceLineNo">217</span> * @param keyBytes<a name="line.217"></a> +<span class="sourceLineNo">218</span> * plaintext string to hash.<a name="line.218"></a> +<span class="sourceLineNo">219</span> * @param salt<a name="line.219"></a> +<span class="sourceLineNo">220</span> * salt string including the prefix and optionally garbage at the end. The salt may be null, in which<a name="line.220"></a> +<span class="sourceLineNo">221</span> * case a salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.221"></a> +<span class="sourceLineNo">222</span> * {@link SecureRandom} to generate your own salts.<a name="line.222"></a> +<span class="sourceLineNo">223</span> * @return the hash value<a name="line.223"></a> +<span class="sourceLineNo">224</span> * @throws IllegalArgumentException<a name="line.224"></a> +<span class="sourceLineNo">225</span> * if the salt does not match the allowed pattern<a name="line.225"></a> +<span class="sourceLineNo">226</span> * @throws IllegalArgumentException<a name="line.226"></a> +<span class="sourceLineNo">227</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.227"></a> +<span class="sourceLineNo">228</span> */<a name="line.228"></a> +<span class="sourceLineNo">229</span> public static String md5Crypt(final byte[] keyBytes, final String salt) {<a name="line.229"></a> +<span class="sourceLineNo">230</span> return md5Crypt(keyBytes, salt, MD5_PREFIX);<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> /**<a name="line.233"></a> +<span class="sourceLineNo">234</span> * Generates a libc6 crypt() "$1$" or Apache htpasswd "$apr1$" hash value.<a name="line.234"></a> +<span class="sourceLineNo">235</span> * <p><a name="line.235"></a> +<span class="sourceLineNo">236</span> * See {@link Crypt#crypt(String, String)} or {@link #apr1Crypt(String, String)} for details. We use<a name="line.236"></a> +<span class="sourceLineNo">237</span> * {@link SecureRandom by default}.<a name="line.237"></a> +<span class="sourceLineNo">238</span> * </p><a name="line.238"></a> +<span class="sourceLineNo">239</span> *<a name="line.239"></a> +<span class="sourceLineNo">240</span> * @param keyBytes<a name="line.240"></a> +<span class="sourceLineNo">241</span> * plaintext string to hash.<a name="line.241"></a> +<span class="sourceLineNo">242</span> * @param salt<a name="line.242"></a> +<span class="sourceLineNo">243</span> * real salt value without prefix or "rounds=". The salt may be null, in which case a salt<a name="line.243"></a> +<span class="sourceLineNo">244</span> * is generated for you using {@link ThreadLocalRandom}; for more secure salts consider<a name="line.244"></a> +<span class="sourceLineNo">245</span> * using {@link SecureRandom} to generate your own salts.<a name="line.245"></a> +<span class="sourceLineNo">246</span> * @param prefix<a name="line.246"></a> +<span class="sourceLineNo">247</span> * salt prefix<a name="line.247"></a> +<span class="sourceLineNo">248</span> * @return the hash value<a name="line.248"></a> +<span class="sourceLineNo">249</span> * @throws IllegalArgumentException<a name="line.249"></a> +<span class="sourceLineNo">250</span> * if the salt does not match the allowed pattern<a name="line.250"></a> +<span class="sourceLineNo">251</span> * @throws IllegalArgumentException<a name="line.251"></a> +<span class="sourceLineNo">252</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.252"></a> +<span class="sourceLineNo">253</span> */<a name="line.253"></a> +<span class="sourceLineNo">254</span> public static String md5Crypt(final byte[] keyBytes, final String salt, final String prefix) {<a name="line.254"></a> +<span class="sourceLineNo">255</span> return md5Crypt(keyBytes, salt, prefix, new SecureRandom());<a name="line.255"></a> +<span class="sourceLineNo">256</span> }<a name="line.256"></a> +<span class="sourceLineNo">257</span><a name="line.257"></a> +<span class="sourceLineNo">258</span> /**<a name="line.258"></a> +<span class="sourceLineNo">259</span> * Generates a libc6 crypt() "$1$" or Apache htpasswd "$apr1$" hash value.<a name="line.259"></a> +<span class="sourceLineNo">260</span> * <p><a name="line.260"></a> +<span class="sourceLineNo">261</span> * See {@link Crypt#crypt(String, String)} or {@link #apr1Crypt(String, String)} for details.<a name="line.261"></a> +<span class="sourceLineNo">262</span> * </p><a name="line.262"></a> +<span class="sourceLineNo">263</span> *<a name="line.263"></a> +<span class="sourceLineNo">264</span> * @param keyBytes<a name="line.264"></a> +<span class="sourceLineNo">265</span> * plaintext string to hash.<a name="line.265"></a> +<span class="sourceLineNo">266</span> * @param salt<a name="line.266"></a> +<span class="sourceLineNo">267</span> * real salt value without prefix or "rounds=". The salt may be null, in which case a salt<a name="line.267"></a> +<span class="sourceLineNo">268</span> * is generated for you using {@link ThreadLocalRandom}; for more secure salts consider<a name="line.268"></a> +<span class="sourceLineNo">269</span> * using {@link SecureRandom} to generate your own salts.<a name="line.269"></a> +<span class="sourceLineNo">270</span> * @param prefix<a name="line.270"></a> +<span class="sourceLineNo">271</span> * salt prefix<a name="line.271"></a> +<span class="sourceLineNo">272</span> * @param random<a name="line.272"></a> +<span class="sourceLineNo">273</span> * the instance of {@link Random} to use for generating the salt. Consider using {@link SecureRandom}<a name="line.273"></a> +<span class="sourceLineNo">274</span> * or {@link ThreadLocalRandom}.<a name="line.274"></a> +<span class="sourceLineNo">275</span> * @return the hash value<a name="line.275"></a> +<span class="sourceLineNo">276</span> * @throws IllegalArgumentException<a name="line.276"></a> +<span class="sourceLineNo">277</span> * if the salt does not match the allowed pattern<a name="line.277"></a> +<span class="sourceLineNo">278</span> * @throws IllegalArgumentException<a name="line.278"></a> +<span class="sourceLineNo">279</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.279"></a> +<span class="sourceLineNo">280</span> * @since 1.12<a name="line.280"></a> +<span class="sourceLineNo">281</span> */<a name="line.281"></a> +<span class="sourceLineNo">282</span> public static String md5Crypt(final byte[] keyBytes, final String salt, final String prefix, final Random random) {<a name="line.282"></a> +<span class="sourceLineNo">283</span> final int keyLen = keyBytes.length;<a name="line.283"></a> +<span class="sourceLineNo">284</span><a name="line.284"></a> +<span class="sourceLineNo">285</span> // Extract the real salt from the given string which can be a complete hash string.<a name="line.285"></a> +<span class="sourceLineNo">286</span> String saltString;<a name="line.286"></a> +<span class="sourceLineNo">287</span> if (salt == null) {<a name="line.287"></a> +<span class="sourceLineNo">288</span> saltString = B64.getRandomSalt(8, random);<a name="line.288"></a> +<span class="sourceLineNo">289</span> } else {<a name="line.289"></a> +<span class="sourceLineNo">290</span> final Pattern p = Pattern.compile("^" + prefix.replace("$", "\\$") + "([\\.\\/a-zA-Z0-9]{1,8}).*");<a name="line.290"></a> +<span class="sourceLineNo">291</span> final Matcher m = p.matcher(salt);<a name="line.291"></a> +<span class="sourceLineNo">292</span> if (!m.find()) {<a name="line.292"></a> +<span class="sourceLineNo">293</span> throw new IllegalArgumentException("Invalid salt value: " + salt);<a name="line.293"></a> +<span class="sourceLineNo">294</span> }<a name="line.294"></a> +<span class="sourceLineNo">295</span> saltString = m.group(1);<a name="line.295"></a> +<span class="sourceLineNo">296</span> }<a name="line.296"></a> +<span class="sourceLineNo">297</span> final byte[] saltBytes = saltString.getBytes(StandardCharsets.UTF_8);<a name="line.297"></a> +<span class="sourceLineNo">298</span><a name="line.298"></a> +<span class="sourceLineNo">299</span> final MessageDigest ctx = DigestUtils.getMd5Digest();<a name="line.299"></a> +<span class="sourceLineNo">300</span><a name="line.300"></a> +<span class="sourceLineNo">301</span> /*<a name="line.301"></a> +<span class="sourceLineNo">302</span> * The password first, since that is what is most unknown<a name="line.302"></a> +<span class="sourceLineNo">303</span> */<a name="line.303"></a> +<span class="sourceLineNo">304</span> ctx.update(keyBytes);<a name="line.304"></a> +<span class="sourceLineNo">305</span><a name="line.305"></a> +<span class="sourceLineNo">306</span> /*<a name="line.306"></a> +<span class="sourceLineNo">307</span> * Then our magic string<a name="line.307"></a> +<span class="sourceLineNo">308</span> */<a name="line.308"></a> +<span class="sourceLineNo">309</span> ctx.update(prefix.getBytes(StandardCharsets.UTF_8));<a name="line.309"></a> +<span class="sourceLineNo">310</span><a name="line.310"></a> +<span class="sourceLineNo">311</span> /*<a name="line.311"></a> +<span class="sourceLineNo">312</span> * Then the raw salt<a name="line.312"></a> +<span class="sourceLineNo">313</span> */<a name="line.313"></a> +<span class="sourceLineNo">314</span> ctx.update(saltBytes);<a name="line.314"></a> +<span class="sourceLineNo">315</span><a name="line.315"></a> +<span class="sourceLineNo">316</span> /*<a name="line.316"></a> +<span class="sourceLineNo">317</span> * Then just as many characters of the MD5(pw,salt,pw)<a name="line.317"></a> +<span class="sourceLineNo">318</span> */<a name="line.318"></a> +<span class="sourceLineNo">319</span> MessageDigest ctx1 = DigestUtils.getMd5Digest();<a name="line.319"></a> +<span class="sourceLineNo">320</span> ctx1.update(keyBytes);<a name="line.320"></a> +<span class="sourceLineNo">321</span> ctx1.update(saltBytes);<a name="line.321"></a> +<span class="sourceLineNo">322</span> ctx1.update(keyBytes);<a name="line.322"></a> +<span class="sourceLineNo">323</span> byte[] finalb = ctx1.digest();<a name="line.323"></a> +<span class="sourceLineNo">324</span> int ii = keyLen;<a name="line.324"></a> +<span class="sourceLineNo">325</span> while (ii > 0) {<a name="line.325"></a> +<span class="sourceLineNo">326</span> ctx.update(finalb, 0, ii > 16 ? 16 : ii);<a name="line.326"></a> +<span class="sourceLineNo">327</span> ii -= 16;<a name="line.327"></a> +<span class="sourceLineNo">328</span> }<a name="line.328"></a> +<span class="sourceLineNo">329</span><a name="line.329"></a> +<span class="sourceLineNo">330</span> /*<a name="line.330"></a> +<span class="sourceLineNo">331</span> * Don't leave anything around in vm they could use.<a name="line.331"></a> +<span class="sourceLineNo">332</span> */<a name="line.332"></a> +<span class="sourceLineNo">333</span> Arrays.fill(finalb, (byte) 0);<a name="line.333"></a> +<span class="sourceLineNo">334</span><a name="line.334"></a> +<span class="sourceLineNo">335</span> /*<a name="line.335"></a> +<span class="sourceLineNo">336</span> * Then something really weird...<a name="line.336"></a> +<span class="sourceLineNo">337</span> */<a name="line.337"></a> +<span class="sourceLineNo">338</span> ii = keyLen;<a name="line.338"></a> +<span class="sourceLineNo">339</span> final int j = 0;<a name="line.339"></a> +<span class="sourceLineNo">340</span> while (ii > 0) {<a name="line.340"></a> +<span class="sourceLineNo">341</span> if ((ii & 1) == 1) {<a name="line.341"></a> +<span class="sourceLineNo">342</span> ctx.update(finalb[j]);<a name="line.342"></a> +<span class="sourceLineNo">343</span> } else {<a name="line.343"></a> +<span class="sourceLineNo">344</span> ctx.update(keyBytes[j]);<a name="line.344"></a> +<span class="sourceLineNo">345</span> }<a name="line.345"></a> +<span class="sourceLineNo">346</span> ii >>= 1;<a name="line.346"></a> +<span class="sourceLineNo">347</span> }<a name="line.347"></a> +<span class="sourceLineNo">348</span><a name="line.348"></a> +<span class="sourceLineNo">349</span> /*<a name="line.349"></a> +<span class="sourceLineNo">350</span> * Now make the output string<a name="line.350"></a> +<span class="sourceLineNo">351</span> */<a name="line.351"></a> +<span class="sourceLineNo">352</span> final StringBuilder passwd = new StringBuilder(prefix + saltString + "$");<a name="line.352"></a> +<span class="sourceLineNo">353</span> finalb = ctx.digest();<a name="line.353"></a> +<span class="sourceLineNo">354</span><a name="line.354"></a> +<span class="sourceLineNo">355</span> /*<a name="line.355"></a> +<span class="sourceLineNo">356</span> * and now, just to make sure things don't run too fast On a 60 Mhz Pentium this takes 34 msec, so you would<a name="line.356"></a> +<span class="sourceLineNo">357</span> * need 30 seconds to build a 1000 entry dictionary...<a name="line.357"></a> +<span class="sourceLineNo">358</span> */<a name="line.358"></a> +<span class="sourceLineNo">359</span> for (int i = 0; i < ROUNDS; i++) {<a name="line.359"></a> +<span class="sourceLineNo">360</span> ctx1 = DigestUtils.getMd5Digest();<a name="line.360"></a> +<span class="sourceLineNo">361</span> if ((i & 1) != 0) {<a name="line.361"></a> +<span class="sourceLineNo">362</span> ctx1.update(keyBytes);<a name="line.362"></a> +<span class="sourceLineNo">363</span> } else {<a name="line.363"></a> +<span class="sourceLineNo">364</span> ctx1.update(finalb, 0, BLOCKSIZE);<a name="line.364"></a> +<span class="sourceLineNo">365</span> }<a name="line.365"></a> +<span class="sourceLineNo">366</span><a name="line.366"></a> +<span class="sourceLineNo">367</span> if (i % 3 != 0) {<a name="line.367"></a> +<span class="sourceLineNo">368</span> ctx1.update(saltBytes);<a name="line.368"></a> +<span class="sourceLineNo">369</span> }<a name="line.369"></a> +<span class="sourceLineNo">370</span><a name="line.370"></a> +<span class="sourceLineNo">371</span> if (i % 7 != 0) {<a name="line.371"></a> +<span class="sourceLineNo">372</span> ctx1.update(keyBytes);<a name="line.372"></a> +<span class="sourceLineNo">373</span> }<a name="line.373"></a> +<span class="sourceLineNo">374</span><a name="line.374"></a> +<span class="sourceLineNo">375</span> if ((i & 1) != 0) {<a name="line.375"></a> +<span class="sourceLineNo">376</span> ctx1.update(finalb, 0, BLOCKSIZE);<a name="line.376"></a> +<span class="sourceLineNo">377</span> } else {<a name="line.377"></a> +<span class="sourceLineNo">378</span> ctx1.update(keyBytes);<a name="line.378"></a> +<span class="sourceLineNo">379</span> }<a name="line.379"></a> +<span class="sourceLineNo">380</span> finalb = ctx1.digest();<a name="line.380"></a> +<span class="sourceLineNo">381</span> }<a name="line.381"></a> +<span class="sourceLineNo">382</span><a name="line.382"></a> +<span class="sourceLineNo">383</span> // The following was nearly identical to the Sha2Crypt code.<a name="line.383"></a> +<span class="sourceLineNo">384</span> // Again, the buflen is not really needed.<a name="line.384"></a> +<span class="sourceLineNo">385</span> // int buflen = MD5_PREFIX.length() - 1 + salt_string.length() + 1 + BLOCKSIZE + 1;<a name="line.385"></a> +<span class="sourceLineNo">386</span> B64.b64from24bit(finalb[0], finalb[6], finalb[12], 4, passwd);<a name="line.386"></a> +<span class="sourceLineNo">387</span> B64.b64from24bit(finalb[1], finalb[7], finalb[13], 4, passwd);<a name="line.387"></a> +<span class="sourceLineNo">388</span> B64.b64from24bit(finalb[2], finalb[8], finalb[14], 4, passwd);<a name="line.388"></a> +<span class="sourceLineNo">389</span> B64.b64from24bit(finalb[3], finalb[9], finalb[15], 4, passwd);<a name="line.389"></a> +<span class="sourceLineNo">390</span> B64.b64from24bit(finalb[4], finalb[10], finalb[5], 4, passwd);<a name="line.390"></a> +<span class="sourceLineNo">391</span> B64.b64from24bit((byte) 0, (byte) 0, finalb[11], 2, passwd);<a name="line.391"></a> +<span class="sourceLineNo">392</span><a name="line.392"></a> +<span class="sourceLineNo">393</span> /*<a name="line.393"></a> +<span class="sourceLineNo">394</span> * Don't leave anything around in vm they could use.<a name="line.394"></a> +<span class="sourceLineNo">395</span> */<a name="line.395"></a> +<span class="sourceLineNo">396</span> // Is there a better way to do this with the JVM?<a name="line.396"></a> +<span class="sourceLineNo">397</span> ctx.reset();<a name="line.397"></a> +<span class="sourceLineNo">398</span> ctx1.reset();<a name="line.398"></a> +<span class="sourceLineNo">399</span> Arrays.fill(keyBytes, (byte) 0);<a name="line.399"></a> +<span class="sourceLineNo">400</span> Arrays.fill(saltBytes, (byte) 0);<a name="line.400"></a> +<span class="sourceLineNo">401</span> Arrays.fill(finalb, (byte) 0);<a name="line.401"></a> +<span class="sourceLineNo">402</span><a name="line.402"></a> +<span class="sourceLineNo">403</span> return passwd.toString();<a name="line.403"></a> +<span class="sourceLineNo">404</span> }<a name="line.404"></a> +<span class="sourceLineNo">405</span>}<a name="line.405"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MessageDigestAlgorithms.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MessageDigestAlgorithms.html new file mode 100644 index 0000000000000000000000000000000000000000..b98997993fa54a3cef068c6dc6d79c610a8a2ec3 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MessageDigestAlgorithms.html @@ -0,0 +1,245 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.digest;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.security.MessageDigest;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>/**<a name="line.22"></a> +<span class="sourceLineNo">023</span> * Standard {@link MessageDigest} algorithm names from the <cite>Java Cryptography Architecture Standard Algorithm Name<a name="line.23"></a> +<span class="sourceLineNo">024</span> * Documentation</cite>.<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * This class is immutable and thread-safe.<a name="line.26"></a> +<span class="sourceLineNo">027</span> * </p><a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p><a name="line.28"></a> +<span class="sourceLineNo">029</span> * Java 8 and up: SHA-224.<a name="line.29"></a> +<span class="sourceLineNo">030</span> * </p><a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * Java 9 and up: SHA3-224, SHA3-256, SHA3-384, SHA3-512.<a name="line.32"></a> +<span class="sourceLineNo">033</span> * </p><a name="line.33"></a> +<span class="sourceLineNo">034</span> *<a name="line.34"></a> +<span class="sourceLineNo">035</span> * @see <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#MessageDigest"><a name="line.35"></a> +<span class="sourceLineNo">036</span> * Java 7 Cryptography Architecture Standard Algorithm Name Documentation</a><a name="line.36"></a> +<span class="sourceLineNo">037</span> * @see <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#MessageDigest"><a name="line.37"></a> +<span class="sourceLineNo">038</span> * Java 8 Cryptography Architecture Standard Algorithm Name Documentation</a><a name="line.38"></a> +<span class="sourceLineNo">039</span> * @see <a href="https://docs.oracle.com/javase/9/docs/specs/security/standard-names.html#messagedigest-algorithms"><a name="line.39"></a> +<span class="sourceLineNo">040</span> * Java 9 Cryptography Architecture Standard Algorithm Name Documentation</a><a name="line.40"></a> +<span class="sourceLineNo">041</span> * @see <a href="https://docs.oracle.com/javase/10/docs/specs/security/standard-names.html#messagedigest-algorithms"><a name="line.41"></a> +<span class="sourceLineNo">042</span> * Java 10 Cryptography Architecture Standard Algorithm Name Documentation</a><a name="line.42"></a> +<span class="sourceLineNo">043</span> * @see <a href="https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html#messagedigest-algorithms"><a name="line.43"></a> +<span class="sourceLineNo">044</span> * Java 11 Cryptography Architecture Standard Algorithm Name Documentation</a><a name="line.44"></a> +<span class="sourceLineNo">045</span> * @see <a href="https://docs.oracle.com/en/java/javase/12/docs/specs/security/standard-names.html#messagedigest-algorithms"><a name="line.45"></a> +<span class="sourceLineNo">046</span> * Java 12 Cryptography Architecture Standard Algorithm Name Documentation</a><a name="line.46"></a> +<span class="sourceLineNo">047</span> * @see <a href="https://docs.oracle.com/en/java/javase/13/docs/specs/security/standard-names.html#messagedigest-algorithms"><a name="line.47"></a> +<span class="sourceLineNo">048</span> * Java 13 Cryptography Architecture Standard Algorithm Name Documentation</a><a name="line.48"></a> +<span class="sourceLineNo">049</span> *<a name="line.49"></a> +<span class="sourceLineNo">050</span> * @see <a href="http://dx.doi.org/10.6028/NIST.FIPS.180-4">FIPS PUB 180-4</a><a name="line.50"></a> +<span class="sourceLineNo">051</span> * @see <a href="http://dx.doi.org/10.6028/NIST.FIPS.202">FIPS PUB 202</a><a name="line.51"></a> +<span class="sourceLineNo">052</span> * @since 1.7<a name="line.52"></a> +<span class="sourceLineNo">053</span> */<a name="line.53"></a> +<span class="sourceLineNo">054</span>public class MessageDigestAlgorithms {<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> /**<a name="line.56"></a> +<span class="sourceLineNo">057</span> * The MD2 message digest algorithm defined in RFC 1319.<a name="line.57"></a> +<span class="sourceLineNo">058</span> */<a name="line.58"></a> +<span class="sourceLineNo">059</span> public static final String MD2 = "MD2";<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> /**<a name="line.61"></a> +<span class="sourceLineNo">062</span> * The MD5 message digest algorithm defined in RFC 1321.<a name="line.62"></a> +<span class="sourceLineNo">063</span> */<a name="line.63"></a> +<span class="sourceLineNo">064</span> public static final String MD5 = "MD5";<a name="line.64"></a> +<span class="sourceLineNo">065</span><a name="line.65"></a> +<span class="sourceLineNo">066</span> /**<a name="line.66"></a> +<span class="sourceLineNo">067</span> * The SHA-1 hash algorithm defined in the FIPS PUB 180-2.<a name="line.67"></a> +<span class="sourceLineNo">068</span> */<a name="line.68"></a> +<span class="sourceLineNo">069</span> public static final String SHA_1 = "SHA-1";<a name="line.69"></a> +<span class="sourceLineNo">070</span><a name="line.70"></a> +<span class="sourceLineNo">071</span> /**<a name="line.71"></a> +<span class="sourceLineNo">072</span> * The SHA-224 hash algorithm defined in the FIPS PUB 180-3.<a name="line.72"></a> +<span class="sourceLineNo">073</span> * <p><a name="line.73"></a> +<span class="sourceLineNo">074</span> * Present in Oracle Java 8.<a name="line.74"></a> +<span class="sourceLineNo">075</span> * </p><a name="line.75"></a> +<span class="sourceLineNo">076</span> *<a name="line.76"></a> +<span class="sourceLineNo">077</span> * @since 1.11<a name="line.77"></a> +<span class="sourceLineNo">078</span> */<a name="line.78"></a> +<span class="sourceLineNo">079</span> public static final String SHA_224 = "SHA-224";<a name="line.79"></a> +<span class="sourceLineNo">080</span><a name="line.80"></a> +<span class="sourceLineNo">081</span> /**<a name="line.81"></a> +<span class="sourceLineNo">082</span> * The SHA-256 hash algorithm defined in the FIPS PUB 180-2.<a name="line.82"></a> +<span class="sourceLineNo">083</span> */<a name="line.83"></a> +<span class="sourceLineNo">084</span> public static final String SHA_256 = "SHA-256";<a name="line.84"></a> +<span class="sourceLineNo">085</span><a name="line.85"></a> +<span class="sourceLineNo">086</span> /**<a name="line.86"></a> +<span class="sourceLineNo">087</span> * The SHA-384 hash algorithm defined in the FIPS PUB 180-2.<a name="line.87"></a> +<span class="sourceLineNo">088</span> */<a name="line.88"></a> +<span class="sourceLineNo">089</span> public static final String SHA_384 = "SHA-384";<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> /**<a name="line.91"></a> +<span class="sourceLineNo">092</span> * The SHA-512 hash algorithm defined in the FIPS PUB 180-2.<a name="line.92"></a> +<span class="sourceLineNo">093</span> */<a name="line.93"></a> +<span class="sourceLineNo">094</span> public static final String SHA_512 = "SHA-512";<a name="line.94"></a> +<span class="sourceLineNo">095</span><a name="line.95"></a> +<span class="sourceLineNo">096</span> /**<a name="line.96"></a> +<span class="sourceLineNo">097</span> * The SHA-512 hash algorithm defined in the FIPS PUB 180-4.<a name="line.97"></a> +<span class="sourceLineNo">098</span> * <p><a name="line.98"></a> +<span class="sourceLineNo">099</span> * Included starting in Oracle Java 9.<a name="line.99"></a> +<span class="sourceLineNo">100</span> * </p><a name="line.100"></a> +<span class="sourceLineNo">101</span> *<a name="line.101"></a> +<span class="sourceLineNo">102</span> * @since 1.14<a name="line.102"></a> +<span class="sourceLineNo">103</span> */<a name="line.103"></a> +<span class="sourceLineNo">104</span> public static final String SHA_512_224 = "SHA-512/224";<a name="line.104"></a> +<span class="sourceLineNo">105</span><a name="line.105"></a> +<span class="sourceLineNo">106</span> /**<a name="line.106"></a> +<span class="sourceLineNo">107</span> * The SHA-512 hash algorithm defined in the FIPS PUB 180-4.<a name="line.107"></a> +<span class="sourceLineNo">108</span> * <p><a name="line.108"></a> +<span class="sourceLineNo">109</span> * Included starting in Oracle Java 9.<a name="line.109"></a> +<span class="sourceLineNo">110</span> * </p><a name="line.110"></a> +<span class="sourceLineNo">111</span> *<a name="line.111"></a> +<span class="sourceLineNo">112</span> * @since 1.14<a name="line.112"></a> +<span class="sourceLineNo">113</span> */<a name="line.113"></a> +<span class="sourceLineNo">114</span> public static final String SHA_512_256 = "SHA-512/256";<a name="line.114"></a> +<span class="sourceLineNo">115</span><a name="line.115"></a> +<span class="sourceLineNo">116</span> /**<a name="line.116"></a> +<span class="sourceLineNo">117</span> * The SHA3-224 hash algorithm defined in the FIPS PUB 202.<a name="line.117"></a> +<span class="sourceLineNo">118</span> * <p><a name="line.118"></a> +<span class="sourceLineNo">119</span> * Included starting in Oracle Java 9.<a name="line.119"></a> +<span class="sourceLineNo">120</span> * </p><a name="line.120"></a> +<span class="sourceLineNo">121</span> *<a name="line.121"></a> +<span class="sourceLineNo">122</span> * @since 1.11<a name="line.122"></a> +<span class="sourceLineNo">123</span> */<a name="line.123"></a> +<span class="sourceLineNo">124</span> public static final String SHA3_224 = "SHA3-224";<a name="line.124"></a> +<span class="sourceLineNo">125</span><a name="line.125"></a> +<span class="sourceLineNo">126</span> /**<a name="line.126"></a> +<span class="sourceLineNo">127</span> * The SHA3-256 hash algorithm defined in the FIPS PUB 202.<a name="line.127"></a> +<span class="sourceLineNo">128</span> * <p><a name="line.128"></a> +<span class="sourceLineNo">129</span> * Included starting in Oracle Java 9.<a name="line.129"></a> +<span class="sourceLineNo">130</span> * </p><a name="line.130"></a> +<span class="sourceLineNo">131</span> *<a name="line.131"></a> +<span class="sourceLineNo">132</span> * @since 1.11<a name="line.132"></a> +<span class="sourceLineNo">133</span> */<a name="line.133"></a> +<span class="sourceLineNo">134</span> public static final String SHA3_256 = "SHA3-256";<a name="line.134"></a> +<span class="sourceLineNo">135</span><a name="line.135"></a> +<span class="sourceLineNo">136</span> /**<a name="line.136"></a> +<span class="sourceLineNo">137</span> * The SHA3-384 hash algorithm defined in the FIPS PUB 202.<a name="line.137"></a> +<span class="sourceLineNo">138</span> * <p><a name="line.138"></a> +<span class="sourceLineNo">139</span> * Included starting in Oracle Java 9.<a name="line.139"></a> +<span class="sourceLineNo">140</span> * </p><a name="line.140"></a> +<span class="sourceLineNo">141</span> *<a name="line.141"></a> +<span class="sourceLineNo">142</span> * @since 1.11<a name="line.142"></a> +<span class="sourceLineNo">143</span> */<a name="line.143"></a> +<span class="sourceLineNo">144</span> public static final String SHA3_384 = "SHA3-384";<a name="line.144"></a> +<span class="sourceLineNo">145</span><a name="line.145"></a> +<span class="sourceLineNo">146</span> /**<a name="line.146"></a> +<span class="sourceLineNo">147</span> * The SHA3-512 hash algorithm defined in the FIPS PUB 202.<a name="line.147"></a> +<span class="sourceLineNo">148</span> * <p><a name="line.148"></a> +<span class="sourceLineNo">149</span> * Included starting in Oracle Java 9.<a name="line.149"></a> +<span class="sourceLineNo">150</span> * </p><a name="line.150"></a> +<span class="sourceLineNo">151</span> *<a name="line.151"></a> +<span class="sourceLineNo">152</span> * @since 1.11<a name="line.152"></a> +<span class="sourceLineNo">153</span> */<a name="line.153"></a> +<span class="sourceLineNo">154</span> public static final String SHA3_512 = "SHA3-512";<a name="line.154"></a> +<span class="sourceLineNo">155</span><a name="line.155"></a> +<span class="sourceLineNo">156</span> /**<a name="line.156"></a> +<span class="sourceLineNo">157</span> * Gets all constant values defined in this class.<a name="line.157"></a> +<span class="sourceLineNo">158</span> *<a name="line.158"></a> +<span class="sourceLineNo">159</span> * @return all constant values defined in this class.<a name="line.159"></a> +<span class="sourceLineNo">160</span> * @since 1.11<a name="line.160"></a> +<span class="sourceLineNo">161</span> */<a name="line.161"></a> +<span class="sourceLineNo">162</span> public static String[] values() {<a name="line.162"></a> +<span class="sourceLineNo">163</span> // N.B. do not use a constant array here as that can be changed externally by accident or design<a name="line.163"></a> +<span class="sourceLineNo">164</span> return new String[] {<a name="line.164"></a> +<span class="sourceLineNo">165</span> MD2, MD5, SHA_1, SHA_224, SHA_256, SHA_384, SHA_512, SHA_512_224, SHA_512_256, SHA3_224, SHA3_256, SHA3_384, SHA3_512<a name="line.165"></a> +<span class="sourceLineNo">166</span> };<a name="line.166"></a> +<span class="sourceLineNo">167</span> }<a name="line.167"></a> +<span class="sourceLineNo">168</span><a name="line.168"></a> +<span class="sourceLineNo">169</span> private MessageDigestAlgorithms() {<a name="line.169"></a> +<span class="sourceLineNo">170</span> // cannot be instantiated.<a name="line.170"></a> +<span class="sourceLineNo">171</span> }<a name="line.171"></a> +<span class="sourceLineNo">172</span><a name="line.172"></a> +<span class="sourceLineNo">173</span>}<a name="line.173"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash2.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash2.html new file mode 100644 index 0000000000000000000000000000000000000000..1409a17733e5d0481ef2dbe80bdbc4ec6afc8aad --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash2.html @@ -0,0 +1,391 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.digest;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.binary.StringUtils;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>/**<a name="line.22"></a> +<span class="sourceLineNo">023</span> * Implementation of the MurmurHash2 32-bit and 64-bit hash functions.<a name="line.23"></a> +<span class="sourceLineNo">024</span> *<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p>MurmurHash is a non-cryptographic hash function suitable for general<a name="line.25"></a> +<span class="sourceLineNo">026</span> * hash-based lookup. The name comes from two basic operations, multiply (MU)<a name="line.26"></a> +<span class="sourceLineNo">027</span> * and rotate (R), used in its inner loop. Unlike cryptographic hash functions,<a name="line.27"></a> +<span class="sourceLineNo">028</span> * it is not specifically designed to be difficult to reverse by an adversary,<a name="line.28"></a> +<span class="sourceLineNo">029</span> * making it unsuitable for cryptographic purposes.</p><a name="line.29"></a> +<span class="sourceLineNo">030</span> *<a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p>This contains a Java port of the 32-bit hash function {@code MurmurHash2}<a name="line.31"></a> +<span class="sourceLineNo">032</span> * and the 64-bit hash function {@code MurmurHash64A} from Austin Applyby's<a name="line.32"></a> +<span class="sourceLineNo">033</span> * original {@code c++} code in SMHasher.</p><a name="line.33"></a> +<span class="sourceLineNo">034</span> *<a name="line.34"></a> +<span class="sourceLineNo">035</span> * <p>This is a re-implementation of the original C code plus some additional<a name="line.35"></a> +<span class="sourceLineNo">036</span> * features.</p><a name="line.36"></a> +<span class="sourceLineNo">037</span> *<a name="line.37"></a> +<span class="sourceLineNo">038</span> * <p>This is public domain code with no copyrights. From home page of<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <a href="https://github.com/aappleby/smhasher">SMHasher</a>:</p><a name="line.39"></a> +<span class="sourceLineNo">040</span> *<a name="line.40"></a> +<span class="sourceLineNo">041</span> * <blockquote><a name="line.41"></a> +<span class="sourceLineNo">042</span> * "All MurmurHash versions are public domain software, and the author<a name="line.42"></a> +<span class="sourceLineNo">043</span> * disclaims all copyright to their code."<a name="line.43"></a> +<span class="sourceLineNo">044</span> * </blockquote><a name="line.44"></a> +<span class="sourceLineNo">045</span> *<a name="line.45"></a> +<span class="sourceLineNo">046</span> * @see <a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a><a name="line.46"></a> +<span class="sourceLineNo">047</span> * @see <a href="https://github.com/aappleby/smhasher/blob/master/src/MurmurHash2.cpp"><a name="line.47"></a> +<span class="sourceLineNo">048</span> * Original MurmurHash2 c++ code</a><a name="line.48"></a> +<span class="sourceLineNo">049</span> * @since 1.13<a name="line.49"></a> +<span class="sourceLineNo">050</span> */<a name="line.50"></a> +<span class="sourceLineNo">051</span>public final class MurmurHash2 {<a name="line.51"></a> +<span class="sourceLineNo">052</span><a name="line.52"></a> +<span class="sourceLineNo">053</span> // Constants for 32-bit variant<a name="line.53"></a> +<span class="sourceLineNo">054</span> private static final int M32 = 0x5bd1e995;<a name="line.54"></a> +<span class="sourceLineNo">055</span> private static final int R32 = 24;<a name="line.55"></a> +<span class="sourceLineNo">056</span><a name="line.56"></a> +<span class="sourceLineNo">057</span> // Constants for 64-bit variant<a name="line.57"></a> +<span class="sourceLineNo">058</span> private static final long M64 = 0xc6a4a7935bd1e995L;<a name="line.58"></a> +<span class="sourceLineNo">059</span> private static final int R64 = 47;<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> /** No instance methods. */<a name="line.61"></a> +<span class="sourceLineNo">062</span> private MurmurHash2() {<a name="line.62"></a> +<span class="sourceLineNo">063</span> }<a name="line.63"></a> +<span class="sourceLineNo">064</span><a name="line.64"></a> +<span class="sourceLineNo">065</span> /**<a name="line.65"></a> +<span class="sourceLineNo">066</span> * Generates a 32-bit hash from byte array with the given length and seed.<a name="line.66"></a> +<span class="sourceLineNo">067</span> *<a name="line.67"></a> +<span class="sourceLineNo">068</span> * @param data The input byte array<a name="line.68"></a> +<span class="sourceLineNo">069</span> * @param length The length of the array<a name="line.69"></a> +<span class="sourceLineNo">070</span> * @param seed The initial seed value<a name="line.70"></a> +<span class="sourceLineNo">071</span> * @return The 32-bit hash<a name="line.71"></a> +<span class="sourceLineNo">072</span> */<a name="line.72"></a> +<span class="sourceLineNo">073</span> public static int hash32(final byte[] data, final int length, final int seed) {<a name="line.73"></a> +<span class="sourceLineNo">074</span> // Initialize the hash to a random value<a name="line.74"></a> +<span class="sourceLineNo">075</span> int h = seed ^ length;<a name="line.75"></a> +<span class="sourceLineNo">076</span><a name="line.76"></a> +<span class="sourceLineNo">077</span> // Mix 4 bytes at a time into the hash<a name="line.77"></a> +<span class="sourceLineNo">078</span> final int nblocks = length >> 2;<a name="line.78"></a> +<span class="sourceLineNo">079</span><a name="line.79"></a> +<span class="sourceLineNo">080</span> // body<a name="line.80"></a> +<span class="sourceLineNo">081</span> for (int i = 0; i < nblocks; i++) {<a name="line.81"></a> +<span class="sourceLineNo">082</span> final int index = (i << 2);<a name="line.82"></a> +<span class="sourceLineNo">083</span> int k = getLittleEndianInt(data, index);<a name="line.83"></a> +<span class="sourceLineNo">084</span> k *= M32;<a name="line.84"></a> +<span class="sourceLineNo">085</span> k ^= k >>> R32;<a name="line.85"></a> +<span class="sourceLineNo">086</span> k *= M32;<a name="line.86"></a> +<span class="sourceLineNo">087</span> h *= M32;<a name="line.87"></a> +<span class="sourceLineNo">088</span> h ^= k;<a name="line.88"></a> +<span class="sourceLineNo">089</span> }<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> // Handle the last few bytes of the input array<a name="line.91"></a> +<span class="sourceLineNo">092</span> final int index = (nblocks << 2);<a name="line.92"></a> +<span class="sourceLineNo">093</span> switch (length - index) {<a name="line.93"></a> +<span class="sourceLineNo">094</span> case 3:<a name="line.94"></a> +<span class="sourceLineNo">095</span> h ^= (data[index + 2] & 0xff) << 16;<a name="line.95"></a> +<span class="sourceLineNo">096</span> case 2:<a name="line.96"></a> +<span class="sourceLineNo">097</span> h ^= (data[index + 1] & 0xff) << 8;<a name="line.97"></a> +<span class="sourceLineNo">098</span> case 1:<a name="line.98"></a> +<span class="sourceLineNo">099</span> h ^= (data[index] & 0xff);<a name="line.99"></a> +<span class="sourceLineNo">100</span> h *= M32;<a name="line.100"></a> +<span class="sourceLineNo">101</span> }<a name="line.101"></a> +<span class="sourceLineNo">102</span><a name="line.102"></a> +<span class="sourceLineNo">103</span> // Do a few final mixes of the hash to ensure the last few<a name="line.103"></a> +<span class="sourceLineNo">104</span> // bytes are well-incorporated.<a name="line.104"></a> +<span class="sourceLineNo">105</span> h ^= h >>> 13;<a name="line.105"></a> +<span class="sourceLineNo">106</span> h *= M32;<a name="line.106"></a> +<span class="sourceLineNo">107</span> h ^= h >>> 15;<a name="line.107"></a> +<span class="sourceLineNo">108</span><a name="line.108"></a> +<span class="sourceLineNo">109</span> return h;<a name="line.109"></a> +<span class="sourceLineNo">110</span> }<a name="line.110"></a> +<span class="sourceLineNo">111</span><a name="line.111"></a> +<span class="sourceLineNo">112</span> /**<a name="line.112"></a> +<span class="sourceLineNo">113</span> * Generates a 32-bit hash from byte array with the given length and a default seed value.<a name="line.113"></a> +<span class="sourceLineNo">114</span> * This is a helper method that will produce the same result as:<a name="line.114"></a> +<span class="sourceLineNo">115</span> *<a name="line.115"></a> +<span class="sourceLineNo">116</span> * <pre><a name="line.116"></a> +<span class="sourceLineNo">117</span> * int seed = 0x9747b28c;<a name="line.117"></a> +<span class="sourceLineNo">118</span> * int hash = MurmurHash2.hash32(data, length, seed);<a name="line.118"></a> +<span class="sourceLineNo">119</span> * </pre><a name="line.119"></a> +<span class="sourceLineNo">120</span> *<a name="line.120"></a> +<span class="sourceLineNo">121</span> * @param data The input byte array<a name="line.121"></a> +<span class="sourceLineNo">122</span> * @param length The length of the array<a name="line.122"></a> +<span class="sourceLineNo">123</span> * @return The 32-bit hash<a name="line.123"></a> +<span class="sourceLineNo">124</span> * @see #hash32(byte[], int, int)<a name="line.124"></a> +<span class="sourceLineNo">125</span> */<a name="line.125"></a> +<span class="sourceLineNo">126</span> public static int hash32(final byte[] data, final int length) {<a name="line.126"></a> +<span class="sourceLineNo">127</span> return hash32(data, length, 0x9747b28c);<a name="line.127"></a> +<span class="sourceLineNo">128</span> }<a name="line.128"></a> +<span class="sourceLineNo">129</span><a name="line.129"></a> +<span class="sourceLineNo">130</span> /**<a name="line.130"></a> +<span class="sourceLineNo">131</span> * Generates a 32-bit hash from a string with a default seed.<a name="line.131"></a> +<span class="sourceLineNo">132</span> * <p><a name="line.132"></a> +<span class="sourceLineNo">133</span> * Before 1.14 the string was converted using default encoding.<a name="line.133"></a> +<span class="sourceLineNo">134</span> * Since 1.14 the string is converted to bytes using UTF-8 encoding.<a name="line.134"></a> +<span class="sourceLineNo">135</span> * </p><a name="line.135"></a> +<span class="sourceLineNo">136</span> * This is a helper method that will produce the same result as:<a name="line.136"></a> +<span class="sourceLineNo">137</span> *<a name="line.137"></a> +<span class="sourceLineNo">138</span> * <pre><a name="line.138"></a> +<span class="sourceLineNo">139</span> * int seed = 0x9747b28c;<a name="line.139"></a> +<span class="sourceLineNo">140</span> * byte[] bytes = data.getBytes(StandardCharsets.UTF_8);<a name="line.140"></a> +<span class="sourceLineNo">141</span> * int hash = MurmurHash2.hash32(bytes, bytes.length, seed);<a name="line.141"></a> +<span class="sourceLineNo">142</span> * </pre><a name="line.142"></a> +<span class="sourceLineNo">143</span> *<a name="line.143"></a> +<span class="sourceLineNo">144</span> * @param text The input string<a name="line.144"></a> +<span class="sourceLineNo">145</span> * @return The 32-bit hash<a name="line.145"></a> +<span class="sourceLineNo">146</span> * @see #hash32(byte[], int, int)<a name="line.146"></a> +<span class="sourceLineNo">147</span> */<a name="line.147"></a> +<span class="sourceLineNo">148</span> public static int hash32(final String text) {<a name="line.148"></a> +<span class="sourceLineNo">149</span> final byte[] bytes = StringUtils.getBytesUtf8(text);<a name="line.149"></a> +<span class="sourceLineNo">150</span> return hash32(bytes, bytes.length);<a name="line.150"></a> +<span class="sourceLineNo">151</span> }<a name="line.151"></a> +<span class="sourceLineNo">152</span><a name="line.152"></a> +<span class="sourceLineNo">153</span> /**<a name="line.153"></a> +<span class="sourceLineNo">154</span> * Generates a 32-bit hash from a substring with a default seed value.<a name="line.154"></a> +<span class="sourceLineNo">155</span> * The string is converted to bytes using the default encoding.<a name="line.155"></a> +<span class="sourceLineNo">156</span> * This is a helper method that will produce the same result as:<a name="line.156"></a> +<span class="sourceLineNo">157</span> *<a name="line.157"></a> +<span class="sourceLineNo">158</span> * <pre><a name="line.158"></a> +<span class="sourceLineNo">159</span> * int seed = 0x9747b28c;<a name="line.159"></a> +<span class="sourceLineNo">160</span> * byte[] bytes = text.substring(from, from + length).getBytes(StandardCharsets.UTF_8);<a name="line.160"></a> +<span class="sourceLineNo">161</span> * int hash = MurmurHash2.hash32(bytes, bytes.length, seed);<a name="line.161"></a> +<span class="sourceLineNo">162</span> * </pre><a name="line.162"></a> +<span class="sourceLineNo">163</span> *<a name="line.163"></a> +<span class="sourceLineNo">164</span> * @param text The input string<a name="line.164"></a> +<span class="sourceLineNo">165</span> * @param from The starting index<a name="line.165"></a> +<span class="sourceLineNo">166</span> * @param length The length of the substring<a name="line.166"></a> +<span class="sourceLineNo">167</span> * @return The 32-bit hash<a name="line.167"></a> +<span class="sourceLineNo">168</span> * @see #hash32(byte[], int, int)<a name="line.168"></a> +<span class="sourceLineNo">169</span> */<a name="line.169"></a> +<span class="sourceLineNo">170</span> public static int hash32(final String text, final int from, final int length) {<a name="line.170"></a> +<span class="sourceLineNo">171</span> return hash32(text.substring(from, from + length));<a name="line.171"></a> +<span class="sourceLineNo">172</span> }<a name="line.172"></a> +<span class="sourceLineNo">173</span><a name="line.173"></a> +<span class="sourceLineNo">174</span> /**<a name="line.174"></a> +<span class="sourceLineNo">175</span> * Generates a 64-bit hash from byte array of the given length and seed.<a name="line.175"></a> +<span class="sourceLineNo">176</span> *<a name="line.176"></a> +<span class="sourceLineNo">177</span> * @param data The input byte array<a name="line.177"></a> +<span class="sourceLineNo">178</span> * @param length The length of the array<a name="line.178"></a> +<span class="sourceLineNo">179</span> * @param seed The initial seed value<a name="line.179"></a> +<span class="sourceLineNo">180</span> * @return The 64-bit hash of the given array<a name="line.180"></a> +<span class="sourceLineNo">181</span> */<a name="line.181"></a> +<span class="sourceLineNo">182</span> public static long hash64(final byte[] data, final int length, final int seed) {<a name="line.182"></a> +<span class="sourceLineNo">183</span> long h = (seed & 0xffffffffL) ^ (length * M64);<a name="line.183"></a> +<span class="sourceLineNo">184</span><a name="line.184"></a> +<span class="sourceLineNo">185</span> final int nblocks = length >> 3;<a name="line.185"></a> +<span class="sourceLineNo">186</span><a name="line.186"></a> +<span class="sourceLineNo">187</span> // body<a name="line.187"></a> +<span class="sourceLineNo">188</span> for (int i = 0; i < nblocks; i++) {<a name="line.188"></a> +<span class="sourceLineNo">189</span> final int index = (i << 3);<a name="line.189"></a> +<span class="sourceLineNo">190</span> long k = getLittleEndianLong(data, index);<a name="line.190"></a> +<span class="sourceLineNo">191</span><a name="line.191"></a> +<span class="sourceLineNo">192</span> k *= M64;<a name="line.192"></a> +<span class="sourceLineNo">193</span> k ^= k >>> R64;<a name="line.193"></a> +<span class="sourceLineNo">194</span> k *= M64;<a name="line.194"></a> +<span class="sourceLineNo">195</span><a name="line.195"></a> +<span class="sourceLineNo">196</span> h ^= k;<a name="line.196"></a> +<span class="sourceLineNo">197</span> h *= M64;<a name="line.197"></a> +<span class="sourceLineNo">198</span> }<a name="line.198"></a> +<span class="sourceLineNo">199</span><a name="line.199"></a> +<span class="sourceLineNo">200</span> final int index = (nblocks << 3);<a name="line.200"></a> +<span class="sourceLineNo">201</span> switch (length - index) {<a name="line.201"></a> +<span class="sourceLineNo">202</span> case 7:<a name="line.202"></a> +<span class="sourceLineNo">203</span> h ^= ((long) data[index + 6] & 0xff) << 48;<a name="line.203"></a> +<span class="sourceLineNo">204</span> case 6:<a name="line.204"></a> +<span class="sourceLineNo">205</span> h ^= ((long) data[index + 5] & 0xff) << 40;<a name="line.205"></a> +<span class="sourceLineNo">206</span> case 5:<a name="line.206"></a> +<span class="sourceLineNo">207</span> h ^= ((long) data[index + 4] & 0xff) << 32;<a name="line.207"></a> +<span class="sourceLineNo">208</span> case 4:<a name="line.208"></a> +<span class="sourceLineNo">209</span> h ^= ((long) data[index + 3] & 0xff) << 24;<a name="line.209"></a> +<span class="sourceLineNo">210</span> case 3:<a name="line.210"></a> +<span class="sourceLineNo">211</span> h ^= ((long) data[index + 2] & 0xff) << 16;<a name="line.211"></a> +<span class="sourceLineNo">212</span> case 2:<a name="line.212"></a> +<span class="sourceLineNo">213</span> h ^= ((long) data[index + 1] & 0xff) << 8;<a name="line.213"></a> +<span class="sourceLineNo">214</span> case 1:<a name="line.214"></a> +<span class="sourceLineNo">215</span> h ^= ((long) data[index] & 0xff);<a name="line.215"></a> +<span class="sourceLineNo">216</span> h *= M64;<a name="line.216"></a> +<span class="sourceLineNo">217</span> }<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> h ^= h >>> R64;<a name="line.219"></a> +<span class="sourceLineNo">220</span> h *= M64;<a name="line.220"></a> +<span class="sourceLineNo">221</span> h ^= h >>> R64;<a name="line.221"></a> +<span class="sourceLineNo">222</span><a name="line.222"></a> +<span class="sourceLineNo">223</span> return h;<a name="line.223"></a> +<span class="sourceLineNo">224</span> }<a name="line.224"></a> +<span class="sourceLineNo">225</span><a name="line.225"></a> +<span class="sourceLineNo">226</span> /**<a name="line.226"></a> +<span class="sourceLineNo">227</span> * Generates a 64-bit hash from byte array with given length and a default seed value.<a name="line.227"></a> +<span class="sourceLineNo">228</span> * This is a helper method that will produce the same result as:<a name="line.228"></a> +<span class="sourceLineNo">229</span> *<a name="line.229"></a> +<span class="sourceLineNo">230</span> * <pre><a name="line.230"></a> +<span class="sourceLineNo">231</span> * int seed = 0xe17a1465;<a name="line.231"></a> +<span class="sourceLineNo">232</span> * int hash = MurmurHash2.hash64(data, length, seed);<a name="line.232"></a> +<span class="sourceLineNo">233</span> * </pre><a name="line.233"></a> +<span class="sourceLineNo">234</span> *<a name="line.234"></a> +<span class="sourceLineNo">235</span> * @param data The input byte array<a name="line.235"></a> +<span class="sourceLineNo">236</span> * @param length The length of the array<a name="line.236"></a> +<span class="sourceLineNo">237</span> * @return The 64-bit hash<a name="line.237"></a> +<span class="sourceLineNo">238</span> * @see #hash64(byte[], int, int)<a name="line.238"></a> +<span class="sourceLineNo">239</span> */<a name="line.239"></a> +<span class="sourceLineNo">240</span> public static long hash64(final byte[] data, final int length) {<a name="line.240"></a> +<span class="sourceLineNo">241</span> return hash64(data, length, 0xe17a1465);<a name="line.241"></a> +<span class="sourceLineNo">242</span> }<a name="line.242"></a> +<span class="sourceLineNo">243</span><a name="line.243"></a> +<span class="sourceLineNo">244</span> /**<a name="line.244"></a> +<span class="sourceLineNo">245</span> * Generates a 64-bit hash from a string with a default seed.<a name="line.245"></a> +<span class="sourceLineNo">246</span> * <p><a name="line.246"></a> +<span class="sourceLineNo">247</span> * Before 1.14 the string was converted using default encoding.<a name="line.247"></a> +<span class="sourceLineNo">248</span> * Since 1.14 the string is converted to bytes using UTF-8 encoding.<a name="line.248"></a> +<span class="sourceLineNo">249</span> * </p><a name="line.249"></a> +<span class="sourceLineNo">250</span> * This is a helper method that will produce the same result as:<a name="line.250"></a> +<span class="sourceLineNo">251</span> *<a name="line.251"></a> +<span class="sourceLineNo">252</span> * <pre><a name="line.252"></a> +<span class="sourceLineNo">253</span> * int seed = 0xe17a1465;<a name="line.253"></a> +<span class="sourceLineNo">254</span> * byte[] bytes = data.getBytes(StandardCharsets.UTF_8);<a name="line.254"></a> +<span class="sourceLineNo">255</span> * int hash = MurmurHash2.hash64(bytes, bytes.length, seed);<a name="line.255"></a> +<span class="sourceLineNo">256</span> * </pre><a name="line.256"></a> +<span class="sourceLineNo">257</span> *<a name="line.257"></a> +<span class="sourceLineNo">258</span> * @param text The input string<a name="line.258"></a> +<span class="sourceLineNo">259</span> * @return The 64-bit hash<a name="line.259"></a> +<span class="sourceLineNo">260</span> * @see #hash64(byte[], int, int)<a name="line.260"></a> +<span class="sourceLineNo">261</span> */<a name="line.261"></a> +<span class="sourceLineNo">262</span> public static long hash64(final String text) {<a name="line.262"></a> +<span class="sourceLineNo">263</span> final byte[] bytes = StringUtils.getBytesUtf8(text);<a name="line.263"></a> +<span class="sourceLineNo">264</span> return hash64(bytes, bytes.length);<a name="line.264"></a> +<span class="sourceLineNo">265</span> }<a name="line.265"></a> +<span class="sourceLineNo">266</span><a name="line.266"></a> +<span class="sourceLineNo">267</span> /**<a name="line.267"></a> +<span class="sourceLineNo">268</span> * Generates a 64-bit hash from a substring with a default seed value.<a name="line.268"></a> +<span class="sourceLineNo">269</span> * The string is converted to bytes using the default encoding.<a name="line.269"></a> +<span class="sourceLineNo">270</span> * This is a helper method that will produce the same result as:<a name="line.270"></a> +<span class="sourceLineNo">271</span> *<a name="line.271"></a> +<span class="sourceLineNo">272</span> * <pre><a name="line.272"></a> +<span class="sourceLineNo">273</span> * int seed = 0xe17a1465;<a name="line.273"></a> +<span class="sourceLineNo">274</span> * byte[] bytes = text.substring(from, from + length).getBytes(StandardCharsets.UTF_8);<a name="line.274"></a> +<span class="sourceLineNo">275</span> * int hash = MurmurHash2.hash64(bytes, bytes.length, seed);<a name="line.275"></a> +<span class="sourceLineNo">276</span> * </pre><a name="line.276"></a> +<span class="sourceLineNo">277</span> *<a name="line.277"></a> +<span class="sourceLineNo">278</span> * @param text The The input string<a name="line.278"></a> +<span class="sourceLineNo">279</span> * @param from The starting index<a name="line.279"></a> +<span class="sourceLineNo">280</span> * @param length The length of the substring<a name="line.280"></a> +<span class="sourceLineNo">281</span> * @return The 64-bit hash<a name="line.281"></a> +<span class="sourceLineNo">282</span> * @see #hash64(byte[], int, int)<a name="line.282"></a> +<span class="sourceLineNo">283</span> */<a name="line.283"></a> +<span class="sourceLineNo">284</span> public static long hash64(final String text, final int from, final int length) {<a name="line.284"></a> +<span class="sourceLineNo">285</span> return hash64(text.substring(from, from + length));<a name="line.285"></a> +<span class="sourceLineNo">286</span> }<a name="line.286"></a> +<span class="sourceLineNo">287</span><a name="line.287"></a> +<span class="sourceLineNo">288</span> /**<a name="line.288"></a> +<span class="sourceLineNo">289</span> * Gets the little-endian int from 4 bytes starting at the specified index.<a name="line.289"></a> +<span class="sourceLineNo">290</span> *<a name="line.290"></a> +<span class="sourceLineNo">291</span> * @param data The data<a name="line.291"></a> +<span class="sourceLineNo">292</span> * @param index The index<a name="line.292"></a> +<span class="sourceLineNo">293</span> * @return The little-endian int<a name="line.293"></a> +<span class="sourceLineNo">294</span> */<a name="line.294"></a> +<span class="sourceLineNo">295</span> private static int getLittleEndianInt(final byte[] data, final int index) {<a name="line.295"></a> +<span class="sourceLineNo">296</span> return ((data[index ] & 0xff) ) |<a name="line.296"></a> +<span class="sourceLineNo">297</span> ((data[index + 1] & 0xff) << 8) |<a name="line.297"></a> +<span class="sourceLineNo">298</span> ((data[index + 2] & 0xff) << 16) |<a name="line.298"></a> +<span class="sourceLineNo">299</span> ((data[index + 3] & 0xff) << 24);<a name="line.299"></a> +<span class="sourceLineNo">300</span> }<a name="line.300"></a> +<span class="sourceLineNo">301</span><a name="line.301"></a> +<span class="sourceLineNo">302</span> /**<a name="line.302"></a> +<span class="sourceLineNo">303</span> * Gets the little-endian long from 8 bytes starting at the specified index.<a name="line.303"></a> +<span class="sourceLineNo">304</span> *<a name="line.304"></a> +<span class="sourceLineNo">305</span> * @param data The data<a name="line.305"></a> +<span class="sourceLineNo">306</span> * @param index The index<a name="line.306"></a> +<span class="sourceLineNo">307</span> * @return The little-endian long<a name="line.307"></a> +<span class="sourceLineNo">308</span> */<a name="line.308"></a> +<span class="sourceLineNo">309</span> private static long getLittleEndianLong(final byte[] data, final int index) {<a name="line.309"></a> +<span class="sourceLineNo">310</span> return (((long) data[index ] & 0xff) ) |<a name="line.310"></a> +<span class="sourceLineNo">311</span> (((long) data[index + 1] & 0xff) << 8) |<a name="line.311"></a> +<span class="sourceLineNo">312</span> (((long) data[index + 2] & 0xff) << 16) |<a name="line.312"></a> +<span class="sourceLineNo">313</span> (((long) data[index + 3] & 0xff) << 24) |<a name="line.313"></a> +<span class="sourceLineNo">314</span> (((long) data[index + 4] & 0xff) << 32) |<a name="line.314"></a> +<span class="sourceLineNo">315</span> (((long) data[index + 5] & 0xff) << 40) |<a name="line.315"></a> +<span class="sourceLineNo">316</span> (((long) data[index + 6] & 0xff) << 48) |<a name="line.316"></a> +<span class="sourceLineNo">317</span> (((long) data[index + 7] & 0xff) << 56);<a name="line.317"></a> +<span class="sourceLineNo">318</span> }<a name="line.318"></a> +<span class="sourceLineNo">319</span>}<a name="line.319"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html new file mode 100644 index 0000000000000000000000000000000000000000..ab7c60780a967254b8c106b19d5125f44ab6763a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32.html @@ -0,0 +1,1310 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.digest;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.binary.StringUtils;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>/**<a name="line.22"></a> +<span class="sourceLineNo">023</span> * Implementation of the MurmurHash3 32-bit and 128-bit hash functions.<a name="line.23"></a> +<span class="sourceLineNo">024</span> *<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. The name comes from two basic<a name="line.26"></a> +<span class="sourceLineNo">027</span> * operations, multiply (MU) and rotate (R), used in its inner loop. Unlike cryptographic hash functions, it is not<a name="line.27"></a> +<span class="sourceLineNo">028</span> * specifically designed to be difficult to reverse by an adversary, making it unsuitable for cryptographic purposes.<a name="line.28"></a> +<span class="sourceLineNo">029</span> * </p><a name="line.29"></a> +<span class="sourceLineNo">030</span> *<a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * This contains a Java port of the 32-bit hash function {@code MurmurHash3_x86_32} and the 128-bit hash function<a name="line.32"></a> +<span class="sourceLineNo">033</span> * {@code MurmurHash3_x64_128} from Austin Applyby's original {@code c++} code in SMHasher.<a name="line.33"></a> +<span class="sourceLineNo">034</span> * </p><a name="line.34"></a> +<span class="sourceLineNo">035</span> *<a name="line.35"></a> +<span class="sourceLineNo">036</span> * <p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * This is public domain code with no copyrights. From home page of<a name="line.37"></a> +<span class="sourceLineNo">038</span> * <a href="https://github.com/aappleby/smhasher">SMHasher</a>:<a name="line.38"></a> +<span class="sourceLineNo">039</span> * </p><a name="line.39"></a> +<span class="sourceLineNo">040</span> *<a name="line.40"></a> +<span class="sourceLineNo">041</span> * <blockquote> "All MurmurHash versions are public domain software, and the author disclaims all copyright to their<a name="line.41"></a> +<span class="sourceLineNo">042</span> * code." </blockquote><a name="line.42"></a> +<span class="sourceLineNo">043</span> *<a name="line.43"></a> +<span class="sourceLineNo">044</span> * <p><a name="line.44"></a> +<span class="sourceLineNo">045</span> * Original adaption from Apache Hive. That adaption contains a {@code hash64} method that is not part of the original<a name="line.45"></a> +<span class="sourceLineNo">046</span> * MurmurHash3 code. It is not recommended to use these methods. They will be removed in a future release. To obtain a<a name="line.46"></a> +<span class="sourceLineNo">047</span> * 64-bit hash use half of the bits from the {@code hash128x64} methods using the input data converted to bytes.<a name="line.47"></a> +<span class="sourceLineNo">048</span> * <p><a name="line.48"></a> +<span class="sourceLineNo">049</span> *<a name="line.49"></a> +<span class="sourceLineNo">050</span> * @see <a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a><a name="line.50"></a> +<span class="sourceLineNo">051</span> * @see <a href="https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp"> Original MurmurHash3 c++<a name="line.51"></a> +<span class="sourceLineNo">052</span> * code</a><a name="line.52"></a> +<span class="sourceLineNo">053</span> * @see <a href=<a name="line.53"></a> +<span class="sourceLineNo">054</span> * "https://github.com/apache/hive/blob/master/storage-api/src/java/org/apache/hive/common/util/Murmur3.java"><a name="line.54"></a> +<span class="sourceLineNo">055</span> * Apache Hive Murmer3</a><a name="line.55"></a> +<span class="sourceLineNo">056</span> * @since 1.13<a name="line.56"></a> +<span class="sourceLineNo">057</span> */<a name="line.57"></a> +<span class="sourceLineNo">058</span>public final class MurmurHash3 {<a name="line.58"></a> +<span class="sourceLineNo">059</span><a name="line.59"></a> +<span class="sourceLineNo">060</span> /**<a name="line.60"></a> +<span class="sourceLineNo">061</span> * A random number to use for a hash code.<a name="line.61"></a> +<span class="sourceLineNo">062</span> *<a name="line.62"></a> +<span class="sourceLineNo">063</span> * @deprecated This is not used internally and will be removed in a future release.<a name="line.63"></a> +<span class="sourceLineNo">064</span> */<a name="line.64"></a> +<span class="sourceLineNo">065</span> @Deprecated<a name="line.65"></a> +<span class="sourceLineNo">066</span> public static final long NULL_HASHCODE = 2862933555777941757L;<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> /**<a name="line.68"></a> +<span class="sourceLineNo">069</span> * A default seed to use for the murmur hash algorithm.<a name="line.69"></a> +<span class="sourceLineNo">070</span> * Has the value {@code 104729}.<a name="line.70"></a> +<span class="sourceLineNo">071</span> */<a name="line.71"></a> +<span class="sourceLineNo">072</span> public static final int DEFAULT_SEED = 104729;<a name="line.72"></a> +<span class="sourceLineNo">073</span><a name="line.73"></a> +<span class="sourceLineNo">074</span> /** TODO Replace on Java 8 with Long.BYTES. */<a name="line.74"></a> +<span class="sourceLineNo">075</span> static final int LONG_BYTES = Long.SIZE / Byte.SIZE;<a name="line.75"></a> +<span class="sourceLineNo">076</span><a name="line.76"></a> +<span class="sourceLineNo">077</span> /** TODO Replace on Java 8 with Integer.BYTES. */<a name="line.77"></a> +<span class="sourceLineNo">078</span> static final int INTEGER_BYTES = Integer.SIZE / Byte.SIZE;<a name="line.78"></a> +<span class="sourceLineNo">079</span><a name="line.79"></a> +<span class="sourceLineNo">080</span> /** TODO Replace on Java 8 with Short.BYTES. */<a name="line.80"></a> +<span class="sourceLineNo">081</span> static final int SHORT_BYTES = Short.SIZE / Byte.SIZE;<a name="line.81"></a> +<span class="sourceLineNo">082</span><a name="line.82"></a> +<span class="sourceLineNo">083</span> // Constants for 32-bit variant<a name="line.83"></a> +<span class="sourceLineNo">084</span> private static final int C1_32 = 0xcc9e2d51;<a name="line.84"></a> +<span class="sourceLineNo">085</span> private static final int C2_32 = 0x1b873593;<a name="line.85"></a> +<span class="sourceLineNo">086</span> private static final int R1_32 = 15;<a name="line.86"></a> +<span class="sourceLineNo">087</span> private static final int R2_32 = 13;<a name="line.87"></a> +<span class="sourceLineNo">088</span> private static final int M_32 = 5;<a name="line.88"></a> +<span class="sourceLineNo">089</span> private static final int N_32 = 0xe6546b64;<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> // Constants for 128-bit variant<a name="line.91"></a> +<span class="sourceLineNo">092</span> private static final long C1 = 0x87c37b91114253d5L;<a name="line.92"></a> +<span class="sourceLineNo">093</span> private static final long C2 = 0x4cf5ad432745937fL;<a name="line.93"></a> +<span class="sourceLineNo">094</span> private static final int R1 = 31;<a name="line.94"></a> +<span class="sourceLineNo">095</span> private static final int R2 = 27;<a name="line.95"></a> +<span class="sourceLineNo">096</span> private static final int R3 = 33;<a name="line.96"></a> +<span class="sourceLineNo">097</span> private static final int M = 5;<a name="line.97"></a> +<span class="sourceLineNo">098</span> private static final int N1 = 0x52dce729;<a name="line.98"></a> +<span class="sourceLineNo">099</span> private static final int N2 = 0x38495ab5;<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> /** No instance methods. */<a name="line.101"></a> +<span class="sourceLineNo">102</span> private MurmurHash3() {<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> /**<a name="line.105"></a> +<span class="sourceLineNo">106</span> * Generates 32-bit hash from two longs with a default seed value.<a name="line.106"></a> +<span class="sourceLineNo">107</span> * This is a helper method that will produce the same result as:<a name="line.107"></a> +<span class="sourceLineNo">108</span> *<a name="line.108"></a> +<span class="sourceLineNo">109</span> * <pre><a name="line.109"></a> +<span class="sourceLineNo">110</span> * int offset = 0;<a name="line.110"></a> +<span class="sourceLineNo">111</span> * int seed = 104729;<a name="line.111"></a> +<span class="sourceLineNo">112</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16)<a name="line.112"></a> +<span class="sourceLineNo">113</span> * .putLong(data1)<a name="line.113"></a> +<span class="sourceLineNo">114</span> * .putLong(data2)<a name="line.114"></a> +<span class="sourceLineNo">115</span> * .array(), offset, 16, seed);<a name="line.115"></a> +<span class="sourceLineNo">116</span> * </pre><a name="line.116"></a> +<span class="sourceLineNo">117</span> *<a name="line.117"></a> +<span class="sourceLineNo">118</span> * @param data1 The first long to hash<a name="line.118"></a> +<span class="sourceLineNo">119</span> * @param data2 The second long to hash<a name="line.119"></a> +<span class="sourceLineNo">120</span> * @return The 32-bit hash<a name="line.120"></a> +<span class="sourceLineNo">121</span> * @see #hash32x86(byte[], int, int, int)<a name="line.121"></a> +<span class="sourceLineNo">122</span> */<a name="line.122"></a> +<span class="sourceLineNo">123</span> public static int hash32(final long data1, final long data2) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> return hash32(data1, data2, DEFAULT_SEED);<a name="line.124"></a> +<span class="sourceLineNo">125</span> }<a name="line.125"></a> +<span class="sourceLineNo">126</span><a name="line.126"></a> +<span class="sourceLineNo">127</span> /**<a name="line.127"></a> +<span class="sourceLineNo">128</span> * Generates 32-bit hash from two longs with the given seed.<a name="line.128"></a> +<span class="sourceLineNo">129</span> * This is a helper method that will produce the same result as:<a name="line.129"></a> +<span class="sourceLineNo">130</span> *<a name="line.130"></a> +<span class="sourceLineNo">131</span> * <pre><a name="line.131"></a> +<span class="sourceLineNo">132</span> * int offset = 0;<a name="line.132"></a> +<span class="sourceLineNo">133</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16)<a name="line.133"></a> +<span class="sourceLineNo">134</span> * .putLong(data1)<a name="line.134"></a> +<span class="sourceLineNo">135</span> * .putLong(data2)<a name="line.135"></a> +<span class="sourceLineNo">136</span> * .array(), offset, 16, seed);<a name="line.136"></a> +<span class="sourceLineNo">137</span> * </pre><a name="line.137"></a> +<span class="sourceLineNo">138</span> *<a name="line.138"></a> +<span class="sourceLineNo">139</span> * @param data1 The first long to hash<a name="line.139"></a> +<span class="sourceLineNo">140</span> * @param data2 The second long to hash<a name="line.140"></a> +<span class="sourceLineNo">141</span> * @param seed The initial seed value<a name="line.141"></a> +<span class="sourceLineNo">142</span> * @return The 32-bit hash<a name="line.142"></a> +<span class="sourceLineNo">143</span> * @see #hash32x86(byte[], int, int, int)<a name="line.143"></a> +<span class="sourceLineNo">144</span> */<a name="line.144"></a> +<span class="sourceLineNo">145</span> public static int hash32(final long data1, final long data2, final int seed) {<a name="line.145"></a> +<span class="sourceLineNo">146</span> int hash = seed;<a name="line.146"></a> +<span class="sourceLineNo">147</span> final long r0 = Long.reverseBytes(data1);<a name="line.147"></a> +<span class="sourceLineNo">148</span> final long r1 = Long.reverseBytes(data2);<a name="line.148"></a> +<span class="sourceLineNo">149</span><a name="line.149"></a> +<span class="sourceLineNo">150</span> hash = mix32((int) r0, hash);<a name="line.150"></a> +<span class="sourceLineNo">151</span> hash = mix32((int) (r0 >>> 32), hash);<a name="line.151"></a> +<span class="sourceLineNo">152</span> hash = mix32((int) (r1), hash);<a name="line.152"></a> +<span class="sourceLineNo">153</span> hash = mix32((int) (r1 >>> 32), hash);<a name="line.153"></a> +<span class="sourceLineNo">154</span><a name="line.154"></a> +<span class="sourceLineNo">155</span> hash ^= LONG_BYTES * 2;<a name="line.155"></a> +<span class="sourceLineNo">156</span> return fmix32(hash);<a name="line.156"></a> +<span class="sourceLineNo">157</span> }<a name="line.157"></a> +<span class="sourceLineNo">158</span><a name="line.158"></a> +<span class="sourceLineNo">159</span> /**<a name="line.159"></a> +<span class="sourceLineNo">160</span> * Generates 32-bit hash from a long with a default seed value.<a name="line.160"></a> +<span class="sourceLineNo">161</span> * This is a helper method that will produce the same result as:<a name="line.161"></a> +<span class="sourceLineNo">162</span> *<a name="line.162"></a> +<span class="sourceLineNo">163</span> * <pre><a name="line.163"></a> +<span class="sourceLineNo">164</span> * int offset = 0;<a name="line.164"></a> +<span class="sourceLineNo">165</span> * int seed = 104729;<a name="line.165"></a> +<span class="sourceLineNo">166</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8)<a name="line.166"></a> +<span class="sourceLineNo">167</span> * .putLong(data)<a name="line.167"></a> +<span class="sourceLineNo">168</span> * .array(), offset, 8, seed);<a name="line.168"></a> +<span class="sourceLineNo">169</span> * </pre><a name="line.169"></a> +<span class="sourceLineNo">170</span> *<a name="line.170"></a> +<span class="sourceLineNo">171</span> * @param data The long to hash<a name="line.171"></a> +<span class="sourceLineNo">172</span> * @return The 32-bit hash<a name="line.172"></a> +<span class="sourceLineNo">173</span> * @see #hash32x86(byte[], int, int, int)<a name="line.173"></a> +<span class="sourceLineNo">174</span> */<a name="line.174"></a> +<span class="sourceLineNo">175</span> public static int hash32(final long data) {<a name="line.175"></a> +<span class="sourceLineNo">176</span> return hash32(data, DEFAULT_SEED);<a name="line.176"></a> +<span class="sourceLineNo">177</span> }<a name="line.177"></a> +<span class="sourceLineNo">178</span><a name="line.178"></a> +<span class="sourceLineNo">179</span> /**<a name="line.179"></a> +<span class="sourceLineNo">180</span> * Generates 32-bit hash from a long with the given seed.<a name="line.180"></a> +<span class="sourceLineNo">181</span> * This is a helper method that will produce the same result as:<a name="line.181"></a> +<span class="sourceLineNo">182</span> *<a name="line.182"></a> +<span class="sourceLineNo">183</span> * <pre><a name="line.183"></a> +<span class="sourceLineNo">184</span> * int offset = 0;<a name="line.184"></a> +<span class="sourceLineNo">185</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8)<a name="line.185"></a> +<span class="sourceLineNo">186</span> * .putLong(data)<a name="line.186"></a> +<span class="sourceLineNo">187</span> * .array(), offset, 8, seed);<a name="line.187"></a> +<span class="sourceLineNo">188</span> * </pre><a name="line.188"></a> +<span class="sourceLineNo">189</span> *<a name="line.189"></a> +<span class="sourceLineNo">190</span> * @param data The long to hash<a name="line.190"></a> +<span class="sourceLineNo">191</span> * @param seed The initial seed value<a name="line.191"></a> +<span class="sourceLineNo">192</span> * @return The 32-bit hash<a name="line.192"></a> +<span class="sourceLineNo">193</span> * @see #hash32x86(byte[], int, int, int)<a name="line.193"></a> +<span class="sourceLineNo">194</span> */<a name="line.194"></a> +<span class="sourceLineNo">195</span> public static int hash32(final long data, final int seed) {<a name="line.195"></a> +<span class="sourceLineNo">196</span> int hash = seed;<a name="line.196"></a> +<span class="sourceLineNo">197</span> final long r0 = Long.reverseBytes(data);<a name="line.197"></a> +<span class="sourceLineNo">198</span><a name="line.198"></a> +<span class="sourceLineNo">199</span> hash = mix32((int) r0, hash);<a name="line.199"></a> +<span class="sourceLineNo">200</span> hash = mix32((int) (r0 >>> 32), hash);<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> hash ^= LONG_BYTES;<a name="line.202"></a> +<span class="sourceLineNo">203</span> return fmix32(hash);<a name="line.203"></a> +<span class="sourceLineNo">204</span> }<a name="line.204"></a> +<span class="sourceLineNo">205</span><a name="line.205"></a> +<span class="sourceLineNo">206</span> /**<a name="line.206"></a> +<span class="sourceLineNo">207</span> * Generates 32-bit hash from the byte array with a default seed.<a name="line.207"></a> +<span class="sourceLineNo">208</span> * This is a helper method that will produce the same result as:<a name="line.208"></a> +<span class="sourceLineNo">209</span> *<a name="line.209"></a> +<span class="sourceLineNo">210</span> * <pre><a name="line.210"></a> +<span class="sourceLineNo">211</span> * int offset = 0;<a name="line.211"></a> +<span class="sourceLineNo">212</span> * int seed = 104729;<a name="line.212"></a> +<span class="sourceLineNo">213</span> * int hash = MurmurHash3.hash32(data, offset, data.length, seed);<a name="line.213"></a> +<span class="sourceLineNo">214</span> * </pre><a name="line.214"></a> +<span class="sourceLineNo">215</span> *<a name="line.215"></a> +<span class="sourceLineNo">216</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.216"></a> +<span class="sourceLineNo">217</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.217"></a> +<span class="sourceLineNo">218</span> * bytes are negative.<p><a name="line.218"></a> +<span class="sourceLineNo">219</span> *<a name="line.219"></a> +<span class="sourceLineNo">220</span> * @param data The input byte array<a name="line.220"></a> +<span class="sourceLineNo">221</span> * @return The 32-bit hash<a name="line.221"></a> +<span class="sourceLineNo">222</span> * @see #hash32(byte[], int, int, int)<a name="line.222"></a> +<span class="sourceLineNo">223</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.223"></a> +<span class="sourceLineNo">224</span> */<a name="line.224"></a> +<span class="sourceLineNo">225</span> @Deprecated<a name="line.225"></a> +<span class="sourceLineNo">226</span> public static int hash32(final byte[] data) {<a name="line.226"></a> +<span class="sourceLineNo">227</span> return hash32(data, 0, data.length, DEFAULT_SEED);<a name="line.227"></a> +<span class="sourceLineNo">228</span> }<a name="line.228"></a> +<span class="sourceLineNo">229</span><a name="line.229"></a> +<span class="sourceLineNo">230</span> /**<a name="line.230"></a> +<span class="sourceLineNo">231</span> * Generates 32-bit hash from a string with a default seed.<a name="line.231"></a> +<span class="sourceLineNo">232</span> * <p><a name="line.232"></a> +<span class="sourceLineNo">233</span> * Before 1.14 the string was converted using default encoding.<a name="line.233"></a> +<span class="sourceLineNo">234</span> * Since 1.14 the string is converted to bytes using UTF-8 encoding.<a name="line.234"></a> +<span class="sourceLineNo">235</span> * </p><a name="line.235"></a> +<span class="sourceLineNo">236</span> * This is a helper method that will produce the same result as:<a name="line.236"></a> +<span class="sourceLineNo">237</span> *<a name="line.237"></a> +<span class="sourceLineNo">238</span> * <pre><a name="line.238"></a> +<span class="sourceLineNo">239</span> * int offset = 0;<a name="line.239"></a> +<span class="sourceLineNo">240</span> * int seed = 104729;<a name="line.240"></a> +<span class="sourceLineNo">241</span> * byte[] bytes = data.getBytes(StandardCharsets.UTF_8);<a name="line.241"></a> +<span class="sourceLineNo">242</span> * int hash = MurmurHash3.hash32(bytes, offset, bytes.length, seed);<a name="line.242"></a> +<span class="sourceLineNo">243</span> * </pre><a name="line.243"></a> +<span class="sourceLineNo">244</span> *<a name="line.244"></a> +<span class="sourceLineNo">245</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.245"></a> +<span class="sourceLineNo">246</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.246"></a> +<span class="sourceLineNo">247</span> * bytes are negative.<p><a name="line.247"></a> +<span class="sourceLineNo">248</span> *<a name="line.248"></a> +<span class="sourceLineNo">249</span> * @param data The input string<a name="line.249"></a> +<span class="sourceLineNo">250</span> * @return The 32-bit hash<a name="line.250"></a> +<span class="sourceLineNo">251</span> * @see #hash32(byte[], int, int, int)<a name="line.251"></a> +<span class="sourceLineNo">252</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)} with the bytes returned from<a name="line.252"></a> +<span class="sourceLineNo">253</span> * {@link String#getBytes(java.nio.charset.Charset)}. This corrects the processing of trailing bytes.<a name="line.253"></a> +<span class="sourceLineNo">254</span> */<a name="line.254"></a> +<span class="sourceLineNo">255</span> @Deprecated<a name="line.255"></a> +<span class="sourceLineNo">256</span> public static int hash32(final String data) {<a name="line.256"></a> +<span class="sourceLineNo">257</span> final byte[] bytes = StringUtils.getBytesUtf8(data);<a name="line.257"></a> +<span class="sourceLineNo">258</span> return hash32(bytes, 0, bytes.length, DEFAULT_SEED);<a name="line.258"></a> +<span class="sourceLineNo">259</span> }<a name="line.259"></a> +<span class="sourceLineNo">260</span><a name="line.260"></a> +<span class="sourceLineNo">261</span> /**<a name="line.261"></a> +<span class="sourceLineNo">262</span> * Generates 32-bit hash from the byte array with the given length and a default seed.<a name="line.262"></a> +<span class="sourceLineNo">263</span> * This is a helper method that will produce the same result as:<a name="line.263"></a> +<span class="sourceLineNo">264</span> *<a name="line.264"></a> +<span class="sourceLineNo">265</span> * <pre><a name="line.265"></a> +<span class="sourceLineNo">266</span> * int offset = 0;<a name="line.266"></a> +<span class="sourceLineNo">267</span> * int seed = 104729;<a name="line.267"></a> +<span class="sourceLineNo">268</span> * int hash = MurmurHash3.hash32(data, offset, length, seed);<a name="line.268"></a> +<span class="sourceLineNo">269</span> * </pre><a name="line.269"></a> +<span class="sourceLineNo">270</span> *<a name="line.270"></a> +<span class="sourceLineNo">271</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.271"></a> +<span class="sourceLineNo">272</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.272"></a> +<span class="sourceLineNo">273</span> * bytes are negative.<p><a name="line.273"></a> +<span class="sourceLineNo">274</span> *<a name="line.274"></a> +<span class="sourceLineNo">275</span> * @param data The input byte array<a name="line.275"></a> +<span class="sourceLineNo">276</span> * @param length The length of array<a name="line.276"></a> +<span class="sourceLineNo">277</span> * @return The 32-bit hash<a name="line.277"></a> +<span class="sourceLineNo">278</span> * @see #hash32(byte[], int, int, int)<a name="line.278"></a> +<span class="sourceLineNo">279</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.279"></a> +<span class="sourceLineNo">280</span> */<a name="line.280"></a> +<span class="sourceLineNo">281</span> @Deprecated<a name="line.281"></a> +<span class="sourceLineNo">282</span> public static int hash32(final byte[] data, final int length) {<a name="line.282"></a> +<span class="sourceLineNo">283</span> return hash32(data, length, DEFAULT_SEED);<a name="line.283"></a> +<span class="sourceLineNo">284</span> }<a name="line.284"></a> +<span class="sourceLineNo">285</span><a name="line.285"></a> +<span class="sourceLineNo">286</span> /**<a name="line.286"></a> +<span class="sourceLineNo">287</span> * Generates 32-bit hash from the byte array with the given length and seed. This is a<a name="line.287"></a> +<span class="sourceLineNo">288</span> * helper method that will produce the same result as:<a name="line.288"></a> +<span class="sourceLineNo">289</span> *<a name="line.289"></a> +<span class="sourceLineNo">290</span> * <pre><a name="line.290"></a> +<span class="sourceLineNo">291</span> * int offset = 0;<a name="line.291"></a> +<span class="sourceLineNo">292</span> * int hash = MurmurHash3.hash32(data, offset, length, seed);<a name="line.292"></a> +<span class="sourceLineNo">293</span> * </pre><a name="line.293"></a> +<span class="sourceLineNo">294</span> *<a name="line.294"></a> +<span class="sourceLineNo">295</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.295"></a> +<span class="sourceLineNo">296</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.296"></a> +<span class="sourceLineNo">297</span> * bytes are negative.<p><a name="line.297"></a> +<span class="sourceLineNo">298</span> *<a name="line.298"></a> +<span class="sourceLineNo">299</span> * @param data The input byte array<a name="line.299"></a> +<span class="sourceLineNo">300</span> * @param length The length of array<a name="line.300"></a> +<span class="sourceLineNo">301</span> * @param seed The initial seed value<a name="line.301"></a> +<span class="sourceLineNo">302</span> * @return The 32-bit hash<a name="line.302"></a> +<span class="sourceLineNo">303</span> * @see #hash32(byte[], int, int, int)<a name="line.303"></a> +<span class="sourceLineNo">304</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.304"></a> +<span class="sourceLineNo">305</span> */<a name="line.305"></a> +<span class="sourceLineNo">306</span> @Deprecated<a name="line.306"></a> +<span class="sourceLineNo">307</span> public static int hash32(final byte[] data, final int length, final int seed) {<a name="line.307"></a> +<span class="sourceLineNo">308</span> return hash32(data, 0, length, seed);<a name="line.308"></a> +<span class="sourceLineNo">309</span> }<a name="line.309"></a> +<span class="sourceLineNo">310</span><a name="line.310"></a> +<span class="sourceLineNo">311</span> /**<a name="line.311"></a> +<span class="sourceLineNo">312</span> * Generates 32-bit hash from the byte array with the given offset, length and seed.<a name="line.312"></a> +<span class="sourceLineNo">313</span> *<a name="line.313"></a> +<span class="sourceLineNo">314</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.314"></a> +<span class="sourceLineNo">315</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.315"></a> +<span class="sourceLineNo">316</span> *<a name="line.316"></a> +<span class="sourceLineNo">317</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.317"></a> +<span class="sourceLineNo">318</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.318"></a> +<span class="sourceLineNo">319</span> * bytes are negative.<p><a name="line.319"></a> +<span class="sourceLineNo">320</span> *<a name="line.320"></a> +<span class="sourceLineNo">321</span> * @param data The input byte array<a name="line.321"></a> +<span class="sourceLineNo">322</span> * @param offset The offset of data<a name="line.322"></a> +<span class="sourceLineNo">323</span> * @param length The length of array<a name="line.323"></a> +<span class="sourceLineNo">324</span> * @param seed The initial seed value<a name="line.324"></a> +<span class="sourceLineNo">325</span> * @return The 32-bit hash<a name="line.325"></a> +<span class="sourceLineNo">326</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.326"></a> +<span class="sourceLineNo">327</span> */<a name="line.327"></a> +<span class="sourceLineNo">328</span> @Deprecated<a name="line.328"></a> +<span class="sourceLineNo">329</span> public static int hash32(final byte[] data, final int offset, final int length, final int seed) {<a name="line.329"></a> +<span class="sourceLineNo">330</span> int hash = seed;<a name="line.330"></a> +<span class="sourceLineNo">331</span> final int nblocks = length >> 2;<a name="line.331"></a> +<span class="sourceLineNo">332</span><a name="line.332"></a> +<span class="sourceLineNo">333</span> // body<a name="line.333"></a> +<span class="sourceLineNo">334</span> for (int i = 0; i < nblocks; i++) {<a name="line.334"></a> +<span class="sourceLineNo">335</span> final int index = offset + (i << 2);<a name="line.335"></a> +<span class="sourceLineNo">336</span> final int k = getLittleEndianInt(data, index);<a name="line.336"></a> +<span class="sourceLineNo">337</span> hash = mix32(k, hash);<a name="line.337"></a> +<span class="sourceLineNo">338</span> }<a name="line.338"></a> +<span class="sourceLineNo">339</span><a name="line.339"></a> +<span class="sourceLineNo">340</span> // tail<a name="line.340"></a> +<span class="sourceLineNo">341</span> // ************<a name="line.341"></a> +<span class="sourceLineNo">342</span> // Note: This fails to apply masking using 0xff to the 3 remaining bytes.<a name="line.342"></a> +<span class="sourceLineNo">343</span> // ************<a name="line.343"></a> +<span class="sourceLineNo">344</span> final int index = offset + (nblocks << 2);<a name="line.344"></a> +<span class="sourceLineNo">345</span> int k1 = 0;<a name="line.345"></a> +<span class="sourceLineNo">346</span> switch (offset + length - index) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> case 3:<a name="line.347"></a> +<span class="sourceLineNo">348</span> k1 ^= data[index + 2] << 16;<a name="line.348"></a> +<span class="sourceLineNo">349</span> case 2:<a name="line.349"></a> +<span class="sourceLineNo">350</span> k1 ^= data[index + 1] << 8;<a name="line.350"></a> +<span class="sourceLineNo">351</span> case 1:<a name="line.351"></a> +<span class="sourceLineNo">352</span> k1 ^= data[index];<a name="line.352"></a> +<span class="sourceLineNo">353</span><a name="line.353"></a> +<span class="sourceLineNo">354</span> // mix functions<a name="line.354"></a> +<span class="sourceLineNo">355</span> k1 *= C1_32;<a name="line.355"></a> +<span class="sourceLineNo">356</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.356"></a> +<span class="sourceLineNo">357</span> k1 *= C2_32;<a name="line.357"></a> +<span class="sourceLineNo">358</span> hash ^= k1;<a name="line.358"></a> +<span class="sourceLineNo">359</span> }<a name="line.359"></a> +<span class="sourceLineNo">360</span><a name="line.360"></a> +<span class="sourceLineNo">361</span> hash ^= length;<a name="line.361"></a> +<span class="sourceLineNo">362</span> return fmix32(hash);<a name="line.362"></a> +<span class="sourceLineNo">363</span> }<a name="line.363"></a> +<span class="sourceLineNo">364</span><a name="line.364"></a> +<span class="sourceLineNo">365</span> /**<a name="line.365"></a> +<span class="sourceLineNo">366</span> * Generates 32-bit hash from the byte array with a seed of zero.<a name="line.366"></a> +<span class="sourceLineNo">367</span> * This is a helper method that will produce the same result as:<a name="line.367"></a> +<span class="sourceLineNo">368</span> *<a name="line.368"></a> +<span class="sourceLineNo">369</span> * <pre><a name="line.369"></a> +<span class="sourceLineNo">370</span> * int offset = 0;<a name="line.370"></a> +<span class="sourceLineNo">371</span> * int seed = 0;<a name="line.371"></a> +<span class="sourceLineNo">372</span> * int hash = MurmurHash3.hash32x86(data, offset, data.length, seed);<a name="line.372"></a> +<span class="sourceLineNo">373</span> * </pre><a name="line.373"></a> +<span class="sourceLineNo">374</span> *<a name="line.374"></a> +<span class="sourceLineNo">375</span> * @param data The input byte array<a name="line.375"></a> +<span class="sourceLineNo">376</span> * @return The 32-bit hash<a name="line.376"></a> +<span class="sourceLineNo">377</span> * @see #hash32x86(byte[], int, int, int)<a name="line.377"></a> +<span class="sourceLineNo">378</span> * @since 1.14<a name="line.378"></a> +<span class="sourceLineNo">379</span> */<a name="line.379"></a> +<span class="sourceLineNo">380</span> public static int hash32x86(final byte[] data) {<a name="line.380"></a> +<span class="sourceLineNo">381</span> return hash32x86(data, 0, data.length, 0);<a name="line.381"></a> +<span class="sourceLineNo">382</span> }<a name="line.382"></a> +<span class="sourceLineNo">383</span><a name="line.383"></a> +<span class="sourceLineNo">384</span> /**<a name="line.384"></a> +<span class="sourceLineNo">385</span> * Generates 32-bit hash from the byte array with the given offset, length and seed.<a name="line.385"></a> +<span class="sourceLineNo">386</span> *<a name="line.386"></a> +<span class="sourceLineNo">387</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.387"></a> +<span class="sourceLineNo">388</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.388"></a> +<span class="sourceLineNo">389</span> *<a name="line.389"></a> +<span class="sourceLineNo">390</span> * @param data The input byte array<a name="line.390"></a> +<span class="sourceLineNo">391</span> * @param offset The offset of data<a name="line.391"></a> +<span class="sourceLineNo">392</span> * @param length The length of array<a name="line.392"></a> +<span class="sourceLineNo">393</span> * @param seed The initial seed value<a name="line.393"></a> +<span class="sourceLineNo">394</span> * @return The 32-bit hash<a name="line.394"></a> +<span class="sourceLineNo">395</span> * @since 1.14<a name="line.395"></a> +<span class="sourceLineNo">396</span> */<a name="line.396"></a> +<span class="sourceLineNo">397</span> public static int hash32x86(final byte[] data, final int offset, final int length, final int seed) {<a name="line.397"></a> +<span class="sourceLineNo">398</span> int hash = seed;<a name="line.398"></a> +<span class="sourceLineNo">399</span> final int nblocks = length >> 2;<a name="line.399"></a> +<span class="sourceLineNo">400</span><a name="line.400"></a> +<span class="sourceLineNo">401</span> // body<a name="line.401"></a> +<span class="sourceLineNo">402</span> for (int i = 0; i < nblocks; i++) {<a name="line.402"></a> +<span class="sourceLineNo">403</span> final int index = offset + (i << 2);<a name="line.403"></a> +<span class="sourceLineNo">404</span> final int k = getLittleEndianInt(data, index);<a name="line.404"></a> +<span class="sourceLineNo">405</span> hash = mix32(k, hash);<a name="line.405"></a> +<span class="sourceLineNo">406</span> }<a name="line.406"></a> +<span class="sourceLineNo">407</span><a name="line.407"></a> +<span class="sourceLineNo">408</span> // tail<a name="line.408"></a> +<span class="sourceLineNo">409</span> final int index = offset + (nblocks << 2);<a name="line.409"></a> +<span class="sourceLineNo">410</span> int k1 = 0;<a name="line.410"></a> +<span class="sourceLineNo">411</span> switch (offset + length - index) {<a name="line.411"></a> +<span class="sourceLineNo">412</span> case 3:<a name="line.412"></a> +<span class="sourceLineNo">413</span> k1 ^= (data[index + 2] & 0xff) << 16;<a name="line.413"></a> +<span class="sourceLineNo">414</span> case 2:<a name="line.414"></a> +<span class="sourceLineNo">415</span> k1 ^= (data[index + 1] & 0xff) << 8;<a name="line.415"></a> +<span class="sourceLineNo">416</span> case 1:<a name="line.416"></a> +<span class="sourceLineNo">417</span> k1 ^= (data[index] & 0xff);<a name="line.417"></a> +<span class="sourceLineNo">418</span><a name="line.418"></a> +<span class="sourceLineNo">419</span> // mix functions<a name="line.419"></a> +<span class="sourceLineNo">420</span> k1 *= C1_32;<a name="line.420"></a> +<span class="sourceLineNo">421</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.421"></a> +<span class="sourceLineNo">422</span> k1 *= C2_32;<a name="line.422"></a> +<span class="sourceLineNo">423</span> hash ^= k1;<a name="line.423"></a> +<span class="sourceLineNo">424</span> }<a name="line.424"></a> +<span class="sourceLineNo">425</span><a name="line.425"></a> +<span class="sourceLineNo">426</span> hash ^= length;<a name="line.426"></a> +<span class="sourceLineNo">427</span> return fmix32(hash);<a name="line.427"></a> +<span class="sourceLineNo">428</span> }<a name="line.428"></a> +<span class="sourceLineNo">429</span><a name="line.429"></a> +<span class="sourceLineNo">430</span> /**<a name="line.430"></a> +<span class="sourceLineNo">431</span> * Generates 64-bit hash from a long with a default seed.<a name="line.431"></a> +<span class="sourceLineNo">432</span> *<a name="line.432"></a> +<span class="sourceLineNo">433</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.433"></a> +<span class="sourceLineNo">434</span> *<a name="line.434"></a> +<span class="sourceLineNo">435</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.435"></a> +<span class="sourceLineNo">436</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.436"></a> +<span class="sourceLineNo">437</span> * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code long}.<a name="line.437"></a> +<span class="sourceLineNo">438</span> * This method will be removed in a future release.</p><a name="line.438"></a> +<span class="sourceLineNo">439</span> *<a name="line.439"></a> +<span class="sourceLineNo">440</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.440"></a> +<span class="sourceLineNo">441</span> * this result as the default seed is positive.</p><a name="line.441"></a> +<span class="sourceLineNo">442</span> *<a name="line.442"></a> +<span class="sourceLineNo">443</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.443"></a> +<span class="sourceLineNo">444</span> *<a name="line.444"></a> +<span class="sourceLineNo">445</span> * <pre><a name="line.445"></a> +<span class="sourceLineNo">446</span> * int offset = 0;<a name="line.446"></a> +<span class="sourceLineNo">447</span> * int seed = 104729;<a name="line.447"></a> +<span class="sourceLineNo">448</span> * long hash = MurmurHash3.hash64(ByteBuffer.allocate(8)<a name="line.448"></a> +<span class="sourceLineNo">449</span> * .putLong(data)<a name="line.449"></a> +<span class="sourceLineNo">450</span> * .array(), offset, 8, seed);<a name="line.450"></a> +<span class="sourceLineNo">451</span> * </pre><a name="line.451"></a> +<span class="sourceLineNo">452</span> *<a name="line.452"></a> +<span class="sourceLineNo">453</span> * @param data The long to hash<a name="line.453"></a> +<span class="sourceLineNo">454</span> * @return The 64-bit hash<a name="line.454"></a> +<span class="sourceLineNo">455</span> * @see #hash64(byte[], int, int, int)<a name="line.455"></a> +<span class="sourceLineNo">456</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.456"></a> +<span class="sourceLineNo">457</span> * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code long}.<a name="line.457"></a> +<span class="sourceLineNo">458</span> */<a name="line.458"></a> +<span class="sourceLineNo">459</span> @Deprecated<a name="line.459"></a> +<span class="sourceLineNo">460</span> public static long hash64(final long data) {<a name="line.460"></a> +<span class="sourceLineNo">461</span> long hash = DEFAULT_SEED;<a name="line.461"></a> +<span class="sourceLineNo">462</span> long k = Long.reverseBytes(data);<a name="line.462"></a> +<span class="sourceLineNo">463</span> final int length = LONG_BYTES;<a name="line.463"></a> +<span class="sourceLineNo">464</span> // mix functions<a name="line.464"></a> +<span class="sourceLineNo">465</span> k *= C1;<a name="line.465"></a> +<span class="sourceLineNo">466</span> k = Long.rotateLeft(k, R1);<a name="line.466"></a> +<span class="sourceLineNo">467</span> k *= C2;<a name="line.467"></a> +<span class="sourceLineNo">468</span> hash ^= k;<a name="line.468"></a> +<span class="sourceLineNo">469</span> hash = Long.rotateLeft(hash, R2) * M + N1;<a name="line.469"></a> +<span class="sourceLineNo">470</span> // finalization<a name="line.470"></a> +<span class="sourceLineNo">471</span> hash ^= length;<a name="line.471"></a> +<span class="sourceLineNo">472</span> hash = fmix64(hash);<a name="line.472"></a> +<span class="sourceLineNo">473</span> return hash;<a name="line.473"></a> +<span class="sourceLineNo">474</span> }<a name="line.474"></a> +<span class="sourceLineNo">475</span><a name="line.475"></a> +<span class="sourceLineNo">476</span> /**<a name="line.476"></a> +<span class="sourceLineNo">477</span> * Generates 64-bit hash from an int with a default seed.<a name="line.477"></a> +<span class="sourceLineNo">478</span> *<a name="line.478"></a> +<span class="sourceLineNo">479</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.479"></a> +<span class="sourceLineNo">480</span> *<a name="line.480"></a> +<span class="sourceLineNo">481</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.481"></a> +<span class="sourceLineNo">482</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.482"></a> +<span class="sourceLineNo">483</span> * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code int}.<a name="line.483"></a> +<span class="sourceLineNo">484</span> * This method will be removed in a future release.</p><a name="line.484"></a> +<span class="sourceLineNo">485</span> *<a name="line.485"></a> +<span class="sourceLineNo">486</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.486"></a> +<span class="sourceLineNo">487</span> * this result as the default seed is positive.</p><a name="line.487"></a> +<span class="sourceLineNo">488</span> *<a name="line.488"></a> +<span class="sourceLineNo">489</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.489"></a> +<span class="sourceLineNo">490</span> *<a name="line.490"></a> +<span class="sourceLineNo">491</span> * <pre><a name="line.491"></a> +<span class="sourceLineNo">492</span> * int offset = 0;<a name="line.492"></a> +<span class="sourceLineNo">493</span> * int seed = 104729;<a name="line.493"></a> +<span class="sourceLineNo">494</span> * long hash = MurmurHash3.hash64(ByteBuffer.allocate(4)<a name="line.494"></a> +<span class="sourceLineNo">495</span> * .putInt(data)<a name="line.495"></a> +<span class="sourceLineNo">496</span> * .array(), offset, 4, seed);<a name="line.496"></a> +<span class="sourceLineNo">497</span> * </pre><a name="line.497"></a> +<span class="sourceLineNo">498</span> *<a name="line.498"></a> +<span class="sourceLineNo">499</span> * @param data The int to hash<a name="line.499"></a> +<span class="sourceLineNo">500</span> * @return The 64-bit hash<a name="line.500"></a> +<span class="sourceLineNo">501</span> * @see #hash64(byte[], int, int, int)<a name="line.501"></a> +<span class="sourceLineNo">502</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.502"></a> +<span class="sourceLineNo">503</span> * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code int}.<a name="line.503"></a> +<span class="sourceLineNo">504</span> */<a name="line.504"></a> +<span class="sourceLineNo">505</span> @Deprecated<a name="line.505"></a> +<span class="sourceLineNo">506</span> public static long hash64(final int data) {<a name="line.506"></a> +<span class="sourceLineNo">507</span> long k1 = Integer.reverseBytes(data) & (-1L >>> 32);<a name="line.507"></a> +<span class="sourceLineNo">508</span> final int length = INTEGER_BYTES;<a name="line.508"></a> +<span class="sourceLineNo">509</span> long hash = DEFAULT_SEED;<a name="line.509"></a> +<span class="sourceLineNo">510</span> k1 *= C1;<a name="line.510"></a> +<span class="sourceLineNo">511</span> k1 = Long.rotateLeft(k1, R1);<a name="line.511"></a> +<span class="sourceLineNo">512</span> k1 *= C2;<a name="line.512"></a> +<span class="sourceLineNo">513</span> hash ^= k1;<a name="line.513"></a> +<span class="sourceLineNo">514</span> // finalization<a name="line.514"></a> +<span class="sourceLineNo">515</span> hash ^= length;<a name="line.515"></a> +<span class="sourceLineNo">516</span> hash = fmix64(hash);<a name="line.516"></a> +<span class="sourceLineNo">517</span> return hash;<a name="line.517"></a> +<span class="sourceLineNo">518</span> }<a name="line.518"></a> +<span class="sourceLineNo">519</span><a name="line.519"></a> +<span class="sourceLineNo">520</span> /**<a name="line.520"></a> +<span class="sourceLineNo">521</span> * Generates 64-bit hash from a short with a default seed.<a name="line.521"></a> +<span class="sourceLineNo">522</span> *<a name="line.522"></a> +<span class="sourceLineNo">523</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.523"></a> +<span class="sourceLineNo">524</span> *<a name="line.524"></a> +<span class="sourceLineNo">525</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.525"></a> +<span class="sourceLineNo">526</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.526"></a> +<span class="sourceLineNo">527</span> * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code short}.<a name="line.527"></a> +<span class="sourceLineNo">528</span> * This method will be removed in a future release.</p><a name="line.528"></a> +<span class="sourceLineNo">529</span> *<a name="line.529"></a> +<span class="sourceLineNo">530</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.530"></a> +<span class="sourceLineNo">531</span> * this result as the default seed is positive.</p><a name="line.531"></a> +<span class="sourceLineNo">532</span> *<a name="line.532"></a> +<span class="sourceLineNo">533</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.533"></a> +<span class="sourceLineNo">534</span> *<a name="line.534"></a> +<span class="sourceLineNo">535</span> * <pre><a name="line.535"></a> +<span class="sourceLineNo">536</span> * int offset = 0;<a name="line.536"></a> +<span class="sourceLineNo">537</span> * int seed = 104729;<a name="line.537"></a> +<span class="sourceLineNo">538</span> * long hash = MurmurHash3.hash64(ByteBuffer.allocate(2)<a name="line.538"></a> +<span class="sourceLineNo">539</span> * .putShort(data)<a name="line.539"></a> +<span class="sourceLineNo">540</span> * .array(), offset, 2, seed);<a name="line.540"></a> +<span class="sourceLineNo">541</span> * </pre><a name="line.541"></a> +<span class="sourceLineNo">542</span> *<a name="line.542"></a> +<span class="sourceLineNo">543</span> * @param data The short to hash<a name="line.543"></a> +<span class="sourceLineNo">544</span> * @return The 64-bit hash<a name="line.544"></a> +<span class="sourceLineNo">545</span> * @see #hash64(byte[], int, int, int)<a name="line.545"></a> +<span class="sourceLineNo">546</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.546"></a> +<span class="sourceLineNo">547</span> * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code short}.<a name="line.547"></a> +<span class="sourceLineNo">548</span> */<a name="line.548"></a> +<span class="sourceLineNo">549</span> @Deprecated<a name="line.549"></a> +<span class="sourceLineNo">550</span> public static long hash64(final short data) {<a name="line.550"></a> +<span class="sourceLineNo">551</span> long hash = DEFAULT_SEED;<a name="line.551"></a> +<span class="sourceLineNo">552</span> long k1 = 0;<a name="line.552"></a> +<span class="sourceLineNo">553</span> k1 ^= ((long) data & 0xff) << 8;<a name="line.553"></a> +<span class="sourceLineNo">554</span> k1 ^= ((long) ((data & 0xFF00) >> 8) & 0xff);<a name="line.554"></a> +<span class="sourceLineNo">555</span> k1 *= C1;<a name="line.555"></a> +<span class="sourceLineNo">556</span> k1 = Long.rotateLeft(k1, R1);<a name="line.556"></a> +<span class="sourceLineNo">557</span> k1 *= C2;<a name="line.557"></a> +<span class="sourceLineNo">558</span> hash ^= k1;<a name="line.558"></a> +<span class="sourceLineNo">559</span><a name="line.559"></a> +<span class="sourceLineNo">560</span> // finalization<a name="line.560"></a> +<span class="sourceLineNo">561</span> hash ^= SHORT_BYTES;<a name="line.561"></a> +<span class="sourceLineNo">562</span> hash = fmix64(hash);<a name="line.562"></a> +<span class="sourceLineNo">563</span> return hash;<a name="line.563"></a> +<span class="sourceLineNo">564</span> }<a name="line.564"></a> +<span class="sourceLineNo">565</span><a name="line.565"></a> +<span class="sourceLineNo">566</span> /**<a name="line.566"></a> +<span class="sourceLineNo">567</span> * Generates 64-bit hash from a byte array with a default seed.<a name="line.567"></a> +<span class="sourceLineNo">568</span> *<a name="line.568"></a> +<span class="sourceLineNo">569</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.569"></a> +<span class="sourceLineNo">570</span> *<a name="line.570"></a> +<span class="sourceLineNo">571</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.571"></a> +<span class="sourceLineNo">572</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.572"></a> +<span class="sourceLineNo">573</span> * {@linkplain #hash128x64(byte[])} with the same byte data.<a name="line.573"></a> +<span class="sourceLineNo">574</span> * This method will be removed in a future release.</p><a name="line.574"></a> +<span class="sourceLineNo">575</span> *<a name="line.575"></a> +<span class="sourceLineNo">576</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.576"></a> +<span class="sourceLineNo">577</span> * this result as the default seed is positive.</p><a name="line.577"></a> +<span class="sourceLineNo">578</span> *<a name="line.578"></a> +<span class="sourceLineNo">579</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.579"></a> +<span class="sourceLineNo">580</span> *<a name="line.580"></a> +<span class="sourceLineNo">581</span> * <pre><a name="line.581"></a> +<span class="sourceLineNo">582</span> * int offset = 0;<a name="line.582"></a> +<span class="sourceLineNo">583</span> * int seed = 104729;<a name="line.583"></a> +<span class="sourceLineNo">584</span> * long hash = MurmurHash3.hash64(data, offset, data.length, seed);<a name="line.584"></a> +<span class="sourceLineNo">585</span> * </pre><a name="line.585"></a> +<span class="sourceLineNo">586</span> *<a name="line.586"></a> +<span class="sourceLineNo">587</span> * @param data The input byte array<a name="line.587"></a> +<span class="sourceLineNo">588</span> * @return The 64-bit hash<a name="line.588"></a> +<span class="sourceLineNo">589</span> * @see #hash64(byte[], int, int, int)<a name="line.589"></a> +<span class="sourceLineNo">590</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.590"></a> +<span class="sourceLineNo">591</span> * Use half of the hash bytes from {@link #hash128x64(byte[])}.<a name="line.591"></a> +<span class="sourceLineNo">592</span> */<a name="line.592"></a> +<span class="sourceLineNo">593</span> @Deprecated<a name="line.593"></a> +<span class="sourceLineNo">594</span> public static long hash64(final byte[] data) {<a name="line.594"></a> +<span class="sourceLineNo">595</span> return hash64(data, 0, data.length, DEFAULT_SEED);<a name="line.595"></a> +<span class="sourceLineNo">596</span> }<a name="line.596"></a> +<span class="sourceLineNo">597</span><a name="line.597"></a> +<span class="sourceLineNo">598</span> /**<a name="line.598"></a> +<span class="sourceLineNo">599</span> * Generates 64-bit hash from a byte array with the given offset and length and a default seed.<a name="line.599"></a> +<span class="sourceLineNo">600</span> *<a name="line.600"></a> +<span class="sourceLineNo">601</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.601"></a> +<span class="sourceLineNo">602</span> *<a name="line.602"></a> +<span class="sourceLineNo">603</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.603"></a> +<span class="sourceLineNo">604</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.604"></a> +<span class="sourceLineNo">605</span> * {@linkplain #hash128x64(byte[])} with the same byte data.<a name="line.605"></a> +<span class="sourceLineNo">606</span> * This method will be removed in a future release.</p><a name="line.606"></a> +<span class="sourceLineNo">607</span> *<a name="line.607"></a> +<span class="sourceLineNo">608</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.608"></a> +<span class="sourceLineNo">609</span> * this result as the default seed is positive.</p><a name="line.609"></a> +<span class="sourceLineNo">610</span> *<a name="line.610"></a> +<span class="sourceLineNo">611</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.611"></a> +<span class="sourceLineNo">612</span> *<a name="line.612"></a> +<span class="sourceLineNo">613</span> * <pre><a name="line.613"></a> +<span class="sourceLineNo">614</span> * int seed = 104729;<a name="line.614"></a> +<span class="sourceLineNo">615</span> * long hash = MurmurHash3.hash64(data, offset, length, seed);<a name="line.615"></a> +<span class="sourceLineNo">616</span> * </pre><a name="line.616"></a> +<span class="sourceLineNo">617</span> *<a name="line.617"></a> +<span class="sourceLineNo">618</span> * @param data The input byte array<a name="line.618"></a> +<span class="sourceLineNo">619</span> * @param offset The offset of data<a name="line.619"></a> +<span class="sourceLineNo">620</span> * @param length The length of array<a name="line.620"></a> +<span class="sourceLineNo">621</span> * @return The 64-bit hash<a name="line.621"></a> +<span class="sourceLineNo">622</span> * @see #hash64(byte[], int, int, int)<a name="line.622"></a> +<span class="sourceLineNo">623</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.623"></a> +<span class="sourceLineNo">624</span> * Use half of the hash bytes from {@link #hash128x64(byte[], int, int, int)}.<a name="line.624"></a> +<span class="sourceLineNo">625</span> */<a name="line.625"></a> +<span class="sourceLineNo">626</span> @Deprecated<a name="line.626"></a> +<span class="sourceLineNo">627</span> public static long hash64(final byte[] data, final int offset, final int length) {<a name="line.627"></a> +<span class="sourceLineNo">628</span> return hash64(data, offset, length, DEFAULT_SEED);<a name="line.628"></a> +<span class="sourceLineNo">629</span> }<a name="line.629"></a> +<span class="sourceLineNo">630</span><a name="line.630"></a> +<span class="sourceLineNo">631</span> /**<a name="line.631"></a> +<span class="sourceLineNo">632</span> * Generates 64-bit hash from a byte array with the given offset, length and seed.<a name="line.632"></a> +<span class="sourceLineNo">633</span> *<a name="line.633"></a> +<span class="sourceLineNo">634</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.634"></a> +<span class="sourceLineNo">635</span> *<a name="line.635"></a> +<span class="sourceLineNo">636</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.636"></a> +<span class="sourceLineNo">637</span> * This method will be removed in a future release.</p><a name="line.637"></a> +<span class="sourceLineNo">638</span> *<a name="line.638"></a> +<span class="sourceLineNo">639</span> * <p>This implementation contains a sign-extension bug in the seed initialization.<a name="line.639"></a> +<span class="sourceLineNo">640</span> * This manifests if the seed is negative.</p><a name="line.640"></a> +<span class="sourceLineNo">641</span> *<a name="line.641"></a> +<span class="sourceLineNo">642</span> * <p>This algorithm processes 8 bytes chunks of data in a manner similar to the 16 byte chunks<a name="line.642"></a> +<span class="sourceLineNo">643</span> * of data processed in the MurmurHash3 {@code MurmurHash3_x64_128} method. However the hash<a name="line.643"></a> +<span class="sourceLineNo">644</span> * is not mixed with a hash chunk from the next 8 bytes of data. The method will not return<a name="line.644"></a> +<span class="sourceLineNo">645</span> * the same value as the first or second 64-bits of the function<a name="line.645"></a> +<span class="sourceLineNo">646</span> * {@link #hash128(byte[], int, int, int)}.</p><a name="line.646"></a> +<span class="sourceLineNo">647</span> *<a name="line.647"></a> +<span class="sourceLineNo">648</span> * <p>Use of this method is not advised. Use the first long returned from<a name="line.648"></a> +<span class="sourceLineNo">649</span> * {@link #hash128x64(byte[], int, int, int)}.<p><a name="line.649"></a> +<span class="sourceLineNo">650</span> *<a name="line.650"></a> +<span class="sourceLineNo">651</span> * @param data The input byte array<a name="line.651"></a> +<span class="sourceLineNo">652</span> * @param offset The offset of data<a name="line.652"></a> +<span class="sourceLineNo">653</span> * @param length The length of array<a name="line.653"></a> +<span class="sourceLineNo">654</span> * @param seed The initial seed value<a name="line.654"></a> +<span class="sourceLineNo">655</span> * @return The 64-bit hash<a name="line.655"></a> +<span class="sourceLineNo">656</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.656"></a> +<span class="sourceLineNo">657</span> * Use half of the hash bytes from {@link #hash128x64(byte[], int, int, int)}.<a name="line.657"></a> +<span class="sourceLineNo">658</span> */<a name="line.658"></a> +<span class="sourceLineNo">659</span> @Deprecated<a name="line.659"></a> +<span class="sourceLineNo">660</span> public static long hash64(final byte[] data, final int offset, final int length, final int seed) {<a name="line.660"></a> +<span class="sourceLineNo">661</span> // ************<a name="line.661"></a> +<span class="sourceLineNo">662</span> // Note: This fails to apply masking using 0xffffffffL to the seed.<a name="line.662"></a> +<span class="sourceLineNo">663</span> // ************<a name="line.663"></a> +<span class="sourceLineNo">664</span> long hash = seed;<a name="line.664"></a> +<span class="sourceLineNo">665</span> final int nblocks = length >> 3;<a name="line.665"></a> +<span class="sourceLineNo">666</span><a name="line.666"></a> +<span class="sourceLineNo">667</span> // body<a name="line.667"></a> +<span class="sourceLineNo">668</span> for (int i = 0; i < nblocks; i++) {<a name="line.668"></a> +<span class="sourceLineNo">669</span> final int index = offset + (i << 3);<a name="line.669"></a> +<span class="sourceLineNo">670</span> long k = getLittleEndianLong(data, index);<a name="line.670"></a> +<span class="sourceLineNo">671</span><a name="line.671"></a> +<span class="sourceLineNo">672</span> // mix functions<a name="line.672"></a> +<span class="sourceLineNo">673</span> k *= C1;<a name="line.673"></a> +<span class="sourceLineNo">674</span> k = Long.rotateLeft(k, R1);<a name="line.674"></a> +<span class="sourceLineNo">675</span> k *= C2;<a name="line.675"></a> +<span class="sourceLineNo">676</span> hash ^= k;<a name="line.676"></a> +<span class="sourceLineNo">677</span> hash = Long.rotateLeft(hash, R2) * M + N1;<a name="line.677"></a> +<span class="sourceLineNo">678</span> }<a name="line.678"></a> +<span class="sourceLineNo">679</span><a name="line.679"></a> +<span class="sourceLineNo">680</span> // tail<a name="line.680"></a> +<span class="sourceLineNo">681</span> long k1 = 0;<a name="line.681"></a> +<span class="sourceLineNo">682</span> final int index = offset + (nblocks << 3);<a name="line.682"></a> +<span class="sourceLineNo">683</span> switch (offset + length - index) {<a name="line.683"></a> +<span class="sourceLineNo">684</span> case 7:<a name="line.684"></a> +<span class="sourceLineNo">685</span> k1 ^= ((long) data[index + 6] & 0xff) << 48;<a name="line.685"></a> +<span class="sourceLineNo">686</span> case 6:<a name="line.686"></a> +<span class="sourceLineNo">687</span> k1 ^= ((long) data[index + 5] & 0xff) << 40;<a name="line.687"></a> +<span class="sourceLineNo">688</span> case 5:<a name="line.688"></a> +<span class="sourceLineNo">689</span> k1 ^= ((long) data[index + 4] & 0xff) << 32;<a name="line.689"></a> +<span class="sourceLineNo">690</span> case 4:<a name="line.690"></a> +<span class="sourceLineNo">691</span> k1 ^= ((long) data[index + 3] & 0xff) << 24;<a name="line.691"></a> +<span class="sourceLineNo">692</span> case 3:<a name="line.692"></a> +<span class="sourceLineNo">693</span> k1 ^= ((long) data[index + 2] & 0xff) << 16;<a name="line.693"></a> +<span class="sourceLineNo">694</span> case 2:<a name="line.694"></a> +<span class="sourceLineNo">695</span> k1 ^= ((long) data[index + 1] & 0xff) << 8;<a name="line.695"></a> +<span class="sourceLineNo">696</span> case 1:<a name="line.696"></a> +<span class="sourceLineNo">697</span> k1 ^= ((long) data[index] & 0xff);<a name="line.697"></a> +<span class="sourceLineNo">698</span> k1 *= C1;<a name="line.698"></a> +<span class="sourceLineNo">699</span> k1 = Long.rotateLeft(k1, R1);<a name="line.699"></a> +<span class="sourceLineNo">700</span> k1 *= C2;<a name="line.700"></a> +<span class="sourceLineNo">701</span> hash ^= k1;<a name="line.701"></a> +<span class="sourceLineNo">702</span> }<a name="line.702"></a> +<span class="sourceLineNo">703</span><a name="line.703"></a> +<span class="sourceLineNo">704</span> // finalization<a name="line.704"></a> +<span class="sourceLineNo">705</span> hash ^= length;<a name="line.705"></a> +<span class="sourceLineNo">706</span> hash = fmix64(hash);<a name="line.706"></a> +<span class="sourceLineNo">707</span><a name="line.707"></a> +<span class="sourceLineNo">708</span> return hash;<a name="line.708"></a> +<span class="sourceLineNo">709</span> }<a name="line.709"></a> +<span class="sourceLineNo">710</span><a name="line.710"></a> +<span class="sourceLineNo">711</span> /**<a name="line.711"></a> +<span class="sourceLineNo">712</span> * Generates 128-bit hash from the byte array with a default seed.<a name="line.712"></a> +<span class="sourceLineNo">713</span> * This is a helper method that will produce the same result as:<a name="line.713"></a> +<span class="sourceLineNo">714</span> *<a name="line.714"></a> +<span class="sourceLineNo">715</span> * <pre><a name="line.715"></a> +<span class="sourceLineNo">716</span> * int offset = 0;<a name="line.716"></a> +<span class="sourceLineNo">717</span> * int seed = 104729;<a name="line.717"></a> +<span class="sourceLineNo">718</span> * int hash = MurmurHash3.hash128(data, offset, data.length, seed);<a name="line.718"></a> +<span class="sourceLineNo">719</span> * </pre><a name="line.719"></a> +<span class="sourceLineNo">720</span> *<a name="line.720"></a> +<span class="sourceLineNo">721</span> * <p>Note: The sign extension bug in {@link #hash128(byte[], int, int, int)} does not effect<a name="line.721"></a> +<span class="sourceLineNo">722</span> * this result as the default seed is positive.</p><a name="line.722"></a> +<span class="sourceLineNo">723</span> *<a name="line.723"></a> +<span class="sourceLineNo">724</span> * @param data The input byte array<a name="line.724"></a> +<span class="sourceLineNo">725</span> * @return The 128-bit hash (2 longs)<a name="line.725"></a> +<span class="sourceLineNo">726</span> * @see #hash128(byte[], int, int, int)<a name="line.726"></a> +<span class="sourceLineNo">727</span> */<a name="line.727"></a> +<span class="sourceLineNo">728</span> public static long[] hash128(final byte[] data) {<a name="line.728"></a> +<span class="sourceLineNo">729</span> return hash128(data, 0, data.length, DEFAULT_SEED);<a name="line.729"></a> +<span class="sourceLineNo">730</span> }<a name="line.730"></a> +<span class="sourceLineNo">731</span><a name="line.731"></a> +<span class="sourceLineNo">732</span> /**<a name="line.732"></a> +<span class="sourceLineNo">733</span> * Generates 128-bit hash from the byte array with a seed of zero.<a name="line.733"></a> +<span class="sourceLineNo">734</span> * This is a helper method that will produce the same result as:<a name="line.734"></a> +<span class="sourceLineNo">735</span> *<a name="line.735"></a> +<span class="sourceLineNo">736</span> * <pre><a name="line.736"></a> +<span class="sourceLineNo">737</span> * int offset = 0;<a name="line.737"></a> +<span class="sourceLineNo">738</span> * int seed = 0;<a name="line.738"></a> +<span class="sourceLineNo">739</span> * int hash = MurmurHash3.hash128x64(data, offset, data.length, seed);<a name="line.739"></a> +<span class="sourceLineNo">740</span> * </pre><a name="line.740"></a> +<span class="sourceLineNo">741</span> *<a name="line.741"></a> +<span class="sourceLineNo">742</span> * @param data The input byte array<a name="line.742"></a> +<span class="sourceLineNo">743</span> * @return The 128-bit hash (2 longs)<a name="line.743"></a> +<span class="sourceLineNo">744</span> * @see #hash128x64(byte[], int, int, int)<a name="line.744"></a> +<span class="sourceLineNo">745</span> * @since 1.14<a name="line.745"></a> +<span class="sourceLineNo">746</span> */<a name="line.746"></a> +<span class="sourceLineNo">747</span> public static long[] hash128x64(final byte[] data) {<a name="line.747"></a> +<span class="sourceLineNo">748</span> return hash128x64(data, 0, data.length, 0);<a name="line.748"></a> +<span class="sourceLineNo">749</span> }<a name="line.749"></a> +<span class="sourceLineNo">750</span><a name="line.750"></a> +<span class="sourceLineNo">751</span> /**<a name="line.751"></a> +<span class="sourceLineNo">752</span> * Generates 128-bit hash from a string with a default seed.<a name="line.752"></a> +<span class="sourceLineNo">753</span> * <p><a name="line.753"></a> +<span class="sourceLineNo">754</span> * Before 1.14 the string was converted using default encoding.<a name="line.754"></a> +<span class="sourceLineNo">755</span> * Since 1.14 the string is converted to bytes using UTF-8 encoding.<a name="line.755"></a> +<span class="sourceLineNo">756</span> * </p><a name="line.756"></a> +<span class="sourceLineNo">757</span> * This is a helper method that will produce the same result as:<a name="line.757"></a> +<span class="sourceLineNo">758</span> *<a name="line.758"></a> +<span class="sourceLineNo">759</span> * <pre><a name="line.759"></a> +<span class="sourceLineNo">760</span> * int offset = 0;<a name="line.760"></a> +<span class="sourceLineNo">761</span> * int seed = 104729;<a name="line.761"></a> +<span class="sourceLineNo">762</span> * byte[] bytes = data.getBytes(StandardCharsets.UTF_8);<a name="line.762"></a> +<span class="sourceLineNo">763</span> * int hash = MurmurHash3.hash128(bytes, offset, bytes.length, seed);<a name="line.763"></a> +<span class="sourceLineNo">764</span> * </pre><a name="line.764"></a> +<span class="sourceLineNo">765</span> *<a name="line.765"></a> +<span class="sourceLineNo">766</span> * <p>Note: The sign extension bug in {@link #hash128(byte[], int, int, int)} does not effect<a name="line.766"></a> +<span class="sourceLineNo">767</span> * this result as the default seed is positive.</p><a name="line.767"></a> +<span class="sourceLineNo">768</span> *<a name="line.768"></a> +<span class="sourceLineNo">769</span> * @param data The input String<a name="line.769"></a> +<span class="sourceLineNo">770</span> * @return The 128-bit hash (2 longs)<a name="line.770"></a> +<span class="sourceLineNo">771</span> * @see #hash128(byte[], int, int, int)<a name="line.771"></a> +<span class="sourceLineNo">772</span> * @deprecated Use {@link #hash128x64(byte[])} using the bytes returned from<a name="line.772"></a> +<span class="sourceLineNo">773</span> * {@link String#getBytes(java.nio.charset.Charset)}.<a name="line.773"></a> +<span class="sourceLineNo">774</span> */<a name="line.774"></a> +<span class="sourceLineNo">775</span> @Deprecated<a name="line.775"></a> +<span class="sourceLineNo">776</span> public static long[] hash128(final String data) {<a name="line.776"></a> +<span class="sourceLineNo">777</span> final byte[] bytes = StringUtils.getBytesUtf8(data);<a name="line.777"></a> +<span class="sourceLineNo">778</span> return hash128(bytes, 0, bytes.length, DEFAULT_SEED);<a name="line.778"></a> +<span class="sourceLineNo">779</span> }<a name="line.779"></a> +<span class="sourceLineNo">780</span><a name="line.780"></a> +<span class="sourceLineNo">781</span> /**<a name="line.781"></a> +<span class="sourceLineNo">782</span> * Generates 128-bit hash from the byte array with the given offset, length and seed.<a name="line.782"></a> +<span class="sourceLineNo">783</span> *<a name="line.783"></a> +<span class="sourceLineNo">784</span> * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128}<a name="line.784"></a> +<span class="sourceLineNo">785</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.785"></a> +<span class="sourceLineNo">786</span> *<a name="line.786"></a> +<span class="sourceLineNo">787</span> * <p>This implementation contains a sign-extension bug in the seed initialization.<a name="line.787"></a> +<span class="sourceLineNo">788</span> * This manifests if the seed is negative.<p><a name="line.788"></a> +<span class="sourceLineNo">789</span> *<a name="line.789"></a> +<span class="sourceLineNo">790</span> * @param data The input byte array<a name="line.790"></a> +<span class="sourceLineNo">791</span> * @param offset The first element of array<a name="line.791"></a> +<span class="sourceLineNo">792</span> * @param length The length of array<a name="line.792"></a> +<span class="sourceLineNo">793</span> * @param seed The initial seed value<a name="line.793"></a> +<span class="sourceLineNo">794</span> * @return The 128-bit hash (2 longs)<a name="line.794"></a> +<span class="sourceLineNo">795</span> * @deprecated Use {@link #hash128x64(byte[], int, int, int)}. This corrects the seed initialization.<a name="line.795"></a> +<span class="sourceLineNo">796</span> */<a name="line.796"></a> +<span class="sourceLineNo">797</span> @Deprecated<a name="line.797"></a> +<span class="sourceLineNo">798</span> public static long[] hash128(final byte[] data, final int offset, final int length, final int seed) {<a name="line.798"></a> +<span class="sourceLineNo">799</span> // ************<a name="line.799"></a> +<span class="sourceLineNo">800</span> // Note: This deliberately fails to apply masking using 0xffffffffL to the seed<a name="line.800"></a> +<span class="sourceLineNo">801</span> // to maintain behavioral compatibility with the original version.<a name="line.801"></a> +<span class="sourceLineNo">802</span> // The implicit conversion to a long will extend a negative sign<a name="line.802"></a> +<span class="sourceLineNo">803</span> // bit through the upper 32-bits of the long seed. These should be zero.<a name="line.803"></a> +<span class="sourceLineNo">804</span> // ************<a name="line.804"></a> +<span class="sourceLineNo">805</span> return hash128x64Internal(data, offset, length, seed);<a name="line.805"></a> +<span class="sourceLineNo">806</span> }<a name="line.806"></a> +<span class="sourceLineNo">807</span><a name="line.807"></a> +<span class="sourceLineNo">808</span> /**<a name="line.808"></a> +<span class="sourceLineNo">809</span> * Generates 128-bit hash from the byte array with the given offset, length and seed.<a name="line.809"></a> +<span class="sourceLineNo">810</span> *<a name="line.810"></a> +<span class="sourceLineNo">811</span> * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128}<a name="line.811"></a> +<span class="sourceLineNo">812</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.812"></a> +<span class="sourceLineNo">813</span> *<a name="line.813"></a> +<span class="sourceLineNo">814</span> * @param data The input byte array<a name="line.814"></a> +<span class="sourceLineNo">815</span> * @param offset The first element of array<a name="line.815"></a> +<span class="sourceLineNo">816</span> * @param length The length of array<a name="line.816"></a> +<span class="sourceLineNo">817</span> * @param seed The initial seed value<a name="line.817"></a> +<span class="sourceLineNo">818</span> * @return The 128-bit hash (2 longs)<a name="line.818"></a> +<span class="sourceLineNo">819</span> * @since 1.14<a name="line.819"></a> +<span class="sourceLineNo">820</span> */<a name="line.820"></a> +<span class="sourceLineNo">821</span> public static long[] hash128x64(final byte[] data, final int offset, final int length, final int seed) {<a name="line.821"></a> +<span class="sourceLineNo">822</span> // Use an unsigned 32-bit integer as the seed<a name="line.822"></a> +<span class="sourceLineNo">823</span> return hash128x64Internal(data, offset, length, seed & 0xffffffffL);<a name="line.823"></a> +<span class="sourceLineNo">824</span> }<a name="line.824"></a> +<span class="sourceLineNo">825</span><a name="line.825"></a> +<span class="sourceLineNo">826</span> /**<a name="line.826"></a> +<span class="sourceLineNo">827</span> * Generates 128-bit hash from the byte array with the given offset, length and seed.<a name="line.827"></a> +<span class="sourceLineNo">828</span> *<a name="line.828"></a> +<span class="sourceLineNo">829</span> * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128}<a name="line.829"></a> +<span class="sourceLineNo">830</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.830"></a> +<span class="sourceLineNo">831</span> *<a name="line.831"></a> +<span class="sourceLineNo">832</span> * @param data The input byte array<a name="line.832"></a> +<span class="sourceLineNo">833</span> * @param offset The first element of array<a name="line.833"></a> +<span class="sourceLineNo">834</span> * @param length The length of array<a name="line.834"></a> +<span class="sourceLineNo">835</span> * @param seed The initial seed value<a name="line.835"></a> +<span class="sourceLineNo">836</span> * @return The 128-bit hash (2 longs)<a name="line.836"></a> +<span class="sourceLineNo">837</span> */<a name="line.837"></a> +<span class="sourceLineNo">838</span> private static long[] hash128x64Internal(final byte[] data, final int offset, final int length, final long seed) {<a name="line.838"></a> +<span class="sourceLineNo">839</span> long h1 = seed;<a name="line.839"></a> +<span class="sourceLineNo">840</span> long h2 = seed;<a name="line.840"></a> +<span class="sourceLineNo">841</span> final int nblocks = length >> 4;<a name="line.841"></a> +<span class="sourceLineNo">842</span><a name="line.842"></a> +<span class="sourceLineNo">843</span> // body<a name="line.843"></a> +<span class="sourceLineNo">844</span> for (int i = 0; i < nblocks; i++) {<a name="line.844"></a> +<span class="sourceLineNo">845</span> final int index = offset + (i << 4);<a name="line.845"></a> +<span class="sourceLineNo">846</span> long k1 = getLittleEndianLong(data, index);<a name="line.846"></a> +<span class="sourceLineNo">847</span> long k2 = getLittleEndianLong(data, index + 8);<a name="line.847"></a> +<span class="sourceLineNo">848</span><a name="line.848"></a> +<span class="sourceLineNo">849</span> // mix functions for k1<a name="line.849"></a> +<span class="sourceLineNo">850</span> k1 *= C1;<a name="line.850"></a> +<span class="sourceLineNo">851</span> k1 = Long.rotateLeft(k1, R1);<a name="line.851"></a> +<span class="sourceLineNo">852</span> k1 *= C2;<a name="line.852"></a> +<span class="sourceLineNo">853</span> h1 ^= k1;<a name="line.853"></a> +<span class="sourceLineNo">854</span> h1 = Long.rotateLeft(h1, R2);<a name="line.854"></a> +<span class="sourceLineNo">855</span> h1 += h2;<a name="line.855"></a> +<span class="sourceLineNo">856</span> h1 = h1 * M + N1;<a name="line.856"></a> +<span class="sourceLineNo">857</span><a name="line.857"></a> +<span class="sourceLineNo">858</span> // mix functions for k2<a name="line.858"></a> +<span class="sourceLineNo">859</span> k2 *= C2;<a name="line.859"></a> +<span class="sourceLineNo">860</span> k2 = Long.rotateLeft(k2, R3);<a name="line.860"></a> +<span class="sourceLineNo">861</span> k2 *= C1;<a name="line.861"></a> +<span class="sourceLineNo">862</span> h2 ^= k2;<a name="line.862"></a> +<span class="sourceLineNo">863</span> h2 = Long.rotateLeft(h2, R1);<a name="line.863"></a> +<span class="sourceLineNo">864</span> h2 += h1;<a name="line.864"></a> +<span class="sourceLineNo">865</span> h2 = h2 * M + N2;<a name="line.865"></a> +<span class="sourceLineNo">866</span> }<a name="line.866"></a> +<span class="sourceLineNo">867</span><a name="line.867"></a> +<span class="sourceLineNo">868</span> // tail<a name="line.868"></a> +<span class="sourceLineNo">869</span> long k1 = 0;<a name="line.869"></a> +<span class="sourceLineNo">870</span> long k2 = 0;<a name="line.870"></a> +<span class="sourceLineNo">871</span> final int index = offset + (nblocks << 4);<a name="line.871"></a> +<span class="sourceLineNo">872</span> switch (offset + length - index) {<a name="line.872"></a> +<span class="sourceLineNo">873</span> case 15:<a name="line.873"></a> +<span class="sourceLineNo">874</span> k2 ^= ((long) data[index + 14] & 0xff) << 48;<a name="line.874"></a> +<span class="sourceLineNo">875</span> case 14:<a name="line.875"></a> +<span class="sourceLineNo">876</span> k2 ^= ((long) data[index + 13] & 0xff) << 40;<a name="line.876"></a> +<span class="sourceLineNo">877</span> case 13:<a name="line.877"></a> +<span class="sourceLineNo">878</span> k2 ^= ((long) data[index + 12] & 0xff) << 32;<a name="line.878"></a> +<span class="sourceLineNo">879</span> case 12:<a name="line.879"></a> +<span class="sourceLineNo">880</span> k2 ^= ((long) data[index + 11] & 0xff) << 24;<a name="line.880"></a> +<span class="sourceLineNo">881</span> case 11:<a name="line.881"></a> +<span class="sourceLineNo">882</span> k2 ^= ((long) data[index + 10] & 0xff) << 16;<a name="line.882"></a> +<span class="sourceLineNo">883</span> case 10:<a name="line.883"></a> +<span class="sourceLineNo">884</span> k2 ^= ((long) data[index + 9] & 0xff) << 8;<a name="line.884"></a> +<span class="sourceLineNo">885</span> case 9:<a name="line.885"></a> +<span class="sourceLineNo">886</span> k2 ^= data[index + 8] & 0xff;<a name="line.886"></a> +<span class="sourceLineNo">887</span> k2 *= C2;<a name="line.887"></a> +<span class="sourceLineNo">888</span> k2 = Long.rotateLeft(k2, R3);<a name="line.888"></a> +<span class="sourceLineNo">889</span> k2 *= C1;<a name="line.889"></a> +<span class="sourceLineNo">890</span> h2 ^= k2;<a name="line.890"></a> +<span class="sourceLineNo">891</span><a name="line.891"></a> +<span class="sourceLineNo">892</span> case 8:<a name="line.892"></a> +<span class="sourceLineNo">893</span> k1 ^= ((long) data[index + 7] & 0xff) << 56;<a name="line.893"></a> +<span class="sourceLineNo">894</span> case 7:<a name="line.894"></a> +<span class="sourceLineNo">895</span> k1 ^= ((long) data[index + 6] & 0xff) << 48;<a name="line.895"></a> +<span class="sourceLineNo">896</span> case 6:<a name="line.896"></a> +<span class="sourceLineNo">897</span> k1 ^= ((long) data[index + 5] & 0xff) << 40;<a name="line.897"></a> +<span class="sourceLineNo">898</span> case 5:<a name="line.898"></a> +<span class="sourceLineNo">899</span> k1 ^= ((long) data[index + 4] & 0xff) << 32;<a name="line.899"></a> +<span class="sourceLineNo">900</span> case 4:<a name="line.900"></a> +<span class="sourceLineNo">901</span> k1 ^= ((long) data[index + 3] & 0xff) << 24;<a name="line.901"></a> +<span class="sourceLineNo">902</span> case 3:<a name="line.902"></a> +<span class="sourceLineNo">903</span> k1 ^= ((long) data[index + 2] & 0xff) << 16;<a name="line.903"></a> +<span class="sourceLineNo">904</span> case 2:<a name="line.904"></a> +<span class="sourceLineNo">905</span> k1 ^= ((long) data[index + 1] & 0xff) << 8;<a name="line.905"></a> +<span class="sourceLineNo">906</span> case 1:<a name="line.906"></a> +<span class="sourceLineNo">907</span> k1 ^= data[index] & 0xff;<a name="line.907"></a> +<span class="sourceLineNo">908</span> k1 *= C1;<a name="line.908"></a> +<span class="sourceLineNo">909</span> k1 = Long.rotateLeft(k1, R1);<a name="line.909"></a> +<span class="sourceLineNo">910</span> k1 *= C2;<a name="line.910"></a> +<span class="sourceLineNo">911</span> h1 ^= k1;<a name="line.911"></a> +<span class="sourceLineNo">912</span> }<a name="line.912"></a> +<span class="sourceLineNo">913</span><a name="line.913"></a> +<span class="sourceLineNo">914</span> // finalization<a name="line.914"></a> +<span class="sourceLineNo">915</span> h1 ^= length;<a name="line.915"></a> +<span class="sourceLineNo">916</span> h2 ^= length;<a name="line.916"></a> +<span class="sourceLineNo">917</span><a name="line.917"></a> +<span class="sourceLineNo">918</span> h1 += h2;<a name="line.918"></a> +<span class="sourceLineNo">919</span> h2 += h1;<a name="line.919"></a> +<span class="sourceLineNo">920</span><a name="line.920"></a> +<span class="sourceLineNo">921</span> h1 = fmix64(h1);<a name="line.921"></a> +<span class="sourceLineNo">922</span> h2 = fmix64(h2);<a name="line.922"></a> +<span class="sourceLineNo">923</span><a name="line.923"></a> +<span class="sourceLineNo">924</span> h1 += h2;<a name="line.924"></a> +<span class="sourceLineNo">925</span> h2 += h1;<a name="line.925"></a> +<span class="sourceLineNo">926</span><a name="line.926"></a> +<span class="sourceLineNo">927</span> return new long[] { h1, h2 };<a name="line.927"></a> +<span class="sourceLineNo">928</span> }<a name="line.928"></a> +<span class="sourceLineNo">929</span><a name="line.929"></a> +<span class="sourceLineNo">930</span> /**<a name="line.930"></a> +<span class="sourceLineNo">931</span> * Gets the little-endian long from 8 bytes starting at the specified index.<a name="line.931"></a> +<span class="sourceLineNo">932</span> *<a name="line.932"></a> +<span class="sourceLineNo">933</span> * @param data The data<a name="line.933"></a> +<span class="sourceLineNo">934</span> * @param index The index<a name="line.934"></a> +<span class="sourceLineNo">935</span> * @return The little-endian long<a name="line.935"></a> +<span class="sourceLineNo">936</span> */<a name="line.936"></a> +<span class="sourceLineNo">937</span> private static long getLittleEndianLong(final byte[] data, final int index) {<a name="line.937"></a> +<span class="sourceLineNo">938</span> return (((long) data[index ] & 0xff) ) |<a name="line.938"></a> +<span class="sourceLineNo">939</span> (((long) data[index + 1] & 0xff) << 8) |<a name="line.939"></a> +<span class="sourceLineNo">940</span> (((long) data[index + 2] & 0xff) << 16) |<a name="line.940"></a> +<span class="sourceLineNo">941</span> (((long) data[index + 3] & 0xff) << 24) |<a name="line.941"></a> +<span class="sourceLineNo">942</span> (((long) data[index + 4] & 0xff) << 32) |<a name="line.942"></a> +<span class="sourceLineNo">943</span> (((long) data[index + 5] & 0xff) << 40) |<a name="line.943"></a> +<span class="sourceLineNo">944</span> (((long) data[index + 6] & 0xff) << 48) |<a name="line.944"></a> +<span class="sourceLineNo">945</span> (((long) data[index + 7] & 0xff) << 56);<a name="line.945"></a> +<span class="sourceLineNo">946</span> }<a name="line.946"></a> +<span class="sourceLineNo">947</span><a name="line.947"></a> +<span class="sourceLineNo">948</span> /**<a name="line.948"></a> +<span class="sourceLineNo">949</span> * Gets the little-endian int from 4 bytes starting at the specified index.<a name="line.949"></a> +<span class="sourceLineNo">950</span> *<a name="line.950"></a> +<span class="sourceLineNo">951</span> * @param data The data<a name="line.951"></a> +<span class="sourceLineNo">952</span> * @param index The index<a name="line.952"></a> +<span class="sourceLineNo">953</span> * @return The little-endian int<a name="line.953"></a> +<span class="sourceLineNo">954</span> */<a name="line.954"></a> +<span class="sourceLineNo">955</span> private static int getLittleEndianInt(final byte[] data, final int index) {<a name="line.955"></a> +<span class="sourceLineNo">956</span> return ((data[index ] & 0xff) ) |<a name="line.956"></a> +<span class="sourceLineNo">957</span> ((data[index + 1] & 0xff) << 8) |<a name="line.957"></a> +<span class="sourceLineNo">958</span> ((data[index + 2] & 0xff) << 16) |<a name="line.958"></a> +<span class="sourceLineNo">959</span> ((data[index + 3] & 0xff) << 24);<a name="line.959"></a> +<span class="sourceLineNo">960</span> }<a name="line.960"></a> +<span class="sourceLineNo">961</span><a name="line.961"></a> +<span class="sourceLineNo">962</span> /**<a name="line.962"></a> +<span class="sourceLineNo">963</span> * Performs the intermediate mix step of the 32-bit hash function {@code MurmurHash3_x86_32}.<a name="line.963"></a> +<span class="sourceLineNo">964</span> *<a name="line.964"></a> +<span class="sourceLineNo">965</span> * @param k The data to add to the hash<a name="line.965"></a> +<span class="sourceLineNo">966</span> * @param hash The current hash<a name="line.966"></a> +<span class="sourceLineNo">967</span> * @return The new hash<a name="line.967"></a> +<span class="sourceLineNo">968</span> */<a name="line.968"></a> +<span class="sourceLineNo">969</span> private static int mix32(int k, int hash) {<a name="line.969"></a> +<span class="sourceLineNo">970</span> k *= C1_32;<a name="line.970"></a> +<span class="sourceLineNo">971</span> k = Integer.rotateLeft(k, R1_32);<a name="line.971"></a> +<span class="sourceLineNo">972</span> k *= C2_32;<a name="line.972"></a> +<span class="sourceLineNo">973</span> hash ^= k;<a name="line.973"></a> +<span class="sourceLineNo">974</span> return Integer.rotateLeft(hash, R2_32) * M_32 + N_32;<a name="line.974"></a> +<span class="sourceLineNo">975</span> }<a name="line.975"></a> +<span class="sourceLineNo">976</span><a name="line.976"></a> +<span class="sourceLineNo">977</span> /**<a name="line.977"></a> +<span class="sourceLineNo">978</span> * Performs the final avalanche mix step of the 32-bit hash function {@code MurmurHash3_x86_32}.<a name="line.978"></a> +<span class="sourceLineNo">979</span> *<a name="line.979"></a> +<span class="sourceLineNo">980</span> * @param hash The current hash<a name="line.980"></a> +<span class="sourceLineNo">981</span> * @return The final hash<a name="line.981"></a> +<span class="sourceLineNo">982</span> */<a name="line.982"></a> +<span class="sourceLineNo">983</span> private static int fmix32(int hash) {<a name="line.983"></a> +<span class="sourceLineNo">984</span> hash ^= (hash >>> 16);<a name="line.984"></a> +<span class="sourceLineNo">985</span> hash *= 0x85ebca6b;<a name="line.985"></a> +<span class="sourceLineNo">986</span> hash ^= (hash >>> 13);<a name="line.986"></a> +<span class="sourceLineNo">987</span> hash *= 0xc2b2ae35;<a name="line.987"></a> +<span class="sourceLineNo">988</span> hash ^= (hash >>> 16);<a name="line.988"></a> +<span class="sourceLineNo">989</span> return hash;<a name="line.989"></a> +<span class="sourceLineNo">990</span> }<a name="line.990"></a> +<span class="sourceLineNo">991</span><a name="line.991"></a> +<span class="sourceLineNo">992</span> /**<a name="line.992"></a> +<span class="sourceLineNo">993</span> * Performs the final avalanche mix step of the 64-bit hash function {@code MurmurHash3_x64_128}.<a name="line.993"></a> +<span class="sourceLineNo">994</span> *<a name="line.994"></a> +<span class="sourceLineNo">995</span> * @param hash The current hash<a name="line.995"></a> +<span class="sourceLineNo">996</span> * @return The final hash<a name="line.996"></a> +<span class="sourceLineNo">997</span> */<a name="line.997"></a> +<span class="sourceLineNo">998</span> private static long fmix64(long hash) {<a name="line.998"></a> +<span class="sourceLineNo">999</span> hash ^= (hash >>> 33);<a name="line.999"></a> +<span class="sourceLineNo">1000</span> hash *= 0xff51afd7ed558ccdL;<a name="line.1000"></a> +<span class="sourceLineNo">1001</span> hash ^= (hash >>> 33);<a name="line.1001"></a> +<span class="sourceLineNo">1002</span> hash *= 0xc4ceb9fe1a85ec53L;<a name="line.1002"></a> +<span class="sourceLineNo">1003</span> hash ^= (hash >>> 33);<a name="line.1003"></a> +<span class="sourceLineNo">1004</span> return hash;<a name="line.1004"></a> +<span class="sourceLineNo">1005</span> }<a name="line.1005"></a> +<span class="sourceLineNo">1006</span><a name="line.1006"></a> +<span class="sourceLineNo">1007</span> /**<a name="line.1007"></a> +<span class="sourceLineNo">1008</span> * Generates 32-bit hash from input bytes. Bytes can be added incrementally and the new<a name="line.1008"></a> +<span class="sourceLineNo">1009</span> * hash computed.<a name="line.1009"></a> +<span class="sourceLineNo">1010</span> *<a name="line.1010"></a> +<span class="sourceLineNo">1011</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.1011"></a> +<span class="sourceLineNo">1012</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.1012"></a> +<span class="sourceLineNo">1013</span> *<a name="line.1013"></a> +<span class="sourceLineNo">1014</span> * @since 1.14<a name="line.1014"></a> +<span class="sourceLineNo">1015</span> */<a name="line.1015"></a> +<span class="sourceLineNo">1016</span> public static class IncrementalHash32x86 {<a name="line.1016"></a> +<span class="sourceLineNo">1017</span><a name="line.1017"></a> +<span class="sourceLineNo">1018</span> /** The size of byte blocks that are processed together. */<a name="line.1018"></a> +<span class="sourceLineNo">1019</span> private static final int BLOCK_SIZE = 4;<a name="line.1019"></a> +<span class="sourceLineNo">1020</span><a name="line.1020"></a> +<span class="sourceLineNo">1021</span> /** Up to 3 unprocessed bytes from input data. */<a name="line.1021"></a> +<span class="sourceLineNo">1022</span> private final byte[] unprocessed = new byte[3];<a name="line.1022"></a> +<span class="sourceLineNo">1023</span><a name="line.1023"></a> +<span class="sourceLineNo">1024</span> /** The number of unprocessed bytes in the tail data. */<a name="line.1024"></a> +<span class="sourceLineNo">1025</span> private int unprocessedLength;<a name="line.1025"></a> +<span class="sourceLineNo">1026</span><a name="line.1026"></a> +<span class="sourceLineNo">1027</span> /** The total number of input bytes added since the start. */<a name="line.1027"></a> +<span class="sourceLineNo">1028</span> private int totalLen;<a name="line.1028"></a> +<span class="sourceLineNo">1029</span><a name="line.1029"></a> +<span class="sourceLineNo">1030</span> /**<a name="line.1030"></a> +<span class="sourceLineNo">1031</span> * The current running hash.<a name="line.1031"></a> +<span class="sourceLineNo">1032</span> * This must be finalised to generate the 32-bit hash value.<a name="line.1032"></a> +<span class="sourceLineNo">1033</span> */<a name="line.1033"></a> +<span class="sourceLineNo">1034</span> private int hash;<a name="line.1034"></a> +<span class="sourceLineNo">1035</span><a name="line.1035"></a> +<span class="sourceLineNo">1036</span> /**<a name="line.1036"></a> +<span class="sourceLineNo">1037</span> * Starts a new incremental hash.<a name="line.1037"></a> +<span class="sourceLineNo">1038</span> *<a name="line.1038"></a> +<span class="sourceLineNo">1039</span> * @param seed The initial seed value<a name="line.1039"></a> +<span class="sourceLineNo">1040</span> */<a name="line.1040"></a> +<span class="sourceLineNo">1041</span> public final void start(final int seed) {<a name="line.1041"></a> +<span class="sourceLineNo">1042</span> // Reset<a name="line.1042"></a> +<span class="sourceLineNo">1043</span> unprocessedLength = totalLen = 0;<a name="line.1043"></a> +<span class="sourceLineNo">1044</span> this.hash = seed;<a name="line.1044"></a> +<span class="sourceLineNo">1045</span> }<a name="line.1045"></a> +<span class="sourceLineNo">1046</span><a name="line.1046"></a> +<span class="sourceLineNo">1047</span> /**<a name="line.1047"></a> +<span class="sourceLineNo">1048</span> * Adds the byte array to the current incremental hash.<a name="line.1048"></a> +<span class="sourceLineNo">1049</span> *<a name="line.1049"></a> +<span class="sourceLineNo">1050</span> * @param data The input byte array<a name="line.1050"></a> +<span class="sourceLineNo">1051</span> * @param offset The offset of data<a name="line.1051"></a> +<span class="sourceLineNo">1052</span> * @param length The length of array<a name="line.1052"></a> +<span class="sourceLineNo">1053</span> */<a name="line.1053"></a> +<span class="sourceLineNo">1054</span> public final void add(final byte[] data, final int offset, final int length) {<a name="line.1054"></a> +<span class="sourceLineNo">1055</span> if (length <= 0) {<a name="line.1055"></a> +<span class="sourceLineNo">1056</span> // Nothing to add<a name="line.1056"></a> +<span class="sourceLineNo">1057</span> return;<a name="line.1057"></a> +<span class="sourceLineNo">1058</span> }<a name="line.1058"></a> +<span class="sourceLineNo">1059</span> totalLen += length;<a name="line.1059"></a> +<span class="sourceLineNo">1060</span><a name="line.1060"></a> +<span class="sourceLineNo">1061</span> // Process the bytes in blocks of 4.<a name="line.1061"></a> +<span class="sourceLineNo">1062</span> // New bytes must be added to any current unprocessed bytes,<a name="line.1062"></a> +<span class="sourceLineNo">1063</span> // then processed in blocks of 4 and the remaining bytes saved:<a name="line.1063"></a> +<span class="sourceLineNo">1064</span> //<a name="line.1064"></a> +<span class="sourceLineNo">1065</span> // |--|---------------------------|--|<a name="line.1065"></a> +<span class="sourceLineNo">1066</span> // unprocessed<a name="line.1066"></a> +<span class="sourceLineNo">1067</span> // main block<a name="line.1067"></a> +<span class="sourceLineNo">1068</span> // remaining<a name="line.1068"></a> +<span class="sourceLineNo">1069</span><a name="line.1069"></a> +<span class="sourceLineNo">1070</span> // Check if the unprocessed bytes and new bytes can fill a block of 4.<a name="line.1070"></a> +<span class="sourceLineNo">1071</span> // Make this overflow safe in the event that length is Integer.MAX_VALUE.<a name="line.1071"></a> +<span class="sourceLineNo">1072</span> // Equivalent to: (unprocessedLength + length < BLOCK_SIZE)<a name="line.1072"></a> +<span class="sourceLineNo">1073</span> if (unprocessedLength + length - BLOCK_SIZE < 0) {<a name="line.1073"></a> +<span class="sourceLineNo">1074</span> // Not enough so add to the unprocessed bytes<a name="line.1074"></a> +<span class="sourceLineNo">1075</span> System.arraycopy(data, offset, unprocessed, unprocessedLength, length);<a name="line.1075"></a> +<span class="sourceLineNo">1076</span> unprocessedLength += length;<a name="line.1076"></a> +<span class="sourceLineNo">1077</span> return;<a name="line.1077"></a> +<span class="sourceLineNo">1078</span> }<a name="line.1078"></a> +<span class="sourceLineNo">1079</span><a name="line.1079"></a> +<span class="sourceLineNo">1080</span> // Combine unprocessed bytes with new bytes.<a name="line.1080"></a> +<span class="sourceLineNo">1081</span> int newOffset;<a name="line.1081"></a> +<span class="sourceLineNo">1082</span> int newLength;<a name="line.1082"></a> +<span class="sourceLineNo">1083</span> if (unprocessedLength > 0) {<a name="line.1083"></a> +<span class="sourceLineNo">1084</span> int k = -1;<a name="line.1084"></a> +<span class="sourceLineNo">1085</span> switch (unprocessedLength) {<a name="line.1085"></a> +<span class="sourceLineNo">1086</span> case 1:<a name="line.1086"></a> +<span class="sourceLineNo">1087</span> k = orBytes(unprocessed[0], data[offset], data[offset + 1], data[offset + 2]);<a name="line.1087"></a> +<span class="sourceLineNo">1088</span> break;<a name="line.1088"></a> +<span class="sourceLineNo">1089</span> case 2:<a name="line.1089"></a> +<span class="sourceLineNo">1090</span> k = orBytes(unprocessed[0], unprocessed[1], data[offset], data[offset + 1]);<a name="line.1090"></a> +<span class="sourceLineNo">1091</span> break;<a name="line.1091"></a> +<span class="sourceLineNo">1092</span> case 3:<a name="line.1092"></a> +<span class="sourceLineNo">1093</span> k = orBytes(unprocessed[0], unprocessed[1], unprocessed[2], data[offset]);<a name="line.1093"></a> +<span class="sourceLineNo">1094</span> break;<a name="line.1094"></a> +<span class="sourceLineNo">1095</span> default:<a name="line.1095"></a> +<span class="sourceLineNo">1096</span> throw new IllegalStateException("Unprocessed length should be 1, 2, or 3: " + unprocessedLength);<a name="line.1096"></a> +<span class="sourceLineNo">1097</span> }<a name="line.1097"></a> +<span class="sourceLineNo">1098</span> hash = mix32(k, hash);<a name="line.1098"></a> +<span class="sourceLineNo">1099</span> // Update the offset and length<a name="line.1099"></a> +<span class="sourceLineNo">1100</span> final int consumed = BLOCK_SIZE - unprocessedLength;<a name="line.1100"></a> +<span class="sourceLineNo">1101</span> newOffset = offset + consumed;<a name="line.1101"></a> +<span class="sourceLineNo">1102</span> newLength = length - consumed;<a name="line.1102"></a> +<span class="sourceLineNo">1103</span> } else {<a name="line.1103"></a> +<span class="sourceLineNo">1104</span> newOffset = offset;<a name="line.1104"></a> +<span class="sourceLineNo">1105</span> newLength = length;<a name="line.1105"></a> +<span class="sourceLineNo">1106</span> }<a name="line.1106"></a> +<span class="sourceLineNo">1107</span><a name="line.1107"></a> +<span class="sourceLineNo">1108</span> // Main processing of blocks of 4 bytes<a name="line.1108"></a> +<span class="sourceLineNo">1109</span> final int nblocks = newLength >> 2;<a name="line.1109"></a> +<span class="sourceLineNo">1110</span><a name="line.1110"></a> +<span class="sourceLineNo">1111</span> for (int i = 0; i < nblocks; i++) {<a name="line.1111"></a> +<span class="sourceLineNo">1112</span> final int index = newOffset + (i << 2);<a name="line.1112"></a> +<span class="sourceLineNo">1113</span> final int k = getLittleEndianInt(data, index);<a name="line.1113"></a> +<span class="sourceLineNo">1114</span> hash = mix32(k, hash);<a name="line.1114"></a> +<span class="sourceLineNo">1115</span> }<a name="line.1115"></a> +<span class="sourceLineNo">1116</span><a name="line.1116"></a> +<span class="sourceLineNo">1117</span> // Save left-over unprocessed bytes<a name="line.1117"></a> +<span class="sourceLineNo">1118</span> final int consumed = (nblocks << 2);<a name="line.1118"></a> +<span class="sourceLineNo">1119</span> unprocessedLength = newLength - consumed;<a name="line.1119"></a> +<span class="sourceLineNo">1120</span> if (unprocessedLength != 0) {<a name="line.1120"></a> +<span class="sourceLineNo">1121</span> System.arraycopy(data, newOffset + consumed, unprocessed, 0, unprocessedLength);<a name="line.1121"></a> +<span class="sourceLineNo">1122</span> }<a name="line.1122"></a> +<span class="sourceLineNo">1123</span> }<a name="line.1123"></a> +<span class="sourceLineNo">1124</span><a name="line.1124"></a> +<span class="sourceLineNo">1125</span> /**<a name="line.1125"></a> +<span class="sourceLineNo">1126</span> * Generate the 32-bit hash value. Repeat calls to this method with no additional data<a name="line.1126"></a> +<span class="sourceLineNo">1127</span> * will generate the same hash value.<a name="line.1127"></a> +<span class="sourceLineNo">1128</span> *<a name="line.1128"></a> +<span class="sourceLineNo">1129</span> * @return The 32-bit hash<a name="line.1129"></a> +<span class="sourceLineNo">1130</span> */<a name="line.1130"></a> +<span class="sourceLineNo">1131</span> public final int end() {<a name="line.1131"></a> +<span class="sourceLineNo">1132</span> // Allow calling end() again after adding no data to return the same result.<a name="line.1132"></a> +<span class="sourceLineNo">1133</span> return finalise(hash, unprocessedLength, unprocessed, totalLen);<a name="line.1133"></a> +<span class="sourceLineNo">1134</span> }<a name="line.1134"></a> +<span class="sourceLineNo">1135</span><a name="line.1135"></a> +<span class="sourceLineNo">1136</span> /**<a name="line.1136"></a> +<span class="sourceLineNo">1137</span> * Finalize the running hash to the output 32-bit hash by processing remaining bytes<a name="line.1137"></a> +<span class="sourceLineNo">1138</span> * and performing final mixing.<a name="line.1138"></a> +<span class="sourceLineNo">1139</span> *<a name="line.1139"></a> +<span class="sourceLineNo">1140</span> * @param hash The running hash<a name="line.1140"></a> +<span class="sourceLineNo">1141</span> * @param unprocessedLength The number of unprocessed bytes in the tail data.<a name="line.1141"></a> +<span class="sourceLineNo">1142</span> * @param unprocessed Up to 3 unprocessed bytes from input data.<a name="line.1142"></a> +<span class="sourceLineNo">1143</span> * @param totalLen The total number of input bytes added since the start.<a name="line.1143"></a> +<span class="sourceLineNo">1144</span> * @return The 32-bit hash<a name="line.1144"></a> +<span class="sourceLineNo">1145</span> */<a name="line.1145"></a> +<span class="sourceLineNo">1146</span> int finalise(final int hash, final int unprocessedLength, final byte[] unprocessed, final int totalLen) {<a name="line.1146"></a> +<span class="sourceLineNo">1147</span> int result = hash;<a name="line.1147"></a> +<span class="sourceLineNo">1148</span> int k1 = 0;<a name="line.1148"></a> +<span class="sourceLineNo">1149</span> switch (unprocessedLength) {<a name="line.1149"></a> +<span class="sourceLineNo">1150</span> case 3:<a name="line.1150"></a> +<span class="sourceLineNo">1151</span> k1 ^= (unprocessed[2] & 0xff) << 16;<a name="line.1151"></a> +<span class="sourceLineNo">1152</span> case 2:<a name="line.1152"></a> +<span class="sourceLineNo">1153</span> k1 ^= (unprocessed[1] & 0xff) << 8;<a name="line.1153"></a> +<span class="sourceLineNo">1154</span> case 1:<a name="line.1154"></a> +<span class="sourceLineNo">1155</span> k1 ^= (unprocessed[0] & 0xff);<a name="line.1155"></a> +<span class="sourceLineNo">1156</span><a name="line.1156"></a> +<span class="sourceLineNo">1157</span> // mix functions<a name="line.1157"></a> +<span class="sourceLineNo">1158</span> k1 *= C1_32;<a name="line.1158"></a> +<span class="sourceLineNo">1159</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.1159"></a> +<span class="sourceLineNo">1160</span> k1 *= C2_32;<a name="line.1160"></a> +<span class="sourceLineNo">1161</span> result ^= k1;<a name="line.1161"></a> +<span class="sourceLineNo">1162</span> }<a name="line.1162"></a> +<span class="sourceLineNo">1163</span><a name="line.1163"></a> +<span class="sourceLineNo">1164</span> // finalization<a name="line.1164"></a> +<span class="sourceLineNo">1165</span> result ^= totalLen;<a name="line.1165"></a> +<span class="sourceLineNo">1166</span> return fmix32(result);<a name="line.1166"></a> +<span class="sourceLineNo">1167</span> }<a name="line.1167"></a> +<span class="sourceLineNo">1168</span><a name="line.1168"></a> +<span class="sourceLineNo">1169</span> /**<a name="line.1169"></a> +<span class="sourceLineNo">1170</span> * Combines the bytes using an Or operation ({@code | } in a little-endian representation<a name="line.1170"></a> +<span class="sourceLineNo">1171</span> * of a 32-bit integer; byte 1 will be the least significant byte, byte 4 the most<a name="line.1171"></a> +<span class="sourceLineNo">1172</span> * significant.<a name="line.1172"></a> +<span class="sourceLineNo">1173</span> *<a name="line.1173"></a> +<span class="sourceLineNo">1174</span> * @param b1 The first byte<a name="line.1174"></a> +<span class="sourceLineNo">1175</span> * @param b2 The second byte<a name="line.1175"></a> +<span class="sourceLineNo">1176</span> * @param b3 The third byte<a name="line.1176"></a> +<span class="sourceLineNo">1177</span> * @param b4 The fourth byte<a name="line.1177"></a> +<span class="sourceLineNo">1178</span> * @return The 32-bit integer<a name="line.1178"></a> +<span class="sourceLineNo">1179</span> */<a name="line.1179"></a> +<span class="sourceLineNo">1180</span> private static int orBytes(final byte b1, final byte b2, final byte b3, final byte b4) {<a name="line.1180"></a> +<span class="sourceLineNo">1181</span> return (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16) | ((b4 & 0xff) << 24);<a name="line.1181"></a> +<span class="sourceLineNo">1182</span> }<a name="line.1182"></a> +<span class="sourceLineNo">1183</span> }<a name="line.1183"></a> +<span class="sourceLineNo">1184</span><a name="line.1184"></a> +<span class="sourceLineNo">1185</span> /**<a name="line.1185"></a> +<span class="sourceLineNo">1186</span> * Generates 32-bit hash from input bytes. Bytes can be added incrementally and the new<a name="line.1186"></a> +<span class="sourceLineNo">1187</span> * hash computed.<a name="line.1187"></a> +<span class="sourceLineNo">1188</span> *<a name="line.1188"></a> +<span class="sourceLineNo">1189</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.1189"></a> +<span class="sourceLineNo">1190</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.1190"></a> +<span class="sourceLineNo">1191</span> *<a name="line.1191"></a> +<span class="sourceLineNo">1192</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.1192"></a> +<span class="sourceLineNo">1193</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.1193"></a> +<span class="sourceLineNo">1194</span> * bytes are negative.<p><a name="line.1194"></a> +<span class="sourceLineNo">1195</span> *<a name="line.1195"></a> +<span class="sourceLineNo">1196</span> * @deprecated Use IncrementalHash32x86. This corrects the processing of trailing bytes.<a name="line.1196"></a> +<span class="sourceLineNo">1197</span> */<a name="line.1197"></a> +<span class="sourceLineNo">1198</span> @Deprecated<a name="line.1198"></a> +<span class="sourceLineNo">1199</span> public static class IncrementalHash32 extends IncrementalHash32x86 {<a name="line.1199"></a> +<span class="sourceLineNo">1200</span><a name="line.1200"></a> +<span class="sourceLineNo">1201</span> /**<a name="line.1201"></a> +<span class="sourceLineNo">1202</span> * {@inheritDoc}<a name="line.1202"></a> +<span class="sourceLineNo">1203</span> *<a name="line.1203"></a> +<span class="sourceLineNo">1204</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.1204"></a> +<span class="sourceLineNo">1205</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.1205"></a> +<span class="sourceLineNo">1206</span> * bytes are negative.<p><a name="line.1206"></a> +<span class="sourceLineNo">1207</span> *<a name="line.1207"></a> +<span class="sourceLineNo">1208</span> * @deprecated Use IncrementalHash32x86. This corrects the processing of trailing bytes.<a name="line.1208"></a> +<span class="sourceLineNo">1209</span> */<a name="line.1209"></a> +<span class="sourceLineNo">1210</span> @Override<a name="line.1210"></a> +<span class="sourceLineNo">1211</span> @Deprecated<a name="line.1211"></a> +<span class="sourceLineNo">1212</span> int finalise(final int hash, final int unprocessedLength, final byte[] unprocessed, final int totalLen) {<a name="line.1212"></a> +<span class="sourceLineNo">1213</span> int result = hash;<a name="line.1213"></a> +<span class="sourceLineNo">1214</span> // ************<a name="line.1214"></a> +<span class="sourceLineNo">1215</span> // Note: This fails to apply masking using 0xff to the 3 remaining bytes.<a name="line.1215"></a> +<span class="sourceLineNo">1216</span> // ************<a name="line.1216"></a> +<span class="sourceLineNo">1217</span> int k1 = 0;<a name="line.1217"></a> +<span class="sourceLineNo">1218</span> switch (unprocessedLength) {<a name="line.1218"></a> +<span class="sourceLineNo">1219</span> case 3:<a name="line.1219"></a> +<span class="sourceLineNo">1220</span> k1 ^= unprocessed[2] << 16;<a name="line.1220"></a> +<span class="sourceLineNo">1221</span> case 2:<a name="line.1221"></a> +<span class="sourceLineNo">1222</span> k1 ^= unprocessed[1] << 8;<a name="line.1222"></a> +<span class="sourceLineNo">1223</span> case 1:<a name="line.1223"></a> +<span class="sourceLineNo">1224</span> k1 ^= unprocessed[0];<a name="line.1224"></a> +<span class="sourceLineNo">1225</span><a name="line.1225"></a> +<span class="sourceLineNo">1226</span> // mix functions<a name="line.1226"></a> +<span class="sourceLineNo">1227</span> k1 *= C1_32;<a name="line.1227"></a> +<span class="sourceLineNo">1228</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.1228"></a> +<span class="sourceLineNo">1229</span> k1 *= C2_32;<a name="line.1229"></a> +<span class="sourceLineNo">1230</span> result ^= k1;<a name="line.1230"></a> +<span class="sourceLineNo">1231</span> }<a name="line.1231"></a> +<span class="sourceLineNo">1232</span><a name="line.1232"></a> +<span class="sourceLineNo">1233</span> // finalization<a name="line.1233"></a> +<span class="sourceLineNo">1234</span> result ^= totalLen;<a name="line.1234"></a> +<span class="sourceLineNo">1235</span> return fmix32(result);<a name="line.1235"></a> +<span class="sourceLineNo">1236</span> }<a name="line.1236"></a> +<span class="sourceLineNo">1237</span> }<a name="line.1237"></a> +<span class="sourceLineNo">1238</span>}<a name="line.1238"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html new file mode 100644 index 0000000000000000000000000000000000000000..ab7c60780a967254b8c106b19d5125f44ab6763a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash3.IncrementalHash32x86.html @@ -0,0 +1,1310 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.digest;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.binary.StringUtils;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>/**<a name="line.22"></a> +<span class="sourceLineNo">023</span> * Implementation of the MurmurHash3 32-bit and 128-bit hash functions.<a name="line.23"></a> +<span class="sourceLineNo">024</span> *<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. The name comes from two basic<a name="line.26"></a> +<span class="sourceLineNo">027</span> * operations, multiply (MU) and rotate (R), used in its inner loop. Unlike cryptographic hash functions, it is not<a name="line.27"></a> +<span class="sourceLineNo">028</span> * specifically designed to be difficult to reverse by an adversary, making it unsuitable for cryptographic purposes.<a name="line.28"></a> +<span class="sourceLineNo">029</span> * </p><a name="line.29"></a> +<span class="sourceLineNo">030</span> *<a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * This contains a Java port of the 32-bit hash function {@code MurmurHash3_x86_32} and the 128-bit hash function<a name="line.32"></a> +<span class="sourceLineNo">033</span> * {@code MurmurHash3_x64_128} from Austin Applyby's original {@code c++} code in SMHasher.<a name="line.33"></a> +<span class="sourceLineNo">034</span> * </p><a name="line.34"></a> +<span class="sourceLineNo">035</span> *<a name="line.35"></a> +<span class="sourceLineNo">036</span> * <p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * This is public domain code with no copyrights. From home page of<a name="line.37"></a> +<span class="sourceLineNo">038</span> * <a href="https://github.com/aappleby/smhasher">SMHasher</a>:<a name="line.38"></a> +<span class="sourceLineNo">039</span> * </p><a name="line.39"></a> +<span class="sourceLineNo">040</span> *<a name="line.40"></a> +<span class="sourceLineNo">041</span> * <blockquote> "All MurmurHash versions are public domain software, and the author disclaims all copyright to their<a name="line.41"></a> +<span class="sourceLineNo">042</span> * code." </blockquote><a name="line.42"></a> +<span class="sourceLineNo">043</span> *<a name="line.43"></a> +<span class="sourceLineNo">044</span> * <p><a name="line.44"></a> +<span class="sourceLineNo">045</span> * Original adaption from Apache Hive. That adaption contains a {@code hash64} method that is not part of the original<a name="line.45"></a> +<span class="sourceLineNo">046</span> * MurmurHash3 code. It is not recommended to use these methods. They will be removed in a future release. To obtain a<a name="line.46"></a> +<span class="sourceLineNo">047</span> * 64-bit hash use half of the bits from the {@code hash128x64} methods using the input data converted to bytes.<a name="line.47"></a> +<span class="sourceLineNo">048</span> * <p><a name="line.48"></a> +<span class="sourceLineNo">049</span> *<a name="line.49"></a> +<span class="sourceLineNo">050</span> * @see <a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a><a name="line.50"></a> +<span class="sourceLineNo">051</span> * @see <a href="https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp"> Original MurmurHash3 c++<a name="line.51"></a> +<span class="sourceLineNo">052</span> * code</a><a name="line.52"></a> +<span class="sourceLineNo">053</span> * @see <a href=<a name="line.53"></a> +<span class="sourceLineNo">054</span> * "https://github.com/apache/hive/blob/master/storage-api/src/java/org/apache/hive/common/util/Murmur3.java"><a name="line.54"></a> +<span class="sourceLineNo">055</span> * Apache Hive Murmer3</a><a name="line.55"></a> +<span class="sourceLineNo">056</span> * @since 1.13<a name="line.56"></a> +<span class="sourceLineNo">057</span> */<a name="line.57"></a> +<span class="sourceLineNo">058</span>public final class MurmurHash3 {<a name="line.58"></a> +<span class="sourceLineNo">059</span><a name="line.59"></a> +<span class="sourceLineNo">060</span> /**<a name="line.60"></a> +<span class="sourceLineNo">061</span> * A random number to use for a hash code.<a name="line.61"></a> +<span class="sourceLineNo">062</span> *<a name="line.62"></a> +<span class="sourceLineNo">063</span> * @deprecated This is not used internally and will be removed in a future release.<a name="line.63"></a> +<span class="sourceLineNo">064</span> */<a name="line.64"></a> +<span class="sourceLineNo">065</span> @Deprecated<a name="line.65"></a> +<span class="sourceLineNo">066</span> public static final long NULL_HASHCODE = 2862933555777941757L;<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> /**<a name="line.68"></a> +<span class="sourceLineNo">069</span> * A default seed to use for the murmur hash algorithm.<a name="line.69"></a> +<span class="sourceLineNo">070</span> * Has the value {@code 104729}.<a name="line.70"></a> +<span class="sourceLineNo">071</span> */<a name="line.71"></a> +<span class="sourceLineNo">072</span> public static final int DEFAULT_SEED = 104729;<a name="line.72"></a> +<span class="sourceLineNo">073</span><a name="line.73"></a> +<span class="sourceLineNo">074</span> /** TODO Replace on Java 8 with Long.BYTES. */<a name="line.74"></a> +<span class="sourceLineNo">075</span> static final int LONG_BYTES = Long.SIZE / Byte.SIZE;<a name="line.75"></a> +<span class="sourceLineNo">076</span><a name="line.76"></a> +<span class="sourceLineNo">077</span> /** TODO Replace on Java 8 with Integer.BYTES. */<a name="line.77"></a> +<span class="sourceLineNo">078</span> static final int INTEGER_BYTES = Integer.SIZE / Byte.SIZE;<a name="line.78"></a> +<span class="sourceLineNo">079</span><a name="line.79"></a> +<span class="sourceLineNo">080</span> /** TODO Replace on Java 8 with Short.BYTES. */<a name="line.80"></a> +<span class="sourceLineNo">081</span> static final int SHORT_BYTES = Short.SIZE / Byte.SIZE;<a name="line.81"></a> +<span class="sourceLineNo">082</span><a name="line.82"></a> +<span class="sourceLineNo">083</span> // Constants for 32-bit variant<a name="line.83"></a> +<span class="sourceLineNo">084</span> private static final int C1_32 = 0xcc9e2d51;<a name="line.84"></a> +<span class="sourceLineNo">085</span> private static final int C2_32 = 0x1b873593;<a name="line.85"></a> +<span class="sourceLineNo">086</span> private static final int R1_32 = 15;<a name="line.86"></a> +<span class="sourceLineNo">087</span> private static final int R2_32 = 13;<a name="line.87"></a> +<span class="sourceLineNo">088</span> private static final int M_32 = 5;<a name="line.88"></a> +<span class="sourceLineNo">089</span> private static final int N_32 = 0xe6546b64;<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> // Constants for 128-bit variant<a name="line.91"></a> +<span class="sourceLineNo">092</span> private static final long C1 = 0x87c37b91114253d5L;<a name="line.92"></a> +<span class="sourceLineNo">093</span> private static final long C2 = 0x4cf5ad432745937fL;<a name="line.93"></a> +<span class="sourceLineNo">094</span> private static final int R1 = 31;<a name="line.94"></a> +<span class="sourceLineNo">095</span> private static final int R2 = 27;<a name="line.95"></a> +<span class="sourceLineNo">096</span> private static final int R3 = 33;<a name="line.96"></a> +<span class="sourceLineNo">097</span> private static final int M = 5;<a name="line.97"></a> +<span class="sourceLineNo">098</span> private static final int N1 = 0x52dce729;<a name="line.98"></a> +<span class="sourceLineNo">099</span> private static final int N2 = 0x38495ab5;<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> /** No instance methods. */<a name="line.101"></a> +<span class="sourceLineNo">102</span> private MurmurHash3() {<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> /**<a name="line.105"></a> +<span class="sourceLineNo">106</span> * Generates 32-bit hash from two longs with a default seed value.<a name="line.106"></a> +<span class="sourceLineNo">107</span> * This is a helper method that will produce the same result as:<a name="line.107"></a> +<span class="sourceLineNo">108</span> *<a name="line.108"></a> +<span class="sourceLineNo">109</span> * <pre><a name="line.109"></a> +<span class="sourceLineNo">110</span> * int offset = 0;<a name="line.110"></a> +<span class="sourceLineNo">111</span> * int seed = 104729;<a name="line.111"></a> +<span class="sourceLineNo">112</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16)<a name="line.112"></a> +<span class="sourceLineNo">113</span> * .putLong(data1)<a name="line.113"></a> +<span class="sourceLineNo">114</span> * .putLong(data2)<a name="line.114"></a> +<span class="sourceLineNo">115</span> * .array(), offset, 16, seed);<a name="line.115"></a> +<span class="sourceLineNo">116</span> * </pre><a name="line.116"></a> +<span class="sourceLineNo">117</span> *<a name="line.117"></a> +<span class="sourceLineNo">118</span> * @param data1 The first long to hash<a name="line.118"></a> +<span class="sourceLineNo">119</span> * @param data2 The second long to hash<a name="line.119"></a> +<span class="sourceLineNo">120</span> * @return The 32-bit hash<a name="line.120"></a> +<span class="sourceLineNo">121</span> * @see #hash32x86(byte[], int, int, int)<a name="line.121"></a> +<span class="sourceLineNo">122</span> */<a name="line.122"></a> +<span class="sourceLineNo">123</span> public static int hash32(final long data1, final long data2) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> return hash32(data1, data2, DEFAULT_SEED);<a name="line.124"></a> +<span class="sourceLineNo">125</span> }<a name="line.125"></a> +<span class="sourceLineNo">126</span><a name="line.126"></a> +<span class="sourceLineNo">127</span> /**<a name="line.127"></a> +<span class="sourceLineNo">128</span> * Generates 32-bit hash from two longs with the given seed.<a name="line.128"></a> +<span class="sourceLineNo">129</span> * This is a helper method that will produce the same result as:<a name="line.129"></a> +<span class="sourceLineNo">130</span> *<a name="line.130"></a> +<span class="sourceLineNo">131</span> * <pre><a name="line.131"></a> +<span class="sourceLineNo">132</span> * int offset = 0;<a name="line.132"></a> +<span class="sourceLineNo">133</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16)<a name="line.133"></a> +<span class="sourceLineNo">134</span> * .putLong(data1)<a name="line.134"></a> +<span class="sourceLineNo">135</span> * .putLong(data2)<a name="line.135"></a> +<span class="sourceLineNo">136</span> * .array(), offset, 16, seed);<a name="line.136"></a> +<span class="sourceLineNo">137</span> * </pre><a name="line.137"></a> +<span class="sourceLineNo">138</span> *<a name="line.138"></a> +<span class="sourceLineNo">139</span> * @param data1 The first long to hash<a name="line.139"></a> +<span class="sourceLineNo">140</span> * @param data2 The second long to hash<a name="line.140"></a> +<span class="sourceLineNo">141</span> * @param seed The initial seed value<a name="line.141"></a> +<span class="sourceLineNo">142</span> * @return The 32-bit hash<a name="line.142"></a> +<span class="sourceLineNo">143</span> * @see #hash32x86(byte[], int, int, int)<a name="line.143"></a> +<span class="sourceLineNo">144</span> */<a name="line.144"></a> +<span class="sourceLineNo">145</span> public static int hash32(final long data1, final long data2, final int seed) {<a name="line.145"></a> +<span class="sourceLineNo">146</span> int hash = seed;<a name="line.146"></a> +<span class="sourceLineNo">147</span> final long r0 = Long.reverseBytes(data1);<a name="line.147"></a> +<span class="sourceLineNo">148</span> final long r1 = Long.reverseBytes(data2);<a name="line.148"></a> +<span class="sourceLineNo">149</span><a name="line.149"></a> +<span class="sourceLineNo">150</span> hash = mix32((int) r0, hash);<a name="line.150"></a> +<span class="sourceLineNo">151</span> hash = mix32((int) (r0 >>> 32), hash);<a name="line.151"></a> +<span class="sourceLineNo">152</span> hash = mix32((int) (r1), hash);<a name="line.152"></a> +<span class="sourceLineNo">153</span> hash = mix32((int) (r1 >>> 32), hash);<a name="line.153"></a> +<span class="sourceLineNo">154</span><a name="line.154"></a> +<span class="sourceLineNo">155</span> hash ^= LONG_BYTES * 2;<a name="line.155"></a> +<span class="sourceLineNo">156</span> return fmix32(hash);<a name="line.156"></a> +<span class="sourceLineNo">157</span> }<a name="line.157"></a> +<span class="sourceLineNo">158</span><a name="line.158"></a> +<span class="sourceLineNo">159</span> /**<a name="line.159"></a> +<span class="sourceLineNo">160</span> * Generates 32-bit hash from a long with a default seed value.<a name="line.160"></a> +<span class="sourceLineNo">161</span> * This is a helper method that will produce the same result as:<a name="line.161"></a> +<span class="sourceLineNo">162</span> *<a name="line.162"></a> +<span class="sourceLineNo">163</span> * <pre><a name="line.163"></a> +<span class="sourceLineNo">164</span> * int offset = 0;<a name="line.164"></a> +<span class="sourceLineNo">165</span> * int seed = 104729;<a name="line.165"></a> +<span class="sourceLineNo">166</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8)<a name="line.166"></a> +<span class="sourceLineNo">167</span> * .putLong(data)<a name="line.167"></a> +<span class="sourceLineNo">168</span> * .array(), offset, 8, seed);<a name="line.168"></a> +<span class="sourceLineNo">169</span> * </pre><a name="line.169"></a> +<span class="sourceLineNo">170</span> *<a name="line.170"></a> +<span class="sourceLineNo">171</span> * @param data The long to hash<a name="line.171"></a> +<span class="sourceLineNo">172</span> * @return The 32-bit hash<a name="line.172"></a> +<span class="sourceLineNo">173</span> * @see #hash32x86(byte[], int, int, int)<a name="line.173"></a> +<span class="sourceLineNo">174</span> */<a name="line.174"></a> +<span class="sourceLineNo">175</span> public static int hash32(final long data) {<a name="line.175"></a> +<span class="sourceLineNo">176</span> return hash32(data, DEFAULT_SEED);<a name="line.176"></a> +<span class="sourceLineNo">177</span> }<a name="line.177"></a> +<span class="sourceLineNo">178</span><a name="line.178"></a> +<span class="sourceLineNo">179</span> /**<a name="line.179"></a> +<span class="sourceLineNo">180</span> * Generates 32-bit hash from a long with the given seed.<a name="line.180"></a> +<span class="sourceLineNo">181</span> * This is a helper method that will produce the same result as:<a name="line.181"></a> +<span class="sourceLineNo">182</span> *<a name="line.182"></a> +<span class="sourceLineNo">183</span> * <pre><a name="line.183"></a> +<span class="sourceLineNo">184</span> * int offset = 0;<a name="line.184"></a> +<span class="sourceLineNo">185</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8)<a name="line.185"></a> +<span class="sourceLineNo">186</span> * .putLong(data)<a name="line.186"></a> +<span class="sourceLineNo">187</span> * .array(), offset, 8, seed);<a name="line.187"></a> +<span class="sourceLineNo">188</span> * </pre><a name="line.188"></a> +<span class="sourceLineNo">189</span> *<a name="line.189"></a> +<span class="sourceLineNo">190</span> * @param data The long to hash<a name="line.190"></a> +<span class="sourceLineNo">191</span> * @param seed The initial seed value<a name="line.191"></a> +<span class="sourceLineNo">192</span> * @return The 32-bit hash<a name="line.192"></a> +<span class="sourceLineNo">193</span> * @see #hash32x86(byte[], int, int, int)<a name="line.193"></a> +<span class="sourceLineNo">194</span> */<a name="line.194"></a> +<span class="sourceLineNo">195</span> public static int hash32(final long data, final int seed) {<a name="line.195"></a> +<span class="sourceLineNo">196</span> int hash = seed;<a name="line.196"></a> +<span class="sourceLineNo">197</span> final long r0 = Long.reverseBytes(data);<a name="line.197"></a> +<span class="sourceLineNo">198</span><a name="line.198"></a> +<span class="sourceLineNo">199</span> hash = mix32((int) r0, hash);<a name="line.199"></a> +<span class="sourceLineNo">200</span> hash = mix32((int) (r0 >>> 32), hash);<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> hash ^= LONG_BYTES;<a name="line.202"></a> +<span class="sourceLineNo">203</span> return fmix32(hash);<a name="line.203"></a> +<span class="sourceLineNo">204</span> }<a name="line.204"></a> +<span class="sourceLineNo">205</span><a name="line.205"></a> +<span class="sourceLineNo">206</span> /**<a name="line.206"></a> +<span class="sourceLineNo">207</span> * Generates 32-bit hash from the byte array with a default seed.<a name="line.207"></a> +<span class="sourceLineNo">208</span> * This is a helper method that will produce the same result as:<a name="line.208"></a> +<span class="sourceLineNo">209</span> *<a name="line.209"></a> +<span class="sourceLineNo">210</span> * <pre><a name="line.210"></a> +<span class="sourceLineNo">211</span> * int offset = 0;<a name="line.211"></a> +<span class="sourceLineNo">212</span> * int seed = 104729;<a name="line.212"></a> +<span class="sourceLineNo">213</span> * int hash = MurmurHash3.hash32(data, offset, data.length, seed);<a name="line.213"></a> +<span class="sourceLineNo">214</span> * </pre><a name="line.214"></a> +<span class="sourceLineNo">215</span> *<a name="line.215"></a> +<span class="sourceLineNo">216</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.216"></a> +<span class="sourceLineNo">217</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.217"></a> +<span class="sourceLineNo">218</span> * bytes are negative.<p><a name="line.218"></a> +<span class="sourceLineNo">219</span> *<a name="line.219"></a> +<span class="sourceLineNo">220</span> * @param data The input byte array<a name="line.220"></a> +<span class="sourceLineNo">221</span> * @return The 32-bit hash<a name="line.221"></a> +<span class="sourceLineNo">222</span> * @see #hash32(byte[], int, int, int)<a name="line.222"></a> +<span class="sourceLineNo">223</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.223"></a> +<span class="sourceLineNo">224</span> */<a name="line.224"></a> +<span class="sourceLineNo">225</span> @Deprecated<a name="line.225"></a> +<span class="sourceLineNo">226</span> public static int hash32(final byte[] data) {<a name="line.226"></a> +<span class="sourceLineNo">227</span> return hash32(data, 0, data.length, DEFAULT_SEED);<a name="line.227"></a> +<span class="sourceLineNo">228</span> }<a name="line.228"></a> +<span class="sourceLineNo">229</span><a name="line.229"></a> +<span class="sourceLineNo">230</span> /**<a name="line.230"></a> +<span class="sourceLineNo">231</span> * Generates 32-bit hash from a string with a default seed.<a name="line.231"></a> +<span class="sourceLineNo">232</span> * <p><a name="line.232"></a> +<span class="sourceLineNo">233</span> * Before 1.14 the string was converted using default encoding.<a name="line.233"></a> +<span class="sourceLineNo">234</span> * Since 1.14 the string is converted to bytes using UTF-8 encoding.<a name="line.234"></a> +<span class="sourceLineNo">235</span> * </p><a name="line.235"></a> +<span class="sourceLineNo">236</span> * This is a helper method that will produce the same result as:<a name="line.236"></a> +<span class="sourceLineNo">237</span> *<a name="line.237"></a> +<span class="sourceLineNo">238</span> * <pre><a name="line.238"></a> +<span class="sourceLineNo">239</span> * int offset = 0;<a name="line.239"></a> +<span class="sourceLineNo">240</span> * int seed = 104729;<a name="line.240"></a> +<span class="sourceLineNo">241</span> * byte[] bytes = data.getBytes(StandardCharsets.UTF_8);<a name="line.241"></a> +<span class="sourceLineNo">242</span> * int hash = MurmurHash3.hash32(bytes, offset, bytes.length, seed);<a name="line.242"></a> +<span class="sourceLineNo">243</span> * </pre><a name="line.243"></a> +<span class="sourceLineNo">244</span> *<a name="line.244"></a> +<span class="sourceLineNo">245</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.245"></a> +<span class="sourceLineNo">246</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.246"></a> +<span class="sourceLineNo">247</span> * bytes are negative.<p><a name="line.247"></a> +<span class="sourceLineNo">248</span> *<a name="line.248"></a> +<span class="sourceLineNo">249</span> * @param data The input string<a name="line.249"></a> +<span class="sourceLineNo">250</span> * @return The 32-bit hash<a name="line.250"></a> +<span class="sourceLineNo">251</span> * @see #hash32(byte[], int, int, int)<a name="line.251"></a> +<span class="sourceLineNo">252</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)} with the bytes returned from<a name="line.252"></a> +<span class="sourceLineNo">253</span> * {@link String#getBytes(java.nio.charset.Charset)}. This corrects the processing of trailing bytes.<a name="line.253"></a> +<span class="sourceLineNo">254</span> */<a name="line.254"></a> +<span class="sourceLineNo">255</span> @Deprecated<a name="line.255"></a> +<span class="sourceLineNo">256</span> public static int hash32(final String data) {<a name="line.256"></a> +<span class="sourceLineNo">257</span> final byte[] bytes = StringUtils.getBytesUtf8(data);<a name="line.257"></a> +<span class="sourceLineNo">258</span> return hash32(bytes, 0, bytes.length, DEFAULT_SEED);<a name="line.258"></a> +<span class="sourceLineNo">259</span> }<a name="line.259"></a> +<span class="sourceLineNo">260</span><a name="line.260"></a> +<span class="sourceLineNo">261</span> /**<a name="line.261"></a> +<span class="sourceLineNo">262</span> * Generates 32-bit hash from the byte array with the given length and a default seed.<a name="line.262"></a> +<span class="sourceLineNo">263</span> * This is a helper method that will produce the same result as:<a name="line.263"></a> +<span class="sourceLineNo">264</span> *<a name="line.264"></a> +<span class="sourceLineNo">265</span> * <pre><a name="line.265"></a> +<span class="sourceLineNo">266</span> * int offset = 0;<a name="line.266"></a> +<span class="sourceLineNo">267</span> * int seed = 104729;<a name="line.267"></a> +<span class="sourceLineNo">268</span> * int hash = MurmurHash3.hash32(data, offset, length, seed);<a name="line.268"></a> +<span class="sourceLineNo">269</span> * </pre><a name="line.269"></a> +<span class="sourceLineNo">270</span> *<a name="line.270"></a> +<span class="sourceLineNo">271</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.271"></a> +<span class="sourceLineNo">272</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.272"></a> +<span class="sourceLineNo">273</span> * bytes are negative.<p><a name="line.273"></a> +<span class="sourceLineNo">274</span> *<a name="line.274"></a> +<span class="sourceLineNo">275</span> * @param data The input byte array<a name="line.275"></a> +<span class="sourceLineNo">276</span> * @param length The length of array<a name="line.276"></a> +<span class="sourceLineNo">277</span> * @return The 32-bit hash<a name="line.277"></a> +<span class="sourceLineNo">278</span> * @see #hash32(byte[], int, int, int)<a name="line.278"></a> +<span class="sourceLineNo">279</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.279"></a> +<span class="sourceLineNo">280</span> */<a name="line.280"></a> +<span class="sourceLineNo">281</span> @Deprecated<a name="line.281"></a> +<span class="sourceLineNo">282</span> public static int hash32(final byte[] data, final int length) {<a name="line.282"></a> +<span class="sourceLineNo">283</span> return hash32(data, length, DEFAULT_SEED);<a name="line.283"></a> +<span class="sourceLineNo">284</span> }<a name="line.284"></a> +<span class="sourceLineNo">285</span><a name="line.285"></a> +<span class="sourceLineNo">286</span> /**<a name="line.286"></a> +<span class="sourceLineNo">287</span> * Generates 32-bit hash from the byte array with the given length and seed. This is a<a name="line.287"></a> +<span class="sourceLineNo">288</span> * helper method that will produce the same result as:<a name="line.288"></a> +<span class="sourceLineNo">289</span> *<a name="line.289"></a> +<span class="sourceLineNo">290</span> * <pre><a name="line.290"></a> +<span class="sourceLineNo">291</span> * int offset = 0;<a name="line.291"></a> +<span class="sourceLineNo">292</span> * int hash = MurmurHash3.hash32(data, offset, length, seed);<a name="line.292"></a> +<span class="sourceLineNo">293</span> * </pre><a name="line.293"></a> +<span class="sourceLineNo">294</span> *<a name="line.294"></a> +<span class="sourceLineNo">295</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.295"></a> +<span class="sourceLineNo">296</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.296"></a> +<span class="sourceLineNo">297</span> * bytes are negative.<p><a name="line.297"></a> +<span class="sourceLineNo">298</span> *<a name="line.298"></a> +<span class="sourceLineNo">299</span> * @param data The input byte array<a name="line.299"></a> +<span class="sourceLineNo">300</span> * @param length The length of array<a name="line.300"></a> +<span class="sourceLineNo">301</span> * @param seed The initial seed value<a name="line.301"></a> +<span class="sourceLineNo">302</span> * @return The 32-bit hash<a name="line.302"></a> +<span class="sourceLineNo">303</span> * @see #hash32(byte[], int, int, int)<a name="line.303"></a> +<span class="sourceLineNo">304</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.304"></a> +<span class="sourceLineNo">305</span> */<a name="line.305"></a> +<span class="sourceLineNo">306</span> @Deprecated<a name="line.306"></a> +<span class="sourceLineNo">307</span> public static int hash32(final byte[] data, final int length, final int seed) {<a name="line.307"></a> +<span class="sourceLineNo">308</span> return hash32(data, 0, length, seed);<a name="line.308"></a> +<span class="sourceLineNo">309</span> }<a name="line.309"></a> +<span class="sourceLineNo">310</span><a name="line.310"></a> +<span class="sourceLineNo">311</span> /**<a name="line.311"></a> +<span class="sourceLineNo">312</span> * Generates 32-bit hash from the byte array with the given offset, length and seed.<a name="line.312"></a> +<span class="sourceLineNo">313</span> *<a name="line.313"></a> +<span class="sourceLineNo">314</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.314"></a> +<span class="sourceLineNo">315</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.315"></a> +<span class="sourceLineNo">316</span> *<a name="line.316"></a> +<span class="sourceLineNo">317</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.317"></a> +<span class="sourceLineNo">318</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.318"></a> +<span class="sourceLineNo">319</span> * bytes are negative.<p><a name="line.319"></a> +<span class="sourceLineNo">320</span> *<a name="line.320"></a> +<span class="sourceLineNo">321</span> * @param data The input byte array<a name="line.321"></a> +<span class="sourceLineNo">322</span> * @param offset The offset of data<a name="line.322"></a> +<span class="sourceLineNo">323</span> * @param length The length of array<a name="line.323"></a> +<span class="sourceLineNo">324</span> * @param seed The initial seed value<a name="line.324"></a> +<span class="sourceLineNo">325</span> * @return The 32-bit hash<a name="line.325"></a> +<span class="sourceLineNo">326</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.326"></a> +<span class="sourceLineNo">327</span> */<a name="line.327"></a> +<span class="sourceLineNo">328</span> @Deprecated<a name="line.328"></a> +<span class="sourceLineNo">329</span> public static int hash32(final byte[] data, final int offset, final int length, final int seed) {<a name="line.329"></a> +<span class="sourceLineNo">330</span> int hash = seed;<a name="line.330"></a> +<span class="sourceLineNo">331</span> final int nblocks = length >> 2;<a name="line.331"></a> +<span class="sourceLineNo">332</span><a name="line.332"></a> +<span class="sourceLineNo">333</span> // body<a name="line.333"></a> +<span class="sourceLineNo">334</span> for (int i = 0; i < nblocks; i++) {<a name="line.334"></a> +<span class="sourceLineNo">335</span> final int index = offset + (i << 2);<a name="line.335"></a> +<span class="sourceLineNo">336</span> final int k = getLittleEndianInt(data, index);<a name="line.336"></a> +<span class="sourceLineNo">337</span> hash = mix32(k, hash);<a name="line.337"></a> +<span class="sourceLineNo">338</span> }<a name="line.338"></a> +<span class="sourceLineNo">339</span><a name="line.339"></a> +<span class="sourceLineNo">340</span> // tail<a name="line.340"></a> +<span class="sourceLineNo">341</span> // ************<a name="line.341"></a> +<span class="sourceLineNo">342</span> // Note: This fails to apply masking using 0xff to the 3 remaining bytes.<a name="line.342"></a> +<span class="sourceLineNo">343</span> // ************<a name="line.343"></a> +<span class="sourceLineNo">344</span> final int index = offset + (nblocks << 2);<a name="line.344"></a> +<span class="sourceLineNo">345</span> int k1 = 0;<a name="line.345"></a> +<span class="sourceLineNo">346</span> switch (offset + length - index) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> case 3:<a name="line.347"></a> +<span class="sourceLineNo">348</span> k1 ^= data[index + 2] << 16;<a name="line.348"></a> +<span class="sourceLineNo">349</span> case 2:<a name="line.349"></a> +<span class="sourceLineNo">350</span> k1 ^= data[index + 1] << 8;<a name="line.350"></a> +<span class="sourceLineNo">351</span> case 1:<a name="line.351"></a> +<span class="sourceLineNo">352</span> k1 ^= data[index];<a name="line.352"></a> +<span class="sourceLineNo">353</span><a name="line.353"></a> +<span class="sourceLineNo">354</span> // mix functions<a name="line.354"></a> +<span class="sourceLineNo">355</span> k1 *= C1_32;<a name="line.355"></a> +<span class="sourceLineNo">356</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.356"></a> +<span class="sourceLineNo">357</span> k1 *= C2_32;<a name="line.357"></a> +<span class="sourceLineNo">358</span> hash ^= k1;<a name="line.358"></a> +<span class="sourceLineNo">359</span> }<a name="line.359"></a> +<span class="sourceLineNo">360</span><a name="line.360"></a> +<span class="sourceLineNo">361</span> hash ^= length;<a name="line.361"></a> +<span class="sourceLineNo">362</span> return fmix32(hash);<a name="line.362"></a> +<span class="sourceLineNo">363</span> }<a name="line.363"></a> +<span class="sourceLineNo">364</span><a name="line.364"></a> +<span class="sourceLineNo">365</span> /**<a name="line.365"></a> +<span class="sourceLineNo">366</span> * Generates 32-bit hash from the byte array with a seed of zero.<a name="line.366"></a> +<span class="sourceLineNo">367</span> * This is a helper method that will produce the same result as:<a name="line.367"></a> +<span class="sourceLineNo">368</span> *<a name="line.368"></a> +<span class="sourceLineNo">369</span> * <pre><a name="line.369"></a> +<span class="sourceLineNo">370</span> * int offset = 0;<a name="line.370"></a> +<span class="sourceLineNo">371</span> * int seed = 0;<a name="line.371"></a> +<span class="sourceLineNo">372</span> * int hash = MurmurHash3.hash32x86(data, offset, data.length, seed);<a name="line.372"></a> +<span class="sourceLineNo">373</span> * </pre><a name="line.373"></a> +<span class="sourceLineNo">374</span> *<a name="line.374"></a> +<span class="sourceLineNo">375</span> * @param data The input byte array<a name="line.375"></a> +<span class="sourceLineNo">376</span> * @return The 32-bit hash<a name="line.376"></a> +<span class="sourceLineNo">377</span> * @see #hash32x86(byte[], int, int, int)<a name="line.377"></a> +<span class="sourceLineNo">378</span> * @since 1.14<a name="line.378"></a> +<span class="sourceLineNo">379</span> */<a name="line.379"></a> +<span class="sourceLineNo">380</span> public static int hash32x86(final byte[] data) {<a name="line.380"></a> +<span class="sourceLineNo">381</span> return hash32x86(data, 0, data.length, 0);<a name="line.381"></a> +<span class="sourceLineNo">382</span> }<a name="line.382"></a> +<span class="sourceLineNo">383</span><a name="line.383"></a> +<span class="sourceLineNo">384</span> /**<a name="line.384"></a> +<span class="sourceLineNo">385</span> * Generates 32-bit hash from the byte array with the given offset, length and seed.<a name="line.385"></a> +<span class="sourceLineNo">386</span> *<a name="line.386"></a> +<span class="sourceLineNo">387</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.387"></a> +<span class="sourceLineNo">388</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.388"></a> +<span class="sourceLineNo">389</span> *<a name="line.389"></a> +<span class="sourceLineNo">390</span> * @param data The input byte array<a name="line.390"></a> +<span class="sourceLineNo">391</span> * @param offset The offset of data<a name="line.391"></a> +<span class="sourceLineNo">392</span> * @param length The length of array<a name="line.392"></a> +<span class="sourceLineNo">393</span> * @param seed The initial seed value<a name="line.393"></a> +<span class="sourceLineNo">394</span> * @return The 32-bit hash<a name="line.394"></a> +<span class="sourceLineNo">395</span> * @since 1.14<a name="line.395"></a> +<span class="sourceLineNo">396</span> */<a name="line.396"></a> +<span class="sourceLineNo">397</span> public static int hash32x86(final byte[] data, final int offset, final int length, final int seed) {<a name="line.397"></a> +<span class="sourceLineNo">398</span> int hash = seed;<a name="line.398"></a> +<span class="sourceLineNo">399</span> final int nblocks = length >> 2;<a name="line.399"></a> +<span class="sourceLineNo">400</span><a name="line.400"></a> +<span class="sourceLineNo">401</span> // body<a name="line.401"></a> +<span class="sourceLineNo">402</span> for (int i = 0; i < nblocks; i++) {<a name="line.402"></a> +<span class="sourceLineNo">403</span> final int index = offset + (i << 2);<a name="line.403"></a> +<span class="sourceLineNo">404</span> final int k = getLittleEndianInt(data, index);<a name="line.404"></a> +<span class="sourceLineNo">405</span> hash = mix32(k, hash);<a name="line.405"></a> +<span class="sourceLineNo">406</span> }<a name="line.406"></a> +<span class="sourceLineNo">407</span><a name="line.407"></a> +<span class="sourceLineNo">408</span> // tail<a name="line.408"></a> +<span class="sourceLineNo">409</span> final int index = offset + (nblocks << 2);<a name="line.409"></a> +<span class="sourceLineNo">410</span> int k1 = 0;<a name="line.410"></a> +<span class="sourceLineNo">411</span> switch (offset + length - index) {<a name="line.411"></a> +<span class="sourceLineNo">412</span> case 3:<a name="line.412"></a> +<span class="sourceLineNo">413</span> k1 ^= (data[index + 2] & 0xff) << 16;<a name="line.413"></a> +<span class="sourceLineNo">414</span> case 2:<a name="line.414"></a> +<span class="sourceLineNo">415</span> k1 ^= (data[index + 1] & 0xff) << 8;<a name="line.415"></a> +<span class="sourceLineNo">416</span> case 1:<a name="line.416"></a> +<span class="sourceLineNo">417</span> k1 ^= (data[index] & 0xff);<a name="line.417"></a> +<span class="sourceLineNo">418</span><a name="line.418"></a> +<span class="sourceLineNo">419</span> // mix functions<a name="line.419"></a> +<span class="sourceLineNo">420</span> k1 *= C1_32;<a name="line.420"></a> +<span class="sourceLineNo">421</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.421"></a> +<span class="sourceLineNo">422</span> k1 *= C2_32;<a name="line.422"></a> +<span class="sourceLineNo">423</span> hash ^= k1;<a name="line.423"></a> +<span class="sourceLineNo">424</span> }<a name="line.424"></a> +<span class="sourceLineNo">425</span><a name="line.425"></a> +<span class="sourceLineNo">426</span> hash ^= length;<a name="line.426"></a> +<span class="sourceLineNo">427</span> return fmix32(hash);<a name="line.427"></a> +<span class="sourceLineNo">428</span> }<a name="line.428"></a> +<span class="sourceLineNo">429</span><a name="line.429"></a> +<span class="sourceLineNo">430</span> /**<a name="line.430"></a> +<span class="sourceLineNo">431</span> * Generates 64-bit hash from a long with a default seed.<a name="line.431"></a> +<span class="sourceLineNo">432</span> *<a name="line.432"></a> +<span class="sourceLineNo">433</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.433"></a> +<span class="sourceLineNo">434</span> *<a name="line.434"></a> +<span class="sourceLineNo">435</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.435"></a> +<span class="sourceLineNo">436</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.436"></a> +<span class="sourceLineNo">437</span> * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code long}.<a name="line.437"></a> +<span class="sourceLineNo">438</span> * This method will be removed in a future release.</p><a name="line.438"></a> +<span class="sourceLineNo">439</span> *<a name="line.439"></a> +<span class="sourceLineNo">440</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.440"></a> +<span class="sourceLineNo">441</span> * this result as the default seed is positive.</p><a name="line.441"></a> +<span class="sourceLineNo">442</span> *<a name="line.442"></a> +<span class="sourceLineNo">443</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.443"></a> +<span class="sourceLineNo">444</span> *<a name="line.444"></a> +<span class="sourceLineNo">445</span> * <pre><a name="line.445"></a> +<span class="sourceLineNo">446</span> * int offset = 0;<a name="line.446"></a> +<span class="sourceLineNo">447</span> * int seed = 104729;<a name="line.447"></a> +<span class="sourceLineNo">448</span> * long hash = MurmurHash3.hash64(ByteBuffer.allocate(8)<a name="line.448"></a> +<span class="sourceLineNo">449</span> * .putLong(data)<a name="line.449"></a> +<span class="sourceLineNo">450</span> * .array(), offset, 8, seed);<a name="line.450"></a> +<span class="sourceLineNo">451</span> * </pre><a name="line.451"></a> +<span class="sourceLineNo">452</span> *<a name="line.452"></a> +<span class="sourceLineNo">453</span> * @param data The long to hash<a name="line.453"></a> +<span class="sourceLineNo">454</span> * @return The 64-bit hash<a name="line.454"></a> +<span class="sourceLineNo">455</span> * @see #hash64(byte[], int, int, int)<a name="line.455"></a> +<span class="sourceLineNo">456</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.456"></a> +<span class="sourceLineNo">457</span> * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code long}.<a name="line.457"></a> +<span class="sourceLineNo">458</span> */<a name="line.458"></a> +<span class="sourceLineNo">459</span> @Deprecated<a name="line.459"></a> +<span class="sourceLineNo">460</span> public static long hash64(final long data) {<a name="line.460"></a> +<span class="sourceLineNo">461</span> long hash = DEFAULT_SEED;<a name="line.461"></a> +<span class="sourceLineNo">462</span> long k = Long.reverseBytes(data);<a name="line.462"></a> +<span class="sourceLineNo">463</span> final int length = LONG_BYTES;<a name="line.463"></a> +<span class="sourceLineNo">464</span> // mix functions<a name="line.464"></a> +<span class="sourceLineNo">465</span> k *= C1;<a name="line.465"></a> +<span class="sourceLineNo">466</span> k = Long.rotateLeft(k, R1);<a name="line.466"></a> +<span class="sourceLineNo">467</span> k *= C2;<a name="line.467"></a> +<span class="sourceLineNo">468</span> hash ^= k;<a name="line.468"></a> +<span class="sourceLineNo">469</span> hash = Long.rotateLeft(hash, R2) * M + N1;<a name="line.469"></a> +<span class="sourceLineNo">470</span> // finalization<a name="line.470"></a> +<span class="sourceLineNo">471</span> hash ^= length;<a name="line.471"></a> +<span class="sourceLineNo">472</span> hash = fmix64(hash);<a name="line.472"></a> +<span class="sourceLineNo">473</span> return hash;<a name="line.473"></a> +<span class="sourceLineNo">474</span> }<a name="line.474"></a> +<span class="sourceLineNo">475</span><a name="line.475"></a> +<span class="sourceLineNo">476</span> /**<a name="line.476"></a> +<span class="sourceLineNo">477</span> * Generates 64-bit hash from an int with a default seed.<a name="line.477"></a> +<span class="sourceLineNo">478</span> *<a name="line.478"></a> +<span class="sourceLineNo">479</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.479"></a> +<span class="sourceLineNo">480</span> *<a name="line.480"></a> +<span class="sourceLineNo">481</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.481"></a> +<span class="sourceLineNo">482</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.482"></a> +<span class="sourceLineNo">483</span> * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code int}.<a name="line.483"></a> +<span class="sourceLineNo">484</span> * This method will be removed in a future release.</p><a name="line.484"></a> +<span class="sourceLineNo">485</span> *<a name="line.485"></a> +<span class="sourceLineNo">486</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.486"></a> +<span class="sourceLineNo">487</span> * this result as the default seed is positive.</p><a name="line.487"></a> +<span class="sourceLineNo">488</span> *<a name="line.488"></a> +<span class="sourceLineNo">489</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.489"></a> +<span class="sourceLineNo">490</span> *<a name="line.490"></a> +<span class="sourceLineNo">491</span> * <pre><a name="line.491"></a> +<span class="sourceLineNo">492</span> * int offset = 0;<a name="line.492"></a> +<span class="sourceLineNo">493</span> * int seed = 104729;<a name="line.493"></a> +<span class="sourceLineNo">494</span> * long hash = MurmurHash3.hash64(ByteBuffer.allocate(4)<a name="line.494"></a> +<span class="sourceLineNo">495</span> * .putInt(data)<a name="line.495"></a> +<span class="sourceLineNo">496</span> * .array(), offset, 4, seed);<a name="line.496"></a> +<span class="sourceLineNo">497</span> * </pre><a name="line.497"></a> +<span class="sourceLineNo">498</span> *<a name="line.498"></a> +<span class="sourceLineNo">499</span> * @param data The int to hash<a name="line.499"></a> +<span class="sourceLineNo">500</span> * @return The 64-bit hash<a name="line.500"></a> +<span class="sourceLineNo">501</span> * @see #hash64(byte[], int, int, int)<a name="line.501"></a> +<span class="sourceLineNo">502</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.502"></a> +<span class="sourceLineNo">503</span> * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code int}.<a name="line.503"></a> +<span class="sourceLineNo">504</span> */<a name="line.504"></a> +<span class="sourceLineNo">505</span> @Deprecated<a name="line.505"></a> +<span class="sourceLineNo">506</span> public static long hash64(final int data) {<a name="line.506"></a> +<span class="sourceLineNo">507</span> long k1 = Integer.reverseBytes(data) & (-1L >>> 32);<a name="line.507"></a> +<span class="sourceLineNo">508</span> final int length = INTEGER_BYTES;<a name="line.508"></a> +<span class="sourceLineNo">509</span> long hash = DEFAULT_SEED;<a name="line.509"></a> +<span class="sourceLineNo">510</span> k1 *= C1;<a name="line.510"></a> +<span class="sourceLineNo">511</span> k1 = Long.rotateLeft(k1, R1);<a name="line.511"></a> +<span class="sourceLineNo">512</span> k1 *= C2;<a name="line.512"></a> +<span class="sourceLineNo">513</span> hash ^= k1;<a name="line.513"></a> +<span class="sourceLineNo">514</span> // finalization<a name="line.514"></a> +<span class="sourceLineNo">515</span> hash ^= length;<a name="line.515"></a> +<span class="sourceLineNo">516</span> hash = fmix64(hash);<a name="line.516"></a> +<span class="sourceLineNo">517</span> return hash;<a name="line.517"></a> +<span class="sourceLineNo">518</span> }<a name="line.518"></a> +<span class="sourceLineNo">519</span><a name="line.519"></a> +<span class="sourceLineNo">520</span> /**<a name="line.520"></a> +<span class="sourceLineNo">521</span> * Generates 64-bit hash from a short with a default seed.<a name="line.521"></a> +<span class="sourceLineNo">522</span> *<a name="line.522"></a> +<span class="sourceLineNo">523</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.523"></a> +<span class="sourceLineNo">524</span> *<a name="line.524"></a> +<span class="sourceLineNo">525</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.525"></a> +<span class="sourceLineNo">526</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.526"></a> +<span class="sourceLineNo">527</span> * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code short}.<a name="line.527"></a> +<span class="sourceLineNo">528</span> * This method will be removed in a future release.</p><a name="line.528"></a> +<span class="sourceLineNo">529</span> *<a name="line.529"></a> +<span class="sourceLineNo">530</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.530"></a> +<span class="sourceLineNo">531</span> * this result as the default seed is positive.</p><a name="line.531"></a> +<span class="sourceLineNo">532</span> *<a name="line.532"></a> +<span class="sourceLineNo">533</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.533"></a> +<span class="sourceLineNo">534</span> *<a name="line.534"></a> +<span class="sourceLineNo">535</span> * <pre><a name="line.535"></a> +<span class="sourceLineNo">536</span> * int offset = 0;<a name="line.536"></a> +<span class="sourceLineNo">537</span> * int seed = 104729;<a name="line.537"></a> +<span class="sourceLineNo">538</span> * long hash = MurmurHash3.hash64(ByteBuffer.allocate(2)<a name="line.538"></a> +<span class="sourceLineNo">539</span> * .putShort(data)<a name="line.539"></a> +<span class="sourceLineNo">540</span> * .array(), offset, 2, seed);<a name="line.540"></a> +<span class="sourceLineNo">541</span> * </pre><a name="line.541"></a> +<span class="sourceLineNo">542</span> *<a name="line.542"></a> +<span class="sourceLineNo">543</span> * @param data The short to hash<a name="line.543"></a> +<span class="sourceLineNo">544</span> * @return The 64-bit hash<a name="line.544"></a> +<span class="sourceLineNo">545</span> * @see #hash64(byte[], int, int, int)<a name="line.545"></a> +<span class="sourceLineNo">546</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.546"></a> +<span class="sourceLineNo">547</span> * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code short}.<a name="line.547"></a> +<span class="sourceLineNo">548</span> */<a name="line.548"></a> +<span class="sourceLineNo">549</span> @Deprecated<a name="line.549"></a> +<span class="sourceLineNo">550</span> public static long hash64(final short data) {<a name="line.550"></a> +<span class="sourceLineNo">551</span> long hash = DEFAULT_SEED;<a name="line.551"></a> +<span class="sourceLineNo">552</span> long k1 = 0;<a name="line.552"></a> +<span class="sourceLineNo">553</span> k1 ^= ((long) data & 0xff) << 8;<a name="line.553"></a> +<span class="sourceLineNo">554</span> k1 ^= ((long) ((data & 0xFF00) >> 8) & 0xff);<a name="line.554"></a> +<span class="sourceLineNo">555</span> k1 *= C1;<a name="line.555"></a> +<span class="sourceLineNo">556</span> k1 = Long.rotateLeft(k1, R1);<a name="line.556"></a> +<span class="sourceLineNo">557</span> k1 *= C2;<a name="line.557"></a> +<span class="sourceLineNo">558</span> hash ^= k1;<a name="line.558"></a> +<span class="sourceLineNo">559</span><a name="line.559"></a> +<span class="sourceLineNo">560</span> // finalization<a name="line.560"></a> +<span class="sourceLineNo">561</span> hash ^= SHORT_BYTES;<a name="line.561"></a> +<span class="sourceLineNo">562</span> hash = fmix64(hash);<a name="line.562"></a> +<span class="sourceLineNo">563</span> return hash;<a name="line.563"></a> +<span class="sourceLineNo">564</span> }<a name="line.564"></a> +<span class="sourceLineNo">565</span><a name="line.565"></a> +<span class="sourceLineNo">566</span> /**<a name="line.566"></a> +<span class="sourceLineNo">567</span> * Generates 64-bit hash from a byte array with a default seed.<a name="line.567"></a> +<span class="sourceLineNo">568</span> *<a name="line.568"></a> +<span class="sourceLineNo">569</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.569"></a> +<span class="sourceLineNo">570</span> *<a name="line.570"></a> +<span class="sourceLineNo">571</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.571"></a> +<span class="sourceLineNo">572</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.572"></a> +<span class="sourceLineNo">573</span> * {@linkplain #hash128x64(byte[])} with the same byte data.<a name="line.573"></a> +<span class="sourceLineNo">574</span> * This method will be removed in a future release.</p><a name="line.574"></a> +<span class="sourceLineNo">575</span> *<a name="line.575"></a> +<span class="sourceLineNo">576</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.576"></a> +<span class="sourceLineNo">577</span> * this result as the default seed is positive.</p><a name="line.577"></a> +<span class="sourceLineNo">578</span> *<a name="line.578"></a> +<span class="sourceLineNo">579</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.579"></a> +<span class="sourceLineNo">580</span> *<a name="line.580"></a> +<span class="sourceLineNo">581</span> * <pre><a name="line.581"></a> +<span class="sourceLineNo">582</span> * int offset = 0;<a name="line.582"></a> +<span class="sourceLineNo">583</span> * int seed = 104729;<a name="line.583"></a> +<span class="sourceLineNo">584</span> * long hash = MurmurHash3.hash64(data, offset, data.length, seed);<a name="line.584"></a> +<span class="sourceLineNo">585</span> * </pre><a name="line.585"></a> +<span class="sourceLineNo">586</span> *<a name="line.586"></a> +<span class="sourceLineNo">587</span> * @param data The input byte array<a name="line.587"></a> +<span class="sourceLineNo">588</span> * @return The 64-bit hash<a name="line.588"></a> +<span class="sourceLineNo">589</span> * @see #hash64(byte[], int, int, int)<a name="line.589"></a> +<span class="sourceLineNo">590</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.590"></a> +<span class="sourceLineNo">591</span> * Use half of the hash bytes from {@link #hash128x64(byte[])}.<a name="line.591"></a> +<span class="sourceLineNo">592</span> */<a name="line.592"></a> +<span class="sourceLineNo">593</span> @Deprecated<a name="line.593"></a> +<span class="sourceLineNo">594</span> public static long hash64(final byte[] data) {<a name="line.594"></a> +<span class="sourceLineNo">595</span> return hash64(data, 0, data.length, DEFAULT_SEED);<a name="line.595"></a> +<span class="sourceLineNo">596</span> }<a name="line.596"></a> +<span class="sourceLineNo">597</span><a name="line.597"></a> +<span class="sourceLineNo">598</span> /**<a name="line.598"></a> +<span class="sourceLineNo">599</span> * Generates 64-bit hash from a byte array with the given offset and length and a default seed.<a name="line.599"></a> +<span class="sourceLineNo">600</span> *<a name="line.600"></a> +<span class="sourceLineNo">601</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.601"></a> +<span class="sourceLineNo">602</span> *<a name="line.602"></a> +<span class="sourceLineNo">603</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.603"></a> +<span class="sourceLineNo">604</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.604"></a> +<span class="sourceLineNo">605</span> * {@linkplain #hash128x64(byte[])} with the same byte data.<a name="line.605"></a> +<span class="sourceLineNo">606</span> * This method will be removed in a future release.</p><a name="line.606"></a> +<span class="sourceLineNo">607</span> *<a name="line.607"></a> +<span class="sourceLineNo">608</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.608"></a> +<span class="sourceLineNo">609</span> * this result as the default seed is positive.</p><a name="line.609"></a> +<span class="sourceLineNo">610</span> *<a name="line.610"></a> +<span class="sourceLineNo">611</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.611"></a> +<span class="sourceLineNo">612</span> *<a name="line.612"></a> +<span class="sourceLineNo">613</span> * <pre><a name="line.613"></a> +<span class="sourceLineNo">614</span> * int seed = 104729;<a name="line.614"></a> +<span class="sourceLineNo">615</span> * long hash = MurmurHash3.hash64(data, offset, length, seed);<a name="line.615"></a> +<span class="sourceLineNo">616</span> * </pre><a name="line.616"></a> +<span class="sourceLineNo">617</span> *<a name="line.617"></a> +<span class="sourceLineNo">618</span> * @param data The input byte array<a name="line.618"></a> +<span class="sourceLineNo">619</span> * @param offset The offset of data<a name="line.619"></a> +<span class="sourceLineNo">620</span> * @param length The length of array<a name="line.620"></a> +<span class="sourceLineNo">621</span> * @return The 64-bit hash<a name="line.621"></a> +<span class="sourceLineNo">622</span> * @see #hash64(byte[], int, int, int)<a name="line.622"></a> +<span class="sourceLineNo">623</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.623"></a> +<span class="sourceLineNo">624</span> * Use half of the hash bytes from {@link #hash128x64(byte[], int, int, int)}.<a name="line.624"></a> +<span class="sourceLineNo">625</span> */<a name="line.625"></a> +<span class="sourceLineNo">626</span> @Deprecated<a name="line.626"></a> +<span class="sourceLineNo">627</span> public static long hash64(final byte[] data, final int offset, final int length) {<a name="line.627"></a> +<span class="sourceLineNo">628</span> return hash64(data, offset, length, DEFAULT_SEED);<a name="line.628"></a> +<span class="sourceLineNo">629</span> }<a name="line.629"></a> +<span class="sourceLineNo">630</span><a name="line.630"></a> +<span class="sourceLineNo">631</span> /**<a name="line.631"></a> +<span class="sourceLineNo">632</span> * Generates 64-bit hash from a byte array with the given offset, length and seed.<a name="line.632"></a> +<span class="sourceLineNo">633</span> *<a name="line.633"></a> +<span class="sourceLineNo">634</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.634"></a> +<span class="sourceLineNo">635</span> *<a name="line.635"></a> +<span class="sourceLineNo">636</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.636"></a> +<span class="sourceLineNo">637</span> * This method will be removed in a future release.</p><a name="line.637"></a> +<span class="sourceLineNo">638</span> *<a name="line.638"></a> +<span class="sourceLineNo">639</span> * <p>This implementation contains a sign-extension bug in the seed initialization.<a name="line.639"></a> +<span class="sourceLineNo">640</span> * This manifests if the seed is negative.</p><a name="line.640"></a> +<span class="sourceLineNo">641</span> *<a name="line.641"></a> +<span class="sourceLineNo">642</span> * <p>This algorithm processes 8 bytes chunks of data in a manner similar to the 16 byte chunks<a name="line.642"></a> +<span class="sourceLineNo">643</span> * of data processed in the MurmurHash3 {@code MurmurHash3_x64_128} method. However the hash<a name="line.643"></a> +<span class="sourceLineNo">644</span> * is not mixed with a hash chunk from the next 8 bytes of data. The method will not return<a name="line.644"></a> +<span class="sourceLineNo">645</span> * the same value as the first or second 64-bits of the function<a name="line.645"></a> +<span class="sourceLineNo">646</span> * {@link #hash128(byte[], int, int, int)}.</p><a name="line.646"></a> +<span class="sourceLineNo">647</span> *<a name="line.647"></a> +<span class="sourceLineNo">648</span> * <p>Use of this method is not advised. Use the first long returned from<a name="line.648"></a> +<span class="sourceLineNo">649</span> * {@link #hash128x64(byte[], int, int, int)}.<p><a name="line.649"></a> +<span class="sourceLineNo">650</span> *<a name="line.650"></a> +<span class="sourceLineNo">651</span> * @param data The input byte array<a name="line.651"></a> +<span class="sourceLineNo">652</span> * @param offset The offset of data<a name="line.652"></a> +<span class="sourceLineNo">653</span> * @param length The length of array<a name="line.653"></a> +<span class="sourceLineNo">654</span> * @param seed The initial seed value<a name="line.654"></a> +<span class="sourceLineNo">655</span> * @return The 64-bit hash<a name="line.655"></a> +<span class="sourceLineNo">656</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.656"></a> +<span class="sourceLineNo">657</span> * Use half of the hash bytes from {@link #hash128x64(byte[], int, int, int)}.<a name="line.657"></a> +<span class="sourceLineNo">658</span> */<a name="line.658"></a> +<span class="sourceLineNo">659</span> @Deprecated<a name="line.659"></a> +<span class="sourceLineNo">660</span> public static long hash64(final byte[] data, final int offset, final int length, final int seed) {<a name="line.660"></a> +<span class="sourceLineNo">661</span> // ************<a name="line.661"></a> +<span class="sourceLineNo">662</span> // Note: This fails to apply masking using 0xffffffffL to the seed.<a name="line.662"></a> +<span class="sourceLineNo">663</span> // ************<a name="line.663"></a> +<span class="sourceLineNo">664</span> long hash = seed;<a name="line.664"></a> +<span class="sourceLineNo">665</span> final int nblocks = length >> 3;<a name="line.665"></a> +<span class="sourceLineNo">666</span><a name="line.666"></a> +<span class="sourceLineNo">667</span> // body<a name="line.667"></a> +<span class="sourceLineNo">668</span> for (int i = 0; i < nblocks; i++) {<a name="line.668"></a> +<span class="sourceLineNo">669</span> final int index = offset + (i << 3);<a name="line.669"></a> +<span class="sourceLineNo">670</span> long k = getLittleEndianLong(data, index);<a name="line.670"></a> +<span class="sourceLineNo">671</span><a name="line.671"></a> +<span class="sourceLineNo">672</span> // mix functions<a name="line.672"></a> +<span class="sourceLineNo">673</span> k *= C1;<a name="line.673"></a> +<span class="sourceLineNo">674</span> k = Long.rotateLeft(k, R1);<a name="line.674"></a> +<span class="sourceLineNo">675</span> k *= C2;<a name="line.675"></a> +<span class="sourceLineNo">676</span> hash ^= k;<a name="line.676"></a> +<span class="sourceLineNo">677</span> hash = Long.rotateLeft(hash, R2) * M + N1;<a name="line.677"></a> +<span class="sourceLineNo">678</span> }<a name="line.678"></a> +<span class="sourceLineNo">679</span><a name="line.679"></a> +<span class="sourceLineNo">680</span> // tail<a name="line.680"></a> +<span class="sourceLineNo">681</span> long k1 = 0;<a name="line.681"></a> +<span class="sourceLineNo">682</span> final int index = offset + (nblocks << 3);<a name="line.682"></a> +<span class="sourceLineNo">683</span> switch (offset + length - index) {<a name="line.683"></a> +<span class="sourceLineNo">684</span> case 7:<a name="line.684"></a> +<span class="sourceLineNo">685</span> k1 ^= ((long) data[index + 6] & 0xff) << 48;<a name="line.685"></a> +<span class="sourceLineNo">686</span> case 6:<a name="line.686"></a> +<span class="sourceLineNo">687</span> k1 ^= ((long) data[index + 5] & 0xff) << 40;<a name="line.687"></a> +<span class="sourceLineNo">688</span> case 5:<a name="line.688"></a> +<span class="sourceLineNo">689</span> k1 ^= ((long) data[index + 4] & 0xff) << 32;<a name="line.689"></a> +<span class="sourceLineNo">690</span> case 4:<a name="line.690"></a> +<span class="sourceLineNo">691</span> k1 ^= ((long) data[index + 3] & 0xff) << 24;<a name="line.691"></a> +<span class="sourceLineNo">692</span> case 3:<a name="line.692"></a> +<span class="sourceLineNo">693</span> k1 ^= ((long) data[index + 2] & 0xff) << 16;<a name="line.693"></a> +<span class="sourceLineNo">694</span> case 2:<a name="line.694"></a> +<span class="sourceLineNo">695</span> k1 ^= ((long) data[index + 1] & 0xff) << 8;<a name="line.695"></a> +<span class="sourceLineNo">696</span> case 1:<a name="line.696"></a> +<span class="sourceLineNo">697</span> k1 ^= ((long) data[index] & 0xff);<a name="line.697"></a> +<span class="sourceLineNo">698</span> k1 *= C1;<a name="line.698"></a> +<span class="sourceLineNo">699</span> k1 = Long.rotateLeft(k1, R1);<a name="line.699"></a> +<span class="sourceLineNo">700</span> k1 *= C2;<a name="line.700"></a> +<span class="sourceLineNo">701</span> hash ^= k1;<a name="line.701"></a> +<span class="sourceLineNo">702</span> }<a name="line.702"></a> +<span class="sourceLineNo">703</span><a name="line.703"></a> +<span class="sourceLineNo">704</span> // finalization<a name="line.704"></a> +<span class="sourceLineNo">705</span> hash ^= length;<a name="line.705"></a> +<span class="sourceLineNo">706</span> hash = fmix64(hash);<a name="line.706"></a> +<span class="sourceLineNo">707</span><a name="line.707"></a> +<span class="sourceLineNo">708</span> return hash;<a name="line.708"></a> +<span class="sourceLineNo">709</span> }<a name="line.709"></a> +<span class="sourceLineNo">710</span><a name="line.710"></a> +<span class="sourceLineNo">711</span> /**<a name="line.711"></a> +<span class="sourceLineNo">712</span> * Generates 128-bit hash from the byte array with a default seed.<a name="line.712"></a> +<span class="sourceLineNo">713</span> * This is a helper method that will produce the same result as:<a name="line.713"></a> +<span class="sourceLineNo">714</span> *<a name="line.714"></a> +<span class="sourceLineNo">715</span> * <pre><a name="line.715"></a> +<span class="sourceLineNo">716</span> * int offset = 0;<a name="line.716"></a> +<span class="sourceLineNo">717</span> * int seed = 104729;<a name="line.717"></a> +<span class="sourceLineNo">718</span> * int hash = MurmurHash3.hash128(data, offset, data.length, seed);<a name="line.718"></a> +<span class="sourceLineNo">719</span> * </pre><a name="line.719"></a> +<span class="sourceLineNo">720</span> *<a name="line.720"></a> +<span class="sourceLineNo">721</span> * <p>Note: The sign extension bug in {@link #hash128(byte[], int, int, int)} does not effect<a name="line.721"></a> +<span class="sourceLineNo">722</span> * this result as the default seed is positive.</p><a name="line.722"></a> +<span class="sourceLineNo">723</span> *<a name="line.723"></a> +<span class="sourceLineNo">724</span> * @param data The input byte array<a name="line.724"></a> +<span class="sourceLineNo">725</span> * @return The 128-bit hash (2 longs)<a name="line.725"></a> +<span class="sourceLineNo">726</span> * @see #hash128(byte[], int, int, int)<a name="line.726"></a> +<span class="sourceLineNo">727</span> */<a name="line.727"></a> +<span class="sourceLineNo">728</span> public static long[] hash128(final byte[] data) {<a name="line.728"></a> +<span class="sourceLineNo">729</span> return hash128(data, 0, data.length, DEFAULT_SEED);<a name="line.729"></a> +<span class="sourceLineNo">730</span> }<a name="line.730"></a> +<span class="sourceLineNo">731</span><a name="line.731"></a> +<span class="sourceLineNo">732</span> /**<a name="line.732"></a> +<span class="sourceLineNo">733</span> * Generates 128-bit hash from the byte array with a seed of zero.<a name="line.733"></a> +<span class="sourceLineNo">734</span> * This is a helper method that will produce the same result as:<a name="line.734"></a> +<span class="sourceLineNo">735</span> *<a name="line.735"></a> +<span class="sourceLineNo">736</span> * <pre><a name="line.736"></a> +<span class="sourceLineNo">737</span> * int offset = 0;<a name="line.737"></a> +<span class="sourceLineNo">738</span> * int seed = 0;<a name="line.738"></a> +<span class="sourceLineNo">739</span> * int hash = MurmurHash3.hash128x64(data, offset, data.length, seed);<a name="line.739"></a> +<span class="sourceLineNo">740</span> * </pre><a name="line.740"></a> +<span class="sourceLineNo">741</span> *<a name="line.741"></a> +<span class="sourceLineNo">742</span> * @param data The input byte array<a name="line.742"></a> +<span class="sourceLineNo">743</span> * @return The 128-bit hash (2 longs)<a name="line.743"></a> +<span class="sourceLineNo">744</span> * @see #hash128x64(byte[], int, int, int)<a name="line.744"></a> +<span class="sourceLineNo">745</span> * @since 1.14<a name="line.745"></a> +<span class="sourceLineNo">746</span> */<a name="line.746"></a> +<span class="sourceLineNo">747</span> public static long[] hash128x64(final byte[] data) {<a name="line.747"></a> +<span class="sourceLineNo">748</span> return hash128x64(data, 0, data.length, 0);<a name="line.748"></a> +<span class="sourceLineNo">749</span> }<a name="line.749"></a> +<span class="sourceLineNo">750</span><a name="line.750"></a> +<span class="sourceLineNo">751</span> /**<a name="line.751"></a> +<span class="sourceLineNo">752</span> * Generates 128-bit hash from a string with a default seed.<a name="line.752"></a> +<span class="sourceLineNo">753</span> * <p><a name="line.753"></a> +<span class="sourceLineNo">754</span> * Before 1.14 the string was converted using default encoding.<a name="line.754"></a> +<span class="sourceLineNo">755</span> * Since 1.14 the string is converted to bytes using UTF-8 encoding.<a name="line.755"></a> +<span class="sourceLineNo">756</span> * </p><a name="line.756"></a> +<span class="sourceLineNo">757</span> * This is a helper method that will produce the same result as:<a name="line.757"></a> +<span class="sourceLineNo">758</span> *<a name="line.758"></a> +<span class="sourceLineNo">759</span> * <pre><a name="line.759"></a> +<span class="sourceLineNo">760</span> * int offset = 0;<a name="line.760"></a> +<span class="sourceLineNo">761</span> * int seed = 104729;<a name="line.761"></a> +<span class="sourceLineNo">762</span> * byte[] bytes = data.getBytes(StandardCharsets.UTF_8);<a name="line.762"></a> +<span class="sourceLineNo">763</span> * int hash = MurmurHash3.hash128(bytes, offset, bytes.length, seed);<a name="line.763"></a> +<span class="sourceLineNo">764</span> * </pre><a name="line.764"></a> +<span class="sourceLineNo">765</span> *<a name="line.765"></a> +<span class="sourceLineNo">766</span> * <p>Note: The sign extension bug in {@link #hash128(byte[], int, int, int)} does not effect<a name="line.766"></a> +<span class="sourceLineNo">767</span> * this result as the default seed is positive.</p><a name="line.767"></a> +<span class="sourceLineNo">768</span> *<a name="line.768"></a> +<span class="sourceLineNo">769</span> * @param data The input String<a name="line.769"></a> +<span class="sourceLineNo">770</span> * @return The 128-bit hash (2 longs)<a name="line.770"></a> +<span class="sourceLineNo">771</span> * @see #hash128(byte[], int, int, int)<a name="line.771"></a> +<span class="sourceLineNo">772</span> * @deprecated Use {@link #hash128x64(byte[])} using the bytes returned from<a name="line.772"></a> +<span class="sourceLineNo">773</span> * {@link String#getBytes(java.nio.charset.Charset)}.<a name="line.773"></a> +<span class="sourceLineNo">774</span> */<a name="line.774"></a> +<span class="sourceLineNo">775</span> @Deprecated<a name="line.775"></a> +<span class="sourceLineNo">776</span> public static long[] hash128(final String data) {<a name="line.776"></a> +<span class="sourceLineNo">777</span> final byte[] bytes = StringUtils.getBytesUtf8(data);<a name="line.777"></a> +<span class="sourceLineNo">778</span> return hash128(bytes, 0, bytes.length, DEFAULT_SEED);<a name="line.778"></a> +<span class="sourceLineNo">779</span> }<a name="line.779"></a> +<span class="sourceLineNo">780</span><a name="line.780"></a> +<span class="sourceLineNo">781</span> /**<a name="line.781"></a> +<span class="sourceLineNo">782</span> * Generates 128-bit hash from the byte array with the given offset, length and seed.<a name="line.782"></a> +<span class="sourceLineNo">783</span> *<a name="line.783"></a> +<span class="sourceLineNo">784</span> * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128}<a name="line.784"></a> +<span class="sourceLineNo">785</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.785"></a> +<span class="sourceLineNo">786</span> *<a name="line.786"></a> +<span class="sourceLineNo">787</span> * <p>This implementation contains a sign-extension bug in the seed initialization.<a name="line.787"></a> +<span class="sourceLineNo">788</span> * This manifests if the seed is negative.<p><a name="line.788"></a> +<span class="sourceLineNo">789</span> *<a name="line.789"></a> +<span class="sourceLineNo">790</span> * @param data The input byte array<a name="line.790"></a> +<span class="sourceLineNo">791</span> * @param offset The first element of array<a name="line.791"></a> +<span class="sourceLineNo">792</span> * @param length The length of array<a name="line.792"></a> +<span class="sourceLineNo">793</span> * @param seed The initial seed value<a name="line.793"></a> +<span class="sourceLineNo">794</span> * @return The 128-bit hash (2 longs)<a name="line.794"></a> +<span class="sourceLineNo">795</span> * @deprecated Use {@link #hash128x64(byte[], int, int, int)}. This corrects the seed initialization.<a name="line.795"></a> +<span class="sourceLineNo">796</span> */<a name="line.796"></a> +<span class="sourceLineNo">797</span> @Deprecated<a name="line.797"></a> +<span class="sourceLineNo">798</span> public static long[] hash128(final byte[] data, final int offset, final int length, final int seed) {<a name="line.798"></a> +<span class="sourceLineNo">799</span> // ************<a name="line.799"></a> +<span class="sourceLineNo">800</span> // Note: This deliberately fails to apply masking using 0xffffffffL to the seed<a name="line.800"></a> +<span class="sourceLineNo">801</span> // to maintain behavioral compatibility with the original version.<a name="line.801"></a> +<span class="sourceLineNo">802</span> // The implicit conversion to a long will extend a negative sign<a name="line.802"></a> +<span class="sourceLineNo">803</span> // bit through the upper 32-bits of the long seed. These should be zero.<a name="line.803"></a> +<span class="sourceLineNo">804</span> // ************<a name="line.804"></a> +<span class="sourceLineNo">805</span> return hash128x64Internal(data, offset, length, seed);<a name="line.805"></a> +<span class="sourceLineNo">806</span> }<a name="line.806"></a> +<span class="sourceLineNo">807</span><a name="line.807"></a> +<span class="sourceLineNo">808</span> /**<a name="line.808"></a> +<span class="sourceLineNo">809</span> * Generates 128-bit hash from the byte array with the given offset, length and seed.<a name="line.809"></a> +<span class="sourceLineNo">810</span> *<a name="line.810"></a> +<span class="sourceLineNo">811</span> * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128}<a name="line.811"></a> +<span class="sourceLineNo">812</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.812"></a> +<span class="sourceLineNo">813</span> *<a name="line.813"></a> +<span class="sourceLineNo">814</span> * @param data The input byte array<a name="line.814"></a> +<span class="sourceLineNo">815</span> * @param offset The first element of array<a name="line.815"></a> +<span class="sourceLineNo">816</span> * @param length The length of array<a name="line.816"></a> +<span class="sourceLineNo">817</span> * @param seed The initial seed value<a name="line.817"></a> +<span class="sourceLineNo">818</span> * @return The 128-bit hash (2 longs)<a name="line.818"></a> +<span class="sourceLineNo">819</span> * @since 1.14<a name="line.819"></a> +<span class="sourceLineNo">820</span> */<a name="line.820"></a> +<span class="sourceLineNo">821</span> public static long[] hash128x64(final byte[] data, final int offset, final int length, final int seed) {<a name="line.821"></a> +<span class="sourceLineNo">822</span> // Use an unsigned 32-bit integer as the seed<a name="line.822"></a> +<span class="sourceLineNo">823</span> return hash128x64Internal(data, offset, length, seed & 0xffffffffL);<a name="line.823"></a> +<span class="sourceLineNo">824</span> }<a name="line.824"></a> +<span class="sourceLineNo">825</span><a name="line.825"></a> +<span class="sourceLineNo">826</span> /**<a name="line.826"></a> +<span class="sourceLineNo">827</span> * Generates 128-bit hash from the byte array with the given offset, length and seed.<a name="line.827"></a> +<span class="sourceLineNo">828</span> *<a name="line.828"></a> +<span class="sourceLineNo">829</span> * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128}<a name="line.829"></a> +<span class="sourceLineNo">830</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.830"></a> +<span class="sourceLineNo">831</span> *<a name="line.831"></a> +<span class="sourceLineNo">832</span> * @param data The input byte array<a name="line.832"></a> +<span class="sourceLineNo">833</span> * @param offset The first element of array<a name="line.833"></a> +<span class="sourceLineNo">834</span> * @param length The length of array<a name="line.834"></a> +<span class="sourceLineNo">835</span> * @param seed The initial seed value<a name="line.835"></a> +<span class="sourceLineNo">836</span> * @return The 128-bit hash (2 longs)<a name="line.836"></a> +<span class="sourceLineNo">837</span> */<a name="line.837"></a> +<span class="sourceLineNo">838</span> private static long[] hash128x64Internal(final byte[] data, final int offset, final int length, final long seed) {<a name="line.838"></a> +<span class="sourceLineNo">839</span> long h1 = seed;<a name="line.839"></a> +<span class="sourceLineNo">840</span> long h2 = seed;<a name="line.840"></a> +<span class="sourceLineNo">841</span> final int nblocks = length >> 4;<a name="line.841"></a> +<span class="sourceLineNo">842</span><a name="line.842"></a> +<span class="sourceLineNo">843</span> // body<a name="line.843"></a> +<span class="sourceLineNo">844</span> for (int i = 0; i < nblocks; i++) {<a name="line.844"></a> +<span class="sourceLineNo">845</span> final int index = offset + (i << 4);<a name="line.845"></a> +<span class="sourceLineNo">846</span> long k1 = getLittleEndianLong(data, index);<a name="line.846"></a> +<span class="sourceLineNo">847</span> long k2 = getLittleEndianLong(data, index + 8);<a name="line.847"></a> +<span class="sourceLineNo">848</span><a name="line.848"></a> +<span class="sourceLineNo">849</span> // mix functions for k1<a name="line.849"></a> +<span class="sourceLineNo">850</span> k1 *= C1;<a name="line.850"></a> +<span class="sourceLineNo">851</span> k1 = Long.rotateLeft(k1, R1);<a name="line.851"></a> +<span class="sourceLineNo">852</span> k1 *= C2;<a name="line.852"></a> +<span class="sourceLineNo">853</span> h1 ^= k1;<a name="line.853"></a> +<span class="sourceLineNo">854</span> h1 = Long.rotateLeft(h1, R2);<a name="line.854"></a> +<span class="sourceLineNo">855</span> h1 += h2;<a name="line.855"></a> +<span class="sourceLineNo">856</span> h1 = h1 * M + N1;<a name="line.856"></a> +<span class="sourceLineNo">857</span><a name="line.857"></a> +<span class="sourceLineNo">858</span> // mix functions for k2<a name="line.858"></a> +<span class="sourceLineNo">859</span> k2 *= C2;<a name="line.859"></a> +<span class="sourceLineNo">860</span> k2 = Long.rotateLeft(k2, R3);<a name="line.860"></a> +<span class="sourceLineNo">861</span> k2 *= C1;<a name="line.861"></a> +<span class="sourceLineNo">862</span> h2 ^= k2;<a name="line.862"></a> +<span class="sourceLineNo">863</span> h2 = Long.rotateLeft(h2, R1);<a name="line.863"></a> +<span class="sourceLineNo">864</span> h2 += h1;<a name="line.864"></a> +<span class="sourceLineNo">865</span> h2 = h2 * M + N2;<a name="line.865"></a> +<span class="sourceLineNo">866</span> }<a name="line.866"></a> +<span class="sourceLineNo">867</span><a name="line.867"></a> +<span class="sourceLineNo">868</span> // tail<a name="line.868"></a> +<span class="sourceLineNo">869</span> long k1 = 0;<a name="line.869"></a> +<span class="sourceLineNo">870</span> long k2 = 0;<a name="line.870"></a> +<span class="sourceLineNo">871</span> final int index = offset + (nblocks << 4);<a name="line.871"></a> +<span class="sourceLineNo">872</span> switch (offset + length - index) {<a name="line.872"></a> +<span class="sourceLineNo">873</span> case 15:<a name="line.873"></a> +<span class="sourceLineNo">874</span> k2 ^= ((long) data[index + 14] & 0xff) << 48;<a name="line.874"></a> +<span class="sourceLineNo">875</span> case 14:<a name="line.875"></a> +<span class="sourceLineNo">876</span> k2 ^= ((long) data[index + 13] & 0xff) << 40;<a name="line.876"></a> +<span class="sourceLineNo">877</span> case 13:<a name="line.877"></a> +<span class="sourceLineNo">878</span> k2 ^= ((long) data[index + 12] & 0xff) << 32;<a name="line.878"></a> +<span class="sourceLineNo">879</span> case 12:<a name="line.879"></a> +<span class="sourceLineNo">880</span> k2 ^= ((long) data[index + 11] & 0xff) << 24;<a name="line.880"></a> +<span class="sourceLineNo">881</span> case 11:<a name="line.881"></a> +<span class="sourceLineNo">882</span> k2 ^= ((long) data[index + 10] & 0xff) << 16;<a name="line.882"></a> +<span class="sourceLineNo">883</span> case 10:<a name="line.883"></a> +<span class="sourceLineNo">884</span> k2 ^= ((long) data[index + 9] & 0xff) << 8;<a name="line.884"></a> +<span class="sourceLineNo">885</span> case 9:<a name="line.885"></a> +<span class="sourceLineNo">886</span> k2 ^= data[index + 8] & 0xff;<a name="line.886"></a> +<span class="sourceLineNo">887</span> k2 *= C2;<a name="line.887"></a> +<span class="sourceLineNo">888</span> k2 = Long.rotateLeft(k2, R3);<a name="line.888"></a> +<span class="sourceLineNo">889</span> k2 *= C1;<a name="line.889"></a> +<span class="sourceLineNo">890</span> h2 ^= k2;<a name="line.890"></a> +<span class="sourceLineNo">891</span><a name="line.891"></a> +<span class="sourceLineNo">892</span> case 8:<a name="line.892"></a> +<span class="sourceLineNo">893</span> k1 ^= ((long) data[index + 7] & 0xff) << 56;<a name="line.893"></a> +<span class="sourceLineNo">894</span> case 7:<a name="line.894"></a> +<span class="sourceLineNo">895</span> k1 ^= ((long) data[index + 6] & 0xff) << 48;<a name="line.895"></a> +<span class="sourceLineNo">896</span> case 6:<a name="line.896"></a> +<span class="sourceLineNo">897</span> k1 ^= ((long) data[index + 5] & 0xff) << 40;<a name="line.897"></a> +<span class="sourceLineNo">898</span> case 5:<a name="line.898"></a> +<span class="sourceLineNo">899</span> k1 ^= ((long) data[index + 4] & 0xff) << 32;<a name="line.899"></a> +<span class="sourceLineNo">900</span> case 4:<a name="line.900"></a> +<span class="sourceLineNo">901</span> k1 ^= ((long) data[index + 3] & 0xff) << 24;<a name="line.901"></a> +<span class="sourceLineNo">902</span> case 3:<a name="line.902"></a> +<span class="sourceLineNo">903</span> k1 ^= ((long) data[index + 2] & 0xff) << 16;<a name="line.903"></a> +<span class="sourceLineNo">904</span> case 2:<a name="line.904"></a> +<span class="sourceLineNo">905</span> k1 ^= ((long) data[index + 1] & 0xff) << 8;<a name="line.905"></a> +<span class="sourceLineNo">906</span> case 1:<a name="line.906"></a> +<span class="sourceLineNo">907</span> k1 ^= data[index] & 0xff;<a name="line.907"></a> +<span class="sourceLineNo">908</span> k1 *= C1;<a name="line.908"></a> +<span class="sourceLineNo">909</span> k1 = Long.rotateLeft(k1, R1);<a name="line.909"></a> +<span class="sourceLineNo">910</span> k1 *= C2;<a name="line.910"></a> +<span class="sourceLineNo">911</span> h1 ^= k1;<a name="line.911"></a> +<span class="sourceLineNo">912</span> }<a name="line.912"></a> +<span class="sourceLineNo">913</span><a name="line.913"></a> +<span class="sourceLineNo">914</span> // finalization<a name="line.914"></a> +<span class="sourceLineNo">915</span> h1 ^= length;<a name="line.915"></a> +<span class="sourceLineNo">916</span> h2 ^= length;<a name="line.916"></a> +<span class="sourceLineNo">917</span><a name="line.917"></a> +<span class="sourceLineNo">918</span> h1 += h2;<a name="line.918"></a> +<span class="sourceLineNo">919</span> h2 += h1;<a name="line.919"></a> +<span class="sourceLineNo">920</span><a name="line.920"></a> +<span class="sourceLineNo">921</span> h1 = fmix64(h1);<a name="line.921"></a> +<span class="sourceLineNo">922</span> h2 = fmix64(h2);<a name="line.922"></a> +<span class="sourceLineNo">923</span><a name="line.923"></a> +<span class="sourceLineNo">924</span> h1 += h2;<a name="line.924"></a> +<span class="sourceLineNo">925</span> h2 += h1;<a name="line.925"></a> +<span class="sourceLineNo">926</span><a name="line.926"></a> +<span class="sourceLineNo">927</span> return new long[] { h1, h2 };<a name="line.927"></a> +<span class="sourceLineNo">928</span> }<a name="line.928"></a> +<span class="sourceLineNo">929</span><a name="line.929"></a> +<span class="sourceLineNo">930</span> /**<a name="line.930"></a> +<span class="sourceLineNo">931</span> * Gets the little-endian long from 8 bytes starting at the specified index.<a name="line.931"></a> +<span class="sourceLineNo">932</span> *<a name="line.932"></a> +<span class="sourceLineNo">933</span> * @param data The data<a name="line.933"></a> +<span class="sourceLineNo">934</span> * @param index The index<a name="line.934"></a> +<span class="sourceLineNo">935</span> * @return The little-endian long<a name="line.935"></a> +<span class="sourceLineNo">936</span> */<a name="line.936"></a> +<span class="sourceLineNo">937</span> private static long getLittleEndianLong(final byte[] data, final int index) {<a name="line.937"></a> +<span class="sourceLineNo">938</span> return (((long) data[index ] & 0xff) ) |<a name="line.938"></a> +<span class="sourceLineNo">939</span> (((long) data[index + 1] & 0xff) << 8) |<a name="line.939"></a> +<span class="sourceLineNo">940</span> (((long) data[index + 2] & 0xff) << 16) |<a name="line.940"></a> +<span class="sourceLineNo">941</span> (((long) data[index + 3] & 0xff) << 24) |<a name="line.941"></a> +<span class="sourceLineNo">942</span> (((long) data[index + 4] & 0xff) << 32) |<a name="line.942"></a> +<span class="sourceLineNo">943</span> (((long) data[index + 5] & 0xff) << 40) |<a name="line.943"></a> +<span class="sourceLineNo">944</span> (((long) data[index + 6] & 0xff) << 48) |<a name="line.944"></a> +<span class="sourceLineNo">945</span> (((long) data[index + 7] & 0xff) << 56);<a name="line.945"></a> +<span class="sourceLineNo">946</span> }<a name="line.946"></a> +<span class="sourceLineNo">947</span><a name="line.947"></a> +<span class="sourceLineNo">948</span> /**<a name="line.948"></a> +<span class="sourceLineNo">949</span> * Gets the little-endian int from 4 bytes starting at the specified index.<a name="line.949"></a> +<span class="sourceLineNo">950</span> *<a name="line.950"></a> +<span class="sourceLineNo">951</span> * @param data The data<a name="line.951"></a> +<span class="sourceLineNo">952</span> * @param index The index<a name="line.952"></a> +<span class="sourceLineNo">953</span> * @return The little-endian int<a name="line.953"></a> +<span class="sourceLineNo">954</span> */<a name="line.954"></a> +<span class="sourceLineNo">955</span> private static int getLittleEndianInt(final byte[] data, final int index) {<a name="line.955"></a> +<span class="sourceLineNo">956</span> return ((data[index ] & 0xff) ) |<a name="line.956"></a> +<span class="sourceLineNo">957</span> ((data[index + 1] & 0xff) << 8) |<a name="line.957"></a> +<span class="sourceLineNo">958</span> ((data[index + 2] & 0xff) << 16) |<a name="line.958"></a> +<span class="sourceLineNo">959</span> ((data[index + 3] & 0xff) << 24);<a name="line.959"></a> +<span class="sourceLineNo">960</span> }<a name="line.960"></a> +<span class="sourceLineNo">961</span><a name="line.961"></a> +<span class="sourceLineNo">962</span> /**<a name="line.962"></a> +<span class="sourceLineNo">963</span> * Performs the intermediate mix step of the 32-bit hash function {@code MurmurHash3_x86_32}.<a name="line.963"></a> +<span class="sourceLineNo">964</span> *<a name="line.964"></a> +<span class="sourceLineNo">965</span> * @param k The data to add to the hash<a name="line.965"></a> +<span class="sourceLineNo">966</span> * @param hash The current hash<a name="line.966"></a> +<span class="sourceLineNo">967</span> * @return The new hash<a name="line.967"></a> +<span class="sourceLineNo">968</span> */<a name="line.968"></a> +<span class="sourceLineNo">969</span> private static int mix32(int k, int hash) {<a name="line.969"></a> +<span class="sourceLineNo">970</span> k *= C1_32;<a name="line.970"></a> +<span class="sourceLineNo">971</span> k = Integer.rotateLeft(k, R1_32);<a name="line.971"></a> +<span class="sourceLineNo">972</span> k *= C2_32;<a name="line.972"></a> +<span class="sourceLineNo">973</span> hash ^= k;<a name="line.973"></a> +<span class="sourceLineNo">974</span> return Integer.rotateLeft(hash, R2_32) * M_32 + N_32;<a name="line.974"></a> +<span class="sourceLineNo">975</span> }<a name="line.975"></a> +<span class="sourceLineNo">976</span><a name="line.976"></a> +<span class="sourceLineNo">977</span> /**<a name="line.977"></a> +<span class="sourceLineNo">978</span> * Performs the final avalanche mix step of the 32-bit hash function {@code MurmurHash3_x86_32}.<a name="line.978"></a> +<span class="sourceLineNo">979</span> *<a name="line.979"></a> +<span class="sourceLineNo">980</span> * @param hash The current hash<a name="line.980"></a> +<span class="sourceLineNo">981</span> * @return The final hash<a name="line.981"></a> +<span class="sourceLineNo">982</span> */<a name="line.982"></a> +<span class="sourceLineNo">983</span> private static int fmix32(int hash) {<a name="line.983"></a> +<span class="sourceLineNo">984</span> hash ^= (hash >>> 16);<a name="line.984"></a> +<span class="sourceLineNo">985</span> hash *= 0x85ebca6b;<a name="line.985"></a> +<span class="sourceLineNo">986</span> hash ^= (hash >>> 13);<a name="line.986"></a> +<span class="sourceLineNo">987</span> hash *= 0xc2b2ae35;<a name="line.987"></a> +<span class="sourceLineNo">988</span> hash ^= (hash >>> 16);<a name="line.988"></a> +<span class="sourceLineNo">989</span> return hash;<a name="line.989"></a> +<span class="sourceLineNo">990</span> }<a name="line.990"></a> +<span class="sourceLineNo">991</span><a name="line.991"></a> +<span class="sourceLineNo">992</span> /**<a name="line.992"></a> +<span class="sourceLineNo">993</span> * Performs the final avalanche mix step of the 64-bit hash function {@code MurmurHash3_x64_128}.<a name="line.993"></a> +<span class="sourceLineNo">994</span> *<a name="line.994"></a> +<span class="sourceLineNo">995</span> * @param hash The current hash<a name="line.995"></a> +<span class="sourceLineNo">996</span> * @return The final hash<a name="line.996"></a> +<span class="sourceLineNo">997</span> */<a name="line.997"></a> +<span class="sourceLineNo">998</span> private static long fmix64(long hash) {<a name="line.998"></a> +<span class="sourceLineNo">999</span> hash ^= (hash >>> 33);<a name="line.999"></a> +<span class="sourceLineNo">1000</span> hash *= 0xff51afd7ed558ccdL;<a name="line.1000"></a> +<span class="sourceLineNo">1001</span> hash ^= (hash >>> 33);<a name="line.1001"></a> +<span class="sourceLineNo">1002</span> hash *= 0xc4ceb9fe1a85ec53L;<a name="line.1002"></a> +<span class="sourceLineNo">1003</span> hash ^= (hash >>> 33);<a name="line.1003"></a> +<span class="sourceLineNo">1004</span> return hash;<a name="line.1004"></a> +<span class="sourceLineNo">1005</span> }<a name="line.1005"></a> +<span class="sourceLineNo">1006</span><a name="line.1006"></a> +<span class="sourceLineNo">1007</span> /**<a name="line.1007"></a> +<span class="sourceLineNo">1008</span> * Generates 32-bit hash from input bytes. Bytes can be added incrementally and the new<a name="line.1008"></a> +<span class="sourceLineNo">1009</span> * hash computed.<a name="line.1009"></a> +<span class="sourceLineNo">1010</span> *<a name="line.1010"></a> +<span class="sourceLineNo">1011</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.1011"></a> +<span class="sourceLineNo">1012</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.1012"></a> +<span class="sourceLineNo">1013</span> *<a name="line.1013"></a> +<span class="sourceLineNo">1014</span> * @since 1.14<a name="line.1014"></a> +<span class="sourceLineNo">1015</span> */<a name="line.1015"></a> +<span class="sourceLineNo">1016</span> public static class IncrementalHash32x86 {<a name="line.1016"></a> +<span class="sourceLineNo">1017</span><a name="line.1017"></a> +<span class="sourceLineNo">1018</span> /** The size of byte blocks that are processed together. */<a name="line.1018"></a> +<span class="sourceLineNo">1019</span> private static final int BLOCK_SIZE = 4;<a name="line.1019"></a> +<span class="sourceLineNo">1020</span><a name="line.1020"></a> +<span class="sourceLineNo">1021</span> /** Up to 3 unprocessed bytes from input data. */<a name="line.1021"></a> +<span class="sourceLineNo">1022</span> private final byte[] unprocessed = new byte[3];<a name="line.1022"></a> +<span class="sourceLineNo">1023</span><a name="line.1023"></a> +<span class="sourceLineNo">1024</span> /** The number of unprocessed bytes in the tail data. */<a name="line.1024"></a> +<span class="sourceLineNo">1025</span> private int unprocessedLength;<a name="line.1025"></a> +<span class="sourceLineNo">1026</span><a name="line.1026"></a> +<span class="sourceLineNo">1027</span> /** The total number of input bytes added since the start. */<a name="line.1027"></a> +<span class="sourceLineNo">1028</span> private int totalLen;<a name="line.1028"></a> +<span class="sourceLineNo">1029</span><a name="line.1029"></a> +<span class="sourceLineNo">1030</span> /**<a name="line.1030"></a> +<span class="sourceLineNo">1031</span> * The current running hash.<a name="line.1031"></a> +<span class="sourceLineNo">1032</span> * This must be finalised to generate the 32-bit hash value.<a name="line.1032"></a> +<span class="sourceLineNo">1033</span> */<a name="line.1033"></a> +<span class="sourceLineNo">1034</span> private int hash;<a name="line.1034"></a> +<span class="sourceLineNo">1035</span><a name="line.1035"></a> +<span class="sourceLineNo">1036</span> /**<a name="line.1036"></a> +<span class="sourceLineNo">1037</span> * Starts a new incremental hash.<a name="line.1037"></a> +<span class="sourceLineNo">1038</span> *<a name="line.1038"></a> +<span class="sourceLineNo">1039</span> * @param seed The initial seed value<a name="line.1039"></a> +<span class="sourceLineNo">1040</span> */<a name="line.1040"></a> +<span class="sourceLineNo">1041</span> public final void start(final int seed) {<a name="line.1041"></a> +<span class="sourceLineNo">1042</span> // Reset<a name="line.1042"></a> +<span class="sourceLineNo">1043</span> unprocessedLength = totalLen = 0;<a name="line.1043"></a> +<span class="sourceLineNo">1044</span> this.hash = seed;<a name="line.1044"></a> +<span class="sourceLineNo">1045</span> }<a name="line.1045"></a> +<span class="sourceLineNo">1046</span><a name="line.1046"></a> +<span class="sourceLineNo">1047</span> /**<a name="line.1047"></a> +<span class="sourceLineNo">1048</span> * Adds the byte array to the current incremental hash.<a name="line.1048"></a> +<span class="sourceLineNo">1049</span> *<a name="line.1049"></a> +<span class="sourceLineNo">1050</span> * @param data The input byte array<a name="line.1050"></a> +<span class="sourceLineNo">1051</span> * @param offset The offset of data<a name="line.1051"></a> +<span class="sourceLineNo">1052</span> * @param length The length of array<a name="line.1052"></a> +<span class="sourceLineNo">1053</span> */<a name="line.1053"></a> +<span class="sourceLineNo">1054</span> public final void add(final byte[] data, final int offset, final int length) {<a name="line.1054"></a> +<span class="sourceLineNo">1055</span> if (length <= 0) {<a name="line.1055"></a> +<span class="sourceLineNo">1056</span> // Nothing to add<a name="line.1056"></a> +<span class="sourceLineNo">1057</span> return;<a name="line.1057"></a> +<span class="sourceLineNo">1058</span> }<a name="line.1058"></a> +<span class="sourceLineNo">1059</span> totalLen += length;<a name="line.1059"></a> +<span class="sourceLineNo">1060</span><a name="line.1060"></a> +<span class="sourceLineNo">1061</span> // Process the bytes in blocks of 4.<a name="line.1061"></a> +<span class="sourceLineNo">1062</span> // New bytes must be added to any current unprocessed bytes,<a name="line.1062"></a> +<span class="sourceLineNo">1063</span> // then processed in blocks of 4 and the remaining bytes saved:<a name="line.1063"></a> +<span class="sourceLineNo">1064</span> //<a name="line.1064"></a> +<span class="sourceLineNo">1065</span> // |--|---------------------------|--|<a name="line.1065"></a> +<span class="sourceLineNo">1066</span> // unprocessed<a name="line.1066"></a> +<span class="sourceLineNo">1067</span> // main block<a name="line.1067"></a> +<span class="sourceLineNo">1068</span> // remaining<a name="line.1068"></a> +<span class="sourceLineNo">1069</span><a name="line.1069"></a> +<span class="sourceLineNo">1070</span> // Check if the unprocessed bytes and new bytes can fill a block of 4.<a name="line.1070"></a> +<span class="sourceLineNo">1071</span> // Make this overflow safe in the event that length is Integer.MAX_VALUE.<a name="line.1071"></a> +<span class="sourceLineNo">1072</span> // Equivalent to: (unprocessedLength + length < BLOCK_SIZE)<a name="line.1072"></a> +<span class="sourceLineNo">1073</span> if (unprocessedLength + length - BLOCK_SIZE < 0) {<a name="line.1073"></a> +<span class="sourceLineNo">1074</span> // Not enough so add to the unprocessed bytes<a name="line.1074"></a> +<span class="sourceLineNo">1075</span> System.arraycopy(data, offset, unprocessed, unprocessedLength, length);<a name="line.1075"></a> +<span class="sourceLineNo">1076</span> unprocessedLength += length;<a name="line.1076"></a> +<span class="sourceLineNo">1077</span> return;<a name="line.1077"></a> +<span class="sourceLineNo">1078</span> }<a name="line.1078"></a> +<span class="sourceLineNo">1079</span><a name="line.1079"></a> +<span class="sourceLineNo">1080</span> // Combine unprocessed bytes with new bytes.<a name="line.1080"></a> +<span class="sourceLineNo">1081</span> int newOffset;<a name="line.1081"></a> +<span class="sourceLineNo">1082</span> int newLength;<a name="line.1082"></a> +<span class="sourceLineNo">1083</span> if (unprocessedLength > 0) {<a name="line.1083"></a> +<span class="sourceLineNo">1084</span> int k = -1;<a name="line.1084"></a> +<span class="sourceLineNo">1085</span> switch (unprocessedLength) {<a name="line.1085"></a> +<span class="sourceLineNo">1086</span> case 1:<a name="line.1086"></a> +<span class="sourceLineNo">1087</span> k = orBytes(unprocessed[0], data[offset], data[offset + 1], data[offset + 2]);<a name="line.1087"></a> +<span class="sourceLineNo">1088</span> break;<a name="line.1088"></a> +<span class="sourceLineNo">1089</span> case 2:<a name="line.1089"></a> +<span class="sourceLineNo">1090</span> k = orBytes(unprocessed[0], unprocessed[1], data[offset], data[offset + 1]);<a name="line.1090"></a> +<span class="sourceLineNo">1091</span> break;<a name="line.1091"></a> +<span class="sourceLineNo">1092</span> case 3:<a name="line.1092"></a> +<span class="sourceLineNo">1093</span> k = orBytes(unprocessed[0], unprocessed[1], unprocessed[2], data[offset]);<a name="line.1093"></a> +<span class="sourceLineNo">1094</span> break;<a name="line.1094"></a> +<span class="sourceLineNo">1095</span> default:<a name="line.1095"></a> +<span class="sourceLineNo">1096</span> throw new IllegalStateException("Unprocessed length should be 1, 2, or 3: " + unprocessedLength);<a name="line.1096"></a> +<span class="sourceLineNo">1097</span> }<a name="line.1097"></a> +<span class="sourceLineNo">1098</span> hash = mix32(k, hash);<a name="line.1098"></a> +<span class="sourceLineNo">1099</span> // Update the offset and length<a name="line.1099"></a> +<span class="sourceLineNo">1100</span> final int consumed = BLOCK_SIZE - unprocessedLength;<a name="line.1100"></a> +<span class="sourceLineNo">1101</span> newOffset = offset + consumed;<a name="line.1101"></a> +<span class="sourceLineNo">1102</span> newLength = length - consumed;<a name="line.1102"></a> +<span class="sourceLineNo">1103</span> } else {<a name="line.1103"></a> +<span class="sourceLineNo">1104</span> newOffset = offset;<a name="line.1104"></a> +<span class="sourceLineNo">1105</span> newLength = length;<a name="line.1105"></a> +<span class="sourceLineNo">1106</span> }<a name="line.1106"></a> +<span class="sourceLineNo">1107</span><a name="line.1107"></a> +<span class="sourceLineNo">1108</span> // Main processing of blocks of 4 bytes<a name="line.1108"></a> +<span class="sourceLineNo">1109</span> final int nblocks = newLength >> 2;<a name="line.1109"></a> +<span class="sourceLineNo">1110</span><a name="line.1110"></a> +<span class="sourceLineNo">1111</span> for (int i = 0; i < nblocks; i++) {<a name="line.1111"></a> +<span class="sourceLineNo">1112</span> final int index = newOffset + (i << 2);<a name="line.1112"></a> +<span class="sourceLineNo">1113</span> final int k = getLittleEndianInt(data, index);<a name="line.1113"></a> +<span class="sourceLineNo">1114</span> hash = mix32(k, hash);<a name="line.1114"></a> +<span class="sourceLineNo">1115</span> }<a name="line.1115"></a> +<span class="sourceLineNo">1116</span><a name="line.1116"></a> +<span class="sourceLineNo">1117</span> // Save left-over unprocessed bytes<a name="line.1117"></a> +<span class="sourceLineNo">1118</span> final int consumed = (nblocks << 2);<a name="line.1118"></a> +<span class="sourceLineNo">1119</span> unprocessedLength = newLength - consumed;<a name="line.1119"></a> +<span class="sourceLineNo">1120</span> if (unprocessedLength != 0) {<a name="line.1120"></a> +<span class="sourceLineNo">1121</span> System.arraycopy(data, newOffset + consumed, unprocessed, 0, unprocessedLength);<a name="line.1121"></a> +<span class="sourceLineNo">1122</span> }<a name="line.1122"></a> +<span class="sourceLineNo">1123</span> }<a name="line.1123"></a> +<span class="sourceLineNo">1124</span><a name="line.1124"></a> +<span class="sourceLineNo">1125</span> /**<a name="line.1125"></a> +<span class="sourceLineNo">1126</span> * Generate the 32-bit hash value. Repeat calls to this method with no additional data<a name="line.1126"></a> +<span class="sourceLineNo">1127</span> * will generate the same hash value.<a name="line.1127"></a> +<span class="sourceLineNo">1128</span> *<a name="line.1128"></a> +<span class="sourceLineNo">1129</span> * @return The 32-bit hash<a name="line.1129"></a> +<span class="sourceLineNo">1130</span> */<a name="line.1130"></a> +<span class="sourceLineNo">1131</span> public final int end() {<a name="line.1131"></a> +<span class="sourceLineNo">1132</span> // Allow calling end() again after adding no data to return the same result.<a name="line.1132"></a> +<span class="sourceLineNo">1133</span> return finalise(hash, unprocessedLength, unprocessed, totalLen);<a name="line.1133"></a> +<span class="sourceLineNo">1134</span> }<a name="line.1134"></a> +<span class="sourceLineNo">1135</span><a name="line.1135"></a> +<span class="sourceLineNo">1136</span> /**<a name="line.1136"></a> +<span class="sourceLineNo">1137</span> * Finalize the running hash to the output 32-bit hash by processing remaining bytes<a name="line.1137"></a> +<span class="sourceLineNo">1138</span> * and performing final mixing.<a name="line.1138"></a> +<span class="sourceLineNo">1139</span> *<a name="line.1139"></a> +<span class="sourceLineNo">1140</span> * @param hash The running hash<a name="line.1140"></a> +<span class="sourceLineNo">1141</span> * @param unprocessedLength The number of unprocessed bytes in the tail data.<a name="line.1141"></a> +<span class="sourceLineNo">1142</span> * @param unprocessed Up to 3 unprocessed bytes from input data.<a name="line.1142"></a> +<span class="sourceLineNo">1143</span> * @param totalLen The total number of input bytes added since the start.<a name="line.1143"></a> +<span class="sourceLineNo">1144</span> * @return The 32-bit hash<a name="line.1144"></a> +<span class="sourceLineNo">1145</span> */<a name="line.1145"></a> +<span class="sourceLineNo">1146</span> int finalise(final int hash, final int unprocessedLength, final byte[] unprocessed, final int totalLen) {<a name="line.1146"></a> +<span class="sourceLineNo">1147</span> int result = hash;<a name="line.1147"></a> +<span class="sourceLineNo">1148</span> int k1 = 0;<a name="line.1148"></a> +<span class="sourceLineNo">1149</span> switch (unprocessedLength) {<a name="line.1149"></a> +<span class="sourceLineNo">1150</span> case 3:<a name="line.1150"></a> +<span class="sourceLineNo">1151</span> k1 ^= (unprocessed[2] & 0xff) << 16;<a name="line.1151"></a> +<span class="sourceLineNo">1152</span> case 2:<a name="line.1152"></a> +<span class="sourceLineNo">1153</span> k1 ^= (unprocessed[1] & 0xff) << 8;<a name="line.1153"></a> +<span class="sourceLineNo">1154</span> case 1:<a name="line.1154"></a> +<span class="sourceLineNo">1155</span> k1 ^= (unprocessed[0] & 0xff);<a name="line.1155"></a> +<span class="sourceLineNo">1156</span><a name="line.1156"></a> +<span class="sourceLineNo">1157</span> // mix functions<a name="line.1157"></a> +<span class="sourceLineNo">1158</span> k1 *= C1_32;<a name="line.1158"></a> +<span class="sourceLineNo">1159</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.1159"></a> +<span class="sourceLineNo">1160</span> k1 *= C2_32;<a name="line.1160"></a> +<span class="sourceLineNo">1161</span> result ^= k1;<a name="line.1161"></a> +<span class="sourceLineNo">1162</span> }<a name="line.1162"></a> +<span class="sourceLineNo">1163</span><a name="line.1163"></a> +<span class="sourceLineNo">1164</span> // finalization<a name="line.1164"></a> +<span class="sourceLineNo">1165</span> result ^= totalLen;<a name="line.1165"></a> +<span class="sourceLineNo">1166</span> return fmix32(result);<a name="line.1166"></a> +<span class="sourceLineNo">1167</span> }<a name="line.1167"></a> +<span class="sourceLineNo">1168</span><a name="line.1168"></a> +<span class="sourceLineNo">1169</span> /**<a name="line.1169"></a> +<span class="sourceLineNo">1170</span> * Combines the bytes using an Or operation ({@code | } in a little-endian representation<a name="line.1170"></a> +<span class="sourceLineNo">1171</span> * of a 32-bit integer; byte 1 will be the least significant byte, byte 4 the most<a name="line.1171"></a> +<span class="sourceLineNo">1172</span> * significant.<a name="line.1172"></a> +<span class="sourceLineNo">1173</span> *<a name="line.1173"></a> +<span class="sourceLineNo">1174</span> * @param b1 The first byte<a name="line.1174"></a> +<span class="sourceLineNo">1175</span> * @param b2 The second byte<a name="line.1175"></a> +<span class="sourceLineNo">1176</span> * @param b3 The third byte<a name="line.1176"></a> +<span class="sourceLineNo">1177</span> * @param b4 The fourth byte<a name="line.1177"></a> +<span class="sourceLineNo">1178</span> * @return The 32-bit integer<a name="line.1178"></a> +<span class="sourceLineNo">1179</span> */<a name="line.1179"></a> +<span class="sourceLineNo">1180</span> private static int orBytes(final byte b1, final byte b2, final byte b3, final byte b4) {<a name="line.1180"></a> +<span class="sourceLineNo">1181</span> return (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16) | ((b4 & 0xff) << 24);<a name="line.1181"></a> +<span class="sourceLineNo">1182</span> }<a name="line.1182"></a> +<span class="sourceLineNo">1183</span> }<a name="line.1183"></a> +<span class="sourceLineNo">1184</span><a name="line.1184"></a> +<span class="sourceLineNo">1185</span> /**<a name="line.1185"></a> +<span class="sourceLineNo">1186</span> * Generates 32-bit hash from input bytes. Bytes can be added incrementally and the new<a name="line.1186"></a> +<span class="sourceLineNo">1187</span> * hash computed.<a name="line.1187"></a> +<span class="sourceLineNo">1188</span> *<a name="line.1188"></a> +<span class="sourceLineNo">1189</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.1189"></a> +<span class="sourceLineNo">1190</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.1190"></a> +<span class="sourceLineNo">1191</span> *<a name="line.1191"></a> +<span class="sourceLineNo">1192</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.1192"></a> +<span class="sourceLineNo">1193</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.1193"></a> +<span class="sourceLineNo">1194</span> * bytes are negative.<p><a name="line.1194"></a> +<span class="sourceLineNo">1195</span> *<a name="line.1195"></a> +<span class="sourceLineNo">1196</span> * @deprecated Use IncrementalHash32x86. This corrects the processing of trailing bytes.<a name="line.1196"></a> +<span class="sourceLineNo">1197</span> */<a name="line.1197"></a> +<span class="sourceLineNo">1198</span> @Deprecated<a name="line.1198"></a> +<span class="sourceLineNo">1199</span> public static class IncrementalHash32 extends IncrementalHash32x86 {<a name="line.1199"></a> +<span class="sourceLineNo">1200</span><a name="line.1200"></a> +<span class="sourceLineNo">1201</span> /**<a name="line.1201"></a> +<span class="sourceLineNo">1202</span> * {@inheritDoc}<a name="line.1202"></a> +<span class="sourceLineNo">1203</span> *<a name="line.1203"></a> +<span class="sourceLineNo">1204</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.1204"></a> +<span class="sourceLineNo">1205</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.1205"></a> +<span class="sourceLineNo">1206</span> * bytes are negative.<p><a name="line.1206"></a> +<span class="sourceLineNo">1207</span> *<a name="line.1207"></a> +<span class="sourceLineNo">1208</span> * @deprecated Use IncrementalHash32x86. This corrects the processing of trailing bytes.<a name="line.1208"></a> +<span class="sourceLineNo">1209</span> */<a name="line.1209"></a> +<span class="sourceLineNo">1210</span> @Override<a name="line.1210"></a> +<span class="sourceLineNo">1211</span> @Deprecated<a name="line.1211"></a> +<span class="sourceLineNo">1212</span> int finalise(final int hash, final int unprocessedLength, final byte[] unprocessed, final int totalLen) {<a name="line.1212"></a> +<span class="sourceLineNo">1213</span> int result = hash;<a name="line.1213"></a> +<span class="sourceLineNo">1214</span> // ************<a name="line.1214"></a> +<span class="sourceLineNo">1215</span> // Note: This fails to apply masking using 0xff to the 3 remaining bytes.<a name="line.1215"></a> +<span class="sourceLineNo">1216</span> // ************<a name="line.1216"></a> +<span class="sourceLineNo">1217</span> int k1 = 0;<a name="line.1217"></a> +<span class="sourceLineNo">1218</span> switch (unprocessedLength) {<a name="line.1218"></a> +<span class="sourceLineNo">1219</span> case 3:<a name="line.1219"></a> +<span class="sourceLineNo">1220</span> k1 ^= unprocessed[2] << 16;<a name="line.1220"></a> +<span class="sourceLineNo">1221</span> case 2:<a name="line.1221"></a> +<span class="sourceLineNo">1222</span> k1 ^= unprocessed[1] << 8;<a name="line.1222"></a> +<span class="sourceLineNo">1223</span> case 1:<a name="line.1223"></a> +<span class="sourceLineNo">1224</span> k1 ^= unprocessed[0];<a name="line.1224"></a> +<span class="sourceLineNo">1225</span><a name="line.1225"></a> +<span class="sourceLineNo">1226</span> // mix functions<a name="line.1226"></a> +<span class="sourceLineNo">1227</span> k1 *= C1_32;<a name="line.1227"></a> +<span class="sourceLineNo">1228</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.1228"></a> +<span class="sourceLineNo">1229</span> k1 *= C2_32;<a name="line.1229"></a> +<span class="sourceLineNo">1230</span> result ^= k1;<a name="line.1230"></a> +<span class="sourceLineNo">1231</span> }<a name="line.1231"></a> +<span class="sourceLineNo">1232</span><a name="line.1232"></a> +<span class="sourceLineNo">1233</span> // finalization<a name="line.1233"></a> +<span class="sourceLineNo">1234</span> result ^= totalLen;<a name="line.1234"></a> +<span class="sourceLineNo">1235</span> return fmix32(result);<a name="line.1235"></a> +<span class="sourceLineNo">1236</span> }<a name="line.1236"></a> +<span class="sourceLineNo">1237</span> }<a name="line.1237"></a> +<span class="sourceLineNo">1238</span>}<a name="line.1238"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash3.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash3.html new file mode 100644 index 0000000000000000000000000000000000000000..ab7c60780a967254b8c106b19d5125f44ab6763a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/MurmurHash3.html @@ -0,0 +1,1310 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.digest;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.binary.StringUtils;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>/**<a name="line.22"></a> +<span class="sourceLineNo">023</span> * Implementation of the MurmurHash3 32-bit and 128-bit hash functions.<a name="line.23"></a> +<span class="sourceLineNo">024</span> *<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. The name comes from two basic<a name="line.26"></a> +<span class="sourceLineNo">027</span> * operations, multiply (MU) and rotate (R), used in its inner loop. Unlike cryptographic hash functions, it is not<a name="line.27"></a> +<span class="sourceLineNo">028</span> * specifically designed to be difficult to reverse by an adversary, making it unsuitable for cryptographic purposes.<a name="line.28"></a> +<span class="sourceLineNo">029</span> * </p><a name="line.29"></a> +<span class="sourceLineNo">030</span> *<a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * This contains a Java port of the 32-bit hash function {@code MurmurHash3_x86_32} and the 128-bit hash function<a name="line.32"></a> +<span class="sourceLineNo">033</span> * {@code MurmurHash3_x64_128} from Austin Applyby's original {@code c++} code in SMHasher.<a name="line.33"></a> +<span class="sourceLineNo">034</span> * </p><a name="line.34"></a> +<span class="sourceLineNo">035</span> *<a name="line.35"></a> +<span class="sourceLineNo">036</span> * <p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * This is public domain code with no copyrights. From home page of<a name="line.37"></a> +<span class="sourceLineNo">038</span> * <a href="https://github.com/aappleby/smhasher">SMHasher</a>:<a name="line.38"></a> +<span class="sourceLineNo">039</span> * </p><a name="line.39"></a> +<span class="sourceLineNo">040</span> *<a name="line.40"></a> +<span class="sourceLineNo">041</span> * <blockquote> "All MurmurHash versions are public domain software, and the author disclaims all copyright to their<a name="line.41"></a> +<span class="sourceLineNo">042</span> * code." </blockquote><a name="line.42"></a> +<span class="sourceLineNo">043</span> *<a name="line.43"></a> +<span class="sourceLineNo">044</span> * <p><a name="line.44"></a> +<span class="sourceLineNo">045</span> * Original adaption from Apache Hive. That adaption contains a {@code hash64} method that is not part of the original<a name="line.45"></a> +<span class="sourceLineNo">046</span> * MurmurHash3 code. It is not recommended to use these methods. They will be removed in a future release. To obtain a<a name="line.46"></a> +<span class="sourceLineNo">047</span> * 64-bit hash use half of the bits from the {@code hash128x64} methods using the input data converted to bytes.<a name="line.47"></a> +<span class="sourceLineNo">048</span> * <p><a name="line.48"></a> +<span class="sourceLineNo">049</span> *<a name="line.49"></a> +<span class="sourceLineNo">050</span> * @see <a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a><a name="line.50"></a> +<span class="sourceLineNo">051</span> * @see <a href="https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp"> Original MurmurHash3 c++<a name="line.51"></a> +<span class="sourceLineNo">052</span> * code</a><a name="line.52"></a> +<span class="sourceLineNo">053</span> * @see <a href=<a name="line.53"></a> +<span class="sourceLineNo">054</span> * "https://github.com/apache/hive/blob/master/storage-api/src/java/org/apache/hive/common/util/Murmur3.java"><a name="line.54"></a> +<span class="sourceLineNo">055</span> * Apache Hive Murmer3</a><a name="line.55"></a> +<span class="sourceLineNo">056</span> * @since 1.13<a name="line.56"></a> +<span class="sourceLineNo">057</span> */<a name="line.57"></a> +<span class="sourceLineNo">058</span>public final class MurmurHash3 {<a name="line.58"></a> +<span class="sourceLineNo">059</span><a name="line.59"></a> +<span class="sourceLineNo">060</span> /**<a name="line.60"></a> +<span class="sourceLineNo">061</span> * A random number to use for a hash code.<a name="line.61"></a> +<span class="sourceLineNo">062</span> *<a name="line.62"></a> +<span class="sourceLineNo">063</span> * @deprecated This is not used internally and will be removed in a future release.<a name="line.63"></a> +<span class="sourceLineNo">064</span> */<a name="line.64"></a> +<span class="sourceLineNo">065</span> @Deprecated<a name="line.65"></a> +<span class="sourceLineNo">066</span> public static final long NULL_HASHCODE = 2862933555777941757L;<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> /**<a name="line.68"></a> +<span class="sourceLineNo">069</span> * A default seed to use for the murmur hash algorithm.<a name="line.69"></a> +<span class="sourceLineNo">070</span> * Has the value {@code 104729}.<a name="line.70"></a> +<span class="sourceLineNo">071</span> */<a name="line.71"></a> +<span class="sourceLineNo">072</span> public static final int DEFAULT_SEED = 104729;<a name="line.72"></a> +<span class="sourceLineNo">073</span><a name="line.73"></a> +<span class="sourceLineNo">074</span> /** TODO Replace on Java 8 with Long.BYTES. */<a name="line.74"></a> +<span class="sourceLineNo">075</span> static final int LONG_BYTES = Long.SIZE / Byte.SIZE;<a name="line.75"></a> +<span class="sourceLineNo">076</span><a name="line.76"></a> +<span class="sourceLineNo">077</span> /** TODO Replace on Java 8 with Integer.BYTES. */<a name="line.77"></a> +<span class="sourceLineNo">078</span> static final int INTEGER_BYTES = Integer.SIZE / Byte.SIZE;<a name="line.78"></a> +<span class="sourceLineNo">079</span><a name="line.79"></a> +<span class="sourceLineNo">080</span> /** TODO Replace on Java 8 with Short.BYTES. */<a name="line.80"></a> +<span class="sourceLineNo">081</span> static final int SHORT_BYTES = Short.SIZE / Byte.SIZE;<a name="line.81"></a> +<span class="sourceLineNo">082</span><a name="line.82"></a> +<span class="sourceLineNo">083</span> // Constants for 32-bit variant<a name="line.83"></a> +<span class="sourceLineNo">084</span> private static final int C1_32 = 0xcc9e2d51;<a name="line.84"></a> +<span class="sourceLineNo">085</span> private static final int C2_32 = 0x1b873593;<a name="line.85"></a> +<span class="sourceLineNo">086</span> private static final int R1_32 = 15;<a name="line.86"></a> +<span class="sourceLineNo">087</span> private static final int R2_32 = 13;<a name="line.87"></a> +<span class="sourceLineNo">088</span> private static final int M_32 = 5;<a name="line.88"></a> +<span class="sourceLineNo">089</span> private static final int N_32 = 0xe6546b64;<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> // Constants for 128-bit variant<a name="line.91"></a> +<span class="sourceLineNo">092</span> private static final long C1 = 0x87c37b91114253d5L;<a name="line.92"></a> +<span class="sourceLineNo">093</span> private static final long C2 = 0x4cf5ad432745937fL;<a name="line.93"></a> +<span class="sourceLineNo">094</span> private static final int R1 = 31;<a name="line.94"></a> +<span class="sourceLineNo">095</span> private static final int R2 = 27;<a name="line.95"></a> +<span class="sourceLineNo">096</span> private static final int R3 = 33;<a name="line.96"></a> +<span class="sourceLineNo">097</span> private static final int M = 5;<a name="line.97"></a> +<span class="sourceLineNo">098</span> private static final int N1 = 0x52dce729;<a name="line.98"></a> +<span class="sourceLineNo">099</span> private static final int N2 = 0x38495ab5;<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> /** No instance methods. */<a name="line.101"></a> +<span class="sourceLineNo">102</span> private MurmurHash3() {<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> /**<a name="line.105"></a> +<span class="sourceLineNo">106</span> * Generates 32-bit hash from two longs with a default seed value.<a name="line.106"></a> +<span class="sourceLineNo">107</span> * This is a helper method that will produce the same result as:<a name="line.107"></a> +<span class="sourceLineNo">108</span> *<a name="line.108"></a> +<span class="sourceLineNo">109</span> * <pre><a name="line.109"></a> +<span class="sourceLineNo">110</span> * int offset = 0;<a name="line.110"></a> +<span class="sourceLineNo">111</span> * int seed = 104729;<a name="line.111"></a> +<span class="sourceLineNo">112</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16)<a name="line.112"></a> +<span class="sourceLineNo">113</span> * .putLong(data1)<a name="line.113"></a> +<span class="sourceLineNo">114</span> * .putLong(data2)<a name="line.114"></a> +<span class="sourceLineNo">115</span> * .array(), offset, 16, seed);<a name="line.115"></a> +<span class="sourceLineNo">116</span> * </pre><a name="line.116"></a> +<span class="sourceLineNo">117</span> *<a name="line.117"></a> +<span class="sourceLineNo">118</span> * @param data1 The first long to hash<a name="line.118"></a> +<span class="sourceLineNo">119</span> * @param data2 The second long to hash<a name="line.119"></a> +<span class="sourceLineNo">120</span> * @return The 32-bit hash<a name="line.120"></a> +<span class="sourceLineNo">121</span> * @see #hash32x86(byte[], int, int, int)<a name="line.121"></a> +<span class="sourceLineNo">122</span> */<a name="line.122"></a> +<span class="sourceLineNo">123</span> public static int hash32(final long data1, final long data2) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> return hash32(data1, data2, DEFAULT_SEED);<a name="line.124"></a> +<span class="sourceLineNo">125</span> }<a name="line.125"></a> +<span class="sourceLineNo">126</span><a name="line.126"></a> +<span class="sourceLineNo">127</span> /**<a name="line.127"></a> +<span class="sourceLineNo">128</span> * Generates 32-bit hash from two longs with the given seed.<a name="line.128"></a> +<span class="sourceLineNo">129</span> * This is a helper method that will produce the same result as:<a name="line.129"></a> +<span class="sourceLineNo">130</span> *<a name="line.130"></a> +<span class="sourceLineNo">131</span> * <pre><a name="line.131"></a> +<span class="sourceLineNo">132</span> * int offset = 0;<a name="line.132"></a> +<span class="sourceLineNo">133</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(16)<a name="line.133"></a> +<span class="sourceLineNo">134</span> * .putLong(data1)<a name="line.134"></a> +<span class="sourceLineNo">135</span> * .putLong(data2)<a name="line.135"></a> +<span class="sourceLineNo">136</span> * .array(), offset, 16, seed);<a name="line.136"></a> +<span class="sourceLineNo">137</span> * </pre><a name="line.137"></a> +<span class="sourceLineNo">138</span> *<a name="line.138"></a> +<span class="sourceLineNo">139</span> * @param data1 The first long to hash<a name="line.139"></a> +<span class="sourceLineNo">140</span> * @param data2 The second long to hash<a name="line.140"></a> +<span class="sourceLineNo">141</span> * @param seed The initial seed value<a name="line.141"></a> +<span class="sourceLineNo">142</span> * @return The 32-bit hash<a name="line.142"></a> +<span class="sourceLineNo">143</span> * @see #hash32x86(byte[], int, int, int)<a name="line.143"></a> +<span class="sourceLineNo">144</span> */<a name="line.144"></a> +<span class="sourceLineNo">145</span> public static int hash32(final long data1, final long data2, final int seed) {<a name="line.145"></a> +<span class="sourceLineNo">146</span> int hash = seed;<a name="line.146"></a> +<span class="sourceLineNo">147</span> final long r0 = Long.reverseBytes(data1);<a name="line.147"></a> +<span class="sourceLineNo">148</span> final long r1 = Long.reverseBytes(data2);<a name="line.148"></a> +<span class="sourceLineNo">149</span><a name="line.149"></a> +<span class="sourceLineNo">150</span> hash = mix32((int) r0, hash);<a name="line.150"></a> +<span class="sourceLineNo">151</span> hash = mix32((int) (r0 >>> 32), hash);<a name="line.151"></a> +<span class="sourceLineNo">152</span> hash = mix32((int) (r1), hash);<a name="line.152"></a> +<span class="sourceLineNo">153</span> hash = mix32((int) (r1 >>> 32), hash);<a name="line.153"></a> +<span class="sourceLineNo">154</span><a name="line.154"></a> +<span class="sourceLineNo">155</span> hash ^= LONG_BYTES * 2;<a name="line.155"></a> +<span class="sourceLineNo">156</span> return fmix32(hash);<a name="line.156"></a> +<span class="sourceLineNo">157</span> }<a name="line.157"></a> +<span class="sourceLineNo">158</span><a name="line.158"></a> +<span class="sourceLineNo">159</span> /**<a name="line.159"></a> +<span class="sourceLineNo">160</span> * Generates 32-bit hash from a long with a default seed value.<a name="line.160"></a> +<span class="sourceLineNo">161</span> * This is a helper method that will produce the same result as:<a name="line.161"></a> +<span class="sourceLineNo">162</span> *<a name="line.162"></a> +<span class="sourceLineNo">163</span> * <pre><a name="line.163"></a> +<span class="sourceLineNo">164</span> * int offset = 0;<a name="line.164"></a> +<span class="sourceLineNo">165</span> * int seed = 104729;<a name="line.165"></a> +<span class="sourceLineNo">166</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8)<a name="line.166"></a> +<span class="sourceLineNo">167</span> * .putLong(data)<a name="line.167"></a> +<span class="sourceLineNo">168</span> * .array(), offset, 8, seed);<a name="line.168"></a> +<span class="sourceLineNo">169</span> * </pre><a name="line.169"></a> +<span class="sourceLineNo">170</span> *<a name="line.170"></a> +<span class="sourceLineNo">171</span> * @param data The long to hash<a name="line.171"></a> +<span class="sourceLineNo">172</span> * @return The 32-bit hash<a name="line.172"></a> +<span class="sourceLineNo">173</span> * @see #hash32x86(byte[], int, int, int)<a name="line.173"></a> +<span class="sourceLineNo">174</span> */<a name="line.174"></a> +<span class="sourceLineNo">175</span> public static int hash32(final long data) {<a name="line.175"></a> +<span class="sourceLineNo">176</span> return hash32(data, DEFAULT_SEED);<a name="line.176"></a> +<span class="sourceLineNo">177</span> }<a name="line.177"></a> +<span class="sourceLineNo">178</span><a name="line.178"></a> +<span class="sourceLineNo">179</span> /**<a name="line.179"></a> +<span class="sourceLineNo">180</span> * Generates 32-bit hash from a long with the given seed.<a name="line.180"></a> +<span class="sourceLineNo">181</span> * This is a helper method that will produce the same result as:<a name="line.181"></a> +<span class="sourceLineNo">182</span> *<a name="line.182"></a> +<span class="sourceLineNo">183</span> * <pre><a name="line.183"></a> +<span class="sourceLineNo">184</span> * int offset = 0;<a name="line.184"></a> +<span class="sourceLineNo">185</span> * int hash = MurmurHash3.hash32x86(ByteBuffer.allocate(8)<a name="line.185"></a> +<span class="sourceLineNo">186</span> * .putLong(data)<a name="line.186"></a> +<span class="sourceLineNo">187</span> * .array(), offset, 8, seed);<a name="line.187"></a> +<span class="sourceLineNo">188</span> * </pre><a name="line.188"></a> +<span class="sourceLineNo">189</span> *<a name="line.189"></a> +<span class="sourceLineNo">190</span> * @param data The long to hash<a name="line.190"></a> +<span class="sourceLineNo">191</span> * @param seed The initial seed value<a name="line.191"></a> +<span class="sourceLineNo">192</span> * @return The 32-bit hash<a name="line.192"></a> +<span class="sourceLineNo">193</span> * @see #hash32x86(byte[], int, int, int)<a name="line.193"></a> +<span class="sourceLineNo">194</span> */<a name="line.194"></a> +<span class="sourceLineNo">195</span> public static int hash32(final long data, final int seed) {<a name="line.195"></a> +<span class="sourceLineNo">196</span> int hash = seed;<a name="line.196"></a> +<span class="sourceLineNo">197</span> final long r0 = Long.reverseBytes(data);<a name="line.197"></a> +<span class="sourceLineNo">198</span><a name="line.198"></a> +<span class="sourceLineNo">199</span> hash = mix32((int) r0, hash);<a name="line.199"></a> +<span class="sourceLineNo">200</span> hash = mix32((int) (r0 >>> 32), hash);<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> hash ^= LONG_BYTES;<a name="line.202"></a> +<span class="sourceLineNo">203</span> return fmix32(hash);<a name="line.203"></a> +<span class="sourceLineNo">204</span> }<a name="line.204"></a> +<span class="sourceLineNo">205</span><a name="line.205"></a> +<span class="sourceLineNo">206</span> /**<a name="line.206"></a> +<span class="sourceLineNo">207</span> * Generates 32-bit hash from the byte array with a default seed.<a name="line.207"></a> +<span class="sourceLineNo">208</span> * This is a helper method that will produce the same result as:<a name="line.208"></a> +<span class="sourceLineNo">209</span> *<a name="line.209"></a> +<span class="sourceLineNo">210</span> * <pre><a name="line.210"></a> +<span class="sourceLineNo">211</span> * int offset = 0;<a name="line.211"></a> +<span class="sourceLineNo">212</span> * int seed = 104729;<a name="line.212"></a> +<span class="sourceLineNo">213</span> * int hash = MurmurHash3.hash32(data, offset, data.length, seed);<a name="line.213"></a> +<span class="sourceLineNo">214</span> * </pre><a name="line.214"></a> +<span class="sourceLineNo">215</span> *<a name="line.215"></a> +<span class="sourceLineNo">216</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.216"></a> +<span class="sourceLineNo">217</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.217"></a> +<span class="sourceLineNo">218</span> * bytes are negative.<p><a name="line.218"></a> +<span class="sourceLineNo">219</span> *<a name="line.219"></a> +<span class="sourceLineNo">220</span> * @param data The input byte array<a name="line.220"></a> +<span class="sourceLineNo">221</span> * @return The 32-bit hash<a name="line.221"></a> +<span class="sourceLineNo">222</span> * @see #hash32(byte[], int, int, int)<a name="line.222"></a> +<span class="sourceLineNo">223</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.223"></a> +<span class="sourceLineNo">224</span> */<a name="line.224"></a> +<span class="sourceLineNo">225</span> @Deprecated<a name="line.225"></a> +<span class="sourceLineNo">226</span> public static int hash32(final byte[] data) {<a name="line.226"></a> +<span class="sourceLineNo">227</span> return hash32(data, 0, data.length, DEFAULT_SEED);<a name="line.227"></a> +<span class="sourceLineNo">228</span> }<a name="line.228"></a> +<span class="sourceLineNo">229</span><a name="line.229"></a> +<span class="sourceLineNo">230</span> /**<a name="line.230"></a> +<span class="sourceLineNo">231</span> * Generates 32-bit hash from a string with a default seed.<a name="line.231"></a> +<span class="sourceLineNo">232</span> * <p><a name="line.232"></a> +<span class="sourceLineNo">233</span> * Before 1.14 the string was converted using default encoding.<a name="line.233"></a> +<span class="sourceLineNo">234</span> * Since 1.14 the string is converted to bytes using UTF-8 encoding.<a name="line.234"></a> +<span class="sourceLineNo">235</span> * </p><a name="line.235"></a> +<span class="sourceLineNo">236</span> * This is a helper method that will produce the same result as:<a name="line.236"></a> +<span class="sourceLineNo">237</span> *<a name="line.237"></a> +<span class="sourceLineNo">238</span> * <pre><a name="line.238"></a> +<span class="sourceLineNo">239</span> * int offset = 0;<a name="line.239"></a> +<span class="sourceLineNo">240</span> * int seed = 104729;<a name="line.240"></a> +<span class="sourceLineNo">241</span> * byte[] bytes = data.getBytes(StandardCharsets.UTF_8);<a name="line.241"></a> +<span class="sourceLineNo">242</span> * int hash = MurmurHash3.hash32(bytes, offset, bytes.length, seed);<a name="line.242"></a> +<span class="sourceLineNo">243</span> * </pre><a name="line.243"></a> +<span class="sourceLineNo">244</span> *<a name="line.244"></a> +<span class="sourceLineNo">245</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.245"></a> +<span class="sourceLineNo">246</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.246"></a> +<span class="sourceLineNo">247</span> * bytes are negative.<p><a name="line.247"></a> +<span class="sourceLineNo">248</span> *<a name="line.248"></a> +<span class="sourceLineNo">249</span> * @param data The input string<a name="line.249"></a> +<span class="sourceLineNo">250</span> * @return The 32-bit hash<a name="line.250"></a> +<span class="sourceLineNo">251</span> * @see #hash32(byte[], int, int, int)<a name="line.251"></a> +<span class="sourceLineNo">252</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)} with the bytes returned from<a name="line.252"></a> +<span class="sourceLineNo">253</span> * {@link String#getBytes(java.nio.charset.Charset)}. This corrects the processing of trailing bytes.<a name="line.253"></a> +<span class="sourceLineNo">254</span> */<a name="line.254"></a> +<span class="sourceLineNo">255</span> @Deprecated<a name="line.255"></a> +<span class="sourceLineNo">256</span> public static int hash32(final String data) {<a name="line.256"></a> +<span class="sourceLineNo">257</span> final byte[] bytes = StringUtils.getBytesUtf8(data);<a name="line.257"></a> +<span class="sourceLineNo">258</span> return hash32(bytes, 0, bytes.length, DEFAULT_SEED);<a name="line.258"></a> +<span class="sourceLineNo">259</span> }<a name="line.259"></a> +<span class="sourceLineNo">260</span><a name="line.260"></a> +<span class="sourceLineNo">261</span> /**<a name="line.261"></a> +<span class="sourceLineNo">262</span> * Generates 32-bit hash from the byte array with the given length and a default seed.<a name="line.262"></a> +<span class="sourceLineNo">263</span> * This is a helper method that will produce the same result as:<a name="line.263"></a> +<span class="sourceLineNo">264</span> *<a name="line.264"></a> +<span class="sourceLineNo">265</span> * <pre><a name="line.265"></a> +<span class="sourceLineNo">266</span> * int offset = 0;<a name="line.266"></a> +<span class="sourceLineNo">267</span> * int seed = 104729;<a name="line.267"></a> +<span class="sourceLineNo">268</span> * int hash = MurmurHash3.hash32(data, offset, length, seed);<a name="line.268"></a> +<span class="sourceLineNo">269</span> * </pre><a name="line.269"></a> +<span class="sourceLineNo">270</span> *<a name="line.270"></a> +<span class="sourceLineNo">271</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.271"></a> +<span class="sourceLineNo">272</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.272"></a> +<span class="sourceLineNo">273</span> * bytes are negative.<p><a name="line.273"></a> +<span class="sourceLineNo">274</span> *<a name="line.274"></a> +<span class="sourceLineNo">275</span> * @param data The input byte array<a name="line.275"></a> +<span class="sourceLineNo">276</span> * @param length The length of array<a name="line.276"></a> +<span class="sourceLineNo">277</span> * @return The 32-bit hash<a name="line.277"></a> +<span class="sourceLineNo">278</span> * @see #hash32(byte[], int, int, int)<a name="line.278"></a> +<span class="sourceLineNo">279</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.279"></a> +<span class="sourceLineNo">280</span> */<a name="line.280"></a> +<span class="sourceLineNo">281</span> @Deprecated<a name="line.281"></a> +<span class="sourceLineNo">282</span> public static int hash32(final byte[] data, final int length) {<a name="line.282"></a> +<span class="sourceLineNo">283</span> return hash32(data, length, DEFAULT_SEED);<a name="line.283"></a> +<span class="sourceLineNo">284</span> }<a name="line.284"></a> +<span class="sourceLineNo">285</span><a name="line.285"></a> +<span class="sourceLineNo">286</span> /**<a name="line.286"></a> +<span class="sourceLineNo">287</span> * Generates 32-bit hash from the byte array with the given length and seed. This is a<a name="line.287"></a> +<span class="sourceLineNo">288</span> * helper method that will produce the same result as:<a name="line.288"></a> +<span class="sourceLineNo">289</span> *<a name="line.289"></a> +<span class="sourceLineNo">290</span> * <pre><a name="line.290"></a> +<span class="sourceLineNo">291</span> * int offset = 0;<a name="line.291"></a> +<span class="sourceLineNo">292</span> * int hash = MurmurHash3.hash32(data, offset, length, seed);<a name="line.292"></a> +<span class="sourceLineNo">293</span> * </pre><a name="line.293"></a> +<span class="sourceLineNo">294</span> *<a name="line.294"></a> +<span class="sourceLineNo">295</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.295"></a> +<span class="sourceLineNo">296</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.296"></a> +<span class="sourceLineNo">297</span> * bytes are negative.<p><a name="line.297"></a> +<span class="sourceLineNo">298</span> *<a name="line.298"></a> +<span class="sourceLineNo">299</span> * @param data The input byte array<a name="line.299"></a> +<span class="sourceLineNo">300</span> * @param length The length of array<a name="line.300"></a> +<span class="sourceLineNo">301</span> * @param seed The initial seed value<a name="line.301"></a> +<span class="sourceLineNo">302</span> * @return The 32-bit hash<a name="line.302"></a> +<span class="sourceLineNo">303</span> * @see #hash32(byte[], int, int, int)<a name="line.303"></a> +<span class="sourceLineNo">304</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.304"></a> +<span class="sourceLineNo">305</span> */<a name="line.305"></a> +<span class="sourceLineNo">306</span> @Deprecated<a name="line.306"></a> +<span class="sourceLineNo">307</span> public static int hash32(final byte[] data, final int length, final int seed) {<a name="line.307"></a> +<span class="sourceLineNo">308</span> return hash32(data, 0, length, seed);<a name="line.308"></a> +<span class="sourceLineNo">309</span> }<a name="line.309"></a> +<span class="sourceLineNo">310</span><a name="line.310"></a> +<span class="sourceLineNo">311</span> /**<a name="line.311"></a> +<span class="sourceLineNo">312</span> * Generates 32-bit hash from the byte array with the given offset, length and seed.<a name="line.312"></a> +<span class="sourceLineNo">313</span> *<a name="line.313"></a> +<span class="sourceLineNo">314</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.314"></a> +<span class="sourceLineNo">315</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.315"></a> +<span class="sourceLineNo">316</span> *<a name="line.316"></a> +<span class="sourceLineNo">317</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.317"></a> +<span class="sourceLineNo">318</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.318"></a> +<span class="sourceLineNo">319</span> * bytes are negative.<p><a name="line.319"></a> +<span class="sourceLineNo">320</span> *<a name="line.320"></a> +<span class="sourceLineNo">321</span> * @param data The input byte array<a name="line.321"></a> +<span class="sourceLineNo">322</span> * @param offset The offset of data<a name="line.322"></a> +<span class="sourceLineNo">323</span> * @param length The length of array<a name="line.323"></a> +<span class="sourceLineNo">324</span> * @param seed The initial seed value<a name="line.324"></a> +<span class="sourceLineNo">325</span> * @return The 32-bit hash<a name="line.325"></a> +<span class="sourceLineNo">326</span> * @deprecated Use {@link #hash32x86(byte[], int, int, int)}. This corrects the processing of trailing bytes.<a name="line.326"></a> +<span class="sourceLineNo">327</span> */<a name="line.327"></a> +<span class="sourceLineNo">328</span> @Deprecated<a name="line.328"></a> +<span class="sourceLineNo">329</span> public static int hash32(final byte[] data, final int offset, final int length, final int seed) {<a name="line.329"></a> +<span class="sourceLineNo">330</span> int hash = seed;<a name="line.330"></a> +<span class="sourceLineNo">331</span> final int nblocks = length >> 2;<a name="line.331"></a> +<span class="sourceLineNo">332</span><a name="line.332"></a> +<span class="sourceLineNo">333</span> // body<a name="line.333"></a> +<span class="sourceLineNo">334</span> for (int i = 0; i < nblocks; i++) {<a name="line.334"></a> +<span class="sourceLineNo">335</span> final int index = offset + (i << 2);<a name="line.335"></a> +<span class="sourceLineNo">336</span> final int k = getLittleEndianInt(data, index);<a name="line.336"></a> +<span class="sourceLineNo">337</span> hash = mix32(k, hash);<a name="line.337"></a> +<span class="sourceLineNo">338</span> }<a name="line.338"></a> +<span class="sourceLineNo">339</span><a name="line.339"></a> +<span class="sourceLineNo">340</span> // tail<a name="line.340"></a> +<span class="sourceLineNo">341</span> // ************<a name="line.341"></a> +<span class="sourceLineNo">342</span> // Note: This fails to apply masking using 0xff to the 3 remaining bytes.<a name="line.342"></a> +<span class="sourceLineNo">343</span> // ************<a name="line.343"></a> +<span class="sourceLineNo">344</span> final int index = offset + (nblocks << 2);<a name="line.344"></a> +<span class="sourceLineNo">345</span> int k1 = 0;<a name="line.345"></a> +<span class="sourceLineNo">346</span> switch (offset + length - index) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> case 3:<a name="line.347"></a> +<span class="sourceLineNo">348</span> k1 ^= data[index + 2] << 16;<a name="line.348"></a> +<span class="sourceLineNo">349</span> case 2:<a name="line.349"></a> +<span class="sourceLineNo">350</span> k1 ^= data[index + 1] << 8;<a name="line.350"></a> +<span class="sourceLineNo">351</span> case 1:<a name="line.351"></a> +<span class="sourceLineNo">352</span> k1 ^= data[index];<a name="line.352"></a> +<span class="sourceLineNo">353</span><a name="line.353"></a> +<span class="sourceLineNo">354</span> // mix functions<a name="line.354"></a> +<span class="sourceLineNo">355</span> k1 *= C1_32;<a name="line.355"></a> +<span class="sourceLineNo">356</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.356"></a> +<span class="sourceLineNo">357</span> k1 *= C2_32;<a name="line.357"></a> +<span class="sourceLineNo">358</span> hash ^= k1;<a name="line.358"></a> +<span class="sourceLineNo">359</span> }<a name="line.359"></a> +<span class="sourceLineNo">360</span><a name="line.360"></a> +<span class="sourceLineNo">361</span> hash ^= length;<a name="line.361"></a> +<span class="sourceLineNo">362</span> return fmix32(hash);<a name="line.362"></a> +<span class="sourceLineNo">363</span> }<a name="line.363"></a> +<span class="sourceLineNo">364</span><a name="line.364"></a> +<span class="sourceLineNo">365</span> /**<a name="line.365"></a> +<span class="sourceLineNo">366</span> * Generates 32-bit hash from the byte array with a seed of zero.<a name="line.366"></a> +<span class="sourceLineNo">367</span> * This is a helper method that will produce the same result as:<a name="line.367"></a> +<span class="sourceLineNo">368</span> *<a name="line.368"></a> +<span class="sourceLineNo">369</span> * <pre><a name="line.369"></a> +<span class="sourceLineNo">370</span> * int offset = 0;<a name="line.370"></a> +<span class="sourceLineNo">371</span> * int seed = 0;<a name="line.371"></a> +<span class="sourceLineNo">372</span> * int hash = MurmurHash3.hash32x86(data, offset, data.length, seed);<a name="line.372"></a> +<span class="sourceLineNo">373</span> * </pre><a name="line.373"></a> +<span class="sourceLineNo">374</span> *<a name="line.374"></a> +<span class="sourceLineNo">375</span> * @param data The input byte array<a name="line.375"></a> +<span class="sourceLineNo">376</span> * @return The 32-bit hash<a name="line.376"></a> +<span class="sourceLineNo">377</span> * @see #hash32x86(byte[], int, int, int)<a name="line.377"></a> +<span class="sourceLineNo">378</span> * @since 1.14<a name="line.378"></a> +<span class="sourceLineNo">379</span> */<a name="line.379"></a> +<span class="sourceLineNo">380</span> public static int hash32x86(final byte[] data) {<a name="line.380"></a> +<span class="sourceLineNo">381</span> return hash32x86(data, 0, data.length, 0);<a name="line.381"></a> +<span class="sourceLineNo">382</span> }<a name="line.382"></a> +<span class="sourceLineNo">383</span><a name="line.383"></a> +<span class="sourceLineNo">384</span> /**<a name="line.384"></a> +<span class="sourceLineNo">385</span> * Generates 32-bit hash from the byte array with the given offset, length and seed.<a name="line.385"></a> +<span class="sourceLineNo">386</span> *<a name="line.386"></a> +<span class="sourceLineNo">387</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.387"></a> +<span class="sourceLineNo">388</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.388"></a> +<span class="sourceLineNo">389</span> *<a name="line.389"></a> +<span class="sourceLineNo">390</span> * @param data The input byte array<a name="line.390"></a> +<span class="sourceLineNo">391</span> * @param offset The offset of data<a name="line.391"></a> +<span class="sourceLineNo">392</span> * @param length The length of array<a name="line.392"></a> +<span class="sourceLineNo">393</span> * @param seed The initial seed value<a name="line.393"></a> +<span class="sourceLineNo">394</span> * @return The 32-bit hash<a name="line.394"></a> +<span class="sourceLineNo">395</span> * @since 1.14<a name="line.395"></a> +<span class="sourceLineNo">396</span> */<a name="line.396"></a> +<span class="sourceLineNo">397</span> public static int hash32x86(final byte[] data, final int offset, final int length, final int seed) {<a name="line.397"></a> +<span class="sourceLineNo">398</span> int hash = seed;<a name="line.398"></a> +<span class="sourceLineNo">399</span> final int nblocks = length >> 2;<a name="line.399"></a> +<span class="sourceLineNo">400</span><a name="line.400"></a> +<span class="sourceLineNo">401</span> // body<a name="line.401"></a> +<span class="sourceLineNo">402</span> for (int i = 0; i < nblocks; i++) {<a name="line.402"></a> +<span class="sourceLineNo">403</span> final int index = offset + (i << 2);<a name="line.403"></a> +<span class="sourceLineNo">404</span> final int k = getLittleEndianInt(data, index);<a name="line.404"></a> +<span class="sourceLineNo">405</span> hash = mix32(k, hash);<a name="line.405"></a> +<span class="sourceLineNo">406</span> }<a name="line.406"></a> +<span class="sourceLineNo">407</span><a name="line.407"></a> +<span class="sourceLineNo">408</span> // tail<a name="line.408"></a> +<span class="sourceLineNo">409</span> final int index = offset + (nblocks << 2);<a name="line.409"></a> +<span class="sourceLineNo">410</span> int k1 = 0;<a name="line.410"></a> +<span class="sourceLineNo">411</span> switch (offset + length - index) {<a name="line.411"></a> +<span class="sourceLineNo">412</span> case 3:<a name="line.412"></a> +<span class="sourceLineNo">413</span> k1 ^= (data[index + 2] & 0xff) << 16;<a name="line.413"></a> +<span class="sourceLineNo">414</span> case 2:<a name="line.414"></a> +<span class="sourceLineNo">415</span> k1 ^= (data[index + 1] & 0xff) << 8;<a name="line.415"></a> +<span class="sourceLineNo">416</span> case 1:<a name="line.416"></a> +<span class="sourceLineNo">417</span> k1 ^= (data[index] & 0xff);<a name="line.417"></a> +<span class="sourceLineNo">418</span><a name="line.418"></a> +<span class="sourceLineNo">419</span> // mix functions<a name="line.419"></a> +<span class="sourceLineNo">420</span> k1 *= C1_32;<a name="line.420"></a> +<span class="sourceLineNo">421</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.421"></a> +<span class="sourceLineNo">422</span> k1 *= C2_32;<a name="line.422"></a> +<span class="sourceLineNo">423</span> hash ^= k1;<a name="line.423"></a> +<span class="sourceLineNo">424</span> }<a name="line.424"></a> +<span class="sourceLineNo">425</span><a name="line.425"></a> +<span class="sourceLineNo">426</span> hash ^= length;<a name="line.426"></a> +<span class="sourceLineNo">427</span> return fmix32(hash);<a name="line.427"></a> +<span class="sourceLineNo">428</span> }<a name="line.428"></a> +<span class="sourceLineNo">429</span><a name="line.429"></a> +<span class="sourceLineNo">430</span> /**<a name="line.430"></a> +<span class="sourceLineNo">431</span> * Generates 64-bit hash from a long with a default seed.<a name="line.431"></a> +<span class="sourceLineNo">432</span> *<a name="line.432"></a> +<span class="sourceLineNo">433</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.433"></a> +<span class="sourceLineNo">434</span> *<a name="line.434"></a> +<span class="sourceLineNo">435</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.435"></a> +<span class="sourceLineNo">436</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.436"></a> +<span class="sourceLineNo">437</span> * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code long}.<a name="line.437"></a> +<span class="sourceLineNo">438</span> * This method will be removed in a future release.</p><a name="line.438"></a> +<span class="sourceLineNo">439</span> *<a name="line.439"></a> +<span class="sourceLineNo">440</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.440"></a> +<span class="sourceLineNo">441</span> * this result as the default seed is positive.</p><a name="line.441"></a> +<span class="sourceLineNo">442</span> *<a name="line.442"></a> +<span class="sourceLineNo">443</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.443"></a> +<span class="sourceLineNo">444</span> *<a name="line.444"></a> +<span class="sourceLineNo">445</span> * <pre><a name="line.445"></a> +<span class="sourceLineNo">446</span> * int offset = 0;<a name="line.446"></a> +<span class="sourceLineNo">447</span> * int seed = 104729;<a name="line.447"></a> +<span class="sourceLineNo">448</span> * long hash = MurmurHash3.hash64(ByteBuffer.allocate(8)<a name="line.448"></a> +<span class="sourceLineNo">449</span> * .putLong(data)<a name="line.449"></a> +<span class="sourceLineNo">450</span> * .array(), offset, 8, seed);<a name="line.450"></a> +<span class="sourceLineNo">451</span> * </pre><a name="line.451"></a> +<span class="sourceLineNo">452</span> *<a name="line.452"></a> +<span class="sourceLineNo">453</span> * @param data The long to hash<a name="line.453"></a> +<span class="sourceLineNo">454</span> * @return The 64-bit hash<a name="line.454"></a> +<span class="sourceLineNo">455</span> * @see #hash64(byte[], int, int, int)<a name="line.455"></a> +<span class="sourceLineNo">456</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.456"></a> +<span class="sourceLineNo">457</span> * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code long}.<a name="line.457"></a> +<span class="sourceLineNo">458</span> */<a name="line.458"></a> +<span class="sourceLineNo">459</span> @Deprecated<a name="line.459"></a> +<span class="sourceLineNo">460</span> public static long hash64(final long data) {<a name="line.460"></a> +<span class="sourceLineNo">461</span> long hash = DEFAULT_SEED;<a name="line.461"></a> +<span class="sourceLineNo">462</span> long k = Long.reverseBytes(data);<a name="line.462"></a> +<span class="sourceLineNo">463</span> final int length = LONG_BYTES;<a name="line.463"></a> +<span class="sourceLineNo">464</span> // mix functions<a name="line.464"></a> +<span class="sourceLineNo">465</span> k *= C1;<a name="line.465"></a> +<span class="sourceLineNo">466</span> k = Long.rotateLeft(k, R1);<a name="line.466"></a> +<span class="sourceLineNo">467</span> k *= C2;<a name="line.467"></a> +<span class="sourceLineNo">468</span> hash ^= k;<a name="line.468"></a> +<span class="sourceLineNo">469</span> hash = Long.rotateLeft(hash, R2) * M + N1;<a name="line.469"></a> +<span class="sourceLineNo">470</span> // finalization<a name="line.470"></a> +<span class="sourceLineNo">471</span> hash ^= length;<a name="line.471"></a> +<span class="sourceLineNo">472</span> hash = fmix64(hash);<a name="line.472"></a> +<span class="sourceLineNo">473</span> return hash;<a name="line.473"></a> +<span class="sourceLineNo">474</span> }<a name="line.474"></a> +<span class="sourceLineNo">475</span><a name="line.475"></a> +<span class="sourceLineNo">476</span> /**<a name="line.476"></a> +<span class="sourceLineNo">477</span> * Generates 64-bit hash from an int with a default seed.<a name="line.477"></a> +<span class="sourceLineNo">478</span> *<a name="line.478"></a> +<span class="sourceLineNo">479</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.479"></a> +<span class="sourceLineNo">480</span> *<a name="line.480"></a> +<span class="sourceLineNo">481</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.481"></a> +<span class="sourceLineNo">482</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.482"></a> +<span class="sourceLineNo">483</span> * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code int}.<a name="line.483"></a> +<span class="sourceLineNo">484</span> * This method will be removed in a future release.</p><a name="line.484"></a> +<span class="sourceLineNo">485</span> *<a name="line.485"></a> +<span class="sourceLineNo">486</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.486"></a> +<span class="sourceLineNo">487</span> * this result as the default seed is positive.</p><a name="line.487"></a> +<span class="sourceLineNo">488</span> *<a name="line.488"></a> +<span class="sourceLineNo">489</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.489"></a> +<span class="sourceLineNo">490</span> *<a name="line.490"></a> +<span class="sourceLineNo">491</span> * <pre><a name="line.491"></a> +<span class="sourceLineNo">492</span> * int offset = 0;<a name="line.492"></a> +<span class="sourceLineNo">493</span> * int seed = 104729;<a name="line.493"></a> +<span class="sourceLineNo">494</span> * long hash = MurmurHash3.hash64(ByteBuffer.allocate(4)<a name="line.494"></a> +<span class="sourceLineNo">495</span> * .putInt(data)<a name="line.495"></a> +<span class="sourceLineNo">496</span> * .array(), offset, 4, seed);<a name="line.496"></a> +<span class="sourceLineNo">497</span> * </pre><a name="line.497"></a> +<span class="sourceLineNo">498</span> *<a name="line.498"></a> +<span class="sourceLineNo">499</span> * @param data The int to hash<a name="line.499"></a> +<span class="sourceLineNo">500</span> * @return The 64-bit hash<a name="line.500"></a> +<span class="sourceLineNo">501</span> * @see #hash64(byte[], int, int, int)<a name="line.501"></a> +<span class="sourceLineNo">502</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.502"></a> +<span class="sourceLineNo">503</span> * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code int}.<a name="line.503"></a> +<span class="sourceLineNo">504</span> */<a name="line.504"></a> +<span class="sourceLineNo">505</span> @Deprecated<a name="line.505"></a> +<span class="sourceLineNo">506</span> public static long hash64(final int data) {<a name="line.506"></a> +<span class="sourceLineNo">507</span> long k1 = Integer.reverseBytes(data) & (-1L >>> 32);<a name="line.507"></a> +<span class="sourceLineNo">508</span> final int length = INTEGER_BYTES;<a name="line.508"></a> +<span class="sourceLineNo">509</span> long hash = DEFAULT_SEED;<a name="line.509"></a> +<span class="sourceLineNo">510</span> k1 *= C1;<a name="line.510"></a> +<span class="sourceLineNo">511</span> k1 = Long.rotateLeft(k1, R1);<a name="line.511"></a> +<span class="sourceLineNo">512</span> k1 *= C2;<a name="line.512"></a> +<span class="sourceLineNo">513</span> hash ^= k1;<a name="line.513"></a> +<span class="sourceLineNo">514</span> // finalization<a name="line.514"></a> +<span class="sourceLineNo">515</span> hash ^= length;<a name="line.515"></a> +<span class="sourceLineNo">516</span> hash = fmix64(hash);<a name="line.516"></a> +<span class="sourceLineNo">517</span> return hash;<a name="line.517"></a> +<span class="sourceLineNo">518</span> }<a name="line.518"></a> +<span class="sourceLineNo">519</span><a name="line.519"></a> +<span class="sourceLineNo">520</span> /**<a name="line.520"></a> +<span class="sourceLineNo">521</span> * Generates 64-bit hash from a short with a default seed.<a name="line.521"></a> +<span class="sourceLineNo">522</span> *<a name="line.522"></a> +<span class="sourceLineNo">523</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.523"></a> +<span class="sourceLineNo">524</span> *<a name="line.524"></a> +<span class="sourceLineNo">525</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.525"></a> +<span class="sourceLineNo">526</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.526"></a> +<span class="sourceLineNo">527</span> * {@linkplain #hash128x64(byte[])} with the same byte data from the {@code short}.<a name="line.527"></a> +<span class="sourceLineNo">528</span> * This method will be removed in a future release.</p><a name="line.528"></a> +<span class="sourceLineNo">529</span> *<a name="line.529"></a> +<span class="sourceLineNo">530</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.530"></a> +<span class="sourceLineNo">531</span> * this result as the default seed is positive.</p><a name="line.531"></a> +<span class="sourceLineNo">532</span> *<a name="line.532"></a> +<span class="sourceLineNo">533</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.533"></a> +<span class="sourceLineNo">534</span> *<a name="line.534"></a> +<span class="sourceLineNo">535</span> * <pre><a name="line.535"></a> +<span class="sourceLineNo">536</span> * int offset = 0;<a name="line.536"></a> +<span class="sourceLineNo">537</span> * int seed = 104729;<a name="line.537"></a> +<span class="sourceLineNo">538</span> * long hash = MurmurHash3.hash64(ByteBuffer.allocate(2)<a name="line.538"></a> +<span class="sourceLineNo">539</span> * .putShort(data)<a name="line.539"></a> +<span class="sourceLineNo">540</span> * .array(), offset, 2, seed);<a name="line.540"></a> +<span class="sourceLineNo">541</span> * </pre><a name="line.541"></a> +<span class="sourceLineNo">542</span> *<a name="line.542"></a> +<span class="sourceLineNo">543</span> * @param data The short to hash<a name="line.543"></a> +<span class="sourceLineNo">544</span> * @return The 64-bit hash<a name="line.544"></a> +<span class="sourceLineNo">545</span> * @see #hash64(byte[], int, int, int)<a name="line.545"></a> +<span class="sourceLineNo">546</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.546"></a> +<span class="sourceLineNo">547</span> * Use half of the hash bytes from {@link #hash128x64(byte[])} with the bytes from the {@code short}.<a name="line.547"></a> +<span class="sourceLineNo">548</span> */<a name="line.548"></a> +<span class="sourceLineNo">549</span> @Deprecated<a name="line.549"></a> +<span class="sourceLineNo">550</span> public static long hash64(final short data) {<a name="line.550"></a> +<span class="sourceLineNo">551</span> long hash = DEFAULT_SEED;<a name="line.551"></a> +<span class="sourceLineNo">552</span> long k1 = 0;<a name="line.552"></a> +<span class="sourceLineNo">553</span> k1 ^= ((long) data & 0xff) << 8;<a name="line.553"></a> +<span class="sourceLineNo">554</span> k1 ^= ((long) ((data & 0xFF00) >> 8) & 0xff);<a name="line.554"></a> +<span class="sourceLineNo">555</span> k1 *= C1;<a name="line.555"></a> +<span class="sourceLineNo">556</span> k1 = Long.rotateLeft(k1, R1);<a name="line.556"></a> +<span class="sourceLineNo">557</span> k1 *= C2;<a name="line.557"></a> +<span class="sourceLineNo">558</span> hash ^= k1;<a name="line.558"></a> +<span class="sourceLineNo">559</span><a name="line.559"></a> +<span class="sourceLineNo">560</span> // finalization<a name="line.560"></a> +<span class="sourceLineNo">561</span> hash ^= SHORT_BYTES;<a name="line.561"></a> +<span class="sourceLineNo">562</span> hash = fmix64(hash);<a name="line.562"></a> +<span class="sourceLineNo">563</span> return hash;<a name="line.563"></a> +<span class="sourceLineNo">564</span> }<a name="line.564"></a> +<span class="sourceLineNo">565</span><a name="line.565"></a> +<span class="sourceLineNo">566</span> /**<a name="line.566"></a> +<span class="sourceLineNo">567</span> * Generates 64-bit hash from a byte array with a default seed.<a name="line.567"></a> +<span class="sourceLineNo">568</span> *<a name="line.568"></a> +<span class="sourceLineNo">569</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.569"></a> +<span class="sourceLineNo">570</span> *<a name="line.570"></a> +<span class="sourceLineNo">571</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.571"></a> +<span class="sourceLineNo">572</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.572"></a> +<span class="sourceLineNo">573</span> * {@linkplain #hash128x64(byte[])} with the same byte data.<a name="line.573"></a> +<span class="sourceLineNo">574</span> * This method will be removed in a future release.</p><a name="line.574"></a> +<span class="sourceLineNo">575</span> *<a name="line.575"></a> +<span class="sourceLineNo">576</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.576"></a> +<span class="sourceLineNo">577</span> * this result as the default seed is positive.</p><a name="line.577"></a> +<span class="sourceLineNo">578</span> *<a name="line.578"></a> +<span class="sourceLineNo">579</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.579"></a> +<span class="sourceLineNo">580</span> *<a name="line.580"></a> +<span class="sourceLineNo">581</span> * <pre><a name="line.581"></a> +<span class="sourceLineNo">582</span> * int offset = 0;<a name="line.582"></a> +<span class="sourceLineNo">583</span> * int seed = 104729;<a name="line.583"></a> +<span class="sourceLineNo">584</span> * long hash = MurmurHash3.hash64(data, offset, data.length, seed);<a name="line.584"></a> +<span class="sourceLineNo">585</span> * </pre><a name="line.585"></a> +<span class="sourceLineNo">586</span> *<a name="line.586"></a> +<span class="sourceLineNo">587</span> * @param data The input byte array<a name="line.587"></a> +<span class="sourceLineNo">588</span> * @return The 64-bit hash<a name="line.588"></a> +<span class="sourceLineNo">589</span> * @see #hash64(byte[], int, int, int)<a name="line.589"></a> +<span class="sourceLineNo">590</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.590"></a> +<span class="sourceLineNo">591</span> * Use half of the hash bytes from {@link #hash128x64(byte[])}.<a name="line.591"></a> +<span class="sourceLineNo">592</span> */<a name="line.592"></a> +<span class="sourceLineNo">593</span> @Deprecated<a name="line.593"></a> +<span class="sourceLineNo">594</span> public static long hash64(final byte[] data) {<a name="line.594"></a> +<span class="sourceLineNo">595</span> return hash64(data, 0, data.length, DEFAULT_SEED);<a name="line.595"></a> +<span class="sourceLineNo">596</span> }<a name="line.596"></a> +<span class="sourceLineNo">597</span><a name="line.597"></a> +<span class="sourceLineNo">598</span> /**<a name="line.598"></a> +<span class="sourceLineNo">599</span> * Generates 64-bit hash from a byte array with the given offset and length and a default seed.<a name="line.599"></a> +<span class="sourceLineNo">600</span> *<a name="line.600"></a> +<span class="sourceLineNo">601</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.601"></a> +<span class="sourceLineNo">602</span> *<a name="line.602"></a> +<span class="sourceLineNo">603</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.603"></a> +<span class="sourceLineNo">604</span> * The method does not produce the same result as either half of the hash bytes from<a name="line.604"></a> +<span class="sourceLineNo">605</span> * {@linkplain #hash128x64(byte[])} with the same byte data.<a name="line.605"></a> +<span class="sourceLineNo">606</span> * This method will be removed in a future release.</p><a name="line.606"></a> +<span class="sourceLineNo">607</span> *<a name="line.607"></a> +<span class="sourceLineNo">608</span> * <p>Note: The sign extension bug in {@link #hash64(byte[], int, int, int)} does not effect<a name="line.608"></a> +<span class="sourceLineNo">609</span> * this result as the default seed is positive.</p><a name="line.609"></a> +<span class="sourceLineNo">610</span> *<a name="line.610"></a> +<span class="sourceLineNo">611</span> * <p>This is a helper method that will produce the same result as:</p><a name="line.611"></a> +<span class="sourceLineNo">612</span> *<a name="line.612"></a> +<span class="sourceLineNo">613</span> * <pre><a name="line.613"></a> +<span class="sourceLineNo">614</span> * int seed = 104729;<a name="line.614"></a> +<span class="sourceLineNo">615</span> * long hash = MurmurHash3.hash64(data, offset, length, seed);<a name="line.615"></a> +<span class="sourceLineNo">616</span> * </pre><a name="line.616"></a> +<span class="sourceLineNo">617</span> *<a name="line.617"></a> +<span class="sourceLineNo">618</span> * @param data The input byte array<a name="line.618"></a> +<span class="sourceLineNo">619</span> * @param offset The offset of data<a name="line.619"></a> +<span class="sourceLineNo">620</span> * @param length The length of array<a name="line.620"></a> +<span class="sourceLineNo">621</span> * @return The 64-bit hash<a name="line.621"></a> +<span class="sourceLineNo">622</span> * @see #hash64(byte[], int, int, int)<a name="line.622"></a> +<span class="sourceLineNo">623</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.623"></a> +<span class="sourceLineNo">624</span> * Use half of the hash bytes from {@link #hash128x64(byte[], int, int, int)}.<a name="line.624"></a> +<span class="sourceLineNo">625</span> */<a name="line.625"></a> +<span class="sourceLineNo">626</span> @Deprecated<a name="line.626"></a> +<span class="sourceLineNo">627</span> public static long hash64(final byte[] data, final int offset, final int length) {<a name="line.627"></a> +<span class="sourceLineNo">628</span> return hash64(data, offset, length, DEFAULT_SEED);<a name="line.628"></a> +<span class="sourceLineNo">629</span> }<a name="line.629"></a> +<span class="sourceLineNo">630</span><a name="line.630"></a> +<span class="sourceLineNo">631</span> /**<a name="line.631"></a> +<span class="sourceLineNo">632</span> * Generates 64-bit hash from a byte array with the given offset, length and seed.<a name="line.632"></a> +<span class="sourceLineNo">633</span> *<a name="line.633"></a> +<span class="sourceLineNo">634</span> * <p><strong>This is not part of the original MurmurHash3 {@code c++} implementation.</strong></p><a name="line.634"></a> +<span class="sourceLineNo">635</span> *<a name="line.635"></a> +<span class="sourceLineNo">636</span> * <p>This is a Murmur3-like 64-bit variant.<a name="line.636"></a> +<span class="sourceLineNo">637</span> * This method will be removed in a future release.</p><a name="line.637"></a> +<span class="sourceLineNo">638</span> *<a name="line.638"></a> +<span class="sourceLineNo">639</span> * <p>This implementation contains a sign-extension bug in the seed initialization.<a name="line.639"></a> +<span class="sourceLineNo">640</span> * This manifests if the seed is negative.</p><a name="line.640"></a> +<span class="sourceLineNo">641</span> *<a name="line.641"></a> +<span class="sourceLineNo">642</span> * <p>This algorithm processes 8 bytes chunks of data in a manner similar to the 16 byte chunks<a name="line.642"></a> +<span class="sourceLineNo">643</span> * of data processed in the MurmurHash3 {@code MurmurHash3_x64_128} method. However the hash<a name="line.643"></a> +<span class="sourceLineNo">644</span> * is not mixed with a hash chunk from the next 8 bytes of data. The method will not return<a name="line.644"></a> +<span class="sourceLineNo">645</span> * the same value as the first or second 64-bits of the function<a name="line.645"></a> +<span class="sourceLineNo">646</span> * {@link #hash128(byte[], int, int, int)}.</p><a name="line.646"></a> +<span class="sourceLineNo">647</span> *<a name="line.647"></a> +<span class="sourceLineNo">648</span> * <p>Use of this method is not advised. Use the first long returned from<a name="line.648"></a> +<span class="sourceLineNo">649</span> * {@link #hash128x64(byte[], int, int, int)}.<p><a name="line.649"></a> +<span class="sourceLineNo">650</span> *<a name="line.650"></a> +<span class="sourceLineNo">651</span> * @param data The input byte array<a name="line.651"></a> +<span class="sourceLineNo">652</span> * @param offset The offset of data<a name="line.652"></a> +<span class="sourceLineNo">653</span> * @param length The length of array<a name="line.653"></a> +<span class="sourceLineNo">654</span> * @param seed The initial seed value<a name="line.654"></a> +<span class="sourceLineNo">655</span> * @return The 64-bit hash<a name="line.655"></a> +<span class="sourceLineNo">656</span> * @deprecated Not part of the MurmurHash3 implementation.<a name="line.656"></a> +<span class="sourceLineNo">657</span> * Use half of the hash bytes from {@link #hash128x64(byte[], int, int, int)}.<a name="line.657"></a> +<span class="sourceLineNo">658</span> */<a name="line.658"></a> +<span class="sourceLineNo">659</span> @Deprecated<a name="line.659"></a> +<span class="sourceLineNo">660</span> public static long hash64(final byte[] data, final int offset, final int length, final int seed) {<a name="line.660"></a> +<span class="sourceLineNo">661</span> // ************<a name="line.661"></a> +<span class="sourceLineNo">662</span> // Note: This fails to apply masking using 0xffffffffL to the seed.<a name="line.662"></a> +<span class="sourceLineNo">663</span> // ************<a name="line.663"></a> +<span class="sourceLineNo">664</span> long hash = seed;<a name="line.664"></a> +<span class="sourceLineNo">665</span> final int nblocks = length >> 3;<a name="line.665"></a> +<span class="sourceLineNo">666</span><a name="line.666"></a> +<span class="sourceLineNo">667</span> // body<a name="line.667"></a> +<span class="sourceLineNo">668</span> for (int i = 0; i < nblocks; i++) {<a name="line.668"></a> +<span class="sourceLineNo">669</span> final int index = offset + (i << 3);<a name="line.669"></a> +<span class="sourceLineNo">670</span> long k = getLittleEndianLong(data, index);<a name="line.670"></a> +<span class="sourceLineNo">671</span><a name="line.671"></a> +<span class="sourceLineNo">672</span> // mix functions<a name="line.672"></a> +<span class="sourceLineNo">673</span> k *= C1;<a name="line.673"></a> +<span class="sourceLineNo">674</span> k = Long.rotateLeft(k, R1);<a name="line.674"></a> +<span class="sourceLineNo">675</span> k *= C2;<a name="line.675"></a> +<span class="sourceLineNo">676</span> hash ^= k;<a name="line.676"></a> +<span class="sourceLineNo">677</span> hash = Long.rotateLeft(hash, R2) * M + N1;<a name="line.677"></a> +<span class="sourceLineNo">678</span> }<a name="line.678"></a> +<span class="sourceLineNo">679</span><a name="line.679"></a> +<span class="sourceLineNo">680</span> // tail<a name="line.680"></a> +<span class="sourceLineNo">681</span> long k1 = 0;<a name="line.681"></a> +<span class="sourceLineNo">682</span> final int index = offset + (nblocks << 3);<a name="line.682"></a> +<span class="sourceLineNo">683</span> switch (offset + length - index) {<a name="line.683"></a> +<span class="sourceLineNo">684</span> case 7:<a name="line.684"></a> +<span class="sourceLineNo">685</span> k1 ^= ((long) data[index + 6] & 0xff) << 48;<a name="line.685"></a> +<span class="sourceLineNo">686</span> case 6:<a name="line.686"></a> +<span class="sourceLineNo">687</span> k1 ^= ((long) data[index + 5] & 0xff) << 40;<a name="line.687"></a> +<span class="sourceLineNo">688</span> case 5:<a name="line.688"></a> +<span class="sourceLineNo">689</span> k1 ^= ((long) data[index + 4] & 0xff) << 32;<a name="line.689"></a> +<span class="sourceLineNo">690</span> case 4:<a name="line.690"></a> +<span class="sourceLineNo">691</span> k1 ^= ((long) data[index + 3] & 0xff) << 24;<a name="line.691"></a> +<span class="sourceLineNo">692</span> case 3:<a name="line.692"></a> +<span class="sourceLineNo">693</span> k1 ^= ((long) data[index + 2] & 0xff) << 16;<a name="line.693"></a> +<span class="sourceLineNo">694</span> case 2:<a name="line.694"></a> +<span class="sourceLineNo">695</span> k1 ^= ((long) data[index + 1] & 0xff) << 8;<a name="line.695"></a> +<span class="sourceLineNo">696</span> case 1:<a name="line.696"></a> +<span class="sourceLineNo">697</span> k1 ^= ((long) data[index] & 0xff);<a name="line.697"></a> +<span class="sourceLineNo">698</span> k1 *= C1;<a name="line.698"></a> +<span class="sourceLineNo">699</span> k1 = Long.rotateLeft(k1, R1);<a name="line.699"></a> +<span class="sourceLineNo">700</span> k1 *= C2;<a name="line.700"></a> +<span class="sourceLineNo">701</span> hash ^= k1;<a name="line.701"></a> +<span class="sourceLineNo">702</span> }<a name="line.702"></a> +<span class="sourceLineNo">703</span><a name="line.703"></a> +<span class="sourceLineNo">704</span> // finalization<a name="line.704"></a> +<span class="sourceLineNo">705</span> hash ^= length;<a name="line.705"></a> +<span class="sourceLineNo">706</span> hash = fmix64(hash);<a name="line.706"></a> +<span class="sourceLineNo">707</span><a name="line.707"></a> +<span class="sourceLineNo">708</span> return hash;<a name="line.708"></a> +<span class="sourceLineNo">709</span> }<a name="line.709"></a> +<span class="sourceLineNo">710</span><a name="line.710"></a> +<span class="sourceLineNo">711</span> /**<a name="line.711"></a> +<span class="sourceLineNo">712</span> * Generates 128-bit hash from the byte array with a default seed.<a name="line.712"></a> +<span class="sourceLineNo">713</span> * This is a helper method that will produce the same result as:<a name="line.713"></a> +<span class="sourceLineNo">714</span> *<a name="line.714"></a> +<span class="sourceLineNo">715</span> * <pre><a name="line.715"></a> +<span class="sourceLineNo">716</span> * int offset = 0;<a name="line.716"></a> +<span class="sourceLineNo">717</span> * int seed = 104729;<a name="line.717"></a> +<span class="sourceLineNo">718</span> * int hash = MurmurHash3.hash128(data, offset, data.length, seed);<a name="line.718"></a> +<span class="sourceLineNo">719</span> * </pre><a name="line.719"></a> +<span class="sourceLineNo">720</span> *<a name="line.720"></a> +<span class="sourceLineNo">721</span> * <p>Note: The sign extension bug in {@link #hash128(byte[], int, int, int)} does not effect<a name="line.721"></a> +<span class="sourceLineNo">722</span> * this result as the default seed is positive.</p><a name="line.722"></a> +<span class="sourceLineNo">723</span> *<a name="line.723"></a> +<span class="sourceLineNo">724</span> * @param data The input byte array<a name="line.724"></a> +<span class="sourceLineNo">725</span> * @return The 128-bit hash (2 longs)<a name="line.725"></a> +<span class="sourceLineNo">726</span> * @see #hash128(byte[], int, int, int)<a name="line.726"></a> +<span class="sourceLineNo">727</span> */<a name="line.727"></a> +<span class="sourceLineNo">728</span> public static long[] hash128(final byte[] data) {<a name="line.728"></a> +<span class="sourceLineNo">729</span> return hash128(data, 0, data.length, DEFAULT_SEED);<a name="line.729"></a> +<span class="sourceLineNo">730</span> }<a name="line.730"></a> +<span class="sourceLineNo">731</span><a name="line.731"></a> +<span class="sourceLineNo">732</span> /**<a name="line.732"></a> +<span class="sourceLineNo">733</span> * Generates 128-bit hash from the byte array with a seed of zero.<a name="line.733"></a> +<span class="sourceLineNo">734</span> * This is a helper method that will produce the same result as:<a name="line.734"></a> +<span class="sourceLineNo">735</span> *<a name="line.735"></a> +<span class="sourceLineNo">736</span> * <pre><a name="line.736"></a> +<span class="sourceLineNo">737</span> * int offset = 0;<a name="line.737"></a> +<span class="sourceLineNo">738</span> * int seed = 0;<a name="line.738"></a> +<span class="sourceLineNo">739</span> * int hash = MurmurHash3.hash128x64(data, offset, data.length, seed);<a name="line.739"></a> +<span class="sourceLineNo">740</span> * </pre><a name="line.740"></a> +<span class="sourceLineNo">741</span> *<a name="line.741"></a> +<span class="sourceLineNo">742</span> * @param data The input byte array<a name="line.742"></a> +<span class="sourceLineNo">743</span> * @return The 128-bit hash (2 longs)<a name="line.743"></a> +<span class="sourceLineNo">744</span> * @see #hash128x64(byte[], int, int, int)<a name="line.744"></a> +<span class="sourceLineNo">745</span> * @since 1.14<a name="line.745"></a> +<span class="sourceLineNo">746</span> */<a name="line.746"></a> +<span class="sourceLineNo">747</span> public static long[] hash128x64(final byte[] data) {<a name="line.747"></a> +<span class="sourceLineNo">748</span> return hash128x64(data, 0, data.length, 0);<a name="line.748"></a> +<span class="sourceLineNo">749</span> }<a name="line.749"></a> +<span class="sourceLineNo">750</span><a name="line.750"></a> +<span class="sourceLineNo">751</span> /**<a name="line.751"></a> +<span class="sourceLineNo">752</span> * Generates 128-bit hash from a string with a default seed.<a name="line.752"></a> +<span class="sourceLineNo">753</span> * <p><a name="line.753"></a> +<span class="sourceLineNo">754</span> * Before 1.14 the string was converted using default encoding.<a name="line.754"></a> +<span class="sourceLineNo">755</span> * Since 1.14 the string is converted to bytes using UTF-8 encoding.<a name="line.755"></a> +<span class="sourceLineNo">756</span> * </p><a name="line.756"></a> +<span class="sourceLineNo">757</span> * This is a helper method that will produce the same result as:<a name="line.757"></a> +<span class="sourceLineNo">758</span> *<a name="line.758"></a> +<span class="sourceLineNo">759</span> * <pre><a name="line.759"></a> +<span class="sourceLineNo">760</span> * int offset = 0;<a name="line.760"></a> +<span class="sourceLineNo">761</span> * int seed = 104729;<a name="line.761"></a> +<span class="sourceLineNo">762</span> * byte[] bytes = data.getBytes(StandardCharsets.UTF_8);<a name="line.762"></a> +<span class="sourceLineNo">763</span> * int hash = MurmurHash3.hash128(bytes, offset, bytes.length, seed);<a name="line.763"></a> +<span class="sourceLineNo">764</span> * </pre><a name="line.764"></a> +<span class="sourceLineNo">765</span> *<a name="line.765"></a> +<span class="sourceLineNo">766</span> * <p>Note: The sign extension bug in {@link #hash128(byte[], int, int, int)} does not effect<a name="line.766"></a> +<span class="sourceLineNo">767</span> * this result as the default seed is positive.</p><a name="line.767"></a> +<span class="sourceLineNo">768</span> *<a name="line.768"></a> +<span class="sourceLineNo">769</span> * @param data The input String<a name="line.769"></a> +<span class="sourceLineNo">770</span> * @return The 128-bit hash (2 longs)<a name="line.770"></a> +<span class="sourceLineNo">771</span> * @see #hash128(byte[], int, int, int)<a name="line.771"></a> +<span class="sourceLineNo">772</span> * @deprecated Use {@link #hash128x64(byte[])} using the bytes returned from<a name="line.772"></a> +<span class="sourceLineNo">773</span> * {@link String#getBytes(java.nio.charset.Charset)}.<a name="line.773"></a> +<span class="sourceLineNo">774</span> */<a name="line.774"></a> +<span class="sourceLineNo">775</span> @Deprecated<a name="line.775"></a> +<span class="sourceLineNo">776</span> public static long[] hash128(final String data) {<a name="line.776"></a> +<span class="sourceLineNo">777</span> final byte[] bytes = StringUtils.getBytesUtf8(data);<a name="line.777"></a> +<span class="sourceLineNo">778</span> return hash128(bytes, 0, bytes.length, DEFAULT_SEED);<a name="line.778"></a> +<span class="sourceLineNo">779</span> }<a name="line.779"></a> +<span class="sourceLineNo">780</span><a name="line.780"></a> +<span class="sourceLineNo">781</span> /**<a name="line.781"></a> +<span class="sourceLineNo">782</span> * Generates 128-bit hash from the byte array with the given offset, length and seed.<a name="line.782"></a> +<span class="sourceLineNo">783</span> *<a name="line.783"></a> +<span class="sourceLineNo">784</span> * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128}<a name="line.784"></a> +<span class="sourceLineNo">785</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.785"></a> +<span class="sourceLineNo">786</span> *<a name="line.786"></a> +<span class="sourceLineNo">787</span> * <p>This implementation contains a sign-extension bug in the seed initialization.<a name="line.787"></a> +<span class="sourceLineNo">788</span> * This manifests if the seed is negative.<p><a name="line.788"></a> +<span class="sourceLineNo">789</span> *<a name="line.789"></a> +<span class="sourceLineNo">790</span> * @param data The input byte array<a name="line.790"></a> +<span class="sourceLineNo">791</span> * @param offset The first element of array<a name="line.791"></a> +<span class="sourceLineNo">792</span> * @param length The length of array<a name="line.792"></a> +<span class="sourceLineNo">793</span> * @param seed The initial seed value<a name="line.793"></a> +<span class="sourceLineNo">794</span> * @return The 128-bit hash (2 longs)<a name="line.794"></a> +<span class="sourceLineNo">795</span> * @deprecated Use {@link #hash128x64(byte[], int, int, int)}. This corrects the seed initialization.<a name="line.795"></a> +<span class="sourceLineNo">796</span> */<a name="line.796"></a> +<span class="sourceLineNo">797</span> @Deprecated<a name="line.797"></a> +<span class="sourceLineNo">798</span> public static long[] hash128(final byte[] data, final int offset, final int length, final int seed) {<a name="line.798"></a> +<span class="sourceLineNo">799</span> // ************<a name="line.799"></a> +<span class="sourceLineNo">800</span> // Note: This deliberately fails to apply masking using 0xffffffffL to the seed<a name="line.800"></a> +<span class="sourceLineNo">801</span> // to maintain behavioral compatibility with the original version.<a name="line.801"></a> +<span class="sourceLineNo">802</span> // The implicit conversion to a long will extend a negative sign<a name="line.802"></a> +<span class="sourceLineNo">803</span> // bit through the upper 32-bits of the long seed. These should be zero.<a name="line.803"></a> +<span class="sourceLineNo">804</span> // ************<a name="line.804"></a> +<span class="sourceLineNo">805</span> return hash128x64Internal(data, offset, length, seed);<a name="line.805"></a> +<span class="sourceLineNo">806</span> }<a name="line.806"></a> +<span class="sourceLineNo">807</span><a name="line.807"></a> +<span class="sourceLineNo">808</span> /**<a name="line.808"></a> +<span class="sourceLineNo">809</span> * Generates 128-bit hash from the byte array with the given offset, length and seed.<a name="line.809"></a> +<span class="sourceLineNo">810</span> *<a name="line.810"></a> +<span class="sourceLineNo">811</span> * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128}<a name="line.811"></a> +<span class="sourceLineNo">812</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.812"></a> +<span class="sourceLineNo">813</span> *<a name="line.813"></a> +<span class="sourceLineNo">814</span> * @param data The input byte array<a name="line.814"></a> +<span class="sourceLineNo">815</span> * @param offset The first element of array<a name="line.815"></a> +<span class="sourceLineNo">816</span> * @param length The length of array<a name="line.816"></a> +<span class="sourceLineNo">817</span> * @param seed The initial seed value<a name="line.817"></a> +<span class="sourceLineNo">818</span> * @return The 128-bit hash (2 longs)<a name="line.818"></a> +<span class="sourceLineNo">819</span> * @since 1.14<a name="line.819"></a> +<span class="sourceLineNo">820</span> */<a name="line.820"></a> +<span class="sourceLineNo">821</span> public static long[] hash128x64(final byte[] data, final int offset, final int length, final int seed) {<a name="line.821"></a> +<span class="sourceLineNo">822</span> // Use an unsigned 32-bit integer as the seed<a name="line.822"></a> +<span class="sourceLineNo">823</span> return hash128x64Internal(data, offset, length, seed & 0xffffffffL);<a name="line.823"></a> +<span class="sourceLineNo">824</span> }<a name="line.824"></a> +<span class="sourceLineNo">825</span><a name="line.825"></a> +<span class="sourceLineNo">826</span> /**<a name="line.826"></a> +<span class="sourceLineNo">827</span> * Generates 128-bit hash from the byte array with the given offset, length and seed.<a name="line.827"></a> +<span class="sourceLineNo">828</span> *<a name="line.828"></a> +<span class="sourceLineNo">829</span> * <p>This is an implementation of the 128-bit hash function {@code MurmurHash3_x64_128}<a name="line.829"></a> +<span class="sourceLineNo">830</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.830"></a> +<span class="sourceLineNo">831</span> *<a name="line.831"></a> +<span class="sourceLineNo">832</span> * @param data The input byte array<a name="line.832"></a> +<span class="sourceLineNo">833</span> * @param offset The first element of array<a name="line.833"></a> +<span class="sourceLineNo">834</span> * @param length The length of array<a name="line.834"></a> +<span class="sourceLineNo">835</span> * @param seed The initial seed value<a name="line.835"></a> +<span class="sourceLineNo">836</span> * @return The 128-bit hash (2 longs)<a name="line.836"></a> +<span class="sourceLineNo">837</span> */<a name="line.837"></a> +<span class="sourceLineNo">838</span> private static long[] hash128x64Internal(final byte[] data, final int offset, final int length, final long seed) {<a name="line.838"></a> +<span class="sourceLineNo">839</span> long h1 = seed;<a name="line.839"></a> +<span class="sourceLineNo">840</span> long h2 = seed;<a name="line.840"></a> +<span class="sourceLineNo">841</span> final int nblocks = length >> 4;<a name="line.841"></a> +<span class="sourceLineNo">842</span><a name="line.842"></a> +<span class="sourceLineNo">843</span> // body<a name="line.843"></a> +<span class="sourceLineNo">844</span> for (int i = 0; i < nblocks; i++) {<a name="line.844"></a> +<span class="sourceLineNo">845</span> final int index = offset + (i << 4);<a name="line.845"></a> +<span class="sourceLineNo">846</span> long k1 = getLittleEndianLong(data, index);<a name="line.846"></a> +<span class="sourceLineNo">847</span> long k2 = getLittleEndianLong(data, index + 8);<a name="line.847"></a> +<span class="sourceLineNo">848</span><a name="line.848"></a> +<span class="sourceLineNo">849</span> // mix functions for k1<a name="line.849"></a> +<span class="sourceLineNo">850</span> k1 *= C1;<a name="line.850"></a> +<span class="sourceLineNo">851</span> k1 = Long.rotateLeft(k1, R1);<a name="line.851"></a> +<span class="sourceLineNo">852</span> k1 *= C2;<a name="line.852"></a> +<span class="sourceLineNo">853</span> h1 ^= k1;<a name="line.853"></a> +<span class="sourceLineNo">854</span> h1 = Long.rotateLeft(h1, R2);<a name="line.854"></a> +<span class="sourceLineNo">855</span> h1 += h2;<a name="line.855"></a> +<span class="sourceLineNo">856</span> h1 = h1 * M + N1;<a name="line.856"></a> +<span class="sourceLineNo">857</span><a name="line.857"></a> +<span class="sourceLineNo">858</span> // mix functions for k2<a name="line.858"></a> +<span class="sourceLineNo">859</span> k2 *= C2;<a name="line.859"></a> +<span class="sourceLineNo">860</span> k2 = Long.rotateLeft(k2, R3);<a name="line.860"></a> +<span class="sourceLineNo">861</span> k2 *= C1;<a name="line.861"></a> +<span class="sourceLineNo">862</span> h2 ^= k2;<a name="line.862"></a> +<span class="sourceLineNo">863</span> h2 = Long.rotateLeft(h2, R1);<a name="line.863"></a> +<span class="sourceLineNo">864</span> h2 += h1;<a name="line.864"></a> +<span class="sourceLineNo">865</span> h2 = h2 * M + N2;<a name="line.865"></a> +<span class="sourceLineNo">866</span> }<a name="line.866"></a> +<span class="sourceLineNo">867</span><a name="line.867"></a> +<span class="sourceLineNo">868</span> // tail<a name="line.868"></a> +<span class="sourceLineNo">869</span> long k1 = 0;<a name="line.869"></a> +<span class="sourceLineNo">870</span> long k2 = 0;<a name="line.870"></a> +<span class="sourceLineNo">871</span> final int index = offset + (nblocks << 4);<a name="line.871"></a> +<span class="sourceLineNo">872</span> switch (offset + length - index) {<a name="line.872"></a> +<span class="sourceLineNo">873</span> case 15:<a name="line.873"></a> +<span class="sourceLineNo">874</span> k2 ^= ((long) data[index + 14] & 0xff) << 48;<a name="line.874"></a> +<span class="sourceLineNo">875</span> case 14:<a name="line.875"></a> +<span class="sourceLineNo">876</span> k2 ^= ((long) data[index + 13] & 0xff) << 40;<a name="line.876"></a> +<span class="sourceLineNo">877</span> case 13:<a name="line.877"></a> +<span class="sourceLineNo">878</span> k2 ^= ((long) data[index + 12] & 0xff) << 32;<a name="line.878"></a> +<span class="sourceLineNo">879</span> case 12:<a name="line.879"></a> +<span class="sourceLineNo">880</span> k2 ^= ((long) data[index + 11] & 0xff) << 24;<a name="line.880"></a> +<span class="sourceLineNo">881</span> case 11:<a name="line.881"></a> +<span class="sourceLineNo">882</span> k2 ^= ((long) data[index + 10] & 0xff) << 16;<a name="line.882"></a> +<span class="sourceLineNo">883</span> case 10:<a name="line.883"></a> +<span class="sourceLineNo">884</span> k2 ^= ((long) data[index + 9] & 0xff) << 8;<a name="line.884"></a> +<span class="sourceLineNo">885</span> case 9:<a name="line.885"></a> +<span class="sourceLineNo">886</span> k2 ^= data[index + 8] & 0xff;<a name="line.886"></a> +<span class="sourceLineNo">887</span> k2 *= C2;<a name="line.887"></a> +<span class="sourceLineNo">888</span> k2 = Long.rotateLeft(k2, R3);<a name="line.888"></a> +<span class="sourceLineNo">889</span> k2 *= C1;<a name="line.889"></a> +<span class="sourceLineNo">890</span> h2 ^= k2;<a name="line.890"></a> +<span class="sourceLineNo">891</span><a name="line.891"></a> +<span class="sourceLineNo">892</span> case 8:<a name="line.892"></a> +<span class="sourceLineNo">893</span> k1 ^= ((long) data[index + 7] & 0xff) << 56;<a name="line.893"></a> +<span class="sourceLineNo">894</span> case 7:<a name="line.894"></a> +<span class="sourceLineNo">895</span> k1 ^= ((long) data[index + 6] & 0xff) << 48;<a name="line.895"></a> +<span class="sourceLineNo">896</span> case 6:<a name="line.896"></a> +<span class="sourceLineNo">897</span> k1 ^= ((long) data[index + 5] & 0xff) << 40;<a name="line.897"></a> +<span class="sourceLineNo">898</span> case 5:<a name="line.898"></a> +<span class="sourceLineNo">899</span> k1 ^= ((long) data[index + 4] & 0xff) << 32;<a name="line.899"></a> +<span class="sourceLineNo">900</span> case 4:<a name="line.900"></a> +<span class="sourceLineNo">901</span> k1 ^= ((long) data[index + 3] & 0xff) << 24;<a name="line.901"></a> +<span class="sourceLineNo">902</span> case 3:<a name="line.902"></a> +<span class="sourceLineNo">903</span> k1 ^= ((long) data[index + 2] & 0xff) << 16;<a name="line.903"></a> +<span class="sourceLineNo">904</span> case 2:<a name="line.904"></a> +<span class="sourceLineNo">905</span> k1 ^= ((long) data[index + 1] & 0xff) << 8;<a name="line.905"></a> +<span class="sourceLineNo">906</span> case 1:<a name="line.906"></a> +<span class="sourceLineNo">907</span> k1 ^= data[index] & 0xff;<a name="line.907"></a> +<span class="sourceLineNo">908</span> k1 *= C1;<a name="line.908"></a> +<span class="sourceLineNo">909</span> k1 = Long.rotateLeft(k1, R1);<a name="line.909"></a> +<span class="sourceLineNo">910</span> k1 *= C2;<a name="line.910"></a> +<span class="sourceLineNo">911</span> h1 ^= k1;<a name="line.911"></a> +<span class="sourceLineNo">912</span> }<a name="line.912"></a> +<span class="sourceLineNo">913</span><a name="line.913"></a> +<span class="sourceLineNo">914</span> // finalization<a name="line.914"></a> +<span class="sourceLineNo">915</span> h1 ^= length;<a name="line.915"></a> +<span class="sourceLineNo">916</span> h2 ^= length;<a name="line.916"></a> +<span class="sourceLineNo">917</span><a name="line.917"></a> +<span class="sourceLineNo">918</span> h1 += h2;<a name="line.918"></a> +<span class="sourceLineNo">919</span> h2 += h1;<a name="line.919"></a> +<span class="sourceLineNo">920</span><a name="line.920"></a> +<span class="sourceLineNo">921</span> h1 = fmix64(h1);<a name="line.921"></a> +<span class="sourceLineNo">922</span> h2 = fmix64(h2);<a name="line.922"></a> +<span class="sourceLineNo">923</span><a name="line.923"></a> +<span class="sourceLineNo">924</span> h1 += h2;<a name="line.924"></a> +<span class="sourceLineNo">925</span> h2 += h1;<a name="line.925"></a> +<span class="sourceLineNo">926</span><a name="line.926"></a> +<span class="sourceLineNo">927</span> return new long[] { h1, h2 };<a name="line.927"></a> +<span class="sourceLineNo">928</span> }<a name="line.928"></a> +<span class="sourceLineNo">929</span><a name="line.929"></a> +<span class="sourceLineNo">930</span> /**<a name="line.930"></a> +<span class="sourceLineNo">931</span> * Gets the little-endian long from 8 bytes starting at the specified index.<a name="line.931"></a> +<span class="sourceLineNo">932</span> *<a name="line.932"></a> +<span class="sourceLineNo">933</span> * @param data The data<a name="line.933"></a> +<span class="sourceLineNo">934</span> * @param index The index<a name="line.934"></a> +<span class="sourceLineNo">935</span> * @return The little-endian long<a name="line.935"></a> +<span class="sourceLineNo">936</span> */<a name="line.936"></a> +<span class="sourceLineNo">937</span> private static long getLittleEndianLong(final byte[] data, final int index) {<a name="line.937"></a> +<span class="sourceLineNo">938</span> return (((long) data[index ] & 0xff) ) |<a name="line.938"></a> +<span class="sourceLineNo">939</span> (((long) data[index + 1] & 0xff) << 8) |<a name="line.939"></a> +<span class="sourceLineNo">940</span> (((long) data[index + 2] & 0xff) << 16) |<a name="line.940"></a> +<span class="sourceLineNo">941</span> (((long) data[index + 3] & 0xff) << 24) |<a name="line.941"></a> +<span class="sourceLineNo">942</span> (((long) data[index + 4] & 0xff) << 32) |<a name="line.942"></a> +<span class="sourceLineNo">943</span> (((long) data[index + 5] & 0xff) << 40) |<a name="line.943"></a> +<span class="sourceLineNo">944</span> (((long) data[index + 6] & 0xff) << 48) |<a name="line.944"></a> +<span class="sourceLineNo">945</span> (((long) data[index + 7] & 0xff) << 56);<a name="line.945"></a> +<span class="sourceLineNo">946</span> }<a name="line.946"></a> +<span class="sourceLineNo">947</span><a name="line.947"></a> +<span class="sourceLineNo">948</span> /**<a name="line.948"></a> +<span class="sourceLineNo">949</span> * Gets the little-endian int from 4 bytes starting at the specified index.<a name="line.949"></a> +<span class="sourceLineNo">950</span> *<a name="line.950"></a> +<span class="sourceLineNo">951</span> * @param data The data<a name="line.951"></a> +<span class="sourceLineNo">952</span> * @param index The index<a name="line.952"></a> +<span class="sourceLineNo">953</span> * @return The little-endian int<a name="line.953"></a> +<span class="sourceLineNo">954</span> */<a name="line.954"></a> +<span class="sourceLineNo">955</span> private static int getLittleEndianInt(final byte[] data, final int index) {<a name="line.955"></a> +<span class="sourceLineNo">956</span> return ((data[index ] & 0xff) ) |<a name="line.956"></a> +<span class="sourceLineNo">957</span> ((data[index + 1] & 0xff) << 8) |<a name="line.957"></a> +<span class="sourceLineNo">958</span> ((data[index + 2] & 0xff) << 16) |<a name="line.958"></a> +<span class="sourceLineNo">959</span> ((data[index + 3] & 0xff) << 24);<a name="line.959"></a> +<span class="sourceLineNo">960</span> }<a name="line.960"></a> +<span class="sourceLineNo">961</span><a name="line.961"></a> +<span class="sourceLineNo">962</span> /**<a name="line.962"></a> +<span class="sourceLineNo">963</span> * Performs the intermediate mix step of the 32-bit hash function {@code MurmurHash3_x86_32}.<a name="line.963"></a> +<span class="sourceLineNo">964</span> *<a name="line.964"></a> +<span class="sourceLineNo">965</span> * @param k The data to add to the hash<a name="line.965"></a> +<span class="sourceLineNo">966</span> * @param hash The current hash<a name="line.966"></a> +<span class="sourceLineNo">967</span> * @return The new hash<a name="line.967"></a> +<span class="sourceLineNo">968</span> */<a name="line.968"></a> +<span class="sourceLineNo">969</span> private static int mix32(int k, int hash) {<a name="line.969"></a> +<span class="sourceLineNo">970</span> k *= C1_32;<a name="line.970"></a> +<span class="sourceLineNo">971</span> k = Integer.rotateLeft(k, R1_32);<a name="line.971"></a> +<span class="sourceLineNo">972</span> k *= C2_32;<a name="line.972"></a> +<span class="sourceLineNo">973</span> hash ^= k;<a name="line.973"></a> +<span class="sourceLineNo">974</span> return Integer.rotateLeft(hash, R2_32) * M_32 + N_32;<a name="line.974"></a> +<span class="sourceLineNo">975</span> }<a name="line.975"></a> +<span class="sourceLineNo">976</span><a name="line.976"></a> +<span class="sourceLineNo">977</span> /**<a name="line.977"></a> +<span class="sourceLineNo">978</span> * Performs the final avalanche mix step of the 32-bit hash function {@code MurmurHash3_x86_32}.<a name="line.978"></a> +<span class="sourceLineNo">979</span> *<a name="line.979"></a> +<span class="sourceLineNo">980</span> * @param hash The current hash<a name="line.980"></a> +<span class="sourceLineNo">981</span> * @return The final hash<a name="line.981"></a> +<span class="sourceLineNo">982</span> */<a name="line.982"></a> +<span class="sourceLineNo">983</span> private static int fmix32(int hash) {<a name="line.983"></a> +<span class="sourceLineNo">984</span> hash ^= (hash >>> 16);<a name="line.984"></a> +<span class="sourceLineNo">985</span> hash *= 0x85ebca6b;<a name="line.985"></a> +<span class="sourceLineNo">986</span> hash ^= (hash >>> 13);<a name="line.986"></a> +<span class="sourceLineNo">987</span> hash *= 0xc2b2ae35;<a name="line.987"></a> +<span class="sourceLineNo">988</span> hash ^= (hash >>> 16);<a name="line.988"></a> +<span class="sourceLineNo">989</span> return hash;<a name="line.989"></a> +<span class="sourceLineNo">990</span> }<a name="line.990"></a> +<span class="sourceLineNo">991</span><a name="line.991"></a> +<span class="sourceLineNo">992</span> /**<a name="line.992"></a> +<span class="sourceLineNo">993</span> * Performs the final avalanche mix step of the 64-bit hash function {@code MurmurHash3_x64_128}.<a name="line.993"></a> +<span class="sourceLineNo">994</span> *<a name="line.994"></a> +<span class="sourceLineNo">995</span> * @param hash The current hash<a name="line.995"></a> +<span class="sourceLineNo">996</span> * @return The final hash<a name="line.996"></a> +<span class="sourceLineNo">997</span> */<a name="line.997"></a> +<span class="sourceLineNo">998</span> private static long fmix64(long hash) {<a name="line.998"></a> +<span class="sourceLineNo">999</span> hash ^= (hash >>> 33);<a name="line.999"></a> +<span class="sourceLineNo">1000</span> hash *= 0xff51afd7ed558ccdL;<a name="line.1000"></a> +<span class="sourceLineNo">1001</span> hash ^= (hash >>> 33);<a name="line.1001"></a> +<span class="sourceLineNo">1002</span> hash *= 0xc4ceb9fe1a85ec53L;<a name="line.1002"></a> +<span class="sourceLineNo">1003</span> hash ^= (hash >>> 33);<a name="line.1003"></a> +<span class="sourceLineNo">1004</span> return hash;<a name="line.1004"></a> +<span class="sourceLineNo">1005</span> }<a name="line.1005"></a> +<span class="sourceLineNo">1006</span><a name="line.1006"></a> +<span class="sourceLineNo">1007</span> /**<a name="line.1007"></a> +<span class="sourceLineNo">1008</span> * Generates 32-bit hash from input bytes. Bytes can be added incrementally and the new<a name="line.1008"></a> +<span class="sourceLineNo">1009</span> * hash computed.<a name="line.1009"></a> +<span class="sourceLineNo">1010</span> *<a name="line.1010"></a> +<span class="sourceLineNo">1011</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.1011"></a> +<span class="sourceLineNo">1012</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.1012"></a> +<span class="sourceLineNo">1013</span> *<a name="line.1013"></a> +<span class="sourceLineNo">1014</span> * @since 1.14<a name="line.1014"></a> +<span class="sourceLineNo">1015</span> */<a name="line.1015"></a> +<span class="sourceLineNo">1016</span> public static class IncrementalHash32x86 {<a name="line.1016"></a> +<span class="sourceLineNo">1017</span><a name="line.1017"></a> +<span class="sourceLineNo">1018</span> /** The size of byte blocks that are processed together. */<a name="line.1018"></a> +<span class="sourceLineNo">1019</span> private static final int BLOCK_SIZE = 4;<a name="line.1019"></a> +<span class="sourceLineNo">1020</span><a name="line.1020"></a> +<span class="sourceLineNo">1021</span> /** Up to 3 unprocessed bytes from input data. */<a name="line.1021"></a> +<span class="sourceLineNo">1022</span> private final byte[] unprocessed = new byte[3];<a name="line.1022"></a> +<span class="sourceLineNo">1023</span><a name="line.1023"></a> +<span class="sourceLineNo">1024</span> /** The number of unprocessed bytes in the tail data. */<a name="line.1024"></a> +<span class="sourceLineNo">1025</span> private int unprocessedLength;<a name="line.1025"></a> +<span class="sourceLineNo">1026</span><a name="line.1026"></a> +<span class="sourceLineNo">1027</span> /** The total number of input bytes added since the start. */<a name="line.1027"></a> +<span class="sourceLineNo">1028</span> private int totalLen;<a name="line.1028"></a> +<span class="sourceLineNo">1029</span><a name="line.1029"></a> +<span class="sourceLineNo">1030</span> /**<a name="line.1030"></a> +<span class="sourceLineNo">1031</span> * The current running hash.<a name="line.1031"></a> +<span class="sourceLineNo">1032</span> * This must be finalised to generate the 32-bit hash value.<a name="line.1032"></a> +<span class="sourceLineNo">1033</span> */<a name="line.1033"></a> +<span class="sourceLineNo">1034</span> private int hash;<a name="line.1034"></a> +<span class="sourceLineNo">1035</span><a name="line.1035"></a> +<span class="sourceLineNo">1036</span> /**<a name="line.1036"></a> +<span class="sourceLineNo">1037</span> * Starts a new incremental hash.<a name="line.1037"></a> +<span class="sourceLineNo">1038</span> *<a name="line.1038"></a> +<span class="sourceLineNo">1039</span> * @param seed The initial seed value<a name="line.1039"></a> +<span class="sourceLineNo">1040</span> */<a name="line.1040"></a> +<span class="sourceLineNo">1041</span> public final void start(final int seed) {<a name="line.1041"></a> +<span class="sourceLineNo">1042</span> // Reset<a name="line.1042"></a> +<span class="sourceLineNo">1043</span> unprocessedLength = totalLen = 0;<a name="line.1043"></a> +<span class="sourceLineNo">1044</span> this.hash = seed;<a name="line.1044"></a> +<span class="sourceLineNo">1045</span> }<a name="line.1045"></a> +<span class="sourceLineNo">1046</span><a name="line.1046"></a> +<span class="sourceLineNo">1047</span> /**<a name="line.1047"></a> +<span class="sourceLineNo">1048</span> * Adds the byte array to the current incremental hash.<a name="line.1048"></a> +<span class="sourceLineNo">1049</span> *<a name="line.1049"></a> +<span class="sourceLineNo">1050</span> * @param data The input byte array<a name="line.1050"></a> +<span class="sourceLineNo">1051</span> * @param offset The offset of data<a name="line.1051"></a> +<span class="sourceLineNo">1052</span> * @param length The length of array<a name="line.1052"></a> +<span class="sourceLineNo">1053</span> */<a name="line.1053"></a> +<span class="sourceLineNo">1054</span> public final void add(final byte[] data, final int offset, final int length) {<a name="line.1054"></a> +<span class="sourceLineNo">1055</span> if (length <= 0) {<a name="line.1055"></a> +<span class="sourceLineNo">1056</span> // Nothing to add<a name="line.1056"></a> +<span class="sourceLineNo">1057</span> return;<a name="line.1057"></a> +<span class="sourceLineNo">1058</span> }<a name="line.1058"></a> +<span class="sourceLineNo">1059</span> totalLen += length;<a name="line.1059"></a> +<span class="sourceLineNo">1060</span><a name="line.1060"></a> +<span class="sourceLineNo">1061</span> // Process the bytes in blocks of 4.<a name="line.1061"></a> +<span class="sourceLineNo">1062</span> // New bytes must be added to any current unprocessed bytes,<a name="line.1062"></a> +<span class="sourceLineNo">1063</span> // then processed in blocks of 4 and the remaining bytes saved:<a name="line.1063"></a> +<span class="sourceLineNo">1064</span> //<a name="line.1064"></a> +<span class="sourceLineNo">1065</span> // |--|---------------------------|--|<a name="line.1065"></a> +<span class="sourceLineNo">1066</span> // unprocessed<a name="line.1066"></a> +<span class="sourceLineNo">1067</span> // main block<a name="line.1067"></a> +<span class="sourceLineNo">1068</span> // remaining<a name="line.1068"></a> +<span class="sourceLineNo">1069</span><a name="line.1069"></a> +<span class="sourceLineNo">1070</span> // Check if the unprocessed bytes and new bytes can fill a block of 4.<a name="line.1070"></a> +<span class="sourceLineNo">1071</span> // Make this overflow safe in the event that length is Integer.MAX_VALUE.<a name="line.1071"></a> +<span class="sourceLineNo">1072</span> // Equivalent to: (unprocessedLength + length < BLOCK_SIZE)<a name="line.1072"></a> +<span class="sourceLineNo">1073</span> if (unprocessedLength + length - BLOCK_SIZE < 0) {<a name="line.1073"></a> +<span class="sourceLineNo">1074</span> // Not enough so add to the unprocessed bytes<a name="line.1074"></a> +<span class="sourceLineNo">1075</span> System.arraycopy(data, offset, unprocessed, unprocessedLength, length);<a name="line.1075"></a> +<span class="sourceLineNo">1076</span> unprocessedLength += length;<a name="line.1076"></a> +<span class="sourceLineNo">1077</span> return;<a name="line.1077"></a> +<span class="sourceLineNo">1078</span> }<a name="line.1078"></a> +<span class="sourceLineNo">1079</span><a name="line.1079"></a> +<span class="sourceLineNo">1080</span> // Combine unprocessed bytes with new bytes.<a name="line.1080"></a> +<span class="sourceLineNo">1081</span> int newOffset;<a name="line.1081"></a> +<span class="sourceLineNo">1082</span> int newLength;<a name="line.1082"></a> +<span class="sourceLineNo">1083</span> if (unprocessedLength > 0) {<a name="line.1083"></a> +<span class="sourceLineNo">1084</span> int k = -1;<a name="line.1084"></a> +<span class="sourceLineNo">1085</span> switch (unprocessedLength) {<a name="line.1085"></a> +<span class="sourceLineNo">1086</span> case 1:<a name="line.1086"></a> +<span class="sourceLineNo">1087</span> k = orBytes(unprocessed[0], data[offset], data[offset + 1], data[offset + 2]);<a name="line.1087"></a> +<span class="sourceLineNo">1088</span> break;<a name="line.1088"></a> +<span class="sourceLineNo">1089</span> case 2:<a name="line.1089"></a> +<span class="sourceLineNo">1090</span> k = orBytes(unprocessed[0], unprocessed[1], data[offset], data[offset + 1]);<a name="line.1090"></a> +<span class="sourceLineNo">1091</span> break;<a name="line.1091"></a> +<span class="sourceLineNo">1092</span> case 3:<a name="line.1092"></a> +<span class="sourceLineNo">1093</span> k = orBytes(unprocessed[0], unprocessed[1], unprocessed[2], data[offset]);<a name="line.1093"></a> +<span class="sourceLineNo">1094</span> break;<a name="line.1094"></a> +<span class="sourceLineNo">1095</span> default:<a name="line.1095"></a> +<span class="sourceLineNo">1096</span> throw new IllegalStateException("Unprocessed length should be 1, 2, or 3: " + unprocessedLength);<a name="line.1096"></a> +<span class="sourceLineNo">1097</span> }<a name="line.1097"></a> +<span class="sourceLineNo">1098</span> hash = mix32(k, hash);<a name="line.1098"></a> +<span class="sourceLineNo">1099</span> // Update the offset and length<a name="line.1099"></a> +<span class="sourceLineNo">1100</span> final int consumed = BLOCK_SIZE - unprocessedLength;<a name="line.1100"></a> +<span class="sourceLineNo">1101</span> newOffset = offset + consumed;<a name="line.1101"></a> +<span class="sourceLineNo">1102</span> newLength = length - consumed;<a name="line.1102"></a> +<span class="sourceLineNo">1103</span> } else {<a name="line.1103"></a> +<span class="sourceLineNo">1104</span> newOffset = offset;<a name="line.1104"></a> +<span class="sourceLineNo">1105</span> newLength = length;<a name="line.1105"></a> +<span class="sourceLineNo">1106</span> }<a name="line.1106"></a> +<span class="sourceLineNo">1107</span><a name="line.1107"></a> +<span class="sourceLineNo">1108</span> // Main processing of blocks of 4 bytes<a name="line.1108"></a> +<span class="sourceLineNo">1109</span> final int nblocks = newLength >> 2;<a name="line.1109"></a> +<span class="sourceLineNo">1110</span><a name="line.1110"></a> +<span class="sourceLineNo">1111</span> for (int i = 0; i < nblocks; i++) {<a name="line.1111"></a> +<span class="sourceLineNo">1112</span> final int index = newOffset + (i << 2);<a name="line.1112"></a> +<span class="sourceLineNo">1113</span> final int k = getLittleEndianInt(data, index);<a name="line.1113"></a> +<span class="sourceLineNo">1114</span> hash = mix32(k, hash);<a name="line.1114"></a> +<span class="sourceLineNo">1115</span> }<a name="line.1115"></a> +<span class="sourceLineNo">1116</span><a name="line.1116"></a> +<span class="sourceLineNo">1117</span> // Save left-over unprocessed bytes<a name="line.1117"></a> +<span class="sourceLineNo">1118</span> final int consumed = (nblocks << 2);<a name="line.1118"></a> +<span class="sourceLineNo">1119</span> unprocessedLength = newLength - consumed;<a name="line.1119"></a> +<span class="sourceLineNo">1120</span> if (unprocessedLength != 0) {<a name="line.1120"></a> +<span class="sourceLineNo">1121</span> System.arraycopy(data, newOffset + consumed, unprocessed, 0, unprocessedLength);<a name="line.1121"></a> +<span class="sourceLineNo">1122</span> }<a name="line.1122"></a> +<span class="sourceLineNo">1123</span> }<a name="line.1123"></a> +<span class="sourceLineNo">1124</span><a name="line.1124"></a> +<span class="sourceLineNo">1125</span> /**<a name="line.1125"></a> +<span class="sourceLineNo">1126</span> * Generate the 32-bit hash value. Repeat calls to this method with no additional data<a name="line.1126"></a> +<span class="sourceLineNo">1127</span> * will generate the same hash value.<a name="line.1127"></a> +<span class="sourceLineNo">1128</span> *<a name="line.1128"></a> +<span class="sourceLineNo">1129</span> * @return The 32-bit hash<a name="line.1129"></a> +<span class="sourceLineNo">1130</span> */<a name="line.1130"></a> +<span class="sourceLineNo">1131</span> public final int end() {<a name="line.1131"></a> +<span class="sourceLineNo">1132</span> // Allow calling end() again after adding no data to return the same result.<a name="line.1132"></a> +<span class="sourceLineNo">1133</span> return finalise(hash, unprocessedLength, unprocessed, totalLen);<a name="line.1133"></a> +<span class="sourceLineNo">1134</span> }<a name="line.1134"></a> +<span class="sourceLineNo">1135</span><a name="line.1135"></a> +<span class="sourceLineNo">1136</span> /**<a name="line.1136"></a> +<span class="sourceLineNo">1137</span> * Finalize the running hash to the output 32-bit hash by processing remaining bytes<a name="line.1137"></a> +<span class="sourceLineNo">1138</span> * and performing final mixing.<a name="line.1138"></a> +<span class="sourceLineNo">1139</span> *<a name="line.1139"></a> +<span class="sourceLineNo">1140</span> * @param hash The running hash<a name="line.1140"></a> +<span class="sourceLineNo">1141</span> * @param unprocessedLength The number of unprocessed bytes in the tail data.<a name="line.1141"></a> +<span class="sourceLineNo">1142</span> * @param unprocessed Up to 3 unprocessed bytes from input data.<a name="line.1142"></a> +<span class="sourceLineNo">1143</span> * @param totalLen The total number of input bytes added since the start.<a name="line.1143"></a> +<span class="sourceLineNo">1144</span> * @return The 32-bit hash<a name="line.1144"></a> +<span class="sourceLineNo">1145</span> */<a name="line.1145"></a> +<span class="sourceLineNo">1146</span> int finalise(final int hash, final int unprocessedLength, final byte[] unprocessed, final int totalLen) {<a name="line.1146"></a> +<span class="sourceLineNo">1147</span> int result = hash;<a name="line.1147"></a> +<span class="sourceLineNo">1148</span> int k1 = 0;<a name="line.1148"></a> +<span class="sourceLineNo">1149</span> switch (unprocessedLength) {<a name="line.1149"></a> +<span class="sourceLineNo">1150</span> case 3:<a name="line.1150"></a> +<span class="sourceLineNo">1151</span> k1 ^= (unprocessed[2] & 0xff) << 16;<a name="line.1151"></a> +<span class="sourceLineNo">1152</span> case 2:<a name="line.1152"></a> +<span class="sourceLineNo">1153</span> k1 ^= (unprocessed[1] & 0xff) << 8;<a name="line.1153"></a> +<span class="sourceLineNo">1154</span> case 1:<a name="line.1154"></a> +<span class="sourceLineNo">1155</span> k1 ^= (unprocessed[0] & 0xff);<a name="line.1155"></a> +<span class="sourceLineNo">1156</span><a name="line.1156"></a> +<span class="sourceLineNo">1157</span> // mix functions<a name="line.1157"></a> +<span class="sourceLineNo">1158</span> k1 *= C1_32;<a name="line.1158"></a> +<span class="sourceLineNo">1159</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.1159"></a> +<span class="sourceLineNo">1160</span> k1 *= C2_32;<a name="line.1160"></a> +<span class="sourceLineNo">1161</span> result ^= k1;<a name="line.1161"></a> +<span class="sourceLineNo">1162</span> }<a name="line.1162"></a> +<span class="sourceLineNo">1163</span><a name="line.1163"></a> +<span class="sourceLineNo">1164</span> // finalization<a name="line.1164"></a> +<span class="sourceLineNo">1165</span> result ^= totalLen;<a name="line.1165"></a> +<span class="sourceLineNo">1166</span> return fmix32(result);<a name="line.1166"></a> +<span class="sourceLineNo">1167</span> }<a name="line.1167"></a> +<span class="sourceLineNo">1168</span><a name="line.1168"></a> +<span class="sourceLineNo">1169</span> /**<a name="line.1169"></a> +<span class="sourceLineNo">1170</span> * Combines the bytes using an Or operation ({@code | } in a little-endian representation<a name="line.1170"></a> +<span class="sourceLineNo">1171</span> * of a 32-bit integer; byte 1 will be the least significant byte, byte 4 the most<a name="line.1171"></a> +<span class="sourceLineNo">1172</span> * significant.<a name="line.1172"></a> +<span class="sourceLineNo">1173</span> *<a name="line.1173"></a> +<span class="sourceLineNo">1174</span> * @param b1 The first byte<a name="line.1174"></a> +<span class="sourceLineNo">1175</span> * @param b2 The second byte<a name="line.1175"></a> +<span class="sourceLineNo">1176</span> * @param b3 The third byte<a name="line.1176"></a> +<span class="sourceLineNo">1177</span> * @param b4 The fourth byte<a name="line.1177"></a> +<span class="sourceLineNo">1178</span> * @return The 32-bit integer<a name="line.1178"></a> +<span class="sourceLineNo">1179</span> */<a name="line.1179"></a> +<span class="sourceLineNo">1180</span> private static int orBytes(final byte b1, final byte b2, final byte b3, final byte b4) {<a name="line.1180"></a> +<span class="sourceLineNo">1181</span> return (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16) | ((b4 & 0xff) << 24);<a name="line.1181"></a> +<span class="sourceLineNo">1182</span> }<a name="line.1182"></a> +<span class="sourceLineNo">1183</span> }<a name="line.1183"></a> +<span class="sourceLineNo">1184</span><a name="line.1184"></a> +<span class="sourceLineNo">1185</span> /**<a name="line.1185"></a> +<span class="sourceLineNo">1186</span> * Generates 32-bit hash from input bytes. Bytes can be added incrementally and the new<a name="line.1186"></a> +<span class="sourceLineNo">1187</span> * hash computed.<a name="line.1187"></a> +<span class="sourceLineNo">1188</span> *<a name="line.1188"></a> +<span class="sourceLineNo">1189</span> * <p>This is an implementation of the 32-bit hash function {@code MurmurHash3_x86_32}<a name="line.1189"></a> +<span class="sourceLineNo">1190</span> * from from Austin Applyby's original MurmurHash3 {@code c++} code in SMHasher.</p><a name="line.1190"></a> +<span class="sourceLineNo">1191</span> *<a name="line.1191"></a> +<span class="sourceLineNo">1192</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.1192"></a> +<span class="sourceLineNo">1193</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.1193"></a> +<span class="sourceLineNo">1194</span> * bytes are negative.<p><a name="line.1194"></a> +<span class="sourceLineNo">1195</span> *<a name="line.1195"></a> +<span class="sourceLineNo">1196</span> * @deprecated Use IncrementalHash32x86. This corrects the processing of trailing bytes.<a name="line.1196"></a> +<span class="sourceLineNo">1197</span> */<a name="line.1197"></a> +<span class="sourceLineNo">1198</span> @Deprecated<a name="line.1198"></a> +<span class="sourceLineNo">1199</span> public static class IncrementalHash32 extends IncrementalHash32x86 {<a name="line.1199"></a> +<span class="sourceLineNo">1200</span><a name="line.1200"></a> +<span class="sourceLineNo">1201</span> /**<a name="line.1201"></a> +<span class="sourceLineNo">1202</span> * {@inheritDoc}<a name="line.1202"></a> +<span class="sourceLineNo">1203</span> *<a name="line.1203"></a> +<span class="sourceLineNo">1204</span> * <p>This implementation contains a sign-extension bug in the finalization step of<a name="line.1204"></a> +<span class="sourceLineNo">1205</span> * any bytes left over from dividing the length by 4. This manifests if any of these<a name="line.1205"></a> +<span class="sourceLineNo">1206</span> * bytes are negative.<p><a name="line.1206"></a> +<span class="sourceLineNo">1207</span> *<a name="line.1207"></a> +<span class="sourceLineNo">1208</span> * @deprecated Use IncrementalHash32x86. This corrects the processing of trailing bytes.<a name="line.1208"></a> +<span class="sourceLineNo">1209</span> */<a name="line.1209"></a> +<span class="sourceLineNo">1210</span> @Override<a name="line.1210"></a> +<span class="sourceLineNo">1211</span> @Deprecated<a name="line.1211"></a> +<span class="sourceLineNo">1212</span> int finalise(final int hash, final int unprocessedLength, final byte[] unprocessed, final int totalLen) {<a name="line.1212"></a> +<span class="sourceLineNo">1213</span> int result = hash;<a name="line.1213"></a> +<span class="sourceLineNo">1214</span> // ************<a name="line.1214"></a> +<span class="sourceLineNo">1215</span> // Note: This fails to apply masking using 0xff to the 3 remaining bytes.<a name="line.1215"></a> +<span class="sourceLineNo">1216</span> // ************<a name="line.1216"></a> +<span class="sourceLineNo">1217</span> int k1 = 0;<a name="line.1217"></a> +<span class="sourceLineNo">1218</span> switch (unprocessedLength) {<a name="line.1218"></a> +<span class="sourceLineNo">1219</span> case 3:<a name="line.1219"></a> +<span class="sourceLineNo">1220</span> k1 ^= unprocessed[2] << 16;<a name="line.1220"></a> +<span class="sourceLineNo">1221</span> case 2:<a name="line.1221"></a> +<span class="sourceLineNo">1222</span> k1 ^= unprocessed[1] << 8;<a name="line.1222"></a> +<span class="sourceLineNo">1223</span> case 1:<a name="line.1223"></a> +<span class="sourceLineNo">1224</span> k1 ^= unprocessed[0];<a name="line.1224"></a> +<span class="sourceLineNo">1225</span><a name="line.1225"></a> +<span class="sourceLineNo">1226</span> // mix functions<a name="line.1226"></a> +<span class="sourceLineNo">1227</span> k1 *= C1_32;<a name="line.1227"></a> +<span class="sourceLineNo">1228</span> k1 = Integer.rotateLeft(k1, R1_32);<a name="line.1228"></a> +<span class="sourceLineNo">1229</span> k1 *= C2_32;<a name="line.1229"></a> +<span class="sourceLineNo">1230</span> result ^= k1;<a name="line.1230"></a> +<span class="sourceLineNo">1231</span> }<a name="line.1231"></a> +<span class="sourceLineNo">1232</span><a name="line.1232"></a> +<span class="sourceLineNo">1233</span> // finalization<a name="line.1233"></a> +<span class="sourceLineNo">1234</span> result ^= totalLen;<a name="line.1234"></a> +<span class="sourceLineNo">1235</span> return fmix32(result);<a name="line.1235"></a> +<span class="sourceLineNo">1236</span> }<a name="line.1236"></a> +<span class="sourceLineNo">1237</span> }<a name="line.1237"></a> +<span class="sourceLineNo">1238</span>}<a name="line.1238"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/PureJavaCrc32.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/PureJavaCrc32.html new file mode 100644 index 0000000000000000000000000000000000000000..4d6030a631fe463ee95d69bb20aa284ae3d4a0f1 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/PureJavaCrc32.html @@ -0,0 +1,704 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>package org.apache.commons.codec.digest;<a name="line.17"></a> +<span class="sourceLineNo">018</span><a name="line.18"></a> +<span class="sourceLineNo">019</span>import java.util.zip.Checksum;<a name="line.19"></a> +<span class="sourceLineNo">020</span><a name="line.20"></a> +<span class="sourceLineNo">021</span>/**<a name="line.21"></a> +<span class="sourceLineNo">022</span> * A pure-java implementation of the CRC32 checksum that uses<a name="line.22"></a> +<span class="sourceLineNo">023</span> * the same polynomial as the built-in native CRC32.<a name="line.23"></a> +<span class="sourceLineNo">024</span> *<a name="line.24"></a> +<span class="sourceLineNo">025</span> * This is to avoid the JNI overhead for certain uses of Checksumming<a name="line.25"></a> +<span class="sourceLineNo">026</span> * where many small pieces of data are checksummed in succession.<a name="line.26"></a> +<span class="sourceLineNo">027</span> *<a name="line.27"></a> +<span class="sourceLineNo">028</span> * The current version is ~10x to 1.8x as fast as Sun's native<a name="line.28"></a> +<span class="sourceLineNo">029</span> * java.util.zip.CRC32 in Java 1.6<a name="line.29"></a> +<span class="sourceLineNo">030</span> *<a name="line.30"></a> +<span class="sourceLineNo">031</span> * Copied from Hadoop 2.6.3.<a name="line.31"></a> +<span class="sourceLineNo">032</span> * The code agrees with the following file in the 2.6.3 tag:<a name="line.32"></a> +<span class="sourceLineNo">033</span> * https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob_plain;<a name="line.33"></a> +<span class="sourceLineNo">034</span> * f=hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/PureJavaCrc32.java;<a name="line.34"></a> +<span class="sourceLineNo">035</span> * hb=2120de588b92b9f22b1cc4188761d6a8c61aa778<a name="line.35"></a> +<span class="sourceLineNo">036</span> * <p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * This class is Not ThreadSafe<a name="line.37"></a> +<span class="sourceLineNo">038</span> *<a name="line.38"></a> +<span class="sourceLineNo">039</span> * @see java.util.zip.CRC32<a name="line.39"></a> +<span class="sourceLineNo">040</span> * @since 1.11<a name="line.40"></a> +<span class="sourceLineNo">041</span> */<a name="line.41"></a> +<span class="sourceLineNo">042</span>public class PureJavaCrc32 implements Checksum {<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> +<span class="sourceLineNo">044</span> /** the current CRC value, bit-flipped */<a name="line.44"></a> +<span class="sourceLineNo">045</span> private int crc;<a name="line.45"></a> +<span class="sourceLineNo">046</span><a name="line.46"></a> +<span class="sourceLineNo">047</span> /** Create a new PureJavaCrc32 object. */<a name="line.47"></a> +<span class="sourceLineNo">048</span> public PureJavaCrc32() {<a name="line.48"></a> +<span class="sourceLineNo">049</span> _reset();<a name="line.49"></a> +<span class="sourceLineNo">050</span> }<a name="line.50"></a> +<span class="sourceLineNo">051</span><a name="line.51"></a> +<span class="sourceLineNo">052</span> @Override<a name="line.52"></a> +<span class="sourceLineNo">053</span> public long getValue() {<a name="line.53"></a> +<span class="sourceLineNo">054</span> return (~crc) & 0xffffffffL;<a name="line.54"></a> +<span class="sourceLineNo">055</span> }<a name="line.55"></a> +<span class="sourceLineNo">056</span><a name="line.56"></a> +<span class="sourceLineNo">057</span> @Override<a name="line.57"></a> +<span class="sourceLineNo">058</span> public void reset() {<a name="line.58"></a> +<span class="sourceLineNo">059</span> _reset();<a name="line.59"></a> +<span class="sourceLineNo">060</span> }<a name="line.60"></a> +<span class="sourceLineNo">061</span><a name="line.61"></a> +<span class="sourceLineNo">062</span> // called by ctor, so must not be overrideable<a name="line.62"></a> +<span class="sourceLineNo">063</span> private void _reset() {<a name="line.63"></a> +<span class="sourceLineNo">064</span> crc = 0xffffffff;<a name="line.64"></a> +<span class="sourceLineNo">065</span> }<a name="line.65"></a> +<span class="sourceLineNo">066</span><a name="line.66"></a> +<span class="sourceLineNo">067</span> @Override<a name="line.67"></a> +<span class="sourceLineNo">068</span> public void update(final byte[] b, final int offset, final int len) {<a name="line.68"></a> +<span class="sourceLineNo">069</span> int localCrc = crc;<a name="line.69"></a> +<span class="sourceLineNo">070</span><a name="line.70"></a> +<span class="sourceLineNo">071</span> final int remainder = len & 0x7;<a name="line.71"></a> +<span class="sourceLineNo">072</span> int i = offset;<a name="line.72"></a> +<span class="sourceLineNo">073</span> for(final int end = offset + len - remainder; i < end; i += 8) {<a name="line.73"></a> +<span class="sourceLineNo">074</span> final int x = localCrc ^<a name="line.74"></a> +<span class="sourceLineNo">075</span> ((((b[i ] << 24) >>> 24) + ((b[i+1] << 24) >>> 16)) +<a name="line.75"></a> +<span class="sourceLineNo">076</span> (((b[i+2] << 24) >>> 8 ) + (b[i+3] << 24)));<a name="line.76"></a> +<span class="sourceLineNo">077</span><a name="line.77"></a> +<span class="sourceLineNo">078</span> localCrc = ((T[((x << 24) >>> 24) + 0x700] ^ T[((x << 16) >>> 24) + 0x600]) ^<a name="line.78"></a> +<span class="sourceLineNo">079</span> (T[((x << 8) >>> 24) + 0x500] ^ T[ (x >>> 24) + 0x400])) ^<a name="line.79"></a> +<span class="sourceLineNo">080</span> ((T[((b[i+4] << 24) >>> 24) + 0x300] ^ T[((b[i+5] << 24) >>> 24) + 0x200]) ^<a name="line.80"></a> +<span class="sourceLineNo">081</span> (T[((b[i+6] << 24) >>> 24) + 0x100] ^ T[((b[i+7] << 24) >>> 24)]));<a name="line.81"></a> +<span class="sourceLineNo">082</span> }<a name="line.82"></a> +<span class="sourceLineNo">083</span><a name="line.83"></a> +<span class="sourceLineNo">084</span> /* loop unroll - duff's device style */<a name="line.84"></a> +<span class="sourceLineNo">085</span> switch(remainder) {<a name="line.85"></a> +<span class="sourceLineNo">086</span> case 7: localCrc = (localCrc >>> 8) ^ T[((localCrc ^ b[i++]) << 24) >>> 24];<a name="line.86"></a> +<span class="sourceLineNo">087</span> case 6: localCrc = (localCrc >>> 8) ^ T[((localCrc ^ b[i++]) << 24) >>> 24];<a name="line.87"></a> +<span class="sourceLineNo">088</span> case 5: localCrc = (localCrc >>> 8) ^ T[((localCrc ^ b[i++]) << 24) >>> 24];<a name="line.88"></a> +<span class="sourceLineNo">089</span> case 4: localCrc = (localCrc >>> 8) ^ T[((localCrc ^ b[i++]) << 24) >>> 24];<a name="line.89"></a> +<span class="sourceLineNo">090</span> case 3: localCrc = (localCrc >>> 8) ^ T[((localCrc ^ b[i++]) << 24) >>> 24];<a name="line.90"></a> +<span class="sourceLineNo">091</span> case 2: localCrc = (localCrc >>> 8) ^ T[((localCrc ^ b[i++]) << 24) >>> 24];<a name="line.91"></a> +<span class="sourceLineNo">092</span> case 1: localCrc = (localCrc >>> 8) ^ T[((localCrc ^ b[i++]) << 24) >>> 24];<a name="line.92"></a> +<span class="sourceLineNo">093</span> default:<a name="line.93"></a> +<span class="sourceLineNo">094</span> /* nothing */<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span><a name="line.96"></a> +<span class="sourceLineNo">097</span> // Publish crc out to object<a name="line.97"></a> +<span class="sourceLineNo">098</span> crc = localCrc;<a name="line.98"></a> +<span class="sourceLineNo">099</span> }<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> @Override<a name="line.101"></a> +<span class="sourceLineNo">102</span> final public void update(final int b) {<a name="line.102"></a> +<span class="sourceLineNo">103</span> crc = (crc >>> 8) ^ T[(((crc ^ b) << 24) >>> 24)];<a name="line.103"></a> +<span class="sourceLineNo">104</span> }<a name="line.104"></a> +<span class="sourceLineNo">105</span><a name="line.105"></a> +<span class="sourceLineNo">106</span> /*<a name="line.106"></a> +<span class="sourceLineNo">107</span> * CRC-32 lookup tables generated by the polynomial 0xEDB88320.<a name="line.107"></a> +<span class="sourceLineNo">108</span> * See also TestPureJavaCrc32.Table.<a name="line.108"></a> +<span class="sourceLineNo">109</span> */<a name="line.109"></a> +<span class="sourceLineNo">110</span> private static final int[] T = new int[] {<a name="line.110"></a> +<span class="sourceLineNo">111</span> /* T8_0 */<a name="line.111"></a> +<span class="sourceLineNo">112</span> 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,<a name="line.112"></a> +<span class="sourceLineNo">113</span> 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,<a name="line.113"></a> +<span class="sourceLineNo">114</span> 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,<a name="line.114"></a> +<span class="sourceLineNo">115</span> 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,<a name="line.115"></a> +<span class="sourceLineNo">116</span> 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,<a name="line.116"></a> +<span class="sourceLineNo">117</span> 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,<a name="line.117"></a> +<span class="sourceLineNo">118</span> 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,<a name="line.118"></a> +<span class="sourceLineNo">119</span> 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,<a name="line.119"></a> +<span class="sourceLineNo">120</span> 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,<a name="line.120"></a> +<span class="sourceLineNo">121</span> 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,<a name="line.121"></a> +<span class="sourceLineNo">122</span> 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,<a name="line.122"></a> +<span class="sourceLineNo">123</span> 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,<a name="line.123"></a> +<span class="sourceLineNo">124</span> 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,<a name="line.124"></a> +<span class="sourceLineNo">125</span> 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,<a name="line.125"></a> +<span class="sourceLineNo">126</span> 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,<a name="line.126"></a> +<span class="sourceLineNo">127</span> 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,<a name="line.127"></a> +<span class="sourceLineNo">128</span> 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,<a name="line.128"></a> +<span class="sourceLineNo">129</span> 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,<a name="line.129"></a> +<span class="sourceLineNo">130</span> 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,<a name="line.130"></a> +<span class="sourceLineNo">131</span> 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,<a name="line.131"></a> +<span class="sourceLineNo">132</span> 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,<a name="line.132"></a> +<span class="sourceLineNo">133</span> 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,<a name="line.133"></a> +<span class="sourceLineNo">134</span> 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,<a name="line.134"></a> +<span class="sourceLineNo">135</span> 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,<a name="line.135"></a> +<span class="sourceLineNo">136</span> 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,<a name="line.136"></a> +<span class="sourceLineNo">137</span> 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,<a name="line.137"></a> +<span class="sourceLineNo">138</span> 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,<a name="line.138"></a> +<span class="sourceLineNo">139</span> 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,<a name="line.139"></a> +<span class="sourceLineNo">140</span> 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,<a name="line.140"></a> +<span class="sourceLineNo">141</span> 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,<a name="line.141"></a> +<span class="sourceLineNo">142</span> 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,<a name="line.142"></a> +<span class="sourceLineNo">143</span> 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,<a name="line.143"></a> +<span class="sourceLineNo">144</span> 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,<a name="line.144"></a> +<span class="sourceLineNo">145</span> 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,<a name="line.145"></a> +<span class="sourceLineNo">146</span> 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,<a name="line.146"></a> +<span class="sourceLineNo">147</span> 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,<a name="line.147"></a> +<span class="sourceLineNo">148</span> 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,<a name="line.148"></a> +<span class="sourceLineNo">149</span> 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,<a name="line.149"></a> +<span class="sourceLineNo">150</span> 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,<a name="line.150"></a> +<span class="sourceLineNo">151</span> 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,<a name="line.151"></a> +<span class="sourceLineNo">152</span> 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,<a name="line.152"></a> +<span class="sourceLineNo">153</span> 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,<a name="line.153"></a> +<span class="sourceLineNo">154</span> 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,<a name="line.154"></a> +<span class="sourceLineNo">155</span> 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,<a name="line.155"></a> +<span class="sourceLineNo">156</span> 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,<a name="line.156"></a> +<span class="sourceLineNo">157</span> 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,<a name="line.157"></a> +<span class="sourceLineNo">158</span> 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,<a name="line.158"></a> +<span class="sourceLineNo">159</span> 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,<a name="line.159"></a> +<span class="sourceLineNo">160</span> 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,<a name="line.160"></a> +<span class="sourceLineNo">161</span> 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,<a name="line.161"></a> +<span class="sourceLineNo">162</span> 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,<a name="line.162"></a> +<span class="sourceLineNo">163</span> 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,<a name="line.163"></a> +<span class="sourceLineNo">164</span> 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,<a name="line.164"></a> +<span class="sourceLineNo">165</span> 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,<a name="line.165"></a> +<span class="sourceLineNo">166</span> 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,<a name="line.166"></a> +<span class="sourceLineNo">167</span> 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,<a name="line.167"></a> +<span class="sourceLineNo">168</span> 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,<a name="line.168"></a> +<span class="sourceLineNo">169</span> 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,<a name="line.169"></a> +<span class="sourceLineNo">170</span> 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,<a name="line.170"></a> +<span class="sourceLineNo">171</span> 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,<a name="line.171"></a> +<span class="sourceLineNo">172</span> 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,<a name="line.172"></a> +<span class="sourceLineNo">173</span> 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,<a name="line.173"></a> +<span class="sourceLineNo">174</span> 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,<a name="line.174"></a> +<span class="sourceLineNo">175</span> 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D,<a name="line.175"></a> +<span class="sourceLineNo">176</span> /* T8_1 */<a name="line.176"></a> +<span class="sourceLineNo">177</span> 0x00000000, 0x191B3141, 0x32366282, 0x2B2D53C3,<a name="line.177"></a> +<span class="sourceLineNo">178</span> 0x646CC504, 0x7D77F445, 0x565AA786, 0x4F4196C7,<a name="line.178"></a> +<span class="sourceLineNo">179</span> 0xC8D98A08, 0xD1C2BB49, 0xFAEFE88A, 0xE3F4D9CB,<a name="line.179"></a> +<span class="sourceLineNo">180</span> 0xACB54F0C, 0xB5AE7E4D, 0x9E832D8E, 0x87981CCF,<a name="line.180"></a> +<span class="sourceLineNo">181</span> 0x4AC21251, 0x53D92310, 0x78F470D3, 0x61EF4192,<a name="line.181"></a> +<span class="sourceLineNo">182</span> 0x2EAED755, 0x37B5E614, 0x1C98B5D7, 0x05838496,<a name="line.182"></a> +<span class="sourceLineNo">183</span> 0x821B9859, 0x9B00A918, 0xB02DFADB, 0xA936CB9A,<a name="line.183"></a> +<span class="sourceLineNo">184</span> 0xE6775D5D, 0xFF6C6C1C, 0xD4413FDF, 0xCD5A0E9E,<a name="line.184"></a> +<span class="sourceLineNo">185</span> 0x958424A2, 0x8C9F15E3, 0xA7B24620, 0xBEA97761,<a name="line.185"></a> +<span class="sourceLineNo">186</span> 0xF1E8E1A6, 0xE8F3D0E7, 0xC3DE8324, 0xDAC5B265,<a name="line.186"></a> +<span class="sourceLineNo">187</span> 0x5D5DAEAA, 0x44469FEB, 0x6F6BCC28, 0x7670FD69,<a name="line.187"></a> +<span class="sourceLineNo">188</span> 0x39316BAE, 0x202A5AEF, 0x0B07092C, 0x121C386D,<a name="line.188"></a> +<span class="sourceLineNo">189</span> 0xDF4636F3, 0xC65D07B2, 0xED705471, 0xF46B6530,<a name="line.189"></a> +<span class="sourceLineNo">190</span> 0xBB2AF3F7, 0xA231C2B6, 0x891C9175, 0x9007A034,<a name="line.190"></a> +<span class="sourceLineNo">191</span> 0x179FBCFB, 0x0E848DBA, 0x25A9DE79, 0x3CB2EF38,<a name="line.191"></a> +<span class="sourceLineNo">192</span> 0x73F379FF, 0x6AE848BE, 0x41C51B7D, 0x58DE2A3C,<a name="line.192"></a> +<span class="sourceLineNo">193</span> 0xF0794F05, 0xE9627E44, 0xC24F2D87, 0xDB541CC6,<a name="line.193"></a> +<span class="sourceLineNo">194</span> 0x94158A01, 0x8D0EBB40, 0xA623E883, 0xBF38D9C2,<a name="line.194"></a> +<span class="sourceLineNo">195</span> 0x38A0C50D, 0x21BBF44C, 0x0A96A78F, 0x138D96CE,<a name="line.195"></a> +<span class="sourceLineNo">196</span> 0x5CCC0009, 0x45D73148, 0x6EFA628B, 0x77E153CA,<a name="line.196"></a> +<span class="sourceLineNo">197</span> 0xBABB5D54, 0xA3A06C15, 0x888D3FD6, 0x91960E97,<a name="line.197"></a> +<span class="sourceLineNo">198</span> 0xDED79850, 0xC7CCA911, 0xECE1FAD2, 0xF5FACB93,<a name="line.198"></a> +<span class="sourceLineNo">199</span> 0x7262D75C, 0x6B79E61D, 0x4054B5DE, 0x594F849F,<a name="line.199"></a> +<span class="sourceLineNo">200</span> 0x160E1258, 0x0F152319, 0x243870DA, 0x3D23419B,<a name="line.200"></a> +<span class="sourceLineNo">201</span> 0x65FD6BA7, 0x7CE65AE6, 0x57CB0925, 0x4ED03864,<a name="line.201"></a> +<span class="sourceLineNo">202</span> 0x0191AEA3, 0x188A9FE2, 0x33A7CC21, 0x2ABCFD60,<a name="line.202"></a> +<span class="sourceLineNo">203</span> 0xAD24E1AF, 0xB43FD0EE, 0x9F12832D, 0x8609B26C,<a name="line.203"></a> +<span class="sourceLineNo">204</span> 0xC94824AB, 0xD05315EA, 0xFB7E4629, 0xE2657768,<a name="line.204"></a> +<span class="sourceLineNo">205</span> 0x2F3F79F6, 0x362448B7, 0x1D091B74, 0x04122A35,<a name="line.205"></a> +<span class="sourceLineNo">206</span> 0x4B53BCF2, 0x52488DB3, 0x7965DE70, 0x607EEF31,<a name="line.206"></a> +<span class="sourceLineNo">207</span> 0xE7E6F3FE, 0xFEFDC2BF, 0xD5D0917C, 0xCCCBA03D,<a name="line.207"></a> +<span class="sourceLineNo">208</span> 0x838A36FA, 0x9A9107BB, 0xB1BC5478, 0xA8A76539,<a name="line.208"></a> +<span class="sourceLineNo">209</span> 0x3B83984B, 0x2298A90A, 0x09B5FAC9, 0x10AECB88,<a name="line.209"></a> +<span class="sourceLineNo">210</span> 0x5FEF5D4F, 0x46F46C0E, 0x6DD93FCD, 0x74C20E8C,<a name="line.210"></a> +<span class="sourceLineNo">211</span> 0xF35A1243, 0xEA412302, 0xC16C70C1, 0xD8774180,<a name="line.211"></a> +<span class="sourceLineNo">212</span> 0x9736D747, 0x8E2DE606, 0xA500B5C5, 0xBC1B8484,<a name="line.212"></a> +<span class="sourceLineNo">213</span> 0x71418A1A, 0x685ABB5B, 0x4377E898, 0x5A6CD9D9,<a name="line.213"></a> +<span class="sourceLineNo">214</span> 0x152D4F1E, 0x0C367E5F, 0x271B2D9C, 0x3E001CDD,<a name="line.214"></a> +<span class="sourceLineNo">215</span> 0xB9980012, 0xA0833153, 0x8BAE6290, 0x92B553D1,<a name="line.215"></a> +<span class="sourceLineNo">216</span> 0xDDF4C516, 0xC4EFF457, 0xEFC2A794, 0xF6D996D5,<a name="line.216"></a> +<span class="sourceLineNo">217</span> 0xAE07BCE9, 0xB71C8DA8, 0x9C31DE6B, 0x852AEF2A,<a name="line.217"></a> +<span class="sourceLineNo">218</span> 0xCA6B79ED, 0xD37048AC, 0xF85D1B6F, 0xE1462A2E,<a name="line.218"></a> +<span class="sourceLineNo">219</span> 0x66DE36E1, 0x7FC507A0, 0x54E85463, 0x4DF36522,<a name="line.219"></a> +<span class="sourceLineNo">220</span> 0x02B2F3E5, 0x1BA9C2A4, 0x30849167, 0x299FA026,<a name="line.220"></a> +<span class="sourceLineNo">221</span> 0xE4C5AEB8, 0xFDDE9FF9, 0xD6F3CC3A, 0xCFE8FD7B,<a name="line.221"></a> +<span class="sourceLineNo">222</span> 0x80A96BBC, 0x99B25AFD, 0xB29F093E, 0xAB84387F,<a name="line.222"></a> +<span class="sourceLineNo">223</span> 0x2C1C24B0, 0x350715F1, 0x1E2A4632, 0x07317773,<a name="line.223"></a> +<span class="sourceLineNo">224</span> 0x4870E1B4, 0x516BD0F5, 0x7A468336, 0x635DB277,<a name="line.224"></a> +<span class="sourceLineNo">225</span> 0xCBFAD74E, 0xD2E1E60F, 0xF9CCB5CC, 0xE0D7848D,<a name="line.225"></a> +<span class="sourceLineNo">226</span> 0xAF96124A, 0xB68D230B, 0x9DA070C8, 0x84BB4189,<a name="line.226"></a> +<span class="sourceLineNo">227</span> 0x03235D46, 0x1A386C07, 0x31153FC4, 0x280E0E85,<a name="line.227"></a> +<span class="sourceLineNo">228</span> 0x674F9842, 0x7E54A903, 0x5579FAC0, 0x4C62CB81,<a name="line.228"></a> +<span class="sourceLineNo">229</span> 0x8138C51F, 0x9823F45E, 0xB30EA79D, 0xAA1596DC,<a name="line.229"></a> +<span class="sourceLineNo">230</span> 0xE554001B, 0xFC4F315A, 0xD7626299, 0xCE7953D8,<a name="line.230"></a> +<span class="sourceLineNo">231</span> 0x49E14F17, 0x50FA7E56, 0x7BD72D95, 0x62CC1CD4,<a name="line.231"></a> +<span class="sourceLineNo">232</span> 0x2D8D8A13, 0x3496BB52, 0x1FBBE891, 0x06A0D9D0,<a name="line.232"></a> +<span class="sourceLineNo">233</span> 0x5E7EF3EC, 0x4765C2AD, 0x6C48916E, 0x7553A02F,<a name="line.233"></a> +<span class="sourceLineNo">234</span> 0x3A1236E8, 0x230907A9, 0x0824546A, 0x113F652B,<a name="line.234"></a> +<span class="sourceLineNo">235</span> 0x96A779E4, 0x8FBC48A5, 0xA4911B66, 0xBD8A2A27,<a name="line.235"></a> +<span class="sourceLineNo">236</span> 0xF2CBBCE0, 0xEBD08DA1, 0xC0FDDE62, 0xD9E6EF23,<a name="line.236"></a> +<span class="sourceLineNo">237</span> 0x14BCE1BD, 0x0DA7D0FC, 0x268A833F, 0x3F91B27E,<a name="line.237"></a> +<span class="sourceLineNo">238</span> 0x70D024B9, 0x69CB15F8, 0x42E6463B, 0x5BFD777A,<a name="line.238"></a> +<span class="sourceLineNo">239</span> 0xDC656BB5, 0xC57E5AF4, 0xEE530937, 0xF7483876,<a name="line.239"></a> +<span class="sourceLineNo">240</span> 0xB809AEB1, 0xA1129FF0, 0x8A3FCC33, 0x9324FD72,<a name="line.240"></a> +<span class="sourceLineNo">241</span> /* T8_2 */<a name="line.241"></a> +<span class="sourceLineNo">242</span> 0x00000000, 0x01C26A37, 0x0384D46E, 0x0246BE59,<a name="line.242"></a> +<span class="sourceLineNo">243</span> 0x0709A8DC, 0x06CBC2EB, 0x048D7CB2, 0x054F1685,<a name="line.243"></a> +<span class="sourceLineNo">244</span> 0x0E1351B8, 0x0FD13B8F, 0x0D9785D6, 0x0C55EFE1,<a name="line.244"></a> +<span class="sourceLineNo">245</span> 0x091AF964, 0x08D89353, 0x0A9E2D0A, 0x0B5C473D,<a name="line.245"></a> +<span class="sourceLineNo">246</span> 0x1C26A370, 0x1DE4C947, 0x1FA2771E, 0x1E601D29,<a name="line.246"></a> +<span class="sourceLineNo">247</span> 0x1B2F0BAC, 0x1AED619B, 0x18ABDFC2, 0x1969B5F5,<a name="line.247"></a> +<span class="sourceLineNo">248</span> 0x1235F2C8, 0x13F798FF, 0x11B126A6, 0x10734C91,<a name="line.248"></a> +<span class="sourceLineNo">249</span> 0x153C5A14, 0x14FE3023, 0x16B88E7A, 0x177AE44D,<a name="line.249"></a> +<span class="sourceLineNo">250</span> 0x384D46E0, 0x398F2CD7, 0x3BC9928E, 0x3A0BF8B9,<a name="line.250"></a> +<span class="sourceLineNo">251</span> 0x3F44EE3C, 0x3E86840B, 0x3CC03A52, 0x3D025065,<a name="line.251"></a> +<span class="sourceLineNo">252</span> 0x365E1758, 0x379C7D6F, 0x35DAC336, 0x3418A901,<a name="line.252"></a> +<span class="sourceLineNo">253</span> 0x3157BF84, 0x3095D5B3, 0x32D36BEA, 0x331101DD,<a name="line.253"></a> +<span class="sourceLineNo">254</span> 0x246BE590, 0x25A98FA7, 0x27EF31FE, 0x262D5BC9,<a name="line.254"></a> +<span class="sourceLineNo">255</span> 0x23624D4C, 0x22A0277B, 0x20E69922, 0x2124F315,<a name="line.255"></a> +<span class="sourceLineNo">256</span> 0x2A78B428, 0x2BBADE1F, 0x29FC6046, 0x283E0A71,<a name="line.256"></a> +<span class="sourceLineNo">257</span> 0x2D711CF4, 0x2CB376C3, 0x2EF5C89A, 0x2F37A2AD,<a name="line.257"></a> +<span class="sourceLineNo">258</span> 0x709A8DC0, 0x7158E7F7, 0x731E59AE, 0x72DC3399,<a name="line.258"></a> +<span class="sourceLineNo">259</span> 0x7793251C, 0x76514F2B, 0x7417F172, 0x75D59B45,<a name="line.259"></a> +<span class="sourceLineNo">260</span> 0x7E89DC78, 0x7F4BB64F, 0x7D0D0816, 0x7CCF6221,<a name="line.260"></a> +<span class="sourceLineNo">261</span> 0x798074A4, 0x78421E93, 0x7A04A0CA, 0x7BC6CAFD,<a name="line.261"></a> +<span class="sourceLineNo">262</span> 0x6CBC2EB0, 0x6D7E4487, 0x6F38FADE, 0x6EFA90E9,<a name="line.262"></a> +<span class="sourceLineNo">263</span> 0x6BB5866C, 0x6A77EC5B, 0x68315202, 0x69F33835,<a name="line.263"></a> +<span class="sourceLineNo">264</span> 0x62AF7F08, 0x636D153F, 0x612BAB66, 0x60E9C151,<a name="line.264"></a> +<span class="sourceLineNo">265</span> 0x65A6D7D4, 0x6464BDE3, 0x662203BA, 0x67E0698D,<a name="line.265"></a> +<span class="sourceLineNo">266</span> 0x48D7CB20, 0x4915A117, 0x4B531F4E, 0x4A917579,<a name="line.266"></a> +<span class="sourceLineNo">267</span> 0x4FDE63FC, 0x4E1C09CB, 0x4C5AB792, 0x4D98DDA5,<a name="line.267"></a> +<span class="sourceLineNo">268</span> 0x46C49A98, 0x4706F0AF, 0x45404EF6, 0x448224C1,<a name="line.268"></a> +<span class="sourceLineNo">269</span> 0x41CD3244, 0x400F5873, 0x4249E62A, 0x438B8C1D,<a name="line.269"></a> +<span class="sourceLineNo">270</span> 0x54F16850, 0x55330267, 0x5775BC3E, 0x56B7D609,<a name="line.270"></a> +<span class="sourceLineNo">271</span> 0x53F8C08C, 0x523AAABB, 0x507C14E2, 0x51BE7ED5,<a name="line.271"></a> +<span class="sourceLineNo">272</span> 0x5AE239E8, 0x5B2053DF, 0x5966ED86, 0x58A487B1,<a name="line.272"></a> +<span class="sourceLineNo">273</span> 0x5DEB9134, 0x5C29FB03, 0x5E6F455A, 0x5FAD2F6D,<a name="line.273"></a> +<span class="sourceLineNo">274</span> 0xE1351B80, 0xE0F771B7, 0xE2B1CFEE, 0xE373A5D9,<a name="line.274"></a> +<span class="sourceLineNo">275</span> 0xE63CB35C, 0xE7FED96B, 0xE5B86732, 0xE47A0D05,<a name="line.275"></a> +<span class="sourceLineNo">276</span> 0xEF264A38, 0xEEE4200F, 0xECA29E56, 0xED60F461,<a name="line.276"></a> +<span class="sourceLineNo">277</span> 0xE82FE2E4, 0xE9ED88D3, 0xEBAB368A, 0xEA695CBD,<a name="line.277"></a> +<span class="sourceLineNo">278</span> 0xFD13B8F0, 0xFCD1D2C7, 0xFE976C9E, 0xFF5506A9,<a name="line.278"></a> +<span class="sourceLineNo">279</span> 0xFA1A102C, 0xFBD87A1B, 0xF99EC442, 0xF85CAE75,<a name="line.279"></a> +<span class="sourceLineNo">280</span> 0xF300E948, 0xF2C2837F, 0xF0843D26, 0xF1465711,<a name="line.280"></a> +<span class="sourceLineNo">281</span> 0xF4094194, 0xF5CB2BA3, 0xF78D95FA, 0xF64FFFCD,<a name="line.281"></a> +<span class="sourceLineNo">282</span> 0xD9785D60, 0xD8BA3757, 0xDAFC890E, 0xDB3EE339,<a name="line.282"></a> +<span class="sourceLineNo">283</span> 0xDE71F5BC, 0xDFB39F8B, 0xDDF521D2, 0xDC374BE5,<a name="line.283"></a> +<span class="sourceLineNo">284</span> 0xD76B0CD8, 0xD6A966EF, 0xD4EFD8B6, 0xD52DB281,<a name="line.284"></a> +<span class="sourceLineNo">285</span> 0xD062A404, 0xD1A0CE33, 0xD3E6706A, 0xD2241A5D,<a name="line.285"></a> +<span class="sourceLineNo">286</span> 0xC55EFE10, 0xC49C9427, 0xC6DA2A7E, 0xC7184049,<a name="line.286"></a> +<span class="sourceLineNo">287</span> 0xC25756CC, 0xC3953CFB, 0xC1D382A2, 0xC011E895,<a name="line.287"></a> +<span class="sourceLineNo">288</span> 0xCB4DAFA8, 0xCA8FC59F, 0xC8C97BC6, 0xC90B11F1,<a name="line.288"></a> +<span class="sourceLineNo">289</span> 0xCC440774, 0xCD866D43, 0xCFC0D31A, 0xCE02B92D,<a name="line.289"></a> +<span class="sourceLineNo">290</span> 0x91AF9640, 0x906DFC77, 0x922B422E, 0x93E92819,<a name="line.290"></a> +<span class="sourceLineNo">291</span> 0x96A63E9C, 0x976454AB, 0x9522EAF2, 0x94E080C5,<a name="line.291"></a> +<span class="sourceLineNo">292</span> 0x9FBCC7F8, 0x9E7EADCF, 0x9C381396, 0x9DFA79A1,<a name="line.292"></a> +<span class="sourceLineNo">293</span> 0x98B56F24, 0x99770513, 0x9B31BB4A, 0x9AF3D17D,<a name="line.293"></a> +<span class="sourceLineNo">294</span> 0x8D893530, 0x8C4B5F07, 0x8E0DE15E, 0x8FCF8B69,<a name="line.294"></a> +<span class="sourceLineNo">295</span> 0x8A809DEC, 0x8B42F7DB, 0x89044982, 0x88C623B5,<a name="line.295"></a> +<span class="sourceLineNo">296</span> 0x839A6488, 0x82580EBF, 0x801EB0E6, 0x81DCDAD1,<a name="line.296"></a> +<span class="sourceLineNo">297</span> 0x8493CC54, 0x8551A663, 0x8717183A, 0x86D5720D,<a name="line.297"></a> +<span class="sourceLineNo">298</span> 0xA9E2D0A0, 0xA820BA97, 0xAA6604CE, 0xABA46EF9,<a name="line.298"></a> +<span class="sourceLineNo">299</span> 0xAEEB787C, 0xAF29124B, 0xAD6FAC12, 0xACADC625,<a name="line.299"></a> +<span class="sourceLineNo">300</span> 0xA7F18118, 0xA633EB2F, 0xA4755576, 0xA5B73F41,<a name="line.300"></a> +<span class="sourceLineNo">301</span> 0xA0F829C4, 0xA13A43F3, 0xA37CFDAA, 0xA2BE979D,<a name="line.301"></a> +<span class="sourceLineNo">302</span> 0xB5C473D0, 0xB40619E7, 0xB640A7BE, 0xB782CD89,<a name="line.302"></a> +<span class="sourceLineNo">303</span> 0xB2CDDB0C, 0xB30FB13B, 0xB1490F62, 0xB08B6555,<a name="line.303"></a> +<span class="sourceLineNo">304</span> 0xBBD72268, 0xBA15485F, 0xB853F606, 0xB9919C31,<a name="line.304"></a> +<span class="sourceLineNo">305</span> 0xBCDE8AB4, 0xBD1CE083, 0xBF5A5EDA, 0xBE9834ED,<a name="line.305"></a> +<span class="sourceLineNo">306</span> /* T8_3 */<a name="line.306"></a> +<span class="sourceLineNo">307</span> 0x00000000, 0xB8BC6765, 0xAA09C88B, 0x12B5AFEE,<a name="line.307"></a> +<span class="sourceLineNo">308</span> 0x8F629757, 0x37DEF032, 0x256B5FDC, 0x9DD738B9,<a name="line.308"></a> +<span class="sourceLineNo">309</span> 0xC5B428EF, 0x7D084F8A, 0x6FBDE064, 0xD7018701,<a name="line.309"></a> +<span class="sourceLineNo">310</span> 0x4AD6BFB8, 0xF26AD8DD, 0xE0DF7733, 0x58631056,<a name="line.310"></a> +<span class="sourceLineNo">311</span> 0x5019579F, 0xE8A530FA, 0xFA109F14, 0x42ACF871,<a name="line.311"></a> +<span class="sourceLineNo">312</span> 0xDF7BC0C8, 0x67C7A7AD, 0x75720843, 0xCDCE6F26,<a name="line.312"></a> +<span class="sourceLineNo">313</span> 0x95AD7F70, 0x2D111815, 0x3FA4B7FB, 0x8718D09E,<a name="line.313"></a> +<span class="sourceLineNo">314</span> 0x1ACFE827, 0xA2738F42, 0xB0C620AC, 0x087A47C9,<a name="line.314"></a> +<span class="sourceLineNo">315</span> 0xA032AF3E, 0x188EC85B, 0x0A3B67B5, 0xB28700D0,<a name="line.315"></a> +<span class="sourceLineNo">316</span> 0x2F503869, 0x97EC5F0C, 0x8559F0E2, 0x3DE59787,<a name="line.316"></a> +<span class="sourceLineNo">317</span> 0x658687D1, 0xDD3AE0B4, 0xCF8F4F5A, 0x7733283F,<a name="line.317"></a> +<span class="sourceLineNo">318</span> 0xEAE41086, 0x525877E3, 0x40EDD80D, 0xF851BF68,<a name="line.318"></a> +<span class="sourceLineNo">319</span> 0xF02BF8A1, 0x48979FC4, 0x5A22302A, 0xE29E574F,<a name="line.319"></a> +<span class="sourceLineNo">320</span> 0x7F496FF6, 0xC7F50893, 0xD540A77D, 0x6DFCC018,<a name="line.320"></a> +<span class="sourceLineNo">321</span> 0x359FD04E, 0x8D23B72B, 0x9F9618C5, 0x272A7FA0,<a name="line.321"></a> +<span class="sourceLineNo">322</span> 0xBAFD4719, 0x0241207C, 0x10F48F92, 0xA848E8F7,<a name="line.322"></a> +<span class="sourceLineNo">323</span> 0x9B14583D, 0x23A83F58, 0x311D90B6, 0x89A1F7D3,<a name="line.323"></a> +<span class="sourceLineNo">324</span> 0x1476CF6A, 0xACCAA80F, 0xBE7F07E1, 0x06C36084,<a name="line.324"></a> +<span class="sourceLineNo">325</span> 0x5EA070D2, 0xE61C17B7, 0xF4A9B859, 0x4C15DF3C,<a name="line.325"></a> +<span class="sourceLineNo">326</span> 0xD1C2E785, 0x697E80E0, 0x7BCB2F0E, 0xC377486B,<a name="line.326"></a> +<span class="sourceLineNo">327</span> 0xCB0D0FA2, 0x73B168C7, 0x6104C729, 0xD9B8A04C,<a name="line.327"></a> +<span class="sourceLineNo">328</span> 0x446F98F5, 0xFCD3FF90, 0xEE66507E, 0x56DA371B,<a name="line.328"></a> +<span class="sourceLineNo">329</span> 0x0EB9274D, 0xB6054028, 0xA4B0EFC6, 0x1C0C88A3,<a name="line.329"></a> +<span class="sourceLineNo">330</span> 0x81DBB01A, 0x3967D77F, 0x2BD27891, 0x936E1FF4,<a name="line.330"></a> +<span class="sourceLineNo">331</span> 0x3B26F703, 0x839A9066, 0x912F3F88, 0x299358ED,<a name="line.331"></a> +<span class="sourceLineNo">332</span> 0xB4446054, 0x0CF80731, 0x1E4DA8DF, 0xA6F1CFBA,<a name="line.332"></a> +<span class="sourceLineNo">333</span> 0xFE92DFEC, 0x462EB889, 0x549B1767, 0xEC277002,<a name="line.333"></a> +<span class="sourceLineNo">334</span> 0x71F048BB, 0xC94C2FDE, 0xDBF98030, 0x6345E755,<a name="line.334"></a> +<span class="sourceLineNo">335</span> 0x6B3FA09C, 0xD383C7F9, 0xC1366817, 0x798A0F72,<a name="line.335"></a> +<span class="sourceLineNo">336</span> 0xE45D37CB, 0x5CE150AE, 0x4E54FF40, 0xF6E89825,<a name="line.336"></a> +<span class="sourceLineNo">337</span> 0xAE8B8873, 0x1637EF16, 0x048240F8, 0xBC3E279D,<a name="line.337"></a> +<span class="sourceLineNo">338</span> 0x21E91F24, 0x99557841, 0x8BE0D7AF, 0x335CB0CA,<a name="line.338"></a> +<span class="sourceLineNo">339</span> 0xED59B63B, 0x55E5D15E, 0x47507EB0, 0xFFEC19D5,<a name="line.339"></a> +<span class="sourceLineNo">340</span> 0x623B216C, 0xDA874609, 0xC832E9E7, 0x708E8E82,<a name="line.340"></a> +<span class="sourceLineNo">341</span> 0x28ED9ED4, 0x9051F9B1, 0x82E4565F, 0x3A58313A,<a name="line.341"></a> +<span class="sourceLineNo">342</span> 0xA78F0983, 0x1F336EE6, 0x0D86C108, 0xB53AA66D,<a name="line.342"></a> +<span class="sourceLineNo">343</span> 0xBD40E1A4, 0x05FC86C1, 0x1749292F, 0xAFF54E4A,<a name="line.343"></a> +<span class="sourceLineNo">344</span> 0x322276F3, 0x8A9E1196, 0x982BBE78, 0x2097D91D,<a name="line.344"></a> +<span class="sourceLineNo">345</span> 0x78F4C94B, 0xC048AE2E, 0xD2FD01C0, 0x6A4166A5,<a name="line.345"></a> +<span class="sourceLineNo">346</span> 0xF7965E1C, 0x4F2A3979, 0x5D9F9697, 0xE523F1F2,<a name="line.346"></a> +<span class="sourceLineNo">347</span> 0x4D6B1905, 0xF5D77E60, 0xE762D18E, 0x5FDEB6EB,<a name="line.347"></a> +<span class="sourceLineNo">348</span> 0xC2098E52, 0x7AB5E937, 0x680046D9, 0xD0BC21BC,<a name="line.348"></a> +<span class="sourceLineNo">349</span> 0x88DF31EA, 0x3063568F, 0x22D6F961, 0x9A6A9E04,<a name="line.349"></a> +<span class="sourceLineNo">350</span> 0x07BDA6BD, 0xBF01C1D8, 0xADB46E36, 0x15080953,<a name="line.350"></a> +<span class="sourceLineNo">351</span> 0x1D724E9A, 0xA5CE29FF, 0xB77B8611, 0x0FC7E174,<a name="line.351"></a> +<span class="sourceLineNo">352</span> 0x9210D9CD, 0x2AACBEA8, 0x38191146, 0x80A57623,<a name="line.352"></a> +<span class="sourceLineNo">353</span> 0xD8C66675, 0x607A0110, 0x72CFAEFE, 0xCA73C99B,<a name="line.353"></a> +<span class="sourceLineNo">354</span> 0x57A4F122, 0xEF189647, 0xFDAD39A9, 0x45115ECC,<a name="line.354"></a> +<span class="sourceLineNo">355</span> 0x764DEE06, 0xCEF18963, 0xDC44268D, 0x64F841E8,<a name="line.355"></a> +<span class="sourceLineNo">356</span> 0xF92F7951, 0x41931E34, 0x5326B1DA, 0xEB9AD6BF,<a name="line.356"></a> +<span class="sourceLineNo">357</span> 0xB3F9C6E9, 0x0B45A18C, 0x19F00E62, 0xA14C6907,<a name="line.357"></a> +<span class="sourceLineNo">358</span> 0x3C9B51BE, 0x842736DB, 0x96929935, 0x2E2EFE50,<a name="line.358"></a> +<span class="sourceLineNo">359</span> 0x2654B999, 0x9EE8DEFC, 0x8C5D7112, 0x34E11677,<a name="line.359"></a> +<span class="sourceLineNo">360</span> 0xA9362ECE, 0x118A49AB, 0x033FE645, 0xBB838120,<a name="line.360"></a> +<span class="sourceLineNo">361</span> 0xE3E09176, 0x5B5CF613, 0x49E959FD, 0xF1553E98,<a name="line.361"></a> +<span class="sourceLineNo">362</span> 0x6C820621, 0xD43E6144, 0xC68BCEAA, 0x7E37A9CF,<a name="line.362"></a> +<span class="sourceLineNo">363</span> 0xD67F4138, 0x6EC3265D, 0x7C7689B3, 0xC4CAEED6,<a name="line.363"></a> +<span class="sourceLineNo">364</span> 0x591DD66F, 0xE1A1B10A, 0xF3141EE4, 0x4BA87981,<a name="line.364"></a> +<span class="sourceLineNo">365</span> 0x13CB69D7, 0xAB770EB2, 0xB9C2A15C, 0x017EC639,<a name="line.365"></a> +<span class="sourceLineNo">366</span> 0x9CA9FE80, 0x241599E5, 0x36A0360B, 0x8E1C516E,<a name="line.366"></a> +<span class="sourceLineNo">367</span> 0x866616A7, 0x3EDA71C2, 0x2C6FDE2C, 0x94D3B949,<a name="line.367"></a> +<span class="sourceLineNo">368</span> 0x090481F0, 0xB1B8E695, 0xA30D497B, 0x1BB12E1E,<a name="line.368"></a> +<span class="sourceLineNo">369</span> 0x43D23E48, 0xFB6E592D, 0xE9DBF6C3, 0x516791A6,<a name="line.369"></a> +<span class="sourceLineNo">370</span> 0xCCB0A91F, 0x740CCE7A, 0x66B96194, 0xDE0506F1,<a name="line.370"></a> +<span class="sourceLineNo">371</span> /* T8_4 */<a name="line.371"></a> +<span class="sourceLineNo">372</span> 0x00000000, 0x3D6029B0, 0x7AC05360, 0x47A07AD0,<a name="line.372"></a> +<span class="sourceLineNo">373</span> 0xF580A6C0, 0xC8E08F70, 0x8F40F5A0, 0xB220DC10,<a name="line.373"></a> +<span class="sourceLineNo">374</span> 0x30704BC1, 0x0D106271, 0x4AB018A1, 0x77D03111,<a name="line.374"></a> +<span class="sourceLineNo">375</span> 0xC5F0ED01, 0xF890C4B1, 0xBF30BE61, 0x825097D1,<a name="line.375"></a> +<span class="sourceLineNo">376</span> 0x60E09782, 0x5D80BE32, 0x1A20C4E2, 0x2740ED52,<a name="line.376"></a> +<span class="sourceLineNo">377</span> 0x95603142, 0xA80018F2, 0xEFA06222, 0xD2C04B92,<a name="line.377"></a> +<span class="sourceLineNo">378</span> 0x5090DC43, 0x6DF0F5F3, 0x2A508F23, 0x1730A693,<a name="line.378"></a> +<span class="sourceLineNo">379</span> 0xA5107A83, 0x98705333, 0xDFD029E3, 0xE2B00053,<a name="line.379"></a> +<span class="sourceLineNo">380</span> 0xC1C12F04, 0xFCA106B4, 0xBB017C64, 0x866155D4,<a name="line.380"></a> +<span class="sourceLineNo">381</span> 0x344189C4, 0x0921A074, 0x4E81DAA4, 0x73E1F314,<a name="line.381"></a> +<span class="sourceLineNo">382</span> 0xF1B164C5, 0xCCD14D75, 0x8B7137A5, 0xB6111E15,<a name="line.382"></a> +<span class="sourceLineNo">383</span> 0x0431C205, 0x3951EBB5, 0x7EF19165, 0x4391B8D5,<a name="line.383"></a> +<span class="sourceLineNo">384</span> 0xA121B886, 0x9C419136, 0xDBE1EBE6, 0xE681C256,<a name="line.384"></a> +<span class="sourceLineNo">385</span> 0x54A11E46, 0x69C137F6, 0x2E614D26, 0x13016496,<a name="line.385"></a> +<span class="sourceLineNo">386</span> 0x9151F347, 0xAC31DAF7, 0xEB91A027, 0xD6F18997,<a name="line.386"></a> +<span class="sourceLineNo">387</span> 0x64D15587, 0x59B17C37, 0x1E1106E7, 0x23712F57,<a name="line.387"></a> +<span class="sourceLineNo">388</span> 0x58F35849, 0x659371F9, 0x22330B29, 0x1F532299,<a name="line.388"></a> +<span class="sourceLineNo">389</span> 0xAD73FE89, 0x9013D739, 0xD7B3ADE9, 0xEAD38459,<a name="line.389"></a> +<span class="sourceLineNo">390</span> 0x68831388, 0x55E33A38, 0x124340E8, 0x2F236958,<a name="line.390"></a> +<span class="sourceLineNo">391</span> 0x9D03B548, 0xA0639CF8, 0xE7C3E628, 0xDAA3CF98,<a name="line.391"></a> +<span class="sourceLineNo">392</span> 0x3813CFCB, 0x0573E67B, 0x42D39CAB, 0x7FB3B51B,<a name="line.392"></a> +<span class="sourceLineNo">393</span> 0xCD93690B, 0xF0F340BB, 0xB7533A6B, 0x8A3313DB,<a name="line.393"></a> +<span class="sourceLineNo">394</span> 0x0863840A, 0x3503ADBA, 0x72A3D76A, 0x4FC3FEDA,<a name="line.394"></a> +<span class="sourceLineNo">395</span> 0xFDE322CA, 0xC0830B7A, 0x872371AA, 0xBA43581A,<a name="line.395"></a> +<span class="sourceLineNo">396</span> 0x9932774D, 0xA4525EFD, 0xE3F2242D, 0xDE920D9D,<a name="line.396"></a> +<span class="sourceLineNo">397</span> 0x6CB2D18D, 0x51D2F83D, 0x167282ED, 0x2B12AB5D,<a name="line.397"></a> +<span class="sourceLineNo">398</span> 0xA9423C8C, 0x9422153C, 0xD3826FEC, 0xEEE2465C,<a name="line.398"></a> +<span class="sourceLineNo">399</span> 0x5CC29A4C, 0x61A2B3FC, 0x2602C92C, 0x1B62E09C,<a name="line.399"></a> +<span class="sourceLineNo">400</span> 0xF9D2E0CF, 0xC4B2C97F, 0x8312B3AF, 0xBE729A1F,<a name="line.400"></a> +<span class="sourceLineNo">401</span> 0x0C52460F, 0x31326FBF, 0x7692156F, 0x4BF23CDF,<a name="line.401"></a> +<span class="sourceLineNo">402</span> 0xC9A2AB0E, 0xF4C282BE, 0xB362F86E, 0x8E02D1DE,<a name="line.402"></a> +<span class="sourceLineNo">403</span> 0x3C220DCE, 0x0142247E, 0x46E25EAE, 0x7B82771E,<a name="line.403"></a> +<span class="sourceLineNo">404</span> 0xB1E6B092, 0x8C869922, 0xCB26E3F2, 0xF646CA42,<a name="line.404"></a> +<span class="sourceLineNo">405</span> 0x44661652, 0x79063FE2, 0x3EA64532, 0x03C66C82,<a name="line.405"></a> +<span class="sourceLineNo">406</span> 0x8196FB53, 0xBCF6D2E3, 0xFB56A833, 0xC6368183,<a name="line.406"></a> +<span class="sourceLineNo">407</span> 0x74165D93, 0x49767423, 0x0ED60EF3, 0x33B62743,<a name="line.407"></a> +<span class="sourceLineNo">408</span> 0xD1062710, 0xEC660EA0, 0xABC67470, 0x96A65DC0,<a name="line.408"></a> +<span class="sourceLineNo">409</span> 0x248681D0, 0x19E6A860, 0x5E46D2B0, 0x6326FB00,<a name="line.409"></a> +<span class="sourceLineNo">410</span> 0xE1766CD1, 0xDC164561, 0x9BB63FB1, 0xA6D61601,<a name="line.410"></a> +<span class="sourceLineNo">411</span> 0x14F6CA11, 0x2996E3A1, 0x6E369971, 0x5356B0C1,<a name="line.411"></a> +<span class="sourceLineNo">412</span> 0x70279F96, 0x4D47B626, 0x0AE7CCF6, 0x3787E546,<a name="line.412"></a> +<span class="sourceLineNo">413</span> 0x85A73956, 0xB8C710E6, 0xFF676A36, 0xC2074386,<a name="line.413"></a> +<span class="sourceLineNo">414</span> 0x4057D457, 0x7D37FDE7, 0x3A978737, 0x07F7AE87,<a name="line.414"></a> +<span class="sourceLineNo">415</span> 0xB5D77297, 0x88B75B27, 0xCF1721F7, 0xF2770847,<a name="line.415"></a> +<span class="sourceLineNo">416</span> 0x10C70814, 0x2DA721A4, 0x6A075B74, 0x576772C4,<a name="line.416"></a> +<span class="sourceLineNo">417</span> 0xE547AED4, 0xD8278764, 0x9F87FDB4, 0xA2E7D404,<a name="line.417"></a> +<span class="sourceLineNo">418</span> 0x20B743D5, 0x1DD76A65, 0x5A7710B5, 0x67173905,<a name="line.418"></a> +<span class="sourceLineNo">419</span> 0xD537E515, 0xE857CCA5, 0xAFF7B675, 0x92979FC5,<a name="line.419"></a> +<span class="sourceLineNo">420</span> 0xE915E8DB, 0xD475C16B, 0x93D5BBBB, 0xAEB5920B,<a name="line.420"></a> +<span class="sourceLineNo">421</span> 0x1C954E1B, 0x21F567AB, 0x66551D7B, 0x5B3534CB,<a name="line.421"></a> +<span class="sourceLineNo">422</span> 0xD965A31A, 0xE4058AAA, 0xA3A5F07A, 0x9EC5D9CA,<a name="line.422"></a> +<span class="sourceLineNo">423</span> 0x2CE505DA, 0x11852C6A, 0x562556BA, 0x6B457F0A,<a name="line.423"></a> +<span class="sourceLineNo">424</span> 0x89F57F59, 0xB49556E9, 0xF3352C39, 0xCE550589,<a name="line.424"></a> +<span class="sourceLineNo">425</span> 0x7C75D999, 0x4115F029, 0x06B58AF9, 0x3BD5A349,<a name="line.425"></a> +<span class="sourceLineNo">426</span> 0xB9853498, 0x84E51D28, 0xC34567F8, 0xFE254E48,<a name="line.426"></a> +<span class="sourceLineNo">427</span> 0x4C059258, 0x7165BBE8, 0x36C5C138, 0x0BA5E888,<a name="line.427"></a> +<span class="sourceLineNo">428</span> 0x28D4C7DF, 0x15B4EE6F, 0x521494BF, 0x6F74BD0F,<a name="line.428"></a> +<span class="sourceLineNo">429</span> 0xDD54611F, 0xE03448AF, 0xA794327F, 0x9AF41BCF,<a name="line.429"></a> +<span class="sourceLineNo">430</span> 0x18A48C1E, 0x25C4A5AE, 0x6264DF7E, 0x5F04F6CE,<a name="line.430"></a> +<span class="sourceLineNo">431</span> 0xED242ADE, 0xD044036E, 0x97E479BE, 0xAA84500E,<a name="line.431"></a> +<span class="sourceLineNo">432</span> 0x4834505D, 0x755479ED, 0x32F4033D, 0x0F942A8D,<a name="line.432"></a> +<span class="sourceLineNo">433</span> 0xBDB4F69D, 0x80D4DF2D, 0xC774A5FD, 0xFA148C4D,<a name="line.433"></a> +<span class="sourceLineNo">434</span> 0x78441B9C, 0x4524322C, 0x028448FC, 0x3FE4614C,<a name="line.434"></a> +<span class="sourceLineNo">435</span> 0x8DC4BD5C, 0xB0A494EC, 0xF704EE3C, 0xCA64C78C,<a name="line.435"></a> +<span class="sourceLineNo">436</span> /* T8_5 */<a name="line.436"></a> +<span class="sourceLineNo">437</span> 0x00000000, 0xCB5CD3A5, 0x4DC8A10B, 0x869472AE,<a name="line.437"></a> +<span class="sourceLineNo">438</span> 0x9B914216, 0x50CD91B3, 0xD659E31D, 0x1D0530B8,<a name="line.438"></a> +<span class="sourceLineNo">439</span> 0xEC53826D, 0x270F51C8, 0xA19B2366, 0x6AC7F0C3,<a name="line.439"></a> +<span class="sourceLineNo">440</span> 0x77C2C07B, 0xBC9E13DE, 0x3A0A6170, 0xF156B2D5,<a name="line.440"></a> +<span class="sourceLineNo">441</span> 0x03D6029B, 0xC88AD13E, 0x4E1EA390, 0x85427035,<a name="line.441"></a> +<span class="sourceLineNo">442</span> 0x9847408D, 0x531B9328, 0xD58FE186, 0x1ED33223,<a name="line.442"></a> +<span class="sourceLineNo">443</span> 0xEF8580F6, 0x24D95353, 0xA24D21FD, 0x6911F258,<a name="line.443"></a> +<span class="sourceLineNo">444</span> 0x7414C2E0, 0xBF481145, 0x39DC63EB, 0xF280B04E,<a name="line.444"></a> +<span class="sourceLineNo">445</span> 0x07AC0536, 0xCCF0D693, 0x4A64A43D, 0x81387798,<a name="line.445"></a> +<span class="sourceLineNo">446</span> 0x9C3D4720, 0x57619485, 0xD1F5E62B, 0x1AA9358E,<a name="line.446"></a> +<span class="sourceLineNo">447</span> 0xEBFF875B, 0x20A354FE, 0xA6372650, 0x6D6BF5F5,<a name="line.447"></a> +<span class="sourceLineNo">448</span> 0x706EC54D, 0xBB3216E8, 0x3DA66446, 0xF6FAB7E3,<a name="line.448"></a> +<span class="sourceLineNo">449</span> 0x047A07AD, 0xCF26D408, 0x49B2A6A6, 0x82EE7503,<a name="line.449"></a> +<span class="sourceLineNo">450</span> 0x9FEB45BB, 0x54B7961E, 0xD223E4B0, 0x197F3715,<a name="line.450"></a> +<span class="sourceLineNo">451</span> 0xE82985C0, 0x23755665, 0xA5E124CB, 0x6EBDF76E,<a name="line.451"></a> +<span class="sourceLineNo">452</span> 0x73B8C7D6, 0xB8E41473, 0x3E7066DD, 0xF52CB578,<a name="line.452"></a> +<span class="sourceLineNo">453</span> 0x0F580A6C, 0xC404D9C9, 0x4290AB67, 0x89CC78C2,<a name="line.453"></a> +<span class="sourceLineNo">454</span> 0x94C9487A, 0x5F959BDF, 0xD901E971, 0x125D3AD4,<a name="line.454"></a> +<span class="sourceLineNo">455</span> 0xE30B8801, 0x28575BA4, 0xAEC3290A, 0x659FFAAF,<a name="line.455"></a> +<span class="sourceLineNo">456</span> 0x789ACA17, 0xB3C619B2, 0x35526B1C, 0xFE0EB8B9,<a name="line.456"></a> +<span class="sourceLineNo">457</span> 0x0C8E08F7, 0xC7D2DB52, 0x4146A9FC, 0x8A1A7A59,<a name="line.457"></a> +<span class="sourceLineNo">458</span> 0x971F4AE1, 0x5C439944, 0xDAD7EBEA, 0x118B384F,<a name="line.458"></a> +<span class="sourceLineNo">459</span> 0xE0DD8A9A, 0x2B81593F, 0xAD152B91, 0x6649F834,<a name="line.459"></a> +<span class="sourceLineNo">460</span> 0x7B4CC88C, 0xB0101B29, 0x36846987, 0xFDD8BA22,<a name="line.460"></a> +<span class="sourceLineNo">461</span> 0x08F40F5A, 0xC3A8DCFF, 0x453CAE51, 0x8E607DF4,<a name="line.461"></a> +<span class="sourceLineNo">462</span> 0x93654D4C, 0x58399EE9, 0xDEADEC47, 0x15F13FE2,<a name="line.462"></a> +<span class="sourceLineNo">463</span> 0xE4A78D37, 0x2FFB5E92, 0xA96F2C3C, 0x6233FF99,<a name="line.463"></a> +<span class="sourceLineNo">464</span> 0x7F36CF21, 0xB46A1C84, 0x32FE6E2A, 0xF9A2BD8F,<a name="line.464"></a> +<span class="sourceLineNo">465</span> 0x0B220DC1, 0xC07EDE64, 0x46EAACCA, 0x8DB67F6F,<a name="line.465"></a> +<span class="sourceLineNo">466</span> 0x90B34FD7, 0x5BEF9C72, 0xDD7BEEDC, 0x16273D79,<a name="line.466"></a> +<span class="sourceLineNo">467</span> 0xE7718FAC, 0x2C2D5C09, 0xAAB92EA7, 0x61E5FD02,<a name="line.467"></a> +<span class="sourceLineNo">468</span> 0x7CE0CDBA, 0xB7BC1E1F, 0x31286CB1, 0xFA74BF14,<a name="line.468"></a> +<span class="sourceLineNo">469</span> 0x1EB014D8, 0xD5ECC77D, 0x5378B5D3, 0x98246676,<a name="line.469"></a> +<span class="sourceLineNo">470</span> 0x852156CE, 0x4E7D856B, 0xC8E9F7C5, 0x03B52460,<a name="line.470"></a> +<span class="sourceLineNo">471</span> 0xF2E396B5, 0x39BF4510, 0xBF2B37BE, 0x7477E41B,<a name="line.471"></a> +<span class="sourceLineNo">472</span> 0x6972D4A3, 0xA22E0706, 0x24BA75A8, 0xEFE6A60D,<a name="line.472"></a> +<span class="sourceLineNo">473</span> 0x1D661643, 0xD63AC5E6, 0x50AEB748, 0x9BF264ED,<a name="line.473"></a> +<span class="sourceLineNo">474</span> 0x86F75455, 0x4DAB87F0, 0xCB3FF55E, 0x006326FB,<a name="line.474"></a> +<span class="sourceLineNo">475</span> 0xF135942E, 0x3A69478B, 0xBCFD3525, 0x77A1E680,<a name="line.475"></a> +<span class="sourceLineNo">476</span> 0x6AA4D638, 0xA1F8059D, 0x276C7733, 0xEC30A496,<a name="line.476"></a> +<span class="sourceLineNo">477</span> 0x191C11EE, 0xD240C24B, 0x54D4B0E5, 0x9F886340,<a name="line.477"></a> +<span class="sourceLineNo">478</span> 0x828D53F8, 0x49D1805D, 0xCF45F2F3, 0x04192156,<a name="line.478"></a> +<span class="sourceLineNo">479</span> 0xF54F9383, 0x3E134026, 0xB8873288, 0x73DBE12D,<a name="line.479"></a> +<span class="sourceLineNo">480</span> 0x6EDED195, 0xA5820230, 0x2316709E, 0xE84AA33B,<a name="line.480"></a> +<span class="sourceLineNo">481</span> 0x1ACA1375, 0xD196C0D0, 0x5702B27E, 0x9C5E61DB,<a name="line.481"></a> +<span class="sourceLineNo">482</span> 0x815B5163, 0x4A0782C6, 0xCC93F068, 0x07CF23CD,<a name="line.482"></a> +<span class="sourceLineNo">483</span> 0xF6999118, 0x3DC542BD, 0xBB513013, 0x700DE3B6,<a name="line.483"></a> +<span class="sourceLineNo">484</span> 0x6D08D30E, 0xA65400AB, 0x20C07205, 0xEB9CA1A0,<a name="line.484"></a> +<span class="sourceLineNo">485</span> 0x11E81EB4, 0xDAB4CD11, 0x5C20BFBF, 0x977C6C1A,<a name="line.485"></a> +<span class="sourceLineNo">486</span> 0x8A795CA2, 0x41258F07, 0xC7B1FDA9, 0x0CED2E0C,<a name="line.486"></a> +<span class="sourceLineNo">487</span> 0xFDBB9CD9, 0x36E74F7C, 0xB0733DD2, 0x7B2FEE77,<a name="line.487"></a> +<span class="sourceLineNo">488</span> 0x662ADECF, 0xAD760D6A, 0x2BE27FC4, 0xE0BEAC61,<a name="line.488"></a> +<span class="sourceLineNo">489</span> 0x123E1C2F, 0xD962CF8A, 0x5FF6BD24, 0x94AA6E81,<a name="line.489"></a> +<span class="sourceLineNo">490</span> 0x89AF5E39, 0x42F38D9C, 0xC467FF32, 0x0F3B2C97,<a name="line.490"></a> +<span class="sourceLineNo">491</span> 0xFE6D9E42, 0x35314DE7, 0xB3A53F49, 0x78F9ECEC,<a name="line.491"></a> +<span class="sourceLineNo">492</span> 0x65FCDC54, 0xAEA00FF1, 0x28347D5F, 0xE368AEFA,<a name="line.492"></a> +<span class="sourceLineNo">493</span> 0x16441B82, 0xDD18C827, 0x5B8CBA89, 0x90D0692C,<a name="line.493"></a> +<span class="sourceLineNo">494</span> 0x8DD55994, 0x46898A31, 0xC01DF89F, 0x0B412B3A,<a name="line.494"></a> +<span class="sourceLineNo">495</span> 0xFA1799EF, 0x314B4A4A, 0xB7DF38E4, 0x7C83EB41,<a name="line.495"></a> +<span class="sourceLineNo">496</span> 0x6186DBF9, 0xAADA085C, 0x2C4E7AF2, 0xE712A957,<a name="line.496"></a> +<span class="sourceLineNo">497</span> 0x15921919, 0xDECECABC, 0x585AB812, 0x93066BB7,<a name="line.497"></a> +<span class="sourceLineNo">498</span> 0x8E035B0F, 0x455F88AA, 0xC3CBFA04, 0x089729A1,<a name="line.498"></a> +<span class="sourceLineNo">499</span> 0xF9C19B74, 0x329D48D1, 0xB4093A7F, 0x7F55E9DA,<a name="line.499"></a> +<span class="sourceLineNo">500</span> 0x6250D962, 0xA90C0AC7, 0x2F987869, 0xE4C4ABCC,<a name="line.500"></a> +<span class="sourceLineNo">501</span> /* T8_6 */<a name="line.501"></a> +<span class="sourceLineNo">502</span> 0x00000000, 0xA6770BB4, 0x979F1129, 0x31E81A9D,<a name="line.502"></a> +<span class="sourceLineNo">503</span> 0xF44F2413, 0x52382FA7, 0x63D0353A, 0xC5A73E8E,<a name="line.503"></a> +<span class="sourceLineNo">504</span> 0x33EF4E67, 0x959845D3, 0xA4705F4E, 0x020754FA,<a name="line.504"></a> +<span class="sourceLineNo">505</span> 0xC7A06A74, 0x61D761C0, 0x503F7B5D, 0xF64870E9,<a name="line.505"></a> +<span class="sourceLineNo">506</span> 0x67DE9CCE, 0xC1A9977A, 0xF0418DE7, 0x56368653,<a name="line.506"></a> +<span class="sourceLineNo">507</span> 0x9391B8DD, 0x35E6B369, 0x040EA9F4, 0xA279A240,<a name="line.507"></a> +<span class="sourceLineNo">508</span> 0x5431D2A9, 0xF246D91D, 0xC3AEC380, 0x65D9C834,<a name="line.508"></a> +<span class="sourceLineNo">509</span> 0xA07EF6BA, 0x0609FD0E, 0x37E1E793, 0x9196EC27,<a name="line.509"></a> +<span class="sourceLineNo">510</span> 0xCFBD399C, 0x69CA3228, 0x582228B5, 0xFE552301,<a name="line.510"></a> +<span class="sourceLineNo">511</span> 0x3BF21D8F, 0x9D85163B, 0xAC6D0CA6, 0x0A1A0712,<a name="line.511"></a> +<span class="sourceLineNo">512</span> 0xFC5277FB, 0x5A257C4F, 0x6BCD66D2, 0xCDBA6D66,<a name="line.512"></a> +<span class="sourceLineNo">513</span> 0x081D53E8, 0xAE6A585C, 0x9F8242C1, 0x39F54975,<a name="line.513"></a> +<span class="sourceLineNo">514</span> 0xA863A552, 0x0E14AEE6, 0x3FFCB47B, 0x998BBFCF,<a name="line.514"></a> +<span class="sourceLineNo">515</span> 0x5C2C8141, 0xFA5B8AF5, 0xCBB39068, 0x6DC49BDC,<a name="line.515"></a> +<span class="sourceLineNo">516</span> 0x9B8CEB35, 0x3DFBE081, 0x0C13FA1C, 0xAA64F1A8,<a name="line.516"></a> +<span class="sourceLineNo">517</span> 0x6FC3CF26, 0xC9B4C492, 0xF85CDE0F, 0x5E2BD5BB,<a name="line.517"></a> +<span class="sourceLineNo">518</span> 0x440B7579, 0xE27C7ECD, 0xD3946450, 0x75E36FE4,<a name="line.518"></a> +<span class="sourceLineNo">519</span> 0xB044516A, 0x16335ADE, 0x27DB4043, 0x81AC4BF7,<a name="line.519"></a> +<span class="sourceLineNo">520</span> 0x77E43B1E, 0xD19330AA, 0xE07B2A37, 0x460C2183,<a name="line.520"></a> +<span class="sourceLineNo">521</span> 0x83AB1F0D, 0x25DC14B9, 0x14340E24, 0xB2430590,<a name="line.521"></a> +<span class="sourceLineNo">522</span> 0x23D5E9B7, 0x85A2E203, 0xB44AF89E, 0x123DF32A,<a name="line.522"></a> +<span class="sourceLineNo">523</span> 0xD79ACDA4, 0x71EDC610, 0x4005DC8D, 0xE672D739,<a name="line.523"></a> +<span class="sourceLineNo">524</span> 0x103AA7D0, 0xB64DAC64, 0x87A5B6F9, 0x21D2BD4D,<a name="line.524"></a> +<span class="sourceLineNo">525</span> 0xE47583C3, 0x42028877, 0x73EA92EA, 0xD59D995E,<a name="line.525"></a> +<span class="sourceLineNo">526</span> 0x8BB64CE5, 0x2DC14751, 0x1C295DCC, 0xBA5E5678,<a name="line.526"></a> +<span class="sourceLineNo">527</span> 0x7FF968F6, 0xD98E6342, 0xE86679DF, 0x4E11726B,<a name="line.527"></a> +<span class="sourceLineNo">528</span> 0xB8590282, 0x1E2E0936, 0x2FC613AB, 0x89B1181F,<a name="line.528"></a> +<span class="sourceLineNo">529</span> 0x4C162691, 0xEA612D25, 0xDB8937B8, 0x7DFE3C0C,<a name="line.529"></a> +<span class="sourceLineNo">530</span> 0xEC68D02B, 0x4A1FDB9F, 0x7BF7C102, 0xDD80CAB6,<a name="line.530"></a> +<span class="sourceLineNo">531</span> 0x1827F438, 0xBE50FF8C, 0x8FB8E511, 0x29CFEEA5,<a name="line.531"></a> +<span class="sourceLineNo">532</span> 0xDF879E4C, 0x79F095F8, 0x48188F65, 0xEE6F84D1,<a name="line.532"></a> +<span class="sourceLineNo">533</span> 0x2BC8BA5F, 0x8DBFB1EB, 0xBC57AB76, 0x1A20A0C2,<a name="line.533"></a> +<span class="sourceLineNo">534</span> 0x8816EAF2, 0x2E61E146, 0x1F89FBDB, 0xB9FEF06F,<a name="line.534"></a> +<span class="sourceLineNo">535</span> 0x7C59CEE1, 0xDA2EC555, 0xEBC6DFC8, 0x4DB1D47C,<a name="line.535"></a> +<span class="sourceLineNo">536</span> 0xBBF9A495, 0x1D8EAF21, 0x2C66B5BC, 0x8A11BE08,<a name="line.536"></a> +<span class="sourceLineNo">537</span> 0x4FB68086, 0xE9C18B32, 0xD82991AF, 0x7E5E9A1B,<a name="line.537"></a> +<span class="sourceLineNo">538</span> 0xEFC8763C, 0x49BF7D88, 0x78576715, 0xDE206CA1,<a name="line.538"></a> +<span class="sourceLineNo">539</span> 0x1B87522F, 0xBDF0599B, 0x8C184306, 0x2A6F48B2,<a name="line.539"></a> +<span class="sourceLineNo">540</span> 0xDC27385B, 0x7A5033EF, 0x4BB82972, 0xEDCF22C6,<a name="line.540"></a> +<span class="sourceLineNo">541</span> 0x28681C48, 0x8E1F17FC, 0xBFF70D61, 0x198006D5,<a name="line.541"></a> +<span class="sourceLineNo">542</span> 0x47ABD36E, 0xE1DCD8DA, 0xD034C247, 0x7643C9F3,<a name="line.542"></a> +<span class="sourceLineNo">543</span> 0xB3E4F77D, 0x1593FCC9, 0x247BE654, 0x820CEDE0,<a name="line.543"></a> +<span class="sourceLineNo">544</span> 0x74449D09, 0xD23396BD, 0xE3DB8C20, 0x45AC8794,<a name="line.544"></a> +<span class="sourceLineNo">545</span> 0x800BB91A, 0x267CB2AE, 0x1794A833, 0xB1E3A387,<a name="line.545"></a> +<span class="sourceLineNo">546</span> 0x20754FA0, 0x86024414, 0xB7EA5E89, 0x119D553D,<a name="line.546"></a> +<span class="sourceLineNo">547</span> 0xD43A6BB3, 0x724D6007, 0x43A57A9A, 0xE5D2712E,<a name="line.547"></a> +<span class="sourceLineNo">548</span> 0x139A01C7, 0xB5ED0A73, 0x840510EE, 0x22721B5A,<a name="line.548"></a> +<span class="sourceLineNo">549</span> 0xE7D525D4, 0x41A22E60, 0x704A34FD, 0xD63D3F49,<a name="line.549"></a> +<span class="sourceLineNo">550</span> 0xCC1D9F8B, 0x6A6A943F, 0x5B828EA2, 0xFDF58516,<a name="line.550"></a> +<span class="sourceLineNo">551</span> 0x3852BB98, 0x9E25B02C, 0xAFCDAAB1, 0x09BAA105,<a name="line.551"></a> +<span class="sourceLineNo">552</span> 0xFFF2D1EC, 0x5985DA58, 0x686DC0C5, 0xCE1ACB71,<a name="line.552"></a> +<span class="sourceLineNo">553</span> 0x0BBDF5FF, 0xADCAFE4B, 0x9C22E4D6, 0x3A55EF62,<a name="line.553"></a> +<span class="sourceLineNo">554</span> 0xABC30345, 0x0DB408F1, 0x3C5C126C, 0x9A2B19D8,<a name="line.554"></a> +<span class="sourceLineNo">555</span> 0x5F8C2756, 0xF9FB2CE2, 0xC813367F, 0x6E643DCB,<a name="line.555"></a> +<span class="sourceLineNo">556</span> 0x982C4D22, 0x3E5B4696, 0x0FB35C0B, 0xA9C457BF,<a name="line.556"></a> +<span class="sourceLineNo">557</span> 0x6C636931, 0xCA146285, 0xFBFC7818, 0x5D8B73AC,<a name="line.557"></a> +<span class="sourceLineNo">558</span> 0x03A0A617, 0xA5D7ADA3, 0x943FB73E, 0x3248BC8A,<a name="line.558"></a> +<span class="sourceLineNo">559</span> 0xF7EF8204, 0x519889B0, 0x6070932D, 0xC6079899,<a name="line.559"></a> +<span class="sourceLineNo">560</span> 0x304FE870, 0x9638E3C4, 0xA7D0F959, 0x01A7F2ED,<a name="line.560"></a> +<span class="sourceLineNo">561</span> 0xC400CC63, 0x6277C7D7, 0x539FDD4A, 0xF5E8D6FE,<a name="line.561"></a> +<span class="sourceLineNo">562</span> 0x647E3AD9, 0xC209316D, 0xF3E12BF0, 0x55962044,<a name="line.562"></a> +<span class="sourceLineNo">563</span> 0x90311ECA, 0x3646157E, 0x07AE0FE3, 0xA1D90457,<a name="line.563"></a> +<span class="sourceLineNo">564</span> 0x579174BE, 0xF1E67F0A, 0xC00E6597, 0x66796E23,<a name="line.564"></a> +<span class="sourceLineNo">565</span> 0xA3DE50AD, 0x05A95B19, 0x34414184, 0x92364A30,<a name="line.565"></a> +<span class="sourceLineNo">566</span> /* T8_7 */<a name="line.566"></a> +<span class="sourceLineNo">567</span> 0x00000000, 0xCCAA009E, 0x4225077D, 0x8E8F07E3,<a name="line.567"></a> +<span class="sourceLineNo">568</span> 0x844A0EFA, 0x48E00E64, 0xC66F0987, 0x0AC50919,<a name="line.568"></a> +<span class="sourceLineNo">569</span> 0xD3E51BB5, 0x1F4F1B2B, 0x91C01CC8, 0x5D6A1C56,<a name="line.569"></a> +<span class="sourceLineNo">570</span> 0x57AF154F, 0x9B0515D1, 0x158A1232, 0xD92012AC,<a name="line.570"></a> +<span class="sourceLineNo">571</span> 0x7CBB312B, 0xB01131B5, 0x3E9E3656, 0xF23436C8,<a name="line.571"></a> +<span class="sourceLineNo">572</span> 0xF8F13FD1, 0x345B3F4F, 0xBAD438AC, 0x767E3832,<a name="line.572"></a> +<span class="sourceLineNo">573</span> 0xAF5E2A9E, 0x63F42A00, 0xED7B2DE3, 0x21D12D7D,<a name="line.573"></a> +<span class="sourceLineNo">574</span> 0x2B142464, 0xE7BE24FA, 0x69312319, 0xA59B2387,<a name="line.574"></a> +<span class="sourceLineNo">575</span> 0xF9766256, 0x35DC62C8, 0xBB53652B, 0x77F965B5,<a name="line.575"></a> +<span class="sourceLineNo">576</span> 0x7D3C6CAC, 0xB1966C32, 0x3F196BD1, 0xF3B36B4F,<a name="line.576"></a> +<span class="sourceLineNo">577</span> 0x2A9379E3, 0xE639797D, 0x68B67E9E, 0xA41C7E00,<a name="line.577"></a> +<span class="sourceLineNo">578</span> 0xAED97719, 0x62737787, 0xECFC7064, 0x205670FA,<a name="line.578"></a> +<span class="sourceLineNo">579</span> 0x85CD537D, 0x496753E3, 0xC7E85400, 0x0B42549E,<a name="line.579"></a> +<span class="sourceLineNo">580</span> 0x01875D87, 0xCD2D5D19, 0x43A25AFA, 0x8F085A64,<a name="line.580"></a> +<span class="sourceLineNo">581</span> 0x562848C8, 0x9A824856, 0x140D4FB5, 0xD8A74F2B,<a name="line.581"></a> +<span class="sourceLineNo">582</span> 0xD2624632, 0x1EC846AC, 0x9047414F, 0x5CED41D1,<a name="line.582"></a> +<span class="sourceLineNo">583</span> 0x299DC2ED, 0xE537C273, 0x6BB8C590, 0xA712C50E,<a name="line.583"></a> +<span class="sourceLineNo">584</span> 0xADD7CC17, 0x617DCC89, 0xEFF2CB6A, 0x2358CBF4,<a name="line.584"></a> +<span class="sourceLineNo">585</span> 0xFA78D958, 0x36D2D9C6, 0xB85DDE25, 0x74F7DEBB,<a name="line.585"></a> +<span class="sourceLineNo">586</span> 0x7E32D7A2, 0xB298D73C, 0x3C17D0DF, 0xF0BDD041,<a name="line.586"></a> +<span class="sourceLineNo">587</span> 0x5526F3C6, 0x998CF358, 0x1703F4BB, 0xDBA9F425,<a name="line.587"></a> +<span class="sourceLineNo">588</span> 0xD16CFD3C, 0x1DC6FDA2, 0x9349FA41, 0x5FE3FADF,<a name="line.588"></a> +<span class="sourceLineNo">589</span> 0x86C3E873, 0x4A69E8ED, 0xC4E6EF0E, 0x084CEF90,<a name="line.589"></a> +<span class="sourceLineNo">590</span> 0x0289E689, 0xCE23E617, 0x40ACE1F4, 0x8C06E16A,<a name="line.590"></a> +<span class="sourceLineNo">591</span> 0xD0EBA0BB, 0x1C41A025, 0x92CEA7C6, 0x5E64A758,<a name="line.591"></a> +<span class="sourceLineNo">592</span> 0x54A1AE41, 0x980BAEDF, 0x1684A93C, 0xDA2EA9A2,<a name="line.592"></a> +<span class="sourceLineNo">593</span> 0x030EBB0E, 0xCFA4BB90, 0x412BBC73, 0x8D81BCED,<a name="line.593"></a> +<span class="sourceLineNo">594</span> 0x8744B5F4, 0x4BEEB56A, 0xC561B289, 0x09CBB217,<a name="line.594"></a> +<span class="sourceLineNo">595</span> 0xAC509190, 0x60FA910E, 0xEE7596ED, 0x22DF9673,<a name="line.595"></a> +<span class="sourceLineNo">596</span> 0x281A9F6A, 0xE4B09FF4, 0x6A3F9817, 0xA6959889,<a name="line.596"></a> +<span class="sourceLineNo">597</span> 0x7FB58A25, 0xB31F8ABB, 0x3D908D58, 0xF13A8DC6,<a name="line.597"></a> +<span class="sourceLineNo">598</span> 0xFBFF84DF, 0x37558441, 0xB9DA83A2, 0x7570833C,<a name="line.598"></a> +<span class="sourceLineNo">599</span> 0x533B85DA, 0x9F918544, 0x111E82A7, 0xDDB48239,<a name="line.599"></a> +<span class="sourceLineNo">600</span> 0xD7718B20, 0x1BDB8BBE, 0x95548C5D, 0x59FE8CC3,<a name="line.600"></a> +<span class="sourceLineNo">601</span> 0x80DE9E6F, 0x4C749EF1, 0xC2FB9912, 0x0E51998C,<a name="line.601"></a> +<span class="sourceLineNo">602</span> 0x04949095, 0xC83E900B, 0x46B197E8, 0x8A1B9776,<a name="line.602"></a> +<span class="sourceLineNo">603</span> 0x2F80B4F1, 0xE32AB46F, 0x6DA5B38C, 0xA10FB312,<a name="line.603"></a> +<span class="sourceLineNo">604</span> 0xABCABA0B, 0x6760BA95, 0xE9EFBD76, 0x2545BDE8,<a name="line.604"></a> +<span class="sourceLineNo">605</span> 0xFC65AF44, 0x30CFAFDA, 0xBE40A839, 0x72EAA8A7,<a name="line.605"></a> +<span class="sourceLineNo">606</span> 0x782FA1BE, 0xB485A120, 0x3A0AA6C3, 0xF6A0A65D,<a name="line.606"></a> +<span class="sourceLineNo">607</span> 0xAA4DE78C, 0x66E7E712, 0xE868E0F1, 0x24C2E06F,<a name="line.607"></a> +<span class="sourceLineNo">608</span> 0x2E07E976, 0xE2ADE9E8, 0x6C22EE0B, 0xA088EE95,<a name="line.608"></a> +<span class="sourceLineNo">609</span> 0x79A8FC39, 0xB502FCA7, 0x3B8DFB44, 0xF727FBDA,<a name="line.609"></a> +<span class="sourceLineNo">610</span> 0xFDE2F2C3, 0x3148F25D, 0xBFC7F5BE, 0x736DF520,<a name="line.610"></a> +<span class="sourceLineNo">611</span> 0xD6F6D6A7, 0x1A5CD639, 0x94D3D1DA, 0x5879D144,<a name="line.611"></a> +<span class="sourceLineNo">612</span> 0x52BCD85D, 0x9E16D8C3, 0x1099DF20, 0xDC33DFBE,<a name="line.612"></a> +<span class="sourceLineNo">613</span> 0x0513CD12, 0xC9B9CD8C, 0x4736CA6F, 0x8B9CCAF1,<a name="line.613"></a> +<span class="sourceLineNo">614</span> 0x8159C3E8, 0x4DF3C376, 0xC37CC495, 0x0FD6C40B,<a name="line.614"></a> +<span class="sourceLineNo">615</span> 0x7AA64737, 0xB60C47A9, 0x3883404A, 0xF42940D4,<a name="line.615"></a> +<span class="sourceLineNo">616</span> 0xFEEC49CD, 0x32464953, 0xBCC94EB0, 0x70634E2E,<a name="line.616"></a> +<span class="sourceLineNo">617</span> 0xA9435C82, 0x65E95C1C, 0xEB665BFF, 0x27CC5B61,<a name="line.617"></a> +<span class="sourceLineNo">618</span> 0x2D095278, 0xE1A352E6, 0x6F2C5505, 0xA386559B,<a name="line.618"></a> +<span class="sourceLineNo">619</span> 0x061D761C, 0xCAB77682, 0x44387161, 0x889271FF,<a name="line.619"></a> +<span class="sourceLineNo">620</span> 0x825778E6, 0x4EFD7878, 0xC0727F9B, 0x0CD87F05,<a name="line.620"></a> +<span class="sourceLineNo">621</span> 0xD5F86DA9, 0x19526D37, 0x97DD6AD4, 0x5B776A4A,<a name="line.621"></a> +<span class="sourceLineNo">622</span> 0x51B26353, 0x9D1863CD, 0x1397642E, 0xDF3D64B0,<a name="line.622"></a> +<span class="sourceLineNo">623</span> 0x83D02561, 0x4F7A25FF, 0xC1F5221C, 0x0D5F2282,<a name="line.623"></a> +<span class="sourceLineNo">624</span> 0x079A2B9B, 0xCB302B05, 0x45BF2CE6, 0x89152C78,<a name="line.624"></a> +<span class="sourceLineNo">625</span> 0x50353ED4, 0x9C9F3E4A, 0x121039A9, 0xDEBA3937,<a name="line.625"></a> +<span class="sourceLineNo">626</span> 0xD47F302E, 0x18D530B0, 0x965A3753, 0x5AF037CD,<a name="line.626"></a> +<span class="sourceLineNo">627</span> 0xFF6B144A, 0x33C114D4, 0xBD4E1337, 0x71E413A9,<a name="line.627"></a> +<span class="sourceLineNo">628</span> 0x7B211AB0, 0xB78B1A2E, 0x39041DCD, 0xF5AE1D53,<a name="line.628"></a> +<span class="sourceLineNo">629</span> 0x2C8E0FFF, 0xE0240F61, 0x6EAB0882, 0xA201081C,<a name="line.629"></a> +<span class="sourceLineNo">630</span> 0xA8C40105, 0x646E019B, 0xEAE10678, 0x264B06E6<a name="line.630"></a> +<span class="sourceLineNo">631</span> };<a name="line.631"></a> +<span class="sourceLineNo">632</span>}<a name="line.632"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/PureJavaCrc32C.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/PureJavaCrc32C.html new file mode 100644 index 0000000000000000000000000000000000000000..b16ace314e69011decb3d65cb5ed8e081312fe5a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/PureJavaCrc32C.html @@ -0,0 +1,712 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>/*<a name="line.17"></a> +<span class="sourceLineNo">018</span> * Some portions of this file Copyright (c) 2004-2006 Intel Corportation<a name="line.18"></a> +<span class="sourceLineNo">019</span> * and licensed under the BSD license.<a name="line.19"></a> +<span class="sourceLineNo">020</span> */<a name="line.20"></a> +<span class="sourceLineNo">021</span>package org.apache.commons.codec.digest;<a name="line.21"></a> +<span class="sourceLineNo">022</span><a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.zip.Checksum;<a name="line.23"></a> +<span class="sourceLineNo">024</span><a name="line.24"></a> +<span class="sourceLineNo">025</span>/**<a name="line.25"></a> +<span class="sourceLineNo">026</span> * A pure-java implementation of the CRC32 checksum that uses<a name="line.26"></a> +<span class="sourceLineNo">027</span> * the CRC32-C polynomial, the same polynomial used by iSCSI<a name="line.27"></a> +<span class="sourceLineNo">028</span> * and implemented on many Intel chipsets supporting SSE4.2.<a name="line.28"></a> +<span class="sourceLineNo">029</span> *<a name="line.29"></a> +<span class="sourceLineNo">030</span> * Copied from Hadoop 2.3.6:<a name="line.30"></a> +<span class="sourceLineNo">031</span> * https://git-wip-us.apache.org/repos/asf?p=hadoop.git;a=blob_plain;<a name="line.31"></a> +<span class="sourceLineNo">032</span> * f=hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/PureJavaCrc32C.java;<a name="line.32"></a> +<span class="sourceLineNo">033</span> * hb=2120de588b92b9f22b1cc4188761d6a8c61aa778<a name="line.33"></a> +<span class="sourceLineNo">034</span> * <p><a name="line.34"></a> +<span class="sourceLineNo">035</span> * This class is Not ThreadSafe<a name="line.35"></a> +<span class="sourceLineNo">036</span> * @since 1.11<a name="line.36"></a> +<span class="sourceLineNo">037</span> */<a name="line.37"></a> +<span class="sourceLineNo">038</span>public class PureJavaCrc32C implements Checksum {<a name="line.38"></a> +<span class="sourceLineNo">039</span><a name="line.39"></a> +<span class="sourceLineNo">040</span> /** the current CRC value, bit-flipped */<a name="line.40"></a> +<span class="sourceLineNo">041</span> private int crc;<a name="line.41"></a> +<span class="sourceLineNo">042</span><a name="line.42"></a> +<span class="sourceLineNo">043</span> /** Create a new PureJavaCrc32 object. */<a name="line.43"></a> +<span class="sourceLineNo">044</span> public PureJavaCrc32C() {<a name="line.44"></a> +<span class="sourceLineNo">045</span> reset();<a name="line.45"></a> +<span class="sourceLineNo">046</span> }<a name="line.46"></a> +<span class="sourceLineNo">047</span><a name="line.47"></a> +<span class="sourceLineNo">048</span> @Override<a name="line.48"></a> +<span class="sourceLineNo">049</span> public long getValue() {<a name="line.49"></a> +<span class="sourceLineNo">050</span> final long ret = crc;<a name="line.50"></a> +<span class="sourceLineNo">051</span> return (~ret) & 0xffffffffL;<a name="line.51"></a> +<span class="sourceLineNo">052</span> }<a name="line.52"></a> +<span class="sourceLineNo">053</span><a name="line.53"></a> +<span class="sourceLineNo">054</span> @Override<a name="line.54"></a> +<span class="sourceLineNo">055</span> public void reset() {<a name="line.55"></a> +<span class="sourceLineNo">056</span> crc = 0xffffffff;<a name="line.56"></a> +<span class="sourceLineNo">057</span> }<a name="line.57"></a> +<span class="sourceLineNo">058</span><a name="line.58"></a> +<span class="sourceLineNo">059</span> @Override<a name="line.59"></a> +<span class="sourceLineNo">060</span> public void update(final byte[] b, int off, int len) {<a name="line.60"></a> +<span class="sourceLineNo">061</span> int localCrc = crc;<a name="line.61"></a> +<span class="sourceLineNo">062</span><a name="line.62"></a> +<span class="sourceLineNo">063</span> while(len > 7) {<a name="line.63"></a> +<span class="sourceLineNo">064</span> final int c0 =(b[off+0] ^ localCrc) & 0xff;<a name="line.64"></a> +<span class="sourceLineNo">065</span> final int c1 =(b[off+1] ^ (localCrc >>>= 8)) & 0xff;<a name="line.65"></a> +<span class="sourceLineNo">066</span> final int c2 =(b[off+2] ^ (localCrc >>>= 8)) & 0xff;<a name="line.66"></a> +<span class="sourceLineNo">067</span> final int c3 =(b[off+3] ^ (localCrc >>>= 8)) & 0xff;<a name="line.67"></a> +<span class="sourceLineNo">068</span> localCrc = (T[T8_7_start + c0] ^ T[T8_6_start + c1]) ^<a name="line.68"></a> +<span class="sourceLineNo">069</span> (T[T8_5_start + c2] ^ T[T8_4_start + c3]);<a name="line.69"></a> +<span class="sourceLineNo">070</span><a name="line.70"></a> +<span class="sourceLineNo">071</span> final int c4 = b[off+4] & 0xff;<a name="line.71"></a> +<span class="sourceLineNo">072</span> final int c5 = b[off+5] & 0xff;<a name="line.72"></a> +<span class="sourceLineNo">073</span> final int c6 = b[off+6] & 0xff;<a name="line.73"></a> +<span class="sourceLineNo">074</span> final int c7 = b[off+7] & 0xff;<a name="line.74"></a> +<span class="sourceLineNo">075</span><a name="line.75"></a> +<span class="sourceLineNo">076</span> localCrc ^= (T[T8_3_start + c4] ^ T[T8_2_start + c5]) ^<a name="line.76"></a> +<span class="sourceLineNo">077</span> (T[T8_1_start + c6] ^ T[T8_0_start + c7]);<a name="line.77"></a> +<span class="sourceLineNo">078</span><a name="line.78"></a> +<span class="sourceLineNo">079</span> off += 8;<a name="line.79"></a> +<span class="sourceLineNo">080</span> len -= 8;<a name="line.80"></a> +<span class="sourceLineNo">081</span> }<a name="line.81"></a> +<span class="sourceLineNo">082</span><a name="line.82"></a> +<span class="sourceLineNo">083</span> /* loop unroll - duff's device style */<a name="line.83"></a> +<span class="sourceLineNo">084</span> switch(len) {<a name="line.84"></a> +<span class="sourceLineNo">085</span> case 7: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)];<a name="line.85"></a> +<span class="sourceLineNo">086</span> case 6: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)];<a name="line.86"></a> +<span class="sourceLineNo">087</span> case 5: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)];<a name="line.87"></a> +<span class="sourceLineNo">088</span> case 4: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)];<a name="line.88"></a> +<span class="sourceLineNo">089</span> case 3: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)];<a name="line.89"></a> +<span class="sourceLineNo">090</span> case 2: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)];<a name="line.90"></a> +<span class="sourceLineNo">091</span> case 1: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)];<a name="line.91"></a> +<span class="sourceLineNo">092</span> default:<a name="line.92"></a> +<span class="sourceLineNo">093</span> break; // satisfy Findbugs<a name="line.93"></a> +<span class="sourceLineNo">094</span> }<a name="line.94"></a> +<span class="sourceLineNo">095</span><a name="line.95"></a> +<span class="sourceLineNo">096</span> // Publish crc out to object<a name="line.96"></a> +<span class="sourceLineNo">097</span> crc = localCrc;<a name="line.97"></a> +<span class="sourceLineNo">098</span> }<a name="line.98"></a> +<span class="sourceLineNo">099</span><a name="line.99"></a> +<span class="sourceLineNo">100</span> @Override<a name="line.100"></a> +<span class="sourceLineNo">101</span> final public void update(final int b) {<a name="line.101"></a> +<span class="sourceLineNo">102</span> crc = (crc >>> 8) ^ T[T8_0_start + ((crc ^ b) & 0xff)];<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> // CRC polynomial tables generated by:<a name="line.105"></a> +<span class="sourceLineNo">106</span> // java -cp build/test/classes/:build/classes/ \<a name="line.106"></a> +<span class="sourceLineNo">107</span> // org.apache.hadoop.util.TestPureJavaCrc32\$Table 82F63B78<a name="line.107"></a> +<span class="sourceLineNo">108</span><a name="line.108"></a> +<span class="sourceLineNo">109</span> private static final int T8_0_start = 0*256;<a name="line.109"></a> +<span class="sourceLineNo">110</span> private static final int T8_1_start = 1*256;<a name="line.110"></a> +<span class="sourceLineNo">111</span> private static final int T8_2_start = 2*256;<a name="line.111"></a> +<span class="sourceLineNo">112</span> private static final int T8_3_start = 3*256;<a name="line.112"></a> +<span class="sourceLineNo">113</span> private static final int T8_4_start = 4*256;<a name="line.113"></a> +<span class="sourceLineNo">114</span> private static final int T8_5_start = 5*256;<a name="line.114"></a> +<span class="sourceLineNo">115</span> private static final int T8_6_start = 6*256;<a name="line.115"></a> +<span class="sourceLineNo">116</span> private static final int T8_7_start = 7*256;<a name="line.116"></a> +<span class="sourceLineNo">117</span><a name="line.117"></a> +<span class="sourceLineNo">118</span> private static final int[] T = new int[] {<a name="line.118"></a> +<span class="sourceLineNo">119</span> /* T8_0 */<a name="line.119"></a> +<span class="sourceLineNo">120</span> 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4,<a name="line.120"></a> +<span class="sourceLineNo">121</span> 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB,<a name="line.121"></a> +<span class="sourceLineNo">122</span> 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B,<a name="line.122"></a> +<span class="sourceLineNo">123</span> 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24,<a name="line.123"></a> +<span class="sourceLineNo">124</span> 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B,<a name="line.124"></a> +<span class="sourceLineNo">125</span> 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384,<a name="line.125"></a> +<span class="sourceLineNo">126</span> 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54,<a name="line.126"></a> +<span class="sourceLineNo">127</span> 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B,<a name="line.127"></a> +<span class="sourceLineNo">128</span> 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A,<a name="line.128"></a> +<span class="sourceLineNo">129</span> 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35,<a name="line.129"></a> +<span class="sourceLineNo">130</span> 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5,<a name="line.130"></a> +<span class="sourceLineNo">131</span> 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA,<a name="line.131"></a> +<span class="sourceLineNo">132</span> 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45,<a name="line.132"></a> +<span class="sourceLineNo">133</span> 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A,<a name="line.133"></a> +<span class="sourceLineNo">134</span> 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A,<a name="line.134"></a> +<span class="sourceLineNo">135</span> 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595,<a name="line.135"></a> +<span class="sourceLineNo">136</span> 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48,<a name="line.136"></a> +<span class="sourceLineNo">137</span> 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957,<a name="line.137"></a> +<span class="sourceLineNo">138</span> 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687,<a name="line.138"></a> +<span class="sourceLineNo">139</span> 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198,<a name="line.139"></a> +<span class="sourceLineNo">140</span> 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927,<a name="line.140"></a> +<span class="sourceLineNo">141</span> 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38,<a name="line.141"></a> +<span class="sourceLineNo">142</span> 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8,<a name="line.142"></a> +<span class="sourceLineNo">143</span> 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7,<a name="line.143"></a> +<span class="sourceLineNo">144</span> 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096,<a name="line.144"></a> +<span class="sourceLineNo">145</span> 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789,<a name="line.145"></a> +<span class="sourceLineNo">146</span> 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859,<a name="line.146"></a> +<span class="sourceLineNo">147</span> 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46,<a name="line.147"></a> +<span class="sourceLineNo">148</span> 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9,<a name="line.148"></a> +<span class="sourceLineNo">149</span> 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6,<a name="line.149"></a> +<span class="sourceLineNo">150</span> 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36,<a name="line.150"></a> +<span class="sourceLineNo">151</span> 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829,<a name="line.151"></a> +<span class="sourceLineNo">152</span> 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C,<a name="line.152"></a> +<span class="sourceLineNo">153</span> 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93,<a name="line.153"></a> +<span class="sourceLineNo">154</span> 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043,<a name="line.154"></a> +<span class="sourceLineNo">155</span> 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C,<a name="line.155"></a> +<span class="sourceLineNo">156</span> 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3,<a name="line.156"></a> +<span class="sourceLineNo">157</span> 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC,<a name="line.157"></a> +<span class="sourceLineNo">158</span> 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C,<a name="line.158"></a> +<span class="sourceLineNo">159</span> 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033,<a name="line.159"></a> +<span class="sourceLineNo">160</span> 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652,<a name="line.160"></a> +<span class="sourceLineNo">161</span> 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D,<a name="line.161"></a> +<span class="sourceLineNo">162</span> 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D,<a name="line.162"></a> +<span class="sourceLineNo">163</span> 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982,<a name="line.163"></a> +<span class="sourceLineNo">164</span> 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D,<a name="line.164"></a> +<span class="sourceLineNo">165</span> 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622,<a name="line.165"></a> +<span class="sourceLineNo">166</span> 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2,<a name="line.166"></a> +<span class="sourceLineNo">167</span> 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED,<a name="line.167"></a> +<span class="sourceLineNo">168</span> 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530,<a name="line.168"></a> +<span class="sourceLineNo">169</span> 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F,<a name="line.169"></a> +<span class="sourceLineNo">170</span> 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF,<a name="line.170"></a> +<span class="sourceLineNo">171</span> 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0,<a name="line.171"></a> +<span class="sourceLineNo">172</span> 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F,<a name="line.172"></a> +<span class="sourceLineNo">173</span> 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540,<a name="line.173"></a> +<span class="sourceLineNo">174</span> 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90,<a name="line.174"></a> +<span class="sourceLineNo">175</span> 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F,<a name="line.175"></a> +<span class="sourceLineNo">176</span> 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE,<a name="line.176"></a> +<span class="sourceLineNo">177</span> 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1,<a name="line.177"></a> +<span class="sourceLineNo">178</span> 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321,<a name="line.178"></a> +<span class="sourceLineNo">179</span> 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E,<a name="line.179"></a> +<span class="sourceLineNo">180</span> 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81,<a name="line.180"></a> +<span class="sourceLineNo">181</span> 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E,<a name="line.181"></a> +<span class="sourceLineNo">182</span> 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E,<a name="line.182"></a> +<span class="sourceLineNo">183</span> 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351,<a name="line.183"></a> +<span class="sourceLineNo">184</span> /* T8_1 */<a name="line.184"></a> +<span class="sourceLineNo">185</span> 0x00000000, 0x13A29877, 0x274530EE, 0x34E7A899,<a name="line.185"></a> +<span class="sourceLineNo">186</span> 0x4E8A61DC, 0x5D28F9AB, 0x69CF5132, 0x7A6DC945,<a name="line.186"></a> +<span class="sourceLineNo">187</span> 0x9D14C3B8, 0x8EB65BCF, 0xBA51F356, 0xA9F36B21,<a name="line.187"></a> +<span class="sourceLineNo">188</span> 0xD39EA264, 0xC03C3A13, 0xF4DB928A, 0xE7790AFD,<a name="line.188"></a> +<span class="sourceLineNo">189</span> 0x3FC5F181, 0x2C6769F6, 0x1880C16F, 0x0B225918,<a name="line.189"></a> +<span class="sourceLineNo">190</span> 0x714F905D, 0x62ED082A, 0x560AA0B3, 0x45A838C4,<a name="line.190"></a> +<span class="sourceLineNo">191</span> 0xA2D13239, 0xB173AA4E, 0x859402D7, 0x96369AA0,<a name="line.191"></a> +<span class="sourceLineNo">192</span> 0xEC5B53E5, 0xFFF9CB92, 0xCB1E630B, 0xD8BCFB7C,<a name="line.192"></a> +<span class="sourceLineNo">193</span> 0x7F8BE302, 0x6C297B75, 0x58CED3EC, 0x4B6C4B9B,<a name="line.193"></a> +<span class="sourceLineNo">194</span> 0x310182DE, 0x22A31AA9, 0x1644B230, 0x05E62A47,<a name="line.194"></a> +<span class="sourceLineNo">195</span> 0xE29F20BA, 0xF13DB8CD, 0xC5DA1054, 0xD6788823,<a name="line.195"></a> +<span class="sourceLineNo">196</span> 0xAC154166, 0xBFB7D911, 0x8B507188, 0x98F2E9FF,<a name="line.196"></a> +<span class="sourceLineNo">197</span> 0x404E1283, 0x53EC8AF4, 0x670B226D, 0x74A9BA1A,<a name="line.197"></a> +<span class="sourceLineNo">198</span> 0x0EC4735F, 0x1D66EB28, 0x298143B1, 0x3A23DBC6,<a name="line.198"></a> +<span class="sourceLineNo">199</span> 0xDD5AD13B, 0xCEF8494C, 0xFA1FE1D5, 0xE9BD79A2,<a name="line.199"></a> +<span class="sourceLineNo">200</span> 0x93D0B0E7, 0x80722890, 0xB4958009, 0xA737187E,<a name="line.200"></a> +<span class="sourceLineNo">201</span> 0xFF17C604, 0xECB55E73, 0xD852F6EA, 0xCBF06E9D,<a name="line.201"></a> +<span class="sourceLineNo">202</span> 0xB19DA7D8, 0xA23F3FAF, 0x96D89736, 0x857A0F41,<a name="line.202"></a> +<span class="sourceLineNo">203</span> 0x620305BC, 0x71A19DCB, 0x45463552, 0x56E4AD25,<a name="line.203"></a> +<span class="sourceLineNo">204</span> 0x2C896460, 0x3F2BFC17, 0x0BCC548E, 0x186ECCF9,<a name="line.204"></a> +<span class="sourceLineNo">205</span> 0xC0D23785, 0xD370AFF2, 0xE797076B, 0xF4359F1C,<a name="line.205"></a> +<span class="sourceLineNo">206</span> 0x8E585659, 0x9DFACE2E, 0xA91D66B7, 0xBABFFEC0,<a name="line.206"></a> +<span class="sourceLineNo">207</span> 0x5DC6F43D, 0x4E646C4A, 0x7A83C4D3, 0x69215CA4,<a name="line.207"></a> +<span class="sourceLineNo">208</span> 0x134C95E1, 0x00EE0D96, 0x3409A50F, 0x27AB3D78,<a name="line.208"></a> +<span class="sourceLineNo">209</span> 0x809C2506, 0x933EBD71, 0xA7D915E8, 0xB47B8D9F,<a name="line.209"></a> +<span class="sourceLineNo">210</span> 0xCE1644DA, 0xDDB4DCAD, 0xE9537434, 0xFAF1EC43,<a name="line.210"></a> +<span class="sourceLineNo">211</span> 0x1D88E6BE, 0x0E2A7EC9, 0x3ACDD650, 0x296F4E27,<a name="line.211"></a> +<span class="sourceLineNo">212</span> 0x53028762, 0x40A01F15, 0x7447B78C, 0x67E52FFB,<a name="line.212"></a> +<span class="sourceLineNo">213</span> 0xBF59D487, 0xACFB4CF0, 0x981CE469, 0x8BBE7C1E,<a name="line.213"></a> +<span class="sourceLineNo">214</span> 0xF1D3B55B, 0xE2712D2C, 0xD69685B5, 0xC5341DC2,<a name="line.214"></a> +<span class="sourceLineNo">215</span> 0x224D173F, 0x31EF8F48, 0x050827D1, 0x16AABFA6,<a name="line.215"></a> +<span class="sourceLineNo">216</span> 0x6CC776E3, 0x7F65EE94, 0x4B82460D, 0x5820DE7A,<a name="line.216"></a> +<span class="sourceLineNo">217</span> 0xFBC3FAF9, 0xE861628E, 0xDC86CA17, 0xCF245260,<a name="line.217"></a> +<span class="sourceLineNo">218</span> 0xB5499B25, 0xA6EB0352, 0x920CABCB, 0x81AE33BC,<a name="line.218"></a> +<span class="sourceLineNo">219</span> 0x66D73941, 0x7575A136, 0x419209AF, 0x523091D8,<a name="line.219"></a> +<span class="sourceLineNo">220</span> 0x285D589D, 0x3BFFC0EA, 0x0F186873, 0x1CBAF004,<a name="line.220"></a> +<span class="sourceLineNo">221</span> 0xC4060B78, 0xD7A4930F, 0xE3433B96, 0xF0E1A3E1,<a name="line.221"></a> +<span class="sourceLineNo">222</span> 0x8A8C6AA4, 0x992EF2D3, 0xADC95A4A, 0xBE6BC23D,<a name="line.222"></a> +<span class="sourceLineNo">223</span> 0x5912C8C0, 0x4AB050B7, 0x7E57F82E, 0x6DF56059,<a name="line.223"></a> +<span class="sourceLineNo">224</span> 0x1798A91C, 0x043A316B, 0x30DD99F2, 0x237F0185,<a name="line.224"></a> +<span class="sourceLineNo">225</span> 0x844819FB, 0x97EA818C, 0xA30D2915, 0xB0AFB162,<a name="line.225"></a> +<span class="sourceLineNo">226</span> 0xCAC27827, 0xD960E050, 0xED8748C9, 0xFE25D0BE,<a name="line.226"></a> +<span class="sourceLineNo">227</span> 0x195CDA43, 0x0AFE4234, 0x3E19EAAD, 0x2DBB72DA,<a name="line.227"></a> +<span class="sourceLineNo">228</span> 0x57D6BB9F, 0x447423E8, 0x70938B71, 0x63311306,<a name="line.228"></a> +<span class="sourceLineNo">229</span> 0xBB8DE87A, 0xA82F700D, 0x9CC8D894, 0x8F6A40E3,<a name="line.229"></a> +<span class="sourceLineNo">230</span> 0xF50789A6, 0xE6A511D1, 0xD242B948, 0xC1E0213F,<a name="line.230"></a> +<span class="sourceLineNo">231</span> 0x26992BC2, 0x353BB3B5, 0x01DC1B2C, 0x127E835B,<a name="line.231"></a> +<span class="sourceLineNo">232</span> 0x68134A1E, 0x7BB1D269, 0x4F567AF0, 0x5CF4E287,<a name="line.232"></a> +<span class="sourceLineNo">233</span> 0x04D43CFD, 0x1776A48A, 0x23910C13, 0x30339464,<a name="line.233"></a> +<span class="sourceLineNo">234</span> 0x4A5E5D21, 0x59FCC556, 0x6D1B6DCF, 0x7EB9F5B8,<a name="line.234"></a> +<span class="sourceLineNo">235</span> 0x99C0FF45, 0x8A626732, 0xBE85CFAB, 0xAD2757DC,<a name="line.235"></a> +<span class="sourceLineNo">236</span> 0xD74A9E99, 0xC4E806EE, 0xF00FAE77, 0xE3AD3600,<a name="line.236"></a> +<span class="sourceLineNo">237</span> 0x3B11CD7C, 0x28B3550B, 0x1C54FD92, 0x0FF665E5,<a name="line.237"></a> +<span class="sourceLineNo">238</span> 0x759BACA0, 0x663934D7, 0x52DE9C4E, 0x417C0439,<a name="line.238"></a> +<span class="sourceLineNo">239</span> 0xA6050EC4, 0xB5A796B3, 0x81403E2A, 0x92E2A65D,<a name="line.239"></a> +<span class="sourceLineNo">240</span> 0xE88F6F18, 0xFB2DF76F, 0xCFCA5FF6, 0xDC68C781,<a name="line.240"></a> +<span class="sourceLineNo">241</span> 0x7B5FDFFF, 0x68FD4788, 0x5C1AEF11, 0x4FB87766,<a name="line.241"></a> +<span class="sourceLineNo">242</span> 0x35D5BE23, 0x26772654, 0x12908ECD, 0x013216BA,<a name="line.242"></a> +<span class="sourceLineNo">243</span> 0xE64B1C47, 0xF5E98430, 0xC10E2CA9, 0xD2ACB4DE,<a name="line.243"></a> +<span class="sourceLineNo">244</span> 0xA8C17D9B, 0xBB63E5EC, 0x8F844D75, 0x9C26D502,<a name="line.244"></a> +<span class="sourceLineNo">245</span> 0x449A2E7E, 0x5738B609, 0x63DF1E90, 0x707D86E7,<a name="line.245"></a> +<span class="sourceLineNo">246</span> 0x0A104FA2, 0x19B2D7D5, 0x2D557F4C, 0x3EF7E73B,<a name="line.246"></a> +<span class="sourceLineNo">247</span> 0xD98EEDC6, 0xCA2C75B1, 0xFECBDD28, 0xED69455F,<a name="line.247"></a> +<span class="sourceLineNo">248</span> 0x97048C1A, 0x84A6146D, 0xB041BCF4, 0xA3E32483,<a name="line.248"></a> +<span class="sourceLineNo">249</span> /* T8_2 */<a name="line.249"></a> +<span class="sourceLineNo">250</span> 0x00000000, 0xA541927E, 0x4F6F520D, 0xEA2EC073,<a name="line.250"></a> +<span class="sourceLineNo">251</span> 0x9EDEA41A, 0x3B9F3664, 0xD1B1F617, 0x74F06469,<a name="line.251"></a> +<span class="sourceLineNo">252</span> 0x38513EC5, 0x9D10ACBB, 0x773E6CC8, 0xD27FFEB6,<a name="line.252"></a> +<span class="sourceLineNo">253</span> 0xA68F9ADF, 0x03CE08A1, 0xE9E0C8D2, 0x4CA15AAC,<a name="line.253"></a> +<span class="sourceLineNo">254</span> 0x70A27D8A, 0xD5E3EFF4, 0x3FCD2F87, 0x9A8CBDF9,<a name="line.254"></a> +<span class="sourceLineNo">255</span> 0xEE7CD990, 0x4B3D4BEE, 0xA1138B9D, 0x045219E3,<a name="line.255"></a> +<span class="sourceLineNo">256</span> 0x48F3434F, 0xEDB2D131, 0x079C1142, 0xA2DD833C,<a name="line.256"></a> +<span class="sourceLineNo">257</span> 0xD62DE755, 0x736C752B, 0x9942B558, 0x3C032726,<a name="line.257"></a> +<span class="sourceLineNo">258</span> 0xE144FB14, 0x4405696A, 0xAE2BA919, 0x0B6A3B67,<a name="line.258"></a> +<span class="sourceLineNo">259</span> 0x7F9A5F0E, 0xDADBCD70, 0x30F50D03, 0x95B49F7D,<a name="line.259"></a> +<span class="sourceLineNo">260</span> 0xD915C5D1, 0x7C5457AF, 0x967A97DC, 0x333B05A2,<a name="line.260"></a> +<span class="sourceLineNo">261</span> 0x47CB61CB, 0xE28AF3B5, 0x08A433C6, 0xADE5A1B8,<a name="line.261"></a> +<span class="sourceLineNo">262</span> 0x91E6869E, 0x34A714E0, 0xDE89D493, 0x7BC846ED,<a name="line.262"></a> +<span class="sourceLineNo">263</span> 0x0F382284, 0xAA79B0FA, 0x40577089, 0xE516E2F7,<a name="line.263"></a> +<span class="sourceLineNo">264</span> 0xA9B7B85B, 0x0CF62A25, 0xE6D8EA56, 0x43997828,<a name="line.264"></a> +<span class="sourceLineNo">265</span> 0x37691C41, 0x92288E3F, 0x78064E4C, 0xDD47DC32,<a name="line.265"></a> +<span class="sourceLineNo">266</span> 0xC76580D9, 0x622412A7, 0x880AD2D4, 0x2D4B40AA,<a name="line.266"></a> +<span class="sourceLineNo">267</span> 0x59BB24C3, 0xFCFAB6BD, 0x16D476CE, 0xB395E4B0,<a name="line.267"></a> +<span class="sourceLineNo">268</span> 0xFF34BE1C, 0x5A752C62, 0xB05BEC11, 0x151A7E6F,<a name="line.268"></a> +<span class="sourceLineNo">269</span> 0x61EA1A06, 0xC4AB8878, 0x2E85480B, 0x8BC4DA75,<a name="line.269"></a> +<span class="sourceLineNo">270</span> 0xB7C7FD53, 0x12866F2D, 0xF8A8AF5E, 0x5DE93D20,<a name="line.270"></a> +<span class="sourceLineNo">271</span> 0x29195949, 0x8C58CB37, 0x66760B44, 0xC337993A,<a name="line.271"></a> +<span class="sourceLineNo">272</span> 0x8F96C396, 0x2AD751E8, 0xC0F9919B, 0x65B803E5,<a name="line.272"></a> +<span class="sourceLineNo">273</span> 0x1148678C, 0xB409F5F2, 0x5E273581, 0xFB66A7FF,<a name="line.273"></a> +<span class="sourceLineNo">274</span> 0x26217BCD, 0x8360E9B3, 0x694E29C0, 0xCC0FBBBE,<a name="line.274"></a> +<span class="sourceLineNo">275</span> 0xB8FFDFD7, 0x1DBE4DA9, 0xF7908DDA, 0x52D11FA4,<a name="line.275"></a> +<span class="sourceLineNo">276</span> 0x1E704508, 0xBB31D776, 0x511F1705, 0xF45E857B,<a name="line.276"></a> +<span class="sourceLineNo">277</span> 0x80AEE112, 0x25EF736C, 0xCFC1B31F, 0x6A802161,<a name="line.277"></a> +<span class="sourceLineNo">278</span> 0x56830647, 0xF3C29439, 0x19EC544A, 0xBCADC634,<a name="line.278"></a> +<span class="sourceLineNo">279</span> 0xC85DA25D, 0x6D1C3023, 0x8732F050, 0x2273622E,<a name="line.279"></a> +<span class="sourceLineNo">280</span> 0x6ED23882, 0xCB93AAFC, 0x21BD6A8F, 0x84FCF8F1,<a name="line.280"></a> +<span class="sourceLineNo">281</span> 0xF00C9C98, 0x554D0EE6, 0xBF63CE95, 0x1A225CEB,<a name="line.281"></a> +<span class="sourceLineNo">282</span> 0x8B277743, 0x2E66E53D, 0xC448254E, 0x6109B730,<a name="line.282"></a> +<span class="sourceLineNo">283</span> 0x15F9D359, 0xB0B84127, 0x5A968154, 0xFFD7132A,<a name="line.283"></a> +<span class="sourceLineNo">284</span> 0xB3764986, 0x1637DBF8, 0xFC191B8B, 0x595889F5,<a name="line.284"></a> +<span class="sourceLineNo">285</span> 0x2DA8ED9C, 0x88E97FE2, 0x62C7BF91, 0xC7862DEF,<a name="line.285"></a> +<span class="sourceLineNo">286</span> 0xFB850AC9, 0x5EC498B7, 0xB4EA58C4, 0x11ABCABA,<a name="line.286"></a> +<span class="sourceLineNo">287</span> 0x655BAED3, 0xC01A3CAD, 0x2A34FCDE, 0x8F756EA0,<a name="line.287"></a> +<span class="sourceLineNo">288</span> 0xC3D4340C, 0x6695A672, 0x8CBB6601, 0x29FAF47F,<a name="line.288"></a> +<span class="sourceLineNo">289</span> 0x5D0A9016, 0xF84B0268, 0x1265C21B, 0xB7245065,<a name="line.289"></a> +<span class="sourceLineNo">290</span> 0x6A638C57, 0xCF221E29, 0x250CDE5A, 0x804D4C24,<a name="line.290"></a> +<span class="sourceLineNo">291</span> 0xF4BD284D, 0x51FCBA33, 0xBBD27A40, 0x1E93E83E,<a name="line.291"></a> +<span class="sourceLineNo">292</span> 0x5232B292, 0xF77320EC, 0x1D5DE09F, 0xB81C72E1,<a name="line.292"></a> +<span class="sourceLineNo">293</span> 0xCCEC1688, 0x69AD84F6, 0x83834485, 0x26C2D6FB,<a name="line.293"></a> +<span class="sourceLineNo">294</span> 0x1AC1F1DD, 0xBF8063A3, 0x55AEA3D0, 0xF0EF31AE,<a name="line.294"></a> +<span class="sourceLineNo">295</span> 0x841F55C7, 0x215EC7B9, 0xCB7007CA, 0x6E3195B4,<a name="line.295"></a> +<span class="sourceLineNo">296</span> 0x2290CF18, 0x87D15D66, 0x6DFF9D15, 0xC8BE0F6B,<a name="line.296"></a> +<span class="sourceLineNo">297</span> 0xBC4E6B02, 0x190FF97C, 0xF321390F, 0x5660AB71,<a name="line.297"></a> +<span class="sourceLineNo">298</span> 0x4C42F79A, 0xE90365E4, 0x032DA597, 0xA66C37E9,<a name="line.298"></a> +<span class="sourceLineNo">299</span> 0xD29C5380, 0x77DDC1FE, 0x9DF3018D, 0x38B293F3,<a name="line.299"></a> +<span class="sourceLineNo">300</span> 0x7413C95F, 0xD1525B21, 0x3B7C9B52, 0x9E3D092C,<a name="line.300"></a> +<span class="sourceLineNo">301</span> 0xEACD6D45, 0x4F8CFF3B, 0xA5A23F48, 0x00E3AD36,<a name="line.301"></a> +<span class="sourceLineNo">302</span> 0x3CE08A10, 0x99A1186E, 0x738FD81D, 0xD6CE4A63,<a name="line.302"></a> +<span class="sourceLineNo">303</span> 0xA23E2E0A, 0x077FBC74, 0xED517C07, 0x4810EE79,<a name="line.303"></a> +<span class="sourceLineNo">304</span> 0x04B1B4D5, 0xA1F026AB, 0x4BDEE6D8, 0xEE9F74A6,<a name="line.304"></a> +<span class="sourceLineNo">305</span> 0x9A6F10CF, 0x3F2E82B1, 0xD50042C2, 0x7041D0BC,<a name="line.305"></a> +<span class="sourceLineNo">306</span> 0xAD060C8E, 0x08479EF0, 0xE2695E83, 0x4728CCFD,<a name="line.306"></a> +<span class="sourceLineNo">307</span> 0x33D8A894, 0x96993AEA, 0x7CB7FA99, 0xD9F668E7,<a name="line.307"></a> +<span class="sourceLineNo">308</span> 0x9557324B, 0x3016A035, 0xDA386046, 0x7F79F238,<a name="line.308"></a> +<span class="sourceLineNo">309</span> 0x0B899651, 0xAEC8042F, 0x44E6C45C, 0xE1A75622,<a name="line.309"></a> +<span class="sourceLineNo">310</span> 0xDDA47104, 0x78E5E37A, 0x92CB2309, 0x378AB177,<a name="line.310"></a> +<span class="sourceLineNo">311</span> 0x437AD51E, 0xE63B4760, 0x0C158713, 0xA954156D,<a name="line.311"></a> +<span class="sourceLineNo">312</span> 0xE5F54FC1, 0x40B4DDBF, 0xAA9A1DCC, 0x0FDB8FB2,<a name="line.312"></a> +<span class="sourceLineNo">313</span> 0x7B2BEBDB, 0xDE6A79A5, 0x3444B9D6, 0x91052BA8,<a name="line.313"></a> +<span class="sourceLineNo">314</span> /* T8_3 */<a name="line.314"></a> +<span class="sourceLineNo">315</span> 0x00000000, 0xDD45AAB8, 0xBF672381, 0x62228939,<a name="line.315"></a> +<span class="sourceLineNo">316</span> 0x7B2231F3, 0xA6679B4B, 0xC4451272, 0x1900B8CA,<a name="line.316"></a> +<span class="sourceLineNo">317</span> 0xF64463E6, 0x2B01C95E, 0x49234067, 0x9466EADF,<a name="line.317"></a> +<span class="sourceLineNo">318</span> 0x8D665215, 0x5023F8AD, 0x32017194, 0xEF44DB2C,<a name="line.318"></a> +<span class="sourceLineNo">319</span> 0xE964B13D, 0x34211B85, 0x560392BC, 0x8B463804,<a name="line.319"></a> +<span class="sourceLineNo">320</span> 0x924680CE, 0x4F032A76, 0x2D21A34F, 0xF06409F7,<a name="line.320"></a> +<span class="sourceLineNo">321</span> 0x1F20D2DB, 0xC2657863, 0xA047F15A, 0x7D025BE2,<a name="line.321"></a> +<span class="sourceLineNo">322</span> 0x6402E328, 0xB9474990, 0xDB65C0A9, 0x06206A11,<a name="line.322"></a> +<span class="sourceLineNo">323</span> 0xD725148B, 0x0A60BE33, 0x6842370A, 0xB5079DB2,<a name="line.323"></a> +<span class="sourceLineNo">324</span> 0xAC072578, 0x71428FC0, 0x136006F9, 0xCE25AC41,<a name="line.324"></a> +<span class="sourceLineNo">325</span> 0x2161776D, 0xFC24DDD5, 0x9E0654EC, 0x4343FE54,<a name="line.325"></a> +<span class="sourceLineNo">326</span> 0x5A43469E, 0x8706EC26, 0xE524651F, 0x3861CFA7,<a name="line.326"></a> +<span class="sourceLineNo">327</span> 0x3E41A5B6, 0xE3040F0E, 0x81268637, 0x5C632C8F,<a name="line.327"></a> +<span class="sourceLineNo">328</span> 0x45639445, 0x98263EFD, 0xFA04B7C4, 0x27411D7C,<a name="line.328"></a> +<span class="sourceLineNo">329</span> 0xC805C650, 0x15406CE8, 0x7762E5D1, 0xAA274F69,<a name="line.329"></a> +<span class="sourceLineNo">330</span> 0xB327F7A3, 0x6E625D1B, 0x0C40D422, 0xD1057E9A,<a name="line.330"></a> +<span class="sourceLineNo">331</span> 0xABA65FE7, 0x76E3F55F, 0x14C17C66, 0xC984D6DE,<a name="line.331"></a> +<span class="sourceLineNo">332</span> 0xD0846E14, 0x0DC1C4AC, 0x6FE34D95, 0xB2A6E72D,<a name="line.332"></a> +<span class="sourceLineNo">333</span> 0x5DE23C01, 0x80A796B9, 0xE2851F80, 0x3FC0B538,<a name="line.333"></a> +<span class="sourceLineNo">334</span> 0x26C00DF2, 0xFB85A74A, 0x99A72E73, 0x44E284CB,<a name="line.334"></a> +<span class="sourceLineNo">335</span> 0x42C2EEDA, 0x9F874462, 0xFDA5CD5B, 0x20E067E3,<a name="line.335"></a> +<span class="sourceLineNo">336</span> 0x39E0DF29, 0xE4A57591, 0x8687FCA8, 0x5BC25610,<a name="line.336"></a> +<span class="sourceLineNo">337</span> 0xB4868D3C, 0x69C32784, 0x0BE1AEBD, 0xD6A40405,<a name="line.337"></a> +<span class="sourceLineNo">338</span> 0xCFA4BCCF, 0x12E11677, 0x70C39F4E, 0xAD8635F6,<a name="line.338"></a> +<span class="sourceLineNo">339</span> 0x7C834B6C, 0xA1C6E1D4, 0xC3E468ED, 0x1EA1C255,<a name="line.339"></a> +<span class="sourceLineNo">340</span> 0x07A17A9F, 0xDAE4D027, 0xB8C6591E, 0x6583F3A6,<a name="line.340"></a> +<span class="sourceLineNo">341</span> 0x8AC7288A, 0x57828232, 0x35A00B0B, 0xE8E5A1B3,<a name="line.341"></a> +<span class="sourceLineNo">342</span> 0xF1E51979, 0x2CA0B3C1, 0x4E823AF8, 0x93C79040,<a name="line.342"></a> +<span class="sourceLineNo">343</span> 0x95E7FA51, 0x48A250E9, 0x2A80D9D0, 0xF7C57368,<a name="line.343"></a> +<span class="sourceLineNo">344</span> 0xEEC5CBA2, 0x3380611A, 0x51A2E823, 0x8CE7429B,<a name="line.344"></a> +<span class="sourceLineNo">345</span> 0x63A399B7, 0xBEE6330F, 0xDCC4BA36, 0x0181108E,<a name="line.345"></a> +<span class="sourceLineNo">346</span> 0x1881A844, 0xC5C402FC, 0xA7E68BC5, 0x7AA3217D,<a name="line.346"></a> +<span class="sourceLineNo">347</span> 0x52A0C93F, 0x8FE56387, 0xEDC7EABE, 0x30824006,<a name="line.347"></a> +<span class="sourceLineNo">348</span> 0x2982F8CC, 0xF4C75274, 0x96E5DB4D, 0x4BA071F5,<a name="line.348"></a> +<span class="sourceLineNo">349</span> 0xA4E4AAD9, 0x79A10061, 0x1B838958, 0xC6C623E0,<a name="line.349"></a> +<span class="sourceLineNo">350</span> 0xDFC69B2A, 0x02833192, 0x60A1B8AB, 0xBDE41213,<a name="line.350"></a> +<span class="sourceLineNo">351</span> 0xBBC47802, 0x6681D2BA, 0x04A35B83, 0xD9E6F13B,<a name="line.351"></a> +<span class="sourceLineNo">352</span> 0xC0E649F1, 0x1DA3E349, 0x7F816A70, 0xA2C4C0C8,<a name="line.352"></a> +<span class="sourceLineNo">353</span> 0x4D801BE4, 0x90C5B15C, 0xF2E73865, 0x2FA292DD,<a name="line.353"></a> +<span class="sourceLineNo">354</span> 0x36A22A17, 0xEBE780AF, 0x89C50996, 0x5480A32E,<a name="line.354"></a> +<span class="sourceLineNo">355</span> 0x8585DDB4, 0x58C0770C, 0x3AE2FE35, 0xE7A7548D,<a name="line.355"></a> +<span class="sourceLineNo">356</span> 0xFEA7EC47, 0x23E246FF, 0x41C0CFC6, 0x9C85657E,<a name="line.356"></a> +<span class="sourceLineNo">357</span> 0x73C1BE52, 0xAE8414EA, 0xCCA69DD3, 0x11E3376B,<a name="line.357"></a> +<span class="sourceLineNo">358</span> 0x08E38FA1, 0xD5A62519, 0xB784AC20, 0x6AC10698,<a name="line.358"></a> +<span class="sourceLineNo">359</span> 0x6CE16C89, 0xB1A4C631, 0xD3864F08, 0x0EC3E5B0,<a name="line.359"></a> +<span class="sourceLineNo">360</span> 0x17C35D7A, 0xCA86F7C2, 0xA8A47EFB, 0x75E1D443,<a name="line.360"></a> +<span class="sourceLineNo">361</span> 0x9AA50F6F, 0x47E0A5D7, 0x25C22CEE, 0xF8878656,<a name="line.361"></a> +<span class="sourceLineNo">362</span> 0xE1873E9C, 0x3CC29424, 0x5EE01D1D, 0x83A5B7A5,<a name="line.362"></a> +<span class="sourceLineNo">363</span> 0xF90696D8, 0x24433C60, 0x4661B559, 0x9B241FE1,<a name="line.363"></a> +<span class="sourceLineNo">364</span> 0x8224A72B, 0x5F610D93, 0x3D4384AA, 0xE0062E12,<a name="line.364"></a> +<span class="sourceLineNo">365</span> 0x0F42F53E, 0xD2075F86, 0xB025D6BF, 0x6D607C07,<a name="line.365"></a> +<span class="sourceLineNo">366</span> 0x7460C4CD, 0xA9256E75, 0xCB07E74C, 0x16424DF4,<a name="line.366"></a> +<span class="sourceLineNo">367</span> 0x106227E5, 0xCD278D5D, 0xAF050464, 0x7240AEDC,<a name="line.367"></a> +<span class="sourceLineNo">368</span> 0x6B401616, 0xB605BCAE, 0xD4273597, 0x09629F2F,<a name="line.368"></a> +<span class="sourceLineNo">369</span> 0xE6264403, 0x3B63EEBB, 0x59416782, 0x8404CD3A,<a name="line.369"></a> +<span class="sourceLineNo">370</span> 0x9D0475F0, 0x4041DF48, 0x22635671, 0xFF26FCC9,<a name="line.370"></a> +<span class="sourceLineNo">371</span> 0x2E238253, 0xF36628EB, 0x9144A1D2, 0x4C010B6A,<a name="line.371"></a> +<span class="sourceLineNo">372</span> 0x5501B3A0, 0x88441918, 0xEA669021, 0x37233A99,<a name="line.372"></a> +<span class="sourceLineNo">373</span> 0xD867E1B5, 0x05224B0D, 0x6700C234, 0xBA45688C,<a name="line.373"></a> +<span class="sourceLineNo">374</span> 0xA345D046, 0x7E007AFE, 0x1C22F3C7, 0xC167597F,<a name="line.374"></a> +<span class="sourceLineNo">375</span> 0xC747336E, 0x1A0299D6, 0x782010EF, 0xA565BA57,<a name="line.375"></a> +<span class="sourceLineNo">376</span> 0xBC65029D, 0x6120A825, 0x0302211C, 0xDE478BA4,<a name="line.376"></a> +<span class="sourceLineNo">377</span> 0x31035088, 0xEC46FA30, 0x8E647309, 0x5321D9B1,<a name="line.377"></a> +<span class="sourceLineNo">378</span> 0x4A21617B, 0x9764CBC3, 0xF54642FA, 0x2803E842,<a name="line.378"></a> +<span class="sourceLineNo">379</span> /* T8_4 */<a name="line.379"></a> +<span class="sourceLineNo">380</span> 0x00000000, 0x38116FAC, 0x7022DF58, 0x4833B0F4,<a name="line.380"></a> +<span class="sourceLineNo">381</span> 0xE045BEB0, 0xD854D11C, 0x906761E8, 0xA8760E44,<a name="line.381"></a> +<span class="sourceLineNo">382</span> 0xC5670B91, 0xFD76643D, 0xB545D4C9, 0x8D54BB65,<a name="line.382"></a> +<span class="sourceLineNo">383</span> 0x2522B521, 0x1D33DA8D, 0x55006A79, 0x6D1105D5,<a name="line.383"></a> +<span class="sourceLineNo">384</span> 0x8F2261D3, 0xB7330E7F, 0xFF00BE8B, 0xC711D127,<a name="line.384"></a> +<span class="sourceLineNo">385</span> 0x6F67DF63, 0x5776B0CF, 0x1F45003B, 0x27546F97,<a name="line.385"></a> +<span class="sourceLineNo">386</span> 0x4A456A42, 0x725405EE, 0x3A67B51A, 0x0276DAB6,<a name="line.386"></a> +<span class="sourceLineNo">387</span> 0xAA00D4F2, 0x9211BB5E, 0xDA220BAA, 0xE2336406,<a name="line.387"></a> +<span class="sourceLineNo">388</span> 0x1BA8B557, 0x23B9DAFB, 0x6B8A6A0F, 0x539B05A3,<a name="line.388"></a> +<span class="sourceLineNo">389</span> 0xFBED0BE7, 0xC3FC644B, 0x8BCFD4BF, 0xB3DEBB13,<a name="line.389"></a> +<span class="sourceLineNo">390</span> 0xDECFBEC6, 0xE6DED16A, 0xAEED619E, 0x96FC0E32,<a name="line.390"></a> +<span class="sourceLineNo">391</span> 0x3E8A0076, 0x069B6FDA, 0x4EA8DF2E, 0x76B9B082,<a name="line.391"></a> +<span class="sourceLineNo">392</span> 0x948AD484, 0xAC9BBB28, 0xE4A80BDC, 0xDCB96470,<a name="line.392"></a> +<span class="sourceLineNo">393</span> 0x74CF6A34, 0x4CDE0598, 0x04EDB56C, 0x3CFCDAC0,<a name="line.393"></a> +<span class="sourceLineNo">394</span> 0x51EDDF15, 0x69FCB0B9, 0x21CF004D, 0x19DE6FE1,<a name="line.394"></a> +<span class="sourceLineNo">395</span> 0xB1A861A5, 0x89B90E09, 0xC18ABEFD, 0xF99BD151,<a name="line.395"></a> +<span class="sourceLineNo">396</span> 0x37516AAE, 0x0F400502, 0x4773B5F6, 0x7F62DA5A,<a name="line.396"></a> +<span class="sourceLineNo">397</span> 0xD714D41E, 0xEF05BBB2, 0xA7360B46, 0x9F2764EA,<a name="line.397"></a> +<span class="sourceLineNo">398</span> 0xF236613F, 0xCA270E93, 0x8214BE67, 0xBA05D1CB,<a name="line.398"></a> +<span class="sourceLineNo">399</span> 0x1273DF8F, 0x2A62B023, 0x625100D7, 0x5A406F7B,<a name="line.399"></a> +<span class="sourceLineNo">400</span> 0xB8730B7D, 0x806264D1, 0xC851D425, 0xF040BB89,<a name="line.400"></a> +<span class="sourceLineNo">401</span> 0x5836B5CD, 0x6027DA61, 0x28146A95, 0x10050539,<a name="line.401"></a> +<span class="sourceLineNo">402</span> 0x7D1400EC, 0x45056F40, 0x0D36DFB4, 0x3527B018,<a name="line.402"></a> +<span class="sourceLineNo">403</span> 0x9D51BE5C, 0xA540D1F0, 0xED736104, 0xD5620EA8,<a name="line.403"></a> +<span class="sourceLineNo">404</span> 0x2CF9DFF9, 0x14E8B055, 0x5CDB00A1, 0x64CA6F0D,<a name="line.404"></a> +<span class="sourceLineNo">405</span> 0xCCBC6149, 0xF4AD0EE5, 0xBC9EBE11, 0x848FD1BD,<a name="line.405"></a> +<span class="sourceLineNo">406</span> 0xE99ED468, 0xD18FBBC4, 0x99BC0B30, 0xA1AD649C,<a name="line.406"></a> +<span class="sourceLineNo">407</span> 0x09DB6AD8, 0x31CA0574, 0x79F9B580, 0x41E8DA2C,<a name="line.407"></a> +<span class="sourceLineNo">408</span> 0xA3DBBE2A, 0x9BCAD186, 0xD3F96172, 0xEBE80EDE,<a name="line.408"></a> +<span class="sourceLineNo">409</span> 0x439E009A, 0x7B8F6F36, 0x33BCDFC2, 0x0BADB06E,<a name="line.409"></a> +<span class="sourceLineNo">410</span> 0x66BCB5BB, 0x5EADDA17, 0x169E6AE3, 0x2E8F054F,<a name="line.410"></a> +<span class="sourceLineNo">411</span> 0x86F90B0B, 0xBEE864A7, 0xF6DBD453, 0xCECABBFF,<a name="line.411"></a> +<span class="sourceLineNo">412</span> 0x6EA2D55C, 0x56B3BAF0, 0x1E800A04, 0x269165A8,<a name="line.412"></a> +<span class="sourceLineNo">413</span> 0x8EE76BEC, 0xB6F60440, 0xFEC5B4B4, 0xC6D4DB18,<a name="line.413"></a> +<span class="sourceLineNo">414</span> 0xABC5DECD, 0x93D4B161, 0xDBE70195, 0xE3F66E39,<a name="line.414"></a> +<span class="sourceLineNo">415</span> 0x4B80607D, 0x73910FD1, 0x3BA2BF25, 0x03B3D089,<a name="line.415"></a> +<span class="sourceLineNo">416</span> 0xE180B48F, 0xD991DB23, 0x91A26BD7, 0xA9B3047B,<a name="line.416"></a> +<span class="sourceLineNo">417</span> 0x01C50A3F, 0x39D46593, 0x71E7D567, 0x49F6BACB,<a name="line.417"></a> +<span class="sourceLineNo">418</span> 0x24E7BF1E, 0x1CF6D0B2, 0x54C56046, 0x6CD40FEA,<a name="line.418"></a> +<span class="sourceLineNo">419</span> 0xC4A201AE, 0xFCB36E02, 0xB480DEF6, 0x8C91B15A,<a name="line.419"></a> +<span class="sourceLineNo">420</span> 0x750A600B, 0x4D1B0FA7, 0x0528BF53, 0x3D39D0FF,<a name="line.420"></a> +<span class="sourceLineNo">421</span> 0x954FDEBB, 0xAD5EB117, 0xE56D01E3, 0xDD7C6E4F,<a name="line.421"></a> +<span class="sourceLineNo">422</span> 0xB06D6B9A, 0x887C0436, 0xC04FB4C2, 0xF85EDB6E,<a name="line.422"></a> +<span class="sourceLineNo">423</span> 0x5028D52A, 0x6839BA86, 0x200A0A72, 0x181B65DE,<a name="line.423"></a> +<span class="sourceLineNo">424</span> 0xFA2801D8, 0xC2396E74, 0x8A0ADE80, 0xB21BB12C,<a name="line.424"></a> +<span class="sourceLineNo">425</span> 0x1A6DBF68, 0x227CD0C4, 0x6A4F6030, 0x525E0F9C,<a name="line.425"></a> +<span class="sourceLineNo">426</span> 0x3F4F0A49, 0x075E65E5, 0x4F6DD511, 0x777CBABD,<a name="line.426"></a> +<span class="sourceLineNo">427</span> 0xDF0AB4F9, 0xE71BDB55, 0xAF286BA1, 0x9739040D,<a name="line.427"></a> +<span class="sourceLineNo">428</span> 0x59F3BFF2, 0x61E2D05E, 0x29D160AA, 0x11C00F06,<a name="line.428"></a> +<span class="sourceLineNo">429</span> 0xB9B60142, 0x81A76EEE, 0xC994DE1A, 0xF185B1B6,<a name="line.429"></a> +<span class="sourceLineNo">430</span> 0x9C94B463, 0xA485DBCF, 0xECB66B3B, 0xD4A70497,<a name="line.430"></a> +<span class="sourceLineNo">431</span> 0x7CD10AD3, 0x44C0657F, 0x0CF3D58B, 0x34E2BA27,<a name="line.431"></a> +<span class="sourceLineNo">432</span> 0xD6D1DE21, 0xEEC0B18D, 0xA6F30179, 0x9EE26ED5,<a name="line.432"></a> +<span class="sourceLineNo">433</span> 0x36946091, 0x0E850F3D, 0x46B6BFC9, 0x7EA7D065,<a name="line.433"></a> +<span class="sourceLineNo">434</span> 0x13B6D5B0, 0x2BA7BA1C, 0x63940AE8, 0x5B856544,<a name="line.434"></a> +<span class="sourceLineNo">435</span> 0xF3F36B00, 0xCBE204AC, 0x83D1B458, 0xBBC0DBF4,<a name="line.435"></a> +<span class="sourceLineNo">436</span> 0x425B0AA5, 0x7A4A6509, 0x3279D5FD, 0x0A68BA51,<a name="line.436"></a> +<span class="sourceLineNo">437</span> 0xA21EB415, 0x9A0FDBB9, 0xD23C6B4D, 0xEA2D04E1,<a name="line.437"></a> +<span class="sourceLineNo">438</span> 0x873C0134, 0xBF2D6E98, 0xF71EDE6C, 0xCF0FB1C0,<a name="line.438"></a> +<span class="sourceLineNo">439</span> 0x6779BF84, 0x5F68D028, 0x175B60DC, 0x2F4A0F70,<a name="line.439"></a> +<span class="sourceLineNo">440</span> 0xCD796B76, 0xF56804DA, 0xBD5BB42E, 0x854ADB82,<a name="line.440"></a> +<span class="sourceLineNo">441</span> 0x2D3CD5C6, 0x152DBA6A, 0x5D1E0A9E, 0x650F6532,<a name="line.441"></a> +<span class="sourceLineNo">442</span> 0x081E60E7, 0x300F0F4B, 0x783CBFBF, 0x402DD013,<a name="line.442"></a> +<span class="sourceLineNo">443</span> 0xE85BDE57, 0xD04AB1FB, 0x9879010F, 0xA0686EA3,<a name="line.443"></a> +<span class="sourceLineNo">444</span> /* T8_5 */<a name="line.444"></a> +<span class="sourceLineNo">445</span> 0x00000000, 0xEF306B19, 0xDB8CA0C3, 0x34BCCBDA,<a name="line.445"></a> +<span class="sourceLineNo">446</span> 0xB2F53777, 0x5DC55C6E, 0x697997B4, 0x8649FCAD,<a name="line.446"></a> +<span class="sourceLineNo">447</span> 0x6006181F, 0x8F367306, 0xBB8AB8DC, 0x54BAD3C5,<a name="line.447"></a> +<span class="sourceLineNo">448</span> 0xD2F32F68, 0x3DC34471, 0x097F8FAB, 0xE64FE4B2,<a name="line.448"></a> +<span class="sourceLineNo">449</span> 0xC00C303E, 0x2F3C5B27, 0x1B8090FD, 0xF4B0FBE4,<a name="line.449"></a> +<span class="sourceLineNo">450</span> 0x72F90749, 0x9DC96C50, 0xA975A78A, 0x4645CC93,<a name="line.450"></a> +<span class="sourceLineNo">451</span> 0xA00A2821, 0x4F3A4338, 0x7B8688E2, 0x94B6E3FB,<a name="line.451"></a> +<span class="sourceLineNo">452</span> 0x12FF1F56, 0xFDCF744F, 0xC973BF95, 0x2643D48C,<a name="line.452"></a> +<span class="sourceLineNo">453</span> 0x85F4168D, 0x6AC47D94, 0x5E78B64E, 0xB148DD57,<a name="line.453"></a> +<span class="sourceLineNo">454</span> 0x370121FA, 0xD8314AE3, 0xEC8D8139, 0x03BDEA20,<a name="line.454"></a> +<span class="sourceLineNo">455</span> 0xE5F20E92, 0x0AC2658B, 0x3E7EAE51, 0xD14EC548,<a name="line.455"></a> +<span class="sourceLineNo">456</span> 0x570739E5, 0xB83752FC, 0x8C8B9926, 0x63BBF23F,<a name="line.456"></a> +<span class="sourceLineNo">457</span> 0x45F826B3, 0xAAC84DAA, 0x9E748670, 0x7144ED69,<a name="line.457"></a> +<span class="sourceLineNo">458</span> 0xF70D11C4, 0x183D7ADD, 0x2C81B107, 0xC3B1DA1E,<a name="line.458"></a> +<span class="sourceLineNo">459</span> 0x25FE3EAC, 0xCACE55B5, 0xFE729E6F, 0x1142F576,<a name="line.459"></a> +<span class="sourceLineNo">460</span> 0x970B09DB, 0x783B62C2, 0x4C87A918, 0xA3B7C201,<a name="line.460"></a> +<span class="sourceLineNo">461</span> 0x0E045BEB, 0xE13430F2, 0xD588FB28, 0x3AB89031,<a name="line.461"></a> +<span class="sourceLineNo">462</span> 0xBCF16C9C, 0x53C10785, 0x677DCC5F, 0x884DA746,<a name="line.462"></a> +<span class="sourceLineNo">463</span> 0x6E0243F4, 0x813228ED, 0xB58EE337, 0x5ABE882E,<a name="line.463"></a> +<span class="sourceLineNo">464</span> 0xDCF77483, 0x33C71F9A, 0x077BD440, 0xE84BBF59,<a name="line.464"></a> +<span class="sourceLineNo">465</span> 0xCE086BD5, 0x213800CC, 0x1584CB16, 0xFAB4A00F,<a name="line.465"></a> +<span class="sourceLineNo">466</span> 0x7CFD5CA2, 0x93CD37BB, 0xA771FC61, 0x48419778,<a name="line.466"></a> +<span class="sourceLineNo">467</span> 0xAE0E73CA, 0x413E18D3, 0x7582D309, 0x9AB2B810,<a name="line.467"></a> +<span class="sourceLineNo">468</span> 0x1CFB44BD, 0xF3CB2FA4, 0xC777E47E, 0x28478F67,<a name="line.468"></a> +<span class="sourceLineNo">469</span> 0x8BF04D66, 0x64C0267F, 0x507CEDA5, 0xBF4C86BC,<a name="line.469"></a> +<span class="sourceLineNo">470</span> 0x39057A11, 0xD6351108, 0xE289DAD2, 0x0DB9B1CB,<a name="line.470"></a> +<span class="sourceLineNo">471</span> 0xEBF65579, 0x04C63E60, 0x307AF5BA, 0xDF4A9EA3,<a name="line.471"></a> +<span class="sourceLineNo">472</span> 0x5903620E, 0xB6330917, 0x828FC2CD, 0x6DBFA9D4,<a name="line.472"></a> +<span class="sourceLineNo">473</span> 0x4BFC7D58, 0xA4CC1641, 0x9070DD9B, 0x7F40B682,<a name="line.473"></a> +<span class="sourceLineNo">474</span> 0xF9094A2F, 0x16392136, 0x2285EAEC, 0xCDB581F5,<a name="line.474"></a> +<span class="sourceLineNo">475</span> 0x2BFA6547, 0xC4CA0E5E, 0xF076C584, 0x1F46AE9D,<a name="line.475"></a> +<span class="sourceLineNo">476</span> 0x990F5230, 0x763F3929, 0x4283F2F3, 0xADB399EA,<a name="line.476"></a> +<span class="sourceLineNo">477</span> 0x1C08B7D6, 0xF338DCCF, 0xC7841715, 0x28B47C0C,<a name="line.477"></a> +<span class="sourceLineNo">478</span> 0xAEFD80A1, 0x41CDEBB8, 0x75712062, 0x9A414B7B,<a name="line.478"></a> +<span class="sourceLineNo">479</span> 0x7C0EAFC9, 0x933EC4D0, 0xA7820F0A, 0x48B26413,<a name="line.479"></a> +<span class="sourceLineNo">480</span> 0xCEFB98BE, 0x21CBF3A7, 0x1577387D, 0xFA475364,<a name="line.480"></a> +<span class="sourceLineNo">481</span> 0xDC0487E8, 0x3334ECF1, 0x0788272B, 0xE8B84C32,<a name="line.481"></a> +<span class="sourceLineNo">482</span> 0x6EF1B09F, 0x81C1DB86, 0xB57D105C, 0x5A4D7B45,<a name="line.482"></a> +<span class="sourceLineNo">483</span> 0xBC029FF7, 0x5332F4EE, 0x678E3F34, 0x88BE542D,<a name="line.483"></a> +<span class="sourceLineNo">484</span> 0x0EF7A880, 0xE1C7C399, 0xD57B0843, 0x3A4B635A,<a name="line.484"></a> +<span class="sourceLineNo">485</span> 0x99FCA15B, 0x76CCCA42, 0x42700198, 0xAD406A81,<a name="line.485"></a> +<span class="sourceLineNo">486</span> 0x2B09962C, 0xC439FD35, 0xF08536EF, 0x1FB55DF6,<a name="line.486"></a> +<span class="sourceLineNo">487</span> 0xF9FAB944, 0x16CAD25D, 0x22761987, 0xCD46729E,<a name="line.487"></a> +<span class="sourceLineNo">488</span> 0x4B0F8E33, 0xA43FE52A, 0x90832EF0, 0x7FB345E9,<a name="line.488"></a> +<span class="sourceLineNo">489</span> 0x59F09165, 0xB6C0FA7C, 0x827C31A6, 0x6D4C5ABF,<a name="line.489"></a> +<span class="sourceLineNo">490</span> 0xEB05A612, 0x0435CD0B, 0x308906D1, 0xDFB96DC8,<a name="line.490"></a> +<span class="sourceLineNo">491</span> 0x39F6897A, 0xD6C6E263, 0xE27A29B9, 0x0D4A42A0,<a name="line.491"></a> +<span class="sourceLineNo">492</span> 0x8B03BE0D, 0x6433D514, 0x508F1ECE, 0xBFBF75D7,<a name="line.492"></a> +<span class="sourceLineNo">493</span> 0x120CEC3D, 0xFD3C8724, 0xC9804CFE, 0x26B027E7,<a name="line.493"></a> +<span class="sourceLineNo">494</span> 0xA0F9DB4A, 0x4FC9B053, 0x7B757B89, 0x94451090,<a name="line.494"></a> +<span class="sourceLineNo">495</span> 0x720AF422, 0x9D3A9F3B, 0xA98654E1, 0x46B63FF8,<a name="line.495"></a> +<span class="sourceLineNo">496</span> 0xC0FFC355, 0x2FCFA84C, 0x1B736396, 0xF443088F,<a name="line.496"></a> +<span class="sourceLineNo">497</span> 0xD200DC03, 0x3D30B71A, 0x098C7CC0, 0xE6BC17D9,<a name="line.497"></a> +<span class="sourceLineNo">498</span> 0x60F5EB74, 0x8FC5806D, 0xBB794BB7, 0x544920AE,<a name="line.498"></a> +<span class="sourceLineNo">499</span> 0xB206C41C, 0x5D36AF05, 0x698A64DF, 0x86BA0FC6,<a name="line.499"></a> +<span class="sourceLineNo">500</span> 0x00F3F36B, 0xEFC39872, 0xDB7F53A8, 0x344F38B1,<a name="line.500"></a> +<span class="sourceLineNo">501</span> 0x97F8FAB0, 0x78C891A9, 0x4C745A73, 0xA344316A,<a name="line.501"></a> +<span class="sourceLineNo">502</span> 0x250DCDC7, 0xCA3DA6DE, 0xFE816D04, 0x11B1061D,<a name="line.502"></a> +<span class="sourceLineNo">503</span> 0xF7FEE2AF, 0x18CE89B6, 0x2C72426C, 0xC3422975,<a name="line.503"></a> +<span class="sourceLineNo">504</span> 0x450BD5D8, 0xAA3BBEC1, 0x9E87751B, 0x71B71E02,<a name="line.504"></a> +<span class="sourceLineNo">505</span> 0x57F4CA8E, 0xB8C4A197, 0x8C786A4D, 0x63480154,<a name="line.505"></a> +<span class="sourceLineNo">506</span> 0xE501FDF9, 0x0A3196E0, 0x3E8D5D3A, 0xD1BD3623,<a name="line.506"></a> +<span class="sourceLineNo">507</span> 0x37F2D291, 0xD8C2B988, 0xEC7E7252, 0x034E194B,<a name="line.507"></a> +<span class="sourceLineNo">508</span> 0x8507E5E6, 0x6A378EFF, 0x5E8B4525, 0xB1BB2E3C,<a name="line.508"></a> +<span class="sourceLineNo">509</span> /* T8_6 */<a name="line.509"></a> +<span class="sourceLineNo">510</span> 0x00000000, 0x68032CC8, 0xD0065990, 0xB8057558,<a name="line.510"></a> +<span class="sourceLineNo">511</span> 0xA5E0C5D1, 0xCDE3E919, 0x75E69C41, 0x1DE5B089,<a name="line.511"></a> +<span class="sourceLineNo">512</span> 0x4E2DFD53, 0x262ED19B, 0x9E2BA4C3, 0xF628880B,<a name="line.512"></a> +<span class="sourceLineNo">513</span> 0xEBCD3882, 0x83CE144A, 0x3BCB6112, 0x53C84DDA,<a name="line.513"></a> +<span class="sourceLineNo">514</span> 0x9C5BFAA6, 0xF458D66E, 0x4C5DA336, 0x245E8FFE,<a name="line.514"></a> +<span class="sourceLineNo">515</span> 0x39BB3F77, 0x51B813BF, 0xE9BD66E7, 0x81BE4A2F,<a name="line.515"></a> +<span class="sourceLineNo">516</span> 0xD27607F5, 0xBA752B3D, 0x02705E65, 0x6A7372AD,<a name="line.516"></a> +<span class="sourceLineNo">517</span> 0x7796C224, 0x1F95EEEC, 0xA7909BB4, 0xCF93B77C,<a name="line.517"></a> +<span class="sourceLineNo">518</span> 0x3D5B83BD, 0x5558AF75, 0xED5DDA2D, 0x855EF6E5,<a name="line.518"></a> +<span class="sourceLineNo">519</span> 0x98BB466C, 0xF0B86AA4, 0x48BD1FFC, 0x20BE3334,<a name="line.519"></a> +<span class="sourceLineNo">520</span> 0x73767EEE, 0x1B755226, 0xA370277E, 0xCB730BB6,<a name="line.520"></a> +<span class="sourceLineNo">521</span> 0xD696BB3F, 0xBE9597F7, 0x0690E2AF, 0x6E93CE67,<a name="line.521"></a> +<span class="sourceLineNo">522</span> 0xA100791B, 0xC90355D3, 0x7106208B, 0x19050C43,<a name="line.522"></a> +<span class="sourceLineNo">523</span> 0x04E0BCCA, 0x6CE39002, 0xD4E6E55A, 0xBCE5C992,<a name="line.523"></a> +<span class="sourceLineNo">524</span> 0xEF2D8448, 0x872EA880, 0x3F2BDDD8, 0x5728F110,<a name="line.524"></a> +<span class="sourceLineNo">525</span> 0x4ACD4199, 0x22CE6D51, 0x9ACB1809, 0xF2C834C1,<a name="line.525"></a> +<span class="sourceLineNo">526</span> 0x7AB7077A, 0x12B42BB2, 0xAAB15EEA, 0xC2B27222,<a name="line.526"></a> +<span class="sourceLineNo">527</span> 0xDF57C2AB, 0xB754EE63, 0x0F519B3B, 0x6752B7F3,<a name="line.527"></a> +<span class="sourceLineNo">528</span> 0x349AFA29, 0x5C99D6E1, 0xE49CA3B9, 0x8C9F8F71,<a name="line.528"></a> +<span class="sourceLineNo">529</span> 0x917A3FF8, 0xF9791330, 0x417C6668, 0x297F4AA0,<a name="line.529"></a> +<span class="sourceLineNo">530</span> 0xE6ECFDDC, 0x8EEFD114, 0x36EAA44C, 0x5EE98884,<a name="line.530"></a> +<span class="sourceLineNo">531</span> 0x430C380D, 0x2B0F14C5, 0x930A619D, 0xFB094D55,<a name="line.531"></a> +<span class="sourceLineNo">532</span> 0xA8C1008F, 0xC0C22C47, 0x78C7591F, 0x10C475D7,<a name="line.532"></a> +<span class="sourceLineNo">533</span> 0x0D21C55E, 0x6522E996, 0xDD279CCE, 0xB524B006,<a name="line.533"></a> +<span class="sourceLineNo">534</span> 0x47EC84C7, 0x2FEFA80F, 0x97EADD57, 0xFFE9F19F,<a name="line.534"></a> +<span class="sourceLineNo">535</span> 0xE20C4116, 0x8A0F6DDE, 0x320A1886, 0x5A09344E,<a name="line.535"></a> +<span class="sourceLineNo">536</span> 0x09C17994, 0x61C2555C, 0xD9C72004, 0xB1C40CCC,<a name="line.536"></a> +<span class="sourceLineNo">537</span> 0xAC21BC45, 0xC422908D, 0x7C27E5D5, 0x1424C91D,<a name="line.537"></a> +<span class="sourceLineNo">538</span> 0xDBB77E61, 0xB3B452A9, 0x0BB127F1, 0x63B20B39,<a name="line.538"></a> +<span class="sourceLineNo">539</span> 0x7E57BBB0, 0x16549778, 0xAE51E220, 0xC652CEE8,<a name="line.539"></a> +<span class="sourceLineNo">540</span> 0x959A8332, 0xFD99AFFA, 0x459CDAA2, 0x2D9FF66A,<a name="line.540"></a> +<span class="sourceLineNo">541</span> 0x307A46E3, 0x58796A2B, 0xE07C1F73, 0x887F33BB,<a name="line.541"></a> +<span class="sourceLineNo">542</span> 0xF56E0EF4, 0x9D6D223C, 0x25685764, 0x4D6B7BAC,<a name="line.542"></a> +<span class="sourceLineNo">543</span> 0x508ECB25, 0x388DE7ED, 0x808892B5, 0xE88BBE7D,<a name="line.543"></a> +<span class="sourceLineNo">544</span> 0xBB43F3A7, 0xD340DF6F, 0x6B45AA37, 0x034686FF,<a name="line.544"></a> +<span class="sourceLineNo">545</span> 0x1EA33676, 0x76A01ABE, 0xCEA56FE6, 0xA6A6432E,<a name="line.545"></a> +<span class="sourceLineNo">546</span> 0x6935F452, 0x0136D89A, 0xB933ADC2, 0xD130810A,<a name="line.546"></a> +<span class="sourceLineNo">547</span> 0xCCD53183, 0xA4D61D4B, 0x1CD36813, 0x74D044DB,<a name="line.547"></a> +<span class="sourceLineNo">548</span> 0x27180901, 0x4F1B25C9, 0xF71E5091, 0x9F1D7C59,<a name="line.548"></a> +<span class="sourceLineNo">549</span> 0x82F8CCD0, 0xEAFBE018, 0x52FE9540, 0x3AFDB988,<a name="line.549"></a> +<span class="sourceLineNo">550</span> 0xC8358D49, 0xA036A181, 0x1833D4D9, 0x7030F811,<a name="line.550"></a> +<span class="sourceLineNo">551</span> 0x6DD54898, 0x05D66450, 0xBDD31108, 0xD5D03DC0,<a name="line.551"></a> +<span class="sourceLineNo">552</span> 0x8618701A, 0xEE1B5CD2, 0x561E298A, 0x3E1D0542,<a name="line.552"></a> +<span class="sourceLineNo">553</span> 0x23F8B5CB, 0x4BFB9903, 0xF3FEEC5B, 0x9BFDC093,<a name="line.553"></a> +<span class="sourceLineNo">554</span> 0x546E77EF, 0x3C6D5B27, 0x84682E7F, 0xEC6B02B7,<a name="line.554"></a> +<span class="sourceLineNo">555</span> 0xF18EB23E, 0x998D9EF6, 0x2188EBAE, 0x498BC766,<a name="line.555"></a> +<span class="sourceLineNo">556</span> 0x1A438ABC, 0x7240A674, 0xCA45D32C, 0xA246FFE4,<a name="line.556"></a> +<span class="sourceLineNo">557</span> 0xBFA34F6D, 0xD7A063A5, 0x6FA516FD, 0x07A63A35,<a name="line.557"></a> +<span class="sourceLineNo">558</span> 0x8FD9098E, 0xE7DA2546, 0x5FDF501E, 0x37DC7CD6,<a name="line.558"></a> +<span class="sourceLineNo">559</span> 0x2A39CC5F, 0x423AE097, 0xFA3F95CF, 0x923CB907,<a name="line.559"></a> +<span class="sourceLineNo">560</span> 0xC1F4F4DD, 0xA9F7D815, 0x11F2AD4D, 0x79F18185,<a name="line.560"></a> +<span class="sourceLineNo">561</span> 0x6414310C, 0x0C171DC4, 0xB412689C, 0xDC114454,<a name="line.561"></a> +<span class="sourceLineNo">562</span> 0x1382F328, 0x7B81DFE0, 0xC384AAB8, 0xAB878670,<a name="line.562"></a> +<span class="sourceLineNo">563</span> 0xB66236F9, 0xDE611A31, 0x66646F69, 0x0E6743A1,<a name="line.563"></a> +<span class="sourceLineNo">564</span> 0x5DAF0E7B, 0x35AC22B3, 0x8DA957EB, 0xE5AA7B23,<a name="line.564"></a> +<span class="sourceLineNo">565</span> 0xF84FCBAA, 0x904CE762, 0x2849923A, 0x404ABEF2,<a name="line.565"></a> +<span class="sourceLineNo">566</span> 0xB2828A33, 0xDA81A6FB, 0x6284D3A3, 0x0A87FF6B,<a name="line.566"></a> +<span class="sourceLineNo">567</span> 0x17624FE2, 0x7F61632A, 0xC7641672, 0xAF673ABA,<a name="line.567"></a> +<span class="sourceLineNo">568</span> 0xFCAF7760, 0x94AC5BA8, 0x2CA92EF0, 0x44AA0238,<a name="line.568"></a> +<span class="sourceLineNo">569</span> 0x594FB2B1, 0x314C9E79, 0x8949EB21, 0xE14AC7E9,<a name="line.569"></a> +<span class="sourceLineNo">570</span> 0x2ED97095, 0x46DA5C5D, 0xFEDF2905, 0x96DC05CD,<a name="line.570"></a> +<span class="sourceLineNo">571</span> 0x8B39B544, 0xE33A998C, 0x5B3FECD4, 0x333CC01C,<a name="line.571"></a> +<span class="sourceLineNo">572</span> 0x60F48DC6, 0x08F7A10E, 0xB0F2D456, 0xD8F1F89E,<a name="line.572"></a> +<span class="sourceLineNo">573</span> 0xC5144817, 0xAD1764DF, 0x15121187, 0x7D113D4F,<a name="line.573"></a> +<span class="sourceLineNo">574</span> /* T8_7 */<a name="line.574"></a> +<span class="sourceLineNo">575</span> 0x00000000, 0x493C7D27, 0x9278FA4E, 0xDB448769,<a name="line.575"></a> +<span class="sourceLineNo">576</span> 0x211D826D, 0x6821FF4A, 0xB3657823, 0xFA590504,<a name="line.576"></a> +<span class="sourceLineNo">577</span> 0x423B04DA, 0x0B0779FD, 0xD043FE94, 0x997F83B3,<a name="line.577"></a> +<span class="sourceLineNo">578</span> 0x632686B7, 0x2A1AFB90, 0xF15E7CF9, 0xB86201DE,<a name="line.578"></a> +<span class="sourceLineNo">579</span> 0x847609B4, 0xCD4A7493, 0x160EF3FA, 0x5F328EDD,<a name="line.579"></a> +<span class="sourceLineNo">580</span> 0xA56B8BD9, 0xEC57F6FE, 0x37137197, 0x7E2F0CB0,<a name="line.580"></a> +<span class="sourceLineNo">581</span> 0xC64D0D6E, 0x8F717049, 0x5435F720, 0x1D098A07,<a name="line.581"></a> +<span class="sourceLineNo">582</span> 0xE7508F03, 0xAE6CF224, 0x7528754D, 0x3C14086A,<a name="line.582"></a> +<span class="sourceLineNo">583</span> 0x0D006599, 0x443C18BE, 0x9F789FD7, 0xD644E2F0,<a name="line.583"></a> +<span class="sourceLineNo">584</span> 0x2C1DE7F4, 0x65219AD3, 0xBE651DBA, 0xF759609D,<a name="line.584"></a> +<span class="sourceLineNo">585</span> 0x4F3B6143, 0x06071C64, 0xDD439B0D, 0x947FE62A,<a name="line.585"></a> +<span class="sourceLineNo">586</span> 0x6E26E32E, 0x271A9E09, 0xFC5E1960, 0xB5626447,<a name="line.586"></a> +<span class="sourceLineNo">587</span> 0x89766C2D, 0xC04A110A, 0x1B0E9663, 0x5232EB44,<a name="line.587"></a> +<span class="sourceLineNo">588</span> 0xA86BEE40, 0xE1579367, 0x3A13140E, 0x732F6929,<a name="line.588"></a> +<span class="sourceLineNo">589</span> 0xCB4D68F7, 0x827115D0, 0x593592B9, 0x1009EF9E,<a name="line.589"></a> +<span class="sourceLineNo">590</span> 0xEA50EA9A, 0xA36C97BD, 0x782810D4, 0x31146DF3,<a name="line.590"></a> +<span class="sourceLineNo">591</span> 0x1A00CB32, 0x533CB615, 0x8878317C, 0xC1444C5B,<a name="line.591"></a> +<span class="sourceLineNo">592</span> 0x3B1D495F, 0x72213478, 0xA965B311, 0xE059CE36,<a name="line.592"></a> +<span class="sourceLineNo">593</span> 0x583BCFE8, 0x1107B2CF, 0xCA4335A6, 0x837F4881,<a name="line.593"></a> +<span class="sourceLineNo">594</span> 0x79264D85, 0x301A30A2, 0xEB5EB7CB, 0xA262CAEC,<a name="line.594"></a> +<span class="sourceLineNo">595</span> 0x9E76C286, 0xD74ABFA1, 0x0C0E38C8, 0x453245EF,<a name="line.595"></a> +<span class="sourceLineNo">596</span> 0xBF6B40EB, 0xF6573DCC, 0x2D13BAA5, 0x642FC782,<a name="line.596"></a> +<span class="sourceLineNo">597</span> 0xDC4DC65C, 0x9571BB7B, 0x4E353C12, 0x07094135,<a name="line.597"></a> +<span class="sourceLineNo">598</span> 0xFD504431, 0xB46C3916, 0x6F28BE7F, 0x2614C358,<a name="line.598"></a> +<span class="sourceLineNo">599</span> 0x1700AEAB, 0x5E3CD38C, 0x857854E5, 0xCC4429C2,<a name="line.599"></a> +<span class="sourceLineNo">600</span> 0x361D2CC6, 0x7F2151E1, 0xA465D688, 0xED59ABAF,<a name="line.600"></a> +<span class="sourceLineNo">601</span> 0x553BAA71, 0x1C07D756, 0xC743503F, 0x8E7F2D18,<a name="line.601"></a> +<span class="sourceLineNo">602</span> 0x7426281C, 0x3D1A553B, 0xE65ED252, 0xAF62AF75,<a name="line.602"></a> +<span class="sourceLineNo">603</span> 0x9376A71F, 0xDA4ADA38, 0x010E5D51, 0x48322076,<a name="line.603"></a> +<span class="sourceLineNo">604</span> 0xB26B2572, 0xFB575855, 0x2013DF3C, 0x692FA21B,<a name="line.604"></a> +<span class="sourceLineNo">605</span> 0xD14DA3C5, 0x9871DEE2, 0x4335598B, 0x0A0924AC,<a name="line.605"></a> +<span class="sourceLineNo">606</span> 0xF05021A8, 0xB96C5C8F, 0x6228DBE6, 0x2B14A6C1,<a name="line.606"></a> +<span class="sourceLineNo">607</span> 0x34019664, 0x7D3DEB43, 0xA6796C2A, 0xEF45110D,<a name="line.607"></a> +<span class="sourceLineNo">608</span> 0x151C1409, 0x5C20692E, 0x8764EE47, 0xCE589360,<a name="line.608"></a> +<span class="sourceLineNo">609</span> 0x763A92BE, 0x3F06EF99, 0xE44268F0, 0xAD7E15D7,<a name="line.609"></a> +<span class="sourceLineNo">610</span> 0x572710D3, 0x1E1B6DF4, 0xC55FEA9D, 0x8C6397BA,<a name="line.610"></a> +<span class="sourceLineNo">611</span> 0xB0779FD0, 0xF94BE2F7, 0x220F659E, 0x6B3318B9,<a name="line.611"></a> +<span class="sourceLineNo">612</span> 0x916A1DBD, 0xD856609A, 0x0312E7F3, 0x4A2E9AD4,<a name="line.612"></a> +<span class="sourceLineNo">613</span> 0xF24C9B0A, 0xBB70E62D, 0x60346144, 0x29081C63,<a name="line.613"></a> +<span class="sourceLineNo">614</span> 0xD3511967, 0x9A6D6440, 0x4129E329, 0x08159E0E,<a name="line.614"></a> +<span class="sourceLineNo">615</span> 0x3901F3FD, 0x703D8EDA, 0xAB7909B3, 0xE2457494,<a name="line.615"></a> +<span class="sourceLineNo">616</span> 0x181C7190, 0x51200CB7, 0x8A648BDE, 0xC358F6F9,<a name="line.616"></a> +<span class="sourceLineNo">617</span> 0x7B3AF727, 0x32068A00, 0xE9420D69, 0xA07E704E,<a name="line.617"></a> +<span class="sourceLineNo">618</span> 0x5A27754A, 0x131B086D, 0xC85F8F04, 0x8163F223,<a name="line.618"></a> +<span class="sourceLineNo">619</span> 0xBD77FA49, 0xF44B876E, 0x2F0F0007, 0x66337D20,<a name="line.619"></a> +<span class="sourceLineNo">620</span> 0x9C6A7824, 0xD5560503, 0x0E12826A, 0x472EFF4D,<a name="line.620"></a> +<span class="sourceLineNo">621</span> 0xFF4CFE93, 0xB67083B4, 0x6D3404DD, 0x240879FA,<a name="line.621"></a> +<span class="sourceLineNo">622</span> 0xDE517CFE, 0x976D01D9, 0x4C2986B0, 0x0515FB97,<a name="line.622"></a> +<span class="sourceLineNo">623</span> 0x2E015D56, 0x673D2071, 0xBC79A718, 0xF545DA3F,<a name="line.623"></a> +<span class="sourceLineNo">624</span> 0x0F1CDF3B, 0x4620A21C, 0x9D642575, 0xD4585852,<a name="line.624"></a> +<span class="sourceLineNo">625</span> 0x6C3A598C, 0x250624AB, 0xFE42A3C2, 0xB77EDEE5,<a name="line.625"></a> +<span class="sourceLineNo">626</span> 0x4D27DBE1, 0x041BA6C6, 0xDF5F21AF, 0x96635C88,<a name="line.626"></a> +<span class="sourceLineNo">627</span> 0xAA7754E2, 0xE34B29C5, 0x380FAEAC, 0x7133D38B,<a name="line.627"></a> +<span class="sourceLineNo">628</span> 0x8B6AD68F, 0xC256ABA8, 0x19122CC1, 0x502E51E6,<a name="line.628"></a> +<span class="sourceLineNo">629</span> 0xE84C5038, 0xA1702D1F, 0x7A34AA76, 0x3308D751,<a name="line.629"></a> +<span class="sourceLineNo">630</span> 0xC951D255, 0x806DAF72, 0x5B29281B, 0x1215553C,<a name="line.630"></a> +<span class="sourceLineNo">631</span> 0x230138CF, 0x6A3D45E8, 0xB179C281, 0xF845BFA6,<a name="line.631"></a> +<span class="sourceLineNo">632</span> 0x021CBAA2, 0x4B20C785, 0x906440EC, 0xD9583DCB,<a name="line.632"></a> +<span class="sourceLineNo">633</span> 0x613A3C15, 0x28064132, 0xF342C65B, 0xBA7EBB7C,<a name="line.633"></a> +<span class="sourceLineNo">634</span> 0x4027BE78, 0x091BC35F, 0xD25F4436, 0x9B633911,<a name="line.634"></a> +<span class="sourceLineNo">635</span> 0xA777317B, 0xEE4B4C5C, 0x350FCB35, 0x7C33B612,<a name="line.635"></a> +<span class="sourceLineNo">636</span> 0x866AB316, 0xCF56CE31, 0x14124958, 0x5D2E347F,<a name="line.636"></a> +<span class="sourceLineNo">637</span> 0xE54C35A1, 0xAC704886, 0x7734CFEF, 0x3E08B2C8,<a name="line.637"></a> +<span class="sourceLineNo">638</span> 0xC451B7CC, 0x8D6DCAEB, 0x56294D82, 0x1F1530A5<a name="line.638"></a> +<span class="sourceLineNo">639</span> };<a name="line.639"></a> +<span class="sourceLineNo">640</span>}<a name="line.640"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/Sha2Crypt.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/Sha2Crypt.html new file mode 100644 index 0000000000000000000000000000000000000000..43e1f5dcebc698d8ff75dd477b7115706a34a140 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/Sha2Crypt.html @@ -0,0 +1,689 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>package org.apache.commons.codec.digest;<a name="line.17"></a> +<span class="sourceLineNo">018</span><a name="line.18"></a> +<span class="sourceLineNo">019</span>import java.nio.charset.StandardCharsets;<a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.security.MessageDigest;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.security.NoSuchAlgorithmException;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.security.SecureRandom;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.Arrays;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.Random;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.concurrent.ThreadLocalRandom;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.regex.Matcher;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import java.util.regex.Pattern;<a name="line.27"></a> +<span class="sourceLineNo">028</span><a name="line.28"></a> +<span class="sourceLineNo">029</span>/**<a name="line.29"></a> +<span class="sourceLineNo">030</span> * SHA2-based Unix crypt implementation.<a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * Based on the C implementation released into the Public Domain by Ulrich Drepper &lt;drepper@redhat.com&gt;<a name="line.32"></a> +<span class="sourceLineNo">033</span> * http://www.akkadia.org/drepper/SHA-crypt.txt<a name="line.33"></a> +<span class="sourceLineNo">034</span> * <p><a name="line.34"></a> +<span class="sourceLineNo">035</span> * Conversion to Kotlin and from there to Java in 2012 by Christian Hammers &lt;ch@lathspell.de&gt; and likewise put<a name="line.35"></a> +<span class="sourceLineNo">036</span> * into the Public Domain.<a name="line.36"></a> +<span class="sourceLineNo">037</span> * <p><a name="line.37"></a> +<span class="sourceLineNo">038</span> * This class is immutable and thread-safe.<a name="line.38"></a> +<span class="sourceLineNo">039</span> *<a name="line.39"></a> +<span class="sourceLineNo">040</span> * @since 1.7<a name="line.40"></a> +<span class="sourceLineNo">041</span> */<a name="line.41"></a> +<span class="sourceLineNo">042</span>public class Sha2Crypt {<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> +<span class="sourceLineNo">044</span> /** Default number of rounds if not explicitly specified. */<a name="line.44"></a> +<span class="sourceLineNo">045</span> private static final int ROUNDS_DEFAULT = 5000;<a name="line.45"></a> +<span class="sourceLineNo">046</span><a name="line.46"></a> +<span class="sourceLineNo">047</span> /** Maximum number of rounds. */<a name="line.47"></a> +<span class="sourceLineNo">048</span> private static final int ROUNDS_MAX = 999999999;<a name="line.48"></a> +<span class="sourceLineNo">049</span><a name="line.49"></a> +<span class="sourceLineNo">050</span> /** Minimum number of rounds. */<a name="line.50"></a> +<span class="sourceLineNo">051</span> private static final int ROUNDS_MIN = 1000;<a name="line.51"></a> +<span class="sourceLineNo">052</span><a name="line.52"></a> +<span class="sourceLineNo">053</span> /** Prefix for optional rounds specification. */<a name="line.53"></a> +<span class="sourceLineNo">054</span> private static final String ROUNDS_PREFIX = "rounds=";<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> /** The number of bytes the final hash value will have (SHA-256 variant). */<a name="line.56"></a> +<span class="sourceLineNo">057</span> private static final int SHA256_BLOCKSIZE = 32;<a name="line.57"></a> +<span class="sourceLineNo">058</span><a name="line.58"></a> +<span class="sourceLineNo">059</span> /** The prefixes that can be used to identify this crypt() variant (SHA-256). */<a name="line.59"></a> +<span class="sourceLineNo">060</span> static final String SHA256_PREFIX = "$5$";<a name="line.60"></a> +<span class="sourceLineNo">061</span><a name="line.61"></a> +<span class="sourceLineNo">062</span> /** The number of bytes the final hash value will have (SHA-512 variant). */<a name="line.62"></a> +<span class="sourceLineNo">063</span> private static final int SHA512_BLOCKSIZE = 64;<a name="line.63"></a> +<span class="sourceLineNo">064</span><a name="line.64"></a> +<span class="sourceLineNo">065</span> /** The prefixes that can be used to identify this crypt() variant (SHA-512). */<a name="line.65"></a> +<span class="sourceLineNo">066</span> static final String SHA512_PREFIX = "$6$";<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> /** The pattern to match valid salt values. */<a name="line.68"></a> +<span class="sourceLineNo">069</span> private static final Pattern SALT_PATTERN = Pattern<a name="line.69"></a> +<span class="sourceLineNo">070</span> .compile("^\\$([56])\\$(rounds=(\\d+)\\$)?([\\.\\/a-zA-Z0-9]{1,16}).*");<a name="line.70"></a> +<span class="sourceLineNo">071</span><a name="line.71"></a> +<span class="sourceLineNo">072</span> /**<a name="line.72"></a> +<span class="sourceLineNo">073</span> * Generates a libc crypt() compatible "$5$" hash value with random salt.<a name="line.73"></a> +<span class="sourceLineNo">074</span> * <p><a name="line.74"></a> +<span class="sourceLineNo">075</span> * See {@link Crypt#crypt(String, String)} for details.<a name="line.75"></a> +<span class="sourceLineNo">076</span> * </p><a name="line.76"></a> +<span class="sourceLineNo">077</span> * <p><a name="line.77"></a> +<span class="sourceLineNo">078</span> * A salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.78"></a> +<span class="sourceLineNo">079</span> * {@link SecureRandom} to generate your own salts and calling {@link #sha256Crypt(byte[], String)}.<a name="line.79"></a> +<span class="sourceLineNo">080</span> * </p><a name="line.80"></a> +<span class="sourceLineNo">081</span> *<a name="line.81"></a> +<span class="sourceLineNo">082</span> * @param keyBytes<a name="line.82"></a> +<span class="sourceLineNo">083</span> * plaintext to hash<a name="line.83"></a> +<span class="sourceLineNo">084</span> * @return complete hash value<a name="line.84"></a> +<span class="sourceLineNo">085</span> * @throws IllegalArgumentException<a name="line.85"></a> +<span class="sourceLineNo">086</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.86"></a> +<span class="sourceLineNo">087</span> */<a name="line.87"></a> +<span class="sourceLineNo">088</span> public static String sha256Crypt(final byte[] keyBytes) {<a name="line.88"></a> +<span class="sourceLineNo">089</span> return sha256Crypt(keyBytes, null);<a name="line.89"></a> +<span class="sourceLineNo">090</span> }<a name="line.90"></a> +<span class="sourceLineNo">091</span><a name="line.91"></a> +<span class="sourceLineNo">092</span> /**<a name="line.92"></a> +<span class="sourceLineNo">093</span> * Generates a libc6 crypt() compatible "$5$" hash value.<a name="line.93"></a> +<span class="sourceLineNo">094</span> * <p><a name="line.94"></a> +<span class="sourceLineNo">095</span> * See {@link Crypt#crypt(String, String)} for details.<a name="line.95"></a> +<span class="sourceLineNo">096</span> * </p><a name="line.96"></a> +<span class="sourceLineNo">097</span> * @param keyBytes<a name="line.97"></a> +<span class="sourceLineNo">098</span> * plaintext to hash<a name="line.98"></a> +<span class="sourceLineNo">099</span> * @param salt<a name="line.99"></a> +<span class="sourceLineNo">100</span> * real salt value without prefix or "rounds=". The salt may be null, in which case a salt<a name="line.100"></a> +<span class="sourceLineNo">101</span> * is generated for you using {@link SecureRandom}. If one does not want to use {@link SecureRandom},<a name="line.101"></a> +<span class="sourceLineNo">102</span> * you can pass your own {@link Random} in {@link #sha256Crypt(byte[], String, Random)}.<a name="line.102"></a> +<span class="sourceLineNo">103</span> * @return complete hash value including salt<a name="line.103"></a> +<span class="sourceLineNo">104</span> * @throws IllegalArgumentException<a name="line.104"></a> +<span class="sourceLineNo">105</span> * if the salt does not match the allowed pattern<a name="line.105"></a> +<span class="sourceLineNo">106</span> * @throws IllegalArgumentException<a name="line.106"></a> +<span class="sourceLineNo">107</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.107"></a> +<span class="sourceLineNo">108</span> */<a name="line.108"></a> +<span class="sourceLineNo">109</span> public static String sha256Crypt(final byte[] keyBytes, String salt) {<a name="line.109"></a> +<span class="sourceLineNo">110</span> if (salt == null) {<a name="line.110"></a> +<span class="sourceLineNo">111</span> salt = SHA256_PREFIX + B64.getRandomSalt(8);<a name="line.111"></a> +<span class="sourceLineNo">112</span> }<a name="line.112"></a> +<span class="sourceLineNo">113</span> return sha2Crypt(keyBytes, salt, SHA256_PREFIX, SHA256_BLOCKSIZE, MessageDigestAlgorithms.SHA_256);<a name="line.113"></a> +<span class="sourceLineNo">114</span> }<a name="line.114"></a> +<span class="sourceLineNo">115</span><a name="line.115"></a> +<span class="sourceLineNo">116</span> /**<a name="line.116"></a> +<span class="sourceLineNo">117</span> * Generates a libc6 crypt() compatible "$5$" hash value.<a name="line.117"></a> +<span class="sourceLineNo">118</span> * <p><a name="line.118"></a> +<span class="sourceLineNo">119</span> * See {@link Crypt#crypt(String, String)} for details.<a name="line.119"></a> +<span class="sourceLineNo">120</span> * </p><a name="line.120"></a> +<span class="sourceLineNo">121</span> * @param keyBytes<a name="line.121"></a> +<span class="sourceLineNo">122</span> * plaintext to hash<a name="line.122"></a> +<span class="sourceLineNo">123</span> * @param salt<a name="line.123"></a> +<span class="sourceLineNo">124</span> * real salt value without prefix or "rounds=".<a name="line.124"></a> +<span class="sourceLineNo">125</span> * @param random<a name="line.125"></a> +<span class="sourceLineNo">126</span> * the instance of {@link Random} to use for generating the salt. Consider using {@link SecureRandom}<a name="line.126"></a> +<span class="sourceLineNo">127</span> * or {@link ThreadLocalRandom}.<a name="line.127"></a> +<span class="sourceLineNo">128</span> * @return complete hash value including salt<a name="line.128"></a> +<span class="sourceLineNo">129</span> * @throws IllegalArgumentException<a name="line.129"></a> +<span class="sourceLineNo">130</span> * if the salt does not match the allowed pattern<a name="line.130"></a> +<span class="sourceLineNo">131</span> * @throws IllegalArgumentException<a name="line.131"></a> +<span class="sourceLineNo">132</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.132"></a> +<span class="sourceLineNo">133</span> * @since 1.12<a name="line.133"></a> +<span class="sourceLineNo">134</span> */<a name="line.134"></a> +<span class="sourceLineNo">135</span> public static String sha256Crypt(final byte[] keyBytes, String salt, final Random random) {<a name="line.135"></a> +<span class="sourceLineNo">136</span> if (salt == null) {<a name="line.136"></a> +<span class="sourceLineNo">137</span> salt = SHA256_PREFIX + B64.getRandomSalt(8, random);<a name="line.137"></a> +<span class="sourceLineNo">138</span> }<a name="line.138"></a> +<span class="sourceLineNo">139</span> return sha2Crypt(keyBytes, salt, SHA256_PREFIX, SHA256_BLOCKSIZE, MessageDigestAlgorithms.SHA_256);<a name="line.139"></a> +<span class="sourceLineNo">140</span> }<a name="line.140"></a> +<span class="sourceLineNo">141</span><a name="line.141"></a> +<span class="sourceLineNo">142</span> /**<a name="line.142"></a> +<span class="sourceLineNo">143</span> * Generates a libc6 crypt() compatible "$5$" or "$6$" SHA2 based hash value.<a name="line.143"></a> +<span class="sourceLineNo">144</span> * <p><a name="line.144"></a> +<span class="sourceLineNo">145</span> * This is a nearly line by line conversion of the original C function. The numbered comments are from the algorithm<a name="line.145"></a> +<span class="sourceLineNo">146</span> * description, the short C-style ones from the original C code and the ones with "Remark" from me.<a name="line.146"></a> +<span class="sourceLineNo">147</span> * <p><a name="line.147"></a> +<span class="sourceLineNo">148</span> * See {@link Crypt#crypt(String, String)} for details.<a name="line.148"></a> +<span class="sourceLineNo">149</span> *<a name="line.149"></a> +<span class="sourceLineNo">150</span> * @param keyBytes<a name="line.150"></a> +<span class="sourceLineNo">151</span> * plaintext to hash<a name="line.151"></a> +<span class="sourceLineNo">152</span> * @param salt<a name="line.152"></a> +<span class="sourceLineNo">153</span> * real salt value without prefix or "rounds="; may not be null<a name="line.153"></a> +<span class="sourceLineNo">154</span> * @param saltPrefix<a name="line.154"></a> +<span class="sourceLineNo">155</span> * either $5$ or $6$<a name="line.155"></a> +<span class="sourceLineNo">156</span> * @param blocksize<a name="line.156"></a> +<span class="sourceLineNo">157</span> * a value that differs between $5$ and $6$<a name="line.157"></a> +<span class="sourceLineNo">158</span> * @param algorithm<a name="line.158"></a> +<span class="sourceLineNo">159</span> * {@link MessageDigest} algorithm identifier string<a name="line.159"></a> +<span class="sourceLineNo">160</span> * @return complete hash value including prefix and salt<a name="line.160"></a> +<span class="sourceLineNo">161</span> * @throws IllegalArgumentException<a name="line.161"></a> +<span class="sourceLineNo">162</span> * if the given salt is {@code null} or does not match the allowed pattern<a name="line.162"></a> +<span class="sourceLineNo">163</span> * @throws IllegalArgumentException<a name="line.163"></a> +<span class="sourceLineNo">164</span> * when a {@link NoSuchAlgorithmException} is caught<a name="line.164"></a> +<span class="sourceLineNo">165</span> * @see MessageDigestAlgorithms<a name="line.165"></a> +<span class="sourceLineNo">166</span> */<a name="line.166"></a> +<span class="sourceLineNo">167</span> private static String sha2Crypt(final byte[] keyBytes, final String salt, final String saltPrefix,<a name="line.167"></a> +<span class="sourceLineNo">168</span> final int blocksize, final String algorithm) {<a name="line.168"></a> +<span class="sourceLineNo">169</span><a name="line.169"></a> +<span class="sourceLineNo">170</span> final int keyLen = keyBytes.length;<a name="line.170"></a> +<span class="sourceLineNo">171</span><a name="line.171"></a> +<span class="sourceLineNo">172</span> // Extracts effective salt and the number of rounds from the given salt.<a name="line.172"></a> +<span class="sourceLineNo">173</span> int rounds = ROUNDS_DEFAULT;<a name="line.173"></a> +<span class="sourceLineNo">174</span> boolean roundsCustom = false;<a name="line.174"></a> +<span class="sourceLineNo">175</span> if (salt == null) {<a name="line.175"></a> +<span class="sourceLineNo">176</span> throw new IllegalArgumentException("Salt must not be null");<a name="line.176"></a> +<span class="sourceLineNo">177</span> }<a name="line.177"></a> +<span class="sourceLineNo">178</span><a name="line.178"></a> +<span class="sourceLineNo">179</span> final Matcher m = SALT_PATTERN.matcher(salt);<a name="line.179"></a> +<span class="sourceLineNo">180</span> if (!m.find()) {<a name="line.180"></a> +<span class="sourceLineNo">181</span> throw new IllegalArgumentException("Invalid salt value: " + salt);<a name="line.181"></a> +<span class="sourceLineNo">182</span> }<a name="line.182"></a> +<span class="sourceLineNo">183</span> if (m.group(3) != null) {<a name="line.183"></a> +<span class="sourceLineNo">184</span> rounds = Integer.parseInt(m.group(3));<a name="line.184"></a> +<span class="sourceLineNo">185</span> rounds = Math.max(ROUNDS_MIN, Math.min(ROUNDS_MAX, rounds));<a name="line.185"></a> +<span class="sourceLineNo">186</span> roundsCustom = true;<a name="line.186"></a> +<span class="sourceLineNo">187</span> }<a name="line.187"></a> +<span class="sourceLineNo">188</span> final String saltString = m.group(4);<a name="line.188"></a> +<span class="sourceLineNo">189</span> final byte[] saltBytes = saltString.getBytes(StandardCharsets.UTF_8);<a name="line.189"></a> +<span class="sourceLineNo">190</span> final int saltLen = saltBytes.length;<a name="line.190"></a> +<span class="sourceLineNo">191</span><a name="line.191"></a> +<span class="sourceLineNo">192</span> // 1. start digest A<a name="line.192"></a> +<span class="sourceLineNo">193</span> // Prepare for the real work.<a name="line.193"></a> +<span class="sourceLineNo">194</span> MessageDigest ctx = DigestUtils.getDigest(algorithm);<a name="line.194"></a> +<span class="sourceLineNo">195</span><a name="line.195"></a> +<span class="sourceLineNo">196</span> // 2. the password string is added to digest A<a name="line.196"></a> +<span class="sourceLineNo">197</span> /*<a name="line.197"></a> +<span class="sourceLineNo">198</span> * Add the key string.<a name="line.198"></a> +<span class="sourceLineNo">199</span> */<a name="line.199"></a> +<span class="sourceLineNo">200</span> ctx.update(keyBytes);<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> // 3. the salt string is added to digest A. This is just the salt string<a name="line.202"></a> +<span class="sourceLineNo">203</span> // itself without the enclosing '$', without the magic salt_prefix $5$ and<a name="line.203"></a> +<span class="sourceLineNo">204</span> // $6$ respectively and without the rounds=<N> specification.<a name="line.204"></a> +<span class="sourceLineNo">205</span> //<a name="line.205"></a> +<span class="sourceLineNo">206</span> // NB: the MD5 algorithm did add the $1$ salt_prefix. This is not deemed<a name="line.206"></a> +<span class="sourceLineNo">207</span> // necessary since it is a constant string and does not add security<a name="line.207"></a> +<span class="sourceLineNo">208</span> // and /possibly/ allows a plain text attack. Since the rounds=<N><a name="line.208"></a> +<span class="sourceLineNo">209</span> // specification should never be added this would also create an<a name="line.209"></a> +<span class="sourceLineNo">210</span> // inconsistency.<a name="line.210"></a> +<span class="sourceLineNo">211</span> /*<a name="line.211"></a> +<span class="sourceLineNo">212</span> * The last part is the salt string. This must be at most 16 characters and it ends at the first `$' character<a name="line.212"></a> +<span class="sourceLineNo">213</span> * (for compatibility with existing implementations).<a name="line.213"></a> +<span class="sourceLineNo">214</span> */<a name="line.214"></a> +<span class="sourceLineNo">215</span> ctx.update(saltBytes);<a name="line.215"></a> +<span class="sourceLineNo">216</span><a name="line.216"></a> +<span class="sourceLineNo">217</span> // 4. start digest B<a name="line.217"></a> +<span class="sourceLineNo">218</span> /*<a name="line.218"></a> +<span class="sourceLineNo">219</span> * Compute alternate sha512 sum with input KEY, SALT, and KEY. The final result will be added to the first<a name="line.219"></a> +<span class="sourceLineNo">220</span> * context.<a name="line.220"></a> +<span class="sourceLineNo">221</span> */<a name="line.221"></a> +<span class="sourceLineNo">222</span> MessageDigest altCtx = DigestUtils.getDigest(algorithm);<a name="line.222"></a> +<span class="sourceLineNo">223</span><a name="line.223"></a> +<span class="sourceLineNo">224</span> // 5. add the password to digest B<a name="line.224"></a> +<span class="sourceLineNo">225</span> /*<a name="line.225"></a> +<span class="sourceLineNo">226</span> * Add key.<a name="line.226"></a> +<span class="sourceLineNo">227</span> */<a name="line.227"></a> +<span class="sourceLineNo">228</span> altCtx.update(keyBytes);<a name="line.228"></a> +<span class="sourceLineNo">229</span><a name="line.229"></a> +<span class="sourceLineNo">230</span> // 6. add the salt string to digest B<a name="line.230"></a> +<span class="sourceLineNo">231</span> /*<a name="line.231"></a> +<span class="sourceLineNo">232</span> * Add salt.<a name="line.232"></a> +<span class="sourceLineNo">233</span> */<a name="line.233"></a> +<span class="sourceLineNo">234</span> altCtx.update(saltBytes);<a name="line.234"></a> +<span class="sourceLineNo">235</span><a name="line.235"></a> +<span class="sourceLineNo">236</span> // 7. add the password again to digest B<a name="line.236"></a> +<span class="sourceLineNo">237</span> /*<a name="line.237"></a> +<span class="sourceLineNo">238</span> * Add key again.<a name="line.238"></a> +<span class="sourceLineNo">239</span> */<a name="line.239"></a> +<span class="sourceLineNo">240</span> altCtx.update(keyBytes);<a name="line.240"></a> +<span class="sourceLineNo">241</span><a name="line.241"></a> +<span class="sourceLineNo">242</span> // 8. finish digest B<a name="line.242"></a> +<span class="sourceLineNo">243</span> /*<a name="line.243"></a> +<span class="sourceLineNo">244</span> * Now get result of this (32 bytes) and add it to the other context.<a name="line.244"></a> +<span class="sourceLineNo">245</span> */<a name="line.245"></a> +<span class="sourceLineNo">246</span> byte[] altResult = altCtx.digest();<a name="line.246"></a> +<span class="sourceLineNo">247</span><a name="line.247"></a> +<span class="sourceLineNo">248</span> // 9. For each block of 32 or 64 bytes in the password string (excluding<a name="line.248"></a> +<span class="sourceLineNo">249</span> // the terminating NUL in the C representation), add digest B to digest A<a name="line.249"></a> +<span class="sourceLineNo">250</span> /*<a name="line.250"></a> +<span class="sourceLineNo">251</span> * Add for any character in the key one byte of the alternate sum.<a name="line.251"></a> +<span class="sourceLineNo">252</span> */<a name="line.252"></a> +<span class="sourceLineNo">253</span> /*<a name="line.253"></a> +<span class="sourceLineNo">254</span> * (Remark: the C code comment seems wrong for key length > 32!)<a name="line.254"></a> +<span class="sourceLineNo">255</span> */<a name="line.255"></a> +<span class="sourceLineNo">256</span> int cnt = keyBytes.length;<a name="line.256"></a> +<span class="sourceLineNo">257</span> while (cnt > blocksize) {<a name="line.257"></a> +<span class="sourceLineNo">258</span> ctx.update(altResult, 0, blocksize);<a name="line.258"></a> +<span class="sourceLineNo">259</span> cnt -= blocksize;<a name="line.259"></a> +<span class="sourceLineNo">260</span> }<a name="line.260"></a> +<span class="sourceLineNo">261</span><a name="line.261"></a> +<span class="sourceLineNo">262</span> // 10. For the remaining N bytes of the password string add the first<a name="line.262"></a> +<span class="sourceLineNo">263</span> // N bytes of digest B to digest A<a name="line.263"></a> +<span class="sourceLineNo">264</span> ctx.update(altResult, 0, cnt);<a name="line.264"></a> +<span class="sourceLineNo">265</span><a name="line.265"></a> +<span class="sourceLineNo">266</span> // 11. For each bit of the binary representation of the length of the<a name="line.266"></a> +<span class="sourceLineNo">267</span> // password string up to and including the highest 1-digit, starting<a name="line.267"></a> +<span class="sourceLineNo">268</span> // from to lowest bit position (numeric value 1):<a name="line.268"></a> +<span class="sourceLineNo">269</span> //<a name="line.269"></a> +<span class="sourceLineNo">270</span> // a) for a 1-digit add digest B to digest A<a name="line.270"></a> +<span class="sourceLineNo">271</span> //<a name="line.271"></a> +<span class="sourceLineNo">272</span> // b) for a 0-digit add the password string<a name="line.272"></a> +<span class="sourceLineNo">273</span> //<a name="line.273"></a> +<span class="sourceLineNo">274</span> // NB: this step differs significantly from the MD5 algorithm. It<a name="line.274"></a> +<span class="sourceLineNo">275</span> // adds more randomness.<a name="line.275"></a> +<span class="sourceLineNo">276</span> /*<a name="line.276"></a> +<span class="sourceLineNo">277</span> * Take the binary representation of the length of the key and for every 1 add the alternate sum, for every 0<a name="line.277"></a> +<span class="sourceLineNo">278</span> * the key.<a name="line.278"></a> +<span class="sourceLineNo">279</span> */<a name="line.279"></a> +<span class="sourceLineNo">280</span> cnt = keyBytes.length;<a name="line.280"></a> +<span class="sourceLineNo">281</span> while (cnt > 0) {<a name="line.281"></a> +<span class="sourceLineNo">282</span> if ((cnt & 1) != 0) {<a name="line.282"></a> +<span class="sourceLineNo">283</span> ctx.update(altResult, 0, blocksize);<a name="line.283"></a> +<span class="sourceLineNo">284</span> } else {<a name="line.284"></a> +<span class="sourceLineNo">285</span> ctx.update(keyBytes);<a name="line.285"></a> +<span class="sourceLineNo">286</span> }<a name="line.286"></a> +<span class="sourceLineNo">287</span> cnt >>= 1;<a name="line.287"></a> +<span class="sourceLineNo">288</span> }<a name="line.288"></a> +<span class="sourceLineNo">289</span><a name="line.289"></a> +<span class="sourceLineNo">290</span> // 12. finish digest A<a name="line.290"></a> +<span class="sourceLineNo">291</span> /*<a name="line.291"></a> +<span class="sourceLineNo">292</span> * Create intermediate result.<a name="line.292"></a> +<span class="sourceLineNo">293</span> */<a name="line.293"></a> +<span class="sourceLineNo">294</span> altResult = ctx.digest();<a name="line.294"></a> +<span class="sourceLineNo">295</span><a name="line.295"></a> +<span class="sourceLineNo">296</span> // 13. start digest DP<a name="line.296"></a> +<span class="sourceLineNo">297</span> /*<a name="line.297"></a> +<span class="sourceLineNo">298</span> * Start computation of P byte sequence.<a name="line.298"></a> +<span class="sourceLineNo">299</span> */<a name="line.299"></a> +<span class="sourceLineNo">300</span> altCtx = DigestUtils.getDigest(algorithm);<a name="line.300"></a> +<span class="sourceLineNo">301</span><a name="line.301"></a> +<span class="sourceLineNo">302</span> // 14. for every byte in the password (excluding the terminating NUL byte<a name="line.302"></a> +<span class="sourceLineNo">303</span> // in the C representation of the string)<a name="line.303"></a> +<span class="sourceLineNo">304</span> //<a name="line.304"></a> +<span class="sourceLineNo">305</span> // add the password to digest DP<a name="line.305"></a> +<span class="sourceLineNo">306</span> /*<a name="line.306"></a> +<span class="sourceLineNo">307</span> * For every character in the password add the entire password.<a name="line.307"></a> +<span class="sourceLineNo">308</span> */<a name="line.308"></a> +<span class="sourceLineNo">309</span> for (int i = 1; i <= keyLen; i++) {<a name="line.309"></a> +<span class="sourceLineNo">310</span> altCtx.update(keyBytes);<a name="line.310"></a> +<span class="sourceLineNo">311</span> }<a name="line.311"></a> +<span class="sourceLineNo">312</span><a name="line.312"></a> +<span class="sourceLineNo">313</span> // 15. finish digest DP<a name="line.313"></a> +<span class="sourceLineNo">314</span> /*<a name="line.314"></a> +<span class="sourceLineNo">315</span> * Finish the digest.<a name="line.315"></a> +<span class="sourceLineNo">316</span> */<a name="line.316"></a> +<span class="sourceLineNo">317</span> byte[] tempResult = altCtx.digest();<a name="line.317"></a> +<span class="sourceLineNo">318</span><a name="line.318"></a> +<span class="sourceLineNo">319</span> // 16. produce byte sequence P of the same length as the password where<a name="line.319"></a> +<span class="sourceLineNo">320</span> //<a name="line.320"></a> +<span class="sourceLineNo">321</span> // a) for each block of 32 or 64 bytes of length of the password string<a name="line.321"></a> +<span class="sourceLineNo">322</span> // the entire digest DP is used<a name="line.322"></a> +<span class="sourceLineNo">323</span> //<a name="line.323"></a> +<span class="sourceLineNo">324</span> // b) for the remaining N (up to 31 or 63) bytes use the first N<a name="line.324"></a> +<span class="sourceLineNo">325</span> // bytes of digest DP<a name="line.325"></a> +<span class="sourceLineNo">326</span> /*<a name="line.326"></a> +<span class="sourceLineNo">327</span> * Create byte sequence P.<a name="line.327"></a> +<span class="sourceLineNo">328</span> */<a name="line.328"></a> +<span class="sourceLineNo">329</span> final byte[] pBytes = new byte[keyLen];<a name="line.329"></a> +<span class="sourceLineNo">330</span> int cp = 0;<a name="line.330"></a> +<span class="sourceLineNo">331</span> while (cp < keyLen - blocksize) {<a name="line.331"></a> +<span class="sourceLineNo">332</span> System.arraycopy(tempResult, 0, pBytes, cp, blocksize);<a name="line.332"></a> +<span class="sourceLineNo">333</span> cp += blocksize;<a name="line.333"></a> +<span class="sourceLineNo">334</span> }<a name="line.334"></a> +<span class="sourceLineNo">335</span> System.arraycopy(tempResult, 0, pBytes, cp, keyLen - cp);<a name="line.335"></a> +<span class="sourceLineNo">336</span><a name="line.336"></a> +<span class="sourceLineNo">337</span> // 17. start digest DS<a name="line.337"></a> +<span class="sourceLineNo">338</span> /*<a name="line.338"></a> +<span class="sourceLineNo">339</span> * Start computation of S byte sequence.<a name="line.339"></a> +<span class="sourceLineNo">340</span> */<a name="line.340"></a> +<span class="sourceLineNo">341</span> altCtx = DigestUtils.getDigest(algorithm);<a name="line.341"></a> +<span class="sourceLineNo">342</span><a name="line.342"></a> +<span class="sourceLineNo">343</span> // 18. repeast the following 16+A[0] times, where A[0] represents the first<a name="line.343"></a> +<span class="sourceLineNo">344</span> // byte in digest A interpreted as an 8-bit unsigned value<a name="line.344"></a> +<span class="sourceLineNo">345</span> //<a name="line.345"></a> +<span class="sourceLineNo">346</span> // add the salt to digest DS<a name="line.346"></a> +<span class="sourceLineNo">347</span> /*<a name="line.347"></a> +<span class="sourceLineNo">348</span> * For every character in the password add the entire password.<a name="line.348"></a> +<span class="sourceLineNo">349</span> */<a name="line.349"></a> +<span class="sourceLineNo">350</span> for (int i = 1; i <= 16 + (altResult[0] & 0xff); i++) {<a name="line.350"></a> +<span class="sourceLineNo">351</span> altCtx.update(saltBytes);<a name="line.351"></a> +<span class="sourceLineNo">352</span> }<a name="line.352"></a> +<span class="sourceLineNo">353</span><a name="line.353"></a> +<span class="sourceLineNo">354</span> // 19. finish digest DS<a name="line.354"></a> +<span class="sourceLineNo">355</span> /*<a name="line.355"></a> +<span class="sourceLineNo">356</span> * Finish the digest.<a name="line.356"></a> +<span class="sourceLineNo">357</span> */<a name="line.357"></a> +<span class="sourceLineNo">358</span> tempResult = altCtx.digest();<a name="line.358"></a> +<span class="sourceLineNo">359</span><a name="line.359"></a> +<span class="sourceLineNo">360</span> // 20. produce byte sequence S of the same length as the salt string where<a name="line.360"></a> +<span class="sourceLineNo">361</span> //<a name="line.361"></a> +<span class="sourceLineNo">362</span> // a) for each block of 32 or 64 bytes of length of the salt string<a name="line.362"></a> +<span class="sourceLineNo">363</span> // the entire digest DS is used<a name="line.363"></a> +<span class="sourceLineNo">364</span> //<a name="line.364"></a> +<span class="sourceLineNo">365</span> // b) for the remaining N (up to 31 or 63) bytes use the first N<a name="line.365"></a> +<span class="sourceLineNo">366</span> // bytes of digest DS<a name="line.366"></a> +<span class="sourceLineNo">367</span> /*<a name="line.367"></a> +<span class="sourceLineNo">368</span> * Create byte sequence S.<a name="line.368"></a> +<span class="sourceLineNo">369</span> */<a name="line.369"></a> +<span class="sourceLineNo">370</span> // Remark: The salt is limited to 16 chars, how does this make sense?<a name="line.370"></a> +<span class="sourceLineNo">371</span> final byte[] sBytes = new byte[saltLen];<a name="line.371"></a> +<span class="sourceLineNo">372</span> cp = 0;<a name="line.372"></a> +<span class="sourceLineNo">373</span> while (cp < saltLen - blocksize) {<a name="line.373"></a> +<span class="sourceLineNo">374</span> System.arraycopy(tempResult, 0, sBytes, cp, blocksize);<a name="line.374"></a> +<span class="sourceLineNo">375</span> cp += blocksize;<a name="line.375"></a> +<span class="sourceLineNo">376</span> }<a name="line.376"></a> +<span class="sourceLineNo">377</span> System.arraycopy(tempResult, 0, sBytes, cp, saltLen - cp);<a name="line.377"></a> +<span class="sourceLineNo">378</span><a name="line.378"></a> +<span class="sourceLineNo">379</span> // 21. repeat a loop according to the number specified in the rounds=<N><a name="line.379"></a> +<span class="sourceLineNo">380</span> // specification in the salt (or the default value if none is<a name="line.380"></a> +<span class="sourceLineNo">381</span> // present). Each round is numbered, starting with 0 and up to N-1.<a name="line.381"></a> +<span class="sourceLineNo">382</span> //<a name="line.382"></a> +<span class="sourceLineNo">383</span> // The loop uses a digest as input. In the first round it is the<a name="line.383"></a> +<span class="sourceLineNo">384</span> // digest produced in step 12. In the latter steps it is the digest<a name="line.384"></a> +<span class="sourceLineNo">385</span> // produced in step 21.h. The following text uses the notation<a name="line.385"></a> +<span class="sourceLineNo">386</span> // "digest A/C" to describe this behavior.<a name="line.386"></a> +<span class="sourceLineNo">387</span> /*<a name="line.387"></a> +<span class="sourceLineNo">388</span> * Repeatedly run the collected hash value through sha512 to burn CPU cycles.<a name="line.388"></a> +<span class="sourceLineNo">389</span> */<a name="line.389"></a> +<span class="sourceLineNo">390</span> for (int i = 0; i <= rounds - 1; i++) {<a name="line.390"></a> +<span class="sourceLineNo">391</span> // a) start digest C<a name="line.391"></a> +<span class="sourceLineNo">392</span> /*<a name="line.392"></a> +<span class="sourceLineNo">393</span> * New context.<a name="line.393"></a> +<span class="sourceLineNo">394</span> */<a name="line.394"></a> +<span class="sourceLineNo">395</span> ctx = DigestUtils.getDigest(algorithm);<a name="line.395"></a> +<span class="sourceLineNo">396</span><a name="line.396"></a> +<span class="sourceLineNo">397</span> // b) for odd round numbers add the byte sequense P to digest C<a name="line.397"></a> +<span class="sourceLineNo">398</span> // c) for even round numbers add digest A/C<a name="line.398"></a> +<span class="sourceLineNo">399</span> /*<a name="line.399"></a> +<span class="sourceLineNo">400</span> * Add key or last result.<a name="line.400"></a> +<span class="sourceLineNo">401</span> */<a name="line.401"></a> +<span class="sourceLineNo">402</span> if ((i & 1) != 0) {<a name="line.402"></a> +<span class="sourceLineNo">403</span> ctx.update(pBytes, 0, keyLen);<a name="line.403"></a> +<span class="sourceLineNo">404</span> } else {<a name="line.404"></a> +<span class="sourceLineNo">405</span> ctx.update(altResult, 0, blocksize);<a name="line.405"></a> +<span class="sourceLineNo">406</span> }<a name="line.406"></a> +<span class="sourceLineNo">407</span><a name="line.407"></a> +<span class="sourceLineNo">408</span> // d) for all round numbers not divisible by 3 add the byte sequence S<a name="line.408"></a> +<span class="sourceLineNo">409</span> /*<a name="line.409"></a> +<span class="sourceLineNo">410</span> * Add salt for numbers not divisible by 3.<a name="line.410"></a> +<span class="sourceLineNo">411</span> */<a name="line.411"></a> +<span class="sourceLineNo">412</span> if (i % 3 != 0) {<a name="line.412"></a> +<span class="sourceLineNo">413</span> ctx.update(sBytes, 0, saltLen);<a name="line.413"></a> +<span class="sourceLineNo">414</span> }<a name="line.414"></a> +<span class="sourceLineNo">415</span><a name="line.415"></a> +<span class="sourceLineNo">416</span> // e) for all round numbers not divisible by 7 add the byte sequence P<a name="line.416"></a> +<span class="sourceLineNo">417</span> /*<a name="line.417"></a> +<span class="sourceLineNo">418</span> * Add key for numbers not divisible by 7.<a name="line.418"></a> +<span class="sourceLineNo">419</span> */<a name="line.419"></a> +<span class="sourceLineNo">420</span> if (i % 7 != 0) {<a name="line.420"></a> +<span class="sourceLineNo">421</span> ctx.update(pBytes, 0, keyLen);<a name="line.421"></a> +<span class="sourceLineNo">422</span> }<a name="line.422"></a> +<span class="sourceLineNo">423</span><a name="line.423"></a> +<span class="sourceLineNo">424</span> // f) for odd round numbers add digest A/C<a name="line.424"></a> +<span class="sourceLineNo">425</span> // g) for even round numbers add the byte sequence P<a name="line.425"></a> +<span class="sourceLineNo">426</span> /*<a name="line.426"></a> +<span class="sourceLineNo">427</span> * Add key or last result.<a name="line.427"></a> +<span class="sourceLineNo">428</span> */<a name="line.428"></a> +<span class="sourceLineNo">429</span> if ((i & 1) != 0) {<a name="line.429"></a> +<span class="sourceLineNo">430</span> ctx.update(altResult, 0, blocksize);<a name="line.430"></a> +<span class="sourceLineNo">431</span> } else {<a name="line.431"></a> +<span class="sourceLineNo">432</span> ctx.update(pBytes, 0, keyLen);<a name="line.432"></a> +<span class="sourceLineNo">433</span> }<a name="line.433"></a> +<span class="sourceLineNo">434</span><a name="line.434"></a> +<span class="sourceLineNo">435</span> // h) finish digest C.<a name="line.435"></a> +<span class="sourceLineNo">436</span> /*<a name="line.436"></a> +<span class="sourceLineNo">437</span> * Create intermediate result.<a name="line.437"></a> +<span class="sourceLineNo">438</span> */<a name="line.438"></a> +<span class="sourceLineNo">439</span> altResult = ctx.digest();<a name="line.439"></a> +<span class="sourceLineNo">440</span> }<a name="line.440"></a> +<span class="sourceLineNo">441</span><a name="line.441"></a> +<span class="sourceLineNo">442</span> // 22. Produce the output string. This is an ASCII string of the maximum<a name="line.442"></a> +<span class="sourceLineNo">443</span> // size specified above, consisting of multiple pieces:<a name="line.443"></a> +<span class="sourceLineNo">444</span> //<a name="line.444"></a> +<span class="sourceLineNo">445</span> // a) the salt salt_prefix, $5$ or $6$ respectively<a name="line.445"></a> +<span class="sourceLineNo">446</span> //<a name="line.446"></a> +<span class="sourceLineNo">447</span> // b) the rounds=<N> specification, if one was present in the input<a name="line.447"></a> +<span class="sourceLineNo">448</span> // salt string. A trailing '$' is added in this case to separate<a name="line.448"></a> +<span class="sourceLineNo">449</span> // the rounds specification from the following text.<a name="line.449"></a> +<span class="sourceLineNo">450</span> //<a name="line.450"></a> +<span class="sourceLineNo">451</span> // c) the salt string truncated to 16 characters<a name="line.451"></a> +<span class="sourceLineNo">452</span> //<a name="line.452"></a> +<span class="sourceLineNo">453</span> // d) a '$' character<a name="line.453"></a> +<span class="sourceLineNo">454</span> /*<a name="line.454"></a> +<span class="sourceLineNo">455</span> * Now we can construct the result string. It consists of three parts.<a name="line.455"></a> +<span class="sourceLineNo">456</span> */<a name="line.456"></a> +<span class="sourceLineNo">457</span> final StringBuilder buffer = new StringBuilder(saltPrefix);<a name="line.457"></a> +<span class="sourceLineNo">458</span> if (roundsCustom) {<a name="line.458"></a> +<span class="sourceLineNo">459</span> buffer.append(ROUNDS_PREFIX);<a name="line.459"></a> +<span class="sourceLineNo">460</span> buffer.append(rounds);<a name="line.460"></a> +<span class="sourceLineNo">461</span> buffer.append("$");<a name="line.461"></a> +<span class="sourceLineNo">462</span> }<a name="line.462"></a> +<span class="sourceLineNo">463</span> buffer.append(saltString);<a name="line.463"></a> +<span class="sourceLineNo">464</span> buffer.append("$");<a name="line.464"></a> +<span class="sourceLineNo">465</span><a name="line.465"></a> +<span class="sourceLineNo">466</span> // e) the base-64 encoded final C digest. The encoding used is as<a name="line.466"></a> +<span class="sourceLineNo">467</span> // follows:<a name="line.467"></a> +<span class="sourceLineNo">468</span> // [...]<a name="line.468"></a> +<span class="sourceLineNo">469</span> //<a name="line.469"></a> +<span class="sourceLineNo">470</span> // Each group of three bytes from the digest produces four<a name="line.470"></a> +<span class="sourceLineNo">471</span> // characters as output:<a name="line.471"></a> +<span class="sourceLineNo">472</span> //<a name="line.472"></a> +<span class="sourceLineNo">473</span> // 1. character: the six low bits of the first byte<a name="line.473"></a> +<span class="sourceLineNo">474</span> // 2. character: the two high bits of the first byte and the<a name="line.474"></a> +<span class="sourceLineNo">475</span> // four low bytes from the second byte<a name="line.475"></a> +<span class="sourceLineNo">476</span> // 3. character: the four high bytes from the second byte and<a name="line.476"></a> +<span class="sourceLineNo">477</span> // the two low bits from the third byte<a name="line.477"></a> +<span class="sourceLineNo">478</span> // 4. character: the six high bits from the third byte<a name="line.478"></a> +<span class="sourceLineNo">479</span> //<a name="line.479"></a> +<span class="sourceLineNo">480</span> // The groups of three bytes are as follows (in this sequence).<a name="line.480"></a> +<span class="sourceLineNo">481</span> // These are the indices into the byte array containing the<a name="line.481"></a> +<span class="sourceLineNo">482</span> // digest, starting with index 0. For the last group there are<a name="line.482"></a> +<span class="sourceLineNo">483</span> // not enough bytes left in the digest and the value zero is used<a name="line.483"></a> +<span class="sourceLineNo">484</span> // in its place. This group also produces only three or two<a name="line.484"></a> +<span class="sourceLineNo">485</span> // characters as output for SHA-512 and SHA-512 respectively.<a name="line.485"></a> +<span class="sourceLineNo">486</span><a name="line.486"></a> +<span class="sourceLineNo">487</span> // This was just a safeguard in the C implementation:<a name="line.487"></a> +<span class="sourceLineNo">488</span> // int buflen = salt_prefix.length() - 1 + ROUNDS_PREFIX.length() + 9 + 1 + salt_string.length() + 1 + 86 + 1;<a name="line.488"></a> +<span class="sourceLineNo">489</span><a name="line.489"></a> +<span class="sourceLineNo">490</span> if (blocksize == 32) {<a name="line.490"></a> +<span class="sourceLineNo">491</span> B64.b64from24bit(altResult[0], altResult[10], altResult[20], 4, buffer);<a name="line.491"></a> +<span class="sourceLineNo">492</span> B64.b64from24bit(altResult[21], altResult[1], altResult[11], 4, buffer);<a name="line.492"></a> +<span class="sourceLineNo">493</span> B64.b64from24bit(altResult[12], altResult[22], altResult[2], 4, buffer);<a name="line.493"></a> +<span class="sourceLineNo">494</span> B64.b64from24bit(altResult[3], altResult[13], altResult[23], 4, buffer);<a name="line.494"></a> +<span class="sourceLineNo">495</span> B64.b64from24bit(altResult[24], altResult[4], altResult[14], 4, buffer);<a name="line.495"></a> +<span class="sourceLineNo">496</span> B64.b64from24bit(altResult[15], altResult[25], altResult[5], 4, buffer);<a name="line.496"></a> +<span class="sourceLineNo">497</span> B64.b64from24bit(altResult[6], altResult[16], altResult[26], 4, buffer);<a name="line.497"></a> +<span class="sourceLineNo">498</span> B64.b64from24bit(altResult[27], altResult[7], altResult[17], 4, buffer);<a name="line.498"></a> +<span class="sourceLineNo">499</span> B64.b64from24bit(altResult[18], altResult[28], altResult[8], 4, buffer);<a name="line.499"></a> +<span class="sourceLineNo">500</span> B64.b64from24bit(altResult[9], altResult[19], altResult[29], 4, buffer);<a name="line.500"></a> +<span class="sourceLineNo">501</span> B64.b64from24bit((byte) 0, altResult[31], altResult[30], 3, buffer);<a name="line.501"></a> +<span class="sourceLineNo">502</span> } else {<a name="line.502"></a> +<span class="sourceLineNo">503</span> B64.b64from24bit(altResult[0], altResult[21], altResult[42], 4, buffer);<a name="line.503"></a> +<span class="sourceLineNo">504</span> B64.b64from24bit(altResult[22], altResult[43], altResult[1], 4, buffer);<a name="line.504"></a> +<span class="sourceLineNo">505</span> B64.b64from24bit(altResult[44], altResult[2], altResult[23], 4, buffer);<a name="line.505"></a> +<span class="sourceLineNo">506</span> B64.b64from24bit(altResult[3], altResult[24], altResult[45], 4, buffer);<a name="line.506"></a> +<span class="sourceLineNo">507</span> B64.b64from24bit(altResult[25], altResult[46], altResult[4], 4, buffer);<a name="line.507"></a> +<span class="sourceLineNo">508</span> B64.b64from24bit(altResult[47], altResult[5], altResult[26], 4, buffer);<a name="line.508"></a> +<span class="sourceLineNo">509</span> B64.b64from24bit(altResult[6], altResult[27], altResult[48], 4, buffer);<a name="line.509"></a> +<span class="sourceLineNo">510</span> B64.b64from24bit(altResult[28], altResult[49], altResult[7], 4, buffer);<a name="line.510"></a> +<span class="sourceLineNo">511</span> B64.b64from24bit(altResult[50], altResult[8], altResult[29], 4, buffer);<a name="line.511"></a> +<span class="sourceLineNo">512</span> B64.b64from24bit(altResult[9], altResult[30], altResult[51], 4, buffer);<a name="line.512"></a> +<span class="sourceLineNo">513</span> B64.b64from24bit(altResult[31], altResult[52], altResult[10], 4, buffer);<a name="line.513"></a> +<span class="sourceLineNo">514</span> B64.b64from24bit(altResult[53], altResult[11], altResult[32], 4, buffer);<a name="line.514"></a> +<span class="sourceLineNo">515</span> B64.b64from24bit(altResult[12], altResult[33], altResult[54], 4, buffer);<a name="line.515"></a> +<span class="sourceLineNo">516</span> B64.b64from24bit(altResult[34], altResult[55], altResult[13], 4, buffer);<a name="line.516"></a> +<span class="sourceLineNo">517</span> B64.b64from24bit(altResult[56], altResult[14], altResult[35], 4, buffer);<a name="line.517"></a> +<span class="sourceLineNo">518</span> B64.b64from24bit(altResult[15], altResult[36], altResult[57], 4, buffer);<a name="line.518"></a> +<span class="sourceLineNo">519</span> B64.b64from24bit(altResult[37], altResult[58], altResult[16], 4, buffer);<a name="line.519"></a> +<span class="sourceLineNo">520</span> B64.b64from24bit(altResult[59], altResult[17], altResult[38], 4, buffer);<a name="line.520"></a> +<span class="sourceLineNo">521</span> B64.b64from24bit(altResult[18], altResult[39], altResult[60], 4, buffer);<a name="line.521"></a> +<span class="sourceLineNo">522</span> B64.b64from24bit(altResult[40], altResult[61], altResult[19], 4, buffer);<a name="line.522"></a> +<span class="sourceLineNo">523</span> B64.b64from24bit(altResult[62], altResult[20], altResult[41], 4, buffer);<a name="line.523"></a> +<span class="sourceLineNo">524</span> B64.b64from24bit((byte) 0, (byte) 0, altResult[63], 2, buffer);<a name="line.524"></a> +<span class="sourceLineNo">525</span> }<a name="line.525"></a> +<span class="sourceLineNo">526</span><a name="line.526"></a> +<span class="sourceLineNo">527</span> /*<a name="line.527"></a> +<span class="sourceLineNo">528</span> * Clear the buffer for the intermediate result so that people attaching to processes or reading core dumps<a name="line.528"></a> +<span class="sourceLineNo">529</span> * cannot get any information.<a name="line.529"></a> +<span class="sourceLineNo">530</span> */<a name="line.530"></a> +<span class="sourceLineNo">531</span> // Is there a better way to do this with the JVM?<a name="line.531"></a> +<span class="sourceLineNo">532</span> Arrays.fill(tempResult, (byte) 0);<a name="line.532"></a> +<span class="sourceLineNo">533</span> Arrays.fill(pBytes, (byte) 0);<a name="line.533"></a> +<span class="sourceLineNo">534</span> Arrays.fill(sBytes, (byte) 0);<a name="line.534"></a> +<span class="sourceLineNo">535</span> ctx.reset();<a name="line.535"></a> +<span class="sourceLineNo">536</span> altCtx.reset();<a name="line.536"></a> +<span class="sourceLineNo">537</span> Arrays.fill(keyBytes, (byte) 0);<a name="line.537"></a> +<span class="sourceLineNo">538</span> Arrays.fill(saltBytes, (byte) 0);<a name="line.538"></a> +<span class="sourceLineNo">539</span><a name="line.539"></a> +<span class="sourceLineNo">540</span> return buffer.toString();<a name="line.540"></a> +<span class="sourceLineNo">541</span> }<a name="line.541"></a> +<span class="sourceLineNo">542</span><a name="line.542"></a> +<span class="sourceLineNo">543</span> /**<a name="line.543"></a> +<span class="sourceLineNo">544</span> * Generates a libc crypt() compatible "$6$" hash value with random salt.<a name="line.544"></a> +<span class="sourceLineNo">545</span> * <p><a name="line.545"></a> +<span class="sourceLineNo">546</span> * See {@link Crypt#crypt(String, String)} for details.<a name="line.546"></a> +<span class="sourceLineNo">547</span> * </p><a name="line.547"></a> +<span class="sourceLineNo">548</span> * <p><a name="line.548"></a> +<span class="sourceLineNo">549</span> * A salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.549"></a> +<span class="sourceLineNo">550</span> * {@link SecureRandom} to generate your own salts and calling {@link #sha512Crypt(byte[], String)}.<a name="line.550"></a> +<span class="sourceLineNo">551</span> * </p><a name="line.551"></a> +<span class="sourceLineNo">552</span> *<a name="line.552"></a> +<span class="sourceLineNo">553</span> * @param keyBytes<a name="line.553"></a> +<span class="sourceLineNo">554</span> * plaintext to hash<a name="line.554"></a> +<span class="sourceLineNo">555</span> * @return complete hash value<a name="line.555"></a> +<span class="sourceLineNo">556</span> * @throws IllegalArgumentException<a name="line.556"></a> +<span class="sourceLineNo">557</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.557"></a> +<span class="sourceLineNo">558</span> */<a name="line.558"></a> +<span class="sourceLineNo">559</span> public static String sha512Crypt(final byte[] keyBytes) {<a name="line.559"></a> +<span class="sourceLineNo">560</span> return sha512Crypt(keyBytes, null);<a name="line.560"></a> +<span class="sourceLineNo">561</span> }<a name="line.561"></a> +<span class="sourceLineNo">562</span><a name="line.562"></a> +<span class="sourceLineNo">563</span> /**<a name="line.563"></a> +<span class="sourceLineNo">564</span> * Generates a libc6 crypt() compatible "$6$" hash value.<a name="line.564"></a> +<span class="sourceLineNo">565</span> * <p><a name="line.565"></a> +<span class="sourceLineNo">566</span> * See {@link Crypt#crypt(String, String)} for details.<a name="line.566"></a> +<span class="sourceLineNo">567</span> * </p><a name="line.567"></a> +<span class="sourceLineNo">568</span> * @param keyBytes<a name="line.568"></a> +<span class="sourceLineNo">569</span> * plaintext to hash<a name="line.569"></a> +<span class="sourceLineNo">570</span> * @param salt<a name="line.570"></a> +<span class="sourceLineNo">571</span> * real salt value without prefix or "rounds=". The salt may be null, in which case a salt is generated<a name="line.571"></a> +<span class="sourceLineNo">572</span> * for you using {@link SecureRandom}; if you want to use a {@link Random} object other than<a name="line.572"></a> +<span class="sourceLineNo">573</span> * {@link SecureRandom} then we suggest you provide it using<a name="line.573"></a> +<span class="sourceLineNo">574</span> * {@link #sha512Crypt(byte[], String, Random)}.<a name="line.574"></a> +<span class="sourceLineNo">575</span> * @return complete hash value including salt<a name="line.575"></a> +<span class="sourceLineNo">576</span> * @throws IllegalArgumentException<a name="line.576"></a> +<span class="sourceLineNo">577</span> * if the salt does not match the allowed pattern<a name="line.577"></a> +<span class="sourceLineNo">578</span> * @throws IllegalArgumentException<a name="line.578"></a> +<span class="sourceLineNo">579</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.579"></a> +<span class="sourceLineNo">580</span> */<a name="line.580"></a> +<span class="sourceLineNo">581</span> public static String sha512Crypt(final byte[] keyBytes, String salt) {<a name="line.581"></a> +<span class="sourceLineNo">582</span> if (salt == null) {<a name="line.582"></a> +<span class="sourceLineNo">583</span> salt = SHA512_PREFIX + B64.getRandomSalt(8);<a name="line.583"></a> +<span class="sourceLineNo">584</span> }<a name="line.584"></a> +<span class="sourceLineNo">585</span> return sha2Crypt(keyBytes, salt, SHA512_PREFIX, SHA512_BLOCKSIZE, MessageDigestAlgorithms.SHA_512);<a name="line.585"></a> +<span class="sourceLineNo">586</span> }<a name="line.586"></a> +<span class="sourceLineNo">587</span><a name="line.587"></a> +<span class="sourceLineNo">588</span><a name="line.588"></a> +<span class="sourceLineNo">589</span><a name="line.589"></a> +<span class="sourceLineNo">590</span> /**<a name="line.590"></a> +<span class="sourceLineNo">591</span> * Generates a libc6 crypt() compatible "$6$" hash value.<a name="line.591"></a> +<span class="sourceLineNo">592</span> * <p><a name="line.592"></a> +<span class="sourceLineNo">593</span> * See {@link Crypt#crypt(String, String)} for details.<a name="line.593"></a> +<span class="sourceLineNo">594</span> * </p><a name="line.594"></a> +<span class="sourceLineNo">595</span> * @param keyBytes<a name="line.595"></a> +<span class="sourceLineNo">596</span> * plaintext to hash<a name="line.596"></a> +<span class="sourceLineNo">597</span> * @param salt<a name="line.597"></a> +<span class="sourceLineNo">598</span> * real salt value without prefix or "rounds=". The salt may be null, in which case a salt<a name="line.598"></a> +<span class="sourceLineNo">599</span> * is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.599"></a> +<span class="sourceLineNo">600</span> * {@link SecureRandom} to generate your own salts.<a name="line.600"></a> +<span class="sourceLineNo">601</span> * @param random<a name="line.601"></a> +<span class="sourceLineNo">602</span> * the instance of {@link Random} to use for generating the salt. Consider using {@link SecureRandom}<a name="line.602"></a> +<span class="sourceLineNo">603</span> * or {@link ThreadLocalRandom}.<a name="line.603"></a> +<span class="sourceLineNo">604</span> * @return complete hash value including salt<a name="line.604"></a> +<span class="sourceLineNo">605</span> * @throws IllegalArgumentException<a name="line.605"></a> +<span class="sourceLineNo">606</span> * if the salt does not match the allowed pattern<a name="line.606"></a> +<span class="sourceLineNo">607</span> * @throws IllegalArgumentException<a name="line.607"></a> +<span class="sourceLineNo">608</span> * when a {@link java.security.NoSuchAlgorithmException} is caught.<a name="line.608"></a> +<span class="sourceLineNo">609</span> * @since 1.12<a name="line.609"></a> +<span class="sourceLineNo">610</span> */<a name="line.610"></a> +<span class="sourceLineNo">611</span> public static String sha512Crypt(final byte[] keyBytes, String salt, final Random random) {<a name="line.611"></a> +<span class="sourceLineNo">612</span> if (salt == null) {<a name="line.612"></a> +<span class="sourceLineNo">613</span> salt = SHA512_PREFIX + B64.getRandomSalt(8, random);<a name="line.613"></a> +<span class="sourceLineNo">614</span> }<a name="line.614"></a> +<span class="sourceLineNo">615</span> return sha2Crypt(keyBytes, salt, SHA512_PREFIX, SHA512_BLOCKSIZE, MessageDigestAlgorithms.SHA_512);<a name="line.615"></a> +<span class="sourceLineNo">616</span> }<a name="line.616"></a> +<span class="sourceLineNo">617</span>}<a name="line.617"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/UnixCrypt.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/UnixCrypt.html new file mode 100644 index 0000000000000000000000000000000000000000..2424e8294732fca8ff628a9e18e2a892144d461d --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/UnixCrypt.html @@ -0,0 +1,493 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>package org.apache.commons.codec.digest;<a name="line.17"></a> +<span class="sourceLineNo">018</span><a name="line.18"></a> +<span class="sourceLineNo">019</span>import java.nio.charset.StandardCharsets;<a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.security.SecureRandom;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.concurrent.ThreadLocalRandom;<a name="line.21"></a> +<span class="sourceLineNo">022</span><a name="line.22"></a> +<span class="sourceLineNo">023</span>/**<a name="line.23"></a> +<span class="sourceLineNo">024</span> * Unix crypt(3) algorithm implementation.<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * This class only implements the traditional 56 bit DES based algorithm. Please use DigestUtils.crypt() for a method<a name="line.26"></a> +<span class="sourceLineNo">027</span> * that distinguishes between all the algorithms supported in the current glibc's crypt().<a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p><a name="line.28"></a> +<span class="sourceLineNo">029</span> * The Java implementation was taken from the JetSpeed Portal project (see<a name="line.29"></a> +<span class="sourceLineNo">030</span> * org.apache.jetspeed.services.security.ldap.UnixCrypt).<a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * This class is slightly incompatible if the given salt contains characters that are not part of the allowed range<a name="line.32"></a> +<span class="sourceLineNo">033</span> * [a-zA-Z0-9./].<a name="line.33"></a> +<span class="sourceLineNo">034</span> * <p><a name="line.34"></a> +<span class="sourceLineNo">035</span> * This class is immutable and thread-safe.<a name="line.35"></a> +<span class="sourceLineNo">036</span> *<a name="line.36"></a> +<span class="sourceLineNo">037</span> * @since 1.7<a name="line.37"></a> +<span class="sourceLineNo">038</span> */<a name="line.38"></a> +<span class="sourceLineNo">039</span>public class UnixCrypt {<a name="line.39"></a> +<span class="sourceLineNo">040</span><a name="line.40"></a> +<span class="sourceLineNo">041</span> private static final int CON_SALT[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<a name="line.41"></a> +<span class="sourceLineNo">042</span> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 5, 6,<a name="line.42"></a> +<span class="sourceLineNo">043</span> 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,<a name="line.43"></a> +<span class="sourceLineNo">044</span> 34, 35, 36, 37, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,<a name="line.44"></a> +<span class="sourceLineNo">045</span> 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 0, 0, 0, 0 };<a name="line.45"></a> +<span class="sourceLineNo">046</span><a name="line.46"></a> +<span class="sourceLineNo">047</span> private static final int COV2CHAR[] = { 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70,<a name="line.47"></a> +<span class="sourceLineNo">048</span> 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102,<a name="line.48"></a> +<span class="sourceLineNo">049</span> 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122 };<a name="line.49"></a> +<span class="sourceLineNo">050</span><a name="line.50"></a> +<span class="sourceLineNo">051</span> private static final char SALT_CHARS[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"<a name="line.51"></a> +<span class="sourceLineNo">052</span> .toCharArray();<a name="line.52"></a> +<span class="sourceLineNo">053</span><a name="line.53"></a> +<span class="sourceLineNo">054</span> private static final boolean SHIFT2[] = { false, false, true, true, true, true, true, true, false, true, true,<a name="line.54"></a> +<span class="sourceLineNo">055</span> true, true, true, true, false };<a name="line.55"></a> +<span class="sourceLineNo">056</span><a name="line.56"></a> +<span class="sourceLineNo">057</span> private static final int SKB[][] = {<a name="line.57"></a> +<span class="sourceLineNo">058</span> { 0, 16, 0x20000000, 0x20000010, 0x10000, 0x10010, 0x20010000, 0x20010010, 2048, 2064, 0x20000800,<a name="line.58"></a> +<span class="sourceLineNo">059</span> 0x20000810, 0x10800, 0x10810, 0x20010800, 0x20010810, 32, 48, 0x20000020, 0x20000030, 0x10020,<a name="line.59"></a> +<span class="sourceLineNo">060</span> 0x10030, 0x20010020, 0x20010030, 2080, 2096, 0x20000820, 0x20000830, 0x10820, 0x10830, 0x20010820,<a name="line.60"></a> +<span class="sourceLineNo">061</span> 0x20010830, 0x80000, 0x80010, 0x20080000, 0x20080010, 0x90000, 0x90010, 0x20090000, 0x20090010,<a name="line.61"></a> +<span class="sourceLineNo">062</span> 0x80800, 0x80810, 0x20080800, 0x20080810, 0x90800, 0x90810, 0x20090800, 0x20090810, 0x80020,<a name="line.62"></a> +<span class="sourceLineNo">063</span> 0x80030, 0x20080020, 0x20080030, 0x90020, 0x90030, 0x20090020, 0x20090030, 0x80820, 0x80830,<a name="line.63"></a> +<span class="sourceLineNo">064</span> 0x20080820, 0x20080830, 0x90820, 0x90830, 0x20090820, 0x20090830 },<a name="line.64"></a> +<span class="sourceLineNo">065</span> { 0, 0x2000000, 8192, 0x2002000, 0x200000, 0x2200000, 0x202000, 0x2202000, 4, 0x2000004, 8196, 0x2002004,<a name="line.65"></a> +<span class="sourceLineNo">066</span> 0x200004, 0x2200004, 0x202004, 0x2202004, 1024, 0x2000400, 9216, 0x2002400, 0x200400, 0x2200400,<a name="line.66"></a> +<span class="sourceLineNo">067</span> 0x202400, 0x2202400, 1028, 0x2000404, 9220, 0x2002404, 0x200404, 0x2200404, 0x202404, 0x2202404,<a name="line.67"></a> +<span class="sourceLineNo">068</span> 0x10000000, 0x12000000, 0x10002000, 0x12002000, 0x10200000, 0x12200000, 0x10202000, 0x12202000,<a name="line.68"></a> +<span class="sourceLineNo">069</span> 0x10000004, 0x12000004, 0x10002004, 0x12002004, 0x10200004, 0x12200004, 0x10202004, 0x12202004,<a name="line.69"></a> +<span class="sourceLineNo">070</span> 0x10000400, 0x12000400, 0x10002400, 0x12002400, 0x10200400, 0x12200400, 0x10202400, 0x12202400,<a name="line.70"></a> +<span class="sourceLineNo">071</span> 0x10000404, 0x12000404, 0x10002404, 0x12002404, 0x10200404, 0x12200404, 0x10202404, 0x12202404 },<a name="line.71"></a> +<span class="sourceLineNo">072</span> { 0, 1, 0x40000, 0x40001, 0x1000000, 0x1000001, 0x1040000, 0x1040001, 2, 3, 0x40002, 0x40003, 0x1000002,<a name="line.72"></a> +<span class="sourceLineNo">073</span> 0x1000003, 0x1040002, 0x1040003, 512, 513, 0x40200, 0x40201, 0x1000200, 0x1000201, 0x1040200,<a name="line.73"></a> +<span class="sourceLineNo">074</span> 0x1040201, 514, 515, 0x40202, 0x40203, 0x1000202, 0x1000203, 0x1040202, 0x1040203, 0x8000000,<a name="line.74"></a> +<span class="sourceLineNo">075</span> 0x8000001, 0x8040000, 0x8040001, 0x9000000, 0x9000001, 0x9040000, 0x9040001, 0x8000002, 0x8000003,<a name="line.75"></a> +<span class="sourceLineNo">076</span> 0x8040002, 0x8040003, 0x9000002, 0x9000003, 0x9040002, 0x9040003, 0x8000200, 0x8000201, 0x8040200,<a name="line.76"></a> +<span class="sourceLineNo">077</span> 0x8040201, 0x9000200, 0x9000201, 0x9040200, 0x9040201, 0x8000202, 0x8000203, 0x8040202, 0x8040203,<a name="line.77"></a> +<span class="sourceLineNo">078</span> 0x9000202, 0x9000203, 0x9040202, 0x9040203 },<a name="line.78"></a> +<span class="sourceLineNo">079</span> { 0, 0x100000, 256, 0x100100, 8, 0x100008, 264, 0x100108, 4096, 0x101000, 4352, 0x101100, 4104, 0x101008,<a name="line.79"></a> +<span class="sourceLineNo">080</span> 4360, 0x101108, 0x4000000, 0x4100000, 0x4000100, 0x4100100, 0x4000008, 0x4100008, 0x4000108,<a name="line.80"></a> +<span class="sourceLineNo">081</span> 0x4100108, 0x4001000, 0x4101000, 0x4001100, 0x4101100, 0x4001008, 0x4101008, 0x4001108, 0x4101108,<a name="line.81"></a> +<span class="sourceLineNo">082</span> 0x20000, 0x120000, 0x20100, 0x120100, 0x20008, 0x120008, 0x20108, 0x120108, 0x21000, 0x121000,<a name="line.82"></a> +<span class="sourceLineNo">083</span> 0x21100, 0x121100, 0x21008, 0x121008, 0x21108, 0x121108, 0x4020000, 0x4120000, 0x4020100,<a name="line.83"></a> +<span class="sourceLineNo">084</span> 0x4120100, 0x4020008, 0x4120008, 0x4020108, 0x4120108, 0x4021000, 0x4121000, 0x4021100, 0x4121100,<a name="line.84"></a> +<span class="sourceLineNo">085</span> 0x4021008, 0x4121008, 0x4021108, 0x4121108 },<a name="line.85"></a> +<span class="sourceLineNo">086</span> { 0, 0x10000000, 0x10000, 0x10010000, 4, 0x10000004, 0x10004, 0x10010004, 0x20000000, 0x30000000,<a name="line.86"></a> +<span class="sourceLineNo">087</span> 0x20010000, 0x30010000, 0x20000004, 0x30000004, 0x20010004, 0x30010004, 0x100000, 0x10100000,<a name="line.87"></a> +<span class="sourceLineNo">088</span> 0x110000, 0x10110000, 0x100004, 0x10100004, 0x110004, 0x10110004, 0x20100000, 0x30100000,<a name="line.88"></a> +<span class="sourceLineNo">089</span> 0x20110000, 0x30110000, 0x20100004, 0x30100004, 0x20110004, 0x30110004, 4096, 0x10001000, 0x11000,<a name="line.89"></a> +<span class="sourceLineNo">090</span> 0x10011000, 4100, 0x10001004, 0x11004, 0x10011004, 0x20001000, 0x30001000, 0x20011000, 0x30011000,<a name="line.90"></a> +<span class="sourceLineNo">091</span> 0x20001004, 0x30001004, 0x20011004, 0x30011004, 0x101000, 0x10101000, 0x111000, 0x10111000,<a name="line.91"></a> +<span class="sourceLineNo">092</span> 0x101004, 0x10101004, 0x111004, 0x10111004, 0x20101000, 0x30101000, 0x20111000, 0x30111000,<a name="line.92"></a> +<span class="sourceLineNo">093</span> 0x20101004, 0x30101004, 0x20111004, 0x30111004 },<a name="line.93"></a> +<span class="sourceLineNo">094</span> { 0, 0x8000000, 8, 0x8000008, 1024, 0x8000400, 1032, 0x8000408, 0x20000, 0x8020000, 0x20008, 0x8020008,<a name="line.94"></a> +<span class="sourceLineNo">095</span> 0x20400, 0x8020400, 0x20408, 0x8020408, 1, 0x8000001, 9, 0x8000009, 1025, 0x8000401, 1033,<a name="line.95"></a> +<span class="sourceLineNo">096</span> 0x8000409, 0x20001, 0x8020001, 0x20009, 0x8020009, 0x20401, 0x8020401, 0x20409, 0x8020409,<a name="line.96"></a> +<span class="sourceLineNo">097</span> 0x2000000, 0xa000000, 0x2000008, 0xa000008, 0x2000400, 0xa000400, 0x2000408, 0xa000408, 0x2020000,<a name="line.97"></a> +<span class="sourceLineNo">098</span> 0xa020000, 0x2020008, 0xa020008, 0x2020400, 0xa020400, 0x2020408, 0xa020408, 0x2000001, 0xa000001,<a name="line.98"></a> +<span class="sourceLineNo">099</span> 0x2000009, 0xa000009, 0x2000401, 0xa000401, 0x2000409, 0xa000409, 0x2020001, 0xa020001, 0x2020009,<a name="line.99"></a> +<span class="sourceLineNo">100</span> 0xa020009, 0x2020401, 0xa020401, 0x2020409, 0xa020409 },<a name="line.100"></a> +<span class="sourceLineNo">101</span> { 0, 256, 0x80000, 0x80100, 0x1000000, 0x1000100, 0x1080000, 0x1080100, 16, 272, 0x80010, 0x80110,<a name="line.101"></a> +<span class="sourceLineNo">102</span> 0x1000010, 0x1000110, 0x1080010, 0x1080110, 0x200000, 0x200100, 0x280000, 0x280100, 0x1200000,<a name="line.102"></a> +<span class="sourceLineNo">103</span> 0x1200100, 0x1280000, 0x1280100, 0x200010, 0x200110, 0x280010, 0x280110, 0x1200010, 0x1200110,<a name="line.103"></a> +<span class="sourceLineNo">104</span> 0x1280010, 0x1280110, 512, 768, 0x80200, 0x80300, 0x1000200, 0x1000300, 0x1080200, 0x1080300, 528,<a name="line.104"></a> +<span class="sourceLineNo">105</span> 784, 0x80210, 0x80310, 0x1000210, 0x1000310, 0x1080210, 0x1080310, 0x200200, 0x200300, 0x280200,<a name="line.105"></a> +<span class="sourceLineNo">106</span> 0x280300, 0x1200200, 0x1200300, 0x1280200, 0x1280300, 0x200210, 0x200310, 0x280210, 0x280310,<a name="line.106"></a> +<span class="sourceLineNo">107</span> 0x1200210, 0x1200310, 0x1280210, 0x1280310 },<a name="line.107"></a> +<span class="sourceLineNo">108</span> { 0, 0x4000000, 0x40000, 0x4040000, 2, 0x4000002, 0x40002, 0x4040002, 8192, 0x4002000, 0x42000, 0x4042000,<a name="line.108"></a> +<span class="sourceLineNo">109</span> 8194, 0x4002002, 0x42002, 0x4042002, 32, 0x4000020, 0x40020, 0x4040020, 34, 0x4000022, 0x40022,<a name="line.109"></a> +<span class="sourceLineNo">110</span> 0x4040022, 8224, 0x4002020, 0x42020, 0x4042020, 8226, 0x4002022, 0x42022, 0x4042022, 2048,<a name="line.110"></a> +<span class="sourceLineNo">111</span> 0x4000800, 0x40800, 0x4040800, 2050, 0x4000802, 0x40802, 0x4040802, 10240, 0x4002800, 0x42800,<a name="line.111"></a> +<span class="sourceLineNo">112</span> 0x4042800, 10242, 0x4002802, 0x42802, 0x4042802, 2080, 0x4000820, 0x40820, 0x4040820, 2082,<a name="line.112"></a> +<span class="sourceLineNo">113</span> 0x4000822, 0x40822, 0x4040822, 10272, 0x4002820, 0x42820, 0x4042820, 10274, 0x4002822, 0x42822,<a name="line.113"></a> +<span class="sourceLineNo">114</span> 0x4042822 } };<a name="line.114"></a> +<span class="sourceLineNo">115</span><a name="line.115"></a> +<span class="sourceLineNo">116</span> private static final int SPTRANS[][] = {<a name="line.116"></a> +<span class="sourceLineNo">117</span> { 0x820200, 0x20000, 0x80800000, 0x80820200, 0x800000, 0x80020200, 0x80020000, 0x80800000, 0x80020200,<a name="line.117"></a> +<span class="sourceLineNo">118</span> 0x820200, 0x820000, 0x80000200, 0x80800200, 0x800000, 0, 0x80020000, 0x20000, 0x80000000,<a name="line.118"></a> +<span class="sourceLineNo">119</span> 0x800200, 0x20200, 0x80820200, 0x820000, 0x80000200, 0x800200, 0x80000000, 512, 0x20200,<a name="line.119"></a> +<span class="sourceLineNo">120</span> 0x80820000, 512, 0x80800200, 0x80820000, 0, 0, 0x80820200, 0x800200, 0x80020000, 0x820200,<a name="line.120"></a> +<span class="sourceLineNo">121</span> 0x20000, 0x80000200, 0x800200, 0x80820000, 512, 0x20200, 0x80800000, 0x80020200, 0x80000000,<a name="line.121"></a> +<span class="sourceLineNo">122</span> 0x80800000, 0x820000, 0x80820200, 0x20200, 0x820000, 0x80800200, 0x800000, 0x80000200, 0x80020000,<a name="line.122"></a> +<span class="sourceLineNo">123</span> 0, 0x20000, 0x800000, 0x80800200, 0x820200, 0x80000000, 0x80820000, 512, 0x80020200 },<a name="line.123"></a> +<span class="sourceLineNo">124</span> { 0x10042004, 0, 0x42000, 0x10040000, 0x10000004, 8196, 0x10002000, 0x42000, 8192, 0x10040004, 4,<a name="line.124"></a> +<span class="sourceLineNo">125</span> 0x10002000, 0x40004, 0x10042000, 0x10040000, 4, 0x40000, 0x10002004, 0x10040004, 8192, 0x42004,<a name="line.125"></a> +<span class="sourceLineNo">126</span> 0x10000000, 0, 0x40004, 0x10002004, 0x42004, 0x10042000, 0x10000004, 0x10000000, 0x40000, 8196,<a name="line.126"></a> +<span class="sourceLineNo">127</span> 0x10042004, 0x40004, 0x10042000, 0x10002000, 0x42004, 0x10042004, 0x40004, 0x10000004, 0,<a name="line.127"></a> +<span class="sourceLineNo">128</span> 0x10000000, 8196, 0x40000, 0x10040004, 8192, 0x10000000, 0x42004, 0x10002004, 0x10042000, 8192, 0,<a name="line.128"></a> +<span class="sourceLineNo">129</span> 0x10000004, 4, 0x10042004, 0x42000, 0x10040000, 0x10040004, 0x40000, 8196, 0x10002000, 0x10002004,<a name="line.129"></a> +<span class="sourceLineNo">130</span> 4, 0x10040000, 0x42000 },<a name="line.130"></a> +<span class="sourceLineNo">131</span> { 0x41000000, 0x1010040, 64, 0x41000040, 0x40010000, 0x1000000, 0x41000040, 0x10040, 0x1000040, 0x10000,<a name="line.131"></a> +<span class="sourceLineNo">132</span> 0x1010000, 0x40000000, 0x41010040, 0x40000040, 0x40000000, 0x41010000, 0, 0x40010000, 0x1010040,<a name="line.132"></a> +<span class="sourceLineNo">133</span> 64, 0x40000040, 0x41010040, 0x10000, 0x41000000, 0x41010000, 0x1000040, 0x40010040, 0x1010000,<a name="line.133"></a> +<span class="sourceLineNo">134</span> 0x10040, 0, 0x1000000, 0x40010040, 0x1010040, 64, 0x40000000, 0x10000, 0x40000040, 0x40010000,<a name="line.134"></a> +<span class="sourceLineNo">135</span> 0x1010000, 0x41000040, 0, 0x1010040, 0x10040, 0x41010000, 0x40010000, 0x1000000, 0x41010040,<a name="line.135"></a> +<span class="sourceLineNo">136</span> 0x40000000, 0x40010040, 0x41000000, 0x1000000, 0x41010040, 0x10000, 0x1000040, 0x41000040,<a name="line.136"></a> +<span class="sourceLineNo">137</span> 0x10040, 0x1000040, 0, 0x41010000, 0x40000040, 0x41000000, 0x40010040, 64, 0x1010000 },<a name="line.137"></a> +<span class="sourceLineNo">138</span> { 0x100402, 0x4000400, 2, 0x4100402, 0, 0x4100000, 0x4000402, 0x100002, 0x4100400, 0x4000002, 0x4000000,<a name="line.138"></a> +<span class="sourceLineNo">139</span> 1026, 0x4000002, 0x100402, 0x100000, 0x4000000, 0x4100002, 0x100400, 1024, 2, 0x100400, 0x4000402,<a name="line.139"></a> +<span class="sourceLineNo">140</span> 0x4100000, 1024, 1026, 0, 0x100002, 0x4100400, 0x4000400, 0x4100002, 0x4100402, 0x100000,<a name="line.140"></a> +<span class="sourceLineNo">141</span> 0x4100002, 1026, 0x100000, 0x4000002, 0x100400, 0x4000400, 2, 0x4100000, 0x4000402, 0, 1024,<a name="line.141"></a> +<span class="sourceLineNo">142</span> 0x100002, 0, 0x4100002, 0x4100400, 1024, 0x4000000, 0x4100402, 0x100402, 0x100000, 0x4100402, 2,<a name="line.142"></a> +<span class="sourceLineNo">143</span> 0x4000400, 0x100402, 0x100002, 0x100400, 0x4100000, 0x4000402, 1026, 0x4000000, 0x4000002,<a name="line.143"></a> +<span class="sourceLineNo">144</span> 0x4100400 },<a name="line.144"></a> +<span class="sourceLineNo">145</span> { 0x2000000, 16384, 256, 0x2004108, 0x2004008, 0x2000100, 16648, 0x2004000, 16384, 8, 0x2000008, 16640,<a name="line.145"></a> +<span class="sourceLineNo">146</span> 0x2000108, 0x2004008, 0x2004100, 0, 16640, 0x2000000, 16392, 264, 0x2000100, 16648, 0, 0x2000008,<a name="line.146"></a> +<span class="sourceLineNo">147</span> 8, 0x2000108, 0x2004108, 16392, 0x2004000, 256, 264, 0x2004100, 0x2004100, 0x2000108, 16392,<a name="line.147"></a> +<span class="sourceLineNo">148</span> 0x2004000, 16384, 8, 0x2000008, 0x2000100, 0x2000000, 16640, 0x2004108, 0, 16648, 0x2000000, 256,<a name="line.148"></a> +<span class="sourceLineNo">149</span> 16392, 0x2000108, 256, 0, 0x2004108, 0x2004008, 0x2004100, 264, 16384, 16640, 0x2004008,<a name="line.149"></a> +<span class="sourceLineNo">150</span> 0x2000100, 264, 8, 16648, 0x2004000, 0x2000008 },<a name="line.150"></a> +<span class="sourceLineNo">151</span> { 0x20000010, 0x80010, 0, 0x20080800, 0x80010, 2048, 0x20000810, 0x80000, 2064, 0x20080810, 0x80800,<a name="line.151"></a> +<span class="sourceLineNo">152</span> 0x20000000, 0x20000800, 0x20000010, 0x20080000, 0x80810, 0x80000, 0x20000810, 0x20080010, 0, 2048,<a name="line.152"></a> +<span class="sourceLineNo">153</span> 16, 0x20080800, 0x20080010, 0x20080810, 0x20080000, 0x20000000, 2064, 16, 0x80800, 0x80810,<a name="line.153"></a> +<span class="sourceLineNo">154</span> 0x20000800, 2064, 0x20000000, 0x20000800, 0x80810, 0x20080800, 0x80010, 0, 0x20000800, 0x20000000,<a name="line.154"></a> +<span class="sourceLineNo">155</span> 2048, 0x20080010, 0x80000, 0x80010, 0x20080810, 0x80800, 16, 0x20080810, 0x80800, 0x80000,<a name="line.155"></a> +<span class="sourceLineNo">156</span> 0x20000810, 0x20000010, 0x20080000, 0x80810, 0, 2048, 0x20000010, 0x20000810, 0x20080800,<a name="line.156"></a> +<span class="sourceLineNo">157</span> 0x20080000, 2064, 16, 0x20080010 },<a name="line.157"></a> +<span class="sourceLineNo">158</span> { 4096, 128, 0x400080, 0x400001, 0x401081, 4097, 4224, 0, 0x400000, 0x400081, 129, 0x401000, 1, 0x401080,<a name="line.158"></a> +<span class="sourceLineNo">159</span> 0x401000, 129, 0x400081, 4096, 4097, 0x401081, 0, 0x400080, 0x400001, 4224, 0x401001, 4225,<a name="line.159"></a> +<span class="sourceLineNo">160</span> 0x401080, 1, 4225, 0x401001, 128, 0x400000, 4225, 0x401000, 0x401001, 129, 4096, 128, 0x400000,<a name="line.160"></a> +<span class="sourceLineNo">161</span> 0x401001, 0x400081, 4225, 4224, 0, 128, 0x400001, 1, 0x400080, 0, 0x400081, 0x400080, 4224, 129,<a name="line.161"></a> +<span class="sourceLineNo">162</span> 4096, 0x401081, 0x400000, 0x401080, 1, 4097, 0x401081, 0x400001, 0x401080, 0x401000, 4097 },<a name="line.162"></a> +<span class="sourceLineNo">163</span> { 0x8200020, 0x8208000, 32800, 0, 0x8008000, 0x200020, 0x8200000, 0x8208020, 32, 0x8000000, 0x208000,<a name="line.163"></a> +<span class="sourceLineNo">164</span> 32800, 0x208020, 0x8008020, 0x8000020, 0x8200000, 32768, 0x208020, 0x200020, 0x8008000, 0x8208020,<a name="line.164"></a> +<span class="sourceLineNo">165</span> 0x8000020, 0, 0x208000, 0x8000000, 0x200000, 0x8008020, 0x8200020, 0x200000, 32768, 0x8208000, 32,<a name="line.165"></a> +<span class="sourceLineNo">166</span> 0x200000, 32768, 0x8000020, 0x8208020, 32800, 0x8000000, 0, 0x208000, 0x8200020, 0x8008020,<a name="line.166"></a> +<span class="sourceLineNo">167</span> 0x8008000, 0x200020, 0x8208000, 32, 0x200020, 0x8008000, 0x8208020, 0x200000, 0x8200000,<a name="line.167"></a> +<span class="sourceLineNo">168</span> 0x8000020, 0x208000, 32800, 0x8008020, 0x8200000, 32, 0x8208000, 0x208020, 0, 0x8000000,<a name="line.168"></a> +<span class="sourceLineNo">169</span> 0x8200020, 32768, 0x208020 } };<a name="line.169"></a> +<span class="sourceLineNo">170</span><a name="line.170"></a> +<span class="sourceLineNo">171</span> /**<a name="line.171"></a> +<span class="sourceLineNo">172</span> * Generates a crypt(3) compatible hash using the DES algorithm.<a name="line.172"></a> +<span class="sourceLineNo">173</span> * <p><a name="line.173"></a> +<span class="sourceLineNo">174</span> * A salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.174"></a> +<span class="sourceLineNo">175</span> * {@link SecureRandom} to generate your own salts and calling {@link #crypt(byte[], String)}.<a name="line.175"></a> +<span class="sourceLineNo">176</span> * </p><a name="line.176"></a> +<span class="sourceLineNo">177</span> *<a name="line.177"></a> +<span class="sourceLineNo">178</span> * @param original<a name="line.178"></a> +<span class="sourceLineNo">179</span> * plaintext password<a name="line.179"></a> +<span class="sourceLineNo">180</span> * @return a 13 character string starting with the salt string<a name="line.180"></a> +<span class="sourceLineNo">181</span> */<a name="line.181"></a> +<span class="sourceLineNo">182</span> public static String crypt(final byte[] original) {<a name="line.182"></a> +<span class="sourceLineNo">183</span> return crypt(original, null);<a name="line.183"></a> +<span class="sourceLineNo">184</span> }<a name="line.184"></a> +<span class="sourceLineNo">185</span><a name="line.185"></a> +<span class="sourceLineNo">186</span> /**<a name="line.186"></a> +<span class="sourceLineNo">187</span> * Generates a crypt(3) compatible hash using the DES algorithm.<a name="line.187"></a> +<span class="sourceLineNo">188</span> * <p><a name="line.188"></a> +<span class="sourceLineNo">189</span> * Using unspecified characters as salt results incompatible hash values.<a name="line.189"></a> +<span class="sourceLineNo">190</span> * </p><a name="line.190"></a> +<span class="sourceLineNo">191</span> *<a name="line.191"></a> +<span class="sourceLineNo">192</span> * @param original<a name="line.192"></a> +<span class="sourceLineNo">193</span> * plaintext password<a name="line.193"></a> +<span class="sourceLineNo">194</span> * @param salt<a name="line.194"></a> +<span class="sourceLineNo">195</span> * a two character string drawn from [a-zA-Z0-9./]. The salt may be null, in which case a salt is<a name="line.195"></a> +<span class="sourceLineNo">196</span> * generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.196"></a> +<span class="sourceLineNo">197</span> * {@link SecureRandom} to generate your own salts.<a name="line.197"></a> +<span class="sourceLineNo">198</span> * @return a 13 character string starting with the salt string<a name="line.198"></a> +<span class="sourceLineNo">199</span> * @throws IllegalArgumentException<a name="line.199"></a> +<span class="sourceLineNo">200</span> * if the salt does not match the allowed pattern<a name="line.200"></a> +<span class="sourceLineNo">201</span> */<a name="line.201"></a> +<span class="sourceLineNo">202</span> public static String crypt(final byte[] original, String salt) {<a name="line.202"></a> +<span class="sourceLineNo">203</span> if (salt == null) {<a name="line.203"></a> +<span class="sourceLineNo">204</span> final ThreadLocalRandom randomGenerator = ThreadLocalRandom.current();<a name="line.204"></a> +<span class="sourceLineNo">205</span> final int numSaltChars = SALT_CHARS.length;<a name="line.205"></a> +<span class="sourceLineNo">206</span> salt = "" + SALT_CHARS[randomGenerator.nextInt(numSaltChars)] +<a name="line.206"></a> +<span class="sourceLineNo">207</span> SALT_CHARS[randomGenerator.nextInt(numSaltChars)];<a name="line.207"></a> +<span class="sourceLineNo">208</span> } else if (!salt.matches("^[" + B64.B64T_STRING + "]{2,}$")) {<a name="line.208"></a> +<span class="sourceLineNo">209</span> throw new IllegalArgumentException("Invalid salt value: " + salt);<a name="line.209"></a> +<span class="sourceLineNo">210</span> }<a name="line.210"></a> +<span class="sourceLineNo">211</span><a name="line.211"></a> +<span class="sourceLineNo">212</span> final StringBuilder buffer = new StringBuilder(" ");<a name="line.212"></a> +<span class="sourceLineNo">213</span> final char charZero = salt.charAt(0);<a name="line.213"></a> +<span class="sourceLineNo">214</span> final char charOne = salt.charAt(1);<a name="line.214"></a> +<span class="sourceLineNo">215</span> buffer.setCharAt(0, charZero);<a name="line.215"></a> +<span class="sourceLineNo">216</span> buffer.setCharAt(1, charOne);<a name="line.216"></a> +<span class="sourceLineNo">217</span> final int eSwap0 = CON_SALT[charZero];<a name="line.217"></a> +<span class="sourceLineNo">218</span> final int eSwap1 = CON_SALT[charOne] << 4;<a name="line.218"></a> +<span class="sourceLineNo">219</span> final byte key[] = new byte[8];<a name="line.219"></a> +<span class="sourceLineNo">220</span> for (int i = 0; i < key.length; i++) {<a name="line.220"></a> +<span class="sourceLineNo">221</span> key[i] = 0;<a name="line.221"></a> +<span class="sourceLineNo">222</span> }<a name="line.222"></a> +<span class="sourceLineNo">223</span><a name="line.223"></a> +<span class="sourceLineNo">224</span> for (int i = 0; i < key.length && i < original.length; i++) {<a name="line.224"></a> +<span class="sourceLineNo">225</span> final int iChar = original[i];<a name="line.225"></a> +<span class="sourceLineNo">226</span> key[i] = (byte) (iChar << 1);<a name="line.226"></a> +<span class="sourceLineNo">227</span> }<a name="line.227"></a> +<span class="sourceLineNo">228</span><a name="line.228"></a> +<span class="sourceLineNo">229</span> final int schedule[] = desSetKey(key);<a name="line.229"></a> +<span class="sourceLineNo">230</span> final int out[] = body(schedule, eSwap0, eSwap1);<a name="line.230"></a> +<span class="sourceLineNo">231</span> final byte b[] = new byte[9];<a name="line.231"></a> +<span class="sourceLineNo">232</span> intToFourBytes(out[0], b, 0);<a name="line.232"></a> +<span class="sourceLineNo">233</span> intToFourBytes(out[1], b, 4);<a name="line.233"></a> +<span class="sourceLineNo">234</span> b[8] = 0;<a name="line.234"></a> +<span class="sourceLineNo">235</span> int i = 2;<a name="line.235"></a> +<span class="sourceLineNo">236</span> int y = 0;<a name="line.236"></a> +<span class="sourceLineNo">237</span> int u = 128;<a name="line.237"></a> +<span class="sourceLineNo">238</span> for (; i < 13; i++) {<a name="line.238"></a> +<span class="sourceLineNo">239</span> int j = 0;<a name="line.239"></a> +<span class="sourceLineNo">240</span> int c = 0;<a name="line.240"></a> +<span class="sourceLineNo">241</span> for (; j < 6; j++) {<a name="line.241"></a> +<span class="sourceLineNo">242</span> c <<= 1;<a name="line.242"></a> +<span class="sourceLineNo">243</span> if ((b[y] & u) != 0) {<a name="line.243"></a> +<span class="sourceLineNo">244</span> c |= 0x1;<a name="line.244"></a> +<span class="sourceLineNo">245</span> }<a name="line.245"></a> +<span class="sourceLineNo">246</span> u >>>= 1;<a name="line.246"></a> +<span class="sourceLineNo">247</span> if (u == 0) {<a name="line.247"></a> +<span class="sourceLineNo">248</span> y++;<a name="line.248"></a> +<span class="sourceLineNo">249</span> u = 128;<a name="line.249"></a> +<span class="sourceLineNo">250</span> }<a name="line.250"></a> +<span class="sourceLineNo">251</span> buffer.setCharAt(i, (char) COV2CHAR[c]);<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span> }<a name="line.253"></a> +<span class="sourceLineNo">254</span> return buffer.toString();<a name="line.254"></a> +<span class="sourceLineNo">255</span> }<a name="line.255"></a> +<span class="sourceLineNo">256</span><a name="line.256"></a> +<span class="sourceLineNo">257</span> /**<a name="line.257"></a> +<span class="sourceLineNo">258</span> * Generates a crypt(3) compatible hash using the DES algorithm.<a name="line.258"></a> +<span class="sourceLineNo">259</span> * <p><a name="line.259"></a> +<span class="sourceLineNo">260</span> * A salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.260"></a> +<span class="sourceLineNo">261</span> * {@link SecureRandom} to generate your own salts and calling {@link #crypt(String, String)}.<a name="line.261"></a> +<span class="sourceLineNo">262</span> * </p><a name="line.262"></a> +<span class="sourceLineNo">263</span> *<a name="line.263"></a> +<span class="sourceLineNo">264</span> * @param original<a name="line.264"></a> +<span class="sourceLineNo">265</span> * plaintext password<a name="line.265"></a> +<span class="sourceLineNo">266</span> * @return a 13 character string starting with the salt string<a name="line.266"></a> +<span class="sourceLineNo">267</span> */<a name="line.267"></a> +<span class="sourceLineNo">268</span> public static String crypt(final String original) {<a name="line.268"></a> +<span class="sourceLineNo">269</span> return crypt(original.getBytes(StandardCharsets.UTF_8));<a name="line.269"></a> +<span class="sourceLineNo">270</span> }<a name="line.270"></a> +<span class="sourceLineNo">271</span><a name="line.271"></a> +<span class="sourceLineNo">272</span> /**<a name="line.272"></a> +<span class="sourceLineNo">273</span> * Generates a crypt(3) compatible hash using the DES algorithm.<a name="line.273"></a> +<span class="sourceLineNo">274</span> *<a name="line.274"></a> +<span class="sourceLineNo">275</span> * @param original<a name="line.275"></a> +<span class="sourceLineNo">276</span> * plaintext password<a name="line.276"></a> +<span class="sourceLineNo">277</span> * @param salt<a name="line.277"></a> +<span class="sourceLineNo">278</span> * a two character string drawn from [a-zA-Z0-9./]. The salt may be null, in which case a salt is<a name="line.278"></a> +<span class="sourceLineNo">279</span> * generated for you using {@link ThreadLocalRandom}; for more secure salts consider using<a name="line.279"></a> +<span class="sourceLineNo">280</span> * {@link SecureRandom} to generate your own salts.<a name="line.280"></a> +<span class="sourceLineNo">281</span> * @return a 13 character string starting with the salt string<a name="line.281"></a> +<span class="sourceLineNo">282</span> * @throws IllegalArgumentException<a name="line.282"></a> +<span class="sourceLineNo">283</span> * if the salt does not match the allowed pattern<a name="line.283"></a> +<span class="sourceLineNo">284</span> */<a name="line.284"></a> +<span class="sourceLineNo">285</span> public static String crypt(final String original, final String salt) {<a name="line.285"></a> +<span class="sourceLineNo">286</span> return crypt(original.getBytes(StandardCharsets.UTF_8), salt);<a name="line.286"></a> +<span class="sourceLineNo">287</span> }<a name="line.287"></a> +<span class="sourceLineNo">288</span><a name="line.288"></a> +<span class="sourceLineNo">289</span> private static int[] body(final int schedule[], final int eSwap0, final int eSwap1) {<a name="line.289"></a> +<span class="sourceLineNo">290</span> int left = 0;<a name="line.290"></a> +<span class="sourceLineNo">291</span> int right = 0;<a name="line.291"></a> +<span class="sourceLineNo">292</span> int t = 0;<a name="line.292"></a> +<span class="sourceLineNo">293</span> for (int j = 0; j < 25; j++) {<a name="line.293"></a> +<span class="sourceLineNo">294</span> for (int i = 0; i < 32; i += 4) {<a name="line.294"></a> +<span class="sourceLineNo">295</span> left = dEncrypt(left, right, i, eSwap0, eSwap1, schedule);<a name="line.295"></a> +<span class="sourceLineNo">296</span> right = dEncrypt(right, left, i + 2, eSwap0, eSwap1, schedule);<a name="line.296"></a> +<span class="sourceLineNo">297</span> }<a name="line.297"></a> +<span class="sourceLineNo">298</span> t = left;<a name="line.298"></a> +<span class="sourceLineNo">299</span> left = right;<a name="line.299"></a> +<span class="sourceLineNo">300</span> right = t;<a name="line.300"></a> +<span class="sourceLineNo">301</span> }<a name="line.301"></a> +<span class="sourceLineNo">302</span><a name="line.302"></a> +<span class="sourceLineNo">303</span> t = right;<a name="line.303"></a> +<span class="sourceLineNo">304</span> right = left >>> 1 | left << 31;<a name="line.304"></a> +<span class="sourceLineNo">305</span> left = t >>> 1 | t << 31;<a name="line.305"></a> +<span class="sourceLineNo">306</span> final int results[] = new int[2];<a name="line.306"></a> +<span class="sourceLineNo">307</span> permOp(right, left, 1, 0x55555555, results);<a name="line.307"></a> +<span class="sourceLineNo">308</span> right = results[0];<a name="line.308"></a> +<span class="sourceLineNo">309</span> left = results[1];<a name="line.309"></a> +<span class="sourceLineNo">310</span> permOp(left, right, 8, 0xff00ff, results);<a name="line.310"></a> +<span class="sourceLineNo">311</span> left = results[0];<a name="line.311"></a> +<span class="sourceLineNo">312</span> right = results[1];<a name="line.312"></a> +<span class="sourceLineNo">313</span> permOp(right, left, 2, 0x33333333, results);<a name="line.313"></a> +<span class="sourceLineNo">314</span> right = results[0];<a name="line.314"></a> +<span class="sourceLineNo">315</span> left = results[1];<a name="line.315"></a> +<span class="sourceLineNo">316</span> permOp(left, right, 16, 65535, results);<a name="line.316"></a> +<span class="sourceLineNo">317</span> left = results[0];<a name="line.317"></a> +<span class="sourceLineNo">318</span> right = results[1];<a name="line.318"></a> +<span class="sourceLineNo">319</span> permOp(right, left, 4, 0xf0f0f0f, results);<a name="line.319"></a> +<span class="sourceLineNo">320</span> right = results[0];<a name="line.320"></a> +<span class="sourceLineNo">321</span> left = results[1];<a name="line.321"></a> +<span class="sourceLineNo">322</span> final int out[] = new int[2];<a name="line.322"></a> +<span class="sourceLineNo">323</span> out[0] = left;<a name="line.323"></a> +<span class="sourceLineNo">324</span> out[1] = right;<a name="line.324"></a> +<span class="sourceLineNo">325</span> return out;<a name="line.325"></a> +<span class="sourceLineNo">326</span> }<a name="line.326"></a> +<span class="sourceLineNo">327</span><a name="line.327"></a> +<span class="sourceLineNo">328</span> private static int byteToUnsigned(final byte b) {<a name="line.328"></a> +<span class="sourceLineNo">329</span> final int value = b;<a name="line.329"></a> +<span class="sourceLineNo">330</span> return value < 0 ? value + 256 : value;<a name="line.330"></a> +<span class="sourceLineNo">331</span> }<a name="line.331"></a> +<span class="sourceLineNo">332</span><a name="line.332"></a> +<span class="sourceLineNo">333</span> private static int dEncrypt(int el, final int r, final int s, final int e0, final int e1, final int sArr[]) {<a name="line.333"></a> +<span class="sourceLineNo">334</span> int v = r ^ r >>> 16;<a name="line.334"></a> +<span class="sourceLineNo">335</span> int u = v & e0;<a name="line.335"></a> +<span class="sourceLineNo">336</span> v &= e1;<a name="line.336"></a> +<span class="sourceLineNo">337</span> u = u ^ u << 16 ^ r ^ sArr[s];<a name="line.337"></a> +<span class="sourceLineNo">338</span> int t = v ^ v << 16 ^ r ^ sArr[s + 1];<a name="line.338"></a> +<span class="sourceLineNo">339</span> t = t >>> 4 | t << 28;<a name="line.339"></a> +<span class="sourceLineNo">340</span> el ^= SPTRANS[1][t & 0x3f] | SPTRANS[3][t >>> 8 & 0x3f] | SPTRANS[5][t >>> 16 & 0x3f] |<a name="line.340"></a> +<span class="sourceLineNo">341</span> SPTRANS[7][t >>> 24 & 0x3f] | SPTRANS[0][u & 0x3f] | SPTRANS[2][u >>> 8 & 0x3f] |<a name="line.341"></a> +<span class="sourceLineNo">342</span> SPTRANS[4][u >>> 16 & 0x3f] | SPTRANS[6][u >>> 24 & 0x3f];<a name="line.342"></a> +<span class="sourceLineNo">343</span> return el;<a name="line.343"></a> +<span class="sourceLineNo">344</span> }<a name="line.344"></a> +<span class="sourceLineNo">345</span><a name="line.345"></a> +<span class="sourceLineNo">346</span> private static int[] desSetKey(final byte key[]) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> final int schedule[] = new int[32];<a name="line.347"></a> +<span class="sourceLineNo">348</span> int c = fourBytesToInt(key, 0);<a name="line.348"></a> +<span class="sourceLineNo">349</span> int d = fourBytesToInt(key, 4);<a name="line.349"></a> +<span class="sourceLineNo">350</span> final int results[] = new int[2];<a name="line.350"></a> +<span class="sourceLineNo">351</span> permOp(d, c, 4, 0xf0f0f0f, results);<a name="line.351"></a> +<span class="sourceLineNo">352</span> d = results[0];<a name="line.352"></a> +<span class="sourceLineNo">353</span> c = results[1];<a name="line.353"></a> +<span class="sourceLineNo">354</span> c = hPermOp(c, -2, 0xcccc0000);<a name="line.354"></a> +<span class="sourceLineNo">355</span> d = hPermOp(d, -2, 0xcccc0000);<a name="line.355"></a> +<span class="sourceLineNo">356</span> permOp(d, c, 1, 0x55555555, results);<a name="line.356"></a> +<span class="sourceLineNo">357</span> d = results[0];<a name="line.357"></a> +<span class="sourceLineNo">358</span> c = results[1];<a name="line.358"></a> +<span class="sourceLineNo">359</span> permOp(c, d, 8, 0xff00ff, results);<a name="line.359"></a> +<span class="sourceLineNo">360</span> c = results[0];<a name="line.360"></a> +<span class="sourceLineNo">361</span> d = results[1];<a name="line.361"></a> +<span class="sourceLineNo">362</span> permOp(d, c, 1, 0x55555555, results);<a name="line.362"></a> +<span class="sourceLineNo">363</span> d = results[0];<a name="line.363"></a> +<span class="sourceLineNo">364</span> c = results[1];<a name="line.364"></a> +<span class="sourceLineNo">365</span> d = (d & 0xff) << 16 | d & 0xff00 | (d & 0xff0000) >>> 16 | (c & 0xf0000000) >>> 4;<a name="line.365"></a> +<span class="sourceLineNo">366</span> c &= 0xfffffff;<a name="line.366"></a> +<span class="sourceLineNo">367</span> int j = 0;<a name="line.367"></a> +<span class="sourceLineNo">368</span> for (int i = 0; i < 16; i++) {<a name="line.368"></a> +<span class="sourceLineNo">369</span> if (SHIFT2[i]) {<a name="line.369"></a> +<span class="sourceLineNo">370</span> c = c >>> 2 | c << 26;<a name="line.370"></a> +<span class="sourceLineNo">371</span> d = d >>> 2 | d << 26;<a name="line.371"></a> +<span class="sourceLineNo">372</span> } else {<a name="line.372"></a> +<span class="sourceLineNo">373</span> c = c >>> 1 | c << 27;<a name="line.373"></a> +<span class="sourceLineNo">374</span> d = d >>> 1 | d << 27;<a name="line.374"></a> +<span class="sourceLineNo">375</span> }<a name="line.375"></a> +<span class="sourceLineNo">376</span> c &= 0xfffffff;<a name="line.376"></a> +<span class="sourceLineNo">377</span> d &= 0xfffffff;<a name="line.377"></a> +<span class="sourceLineNo">378</span> int s = SKB[0][c & 0x3f] | SKB[1][c >>> 6 & 0x3 | c >>> 7 & 0x3c] |<a name="line.378"></a> +<span class="sourceLineNo">379</span> SKB[2][c >>> 13 & 0xf | c >>> 14 & 0x30] |<a name="line.379"></a> +<span class="sourceLineNo">380</span> SKB[3][c >>> 20 & 0x1 | c >>> 21 & 0x6 | c >>> 22 & 0x38];<a name="line.380"></a> +<span class="sourceLineNo">381</span> final int t = SKB[4][d & 0x3f] | SKB[5][d >>> 7 & 0x3 | d >>> 8 & 0x3c] | SKB[6][d >>> 15 & 0x3f] |<a name="line.381"></a> +<span class="sourceLineNo">382</span> SKB[7][d >>> 21 & 0xf | d >>> 22 & 0x30];<a name="line.382"></a> +<span class="sourceLineNo">383</span> schedule[j++] = (t << 16 | s & 0xffff);<a name="line.383"></a> +<span class="sourceLineNo">384</span> s = s >>> 16 | t & 0xffff0000;<a name="line.384"></a> +<span class="sourceLineNo">385</span> s = s << 4 | s >>> 28;<a name="line.385"></a> +<span class="sourceLineNo">386</span> schedule[j++] = s;<a name="line.386"></a> +<span class="sourceLineNo">387</span> }<a name="line.387"></a> +<span class="sourceLineNo">388</span><a name="line.388"></a> +<span class="sourceLineNo">389</span> return schedule;<a name="line.389"></a> +<span class="sourceLineNo">390</span> }<a name="line.390"></a> +<span class="sourceLineNo">391</span><a name="line.391"></a> +<span class="sourceLineNo">392</span> private static int fourBytesToInt(final byte b[], int offset) {<a name="line.392"></a> +<span class="sourceLineNo">393</span> int value = byteToUnsigned(b[offset++]);<a name="line.393"></a> +<span class="sourceLineNo">394</span> value |= byteToUnsigned(b[offset++]) << 8;<a name="line.394"></a> +<span class="sourceLineNo">395</span> value |= byteToUnsigned(b[offset++]) << 16;<a name="line.395"></a> +<span class="sourceLineNo">396</span> value |= byteToUnsigned(b[offset++]) << 24;<a name="line.396"></a> +<span class="sourceLineNo">397</span> return value;<a name="line.397"></a> +<span class="sourceLineNo">398</span> }<a name="line.398"></a> +<span class="sourceLineNo">399</span><a name="line.399"></a> +<span class="sourceLineNo">400</span> private static int hPermOp(int a, final int n, final int m) {<a name="line.400"></a> +<span class="sourceLineNo">401</span> final int t = (a << 16 - n ^ a) & m;<a name="line.401"></a> +<span class="sourceLineNo">402</span> a = a ^ t ^ t >>> 16 - n;<a name="line.402"></a> +<span class="sourceLineNo">403</span> return a;<a name="line.403"></a> +<span class="sourceLineNo">404</span> }<a name="line.404"></a> +<span class="sourceLineNo">405</span><a name="line.405"></a> +<span class="sourceLineNo">406</span> private static void intToFourBytes(final int iValue, final byte b[], int offset) {<a name="line.406"></a> +<span class="sourceLineNo">407</span> b[offset++] = (byte) (iValue & 0xff);<a name="line.407"></a> +<span class="sourceLineNo">408</span> b[offset++] = (byte) (iValue >>> 8 & 0xff);<a name="line.408"></a> +<span class="sourceLineNo">409</span> b[offset++] = (byte) (iValue >>> 16 & 0xff);<a name="line.409"></a> +<span class="sourceLineNo">410</span> b[offset++] = (byte) (iValue >>> 24 & 0xff);<a name="line.410"></a> +<span class="sourceLineNo">411</span> }<a name="line.411"></a> +<span class="sourceLineNo">412</span><a name="line.412"></a> +<span class="sourceLineNo">413</span> private static void permOp(int a, int b, final int n, final int m, final int results[]) {<a name="line.413"></a> +<span class="sourceLineNo">414</span> final int t = (a >>> n ^ b) & m;<a name="line.414"></a> +<span class="sourceLineNo">415</span> a ^= t << n;<a name="line.415"></a> +<span class="sourceLineNo">416</span> b ^= t;<a name="line.416"></a> +<span class="sourceLineNo">417</span> results[0] = a;<a name="line.417"></a> +<span class="sourceLineNo">418</span> results[1] = b;<a name="line.418"></a> +<span class="sourceLineNo">419</span> }<a name="line.419"></a> +<span class="sourceLineNo">420</span><a name="line.420"></a> +<span class="sourceLineNo">421</span>}<a name="line.421"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/XXHash32.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/XXHash32.html new file mode 100644 index 0000000000000000000000000000000000000000..ccfa6148c24a7397d19da8f5f5af2b9a9b3a3977 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/digest/XXHash32.html @@ -0,0 +1,277 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.digest;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import static java.lang.Integer.rotateLeft;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.zip.Checksum;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>/**<a name="line.24"></a> +<span class="sourceLineNo">025</span> * Implementation of the xxhash32 hash algorithm.<a name="line.25"></a> +<span class="sourceLineNo">026</span> *<a name="line.26"></a> +<span class="sourceLineNo">027</span> * <p><a name="line.27"></a> +<span class="sourceLineNo">028</span> * Copied from Commons Compress 1.14 <a href=<a name="line.28"></a> +<span class="sourceLineNo">029</span> * "https://git-wip-us.apache.org/repos/asf?p=commons-compress.git;a=blob;f=src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java;h=a406ffc197449be594d46f0d2712b2d4786a1e68;hb=HEAD">https://git-wip-us.apache.org/repos/asf?p=commons-compress.git;a=blob;f=src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java;h=a406ffc197449be594d46f0d2712b2d4786a1e68;hb=HEAD</a><a name="line.29"></a> +<span class="sourceLineNo">030</span> * </p><a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * NotThreadSafe<a name="line.32"></a> +<span class="sourceLineNo">033</span> * </p><a name="line.33"></a> +<span class="sourceLineNo">034</span> *<a name="line.34"></a> +<span class="sourceLineNo">035</span> * @see <a href="http://cyan4973.github.io/xxHash/">xxHash</a><a name="line.35"></a> +<span class="sourceLineNo">036</span> * @since 1.11<a name="line.36"></a> +<span class="sourceLineNo">037</span> */<a name="line.37"></a> +<span class="sourceLineNo">038</span>public class XXHash32 implements Checksum {<a name="line.38"></a> +<span class="sourceLineNo">039</span><a name="line.39"></a> +<span class="sourceLineNo">040</span> private static final int BUF_SIZE = 16;<a name="line.40"></a> +<span class="sourceLineNo">041</span> private static final int ROTATE_BITS = 13;<a name="line.41"></a> +<span class="sourceLineNo">042</span><a name="line.42"></a> +<span class="sourceLineNo">043</span> private static final int PRIME1 = (int) 2654435761l;<a name="line.43"></a> +<span class="sourceLineNo">044</span> private static final int PRIME2 = (int) 2246822519l;<a name="line.44"></a> +<span class="sourceLineNo">045</span> private static final int PRIME3 = (int) 3266489917l;<a name="line.45"></a> +<span class="sourceLineNo">046</span> private static final int PRIME4 = 668265263;<a name="line.46"></a> +<span class="sourceLineNo">047</span> private static final int PRIME5 = 374761393;<a name="line.47"></a> +<span class="sourceLineNo">048</span><a name="line.48"></a> +<span class="sourceLineNo">049</span> private final byte[] oneByte = new byte[1];<a name="line.49"></a> +<span class="sourceLineNo">050</span> private final int[] state = new int[4];<a name="line.50"></a> +<span class="sourceLineNo">051</span> // Note: the code used to use ByteBuffer but the manual method is 50% faster<a name="line.51"></a> +<span class="sourceLineNo">052</span> // See: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/2f56fb5c<a name="line.52"></a> +<span class="sourceLineNo">053</span> private final byte[] buffer = new byte[BUF_SIZE];<a name="line.53"></a> +<span class="sourceLineNo">054</span> private final int seed;<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> private int totalLen;<a name="line.56"></a> +<span class="sourceLineNo">057</span> private int pos;<a name="line.57"></a> +<span class="sourceLineNo">058</span> /** Set to true when the state array has been updated since the last reset. */<a name="line.58"></a> +<span class="sourceLineNo">059</span> private boolean stateUpdated;<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> /**<a name="line.61"></a> +<span class="sourceLineNo">062</span> * Creates an XXHash32 instance with a seed of 0.<a name="line.62"></a> +<span class="sourceLineNo">063</span> */<a name="line.63"></a> +<span class="sourceLineNo">064</span> public XXHash32() {<a name="line.64"></a> +<span class="sourceLineNo">065</span> this(0);<a name="line.65"></a> +<span class="sourceLineNo">066</span> }<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> /**<a name="line.68"></a> +<span class="sourceLineNo">069</span> * Creates an XXHash32 instance.<a name="line.69"></a> +<span class="sourceLineNo">070</span> * @param seed the seed to use<a name="line.70"></a> +<span class="sourceLineNo">071</span> */<a name="line.71"></a> +<span class="sourceLineNo">072</span> public XXHash32(final int seed) {<a name="line.72"></a> +<span class="sourceLineNo">073</span> this.seed = seed;<a name="line.73"></a> +<span class="sourceLineNo">074</span> initializeState();<a name="line.74"></a> +<span class="sourceLineNo">075</span> }<a name="line.75"></a> +<span class="sourceLineNo">076</span><a name="line.76"></a> +<span class="sourceLineNo">077</span> @Override<a name="line.77"></a> +<span class="sourceLineNo">078</span> public void reset() {<a name="line.78"></a> +<span class="sourceLineNo">079</span> initializeState();<a name="line.79"></a> +<span class="sourceLineNo">080</span> totalLen = 0;<a name="line.80"></a> +<span class="sourceLineNo">081</span> pos = 0;<a name="line.81"></a> +<span class="sourceLineNo">082</span> stateUpdated = false;<a name="line.82"></a> +<span class="sourceLineNo">083</span> }<a name="line.83"></a> +<span class="sourceLineNo">084</span><a name="line.84"></a> +<span class="sourceLineNo">085</span> @Override<a name="line.85"></a> +<span class="sourceLineNo">086</span> public void update(final int b) {<a name="line.86"></a> +<span class="sourceLineNo">087</span> oneByte[0] = (byte) (b & 0xff);<a name="line.87"></a> +<span class="sourceLineNo">088</span> update(oneByte, 0, 1);<a name="line.88"></a> +<span class="sourceLineNo">089</span> }<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> @Override<a name="line.91"></a> +<span class="sourceLineNo">092</span> public void update(final byte[] b, int off, final int len) {<a name="line.92"></a> +<span class="sourceLineNo">093</span> if (len <= 0) {<a name="line.93"></a> +<span class="sourceLineNo">094</span> return;<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span> totalLen += len;<a name="line.96"></a> +<span class="sourceLineNo">097</span><a name="line.97"></a> +<span class="sourceLineNo">098</span> final int end = off + len;<a name="line.98"></a> +<span class="sourceLineNo">099</span><a name="line.99"></a> +<span class="sourceLineNo">100</span> // Check if the unprocessed bytes and new bytes can fill a block of 16.<a name="line.100"></a> +<span class="sourceLineNo">101</span> // Make this overflow safe in the event that len is Integer.MAX_VALUE.<a name="line.101"></a> +<span class="sourceLineNo">102</span> // Equivalent to: (pos + len < BUF_SIZE)<a name="line.102"></a> +<span class="sourceLineNo">103</span> if (pos + len - BUF_SIZE < 0) {<a name="line.103"></a> +<span class="sourceLineNo">104</span> System.arraycopy(b, off, buffer, pos, len);<a name="line.104"></a> +<span class="sourceLineNo">105</span> pos += len;<a name="line.105"></a> +<span class="sourceLineNo">106</span> return;<a name="line.106"></a> +<span class="sourceLineNo">107</span> }<a name="line.107"></a> +<span class="sourceLineNo">108</span><a name="line.108"></a> +<span class="sourceLineNo">109</span> // Process left-over bytes with new bytes<a name="line.109"></a> +<span class="sourceLineNo">110</span> if (pos > 0) {<a name="line.110"></a> +<span class="sourceLineNo">111</span> final int size = BUF_SIZE - pos;<a name="line.111"></a> +<span class="sourceLineNo">112</span> System.arraycopy(b, off, buffer, pos, size);<a name="line.112"></a> +<span class="sourceLineNo">113</span> process(buffer, 0);<a name="line.113"></a> +<span class="sourceLineNo">114</span> off += size;<a name="line.114"></a> +<span class="sourceLineNo">115</span> }<a name="line.115"></a> +<span class="sourceLineNo">116</span><a name="line.116"></a> +<span class="sourceLineNo">117</span> final int limit = end - BUF_SIZE;<a name="line.117"></a> +<span class="sourceLineNo">118</span> while (off <= limit) {<a name="line.118"></a> +<span class="sourceLineNo">119</span> process(b, off);<a name="line.119"></a> +<span class="sourceLineNo">120</span> off += BUF_SIZE;<a name="line.120"></a> +<span class="sourceLineNo">121</span> }<a name="line.121"></a> +<span class="sourceLineNo">122</span><a name="line.122"></a> +<span class="sourceLineNo">123</span> // Handle left-over bytes<a name="line.123"></a> +<span class="sourceLineNo">124</span> if (off < end) {<a name="line.124"></a> +<span class="sourceLineNo">125</span> pos = end - off;<a name="line.125"></a> +<span class="sourceLineNo">126</span> System.arraycopy(b, off, buffer, 0, pos);<a name="line.126"></a> +<span class="sourceLineNo">127</span> } else {<a name="line.127"></a> +<span class="sourceLineNo">128</span> pos = 0;<a name="line.128"></a> +<span class="sourceLineNo">129</span> }<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> @Override<a name="line.132"></a> +<span class="sourceLineNo">133</span> public long getValue() {<a name="line.133"></a> +<span class="sourceLineNo">134</span> int hash;<a name="line.134"></a> +<span class="sourceLineNo">135</span> if (stateUpdated) {<a name="line.135"></a> +<span class="sourceLineNo">136</span> // Hash with the state<a name="line.136"></a> +<span class="sourceLineNo">137</span> hash =<a name="line.137"></a> +<span class="sourceLineNo">138</span> rotateLeft(state[0], 1) +<a name="line.138"></a> +<span class="sourceLineNo">139</span> rotateLeft(state[1], 7) +<a name="line.139"></a> +<span class="sourceLineNo">140</span> rotateLeft(state[2], 12) +<a name="line.140"></a> +<span class="sourceLineNo">141</span> rotateLeft(state[3], 18);<a name="line.141"></a> +<span class="sourceLineNo">142</span> } else {<a name="line.142"></a> +<span class="sourceLineNo">143</span> // Hash using the original seed from position 2<a name="line.143"></a> +<span class="sourceLineNo">144</span> hash = state[2] + PRIME5;<a name="line.144"></a> +<span class="sourceLineNo">145</span> }<a name="line.145"></a> +<span class="sourceLineNo">146</span> hash += totalLen;<a name="line.146"></a> +<span class="sourceLineNo">147</span><a name="line.147"></a> +<span class="sourceLineNo">148</span> int idx = 0;<a name="line.148"></a> +<span class="sourceLineNo">149</span> final int limit = pos - 4;<a name="line.149"></a> +<span class="sourceLineNo">150</span> for (; idx <= limit; idx += 4) {<a name="line.150"></a> +<span class="sourceLineNo">151</span> hash = rotateLeft(hash + getInt(buffer, idx) * PRIME3, 17) * PRIME4;<a name="line.151"></a> +<span class="sourceLineNo">152</span> }<a name="line.152"></a> +<span class="sourceLineNo">153</span> while (idx < pos) {<a name="line.153"></a> +<span class="sourceLineNo">154</span> hash = rotateLeft(hash + (buffer[idx++] & 0xff) * PRIME5, 11) * PRIME1;<a name="line.154"></a> +<span class="sourceLineNo">155</span> }<a name="line.155"></a> +<span class="sourceLineNo">156</span><a name="line.156"></a> +<span class="sourceLineNo">157</span> hash ^= hash >>> 15;<a name="line.157"></a> +<span class="sourceLineNo">158</span> hash *= PRIME2;<a name="line.158"></a> +<span class="sourceLineNo">159</span> hash ^= hash >>> 13;<a name="line.159"></a> +<span class="sourceLineNo">160</span> hash *= PRIME3;<a name="line.160"></a> +<span class="sourceLineNo">161</span> hash ^= hash >>> 16;<a name="line.161"></a> +<span class="sourceLineNo">162</span> return hash & 0xffffffffl;<a name="line.162"></a> +<span class="sourceLineNo">163</span> }<a name="line.163"></a> +<span class="sourceLineNo">164</span><a name="line.164"></a> +<span class="sourceLineNo">165</span> /**<a name="line.165"></a> +<span class="sourceLineNo">166</span> * Gets the little-endian int from 4 bytes starting at the specified index.<a name="line.166"></a> +<span class="sourceLineNo">167</span> *<a name="line.167"></a> +<span class="sourceLineNo">168</span> * @param buffer The data<a name="line.168"></a> +<span class="sourceLineNo">169</span> * @param idx The index<a name="line.169"></a> +<span class="sourceLineNo">170</span> * @return The little-endian int<a name="line.170"></a> +<span class="sourceLineNo">171</span> */<a name="line.171"></a> +<span class="sourceLineNo">172</span> private static int getInt(final byte[] buffer, final int idx) {<a name="line.172"></a> +<span class="sourceLineNo">173</span> return ((buffer[idx ] & 0xff) ) |<a name="line.173"></a> +<span class="sourceLineNo">174</span> ((buffer[idx + 1] & 0xff) << 8) |<a name="line.174"></a> +<span class="sourceLineNo">175</span> ((buffer[idx + 2] & 0xff) << 16) |<a name="line.175"></a> +<span class="sourceLineNo">176</span> ((buffer[idx + 3] & 0xff) << 24);<a name="line.176"></a> +<span class="sourceLineNo">177</span> }<a name="line.177"></a> +<span class="sourceLineNo">178</span><a name="line.178"></a> +<span class="sourceLineNo">179</span> private void initializeState() {<a name="line.179"></a> +<span class="sourceLineNo">180</span> state[0] = seed + PRIME1 + PRIME2;<a name="line.180"></a> +<span class="sourceLineNo">181</span> state[1] = seed + PRIME2;<a name="line.181"></a> +<span class="sourceLineNo">182</span> state[2] = seed;<a name="line.182"></a> +<span class="sourceLineNo">183</span> state[3] = seed - PRIME1;<a name="line.183"></a> +<span class="sourceLineNo">184</span> }<a name="line.184"></a> +<span class="sourceLineNo">185</span><a name="line.185"></a> +<span class="sourceLineNo">186</span> private void process(final byte[] b, final int offset) {<a name="line.186"></a> +<span class="sourceLineNo">187</span> // local shadows for performance<a name="line.187"></a> +<span class="sourceLineNo">188</span> int s0 = state[0];<a name="line.188"></a> +<span class="sourceLineNo">189</span> int s1 = state[1];<a name="line.189"></a> +<span class="sourceLineNo">190</span> int s2 = state[2];<a name="line.190"></a> +<span class="sourceLineNo">191</span> int s3 = state[3];<a name="line.191"></a> +<span class="sourceLineNo">192</span><a name="line.192"></a> +<span class="sourceLineNo">193</span> s0 = rotateLeft(s0 + getInt(b, offset) * PRIME2, ROTATE_BITS) * PRIME1;<a name="line.193"></a> +<span class="sourceLineNo">194</span> s1 = rotateLeft(s1 + getInt(b, offset + 4) * PRIME2, ROTATE_BITS) * PRIME1;<a name="line.194"></a> +<span class="sourceLineNo">195</span> s2 = rotateLeft(s2 + getInt(b, offset + 8) * PRIME2, ROTATE_BITS) * PRIME1;<a name="line.195"></a> +<span class="sourceLineNo">196</span> s3 = rotateLeft(s3 + getInt(b, offset + 12) * PRIME2, ROTATE_BITS) * PRIME1;<a name="line.196"></a> +<span class="sourceLineNo">197</span><a name="line.197"></a> +<span class="sourceLineNo">198</span> state[0] = s0;<a name="line.198"></a> +<span class="sourceLineNo">199</span> state[1] = s1;<a name="line.199"></a> +<span class="sourceLineNo">200</span> state[2] = s2;<a name="line.200"></a> +<span class="sourceLineNo">201</span> state[3] = s3;<a name="line.201"></a> +<span class="sourceLineNo">202</span><a name="line.202"></a> +<span class="sourceLineNo">203</span> stateUpdated = true;<a name="line.203"></a> +<span class="sourceLineNo">204</span> }<a name="line.204"></a> +<span class="sourceLineNo">205</span>}<a name="line.205"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/AbstractCaverphone.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/AbstractCaverphone.html new file mode 100644 index 0000000000000000000000000000000000000000..393817e578e7971794f6761d99165369c23260f8 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/AbstractCaverphone.html @@ -0,0 +1,151 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.EncoderException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import org.apache.commons.codec.StringEncoder;<a name="line.21"></a> +<span class="sourceLineNo">022</span><a name="line.22"></a> +<span class="sourceLineNo">023</span>/**<a name="line.23"></a> +<span class="sourceLineNo">024</span> * Encodes a string into a Caverphone value.<a name="line.24"></a> +<span class="sourceLineNo">025</span> *<a name="line.25"></a> +<span class="sourceLineNo">026</span> * This is an algorithm created by the Caversham Project at the University of Otago. It implements the Caverphone 2.0<a name="line.26"></a> +<span class="sourceLineNo">027</span> * algorithm:<a name="line.27"></a> +<span class="sourceLineNo">028</span> *<a name="line.28"></a> +<span class="sourceLineNo">029</span> * <p>This class is immutable and thread-safe.</p><a name="line.29"></a> +<span class="sourceLineNo">030</span> *<a name="line.30"></a> +<span class="sourceLineNo">031</span> * @see <a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a><a name="line.31"></a> +<span class="sourceLineNo">032</span> * @since 1.5<a name="line.32"></a> +<span class="sourceLineNo">033</span> */<a name="line.33"></a> +<span class="sourceLineNo">034</span>public abstract class AbstractCaverphone implements StringEncoder {<a name="line.34"></a> +<span class="sourceLineNo">035</span><a name="line.35"></a> +<span class="sourceLineNo">036</span> /**<a name="line.36"></a> +<span class="sourceLineNo">037</span> * Creates an instance of the Caverphone encoder<a name="line.37"></a> +<span class="sourceLineNo">038</span> */<a name="line.38"></a> +<span class="sourceLineNo">039</span> public AbstractCaverphone() {<a name="line.39"></a> +<span class="sourceLineNo">040</span> super();<a name="line.40"></a> +<span class="sourceLineNo">041</span> }<a name="line.41"></a> +<span class="sourceLineNo">042</span><a name="line.42"></a> +<span class="sourceLineNo">043</span> /**<a name="line.43"></a> +<span class="sourceLineNo">044</span> * Encodes an Object using the caverphone algorithm. This method is provided in order to satisfy the requirements of<a name="line.44"></a> +<span class="sourceLineNo">045</span> * the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.<a name="line.45"></a> +<span class="sourceLineNo">046</span> *<a name="line.46"></a> +<span class="sourceLineNo">047</span> * @param source<a name="line.47"></a> +<span class="sourceLineNo">048</span> * Object to encode<a name="line.48"></a> +<span class="sourceLineNo">049</span> * @return An object (or type java.lang.String) containing the caverphone code which corresponds to the String<a name="line.49"></a> +<span class="sourceLineNo">050</span> * supplied.<a name="line.50"></a> +<span class="sourceLineNo">051</span> * @throws EncoderException<a name="line.51"></a> +<span class="sourceLineNo">052</span> * if the parameter supplied is not of type java.lang.String<a name="line.52"></a> +<span class="sourceLineNo">053</span> */<a name="line.53"></a> +<span class="sourceLineNo">054</span> @Override<a name="line.54"></a> +<span class="sourceLineNo">055</span> public Object encode(final Object source) throws EncoderException {<a name="line.55"></a> +<span class="sourceLineNo">056</span> if (!(source instanceof String)) {<a name="line.56"></a> +<span class="sourceLineNo">057</span> throw new EncoderException("Parameter supplied to Caverphone encode is not of type java.lang.String");<a name="line.57"></a> +<span class="sourceLineNo">058</span> }<a name="line.58"></a> +<span class="sourceLineNo">059</span> return this.encode((String) source);<a name="line.59"></a> +<span class="sourceLineNo">060</span> }<a name="line.60"></a> +<span class="sourceLineNo">061</span><a name="line.61"></a> +<span class="sourceLineNo">062</span> /**<a name="line.62"></a> +<span class="sourceLineNo">063</span> * Tests if the encodings of two strings are equal.<a name="line.63"></a> +<span class="sourceLineNo">064</span> *<a name="line.64"></a> +<span class="sourceLineNo">065</span> * This method might be promoted to a new AbstractStringEncoder superclass.<a name="line.65"></a> +<span class="sourceLineNo">066</span> *<a name="line.66"></a> +<span class="sourceLineNo">067</span> * @param str1<a name="line.67"></a> +<span class="sourceLineNo">068</span> * First of two strings to compare<a name="line.68"></a> +<span class="sourceLineNo">069</span> * @param str2<a name="line.69"></a> +<span class="sourceLineNo">070</span> * Second of two strings to compare<a name="line.70"></a> +<span class="sourceLineNo">071</span> * @return {@code true} if the encodings of these strings are identical, {@code false} otherwise.<a name="line.71"></a> +<span class="sourceLineNo">072</span> * @throws EncoderException<a name="line.72"></a> +<span class="sourceLineNo">073</span> * thrown if there is an error condition during the encoding process.<a name="line.73"></a> +<span class="sourceLineNo">074</span> */<a name="line.74"></a> +<span class="sourceLineNo">075</span> public boolean isEncodeEqual(final String str1, final String str2) throws EncoderException {<a name="line.75"></a> +<span class="sourceLineNo">076</span> return this.encode(str1).equals(this.encode(str2));<a name="line.76"></a> +<span class="sourceLineNo">077</span> }<a name="line.77"></a> +<span class="sourceLineNo">078</span><a name="line.78"></a> +<span class="sourceLineNo">079</span>}<a name="line.79"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Caverphone.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Caverphone.html new file mode 100644 index 0000000000000000000000000000000000000000..05082de2d6bfdc7bd7961815b5d601920178e24a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Caverphone.html @@ -0,0 +1,176 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.EncoderException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import org.apache.commons.codec.StringEncoder;<a name="line.21"></a> +<span class="sourceLineNo">022</span><a name="line.22"></a> +<span class="sourceLineNo">023</span>/**<a name="line.23"></a> +<span class="sourceLineNo">024</span> * Encodes a string into a Caverphone 2.0 value. Delegate to a {@link Caverphone2} instance.<a name="line.24"></a> +<span class="sourceLineNo">025</span> *<a name="line.25"></a> +<span class="sourceLineNo">026</span> * This is an algorithm created by the Caversham Project at the University of Otago. It implements the Caverphone 2.0<a name="line.26"></a> +<span class="sourceLineNo">027</span> * algorithm:<a name="line.27"></a> +<span class="sourceLineNo">028</span> *<a name="line.28"></a> +<span class="sourceLineNo">029</span> * @see <a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a><a name="line.29"></a> +<span class="sourceLineNo">030</span> * @see <a href="http://caversham.otago.ac.nz/files/working/ctp150804.pdf">Caverphone 2.0 specification</a><a name="line.30"></a> +<span class="sourceLineNo">031</span> * @since 1.4<a name="line.31"></a> +<span class="sourceLineNo">032</span> * @deprecated 1.5 Replaced by {@link Caverphone2}, will be removed in 2.0.<a name="line.32"></a> +<span class="sourceLineNo">033</span> */<a name="line.33"></a> +<span class="sourceLineNo">034</span>@Deprecated<a name="line.34"></a> +<span class="sourceLineNo">035</span>public class Caverphone implements StringEncoder {<a name="line.35"></a> +<span class="sourceLineNo">036</span><a name="line.36"></a> +<span class="sourceLineNo">037</span> /**<a name="line.37"></a> +<span class="sourceLineNo">038</span> * Delegate to a {@link Caverphone2} instance to avoid code duplication.<a name="line.38"></a> +<span class="sourceLineNo">039</span> */<a name="line.39"></a> +<span class="sourceLineNo">040</span> final private Caverphone2 encoder = new Caverphone2();<a name="line.40"></a> +<span class="sourceLineNo">041</span><a name="line.41"></a> +<span class="sourceLineNo">042</span> /**<a name="line.42"></a> +<span class="sourceLineNo">043</span> * Creates an instance of the Caverphone encoder<a name="line.43"></a> +<span class="sourceLineNo">044</span> */<a name="line.44"></a> +<span class="sourceLineNo">045</span> public Caverphone() {<a name="line.45"></a> +<span class="sourceLineNo">046</span> super();<a name="line.46"></a> +<span class="sourceLineNo">047</span> }<a name="line.47"></a> +<span class="sourceLineNo">048</span><a name="line.48"></a> +<span class="sourceLineNo">049</span> /**<a name="line.49"></a> +<span class="sourceLineNo">050</span> * Encodes the given String into a Caverphone value.<a name="line.50"></a> +<span class="sourceLineNo">051</span> *<a name="line.51"></a> +<span class="sourceLineNo">052</span> * @param source<a name="line.52"></a> +<span class="sourceLineNo">053</span> * String the source string<a name="line.53"></a> +<span class="sourceLineNo">054</span> * @return A caverphone code for the given String<a name="line.54"></a> +<span class="sourceLineNo">055</span> */<a name="line.55"></a> +<span class="sourceLineNo">056</span> public String caverphone(final String source) {<a name="line.56"></a> +<span class="sourceLineNo">057</span> return this.encoder.encode(source);<a name="line.57"></a> +<span class="sourceLineNo">058</span> }<a name="line.58"></a> +<span class="sourceLineNo">059</span><a name="line.59"></a> +<span class="sourceLineNo">060</span> /**<a name="line.60"></a> +<span class="sourceLineNo">061</span> * Encodes an Object using the caverphone algorithm. This method is provided in order to satisfy the requirements of<a name="line.61"></a> +<span class="sourceLineNo">062</span> * the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.<a name="line.62"></a> +<span class="sourceLineNo">063</span> *<a name="line.63"></a> +<span class="sourceLineNo">064</span> * @param obj<a name="line.64"></a> +<span class="sourceLineNo">065</span> * Object to encode<a name="line.65"></a> +<span class="sourceLineNo">066</span> * @return An object (or type java.lang.String) containing the caverphone code which corresponds to the String<a name="line.66"></a> +<span class="sourceLineNo">067</span> * supplied.<a name="line.67"></a> +<span class="sourceLineNo">068</span> * @throws EncoderException<a name="line.68"></a> +<span class="sourceLineNo">069</span> * if the parameter supplied is not of type java.lang.String<a name="line.69"></a> +<span class="sourceLineNo">070</span> */<a name="line.70"></a> +<span class="sourceLineNo">071</span> @Override<a name="line.71"></a> +<span class="sourceLineNo">072</span> public Object encode(final Object obj) throws EncoderException {<a name="line.72"></a> +<span class="sourceLineNo">073</span> if (!(obj instanceof String)) {<a name="line.73"></a> +<span class="sourceLineNo">074</span> throw new EncoderException("Parameter supplied to Caverphone encode is not of type java.lang.String");<a name="line.74"></a> +<span class="sourceLineNo">075</span> }<a name="line.75"></a> +<span class="sourceLineNo">076</span> return this.caverphone((String) obj);<a name="line.76"></a> +<span class="sourceLineNo">077</span> }<a name="line.77"></a> +<span class="sourceLineNo">078</span><a name="line.78"></a> +<span class="sourceLineNo">079</span> /**<a name="line.79"></a> +<span class="sourceLineNo">080</span> * Encodes a String using the Caverphone algorithm.<a name="line.80"></a> +<span class="sourceLineNo">081</span> *<a name="line.81"></a> +<span class="sourceLineNo">082</span> * @param str<a name="line.82"></a> +<span class="sourceLineNo">083</span> * String object to encode<a name="line.83"></a> +<span class="sourceLineNo">084</span> * @return The caverphone code corresponding to the String supplied<a name="line.84"></a> +<span class="sourceLineNo">085</span> */<a name="line.85"></a> +<span class="sourceLineNo">086</span> @Override<a name="line.86"></a> +<span class="sourceLineNo">087</span> public String encode(final String str) {<a name="line.87"></a> +<span class="sourceLineNo">088</span> return this.caverphone(str);<a name="line.88"></a> +<span class="sourceLineNo">089</span> }<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> /**<a name="line.91"></a> +<span class="sourceLineNo">092</span> * Tests if the caverphones of two strings are identical.<a name="line.92"></a> +<span class="sourceLineNo">093</span> *<a name="line.93"></a> +<span class="sourceLineNo">094</span> * @param str1<a name="line.94"></a> +<span class="sourceLineNo">095</span> * First of two strings to compare<a name="line.95"></a> +<span class="sourceLineNo">096</span> * @param str2<a name="line.96"></a> +<span class="sourceLineNo">097</span> * Second of two strings to compare<a name="line.97"></a> +<span class="sourceLineNo">098</span> * @return {@code true} if the caverphones of these strings are identical, {@code false} otherwise.<a name="line.98"></a> +<span class="sourceLineNo">099</span> */<a name="line.99"></a> +<span class="sourceLineNo">100</span> public boolean isCaverphoneEqual(final String str1, final String str2) {<a name="line.100"></a> +<span class="sourceLineNo">101</span> return this.caverphone(str1).equals(this.caverphone(str2));<a name="line.101"></a> +<span class="sourceLineNo">102</span> }<a name="line.102"></a> +<span class="sourceLineNo">103</span><a name="line.103"></a> +<span class="sourceLineNo">104</span>}<a name="line.104"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Caverphone1.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Caverphone1.html new file mode 100644 index 0000000000000000000000000000000000000000..b78e84089fe53a8a1e0da7222187b42ed6605d6f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Caverphone1.html @@ -0,0 +1,198 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Encodes a string into a Caverphone 1.0 value.<a name="line.21"></a> +<span class="sourceLineNo">022</span> *<a name="line.22"></a> +<span class="sourceLineNo">023</span> * This is an algorithm created by the Caversham Project at the University of Otago. It implements the Caverphone 1.0<a name="line.23"></a> +<span class="sourceLineNo">024</span> * algorithm:<a name="line.24"></a> +<span class="sourceLineNo">025</span> *<a name="line.25"></a> +<span class="sourceLineNo">026</span> * @see <a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a><a name="line.26"></a> +<span class="sourceLineNo">027</span> * @see <a href="http://caversham.otago.ac.nz/files/working/ctp060902.pdf">Caverphone 1.0 specification</a><a name="line.27"></a> +<span class="sourceLineNo">028</span> * @since 1.5<a name="line.28"></a> +<span class="sourceLineNo">029</span> *<a name="line.29"></a> +<span class="sourceLineNo">030</span> * <p>This class is immutable and thread-safe.</p><a name="line.30"></a> +<span class="sourceLineNo">031</span> */<a name="line.31"></a> +<span class="sourceLineNo">032</span>public class Caverphone1 extends AbstractCaverphone {<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span> private static final String SIX_1 = "111111";<a name="line.34"></a> +<span class="sourceLineNo">035</span><a name="line.35"></a> +<span class="sourceLineNo">036</span> /**<a name="line.36"></a> +<span class="sourceLineNo">037</span> * Encodes the given String into a Caverphone value.<a name="line.37"></a> +<span class="sourceLineNo">038</span> *<a name="line.38"></a> +<span class="sourceLineNo">039</span> * @param source<a name="line.39"></a> +<span class="sourceLineNo">040</span> * String the source string<a name="line.40"></a> +<span class="sourceLineNo">041</span> * @return A caverphone code for the given String<a name="line.41"></a> +<span class="sourceLineNo">042</span> */<a name="line.42"></a> +<span class="sourceLineNo">043</span> @Override<a name="line.43"></a> +<span class="sourceLineNo">044</span> public String encode(final String source) {<a name="line.44"></a> +<span class="sourceLineNo">045</span> String txt = source;<a name="line.45"></a> +<span class="sourceLineNo">046</span> if (txt == null || txt.length() == 0) {<a name="line.46"></a> +<span class="sourceLineNo">047</span> return SIX_1;<a name="line.47"></a> +<span class="sourceLineNo">048</span> }<a name="line.48"></a> +<span class="sourceLineNo">049</span><a name="line.49"></a> +<span class="sourceLineNo">050</span> // 1. Convert to lowercase<a name="line.50"></a> +<span class="sourceLineNo">051</span> txt = txt.toLowerCase(java.util.Locale.ENGLISH);<a name="line.51"></a> +<span class="sourceLineNo">052</span><a name="line.52"></a> +<span class="sourceLineNo">053</span> // 2. Remove anything not A-Z<a name="line.53"></a> +<span class="sourceLineNo">054</span> txt = txt.replaceAll("[^a-z]", "");<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> // 3. Handle various start options<a name="line.56"></a> +<span class="sourceLineNo">057</span> // 2 is a temporary placeholder to indicate a consonant which we are no longer interested in.<a name="line.57"></a> +<span class="sourceLineNo">058</span> txt = txt.replaceAll("^cough", "cou2f");<a name="line.58"></a> +<span class="sourceLineNo">059</span> txt = txt.replaceAll("^rough", "rou2f");<a name="line.59"></a> +<span class="sourceLineNo">060</span> txt = txt.replaceAll("^tough", "tou2f");<a name="line.60"></a> +<span class="sourceLineNo">061</span> txt = txt.replaceAll("^enough", "enou2f");<a name="line.61"></a> +<span class="sourceLineNo">062</span> txt = txt.replaceAll("^gn", "2n");<a name="line.62"></a> +<span class="sourceLineNo">063</span><a name="line.63"></a> +<span class="sourceLineNo">064</span> // End<a name="line.64"></a> +<span class="sourceLineNo">065</span> txt = txt.replaceAll("mb$", "m2");<a name="line.65"></a> +<span class="sourceLineNo">066</span><a name="line.66"></a> +<span class="sourceLineNo">067</span> // 4. Handle replacements<a name="line.67"></a> +<span class="sourceLineNo">068</span> txt = txt.replaceAll("cq", "2q");<a name="line.68"></a> +<span class="sourceLineNo">069</span> txt = txt.replaceAll("ci", "si");<a name="line.69"></a> +<span class="sourceLineNo">070</span> txt = txt.replaceAll("ce", "se");<a name="line.70"></a> +<span class="sourceLineNo">071</span> txt = txt.replaceAll("cy", "sy");<a name="line.71"></a> +<span class="sourceLineNo">072</span> txt = txt.replaceAll("tch", "2ch");<a name="line.72"></a> +<span class="sourceLineNo">073</span> txt = txt.replaceAll("c", "k");<a name="line.73"></a> +<span class="sourceLineNo">074</span> txt = txt.replaceAll("q", "k");<a name="line.74"></a> +<span class="sourceLineNo">075</span> txt = txt.replaceAll("x", "k");<a name="line.75"></a> +<span class="sourceLineNo">076</span> txt = txt.replaceAll("v", "f");<a name="line.76"></a> +<span class="sourceLineNo">077</span> txt = txt.replaceAll("dg", "2g");<a name="line.77"></a> +<span class="sourceLineNo">078</span> txt = txt.replaceAll("tio", "sio");<a name="line.78"></a> +<span class="sourceLineNo">079</span> txt = txt.replaceAll("tia", "sia");<a name="line.79"></a> +<span class="sourceLineNo">080</span> txt = txt.replaceAll("d", "t");<a name="line.80"></a> +<span class="sourceLineNo">081</span> txt = txt.replaceAll("ph", "fh");<a name="line.81"></a> +<span class="sourceLineNo">082</span> txt = txt.replaceAll("b", "p");<a name="line.82"></a> +<span class="sourceLineNo">083</span> txt = txt.replaceAll("sh", "s2");<a name="line.83"></a> +<span class="sourceLineNo">084</span> txt = txt.replaceAll("z", "s");<a name="line.84"></a> +<span class="sourceLineNo">085</span> txt = txt.replaceAll("^[aeiou]", "A");<a name="line.85"></a> +<span class="sourceLineNo">086</span> // 3 is a temporary placeholder marking a vowel<a name="line.86"></a> +<span class="sourceLineNo">087</span> txt = txt.replaceAll("[aeiou]", "3");<a name="line.87"></a> +<span class="sourceLineNo">088</span> txt = txt.replaceAll("3gh3", "3kh3");<a name="line.88"></a> +<span class="sourceLineNo">089</span> txt = txt.replaceAll("gh", "22");<a name="line.89"></a> +<span class="sourceLineNo">090</span> txt = txt.replaceAll("g", "k");<a name="line.90"></a> +<span class="sourceLineNo">091</span> txt = txt.replaceAll("s+", "S");<a name="line.91"></a> +<span class="sourceLineNo">092</span> txt = txt.replaceAll("t+", "T");<a name="line.92"></a> +<span class="sourceLineNo">093</span> txt = txt.replaceAll("p+", "P");<a name="line.93"></a> +<span class="sourceLineNo">094</span> txt = txt.replaceAll("k+", "K");<a name="line.94"></a> +<span class="sourceLineNo">095</span> txt = txt.replaceAll("f+", "F");<a name="line.95"></a> +<span class="sourceLineNo">096</span> txt = txt.replaceAll("m+", "M");<a name="line.96"></a> +<span class="sourceLineNo">097</span> txt = txt.replaceAll("n+", "N");<a name="line.97"></a> +<span class="sourceLineNo">098</span> txt = txt.replaceAll("w3", "W3");<a name="line.98"></a> +<span class="sourceLineNo">099</span> txt = txt.replaceAll("wy", "Wy"); // 1.0 only<a name="line.99"></a> +<span class="sourceLineNo">100</span> txt = txt.replaceAll("wh3", "Wh3");<a name="line.100"></a> +<span class="sourceLineNo">101</span> txt = txt.replaceAll("why", "Why"); // 1.0 only<a name="line.101"></a> +<span class="sourceLineNo">102</span> txt = txt.replaceAll("w", "2");<a name="line.102"></a> +<span class="sourceLineNo">103</span> txt = txt.replaceAll("^h", "A");<a name="line.103"></a> +<span class="sourceLineNo">104</span> txt = txt.replaceAll("h", "2");<a name="line.104"></a> +<span class="sourceLineNo">105</span> txt = txt.replaceAll("r3", "R3");<a name="line.105"></a> +<span class="sourceLineNo">106</span> txt = txt.replaceAll("ry", "Ry"); // 1.0 only<a name="line.106"></a> +<span class="sourceLineNo">107</span> txt = txt.replaceAll("r", "2");<a name="line.107"></a> +<span class="sourceLineNo">108</span> txt = txt.replaceAll("l3", "L3");<a name="line.108"></a> +<span class="sourceLineNo">109</span> txt = txt.replaceAll("ly", "Ly"); // 1.0 only<a name="line.109"></a> +<span class="sourceLineNo">110</span> txt = txt.replaceAll("l", "2");<a name="line.110"></a> +<span class="sourceLineNo">111</span> txt = txt.replaceAll("j", "y"); // 1.0 only<a name="line.111"></a> +<span class="sourceLineNo">112</span> txt = txt.replaceAll("y3", "Y3"); // 1.0 only<a name="line.112"></a> +<span class="sourceLineNo">113</span> txt = txt.replaceAll("y", "2"); // 1.0 only<a name="line.113"></a> +<span class="sourceLineNo">114</span><a name="line.114"></a> +<span class="sourceLineNo">115</span> // 5. Handle removals<a name="line.115"></a> +<span class="sourceLineNo">116</span> txt = txt.replaceAll("2", "");<a name="line.116"></a> +<span class="sourceLineNo">117</span> txt = txt.replaceAll("3", "");<a name="line.117"></a> +<span class="sourceLineNo">118</span><a name="line.118"></a> +<span class="sourceLineNo">119</span> // 6. put six 1s on the end<a name="line.119"></a> +<span class="sourceLineNo">120</span> txt = txt + SIX_1;<a name="line.120"></a> +<span class="sourceLineNo">121</span><a name="line.121"></a> +<span class="sourceLineNo">122</span> // 7. take the first six characters as the code<a name="line.122"></a> +<span class="sourceLineNo">123</span> return txt.substring(0, SIX_1.length());<a name="line.123"></a> +<span class="sourceLineNo">124</span> }<a name="line.124"></a> +<span class="sourceLineNo">125</span><a name="line.125"></a> +<span class="sourceLineNo">126</span>}<a name="line.126"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Caverphone2.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Caverphone2.html new file mode 100644 index 0000000000000000000000000000000000000000..f4943cb2ca77d63c75ce7c925f2be01ed2e4ceaf --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Caverphone2.html @@ -0,0 +1,202 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Encodes a string into a Caverphone 2.0 value.<a name="line.21"></a> +<span class="sourceLineNo">022</span> *<a name="line.22"></a> +<span class="sourceLineNo">023</span> * This is an algorithm created by the Caversham Project at the University of Otago. It implements the Caverphone 2.0<a name="line.23"></a> +<span class="sourceLineNo">024</span> * algorithm:<a name="line.24"></a> +<span class="sourceLineNo">025</span> *<a name="line.25"></a> +<span class="sourceLineNo">026</span> * @see <a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a><a name="line.26"></a> +<span class="sourceLineNo">027</span> * @see <a href="http://caversham.otago.ac.nz/files/working/ctp150804.pdf">Caverphone 2.0 specification</a><a name="line.27"></a> +<span class="sourceLineNo">028</span> * @since 1.5<a name="line.28"></a> +<span class="sourceLineNo">029</span> *<a name="line.29"></a> +<span class="sourceLineNo">030</span> * <p>This class is immutable and thread-safe.</p><a name="line.30"></a> +<span class="sourceLineNo">031</span> */<a name="line.31"></a> +<span class="sourceLineNo">032</span>public class Caverphone2 extends AbstractCaverphone {<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span> private static final String TEN_1 = "1111111111";<a name="line.34"></a> +<span class="sourceLineNo">035</span><a name="line.35"></a> +<span class="sourceLineNo">036</span> /**<a name="line.36"></a> +<span class="sourceLineNo">037</span> * Encodes the given String into a Caverphone 2.0 value.<a name="line.37"></a> +<span class="sourceLineNo">038</span> *<a name="line.38"></a> +<span class="sourceLineNo">039</span> * @param source<a name="line.39"></a> +<span class="sourceLineNo">040</span> * String the source string<a name="line.40"></a> +<span class="sourceLineNo">041</span> * @return A caverphone code for the given String<a name="line.41"></a> +<span class="sourceLineNo">042</span> */<a name="line.42"></a> +<span class="sourceLineNo">043</span> @Override<a name="line.43"></a> +<span class="sourceLineNo">044</span> public String encode(final String source) {<a name="line.44"></a> +<span class="sourceLineNo">045</span> String txt = source;<a name="line.45"></a> +<span class="sourceLineNo">046</span> if (txt == null || txt.length() == 0) {<a name="line.46"></a> +<span class="sourceLineNo">047</span> return TEN_1;<a name="line.47"></a> +<span class="sourceLineNo">048</span> }<a name="line.48"></a> +<span class="sourceLineNo">049</span><a name="line.49"></a> +<span class="sourceLineNo">050</span> // 1. Convert to lowercase<a name="line.50"></a> +<span class="sourceLineNo">051</span> txt = txt.toLowerCase(java.util.Locale.ENGLISH);<a name="line.51"></a> +<span class="sourceLineNo">052</span><a name="line.52"></a> +<span class="sourceLineNo">053</span> // 2. Remove anything not A-Z<a name="line.53"></a> +<span class="sourceLineNo">054</span> txt = txt.replaceAll("[^a-z]", "");<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> // 2.5. Remove final e<a name="line.56"></a> +<span class="sourceLineNo">057</span> txt = txt.replaceAll("e$", ""); // 2.0 only<a name="line.57"></a> +<span class="sourceLineNo">058</span><a name="line.58"></a> +<span class="sourceLineNo">059</span> // 3. Handle various start options<a name="line.59"></a> +<span class="sourceLineNo">060</span> txt = txt.replaceAll("^cough", "cou2f");<a name="line.60"></a> +<span class="sourceLineNo">061</span> txt = txt.replaceAll("^rough", "rou2f");<a name="line.61"></a> +<span class="sourceLineNo">062</span> txt = txt.replaceAll("^tough", "tou2f");<a name="line.62"></a> +<span class="sourceLineNo">063</span> txt = txt.replaceAll("^enough", "enou2f"); // 2.0 only<a name="line.63"></a> +<span class="sourceLineNo">064</span> txt = txt.replaceAll("^trough", "trou2f"); // 2.0 only<a name="line.64"></a> +<span class="sourceLineNo">065</span> // note the spec says ^enough here again, c+p error I assume<a name="line.65"></a> +<span class="sourceLineNo">066</span> txt = txt.replaceAll("^gn", "2n");<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> // End<a name="line.68"></a> +<span class="sourceLineNo">069</span> txt = txt.replaceAll("mb$", "m2");<a name="line.69"></a> +<span class="sourceLineNo">070</span><a name="line.70"></a> +<span class="sourceLineNo">071</span> // 4. Handle replacements<a name="line.71"></a> +<span class="sourceLineNo">072</span> txt = txt.replaceAll("cq", "2q");<a name="line.72"></a> +<span class="sourceLineNo">073</span> txt = txt.replaceAll("ci", "si");<a name="line.73"></a> +<span class="sourceLineNo">074</span> txt = txt.replaceAll("ce", "se");<a name="line.74"></a> +<span class="sourceLineNo">075</span> txt = txt.replaceAll("cy", "sy");<a name="line.75"></a> +<span class="sourceLineNo">076</span> txt = txt.replaceAll("tch", "2ch");<a name="line.76"></a> +<span class="sourceLineNo">077</span> txt = txt.replaceAll("c", "k");<a name="line.77"></a> +<span class="sourceLineNo">078</span> txt = txt.replaceAll("q", "k");<a name="line.78"></a> +<span class="sourceLineNo">079</span> txt = txt.replaceAll("x", "k");<a name="line.79"></a> +<span class="sourceLineNo">080</span> txt = txt.replaceAll("v", "f");<a name="line.80"></a> +<span class="sourceLineNo">081</span> txt = txt.replaceAll("dg", "2g");<a name="line.81"></a> +<span class="sourceLineNo">082</span> txt = txt.replaceAll("tio", "sio");<a name="line.82"></a> +<span class="sourceLineNo">083</span> txt = txt.replaceAll("tia", "sia");<a name="line.83"></a> +<span class="sourceLineNo">084</span> txt = txt.replaceAll("d", "t");<a name="line.84"></a> +<span class="sourceLineNo">085</span> txt = txt.replaceAll("ph", "fh");<a name="line.85"></a> +<span class="sourceLineNo">086</span> txt = txt.replaceAll("b", "p");<a name="line.86"></a> +<span class="sourceLineNo">087</span> txt = txt.replaceAll("sh", "s2");<a name="line.87"></a> +<span class="sourceLineNo">088</span> txt = txt.replaceAll("z", "s");<a name="line.88"></a> +<span class="sourceLineNo">089</span> txt = txt.replaceAll("^[aeiou]", "A");<a name="line.89"></a> +<span class="sourceLineNo">090</span> txt = txt.replaceAll("[aeiou]", "3");<a name="line.90"></a> +<span class="sourceLineNo">091</span> txt = txt.replaceAll("j", "y"); // 2.0 only<a name="line.91"></a> +<span class="sourceLineNo">092</span> txt = txt.replaceAll("^y3", "Y3"); // 2.0 only<a name="line.92"></a> +<span class="sourceLineNo">093</span> txt = txt.replaceAll("^y", "A"); // 2.0 only<a name="line.93"></a> +<span class="sourceLineNo">094</span> txt = txt.replaceAll("y", "3"); // 2.0 only<a name="line.94"></a> +<span class="sourceLineNo">095</span> txt = txt.replaceAll("3gh3", "3kh3");<a name="line.95"></a> +<span class="sourceLineNo">096</span> txt = txt.replaceAll("gh", "22");<a name="line.96"></a> +<span class="sourceLineNo">097</span> txt = txt.replaceAll("g", "k");<a name="line.97"></a> +<span class="sourceLineNo">098</span> txt = txt.replaceAll("s+", "S");<a name="line.98"></a> +<span class="sourceLineNo">099</span> txt = txt.replaceAll("t+", "T");<a name="line.99"></a> +<span class="sourceLineNo">100</span> txt = txt.replaceAll("p+", "P");<a name="line.100"></a> +<span class="sourceLineNo">101</span> txt = txt.replaceAll("k+", "K");<a name="line.101"></a> +<span class="sourceLineNo">102</span> txt = txt.replaceAll("f+", "F");<a name="line.102"></a> +<span class="sourceLineNo">103</span> txt = txt.replaceAll("m+", "M");<a name="line.103"></a> +<span class="sourceLineNo">104</span> txt = txt.replaceAll("n+", "N");<a name="line.104"></a> +<span class="sourceLineNo">105</span> txt = txt.replaceAll("w3", "W3");<a name="line.105"></a> +<span class="sourceLineNo">106</span> txt = txt.replaceAll("wh3", "Wh3");<a name="line.106"></a> +<span class="sourceLineNo">107</span> txt = txt.replaceAll("w$", "3"); // 2.0 only<a name="line.107"></a> +<span class="sourceLineNo">108</span> txt = txt.replaceAll("w", "2");<a name="line.108"></a> +<span class="sourceLineNo">109</span> txt = txt.replaceAll("^h", "A");<a name="line.109"></a> +<span class="sourceLineNo">110</span> txt = txt.replaceAll("h", "2");<a name="line.110"></a> +<span class="sourceLineNo">111</span> txt = txt.replaceAll("r3", "R3");<a name="line.111"></a> +<span class="sourceLineNo">112</span> txt = txt.replaceAll("r$", "3"); // 2.0 only<a name="line.112"></a> +<span class="sourceLineNo">113</span> txt = txt.replaceAll("r", "2");<a name="line.113"></a> +<span class="sourceLineNo">114</span> txt = txt.replaceAll("l3", "L3");<a name="line.114"></a> +<span class="sourceLineNo">115</span> txt = txt.replaceAll("l$", "3"); // 2.0 only<a name="line.115"></a> +<span class="sourceLineNo">116</span> txt = txt.replaceAll("l", "2");<a name="line.116"></a> +<span class="sourceLineNo">117</span><a name="line.117"></a> +<span class="sourceLineNo">118</span> // 5. Handle removals<a name="line.118"></a> +<span class="sourceLineNo">119</span> txt = txt.replaceAll("2", "");<a name="line.119"></a> +<span class="sourceLineNo">120</span> txt = txt.replaceAll("3$", "A"); // 2.0 only<a name="line.120"></a> +<span class="sourceLineNo">121</span> txt = txt.replaceAll("3", "");<a name="line.121"></a> +<span class="sourceLineNo">122</span><a name="line.122"></a> +<span class="sourceLineNo">123</span> // 6. put ten 1s on the end<a name="line.123"></a> +<span class="sourceLineNo">124</span> txt = txt + TEN_1;<a name="line.124"></a> +<span class="sourceLineNo">125</span><a name="line.125"></a> +<span class="sourceLineNo">126</span> // 7. take the first ten characters as the code<a name="line.126"></a> +<span class="sourceLineNo">127</span> return txt.substring(0, TEN_1.length());<a name="line.127"></a> +<span class="sourceLineNo">128</span> }<a name="line.128"></a> +<span class="sourceLineNo">129</span><a name="line.129"></a> +<span class="sourceLineNo">130</span>}<a name="line.130"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/ColognePhonetic.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/ColognePhonetic.html new file mode 100644 index 0000000000000000000000000000000000000000..6961ce496a9f234ce0e4812486f7697dbf5fcbff --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/ColognePhonetic.html @@ -0,0 +1,520 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.Locale;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>import org.apache.commons.codec.EncoderException;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import org.apache.commons.codec.StringEncoder;<a name="line.23"></a> +<span class="sourceLineNo">024</span><a name="line.24"></a> +<span class="sourceLineNo">025</span>/**<a name="line.25"></a> +<span class="sourceLineNo">026</span> * Encodes a string into a Cologne Phonetic value.<a name="line.26"></a> +<span class="sourceLineNo">027</span> * <p><a name="line.27"></a> +<span class="sourceLineNo">028</span> * Implements the <a href="http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik">K&ouml;lner Phonetik</a> (Cologne<a name="line.28"></a> +<span class="sourceLineNo">029</span> * Phonetic) algorithm issued by Hans Joachim Postel in 1969.<a name="line.29"></a> +<span class="sourceLineNo">030</span> * </p><a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * The <i>K&ouml;lner Phonetik</i> is a phonetic algorithm which is optimized for the German language. It is related to<a name="line.32"></a> +<span class="sourceLineNo">033</span> * the well-known soundex algorithm.<a name="line.33"></a> +<span class="sourceLineNo">034</span> * </p><a name="line.34"></a> +<span class="sourceLineNo">035</span> *<a name="line.35"></a> +<span class="sourceLineNo">036</span> * <h2>Algorithm</h2><a name="line.36"></a> +<span class="sourceLineNo">037</span> *<a name="line.37"></a> +<span class="sourceLineNo">038</span> * <ul><a name="line.38"></a> +<span class="sourceLineNo">039</span> *<a name="line.39"></a> +<span class="sourceLineNo">040</span> * <li><a name="line.40"></a> +<span class="sourceLineNo">041</span> * <h3>Step 1:</h3><a name="line.41"></a> +<span class="sourceLineNo">042</span> * After preprocessing (conversion to upper case, transcription of <a<a name="line.42"></a> +<span class="sourceLineNo">043</span> * href="http://en.wikipedia.org/wiki/Germanic_umlaut">germanic umlauts</a>, removal of non alphabetical characters) the<a name="line.43"></a> +<span class="sourceLineNo">044</span> * letters of the supplied text are replaced by their phonetic code according to the following table.<a name="line.44"></a> +<span class="sourceLineNo">045</span> * <table border="1"><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <caption style="caption-side: bottom"><small><i>(Source: <a<a name="line.46"></a> +<span class="sourceLineNo">047</span> * href="http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik#Buchstabencodes">Wikipedia (de): K&ouml;lner Phonetik --<a name="line.47"></a> +<span class="sourceLineNo">048</span> * Buchstabencodes</a>)</i></small></caption> <tbody><a name="line.48"></a> +<span class="sourceLineNo">049</span> * <tr><a name="line.49"></a> +<span class="sourceLineNo">050</span> * <th>Letter</th><a name="line.50"></a> +<span class="sourceLineNo">051</span> * <th>Context</th><a name="line.51"></a> +<span class="sourceLineNo">052</span> * <th>Code</th><a name="line.52"></a> +<span class="sourceLineNo">053</span> * </tr><a name="line.53"></a> +<span class="sourceLineNo">054</span> * <tr><a name="line.54"></a> +<span class="sourceLineNo">055</span> * <td>A, E, I, J, O, U, Y</td><a name="line.55"></a> +<span class="sourceLineNo">056</span> * <td></td><a name="line.56"></a> +<span class="sourceLineNo">057</span> * <td>0</td><a name="line.57"></a> +<span class="sourceLineNo">058</span> * </tr><a name="line.58"></a> +<span class="sourceLineNo">059</span> * <tr><a name="line.59"></a> +<span class="sourceLineNo">060</span> *<a name="line.60"></a> +<span class="sourceLineNo">061</span> * <td>H</td><a name="line.61"></a> +<span class="sourceLineNo">062</span> * <td></td><a name="line.62"></a> +<span class="sourceLineNo">063</span> * <td>-</td><a name="line.63"></a> +<span class="sourceLineNo">064</span> * </tr><a name="line.64"></a> +<span class="sourceLineNo">065</span> * <tr><a name="line.65"></a> +<span class="sourceLineNo">066</span> * <td>B</td><a name="line.66"></a> +<span class="sourceLineNo">067</span> * <td></td><a name="line.67"></a> +<span class="sourceLineNo">068</span> * <td rowspan="2">1</td><a name="line.68"></a> +<span class="sourceLineNo">069</span> * </tr><a name="line.69"></a> +<span class="sourceLineNo">070</span> * <tr><a name="line.70"></a> +<span class="sourceLineNo">071</span> * <td>P</td><a name="line.71"></a> +<span class="sourceLineNo">072</span> * <td>not before H</td><a name="line.72"></a> +<span class="sourceLineNo">073</span> *<a name="line.73"></a> +<span class="sourceLineNo">074</span> * </tr><a name="line.74"></a> +<span class="sourceLineNo">075</span> * <tr><a name="line.75"></a> +<span class="sourceLineNo">076</span> * <td>D, T</td><a name="line.76"></a> +<span class="sourceLineNo">077</span> * <td>not before C, S, Z</td><a name="line.77"></a> +<span class="sourceLineNo">078</span> * <td>2</td><a name="line.78"></a> +<span class="sourceLineNo">079</span> * </tr><a name="line.79"></a> +<span class="sourceLineNo">080</span> * <tr><a name="line.80"></a> +<span class="sourceLineNo">081</span> * <td>F, V, W</td><a name="line.81"></a> +<span class="sourceLineNo">082</span> * <td></td><a name="line.82"></a> +<span class="sourceLineNo">083</span> * <td rowspan="2">3</td><a name="line.83"></a> +<span class="sourceLineNo">084</span> * </tr><a name="line.84"></a> +<span class="sourceLineNo">085</span> * <tr><a name="line.85"></a> +<span class="sourceLineNo">086</span> *<a name="line.86"></a> +<span class="sourceLineNo">087</span> * <td>P</td><a name="line.87"></a> +<span class="sourceLineNo">088</span> * <td>before H</td><a name="line.88"></a> +<span class="sourceLineNo">089</span> * </tr><a name="line.89"></a> +<span class="sourceLineNo">090</span> * <tr><a name="line.90"></a> +<span class="sourceLineNo">091</span> * <td>G, K, Q</td><a name="line.91"></a> +<span class="sourceLineNo">092</span> * <td></td><a name="line.92"></a> +<span class="sourceLineNo">093</span> * <td rowspan="3">4</td><a name="line.93"></a> +<span class="sourceLineNo">094</span> * </tr><a name="line.94"></a> +<span class="sourceLineNo">095</span> * <tr><a name="line.95"></a> +<span class="sourceLineNo">096</span> * <td rowspan="2">C</td><a name="line.96"></a> +<span class="sourceLineNo">097</span> * <td>at onset before A, H, K, L, O, Q, R, U, X</td><a name="line.97"></a> +<span class="sourceLineNo">098</span> *<a name="line.98"></a> +<span class="sourceLineNo">099</span> * </tr><a name="line.99"></a> +<span class="sourceLineNo">100</span> * <tr><a name="line.100"></a> +<span class="sourceLineNo">101</span> * <td>before A, H, K, O, Q, U, X except after S, Z</td><a name="line.101"></a> +<span class="sourceLineNo">102</span> * </tr><a name="line.102"></a> +<span class="sourceLineNo">103</span> * <tr><a name="line.103"></a> +<span class="sourceLineNo">104</span> * <td>X</td><a name="line.104"></a> +<span class="sourceLineNo">105</span> * <td>not after C, K, Q</td><a name="line.105"></a> +<span class="sourceLineNo">106</span> * <td>48</td><a name="line.106"></a> +<span class="sourceLineNo">107</span> * </tr><a name="line.107"></a> +<span class="sourceLineNo">108</span> * <tr><a name="line.108"></a> +<span class="sourceLineNo">109</span> * <td>L</td><a name="line.109"></a> +<span class="sourceLineNo">110</span> * <td></td><a name="line.110"></a> +<span class="sourceLineNo">111</span> *<a name="line.111"></a> +<span class="sourceLineNo">112</span> * <td>5</td><a name="line.112"></a> +<span class="sourceLineNo">113</span> * </tr><a name="line.113"></a> +<span class="sourceLineNo">114</span> * <tr><a name="line.114"></a> +<span class="sourceLineNo">115</span> * <td>M, N</td><a name="line.115"></a> +<span class="sourceLineNo">116</span> * <td></td><a name="line.116"></a> +<span class="sourceLineNo">117</span> * <td>6</td><a name="line.117"></a> +<span class="sourceLineNo">118</span> * </tr><a name="line.118"></a> +<span class="sourceLineNo">119</span> * <tr><a name="line.119"></a> +<span class="sourceLineNo">120</span> * <td>R</td><a name="line.120"></a> +<span class="sourceLineNo">121</span> * <td></td><a name="line.121"></a> +<span class="sourceLineNo">122</span> * <td>7</td><a name="line.122"></a> +<span class="sourceLineNo">123</span> * </tr><a name="line.123"></a> +<span class="sourceLineNo">124</span> *<a name="line.124"></a> +<span class="sourceLineNo">125</span> * <tr><a name="line.125"></a> +<span class="sourceLineNo">126</span> * <td>S, Z</td><a name="line.126"></a> +<span class="sourceLineNo">127</span> * <td></td><a name="line.127"></a> +<span class="sourceLineNo">128</span> * <td rowspan="6">8</td><a name="line.128"></a> +<span class="sourceLineNo">129</span> * </tr><a name="line.129"></a> +<span class="sourceLineNo">130</span> * <tr><a name="line.130"></a> +<span class="sourceLineNo">131</span> * <td rowspan="3">C</td><a name="line.131"></a> +<span class="sourceLineNo">132</span> * <td>after S, Z</td><a name="line.132"></a> +<span class="sourceLineNo">133</span> * </tr><a name="line.133"></a> +<span class="sourceLineNo">134</span> * <tr><a name="line.134"></a> +<span class="sourceLineNo">135</span> * <td>at onset except before A, H, K, L, O, Q, R, U, X</td><a name="line.135"></a> +<span class="sourceLineNo">136</span> * </tr><a name="line.136"></a> +<span class="sourceLineNo">137</span> *<a name="line.137"></a> +<span class="sourceLineNo">138</span> * <tr><a name="line.138"></a> +<span class="sourceLineNo">139</span> * <td>not before A, H, K, O, Q, U, X</td><a name="line.139"></a> +<span class="sourceLineNo">140</span> * </tr><a name="line.140"></a> +<span class="sourceLineNo">141</span> * <tr><a name="line.141"></a> +<span class="sourceLineNo">142</span> * <td>D, T</td><a name="line.142"></a> +<span class="sourceLineNo">143</span> * <td>before C, S, Z</td><a name="line.143"></a> +<span class="sourceLineNo">144</span> * </tr><a name="line.144"></a> +<span class="sourceLineNo">145</span> * <tr><a name="line.145"></a> +<span class="sourceLineNo">146</span> * <td>X</td><a name="line.146"></a> +<span class="sourceLineNo">147</span> * <td>after C, K, Q</td><a name="line.147"></a> +<span class="sourceLineNo">148</span> * </tr><a name="line.148"></a> +<span class="sourceLineNo">149</span> * </tbody><a name="line.149"></a> +<span class="sourceLineNo">150</span> * </table><a name="line.150"></a> +<span class="sourceLineNo">151</span> *<a name="line.151"></a> +<span class="sourceLineNo">152</span> * <h4>Example:</h4><a name="line.152"></a> +<span class="sourceLineNo">153</span> *<a name="line.153"></a> +<span class="sourceLineNo">154</span> * {@code "M}&uuml;{@code ller-L}&uuml;<code>denscheidt"<a name="line.154"></a> +<span class="sourceLineNo">155</span> * =&gt; "MULLERLUDENSCHEIDT" =&gt; "6005507500206880022"</code><a name="line.155"></a> +<span class="sourceLineNo">156</span> *<a name="line.156"></a> +<span class="sourceLineNo">157</span> * </li><a name="line.157"></a> +<span class="sourceLineNo">158</span> *<a name="line.158"></a> +<span class="sourceLineNo">159</span> * <li><a name="line.159"></a> +<span class="sourceLineNo">160</span> * <h3>Step 2:</h3><a name="line.160"></a> +<span class="sourceLineNo">161</span> * Collapse of all multiple consecutive code digits.<a name="line.161"></a> +<span class="sourceLineNo">162</span> * <h4>Example:</h4><a name="line.162"></a> +<span class="sourceLineNo">163</span> * {@code "6005507500206880022" =&gt; "6050750206802"}</li><a name="line.163"></a> +<span class="sourceLineNo">164</span> *<a name="line.164"></a> +<span class="sourceLineNo">165</span> * <li><a name="line.165"></a> +<span class="sourceLineNo">166</span> * <h3>Step 3:</h3><a name="line.166"></a> +<span class="sourceLineNo">167</span> * Removal of all codes "0" except at the beginning. This means that two or more identical consecutive digits can occur<a name="line.167"></a> +<span class="sourceLineNo">168</span> * if they occur after removing the "0" digits.<a name="line.168"></a> +<span class="sourceLineNo">169</span> *<a name="line.169"></a> +<span class="sourceLineNo">170</span> * <h4>Example:</h4><a name="line.170"></a> +<span class="sourceLineNo">171</span> * {@code "6050750206802" =&gt; "65752682"}</li><a name="line.171"></a> +<span class="sourceLineNo">172</span> *<a name="line.172"></a> +<span class="sourceLineNo">173</span> * </ul><a name="line.173"></a> +<span class="sourceLineNo">174</span> *<a name="line.174"></a> +<span class="sourceLineNo">175</span> * <p><a name="line.175"></a> +<span class="sourceLineNo">176</span> * This class is thread-safe.<a name="line.176"></a> +<span class="sourceLineNo">177</span> * </p><a name="line.177"></a> +<span class="sourceLineNo">178</span> *<a name="line.178"></a> +<span class="sourceLineNo">179</span> * @see <a href="http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik">Wikipedia (de): K&ouml;lner Phonetik (in German)</a><a name="line.179"></a> +<span class="sourceLineNo">180</span> * @since 1.5<a name="line.180"></a> +<span class="sourceLineNo">181</span> */<a name="line.181"></a> +<span class="sourceLineNo">182</span>public class ColognePhonetic implements StringEncoder {<a name="line.182"></a> +<span class="sourceLineNo">183</span><a name="line.183"></a> +<span class="sourceLineNo">184</span> // Predefined char arrays for better performance and less GC load<a name="line.184"></a> +<span class="sourceLineNo">185</span> private static final char[] AEIJOUY = new char[] { 'A', 'E', 'I', 'J', 'O', 'U', 'Y' };<a name="line.185"></a> +<span class="sourceLineNo">186</span> private static final char[] CSZ = new char[] { 'C', 'S', 'Z' };<a name="line.186"></a> +<span class="sourceLineNo">187</span> private static final char[] FPVW = new char[] { 'F', 'P', 'V', 'W' };<a name="line.187"></a> +<span class="sourceLineNo">188</span> private static final char[] GKQ = new char[] { 'G', 'K', 'Q' };<a name="line.188"></a> +<span class="sourceLineNo">189</span> private static final char[] CKQ = new char[] { 'C', 'K', 'Q' };<a name="line.189"></a> +<span class="sourceLineNo">190</span> private static final char[] AHKLOQRUX = new char[] { 'A', 'H', 'K', 'L', 'O', 'Q', 'R', 'U', 'X' };<a name="line.190"></a> +<span class="sourceLineNo">191</span> private static final char[] SZ = new char[] { 'S', 'Z' };<a name="line.191"></a> +<span class="sourceLineNo">192</span> private static final char[] AHKOQUX = new char[] { 'A', 'H', 'K', 'O', 'Q', 'U', 'X' };<a name="line.192"></a> +<span class="sourceLineNo">193</span> private static final char[] DTX = new char[] { 'D', 'T', 'X' };<a name="line.193"></a> +<span class="sourceLineNo">194</span><a name="line.194"></a> +<span class="sourceLineNo">195</span> private static final char CHAR_IGNORE = '-'; // is this character to be ignored?<a name="line.195"></a> +<span class="sourceLineNo">196</span><a name="line.196"></a> +<span class="sourceLineNo">197</span> /**<a name="line.197"></a> +<span class="sourceLineNo">198</span> * This class is not thread-safe; the field {@link #length} is mutable.<a name="line.198"></a> +<span class="sourceLineNo">199</span> * However, it is not shared between threads, as it is constructed on demand<a name="line.199"></a> +<span class="sourceLineNo">200</span> * by the method {@link ColognePhonetic#colognePhonetic(String)}<a name="line.200"></a> +<span class="sourceLineNo">201</span> */<a name="line.201"></a> +<span class="sourceLineNo">202</span> private abstract class CologneBuffer {<a name="line.202"></a> +<span class="sourceLineNo">203</span><a name="line.203"></a> +<span class="sourceLineNo">204</span> protected final char[] data;<a name="line.204"></a> +<span class="sourceLineNo">205</span><a name="line.205"></a> +<span class="sourceLineNo">206</span> protected int length = 0;<a name="line.206"></a> +<span class="sourceLineNo">207</span><a name="line.207"></a> +<span class="sourceLineNo">208</span> public CologneBuffer(final char[] data) {<a name="line.208"></a> +<span class="sourceLineNo">209</span> this.data = data;<a name="line.209"></a> +<span class="sourceLineNo">210</span> this.length = data.length;<a name="line.210"></a> +<span class="sourceLineNo">211</span> }<a name="line.211"></a> +<span class="sourceLineNo">212</span><a name="line.212"></a> +<span class="sourceLineNo">213</span> public CologneBuffer(final int buffSize) {<a name="line.213"></a> +<span class="sourceLineNo">214</span> this.data = new char[buffSize];<a name="line.214"></a> +<span class="sourceLineNo">215</span> this.length = 0;<a name="line.215"></a> +<span class="sourceLineNo">216</span> }<a name="line.216"></a> +<span class="sourceLineNo">217</span><a name="line.217"></a> +<span class="sourceLineNo">218</span> protected abstract char[] copyData(int start, final int length);<a name="line.218"></a> +<span class="sourceLineNo">219</span><a name="line.219"></a> +<span class="sourceLineNo">220</span> public int length() {<a name="line.220"></a> +<span class="sourceLineNo">221</span> return length;<a name="line.221"></a> +<span class="sourceLineNo">222</span> }<a name="line.222"></a> +<span class="sourceLineNo">223</span><a name="line.223"></a> +<span class="sourceLineNo">224</span> @Override<a name="line.224"></a> +<span class="sourceLineNo">225</span> public String toString() {<a name="line.225"></a> +<span class="sourceLineNo">226</span> return new String(copyData(0, length));<a name="line.226"></a> +<span class="sourceLineNo">227</span> }<a name="line.227"></a> +<span class="sourceLineNo">228</span> }<a name="line.228"></a> +<span class="sourceLineNo">229</span><a name="line.229"></a> +<span class="sourceLineNo">230</span> private class CologneOutputBuffer extends CologneBuffer {<a name="line.230"></a> +<span class="sourceLineNo">231</span><a name="line.231"></a> +<span class="sourceLineNo">232</span> private char lastCode;<a name="line.232"></a> +<span class="sourceLineNo">233</span><a name="line.233"></a> +<span class="sourceLineNo">234</span> public CologneOutputBuffer(final int buffSize) {<a name="line.234"></a> +<span class="sourceLineNo">235</span> super(buffSize);<a name="line.235"></a> +<span class="sourceLineNo">236</span> lastCode = '/'; // impossible value<a name="line.236"></a> +<span class="sourceLineNo">237</span> }<a name="line.237"></a> +<span class="sourceLineNo">238</span><a name="line.238"></a> +<span class="sourceLineNo">239</span> /**<a name="line.239"></a> +<span class="sourceLineNo">240</span> * Stores the next code in the output buffer, keeping track of the previous code.<a name="line.240"></a> +<span class="sourceLineNo">241</span> * '0' is only stored if it is the first entry.<a name="line.241"></a> +<span class="sourceLineNo">242</span> * Ignored chars are never stored.<a name="line.242"></a> +<span class="sourceLineNo">243</span> * If the code is the same as the last code (whether stored or not) it is not stored.<a name="line.243"></a> +<span class="sourceLineNo">244</span> *<a name="line.244"></a> +<span class="sourceLineNo">245</span> * @param code the code to store.<a name="line.245"></a> +<span class="sourceLineNo">246</span> */<a name="line.246"></a> +<span class="sourceLineNo">247</span> public void put(final char code) {<a name="line.247"></a> +<span class="sourceLineNo">248</span> if (code != CHAR_IGNORE && lastCode != code && (code != '0' || length == 0)) {<a name="line.248"></a> +<span class="sourceLineNo">249</span> data[length] = code;<a name="line.249"></a> +<span class="sourceLineNo">250</span> length++;<a name="line.250"></a> +<span class="sourceLineNo">251</span> }<a name="line.251"></a> +<span class="sourceLineNo">252</span> lastCode = code;<a name="line.252"></a> +<span class="sourceLineNo">253</span> }<a name="line.253"></a> +<span class="sourceLineNo">254</span><a name="line.254"></a> +<span class="sourceLineNo">255</span> @Override<a name="line.255"></a> +<span class="sourceLineNo">256</span> protected char[] copyData(final int start, final int length) {<a name="line.256"></a> +<span class="sourceLineNo">257</span> final char[] newData = new char[length];<a name="line.257"></a> +<span class="sourceLineNo">258</span> System.arraycopy(data, start, newData, 0, length);<a name="line.258"></a> +<span class="sourceLineNo">259</span> return newData;<a name="line.259"></a> +<span class="sourceLineNo">260</span> }<a name="line.260"></a> +<span class="sourceLineNo">261</span> }<a name="line.261"></a> +<span class="sourceLineNo">262</span><a name="line.262"></a> +<span class="sourceLineNo">263</span> private class CologneInputBuffer extends CologneBuffer {<a name="line.263"></a> +<span class="sourceLineNo">264</span><a name="line.264"></a> +<span class="sourceLineNo">265</span> public CologneInputBuffer(final char[] data) {<a name="line.265"></a> +<span class="sourceLineNo">266</span> super(data);<a name="line.266"></a> +<span class="sourceLineNo">267</span> }<a name="line.267"></a> +<span class="sourceLineNo">268</span><a name="line.268"></a> +<span class="sourceLineNo">269</span> @Override<a name="line.269"></a> +<span class="sourceLineNo">270</span> protected char[] copyData(final int start, final int length) {<a name="line.270"></a> +<span class="sourceLineNo">271</span> final char[] newData = new char[length];<a name="line.271"></a> +<span class="sourceLineNo">272</span> System.arraycopy(data, data.length - this.length + start, newData, 0, length);<a name="line.272"></a> +<span class="sourceLineNo">273</span> return newData;<a name="line.273"></a> +<span class="sourceLineNo">274</span> }<a name="line.274"></a> +<span class="sourceLineNo">275</span><a name="line.275"></a> +<span class="sourceLineNo">276</span> public char getNextChar() {<a name="line.276"></a> +<span class="sourceLineNo">277</span> return data[getNextPos()];<a name="line.277"></a> +<span class="sourceLineNo">278</span> }<a name="line.278"></a> +<span class="sourceLineNo">279</span><a name="line.279"></a> +<span class="sourceLineNo">280</span> protected int getNextPos() {<a name="line.280"></a> +<span class="sourceLineNo">281</span> return data.length - length;<a name="line.281"></a> +<span class="sourceLineNo">282</span> }<a name="line.282"></a> +<span class="sourceLineNo">283</span><a name="line.283"></a> +<span class="sourceLineNo">284</span> public char removeNext() {<a name="line.284"></a> +<span class="sourceLineNo">285</span> final char ch = getNextChar();<a name="line.285"></a> +<span class="sourceLineNo">286</span> length--;<a name="line.286"></a> +<span class="sourceLineNo">287</span> return ch;<a name="line.287"></a> +<span class="sourceLineNo">288</span> }<a name="line.288"></a> +<span class="sourceLineNo">289</span> }<a name="line.289"></a> +<span class="sourceLineNo">290</span><a name="line.290"></a> +<span class="sourceLineNo">291</span> /*<a name="line.291"></a> +<span class="sourceLineNo">292</span> * Returns whether the array contains the key, or not.<a name="line.292"></a> +<span class="sourceLineNo">293</span> */<a name="line.293"></a> +<span class="sourceLineNo">294</span> private static boolean arrayContains(final char[] arr, final char key) {<a name="line.294"></a> +<span class="sourceLineNo">295</span> for (final char element : arr) {<a name="line.295"></a> +<span class="sourceLineNo">296</span> if (element == key) {<a name="line.296"></a> +<span class="sourceLineNo">297</span> return true;<a name="line.297"></a> +<span class="sourceLineNo">298</span> }<a name="line.298"></a> +<span class="sourceLineNo">299</span> }<a name="line.299"></a> +<span class="sourceLineNo">300</span> return false;<a name="line.300"></a> +<span class="sourceLineNo">301</span> }<a name="line.301"></a> +<span class="sourceLineNo">302</span><a name="line.302"></a> +<span class="sourceLineNo">303</span> /**<a name="line.303"></a> +<span class="sourceLineNo">304</span> * <p><a name="line.304"></a> +<span class="sourceLineNo">305</span> * Implements the <i>K&ouml;lner Phonetik</i> algorithm.<a name="line.305"></a> +<span class="sourceLineNo">306</span> * </p><a name="line.306"></a> +<span class="sourceLineNo">307</span> * <p><a name="line.307"></a> +<span class="sourceLineNo">308</span> * In contrast to the initial description of the algorithm, this implementation does the encoding in one pass.<a name="line.308"></a> +<span class="sourceLineNo">309</span> * </p><a name="line.309"></a> +<span class="sourceLineNo">310</span> *<a name="line.310"></a> +<span class="sourceLineNo">311</span> * @param text The source text to encode<a name="line.311"></a> +<span class="sourceLineNo">312</span> * @return the corresponding encoding according to the <i>K&ouml;lner Phonetik</i> algorithm<a name="line.312"></a> +<span class="sourceLineNo">313</span> */<a name="line.313"></a> +<span class="sourceLineNo">314</span> public String colognePhonetic(final String text) {<a name="line.314"></a> +<span class="sourceLineNo">315</span> if (text == null) {<a name="line.315"></a> +<span class="sourceLineNo">316</span> return null;<a name="line.316"></a> +<span class="sourceLineNo">317</span> }<a name="line.317"></a> +<span class="sourceLineNo">318</span><a name="line.318"></a> +<span class="sourceLineNo">319</span> final CologneInputBuffer input = new CologneInputBuffer(preprocess(text));<a name="line.319"></a> +<span class="sourceLineNo">320</span> final CologneOutputBuffer output = new CologneOutputBuffer(input.length() * 2);<a name="line.320"></a> +<span class="sourceLineNo">321</span><a name="line.321"></a> +<span class="sourceLineNo">322</span> char nextChar;<a name="line.322"></a> +<span class="sourceLineNo">323</span><a name="line.323"></a> +<span class="sourceLineNo">324</span> char lastChar = CHAR_IGNORE;<a name="line.324"></a> +<span class="sourceLineNo">325</span> char chr;<a name="line.325"></a> +<span class="sourceLineNo">326</span><a name="line.326"></a> +<span class="sourceLineNo">327</span> while (input.length() > 0) {<a name="line.327"></a> +<span class="sourceLineNo">328</span> chr = input.removeNext();<a name="line.328"></a> +<span class="sourceLineNo">329</span><a name="line.329"></a> +<span class="sourceLineNo">330</span> if (input.length() > 0) {<a name="line.330"></a> +<span class="sourceLineNo">331</span> nextChar = input.getNextChar();<a name="line.331"></a> +<span class="sourceLineNo">332</span> } else {<a name="line.332"></a> +<span class="sourceLineNo">333</span> nextChar = CHAR_IGNORE;<a name="line.333"></a> +<span class="sourceLineNo">334</span> }<a name="line.334"></a> +<span class="sourceLineNo">335</span><a name="line.335"></a> +<span class="sourceLineNo">336</span> if (chr < 'A' || chr > 'Z') {<a name="line.336"></a> +<span class="sourceLineNo">337</span> continue; // ignore unwanted characters<a name="line.337"></a> +<span class="sourceLineNo">338</span> }<a name="line.338"></a> +<span class="sourceLineNo">339</span><a name="line.339"></a> +<span class="sourceLineNo">340</span> if (arrayContains(AEIJOUY, chr)) {<a name="line.340"></a> +<span class="sourceLineNo">341</span> output.put('0');<a name="line.341"></a> +<span class="sourceLineNo">342</span> } else if (chr == 'B' || (chr == 'P' && nextChar != 'H')) {<a name="line.342"></a> +<span class="sourceLineNo">343</span> output.put('1');<a name="line.343"></a> +<span class="sourceLineNo">344</span> } else if ((chr == 'D' || chr == 'T') && !arrayContains(CSZ, nextChar)) {<a name="line.344"></a> +<span class="sourceLineNo">345</span> output.put('2');<a name="line.345"></a> +<span class="sourceLineNo">346</span> } else if (arrayContains(FPVW, chr)) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> output.put('3');<a name="line.347"></a> +<span class="sourceLineNo">348</span> } else if (arrayContains(GKQ, chr)) {<a name="line.348"></a> +<span class="sourceLineNo">349</span> output.put('4');<a name="line.349"></a> +<span class="sourceLineNo">350</span> } else if (chr == 'X' && !arrayContains(CKQ, lastChar)) {<a name="line.350"></a> +<span class="sourceLineNo">351</span> output.put('4');<a name="line.351"></a> +<span class="sourceLineNo">352</span> output.put('8');<a name="line.352"></a> +<span class="sourceLineNo">353</span> } else if (chr == 'S' || chr == 'Z') {<a name="line.353"></a> +<span class="sourceLineNo">354</span> output.put('8');<a name="line.354"></a> +<span class="sourceLineNo">355</span> } else if (chr == 'C') {<a name="line.355"></a> +<span class="sourceLineNo">356</span> if (output.length() == 0) {<a name="line.356"></a> +<span class="sourceLineNo">357</span> if (arrayContains(AHKLOQRUX, nextChar)) {<a name="line.357"></a> +<span class="sourceLineNo">358</span> output.put('4');<a name="line.358"></a> +<span class="sourceLineNo">359</span> } else {<a name="line.359"></a> +<span class="sourceLineNo">360</span> output.put('8');<a name="line.360"></a> +<span class="sourceLineNo">361</span> }<a name="line.361"></a> +<span class="sourceLineNo">362</span> } else {<a name="line.362"></a> +<span class="sourceLineNo">363</span> if (arrayContains(SZ, lastChar) || !arrayContains(AHKOQUX, nextChar)) {<a name="line.363"></a> +<span class="sourceLineNo">364</span> output.put('8');<a name="line.364"></a> +<span class="sourceLineNo">365</span> } else {<a name="line.365"></a> +<span class="sourceLineNo">366</span> output.put('4');<a name="line.366"></a> +<span class="sourceLineNo">367</span> }<a name="line.367"></a> +<span class="sourceLineNo">368</span> }<a name="line.368"></a> +<span class="sourceLineNo">369</span> } else if (arrayContains(DTX, chr)) {<a name="line.369"></a> +<span class="sourceLineNo">370</span> output.put('8');<a name="line.370"></a> +<span class="sourceLineNo">371</span> } else if (chr == 'R') {<a name="line.371"></a> +<span class="sourceLineNo">372</span> output.put('7');<a name="line.372"></a> +<span class="sourceLineNo">373</span> } else if (chr == 'L') {<a name="line.373"></a> +<span class="sourceLineNo">374</span> output.put('5');<a name="line.374"></a> +<span class="sourceLineNo">375</span> } else if (chr == 'M' || chr == 'N') {<a name="line.375"></a> +<span class="sourceLineNo">376</span> output.put('6');<a name="line.376"></a> +<span class="sourceLineNo">377</span> } else if (chr == 'H') {<a name="line.377"></a> +<span class="sourceLineNo">378</span> output.put(CHAR_IGNORE); // needed by put<a name="line.378"></a> +<span class="sourceLineNo">379</span> } else {<a name="line.379"></a> +<span class="sourceLineNo">380</span> // ignored; should not happen<a name="line.380"></a> +<span class="sourceLineNo">381</span> }<a name="line.381"></a> +<span class="sourceLineNo">382</span><a name="line.382"></a> +<span class="sourceLineNo">383</span> lastChar = chr;<a name="line.383"></a> +<span class="sourceLineNo">384</span> }<a name="line.384"></a> +<span class="sourceLineNo">385</span> return output.toString();<a name="line.385"></a> +<span class="sourceLineNo">386</span> }<a name="line.386"></a> +<span class="sourceLineNo">387</span><a name="line.387"></a> +<span class="sourceLineNo">388</span> @Override<a name="line.388"></a> +<span class="sourceLineNo">389</span> public Object encode(final Object object) throws EncoderException {<a name="line.389"></a> +<span class="sourceLineNo">390</span> if (!(object instanceof String)) {<a name="line.390"></a> +<span class="sourceLineNo">391</span> throw new EncoderException("This method's parameter was expected to be of the type " +<a name="line.391"></a> +<span class="sourceLineNo">392</span> String.class.getName() +<a name="line.392"></a> +<span class="sourceLineNo">393</span> ". But actually it was of the type " +<a name="line.393"></a> +<span class="sourceLineNo">394</span> object.getClass().getName() +<a name="line.394"></a> +<span class="sourceLineNo">395</span> ".");<a name="line.395"></a> +<span class="sourceLineNo">396</span> }<a name="line.396"></a> +<span class="sourceLineNo">397</span> return encode((String) object);<a name="line.397"></a> +<span class="sourceLineNo">398</span> }<a name="line.398"></a> +<span class="sourceLineNo">399</span><a name="line.399"></a> +<span class="sourceLineNo">400</span> @Override<a name="line.400"></a> +<span class="sourceLineNo">401</span> public String encode(final String text) {<a name="line.401"></a> +<span class="sourceLineNo">402</span> return colognePhonetic(text);<a name="line.402"></a> +<span class="sourceLineNo">403</span> }<a name="line.403"></a> +<span class="sourceLineNo">404</span><a name="line.404"></a> +<span class="sourceLineNo">405</span> /**<a name="line.405"></a> +<span class="sourceLineNo">406</span> * Compares the first encoded string to the second encoded string.<a name="line.406"></a> +<span class="sourceLineNo">407</span> *<a name="line.407"></a> +<span class="sourceLineNo">408</span> * @param text1 source text to encode before testing for equality.<a name="line.408"></a> +<span class="sourceLineNo">409</span> * @param text2 source text to encode before testing for equality.<a name="line.409"></a> +<span class="sourceLineNo">410</span> * @return {@code true} if the encoding the first string equals the encoding of the second string, {@code false}<a name="line.410"></a> +<span class="sourceLineNo">411</span> * otherwise<a name="line.411"></a> +<span class="sourceLineNo">412</span> */<a name="line.412"></a> +<span class="sourceLineNo">413</span> public boolean isEncodeEqual(final String text1, final String text2) {<a name="line.413"></a> +<span class="sourceLineNo">414</span> return colognePhonetic(text1).equals(colognePhonetic(text2));<a name="line.414"></a> +<span class="sourceLineNo">415</span> }<a name="line.415"></a> +<span class="sourceLineNo">416</span><a name="line.416"></a> +<span class="sourceLineNo">417</span> /**<a name="line.417"></a> +<span class="sourceLineNo">418</span> * Converts the string to upper case and replaces Germanic umlaut characters<a name="line.418"></a> +<span class="sourceLineNo">419</span> * The following characters are mapped:<a name="line.419"></a> +<span class="sourceLineNo">420</span> * <ul><a name="line.420"></a> +<span class="sourceLineNo">421</span> * <li>capital A, umlaut mark</li><a name="line.421"></a> +<span class="sourceLineNo">422</span> * <li>capital U, umlaut mark</li><a name="line.422"></a> +<span class="sourceLineNo">423</span> * <li>capital O, umlaut mark</li><a name="line.423"></a> +<span class="sourceLineNo">424</span> * <li>small sharp s, German</li><a name="line.424"></a> +<span class="sourceLineNo">425</span> * </ul><a name="line.425"></a> +<span class="sourceLineNo">426</span> */<a name="line.426"></a> +<span class="sourceLineNo">427</span> private char[] preprocess(final String text) {<a name="line.427"></a> +<span class="sourceLineNo">428</span> // This converts German small sharp s (Eszett) to SS<a name="line.428"></a> +<span class="sourceLineNo">429</span> final char[] chrs = text.toUpperCase(Locale.GERMAN).toCharArray();<a name="line.429"></a> +<span class="sourceLineNo">430</span><a name="line.430"></a> +<span class="sourceLineNo">431</span> for (int index = 0; index < chrs.length; index++) {<a name="line.431"></a> +<span class="sourceLineNo">432</span> switch (chrs[index]) {<a name="line.432"></a> +<span class="sourceLineNo">433</span> case '\u00C4': // capital A, umlaut mark<a name="line.433"></a> +<span class="sourceLineNo">434</span> chrs[index] = 'A';<a name="line.434"></a> +<span class="sourceLineNo">435</span> break;<a name="line.435"></a> +<span class="sourceLineNo">436</span> case '\u00DC': // capital U, umlaut mark<a name="line.436"></a> +<span class="sourceLineNo">437</span> chrs[index] = 'U';<a name="line.437"></a> +<span class="sourceLineNo">438</span> break;<a name="line.438"></a> +<span class="sourceLineNo">439</span> case '\u00D6': // capital O, umlaut mark<a name="line.439"></a> +<span class="sourceLineNo">440</span> chrs[index] = 'O';<a name="line.440"></a> +<span class="sourceLineNo">441</span> break;<a name="line.441"></a> +<span class="sourceLineNo">442</span> default:<a name="line.442"></a> +<span class="sourceLineNo">443</span> break;<a name="line.443"></a> +<span class="sourceLineNo">444</span> }<a name="line.444"></a> +<span class="sourceLineNo">445</span> }<a name="line.445"></a> +<span class="sourceLineNo">446</span> return chrs;<a name="line.446"></a> +<span class="sourceLineNo">447</span> }<a name="line.447"></a> +<span class="sourceLineNo">448</span>}<a name="line.448"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/DaitchMokotoffSoundex.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/DaitchMokotoffSoundex.html new file mode 100644 index 0000000000000000000000000000000000000000..3a3205233c6b62d4f1f3dc36d7072fbf44068999 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/DaitchMokotoffSoundex.html @@ -0,0 +1,624 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>package org.apache.commons.codec.language;<a name="line.17"></a> +<span class="sourceLineNo">018</span><a name="line.18"></a> +<span class="sourceLineNo">019</span>import java.util.ArrayList;<a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.Arrays;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.Collections;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.Comparator;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.HashMap;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.LinkedHashSet;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.List;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.Map;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import java.util.Scanner;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import java.util.Set;<a name="line.28"></a> +<span class="sourceLineNo">029</span><a name="line.29"></a> +<span class="sourceLineNo">030</span>import org.apache.commons.codec.CharEncoding;<a name="line.30"></a> +<span class="sourceLineNo">031</span>import org.apache.commons.codec.EncoderException;<a name="line.31"></a> +<span class="sourceLineNo">032</span>import org.apache.commons.codec.Resources;<a name="line.32"></a> +<span class="sourceLineNo">033</span>import org.apache.commons.codec.StringEncoder;<a name="line.33"></a> +<span class="sourceLineNo">034</span><a name="line.34"></a> +<span class="sourceLineNo">035</span>/**<a name="line.35"></a> +<span class="sourceLineNo">036</span> * Encodes a string into a Daitch-Mokotoff Soundex value.<a name="line.36"></a> +<span class="sourceLineNo">037</span> * <p><a name="line.37"></a> +<span class="sourceLineNo">038</span> * The Daitch-Mokotoff Soundex algorithm is a refinement of the Russel and American Soundex algorithms, yielding greater<a name="line.38"></a> +<span class="sourceLineNo">039</span> * accuracy in matching especially Slavish and Yiddish surnames with similar pronunciation but differences in spelling.<a name="line.39"></a> +<span class="sourceLineNo">040</span> * </p><a name="line.40"></a> +<span class="sourceLineNo">041</span> * <p><a name="line.41"></a> +<span class="sourceLineNo">042</span> * The main differences compared to the other soundex variants are:<a name="line.42"></a> +<span class="sourceLineNo">043</span> * </p><a name="line.43"></a> +<span class="sourceLineNo">044</span> * <ul><a name="line.44"></a> +<span class="sourceLineNo">045</span> * <li>coded names are 6 digits long<a name="line.45"></a> +<span class="sourceLineNo">046</span> * <li>the initial character of the name is coded<a name="line.46"></a> +<span class="sourceLineNo">047</span> * <li>rules to encoded multi-character n-grams<a name="line.47"></a> +<span class="sourceLineNo">048</span> * <li>multiple possible encodings for the same name (branching)<a name="line.48"></a> +<span class="sourceLineNo">049</span> * </ul><a name="line.49"></a> +<span class="sourceLineNo">050</span> * <p><a name="line.50"></a> +<span class="sourceLineNo">051</span> * This implementation supports branching, depending on the used method:<a name="line.51"></a> +<span class="sourceLineNo">052</span> * <ul><a name="line.52"></a> +<span class="sourceLineNo">053</span> * <li>{@link #encode(String)} - branching disabled, only the first code will be returned<a name="line.53"></a> +<span class="sourceLineNo">054</span> * <li>{@link #soundex(String)} - branching enabled, all codes will be returned, separated by '|'<a name="line.54"></a> +<span class="sourceLineNo">055</span> * </ul><a name="line.55"></a> +<span class="sourceLineNo">056</span> * <p><a name="line.56"></a> +<span class="sourceLineNo">057</span> * Note: this implementation has additional branching rules compared to the original description of the algorithm. The<a name="line.57"></a> +<span class="sourceLineNo">058</span> * rules can be customized by overriding the default rules contained in the resource file<a name="line.58"></a> +<span class="sourceLineNo">059</span> * {@code org/apache/commons/codec/language/dmrules.txt}.<a name="line.59"></a> +<span class="sourceLineNo">060</span> * </p><a name="line.60"></a> +<span class="sourceLineNo">061</span> * <p><a name="line.61"></a> +<span class="sourceLineNo">062</span> * This class is thread-safe.<a name="line.62"></a> +<span class="sourceLineNo">063</span> * </p><a name="line.63"></a> +<span class="sourceLineNo">064</span> *<a name="line.64"></a> +<span class="sourceLineNo">065</span> * @see Soundex<a name="line.65"></a> +<span class="sourceLineNo">066</span> * @see <a href="http://en.wikipedia.org/wiki/Daitch%E2%80%93Mokotoff_Soundex"> Wikipedia - Daitch-Mokotoff Soundex</a><a name="line.66"></a> +<span class="sourceLineNo">067</span> * @see <a href="http://www.avotaynu.com/soundex.htm">Avotaynu - Soundexing and Genealogy</a><a name="line.67"></a> +<span class="sourceLineNo">068</span> *<a name="line.68"></a> +<span class="sourceLineNo">069</span> * @since 1.10<a name="line.69"></a> +<span class="sourceLineNo">070</span> */<a name="line.70"></a> +<span class="sourceLineNo">071</span>public class DaitchMokotoffSoundex implements StringEncoder {<a name="line.71"></a> +<span class="sourceLineNo">072</span><a name="line.72"></a> +<span class="sourceLineNo">073</span> /**<a name="line.73"></a> +<span class="sourceLineNo">074</span> * Inner class representing a branch during DM soundex encoding.<a name="line.74"></a> +<span class="sourceLineNo">075</span> */<a name="line.75"></a> +<span class="sourceLineNo">076</span> private static final class Branch {<a name="line.76"></a> +<span class="sourceLineNo">077</span> private final StringBuilder builder;<a name="line.77"></a> +<span class="sourceLineNo">078</span> private String cachedString;<a name="line.78"></a> +<span class="sourceLineNo">079</span> private String lastReplacement;<a name="line.79"></a> +<span class="sourceLineNo">080</span><a name="line.80"></a> +<span class="sourceLineNo">081</span> private Branch() {<a name="line.81"></a> +<span class="sourceLineNo">082</span> builder = new StringBuilder();<a name="line.82"></a> +<span class="sourceLineNo">083</span> lastReplacement = null;<a name="line.83"></a> +<span class="sourceLineNo">084</span> cachedString = null;<a name="line.84"></a> +<span class="sourceLineNo">085</span> }<a name="line.85"></a> +<span class="sourceLineNo">086</span><a name="line.86"></a> +<span class="sourceLineNo">087</span> /**<a name="line.87"></a> +<span class="sourceLineNo">088</span> * Creates a new branch, identical to this branch.<a name="line.88"></a> +<span class="sourceLineNo">089</span> *<a name="line.89"></a> +<span class="sourceLineNo">090</span> * @return a new, identical branch<a name="line.90"></a> +<span class="sourceLineNo">091</span> */<a name="line.91"></a> +<span class="sourceLineNo">092</span> public Branch createBranch() {<a name="line.92"></a> +<span class="sourceLineNo">093</span> final Branch branch = new Branch();<a name="line.93"></a> +<span class="sourceLineNo">094</span> branch.builder.append(toString());<a name="line.94"></a> +<span class="sourceLineNo">095</span> branch.lastReplacement = this.lastReplacement;<a name="line.95"></a> +<span class="sourceLineNo">096</span> return branch;<a name="line.96"></a> +<span class="sourceLineNo">097</span> }<a name="line.97"></a> +<span class="sourceLineNo">098</span><a name="line.98"></a> +<span class="sourceLineNo">099</span> @Override<a name="line.99"></a> +<span class="sourceLineNo">100</span> public boolean equals(final Object other) {<a name="line.100"></a> +<span class="sourceLineNo">101</span> if (this == other) {<a name="line.101"></a> +<span class="sourceLineNo">102</span> return true;<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span> if (!(other instanceof Branch)) {<a name="line.104"></a> +<span class="sourceLineNo">105</span> return false;<a name="line.105"></a> +<span class="sourceLineNo">106</span> }<a name="line.106"></a> +<span class="sourceLineNo">107</span><a name="line.107"></a> +<span class="sourceLineNo">108</span> return toString().equals(((Branch) other).toString());<a name="line.108"></a> +<span class="sourceLineNo">109</span> }<a name="line.109"></a> +<span class="sourceLineNo">110</span><a name="line.110"></a> +<span class="sourceLineNo">111</span> /**<a name="line.111"></a> +<span class="sourceLineNo">112</span> * Finish this branch by appending '0's until the maximum code length has been reached.<a name="line.112"></a> +<span class="sourceLineNo">113</span> */<a name="line.113"></a> +<span class="sourceLineNo">114</span> public void finish() {<a name="line.114"></a> +<span class="sourceLineNo">115</span> while (builder.length() < MAX_LENGTH) {<a name="line.115"></a> +<span class="sourceLineNo">116</span> builder.append('0');<a name="line.116"></a> +<span class="sourceLineNo">117</span> cachedString = null;<a name="line.117"></a> +<span class="sourceLineNo">118</span> }<a name="line.118"></a> +<span class="sourceLineNo">119</span> }<a name="line.119"></a> +<span class="sourceLineNo">120</span><a name="line.120"></a> +<span class="sourceLineNo">121</span> @Override<a name="line.121"></a> +<span class="sourceLineNo">122</span> public int hashCode() {<a name="line.122"></a> +<span class="sourceLineNo">123</span> return toString().hashCode();<a name="line.123"></a> +<span class="sourceLineNo">124</span> }<a name="line.124"></a> +<span class="sourceLineNo">125</span><a name="line.125"></a> +<span class="sourceLineNo">126</span> /**<a name="line.126"></a> +<span class="sourceLineNo">127</span> * Process the next replacement to be added to this branch.<a name="line.127"></a> +<span class="sourceLineNo">128</span> *<a name="line.128"></a> +<span class="sourceLineNo">129</span> * @param replacement<a name="line.129"></a> +<span class="sourceLineNo">130</span> * the next replacement to append<a name="line.130"></a> +<span class="sourceLineNo">131</span> * @param forceAppend<a name="line.131"></a> +<span class="sourceLineNo">132</span> * indicates if the default processing shall be overridden<a name="line.132"></a> +<span class="sourceLineNo">133</span> */<a name="line.133"></a> +<span class="sourceLineNo">134</span> public void processNextReplacement(final String replacement, final boolean forceAppend) {<a name="line.134"></a> +<span class="sourceLineNo">135</span> final boolean append = lastReplacement == null || !lastReplacement.endsWith(replacement) || forceAppend;<a name="line.135"></a> +<span class="sourceLineNo">136</span><a name="line.136"></a> +<span class="sourceLineNo">137</span> if (append && builder.length() < MAX_LENGTH) {<a name="line.137"></a> +<span class="sourceLineNo">138</span> builder.append(replacement);<a name="line.138"></a> +<span class="sourceLineNo">139</span> // remove all characters after the maximum length<a name="line.139"></a> +<span class="sourceLineNo">140</span> if (builder.length() > MAX_LENGTH) {<a name="line.140"></a> +<span class="sourceLineNo">141</span> builder.delete(MAX_LENGTH, builder.length());<a name="line.141"></a> +<span class="sourceLineNo">142</span> }<a name="line.142"></a> +<span class="sourceLineNo">143</span> cachedString = null;<a name="line.143"></a> +<span class="sourceLineNo">144</span> }<a name="line.144"></a> +<span class="sourceLineNo">145</span><a name="line.145"></a> +<span class="sourceLineNo">146</span> lastReplacement = replacement;<a name="line.146"></a> +<span class="sourceLineNo">147</span> }<a name="line.147"></a> +<span class="sourceLineNo">148</span><a name="line.148"></a> +<span class="sourceLineNo">149</span> @Override<a name="line.149"></a> +<span class="sourceLineNo">150</span> public String toString() {<a name="line.150"></a> +<span class="sourceLineNo">151</span> if (cachedString == null) {<a name="line.151"></a> +<span class="sourceLineNo">152</span> cachedString = builder.toString();<a name="line.152"></a> +<span class="sourceLineNo">153</span> }<a name="line.153"></a> +<span class="sourceLineNo">154</span> return cachedString;<a name="line.154"></a> +<span class="sourceLineNo">155</span> }<a name="line.155"></a> +<span class="sourceLineNo">156</span> }<a name="line.156"></a> +<span class="sourceLineNo">157</span><a name="line.157"></a> +<span class="sourceLineNo">158</span> /**<a name="line.158"></a> +<span class="sourceLineNo">159</span> * Inner class for storing rules.<a name="line.159"></a> +<span class="sourceLineNo">160</span> */<a name="line.160"></a> +<span class="sourceLineNo">161</span> private static final class Rule {<a name="line.161"></a> +<span class="sourceLineNo">162</span> private final String pattern;<a name="line.162"></a> +<span class="sourceLineNo">163</span> private final String[] replacementAtStart;<a name="line.163"></a> +<span class="sourceLineNo">164</span> private final String[] replacementBeforeVowel;<a name="line.164"></a> +<span class="sourceLineNo">165</span> private final String[] replacementDefault;<a name="line.165"></a> +<span class="sourceLineNo">166</span><a name="line.166"></a> +<span class="sourceLineNo">167</span> protected Rule(final String pattern, final String replacementAtStart, final String replacementBeforeVowel,<a name="line.167"></a> +<span class="sourceLineNo">168</span> final String replacementDefault) {<a name="line.168"></a> +<span class="sourceLineNo">169</span> this.pattern = pattern;<a name="line.169"></a> +<span class="sourceLineNo">170</span> this.replacementAtStart = replacementAtStart.split("\\|");<a name="line.170"></a> +<span class="sourceLineNo">171</span> this.replacementBeforeVowel = replacementBeforeVowel.split("\\|");<a name="line.171"></a> +<span class="sourceLineNo">172</span> this.replacementDefault = replacementDefault.split("\\|");<a name="line.172"></a> +<span class="sourceLineNo">173</span> }<a name="line.173"></a> +<span class="sourceLineNo">174</span><a name="line.174"></a> +<span class="sourceLineNo">175</span> public int getPatternLength() {<a name="line.175"></a> +<span class="sourceLineNo">176</span> return pattern.length();<a name="line.176"></a> +<span class="sourceLineNo">177</span> }<a name="line.177"></a> +<span class="sourceLineNo">178</span><a name="line.178"></a> +<span class="sourceLineNo">179</span> public String[] getReplacements(final String context, final boolean atStart) {<a name="line.179"></a> +<span class="sourceLineNo">180</span> if (atStart) {<a name="line.180"></a> +<span class="sourceLineNo">181</span> return replacementAtStart;<a name="line.181"></a> +<span class="sourceLineNo">182</span> }<a name="line.182"></a> +<span class="sourceLineNo">183</span><a name="line.183"></a> +<span class="sourceLineNo">184</span> final int nextIndex = getPatternLength();<a name="line.184"></a> +<span class="sourceLineNo">185</span> final boolean nextCharIsVowel = nextIndex < context.length() ? isVowel(context.charAt(nextIndex)) : false;<a name="line.185"></a> +<span class="sourceLineNo">186</span> if (nextCharIsVowel) {<a name="line.186"></a> +<span class="sourceLineNo">187</span> return replacementBeforeVowel;<a name="line.187"></a> +<span class="sourceLineNo">188</span> }<a name="line.188"></a> +<span class="sourceLineNo">189</span><a name="line.189"></a> +<span class="sourceLineNo">190</span> return replacementDefault;<a name="line.190"></a> +<span class="sourceLineNo">191</span> }<a name="line.191"></a> +<span class="sourceLineNo">192</span><a name="line.192"></a> +<span class="sourceLineNo">193</span> private boolean isVowel(final char ch) {<a name="line.193"></a> +<span class="sourceLineNo">194</span> return ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u';<a name="line.194"></a> +<span class="sourceLineNo">195</span> }<a name="line.195"></a> +<span class="sourceLineNo">196</span><a name="line.196"></a> +<span class="sourceLineNo">197</span> public boolean matches(final String context) {<a name="line.197"></a> +<span class="sourceLineNo">198</span> return context.startsWith(pattern);<a name="line.198"></a> +<span class="sourceLineNo">199</span> }<a name="line.199"></a> +<span class="sourceLineNo">200</span><a name="line.200"></a> +<span class="sourceLineNo">201</span> @Override<a name="line.201"></a> +<span class="sourceLineNo">202</span> public String toString() {<a name="line.202"></a> +<span class="sourceLineNo">203</span> return String.format("%s=(%s,%s,%s)", pattern, Arrays.asList(replacementAtStart),<a name="line.203"></a> +<span class="sourceLineNo">204</span> Arrays.asList(replacementBeforeVowel), Arrays.asList(replacementDefault));<a name="line.204"></a> +<span class="sourceLineNo">205</span> }<a name="line.205"></a> +<span class="sourceLineNo">206</span> }<a name="line.206"></a> +<span class="sourceLineNo">207</span><a name="line.207"></a> +<span class="sourceLineNo">208</span> private static final String COMMENT = "//";<a name="line.208"></a> +<span class="sourceLineNo">209</span> private static final String DOUBLE_QUOTE = "\"";<a name="line.209"></a> +<span class="sourceLineNo">210</span><a name="line.210"></a> +<span class="sourceLineNo">211</span> private static final String MULTILINE_COMMENT_END = "*/";<a name="line.211"></a> +<span class="sourceLineNo">212</span><a name="line.212"></a> +<span class="sourceLineNo">213</span> private static final String MULTILINE_COMMENT_START = "/*";<a name="line.213"></a> +<span class="sourceLineNo">214</span><a name="line.214"></a> +<span class="sourceLineNo">215</span> /** The resource file containing the replacement and folding rules */<a name="line.215"></a> +<span class="sourceLineNo">216</span> private static final String RESOURCE_FILE = "org/apache/commons/codec/language/dmrules.txt";<a name="line.216"></a> +<span class="sourceLineNo">217</span><a name="line.217"></a> +<span class="sourceLineNo">218</span> /** The code length of a DM soundex value. */<a name="line.218"></a> +<span class="sourceLineNo">219</span> private static final int MAX_LENGTH = 6;<a name="line.219"></a> +<span class="sourceLineNo">220</span><a name="line.220"></a> +<span class="sourceLineNo">221</span> /** Transformation rules indexed by the first character of their pattern. */<a name="line.221"></a> +<span class="sourceLineNo">222</span> private static final Map<Character, List<Rule>> RULES = new HashMap<>();<a name="line.222"></a> +<span class="sourceLineNo">223</span><a name="line.223"></a> +<span class="sourceLineNo">224</span> /** Folding rules. */<a name="line.224"></a> +<span class="sourceLineNo">225</span> private static final Map<Character, Character> FOLDINGS = new HashMap<>();<a name="line.225"></a> +<span class="sourceLineNo">226</span><a name="line.226"></a> +<span class="sourceLineNo">227</span> static {<a name="line.227"></a> +<span class="sourceLineNo">228</span> try (final Scanner scanner = new Scanner(Resources.getInputStream(RESOURCE_FILE), CharEncoding.UTF_8)) {<a name="line.228"></a> +<span class="sourceLineNo">229</span> parseRules(scanner, RESOURCE_FILE, RULES, FOLDINGS);<a name="line.229"></a> +<span class="sourceLineNo">230</span> }<a name="line.230"></a> +<span class="sourceLineNo">231</span><a name="line.231"></a> +<span class="sourceLineNo">232</span> // sort RULES by pattern length in descending order<a name="line.232"></a> +<span class="sourceLineNo">233</span> for (final Map.Entry<Character, List<Rule>> rule : RULES.entrySet()) {<a name="line.233"></a> +<span class="sourceLineNo">234</span> final List<Rule> ruleList = rule.getValue();<a name="line.234"></a> +<span class="sourceLineNo">235</span> Collections.sort(ruleList, new Comparator<Rule>() {<a name="line.235"></a> +<span class="sourceLineNo">236</span> @Override<a name="line.236"></a> +<span class="sourceLineNo">237</span> public int compare(final Rule rule1, final Rule rule2) {<a name="line.237"></a> +<span class="sourceLineNo">238</span> return rule2.getPatternLength() - rule1.getPatternLength();<a name="line.238"></a> +<span class="sourceLineNo">239</span> }<a name="line.239"></a> +<span class="sourceLineNo">240</span> });<a name="line.240"></a> +<span class="sourceLineNo">241</span> }<a name="line.241"></a> +<span class="sourceLineNo">242</span> }<a name="line.242"></a> +<span class="sourceLineNo">243</span><a name="line.243"></a> +<span class="sourceLineNo">244</span> private static void parseRules(final Scanner scanner, final String location,<a name="line.244"></a> +<span class="sourceLineNo">245</span> final Map<Character, List<Rule>> ruleMapping, final Map<Character, Character> asciiFoldings) {<a name="line.245"></a> +<span class="sourceLineNo">246</span> int currentLine = 0;<a name="line.246"></a> +<span class="sourceLineNo">247</span> boolean inMultilineComment = false;<a name="line.247"></a> +<span class="sourceLineNo">248</span><a name="line.248"></a> +<span class="sourceLineNo">249</span> while (scanner.hasNextLine()) {<a name="line.249"></a> +<span class="sourceLineNo">250</span> currentLine++;<a name="line.250"></a> +<span class="sourceLineNo">251</span> final String rawLine = scanner.nextLine();<a name="line.251"></a> +<span class="sourceLineNo">252</span> String line = rawLine;<a name="line.252"></a> +<span class="sourceLineNo">253</span><a name="line.253"></a> +<span class="sourceLineNo">254</span> if (inMultilineComment) {<a name="line.254"></a> +<span class="sourceLineNo">255</span> if (line.endsWith(MULTILINE_COMMENT_END)) {<a name="line.255"></a> +<span class="sourceLineNo">256</span> inMultilineComment = false;<a name="line.256"></a> +<span class="sourceLineNo">257</span> }<a name="line.257"></a> +<span class="sourceLineNo">258</span> continue;<a name="line.258"></a> +<span class="sourceLineNo">259</span> }<a name="line.259"></a> +<span class="sourceLineNo">260</span><a name="line.260"></a> +<span class="sourceLineNo">261</span> if (line.startsWith(MULTILINE_COMMENT_START)) {<a name="line.261"></a> +<span class="sourceLineNo">262</span> inMultilineComment = true;<a name="line.262"></a> +<span class="sourceLineNo">263</span> } else {<a name="line.263"></a> +<span class="sourceLineNo">264</span> // discard comments<a name="line.264"></a> +<span class="sourceLineNo">265</span> final int cmtI = line.indexOf(COMMENT);<a name="line.265"></a> +<span class="sourceLineNo">266</span> if (cmtI >= 0) {<a name="line.266"></a> +<span class="sourceLineNo">267</span> line = line.substring(0, cmtI);<a name="line.267"></a> +<span class="sourceLineNo">268</span> }<a name="line.268"></a> +<span class="sourceLineNo">269</span><a name="line.269"></a> +<span class="sourceLineNo">270</span> // trim leading-trailing whitespace<a name="line.270"></a> +<span class="sourceLineNo">271</span> line = line.trim();<a name="line.271"></a> +<span class="sourceLineNo">272</span><a name="line.272"></a> +<span class="sourceLineNo">273</span> if (line.length() == 0) {<a name="line.273"></a> +<span class="sourceLineNo">274</span> continue; // empty lines can be safely skipped<a name="line.274"></a> +<span class="sourceLineNo">275</span> }<a name="line.275"></a> +<span class="sourceLineNo">276</span><a name="line.276"></a> +<span class="sourceLineNo">277</span> if (line.contains("=")) {<a name="line.277"></a> +<span class="sourceLineNo">278</span> // folding<a name="line.278"></a> +<span class="sourceLineNo">279</span> final String[] parts = line.split("=");<a name="line.279"></a> +<span class="sourceLineNo">280</span> if (parts.length != 2) {<a name="line.280"></a> +<span class="sourceLineNo">281</span> throw new IllegalArgumentException("Malformed folding statement split into " + parts.length +<a name="line.281"></a> +<span class="sourceLineNo">282</span> " parts: " + rawLine + " in " + location);<a name="line.282"></a> +<span class="sourceLineNo">283</span> }<a name="line.283"></a> +<span class="sourceLineNo">284</span> final String leftCharacter = parts[0];<a name="line.284"></a> +<span class="sourceLineNo">285</span> final String rightCharacter = parts[1];<a name="line.285"></a> +<span class="sourceLineNo">286</span><a name="line.286"></a> +<span class="sourceLineNo">287</span> if (leftCharacter.length() != 1 || rightCharacter.length() != 1) {<a name="line.287"></a> +<span class="sourceLineNo">288</span> throw new IllegalArgumentException("Malformed folding statement - " +<a name="line.288"></a> +<span class="sourceLineNo">289</span> "patterns are not single characters: " + rawLine + " in " + location);<a name="line.289"></a> +<span class="sourceLineNo">290</span> }<a name="line.290"></a> +<span class="sourceLineNo">291</span><a name="line.291"></a> +<span class="sourceLineNo">292</span> asciiFoldings.put(leftCharacter.charAt(0), rightCharacter.charAt(0));<a name="line.292"></a> +<span class="sourceLineNo">293</span> } else {<a name="line.293"></a> +<span class="sourceLineNo">294</span> // rule<a name="line.294"></a> +<span class="sourceLineNo">295</span> final String[] parts = line.split("\\s+");<a name="line.295"></a> +<span class="sourceLineNo">296</span> if (parts.length != 4) {<a name="line.296"></a> +<span class="sourceLineNo">297</span> throw new IllegalArgumentException("Malformed rule statement split into " + parts.length +<a name="line.297"></a> +<span class="sourceLineNo">298</span> " parts: " + rawLine + " in " + location);<a name="line.298"></a> +<span class="sourceLineNo">299</span> }<a name="line.299"></a> +<span class="sourceLineNo">300</span> try {<a name="line.300"></a> +<span class="sourceLineNo">301</span> final String pattern = stripQuotes(parts[0]);<a name="line.301"></a> +<span class="sourceLineNo">302</span> final String replacement1 = stripQuotes(parts[1]);<a name="line.302"></a> +<span class="sourceLineNo">303</span> final String replacement2 = stripQuotes(parts[2]);<a name="line.303"></a> +<span class="sourceLineNo">304</span> final String replacement3 = stripQuotes(parts[3]);<a name="line.304"></a> +<span class="sourceLineNo">305</span><a name="line.305"></a> +<span class="sourceLineNo">306</span> final Rule r = new Rule(pattern, replacement1, replacement2, replacement3);<a name="line.306"></a> +<span class="sourceLineNo">307</span> final char patternKey = r.pattern.charAt(0);<a name="line.307"></a> +<span class="sourceLineNo">308</span> List<Rule> rules = ruleMapping.get(patternKey);<a name="line.308"></a> +<span class="sourceLineNo">309</span> if (rules == null) {<a name="line.309"></a> +<span class="sourceLineNo">310</span> rules = new ArrayList<>();<a name="line.310"></a> +<span class="sourceLineNo">311</span> ruleMapping.put(patternKey, rules);<a name="line.311"></a> +<span class="sourceLineNo">312</span> }<a name="line.312"></a> +<span class="sourceLineNo">313</span> rules.add(r);<a name="line.313"></a> +<span class="sourceLineNo">314</span> } catch (final IllegalArgumentException e) {<a name="line.314"></a> +<span class="sourceLineNo">315</span> throw new IllegalStateException(<a name="line.315"></a> +<span class="sourceLineNo">316</span> "Problem parsing line '" + currentLine + "' in " + location, e);<a name="line.316"></a> +<span class="sourceLineNo">317</span> }<a name="line.317"></a> +<span class="sourceLineNo">318</span> }<a name="line.318"></a> +<span class="sourceLineNo">319</span> }<a name="line.319"></a> +<span class="sourceLineNo">320</span> }<a name="line.320"></a> +<span class="sourceLineNo">321</span> }<a name="line.321"></a> +<span class="sourceLineNo">322</span><a name="line.322"></a> +<span class="sourceLineNo">323</span> private static String stripQuotes(String str) {<a name="line.323"></a> +<span class="sourceLineNo">324</span> if (str.startsWith(DOUBLE_QUOTE)) {<a name="line.324"></a> +<span class="sourceLineNo">325</span> str = str.substring(1);<a name="line.325"></a> +<span class="sourceLineNo">326</span> }<a name="line.326"></a> +<span class="sourceLineNo">327</span><a name="line.327"></a> +<span class="sourceLineNo">328</span> if (str.endsWith(DOUBLE_QUOTE)) {<a name="line.328"></a> +<span class="sourceLineNo">329</span> str = str.substring(0, str.length() - 1);<a name="line.329"></a> +<span class="sourceLineNo">330</span> }<a name="line.330"></a> +<span class="sourceLineNo">331</span><a name="line.331"></a> +<span class="sourceLineNo">332</span> return str;<a name="line.332"></a> +<span class="sourceLineNo">333</span> }<a name="line.333"></a> +<span class="sourceLineNo">334</span><a name="line.334"></a> +<span class="sourceLineNo">335</span> /** Whether to use ASCII folding prior to encoding. */<a name="line.335"></a> +<span class="sourceLineNo">336</span> private final boolean folding;<a name="line.336"></a> +<span class="sourceLineNo">337</span><a name="line.337"></a> +<span class="sourceLineNo">338</span> /**<a name="line.338"></a> +<span class="sourceLineNo">339</span> * Creates a new instance with ASCII-folding enabled.<a name="line.339"></a> +<span class="sourceLineNo">340</span> */<a name="line.340"></a> +<span class="sourceLineNo">341</span> public DaitchMokotoffSoundex() {<a name="line.341"></a> +<span class="sourceLineNo">342</span> this(true);<a name="line.342"></a> +<span class="sourceLineNo">343</span> }<a name="line.343"></a> +<span class="sourceLineNo">344</span><a name="line.344"></a> +<span class="sourceLineNo">345</span> /**<a name="line.345"></a> +<span class="sourceLineNo">346</span> * Creates a new instance.<a name="line.346"></a> +<span class="sourceLineNo">347</span> * <p><a name="line.347"></a> +<span class="sourceLineNo">348</span> * With ASCII-folding enabled, certain accented characters will be transformed to equivalent ASCII characters, e.g.<a name="line.348"></a> +<span class="sourceLineNo">349</span> * è -&gt; e.<a name="line.349"></a> +<span class="sourceLineNo">350</span> * </p><a name="line.350"></a> +<span class="sourceLineNo">351</span> *<a name="line.351"></a> +<span class="sourceLineNo">352</span> * @param folding<a name="line.352"></a> +<span class="sourceLineNo">353</span> * if ASCII-folding shall be performed before encoding<a name="line.353"></a> +<span class="sourceLineNo">354</span> */<a name="line.354"></a> +<span class="sourceLineNo">355</span> public DaitchMokotoffSoundex(final boolean folding) {<a name="line.355"></a> +<span class="sourceLineNo">356</span> this.folding = folding;<a name="line.356"></a> +<span class="sourceLineNo">357</span> }<a name="line.357"></a> +<span class="sourceLineNo">358</span><a name="line.358"></a> +<span class="sourceLineNo">359</span> /**<a name="line.359"></a> +<span class="sourceLineNo">360</span> * Performs a cleanup of the input string before the actual soundex transformation.<a name="line.360"></a> +<span class="sourceLineNo">361</span> * <p><a name="line.361"></a> +<span class="sourceLineNo">362</span> * Removes all whitespace characters and performs ASCII folding if enabled.<a name="line.362"></a> +<span class="sourceLineNo">363</span> * </p><a name="line.363"></a> +<span class="sourceLineNo">364</span> *<a name="line.364"></a> +<span class="sourceLineNo">365</span> * @param input<a name="line.365"></a> +<span class="sourceLineNo">366</span> * the input string to cleanup<a name="line.366"></a> +<span class="sourceLineNo">367</span> * @return a cleaned up string<a name="line.367"></a> +<span class="sourceLineNo">368</span> */<a name="line.368"></a> +<span class="sourceLineNo">369</span> private String cleanup(final String input) {<a name="line.369"></a> +<span class="sourceLineNo">370</span> final StringBuilder sb = new StringBuilder();<a name="line.370"></a> +<span class="sourceLineNo">371</span> for (char ch : input.toCharArray()) {<a name="line.371"></a> +<span class="sourceLineNo">372</span> if (Character.isWhitespace(ch)) {<a name="line.372"></a> +<span class="sourceLineNo">373</span> continue;<a name="line.373"></a> +<span class="sourceLineNo">374</span> }<a name="line.374"></a> +<span class="sourceLineNo">375</span><a name="line.375"></a> +<span class="sourceLineNo">376</span> ch = Character.toLowerCase(ch);<a name="line.376"></a> +<span class="sourceLineNo">377</span> if (folding && FOLDINGS.containsKey(ch)) {<a name="line.377"></a> +<span class="sourceLineNo">378</span> ch = FOLDINGS.get(ch);<a name="line.378"></a> +<span class="sourceLineNo">379</span> }<a name="line.379"></a> +<span class="sourceLineNo">380</span> sb.append(ch);<a name="line.380"></a> +<span class="sourceLineNo">381</span> }<a name="line.381"></a> +<span class="sourceLineNo">382</span> return sb.toString();<a name="line.382"></a> +<span class="sourceLineNo">383</span> }<a name="line.383"></a> +<span class="sourceLineNo">384</span><a name="line.384"></a> +<span class="sourceLineNo">385</span> /**<a name="line.385"></a> +<span class="sourceLineNo">386</span> * Encodes an Object using the Daitch-Mokotoff soundex algorithm without branching.<a name="line.386"></a> +<span class="sourceLineNo">387</span> * <p><a name="line.387"></a> +<span class="sourceLineNo">388</span> * This method is provided in order to satisfy the requirements of the Encoder interface, and will throw an<a name="line.388"></a> +<span class="sourceLineNo">389</span> * EncoderException if the supplied object is not of type java.lang.String.<a name="line.389"></a> +<span class="sourceLineNo">390</span> * </p><a name="line.390"></a> +<span class="sourceLineNo">391</span> *<a name="line.391"></a> +<span class="sourceLineNo">392</span> * @see #soundex(String)<a name="line.392"></a> +<span class="sourceLineNo">393</span> *<a name="line.393"></a> +<span class="sourceLineNo">394</span> * @param obj<a name="line.394"></a> +<span class="sourceLineNo">395</span> * Object to encode<a name="line.395"></a> +<span class="sourceLineNo">396</span> * @return An object (of type java.lang.String) containing the DM soundex code, which corresponds to the String<a name="line.396"></a> +<span class="sourceLineNo">397</span> * supplied.<a name="line.397"></a> +<span class="sourceLineNo">398</span> * @throws EncoderException<a name="line.398"></a> +<span class="sourceLineNo">399</span> * if the parameter supplied is not of type java.lang.String<a name="line.399"></a> +<span class="sourceLineNo">400</span> * @throws IllegalArgumentException<a name="line.400"></a> +<span class="sourceLineNo">401</span> * if a character is not mapped<a name="line.401"></a> +<span class="sourceLineNo">402</span> */<a name="line.402"></a> +<span class="sourceLineNo">403</span> @Override<a name="line.403"></a> +<span class="sourceLineNo">404</span> public Object encode(final Object obj) throws EncoderException {<a name="line.404"></a> +<span class="sourceLineNo">405</span> if (!(obj instanceof String)) {<a name="line.405"></a> +<span class="sourceLineNo">406</span> throw new EncoderException(<a name="line.406"></a> +<span class="sourceLineNo">407</span> "Parameter supplied to DaitchMokotoffSoundex encode is not of type java.lang.String");<a name="line.407"></a> +<span class="sourceLineNo">408</span> }<a name="line.408"></a> +<span class="sourceLineNo">409</span> return encode((String) obj);<a name="line.409"></a> +<span class="sourceLineNo">410</span> }<a name="line.410"></a> +<span class="sourceLineNo">411</span><a name="line.411"></a> +<span class="sourceLineNo">412</span> /**<a name="line.412"></a> +<span class="sourceLineNo">413</span> * Encodes a String using the Daitch-Mokotoff soundex algorithm without branching.<a name="line.413"></a> +<span class="sourceLineNo">414</span> *<a name="line.414"></a> +<span class="sourceLineNo">415</span> * @see #soundex(String)<a name="line.415"></a> +<span class="sourceLineNo">416</span> *<a name="line.416"></a> +<span class="sourceLineNo">417</span> * @param source<a name="line.417"></a> +<span class="sourceLineNo">418</span> * A String object to encode<a name="line.418"></a> +<span class="sourceLineNo">419</span> * @return A DM Soundex code corresponding to the String supplied<a name="line.419"></a> +<span class="sourceLineNo">420</span> * @throws IllegalArgumentException<a name="line.420"></a> +<span class="sourceLineNo">421</span> * if a character is not mapped<a name="line.421"></a> +<span class="sourceLineNo">422</span> */<a name="line.422"></a> +<span class="sourceLineNo">423</span> @Override<a name="line.423"></a> +<span class="sourceLineNo">424</span> public String encode(final String source) {<a name="line.424"></a> +<span class="sourceLineNo">425</span> if (source == null) {<a name="line.425"></a> +<span class="sourceLineNo">426</span> return null;<a name="line.426"></a> +<span class="sourceLineNo">427</span> }<a name="line.427"></a> +<span class="sourceLineNo">428</span> return soundex(source, false)[0];<a name="line.428"></a> +<span class="sourceLineNo">429</span> }<a name="line.429"></a> +<span class="sourceLineNo">430</span><a name="line.430"></a> +<span class="sourceLineNo">431</span> /**<a name="line.431"></a> +<span class="sourceLineNo">432</span> * Encodes a String using the Daitch-Mokotoff soundex algorithm with branching.<a name="line.432"></a> +<span class="sourceLineNo">433</span> * <p><a name="line.433"></a> +<span class="sourceLineNo">434</span> * In case a string is encoded into multiple codes (see branching rules), the result will contain all codes,<a name="line.434"></a> +<span class="sourceLineNo">435</span> * separated by '|'.<a name="line.435"></a> +<span class="sourceLineNo">436</span> * </p><a name="line.436"></a> +<span class="sourceLineNo">437</span> * <p><a name="line.437"></a> +<span class="sourceLineNo">438</span> * Example: the name "AUERBACH" is encoded as both<a name="line.438"></a> +<span class="sourceLineNo">439</span> * </p><a name="line.439"></a> +<span class="sourceLineNo">440</span> * <ul><a name="line.440"></a> +<span class="sourceLineNo">441</span> * <li>097400</li><a name="line.441"></a> +<span class="sourceLineNo">442</span> * <li>097500</li><a name="line.442"></a> +<span class="sourceLineNo">443</span> * </ul><a name="line.443"></a> +<span class="sourceLineNo">444</span> * <p><a name="line.444"></a> +<span class="sourceLineNo">445</span> * Thus the result will be "097400|097500".<a name="line.445"></a> +<span class="sourceLineNo">446</span> * </p><a name="line.446"></a> +<span class="sourceLineNo">447</span> *<a name="line.447"></a> +<span class="sourceLineNo">448</span> * @param source<a name="line.448"></a> +<span class="sourceLineNo">449</span> * A String object to encode<a name="line.449"></a> +<span class="sourceLineNo">450</span> * @return A string containing a set of DM Soundex codes corresponding to the String supplied<a name="line.450"></a> +<span class="sourceLineNo">451</span> * @throws IllegalArgumentException<a name="line.451"></a> +<span class="sourceLineNo">452</span> * if a character is not mapped<a name="line.452"></a> +<span class="sourceLineNo">453</span> */<a name="line.453"></a> +<span class="sourceLineNo">454</span> public String soundex(final String source) {<a name="line.454"></a> +<span class="sourceLineNo">455</span> final String[] branches = soundex(source, true);<a name="line.455"></a> +<span class="sourceLineNo">456</span> final StringBuilder sb = new StringBuilder();<a name="line.456"></a> +<span class="sourceLineNo">457</span> int index = 0;<a name="line.457"></a> +<span class="sourceLineNo">458</span> for (final String branch : branches) {<a name="line.458"></a> +<span class="sourceLineNo">459</span> sb.append(branch);<a name="line.459"></a> +<span class="sourceLineNo">460</span> if (++index < branches.length) {<a name="line.460"></a> +<span class="sourceLineNo">461</span> sb.append('|');<a name="line.461"></a> +<span class="sourceLineNo">462</span> }<a name="line.462"></a> +<span class="sourceLineNo">463</span> }<a name="line.463"></a> +<span class="sourceLineNo">464</span> return sb.toString();<a name="line.464"></a> +<span class="sourceLineNo">465</span> }<a name="line.465"></a> +<span class="sourceLineNo">466</span><a name="line.466"></a> +<span class="sourceLineNo">467</span> /**<a name="line.467"></a> +<span class="sourceLineNo">468</span> * Perform the actual DM Soundex algorithm on the input string.<a name="line.468"></a> +<span class="sourceLineNo">469</span> *<a name="line.469"></a> +<span class="sourceLineNo">470</span> * @param source<a name="line.470"></a> +<span class="sourceLineNo">471</span> * A String object to encode<a name="line.471"></a> +<span class="sourceLineNo">472</span> * @param branching<a name="line.472"></a> +<span class="sourceLineNo">473</span> * If branching shall be performed<a name="line.473"></a> +<span class="sourceLineNo">474</span> * @return A string array containing all DM Soundex codes corresponding to the String supplied depending on the<a name="line.474"></a> +<span class="sourceLineNo">475</span> * selected branching mode<a name="line.475"></a> +<span class="sourceLineNo">476</span> */<a name="line.476"></a> +<span class="sourceLineNo">477</span> private String[] soundex(final String source, final boolean branching) {<a name="line.477"></a> +<span class="sourceLineNo">478</span> if (source == null) {<a name="line.478"></a> +<span class="sourceLineNo">479</span> return null;<a name="line.479"></a> +<span class="sourceLineNo">480</span> }<a name="line.480"></a> +<span class="sourceLineNo">481</span><a name="line.481"></a> +<span class="sourceLineNo">482</span> final String input = cleanup(source);<a name="line.482"></a> +<span class="sourceLineNo">483</span><a name="line.483"></a> +<span class="sourceLineNo">484</span> final Set<Branch> currentBranches = new LinkedHashSet<>();<a name="line.484"></a> +<span class="sourceLineNo">485</span> currentBranches.add(new Branch());<a name="line.485"></a> +<span class="sourceLineNo">486</span><a name="line.486"></a> +<span class="sourceLineNo">487</span> char lastChar = '\0';<a name="line.487"></a> +<span class="sourceLineNo">488</span> for (int index = 0; index < input.length(); index++) {<a name="line.488"></a> +<span class="sourceLineNo">489</span> final char ch = input.charAt(index);<a name="line.489"></a> +<span class="sourceLineNo">490</span><a name="line.490"></a> +<span class="sourceLineNo">491</span> // ignore whitespace inside a name<a name="line.491"></a> +<span class="sourceLineNo">492</span> if (Character.isWhitespace(ch)) {<a name="line.492"></a> +<span class="sourceLineNo">493</span> continue;<a name="line.493"></a> +<span class="sourceLineNo">494</span> }<a name="line.494"></a> +<span class="sourceLineNo">495</span><a name="line.495"></a> +<span class="sourceLineNo">496</span> final String inputContext = input.substring(index);<a name="line.496"></a> +<span class="sourceLineNo">497</span> final List<Rule> rules = RULES.get(ch);<a name="line.497"></a> +<span class="sourceLineNo">498</span> if (rules == null) {<a name="line.498"></a> +<span class="sourceLineNo">499</span> continue;<a name="line.499"></a> +<span class="sourceLineNo">500</span> }<a name="line.500"></a> +<span class="sourceLineNo">501</span><a name="line.501"></a> +<span class="sourceLineNo">502</span> // use an EMPTY_LIST to avoid false positive warnings wrt potential null pointer access<a name="line.502"></a> +<span class="sourceLineNo">503</span> final List<Branch> nextBranches = branching ? new ArrayList<Branch>() : Collections.<Branch>emptyList();<a name="line.503"></a> +<span class="sourceLineNo">504</span><a name="line.504"></a> +<span class="sourceLineNo">505</span> for (final Rule rule : rules) {<a name="line.505"></a> +<span class="sourceLineNo">506</span> if (rule.matches(inputContext)) {<a name="line.506"></a> +<span class="sourceLineNo">507</span> if (branching) {<a name="line.507"></a> +<span class="sourceLineNo">508</span> nextBranches.clear();<a name="line.508"></a> +<span class="sourceLineNo">509</span> }<a name="line.509"></a> +<span class="sourceLineNo">510</span> final String[] replacements = rule.getReplacements(inputContext, lastChar == '\0');<a name="line.510"></a> +<span class="sourceLineNo">511</span> final boolean branchingRequired = replacements.length > 1 && branching;<a name="line.511"></a> +<span class="sourceLineNo">512</span><a name="line.512"></a> +<span class="sourceLineNo">513</span> for (final Branch branch : currentBranches) {<a name="line.513"></a> +<span class="sourceLineNo">514</span> for (final String nextReplacement : replacements) {<a name="line.514"></a> +<span class="sourceLineNo">515</span> // if we have multiple replacements, always create a new branch<a name="line.515"></a> +<span class="sourceLineNo">516</span> final Branch nextBranch = branchingRequired ? branch.createBranch() : branch;<a name="line.516"></a> +<span class="sourceLineNo">517</span><a name="line.517"></a> +<span class="sourceLineNo">518</span> // special rule: occurrences of mn or nm are treated differently<a name="line.518"></a> +<span class="sourceLineNo">519</span> final boolean force = (lastChar == 'm' && ch == 'n') || (lastChar == 'n' && ch == 'm');<a name="line.519"></a> +<span class="sourceLineNo">520</span><a name="line.520"></a> +<span class="sourceLineNo">521</span> nextBranch.processNextReplacement(nextReplacement, force);<a name="line.521"></a> +<span class="sourceLineNo">522</span><a name="line.522"></a> +<span class="sourceLineNo">523</span> if (branching) {<a name="line.523"></a> +<span class="sourceLineNo">524</span> nextBranches.add(nextBranch);<a name="line.524"></a> +<span class="sourceLineNo">525</span> } else {<a name="line.525"></a> +<span class="sourceLineNo">526</span> break;<a name="line.526"></a> +<span class="sourceLineNo">527</span> }<a name="line.527"></a> +<span class="sourceLineNo">528</span> }<a name="line.528"></a> +<span class="sourceLineNo">529</span> }<a name="line.529"></a> +<span class="sourceLineNo">530</span><a name="line.530"></a> +<span class="sourceLineNo">531</span> if (branching) {<a name="line.531"></a> +<span class="sourceLineNo">532</span> currentBranches.clear();<a name="line.532"></a> +<span class="sourceLineNo">533</span> currentBranches.addAll(nextBranches);<a name="line.533"></a> +<span class="sourceLineNo">534</span> }<a name="line.534"></a> +<span class="sourceLineNo">535</span> index += rule.getPatternLength() - 1;<a name="line.535"></a> +<span class="sourceLineNo">536</span> break;<a name="line.536"></a> +<span class="sourceLineNo">537</span> }<a name="line.537"></a> +<span class="sourceLineNo">538</span> }<a name="line.538"></a> +<span class="sourceLineNo">539</span><a name="line.539"></a> +<span class="sourceLineNo">540</span> lastChar = ch;<a name="line.540"></a> +<span class="sourceLineNo">541</span> }<a name="line.541"></a> +<span class="sourceLineNo">542</span><a name="line.542"></a> +<span class="sourceLineNo">543</span> final String[] result = new String[currentBranches.size()];<a name="line.543"></a> +<span class="sourceLineNo">544</span> int index = 0;<a name="line.544"></a> +<span class="sourceLineNo">545</span> for (final Branch branch : currentBranches) {<a name="line.545"></a> +<span class="sourceLineNo">546</span> branch.finish();<a name="line.546"></a> +<span class="sourceLineNo">547</span> result[index++] = branch.toString();<a name="line.547"></a> +<span class="sourceLineNo">548</span> }<a name="line.548"></a> +<span class="sourceLineNo">549</span><a name="line.549"></a> +<span class="sourceLineNo">550</span> return result;<a name="line.550"></a> +<span class="sourceLineNo">551</span> }<a name="line.551"></a> +<span class="sourceLineNo">552</span>}<a name="line.552"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html new file mode 100644 index 0000000000000000000000000000000000000000..383acc881ba024117f3b528a09f49fa6725c7a9a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/DoubleMetaphone.DoubleMetaphoneResult.html @@ -0,0 +1,1080 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.EncoderException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import org.apache.commons.codec.StringEncoder;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import org.apache.commons.codec.binary.StringUtils;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>/**<a name="line.24"></a> +<span class="sourceLineNo">025</span> * Encodes a string into a double metaphone value. This Implementation is based on the algorithm by <CITE>Lawrence<a name="line.25"></a> +<span class="sourceLineNo">026</span> * Philips</CITE>.<a name="line.26"></a> +<span class="sourceLineNo">027</span> * <p><a name="line.27"></a> +<span class="sourceLineNo">028</span> * This class is conditionally thread-safe. The instance field for the maximum code length is mutable<a name="line.28"></a> +<span class="sourceLineNo">029</span> * {@link #setMaxCodeLen(int)} but is not volatile, and accesses are not synchronized. If an instance of the class is<a name="line.29"></a> +<span class="sourceLineNo">030</span> * shared between threads, the caller needs to ensure that suitable synchronization is used to ensure safe publication<a name="line.30"></a> +<span class="sourceLineNo">031</span> * of the value between threads, and must not invoke {@link #setMaxCodeLen(int)} after initial setup.<a name="line.31"></a> +<span class="sourceLineNo">032</span> *<a name="line.32"></a> +<span class="sourceLineNo">033</span> * @see <a href="http://drdobbs.com/184401251?pgno=2">Original Article</a><a name="line.33"></a> +<span class="sourceLineNo">034</span> * @see <a href="http://en.wikipedia.org/wiki/Metaphone">http://en.wikipedia.org/wiki/Metaphone</a><a name="line.34"></a> +<span class="sourceLineNo">035</span> *<a name="line.35"></a> +<span class="sourceLineNo">036</span> */<a name="line.36"></a> +<span class="sourceLineNo">037</span>public class DoubleMetaphone implements StringEncoder {<a name="line.37"></a> +<span class="sourceLineNo">038</span><a name="line.38"></a> +<span class="sourceLineNo">039</span> /**<a name="line.39"></a> +<span class="sourceLineNo">040</span> * "Vowels" to test for<a name="line.40"></a> +<span class="sourceLineNo">041</span> */<a name="line.41"></a> +<span class="sourceLineNo">042</span> private static final String VOWELS = "AEIOUY";<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> +<span class="sourceLineNo">044</span> /**<a name="line.44"></a> +<span class="sourceLineNo">045</span> * Prefixes when present which are not pronounced<a name="line.45"></a> +<span class="sourceLineNo">046</span> */<a name="line.46"></a> +<span class="sourceLineNo">047</span> private static final String[] SILENT_START =<a name="line.47"></a> +<span class="sourceLineNo">048</span> { "GN", "KN", "PN", "WR", "PS" };<a name="line.48"></a> +<span class="sourceLineNo">049</span> private static final String[] L_R_N_M_B_H_F_V_W_SPACE =<a name="line.49"></a> +<span class="sourceLineNo">050</span> { "L", "R", "N", "M", "B", "H", "F", "V", "W", " " };<a name="line.50"></a> +<span class="sourceLineNo">051</span> private static final String[] ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER =<a name="line.51"></a> +<span class="sourceLineNo">052</span> { "ES", "EP", "EB", "EL", "EY", "IB", "IL", "IN", "IE", "EI", "ER" };<a name="line.52"></a> +<span class="sourceLineNo">053</span> private static final String[] L_T_K_S_N_M_B_Z =<a name="line.53"></a> +<span class="sourceLineNo">054</span> { "L", "T", "K", "S", "N", "M", "B", "Z" };<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> /**<a name="line.56"></a> +<span class="sourceLineNo">057</span> * Maximum length of an encoding, default is 4<a name="line.57"></a> +<span class="sourceLineNo">058</span> */<a name="line.58"></a> +<span class="sourceLineNo">059</span> private int maxCodeLen = 4;<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> /**<a name="line.61"></a> +<span class="sourceLineNo">062</span> * Creates an instance of this DoubleMetaphone encoder<a name="line.62"></a> +<span class="sourceLineNo">063</span> */<a name="line.63"></a> +<span class="sourceLineNo">064</span> public DoubleMetaphone() {<a name="line.64"></a> +<span class="sourceLineNo">065</span> super();<a name="line.65"></a> +<span class="sourceLineNo">066</span> }<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> /**<a name="line.68"></a> +<span class="sourceLineNo">069</span> * Encode a value with Double Metaphone.<a name="line.69"></a> +<span class="sourceLineNo">070</span> *<a name="line.70"></a> +<span class="sourceLineNo">071</span> * @param value String to encode<a name="line.71"></a> +<span class="sourceLineNo">072</span> * @return an encoded string<a name="line.72"></a> +<span class="sourceLineNo">073</span> */<a name="line.73"></a> +<span class="sourceLineNo">074</span> public String doubleMetaphone(final String value) {<a name="line.74"></a> +<span class="sourceLineNo">075</span> return doubleMetaphone(value, false);<a name="line.75"></a> +<span class="sourceLineNo">076</span> }<a name="line.76"></a> +<span class="sourceLineNo">077</span><a name="line.77"></a> +<span class="sourceLineNo">078</span> /**<a name="line.78"></a> +<span class="sourceLineNo">079</span> * Encode a value with Double Metaphone, optionally using the alternate encoding.<a name="line.79"></a> +<span class="sourceLineNo">080</span> *<a name="line.80"></a> +<span class="sourceLineNo">081</span> * @param value String to encode<a name="line.81"></a> +<span class="sourceLineNo">082</span> * @param alternate use alternate encode<a name="line.82"></a> +<span class="sourceLineNo">083</span> * @return an encoded string<a name="line.83"></a> +<span class="sourceLineNo">084</span> */<a name="line.84"></a> +<span class="sourceLineNo">085</span> public String doubleMetaphone(String value, final boolean alternate) {<a name="line.85"></a> +<span class="sourceLineNo">086</span> value = cleanInput(value);<a name="line.86"></a> +<span class="sourceLineNo">087</span> if (value == null) {<a name="line.87"></a> +<span class="sourceLineNo">088</span> return null;<a name="line.88"></a> +<span class="sourceLineNo">089</span> }<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> final boolean slavoGermanic = isSlavoGermanic(value);<a name="line.91"></a> +<span class="sourceLineNo">092</span> int index = isSilentStart(value) ? 1 : 0;<a name="line.92"></a> +<span class="sourceLineNo">093</span><a name="line.93"></a> +<span class="sourceLineNo">094</span> final DoubleMetaphoneResult result = new DoubleMetaphoneResult(this.getMaxCodeLen());<a name="line.94"></a> +<span class="sourceLineNo">095</span><a name="line.95"></a> +<span class="sourceLineNo">096</span> while (!result.isComplete() && index <= value.length() - 1) {<a name="line.96"></a> +<span class="sourceLineNo">097</span> switch (value.charAt(index)) {<a name="line.97"></a> +<span class="sourceLineNo">098</span> case 'A':<a name="line.98"></a> +<span class="sourceLineNo">099</span> case 'E':<a name="line.99"></a> +<span class="sourceLineNo">100</span> case 'I':<a name="line.100"></a> +<span class="sourceLineNo">101</span> case 'O':<a name="line.101"></a> +<span class="sourceLineNo">102</span> case 'U':<a name="line.102"></a> +<span class="sourceLineNo">103</span> case 'Y':<a name="line.103"></a> +<span class="sourceLineNo">104</span> index = handleAEIOUY(result, index);<a name="line.104"></a> +<span class="sourceLineNo">105</span> break;<a name="line.105"></a> +<span class="sourceLineNo">106</span> case 'B':<a name="line.106"></a> +<span class="sourceLineNo">107</span> result.append('P');<a name="line.107"></a> +<span class="sourceLineNo">108</span> index = charAt(value, index + 1) == 'B' ? index + 2 : index + 1;<a name="line.108"></a> +<span class="sourceLineNo">109</span> break;<a name="line.109"></a> +<span class="sourceLineNo">110</span> case '\u00C7':<a name="line.110"></a> +<span class="sourceLineNo">111</span> // A C with a Cedilla<a name="line.111"></a> +<span class="sourceLineNo">112</span> result.append('S');<a name="line.112"></a> +<span class="sourceLineNo">113</span> index++;<a name="line.113"></a> +<span class="sourceLineNo">114</span> break;<a name="line.114"></a> +<span class="sourceLineNo">115</span> case 'C':<a name="line.115"></a> +<span class="sourceLineNo">116</span> index = handleC(value, result, index);<a name="line.116"></a> +<span class="sourceLineNo">117</span> break;<a name="line.117"></a> +<span class="sourceLineNo">118</span> case 'D':<a name="line.118"></a> +<span class="sourceLineNo">119</span> index = handleD(value, result, index);<a name="line.119"></a> +<span class="sourceLineNo">120</span> break;<a name="line.120"></a> +<span class="sourceLineNo">121</span> case 'F':<a name="line.121"></a> +<span class="sourceLineNo">122</span> result.append('F');<a name="line.122"></a> +<span class="sourceLineNo">123</span> index = charAt(value, index + 1) == 'F' ? index + 2 : index + 1;<a name="line.123"></a> +<span class="sourceLineNo">124</span> break;<a name="line.124"></a> +<span class="sourceLineNo">125</span> case 'G':<a name="line.125"></a> +<span class="sourceLineNo">126</span> index = handleG(value, result, index, slavoGermanic);<a name="line.126"></a> +<span class="sourceLineNo">127</span> break;<a name="line.127"></a> +<span class="sourceLineNo">128</span> case 'H':<a name="line.128"></a> +<span class="sourceLineNo">129</span> index = handleH(value, result, index);<a name="line.129"></a> +<span class="sourceLineNo">130</span> break;<a name="line.130"></a> +<span class="sourceLineNo">131</span> case 'J':<a name="line.131"></a> +<span class="sourceLineNo">132</span> index = handleJ(value, result, index, slavoGermanic);<a name="line.132"></a> +<span class="sourceLineNo">133</span> break;<a name="line.133"></a> +<span class="sourceLineNo">134</span> case 'K':<a name="line.134"></a> +<span class="sourceLineNo">135</span> result.append('K');<a name="line.135"></a> +<span class="sourceLineNo">136</span> index = charAt(value, index + 1) == 'K' ? index + 2 : index + 1;<a name="line.136"></a> +<span class="sourceLineNo">137</span> break;<a name="line.137"></a> +<span class="sourceLineNo">138</span> case 'L':<a name="line.138"></a> +<span class="sourceLineNo">139</span> index = handleL(value, result, index);<a name="line.139"></a> +<span class="sourceLineNo">140</span> break;<a name="line.140"></a> +<span class="sourceLineNo">141</span> case 'M':<a name="line.141"></a> +<span class="sourceLineNo">142</span> result.append('M');<a name="line.142"></a> +<span class="sourceLineNo">143</span> index = conditionM0(value, index) ? index + 2 : index + 1;<a name="line.143"></a> +<span class="sourceLineNo">144</span> break;<a name="line.144"></a> +<span class="sourceLineNo">145</span> case 'N':<a name="line.145"></a> +<span class="sourceLineNo">146</span> result.append('N');<a name="line.146"></a> +<span class="sourceLineNo">147</span> index = charAt(value, index + 1) == 'N' ? index + 2 : index + 1;<a name="line.147"></a> +<span class="sourceLineNo">148</span> break;<a name="line.148"></a> +<span class="sourceLineNo">149</span> case '\u00D1':<a name="line.149"></a> +<span class="sourceLineNo">150</span> // N with a tilde (spanish ene)<a name="line.150"></a> +<span class="sourceLineNo">151</span> result.append('N');<a name="line.151"></a> +<span class="sourceLineNo">152</span> index++;<a name="line.152"></a> +<span class="sourceLineNo">153</span> break;<a name="line.153"></a> +<span class="sourceLineNo">154</span> case 'P':<a name="line.154"></a> +<span class="sourceLineNo">155</span> index = handleP(value, result, index);<a name="line.155"></a> +<span class="sourceLineNo">156</span> break;<a name="line.156"></a> +<span class="sourceLineNo">157</span> case 'Q':<a name="line.157"></a> +<span class="sourceLineNo">158</span> result.append('K');<a name="line.158"></a> +<span class="sourceLineNo">159</span> index = charAt(value, index + 1) == 'Q' ? index + 2 : index + 1;<a name="line.159"></a> +<span class="sourceLineNo">160</span> break;<a name="line.160"></a> +<span class="sourceLineNo">161</span> case 'R':<a name="line.161"></a> +<span class="sourceLineNo">162</span> index = handleR(value, result, index, slavoGermanic);<a name="line.162"></a> +<span class="sourceLineNo">163</span> break;<a name="line.163"></a> +<span class="sourceLineNo">164</span> case 'S':<a name="line.164"></a> +<span class="sourceLineNo">165</span> index = handleS(value, result, index, slavoGermanic);<a name="line.165"></a> +<span class="sourceLineNo">166</span> break;<a name="line.166"></a> +<span class="sourceLineNo">167</span> case 'T':<a name="line.167"></a> +<span class="sourceLineNo">168</span> index = handleT(value, result, index);<a name="line.168"></a> +<span class="sourceLineNo">169</span> break;<a name="line.169"></a> +<span class="sourceLineNo">170</span> case 'V':<a name="line.170"></a> +<span class="sourceLineNo">171</span> result.append('F');<a name="line.171"></a> +<span class="sourceLineNo">172</span> index = charAt(value, index + 1) == 'V' ? index + 2 : index + 1;<a name="line.172"></a> +<span class="sourceLineNo">173</span> break;<a name="line.173"></a> +<span class="sourceLineNo">174</span> case 'W':<a name="line.174"></a> +<span class="sourceLineNo">175</span> index = handleW(value, result, index);<a name="line.175"></a> +<span class="sourceLineNo">176</span> break;<a name="line.176"></a> +<span class="sourceLineNo">177</span> case 'X':<a name="line.177"></a> +<span class="sourceLineNo">178</span> index = handleX(value, result, index);<a name="line.178"></a> +<span class="sourceLineNo">179</span> break;<a name="line.179"></a> +<span class="sourceLineNo">180</span> case 'Z':<a name="line.180"></a> +<span class="sourceLineNo">181</span> index = handleZ(value, result, index, slavoGermanic);<a name="line.181"></a> +<span class="sourceLineNo">182</span> break;<a name="line.182"></a> +<span class="sourceLineNo">183</span> default:<a name="line.183"></a> +<span class="sourceLineNo">184</span> index++;<a name="line.184"></a> +<span class="sourceLineNo">185</span> break;<a name="line.185"></a> +<span class="sourceLineNo">186</span> }<a name="line.186"></a> +<span class="sourceLineNo">187</span> }<a name="line.187"></a> +<span class="sourceLineNo">188</span><a name="line.188"></a> +<span class="sourceLineNo">189</span> return alternate ? result.getAlternate() : result.getPrimary();<a name="line.189"></a> +<span class="sourceLineNo">190</span> }<a name="line.190"></a> +<span class="sourceLineNo">191</span><a name="line.191"></a> +<span class="sourceLineNo">192</span> /**<a name="line.192"></a> +<span class="sourceLineNo">193</span> * Encode the value using DoubleMetaphone. It will only work if<a name="line.193"></a> +<span class="sourceLineNo">194</span> * {@code obj} is a {@code String} (like {@code Metaphone}).<a name="line.194"></a> +<span class="sourceLineNo">195</span> *<a name="line.195"></a> +<span class="sourceLineNo">196</span> * @param obj Object to encode (should be of type String)<a name="line.196"></a> +<span class="sourceLineNo">197</span> * @return An encoded Object (will be of type String)<a name="line.197"></a> +<span class="sourceLineNo">198</span> * @throws EncoderException encode parameter is not of type String<a name="line.198"></a> +<span class="sourceLineNo">199</span> */<a name="line.199"></a> +<span class="sourceLineNo">200</span> @Override<a name="line.200"></a> +<span class="sourceLineNo">201</span> public Object encode(final Object obj) throws EncoderException {<a name="line.201"></a> +<span class="sourceLineNo">202</span> if (!(obj instanceof String)) {<a name="line.202"></a> +<span class="sourceLineNo">203</span> throw new EncoderException("DoubleMetaphone encode parameter is not of type String");<a name="line.203"></a> +<span class="sourceLineNo">204</span> }<a name="line.204"></a> +<span class="sourceLineNo">205</span> return doubleMetaphone((String) obj);<a name="line.205"></a> +<span class="sourceLineNo">206</span> }<a name="line.206"></a> +<span class="sourceLineNo">207</span><a name="line.207"></a> +<span class="sourceLineNo">208</span> /**<a name="line.208"></a> +<span class="sourceLineNo">209</span> * Encode the value using DoubleMetaphone.<a name="line.209"></a> +<span class="sourceLineNo">210</span> *<a name="line.210"></a> +<span class="sourceLineNo">211</span> * @param value String to encode<a name="line.211"></a> +<span class="sourceLineNo">212</span> * @return An encoded String<a name="line.212"></a> +<span class="sourceLineNo">213</span> */<a name="line.213"></a> +<span class="sourceLineNo">214</span> @Override<a name="line.214"></a> +<span class="sourceLineNo">215</span> public String encode(final String value) {<a name="line.215"></a> +<span class="sourceLineNo">216</span> return doubleMetaphone(value);<a name="line.216"></a> +<span class="sourceLineNo">217</span> }<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> /**<a name="line.219"></a> +<span class="sourceLineNo">220</span> * Check if the Double Metaphone values of two {@code String} values<a name="line.220"></a> +<span class="sourceLineNo">221</span> * are equal.<a name="line.221"></a> +<span class="sourceLineNo">222</span> *<a name="line.222"></a> +<span class="sourceLineNo">223</span> * @param value1 The left-hand side of the encoded {@link String#equals(Object)}.<a name="line.223"></a> +<span class="sourceLineNo">224</span> * @param value2 The right-hand side of the encoded {@link String#equals(Object)}.<a name="line.224"></a> +<span class="sourceLineNo">225</span> * @return {@code true} if the encoded {@code String}s are equal;<a name="line.225"></a> +<span class="sourceLineNo">226</span> * {@code false} otherwise.<a name="line.226"></a> +<span class="sourceLineNo">227</span> * @see #isDoubleMetaphoneEqual(String,String,boolean)<a name="line.227"></a> +<span class="sourceLineNo">228</span> */<a name="line.228"></a> +<span class="sourceLineNo">229</span> public boolean isDoubleMetaphoneEqual(final String value1, final String value2) {<a name="line.229"></a> +<span class="sourceLineNo">230</span> return isDoubleMetaphoneEqual(value1, value2, false);<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> /**<a name="line.233"></a> +<span class="sourceLineNo">234</span> * Check if the Double Metaphone values of two {@code String} values<a name="line.234"></a> +<span class="sourceLineNo">235</span> * are equal, optionally using the alternate value.<a name="line.235"></a> +<span class="sourceLineNo">236</span> *<a name="line.236"></a> +<span class="sourceLineNo">237</span> * @param value1 The left-hand side of the encoded {@link String#equals(Object)}.<a name="line.237"></a> +<span class="sourceLineNo">238</span> * @param value2 The right-hand side of the encoded {@link String#equals(Object)}.<a name="line.238"></a> +<span class="sourceLineNo">239</span> * @param alternate use the alternate value if {@code true}.<a name="line.239"></a> +<span class="sourceLineNo">240</span> * @return {@code true} if the encoded {@code String}s are equal;<a name="line.240"></a> +<span class="sourceLineNo">241</span> * {@code false} otherwise.<a name="line.241"></a> +<span class="sourceLineNo">242</span> */<a name="line.242"></a> +<span class="sourceLineNo">243</span> public boolean isDoubleMetaphoneEqual(final String value1, final String value2, final boolean alternate) {<a name="line.243"></a> +<span class="sourceLineNo">244</span> return StringUtils.equals(doubleMetaphone(value1, alternate), doubleMetaphone(value2, alternate));<a name="line.244"></a> +<span class="sourceLineNo">245</span> }<a name="line.245"></a> +<span class="sourceLineNo">246</span><a name="line.246"></a> +<span class="sourceLineNo">247</span> /**<a name="line.247"></a> +<span class="sourceLineNo">248</span> * Returns the maxCodeLen.<a name="line.248"></a> +<span class="sourceLineNo">249</span> * @return int<a name="line.249"></a> +<span class="sourceLineNo">250</span> */<a name="line.250"></a> +<span class="sourceLineNo">251</span> public int getMaxCodeLen() {<a name="line.251"></a> +<span class="sourceLineNo">252</span> return this.maxCodeLen;<a name="line.252"></a> +<span class="sourceLineNo">253</span> }<a name="line.253"></a> +<span class="sourceLineNo">254</span><a name="line.254"></a> +<span class="sourceLineNo">255</span> /**<a name="line.255"></a> +<span class="sourceLineNo">256</span> * Sets the maxCodeLen.<a name="line.256"></a> +<span class="sourceLineNo">257</span> * @param maxCodeLen The maxCodeLen to set<a name="line.257"></a> +<span class="sourceLineNo">258</span> */<a name="line.258"></a> +<span class="sourceLineNo">259</span> public void setMaxCodeLen(final int maxCodeLen) {<a name="line.259"></a> +<span class="sourceLineNo">260</span> this.maxCodeLen = maxCodeLen;<a name="line.260"></a> +<span class="sourceLineNo">261</span> }<a name="line.261"></a> +<span class="sourceLineNo">262</span><a name="line.262"></a> +<span class="sourceLineNo">263</span> //-- BEGIN HANDLERS --//<a name="line.263"></a> +<span class="sourceLineNo">264</span><a name="line.264"></a> +<span class="sourceLineNo">265</span> /**<a name="line.265"></a> +<span class="sourceLineNo">266</span> * Handles 'A', 'E', 'I', 'O', 'U', and 'Y' cases.<a name="line.266"></a> +<span class="sourceLineNo">267</span> */<a name="line.267"></a> +<span class="sourceLineNo">268</span> private int handleAEIOUY(final DoubleMetaphoneResult result, final int index) {<a name="line.268"></a> +<span class="sourceLineNo">269</span> if (index == 0) {<a name="line.269"></a> +<span class="sourceLineNo">270</span> result.append('A');<a name="line.270"></a> +<span class="sourceLineNo">271</span> }<a name="line.271"></a> +<span class="sourceLineNo">272</span> return index + 1;<a name="line.272"></a> +<span class="sourceLineNo">273</span> }<a name="line.273"></a> +<span class="sourceLineNo">274</span><a name="line.274"></a> +<span class="sourceLineNo">275</span> /**<a name="line.275"></a> +<span class="sourceLineNo">276</span> * Handles 'C' cases.<a name="line.276"></a> +<span class="sourceLineNo">277</span> */<a name="line.277"></a> +<span class="sourceLineNo">278</span> private int handleC(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.278"></a> +<span class="sourceLineNo">279</span> if (conditionC0(value, index)) { // very confusing, moved out<a name="line.279"></a> +<span class="sourceLineNo">280</span> result.append('K');<a name="line.280"></a> +<span class="sourceLineNo">281</span> index += 2;<a name="line.281"></a> +<span class="sourceLineNo">282</span> } else if (index == 0 && contains(value, index, 6, "CAESAR")) {<a name="line.282"></a> +<span class="sourceLineNo">283</span> result.append('S');<a name="line.283"></a> +<span class="sourceLineNo">284</span> index += 2;<a name="line.284"></a> +<span class="sourceLineNo">285</span> } else if (contains(value, index, 2, "CH")) {<a name="line.285"></a> +<span class="sourceLineNo">286</span> index = handleCH(value, result, index);<a name="line.286"></a> +<span class="sourceLineNo">287</span> } else if (contains(value, index, 2, "CZ") &&<a name="line.287"></a> +<span class="sourceLineNo">288</span> !contains(value, index - 2, 4, "WICZ")) {<a name="line.288"></a> +<span class="sourceLineNo">289</span> //-- "Czerny" --//<a name="line.289"></a> +<span class="sourceLineNo">290</span> result.append('S', 'X');<a name="line.290"></a> +<span class="sourceLineNo">291</span> index += 2;<a name="line.291"></a> +<span class="sourceLineNo">292</span> } else if (contains(value, index + 1, 3, "CIA")) {<a name="line.292"></a> +<span class="sourceLineNo">293</span> //-- "focaccia" --//<a name="line.293"></a> +<span class="sourceLineNo">294</span> result.append('X');<a name="line.294"></a> +<span class="sourceLineNo">295</span> index += 3;<a name="line.295"></a> +<span class="sourceLineNo">296</span> } else if (contains(value, index, 2, "CC") &&<a name="line.296"></a> +<span class="sourceLineNo">297</span> !(index == 1 && charAt(value, 0) == 'M')) {<a name="line.297"></a> +<span class="sourceLineNo">298</span> //-- double "cc" but not "McClelland" --//<a name="line.298"></a> +<span class="sourceLineNo">299</span> return handleCC(value, result, index);<a name="line.299"></a> +<span class="sourceLineNo">300</span> } else if (contains(value, index, 2, "CK", "CG", "CQ")) {<a name="line.300"></a> +<span class="sourceLineNo">301</span> result.append('K');<a name="line.301"></a> +<span class="sourceLineNo">302</span> index += 2;<a name="line.302"></a> +<span class="sourceLineNo">303</span> } else if (contains(value, index, 2, "CI", "CE", "CY")) {<a name="line.303"></a> +<span class="sourceLineNo">304</span> //-- Italian vs. English --//<a name="line.304"></a> +<span class="sourceLineNo">305</span> if (contains(value, index, 3, "CIO", "CIE", "CIA")) {<a name="line.305"></a> +<span class="sourceLineNo">306</span> result.append('S', 'X');<a name="line.306"></a> +<span class="sourceLineNo">307</span> } else {<a name="line.307"></a> +<span class="sourceLineNo">308</span> result.append('S');<a name="line.308"></a> +<span class="sourceLineNo">309</span> }<a name="line.309"></a> +<span class="sourceLineNo">310</span> index += 2;<a name="line.310"></a> +<span class="sourceLineNo">311</span> } else {<a name="line.311"></a> +<span class="sourceLineNo">312</span> result.append('K');<a name="line.312"></a> +<span class="sourceLineNo">313</span> if (contains(value, index + 1, 2, " C", " Q", " G")) {<a name="line.313"></a> +<span class="sourceLineNo">314</span> //-- Mac Caffrey, Mac Gregor --//<a name="line.314"></a> +<span class="sourceLineNo">315</span> index += 3;<a name="line.315"></a> +<span class="sourceLineNo">316</span> } else if (contains(value, index + 1, 1, "C", "K", "Q") &&<a name="line.316"></a> +<span class="sourceLineNo">317</span> !contains(value, index + 1, 2, "CE", "CI")) {<a name="line.317"></a> +<span class="sourceLineNo">318</span> index += 2;<a name="line.318"></a> +<span class="sourceLineNo">319</span> } else {<a name="line.319"></a> +<span class="sourceLineNo">320</span> index++;<a name="line.320"></a> +<span class="sourceLineNo">321</span> }<a name="line.321"></a> +<span class="sourceLineNo">322</span> }<a name="line.322"></a> +<span class="sourceLineNo">323</span><a name="line.323"></a> +<span class="sourceLineNo">324</span> return index;<a name="line.324"></a> +<span class="sourceLineNo">325</span> }<a name="line.325"></a> +<span class="sourceLineNo">326</span><a name="line.326"></a> +<span class="sourceLineNo">327</span> /**<a name="line.327"></a> +<span class="sourceLineNo">328</span> * Handles 'CC' cases.<a name="line.328"></a> +<span class="sourceLineNo">329</span> */<a name="line.329"></a> +<span class="sourceLineNo">330</span> private int handleCC(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.330"></a> +<span class="sourceLineNo">331</span> if (contains(value, index + 2, 1, "I", "E", "H") &&<a name="line.331"></a> +<span class="sourceLineNo">332</span> !contains(value, index + 2, 2, "HU")) {<a name="line.332"></a> +<span class="sourceLineNo">333</span> //-- "bellocchio" but not "bacchus" --//<a name="line.333"></a> +<span class="sourceLineNo">334</span> if ((index == 1 && charAt(value, index - 1) == 'A') ||<a name="line.334"></a> +<span class="sourceLineNo">335</span> contains(value, index - 1, 5, "UCCEE", "UCCES")) {<a name="line.335"></a> +<span class="sourceLineNo">336</span> //-- "accident", "accede", "succeed" --//<a name="line.336"></a> +<span class="sourceLineNo">337</span> result.append("KS");<a name="line.337"></a> +<span class="sourceLineNo">338</span> } else {<a name="line.338"></a> +<span class="sourceLineNo">339</span> //-- "bacci", "bertucci", other Italian --//<a name="line.339"></a> +<span class="sourceLineNo">340</span> result.append('X');<a name="line.340"></a> +<span class="sourceLineNo">341</span> }<a name="line.341"></a> +<span class="sourceLineNo">342</span> index += 3;<a name="line.342"></a> +<span class="sourceLineNo">343</span> } else { // Pierce's rule<a name="line.343"></a> +<span class="sourceLineNo">344</span> result.append('K');<a name="line.344"></a> +<span class="sourceLineNo">345</span> index += 2;<a name="line.345"></a> +<span class="sourceLineNo">346</span> }<a name="line.346"></a> +<span class="sourceLineNo">347</span><a name="line.347"></a> +<span class="sourceLineNo">348</span> return index;<a name="line.348"></a> +<span class="sourceLineNo">349</span> }<a name="line.349"></a> +<span class="sourceLineNo">350</span><a name="line.350"></a> +<span class="sourceLineNo">351</span> /**<a name="line.351"></a> +<span class="sourceLineNo">352</span> * Handles 'CH' cases.<a name="line.352"></a> +<span class="sourceLineNo">353</span> */<a name="line.353"></a> +<span class="sourceLineNo">354</span> private int handleCH(final String value, final DoubleMetaphoneResult result, final int index) {<a name="line.354"></a> +<span class="sourceLineNo">355</span> if (index > 0 && contains(value, index, 4, "CHAE")) { // Michael<a name="line.355"></a> +<span class="sourceLineNo">356</span> result.append('K', 'X');<a name="line.356"></a> +<span class="sourceLineNo">357</span> return index + 2;<a name="line.357"></a> +<span class="sourceLineNo">358</span> } else if (conditionCH0(value, index)) {<a name="line.358"></a> +<span class="sourceLineNo">359</span> //-- Greek roots ("chemistry", "chorus", etc.) --//<a name="line.359"></a> +<span class="sourceLineNo">360</span> result.append('K');<a name="line.360"></a> +<span class="sourceLineNo">361</span> return index + 2;<a name="line.361"></a> +<span class="sourceLineNo">362</span> } else if (conditionCH1(value, index)) {<a name="line.362"></a> +<span class="sourceLineNo">363</span> //-- Germanic, Greek, or otherwise 'ch' for 'kh' sound --//<a name="line.363"></a> +<span class="sourceLineNo">364</span> result.append('K');<a name="line.364"></a> +<span class="sourceLineNo">365</span> return index + 2;<a name="line.365"></a> +<span class="sourceLineNo">366</span> } else {<a name="line.366"></a> +<span class="sourceLineNo">367</span> if (index > 0) {<a name="line.367"></a> +<span class="sourceLineNo">368</span> if (contains(value, 0, 2, "MC")) {<a name="line.368"></a> +<span class="sourceLineNo">369</span> result.append('K');<a name="line.369"></a> +<span class="sourceLineNo">370</span> } else {<a name="line.370"></a> +<span class="sourceLineNo">371</span> result.append('X', 'K');<a name="line.371"></a> +<span class="sourceLineNo">372</span> }<a name="line.372"></a> +<span class="sourceLineNo">373</span> } else {<a name="line.373"></a> +<span class="sourceLineNo">374</span> result.append('X');<a name="line.374"></a> +<span class="sourceLineNo">375</span> }<a name="line.375"></a> +<span class="sourceLineNo">376</span> return index + 2;<a name="line.376"></a> +<span class="sourceLineNo">377</span> }<a name="line.377"></a> +<span class="sourceLineNo">378</span> }<a name="line.378"></a> +<span class="sourceLineNo">379</span><a name="line.379"></a> +<span class="sourceLineNo">380</span> /**<a name="line.380"></a> +<span class="sourceLineNo">381</span> * Handles 'D' cases.<a name="line.381"></a> +<span class="sourceLineNo">382</span> */<a name="line.382"></a> +<span class="sourceLineNo">383</span> private int handleD(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.383"></a> +<span class="sourceLineNo">384</span> if (contains(value, index, 2, "DG")) {<a name="line.384"></a> +<span class="sourceLineNo">385</span> //-- "Edge" --//<a name="line.385"></a> +<span class="sourceLineNo">386</span> if (contains(value, index + 2, 1, "I", "E", "Y")) {<a name="line.386"></a> +<span class="sourceLineNo">387</span> result.append('J');<a name="line.387"></a> +<span class="sourceLineNo">388</span> index += 3;<a name="line.388"></a> +<span class="sourceLineNo">389</span> //-- "Edgar" --//<a name="line.389"></a> +<span class="sourceLineNo">390</span> } else {<a name="line.390"></a> +<span class="sourceLineNo">391</span> result.append("TK");<a name="line.391"></a> +<span class="sourceLineNo">392</span> index += 2;<a name="line.392"></a> +<span class="sourceLineNo">393</span> }<a name="line.393"></a> +<span class="sourceLineNo">394</span> } else if (contains(value, index, 2, "DT", "DD")) {<a name="line.394"></a> +<span class="sourceLineNo">395</span> result.append('T');<a name="line.395"></a> +<span class="sourceLineNo">396</span> index += 2;<a name="line.396"></a> +<span class="sourceLineNo">397</span> } else {<a name="line.397"></a> +<span class="sourceLineNo">398</span> result.append('T');<a name="line.398"></a> +<span class="sourceLineNo">399</span> index++;<a name="line.399"></a> +<span class="sourceLineNo">400</span> }<a name="line.400"></a> +<span class="sourceLineNo">401</span> return index;<a name="line.401"></a> +<span class="sourceLineNo">402</span> }<a name="line.402"></a> +<span class="sourceLineNo">403</span><a name="line.403"></a> +<span class="sourceLineNo">404</span> /**<a name="line.404"></a> +<span class="sourceLineNo">405</span> * Handles 'G' cases.<a name="line.405"></a> +<span class="sourceLineNo">406</span> */<a name="line.406"></a> +<span class="sourceLineNo">407</span> private int handleG(final String value, final DoubleMetaphoneResult result, int index,<a name="line.407"></a> +<span class="sourceLineNo">408</span> final boolean slavoGermanic) {<a name="line.408"></a> +<span class="sourceLineNo">409</span> if (charAt(value, index + 1) == 'H') {<a name="line.409"></a> +<span class="sourceLineNo">410</span> index = handleGH(value, result, index);<a name="line.410"></a> +<span class="sourceLineNo">411</span> } else if (charAt(value, index + 1) == 'N') {<a name="line.411"></a> +<span class="sourceLineNo">412</span> if (index == 1 && isVowel(charAt(value, 0)) && !slavoGermanic) {<a name="line.412"></a> +<span class="sourceLineNo">413</span> result.append("KN", "N");<a name="line.413"></a> +<span class="sourceLineNo">414</span> } else if (!contains(value, index + 2, 2, "EY") &&<a name="line.414"></a> +<span class="sourceLineNo">415</span> charAt(value, index + 1) != 'Y' && !slavoGermanic) {<a name="line.415"></a> +<span class="sourceLineNo">416</span> result.append("N", "KN");<a name="line.416"></a> +<span class="sourceLineNo">417</span> } else {<a name="line.417"></a> +<span class="sourceLineNo">418</span> result.append("KN");<a name="line.418"></a> +<span class="sourceLineNo">419</span> }<a name="line.419"></a> +<span class="sourceLineNo">420</span> index = index + 2;<a name="line.420"></a> +<span class="sourceLineNo">421</span> } else if (contains(value, index + 1, 2, "LI") && !slavoGermanic) {<a name="line.421"></a> +<span class="sourceLineNo">422</span> result.append("KL", "L");<a name="line.422"></a> +<span class="sourceLineNo">423</span> index += 2;<a name="line.423"></a> +<span class="sourceLineNo">424</span> } else if (index == 0 &&<a name="line.424"></a> +<span class="sourceLineNo">425</span> (charAt(value, index + 1) == 'Y' ||<a name="line.425"></a> +<span class="sourceLineNo">426</span> contains(value, index + 1, 2, ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER))) {<a name="line.426"></a> +<span class="sourceLineNo">427</span> //-- -ges-, -gep-, -gel-, -gie- at beginning --//<a name="line.427"></a> +<span class="sourceLineNo">428</span> result.append('K', 'J');<a name="line.428"></a> +<span class="sourceLineNo">429</span> index += 2;<a name="line.429"></a> +<span class="sourceLineNo">430</span> } else if ((contains(value, index + 1, 2, "ER") ||<a name="line.430"></a> +<span class="sourceLineNo">431</span> charAt(value, index + 1) == 'Y') &&<a name="line.431"></a> +<span class="sourceLineNo">432</span> !contains(value, 0, 6, "DANGER", "RANGER", "MANGER") &&<a name="line.432"></a> +<span class="sourceLineNo">433</span> !contains(value, index - 1, 1, "E", "I") &&<a name="line.433"></a> +<span class="sourceLineNo">434</span> !contains(value, index - 1, 3, "RGY", "OGY")) {<a name="line.434"></a> +<span class="sourceLineNo">435</span> //-- -ger-, -gy- --//<a name="line.435"></a> +<span class="sourceLineNo">436</span> result.append('K', 'J');<a name="line.436"></a> +<span class="sourceLineNo">437</span> index += 2;<a name="line.437"></a> +<span class="sourceLineNo">438</span> } else if (contains(value, index + 1, 1, "E", "I", "Y") ||<a name="line.438"></a> +<span class="sourceLineNo">439</span> contains(value, index - 1, 4, "AGGI", "OGGI")) {<a name="line.439"></a> +<span class="sourceLineNo">440</span> //-- Italian "biaggi" --//<a name="line.440"></a> +<span class="sourceLineNo">441</span> if (contains(value, 0 ,4, "VAN ", "VON ") ||<a name="line.441"></a> +<span class="sourceLineNo">442</span> contains(value, 0, 3, "SCH") ||<a name="line.442"></a> +<span class="sourceLineNo">443</span> contains(value, index + 1, 2, "ET")) {<a name="line.443"></a> +<span class="sourceLineNo">444</span> //-- obvious germanic --//<a name="line.444"></a> +<span class="sourceLineNo">445</span> result.append('K');<a name="line.445"></a> +<span class="sourceLineNo">446</span> } else if (contains(value, index + 1, 3, "IER")) {<a name="line.446"></a> +<span class="sourceLineNo">447</span> result.append('J');<a name="line.447"></a> +<span class="sourceLineNo">448</span> } else {<a name="line.448"></a> +<span class="sourceLineNo">449</span> result.append('J', 'K');<a name="line.449"></a> +<span class="sourceLineNo">450</span> }<a name="line.450"></a> +<span class="sourceLineNo">451</span> index += 2;<a name="line.451"></a> +<span class="sourceLineNo">452</span> } else if (charAt(value, index + 1) == 'G') {<a name="line.452"></a> +<span class="sourceLineNo">453</span> index += 2;<a name="line.453"></a> +<span class="sourceLineNo">454</span> result.append('K');<a name="line.454"></a> +<span class="sourceLineNo">455</span> } else {<a name="line.455"></a> +<span class="sourceLineNo">456</span> index++;<a name="line.456"></a> +<span class="sourceLineNo">457</span> result.append('K');<a name="line.457"></a> +<span class="sourceLineNo">458</span> }<a name="line.458"></a> +<span class="sourceLineNo">459</span> return index;<a name="line.459"></a> +<span class="sourceLineNo">460</span> }<a name="line.460"></a> +<span class="sourceLineNo">461</span><a name="line.461"></a> +<span class="sourceLineNo">462</span> /**<a name="line.462"></a> +<span class="sourceLineNo">463</span> * Handles 'GH' cases.<a name="line.463"></a> +<span class="sourceLineNo">464</span> */<a name="line.464"></a> +<span class="sourceLineNo">465</span> private int handleGH(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.465"></a> +<span class="sourceLineNo">466</span> if (index > 0 && !isVowel(charAt(value, index - 1))) {<a name="line.466"></a> +<span class="sourceLineNo">467</span> result.append('K');<a name="line.467"></a> +<span class="sourceLineNo">468</span> index += 2;<a name="line.468"></a> +<span class="sourceLineNo">469</span> } else if (index == 0) {<a name="line.469"></a> +<span class="sourceLineNo">470</span> if (charAt(value, index + 2) == 'I') {<a name="line.470"></a> +<span class="sourceLineNo">471</span> result.append('J');<a name="line.471"></a> +<span class="sourceLineNo">472</span> } else {<a name="line.472"></a> +<span class="sourceLineNo">473</span> result.append('K');<a name="line.473"></a> +<span class="sourceLineNo">474</span> }<a name="line.474"></a> +<span class="sourceLineNo">475</span> index += 2;<a name="line.475"></a> +<span class="sourceLineNo">476</span> } else if ((index > 1 && contains(value, index - 2, 1, "B", "H", "D")) ||<a name="line.476"></a> +<span class="sourceLineNo">477</span> (index > 2 && contains(value, index - 3, 1, "B", "H", "D")) ||<a name="line.477"></a> +<span class="sourceLineNo">478</span> (index > 3 && contains(value, index - 4, 1, "B", "H"))) {<a name="line.478"></a> +<span class="sourceLineNo">479</span> //-- Parker's rule (with some further refinements) - "hugh"<a name="line.479"></a> +<span class="sourceLineNo">480</span> index += 2;<a name="line.480"></a> +<span class="sourceLineNo">481</span> } else {<a name="line.481"></a> +<span class="sourceLineNo">482</span> if (index > 2 && charAt(value, index - 1) == 'U' &&<a name="line.482"></a> +<span class="sourceLineNo">483</span> contains(value, index - 3, 1, "C", "G", "L", "R", "T")) {<a name="line.483"></a> +<span class="sourceLineNo">484</span> //-- "laugh", "McLaughlin", "cough", "gough", "rough", "tough"<a name="line.484"></a> +<span class="sourceLineNo">485</span> result.append('F');<a name="line.485"></a> +<span class="sourceLineNo">486</span> } else if (index > 0 && charAt(value, index - 1) != 'I') {<a name="line.486"></a> +<span class="sourceLineNo">487</span> result.append('K');<a name="line.487"></a> +<span class="sourceLineNo">488</span> }<a name="line.488"></a> +<span class="sourceLineNo">489</span> index += 2;<a name="line.489"></a> +<span class="sourceLineNo">490</span> }<a name="line.490"></a> +<span class="sourceLineNo">491</span> return index;<a name="line.491"></a> +<span class="sourceLineNo">492</span> }<a name="line.492"></a> +<span class="sourceLineNo">493</span><a name="line.493"></a> +<span class="sourceLineNo">494</span> /**<a name="line.494"></a> +<span class="sourceLineNo">495</span> * Handles 'H' cases.<a name="line.495"></a> +<span class="sourceLineNo">496</span> */<a name="line.496"></a> +<span class="sourceLineNo">497</span> private int handleH(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.497"></a> +<span class="sourceLineNo">498</span> //-- only keep if first & before vowel or between 2 vowels --//<a name="line.498"></a> +<span class="sourceLineNo">499</span> if ((index == 0 || isVowel(charAt(value, index - 1))) &&<a name="line.499"></a> +<span class="sourceLineNo">500</span> isVowel(charAt(value, index + 1))) {<a name="line.500"></a> +<span class="sourceLineNo">501</span> result.append('H');<a name="line.501"></a> +<span class="sourceLineNo">502</span> index += 2;<a name="line.502"></a> +<span class="sourceLineNo">503</span> //-- also takes car of "HH" --//<a name="line.503"></a> +<span class="sourceLineNo">504</span> } else {<a name="line.504"></a> +<span class="sourceLineNo">505</span> index++;<a name="line.505"></a> +<span class="sourceLineNo">506</span> }<a name="line.506"></a> +<span class="sourceLineNo">507</span> return index;<a name="line.507"></a> +<span class="sourceLineNo">508</span> }<a name="line.508"></a> +<span class="sourceLineNo">509</span><a name="line.509"></a> +<span class="sourceLineNo">510</span> /**<a name="line.510"></a> +<span class="sourceLineNo">511</span> * Handles 'J' cases.<a name="line.511"></a> +<span class="sourceLineNo">512</span> */<a name="line.512"></a> +<span class="sourceLineNo">513</span> private int handleJ(final String value, final DoubleMetaphoneResult result, int index,<a name="line.513"></a> +<span class="sourceLineNo">514</span> final boolean slavoGermanic) {<a name="line.514"></a> +<span class="sourceLineNo">515</span> if (contains(value, index, 4, "JOSE") || contains(value, 0, 4, "SAN ")) {<a name="line.515"></a> +<span class="sourceLineNo">516</span> //-- obvious Spanish, "Jose", "San Jacinto" --//<a name="line.516"></a> +<span class="sourceLineNo">517</span> if ((index == 0 && (charAt(value, index + 4) == ' ') ||<a name="line.517"></a> +<span class="sourceLineNo">518</span> value.length() == 4) || contains(value, 0, 4, "SAN ")) {<a name="line.518"></a> +<span class="sourceLineNo">519</span> result.append('H');<a name="line.519"></a> +<span class="sourceLineNo">520</span> } else {<a name="line.520"></a> +<span class="sourceLineNo">521</span> result.append('J', 'H');<a name="line.521"></a> +<span class="sourceLineNo">522</span> }<a name="line.522"></a> +<span class="sourceLineNo">523</span> index++;<a name="line.523"></a> +<span class="sourceLineNo">524</span> } else {<a name="line.524"></a> +<span class="sourceLineNo">525</span> if (index == 0 && !contains(value, index, 4, "JOSE")) {<a name="line.525"></a> +<span class="sourceLineNo">526</span> result.append('J', 'A');<a name="line.526"></a> +<span class="sourceLineNo">527</span> } else if (isVowel(charAt(value, index - 1)) && !slavoGermanic &&<a name="line.527"></a> +<span class="sourceLineNo">528</span> (charAt(value, index + 1) == 'A' || charAt(value, index + 1) == 'O')) {<a name="line.528"></a> +<span class="sourceLineNo">529</span> result.append('J', 'H');<a name="line.529"></a> +<span class="sourceLineNo">530</span> } else if (index == value.length() - 1) {<a name="line.530"></a> +<span class="sourceLineNo">531</span> result.append('J', ' ');<a name="line.531"></a> +<span class="sourceLineNo">532</span> } else if (!contains(value, index + 1, 1, L_T_K_S_N_M_B_Z) &&<a name="line.532"></a> +<span class="sourceLineNo">533</span> !contains(value, index - 1, 1, "S", "K", "L")) {<a name="line.533"></a> +<span class="sourceLineNo">534</span> result.append('J');<a name="line.534"></a> +<span class="sourceLineNo">535</span> }<a name="line.535"></a> +<span class="sourceLineNo">536</span><a name="line.536"></a> +<span class="sourceLineNo">537</span> if (charAt(value, index + 1) == 'J') {<a name="line.537"></a> +<span class="sourceLineNo">538</span> index += 2;<a name="line.538"></a> +<span class="sourceLineNo">539</span> } else {<a name="line.539"></a> +<span class="sourceLineNo">540</span> index++;<a name="line.540"></a> +<span class="sourceLineNo">541</span> }<a name="line.541"></a> +<span class="sourceLineNo">542</span> }<a name="line.542"></a> +<span class="sourceLineNo">543</span> return index;<a name="line.543"></a> +<span class="sourceLineNo">544</span> }<a name="line.544"></a> +<span class="sourceLineNo">545</span><a name="line.545"></a> +<span class="sourceLineNo">546</span> /**<a name="line.546"></a> +<span class="sourceLineNo">547</span> * Handles 'L' cases.<a name="line.547"></a> +<span class="sourceLineNo">548</span> */<a name="line.548"></a> +<span class="sourceLineNo">549</span> private int handleL(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.549"></a> +<span class="sourceLineNo">550</span> if (charAt(value, index + 1) == 'L') {<a name="line.550"></a> +<span class="sourceLineNo">551</span> if (conditionL0(value, index)) {<a name="line.551"></a> +<span class="sourceLineNo">552</span> result.appendPrimary('L');<a name="line.552"></a> +<span class="sourceLineNo">553</span> } else {<a name="line.553"></a> +<span class="sourceLineNo">554</span> result.append('L');<a name="line.554"></a> +<span class="sourceLineNo">555</span> }<a name="line.555"></a> +<span class="sourceLineNo">556</span> index += 2;<a name="line.556"></a> +<span class="sourceLineNo">557</span> } else {<a name="line.557"></a> +<span class="sourceLineNo">558</span> index++;<a name="line.558"></a> +<span class="sourceLineNo">559</span> result.append('L');<a name="line.559"></a> +<span class="sourceLineNo">560</span> }<a name="line.560"></a> +<span class="sourceLineNo">561</span> return index;<a name="line.561"></a> +<span class="sourceLineNo">562</span> }<a name="line.562"></a> +<span class="sourceLineNo">563</span><a name="line.563"></a> +<span class="sourceLineNo">564</span> /**<a name="line.564"></a> +<span class="sourceLineNo">565</span> * Handles 'P' cases.<a name="line.565"></a> +<span class="sourceLineNo">566</span> */<a name="line.566"></a> +<span class="sourceLineNo">567</span> private int handleP(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.567"></a> +<span class="sourceLineNo">568</span> if (charAt(value, index + 1) == 'H') {<a name="line.568"></a> +<span class="sourceLineNo">569</span> result.append('F');<a name="line.569"></a> +<span class="sourceLineNo">570</span> index += 2;<a name="line.570"></a> +<span class="sourceLineNo">571</span> } else {<a name="line.571"></a> +<span class="sourceLineNo">572</span> result.append('P');<a name="line.572"></a> +<span class="sourceLineNo">573</span> index = contains(value, index + 1, 1, "P", "B") ? index + 2 : index + 1;<a name="line.573"></a> +<span class="sourceLineNo">574</span> }<a name="line.574"></a> +<span class="sourceLineNo">575</span> return index;<a name="line.575"></a> +<span class="sourceLineNo">576</span> }<a name="line.576"></a> +<span class="sourceLineNo">577</span><a name="line.577"></a> +<span class="sourceLineNo">578</span> /**<a name="line.578"></a> +<span class="sourceLineNo">579</span> * Handles 'R' cases.<a name="line.579"></a> +<span class="sourceLineNo">580</span> */<a name="line.580"></a> +<span class="sourceLineNo">581</span> private int handleR(final String value, final DoubleMetaphoneResult result, final int index,<a name="line.581"></a> +<span class="sourceLineNo">582</span> final boolean slavoGermanic) {<a name="line.582"></a> +<span class="sourceLineNo">583</span> if (index == value.length() - 1 && !slavoGermanic &&<a name="line.583"></a> +<span class="sourceLineNo">584</span> contains(value, index - 2, 2, "IE") &&<a name="line.584"></a> +<span class="sourceLineNo">585</span> !contains(value, index - 4, 2, "ME", "MA")) {<a name="line.585"></a> +<span class="sourceLineNo">586</span> result.appendAlternate('R');<a name="line.586"></a> +<span class="sourceLineNo">587</span> } else {<a name="line.587"></a> +<span class="sourceLineNo">588</span> result.append('R');<a name="line.588"></a> +<span class="sourceLineNo">589</span> }<a name="line.589"></a> +<span class="sourceLineNo">590</span> return charAt(value, index + 1) == 'R' ? index + 2 : index + 1;<a name="line.590"></a> +<span class="sourceLineNo">591</span> }<a name="line.591"></a> +<span class="sourceLineNo">592</span><a name="line.592"></a> +<span class="sourceLineNo">593</span> /**<a name="line.593"></a> +<span class="sourceLineNo">594</span> * Handles 'S' cases.<a name="line.594"></a> +<span class="sourceLineNo">595</span> */<a name="line.595"></a> +<span class="sourceLineNo">596</span> private int handleS(final String value, final DoubleMetaphoneResult result, int index,<a name="line.596"></a> +<span class="sourceLineNo">597</span> final boolean slavoGermanic) {<a name="line.597"></a> +<span class="sourceLineNo">598</span> if (contains(value, index - 1, 3, "ISL", "YSL")) {<a name="line.598"></a> +<span class="sourceLineNo">599</span> //-- special cases "island", "isle", "carlisle", "carlysle" --//<a name="line.599"></a> +<span class="sourceLineNo">600</span> index++;<a name="line.600"></a> +<span class="sourceLineNo">601</span> } else if (index == 0 && contains(value, index, 5, "SUGAR")) {<a name="line.601"></a> +<span class="sourceLineNo">602</span> //-- special case "sugar-" --//<a name="line.602"></a> +<span class="sourceLineNo">603</span> result.append('X', 'S');<a name="line.603"></a> +<span class="sourceLineNo">604</span> index++;<a name="line.604"></a> +<span class="sourceLineNo">605</span> } else if (contains(value, index, 2, "SH")) {<a name="line.605"></a> +<span class="sourceLineNo">606</span> if (contains(value, index + 1, 4, "HEIM", "HOEK", "HOLM", "HOLZ")) {<a name="line.606"></a> +<span class="sourceLineNo">607</span> //-- germanic --//<a name="line.607"></a> +<span class="sourceLineNo">608</span> result.append('S');<a name="line.608"></a> +<span class="sourceLineNo">609</span> } else {<a name="line.609"></a> +<span class="sourceLineNo">610</span> result.append('X');<a name="line.610"></a> +<span class="sourceLineNo">611</span> }<a name="line.611"></a> +<span class="sourceLineNo">612</span> index += 2;<a name="line.612"></a> +<span class="sourceLineNo">613</span> } else if (contains(value, index, 3, "SIO", "SIA") || contains(value, index, 4, "SIAN")) {<a name="line.613"></a> +<span class="sourceLineNo">614</span> //-- Italian and Armenian --//<a name="line.614"></a> +<span class="sourceLineNo">615</span> if (slavoGermanic) {<a name="line.615"></a> +<span class="sourceLineNo">616</span> result.append('S');<a name="line.616"></a> +<span class="sourceLineNo">617</span> } else {<a name="line.617"></a> +<span class="sourceLineNo">618</span> result.append('S', 'X');<a name="line.618"></a> +<span class="sourceLineNo">619</span> }<a name="line.619"></a> +<span class="sourceLineNo">620</span> index += 3;<a name="line.620"></a> +<span class="sourceLineNo">621</span> } else if ((index == 0 && contains(value, index + 1, 1, "M", "N", "L", "W")) ||<a name="line.621"></a> +<span class="sourceLineNo">622</span> contains(value, index + 1, 1, "Z")) {<a name="line.622"></a> +<span class="sourceLineNo">623</span> //-- german & anglicisations, e.g. "smith" match "schmidt" //<a name="line.623"></a> +<span class="sourceLineNo">624</span> // "snider" match "schneider" --//<a name="line.624"></a> +<span class="sourceLineNo">625</span> //-- also, -sz- in slavic language although in hungarian it //<a name="line.625"></a> +<span class="sourceLineNo">626</span> // is pronounced "s" --//<a name="line.626"></a> +<span class="sourceLineNo">627</span> result.append('S', 'X');<a name="line.627"></a> +<span class="sourceLineNo">628</span> index = contains(value, index + 1, 1, "Z") ? index + 2 : index + 1;<a name="line.628"></a> +<span class="sourceLineNo">629</span> } else if (contains(value, index, 2, "SC")) {<a name="line.629"></a> +<span class="sourceLineNo">630</span> index = handleSC(value, result, index);<a name="line.630"></a> +<span class="sourceLineNo">631</span> } else {<a name="line.631"></a> +<span class="sourceLineNo">632</span> if (index == value.length() - 1 && contains(value, index - 2, 2, "AI", "OI")) {<a name="line.632"></a> +<span class="sourceLineNo">633</span> //-- french e.g. "resnais", "artois" --//<a name="line.633"></a> +<span class="sourceLineNo">634</span> result.appendAlternate('S');<a name="line.634"></a> +<span class="sourceLineNo">635</span> } else {<a name="line.635"></a> +<span class="sourceLineNo">636</span> result.append('S');<a name="line.636"></a> +<span class="sourceLineNo">637</span> }<a name="line.637"></a> +<span class="sourceLineNo">638</span> index = contains(value, index + 1, 1, "S", "Z") ? index + 2 : index + 1;<a name="line.638"></a> +<span class="sourceLineNo">639</span> }<a name="line.639"></a> +<span class="sourceLineNo">640</span> return index;<a name="line.640"></a> +<span class="sourceLineNo">641</span> }<a name="line.641"></a> +<span class="sourceLineNo">642</span><a name="line.642"></a> +<span class="sourceLineNo">643</span> /**<a name="line.643"></a> +<span class="sourceLineNo">644</span> * Handles 'SC' cases.<a name="line.644"></a> +<span class="sourceLineNo">645</span> */<a name="line.645"></a> +<span class="sourceLineNo">646</span> private int handleSC(final String value, final DoubleMetaphoneResult result, final int index) {<a name="line.646"></a> +<span class="sourceLineNo">647</span> if (charAt(value, index + 2) == 'H') {<a name="line.647"></a> +<span class="sourceLineNo">648</span> //-- Schlesinger's rule --//<a name="line.648"></a> +<span class="sourceLineNo">649</span> if (contains(value, index + 3, 2, "OO", "ER", "EN", "UY", "ED", "EM")) {<a name="line.649"></a> +<span class="sourceLineNo">650</span> //-- Dutch origin, e.g. "school", "schooner" --//<a name="line.650"></a> +<span class="sourceLineNo">651</span> if (contains(value, index + 3, 2, "ER", "EN")) {<a name="line.651"></a> +<span class="sourceLineNo">652</span> //-- "schermerhorn", "schenker" --//<a name="line.652"></a> +<span class="sourceLineNo">653</span> result.append("X", "SK");<a name="line.653"></a> +<span class="sourceLineNo">654</span> } else {<a name="line.654"></a> +<span class="sourceLineNo">655</span> result.append("SK");<a name="line.655"></a> +<span class="sourceLineNo">656</span> }<a name="line.656"></a> +<span class="sourceLineNo">657</span> } else {<a name="line.657"></a> +<span class="sourceLineNo">658</span> if (index == 0 && !isVowel(charAt(value, 3)) && charAt(value, 3) != 'W') {<a name="line.658"></a> +<span class="sourceLineNo">659</span> result.append('X', 'S');<a name="line.659"></a> +<span class="sourceLineNo">660</span> } else {<a name="line.660"></a> +<span class="sourceLineNo">661</span> result.append('X');<a name="line.661"></a> +<span class="sourceLineNo">662</span> }<a name="line.662"></a> +<span class="sourceLineNo">663</span> }<a name="line.663"></a> +<span class="sourceLineNo">664</span> } else if (contains(value, index + 2, 1, "I", "E", "Y")) {<a name="line.664"></a> +<span class="sourceLineNo">665</span> result.append('S');<a name="line.665"></a> +<span class="sourceLineNo">666</span> } else {<a name="line.666"></a> +<span class="sourceLineNo">667</span> result.append("SK");<a name="line.667"></a> +<span class="sourceLineNo">668</span> }<a name="line.668"></a> +<span class="sourceLineNo">669</span> return index + 3;<a name="line.669"></a> +<span class="sourceLineNo">670</span> }<a name="line.670"></a> +<span class="sourceLineNo">671</span><a name="line.671"></a> +<span class="sourceLineNo">672</span> /**<a name="line.672"></a> +<span class="sourceLineNo">673</span> * Handles 'T' cases.<a name="line.673"></a> +<span class="sourceLineNo">674</span> */<a name="line.674"></a> +<span class="sourceLineNo">675</span> private int handleT(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.675"></a> +<span class="sourceLineNo">676</span> if (contains(value, index, 4, "TION")) {<a name="line.676"></a> +<span class="sourceLineNo">677</span> result.append('X');<a name="line.677"></a> +<span class="sourceLineNo">678</span> index += 3;<a name="line.678"></a> +<span class="sourceLineNo">679</span> } else if (contains(value, index, 3, "TIA", "TCH")) {<a name="line.679"></a> +<span class="sourceLineNo">680</span> result.append('X');<a name="line.680"></a> +<span class="sourceLineNo">681</span> index += 3;<a name="line.681"></a> +<span class="sourceLineNo">682</span> } else if (contains(value, index, 2, "TH") || contains(value, index, 3, "TTH")) {<a name="line.682"></a> +<span class="sourceLineNo">683</span> if (contains(value, index + 2, 2, "OM", "AM") ||<a name="line.683"></a> +<span class="sourceLineNo">684</span> //-- special case "thomas", "thames" or germanic --//<a name="line.684"></a> +<span class="sourceLineNo">685</span> contains(value, 0, 4, "VAN ", "VON ") ||<a name="line.685"></a> +<span class="sourceLineNo">686</span> contains(value, 0, 3, "SCH")) {<a name="line.686"></a> +<span class="sourceLineNo">687</span> result.append('T');<a name="line.687"></a> +<span class="sourceLineNo">688</span> } else {<a name="line.688"></a> +<span class="sourceLineNo">689</span> result.append('0', 'T');<a name="line.689"></a> +<span class="sourceLineNo">690</span> }<a name="line.690"></a> +<span class="sourceLineNo">691</span> index += 2;<a name="line.691"></a> +<span class="sourceLineNo">692</span> } else {<a name="line.692"></a> +<span class="sourceLineNo">693</span> result.append('T');<a name="line.693"></a> +<span class="sourceLineNo">694</span> index = contains(value, index + 1, 1, "T", "D") ? index + 2 : index + 1;<a name="line.694"></a> +<span class="sourceLineNo">695</span> }<a name="line.695"></a> +<span class="sourceLineNo">696</span> return index;<a name="line.696"></a> +<span class="sourceLineNo">697</span> }<a name="line.697"></a> +<span class="sourceLineNo">698</span><a name="line.698"></a> +<span class="sourceLineNo">699</span> /**<a name="line.699"></a> +<span class="sourceLineNo">700</span> * Handles 'W' cases.<a name="line.700"></a> +<span class="sourceLineNo">701</span> */<a name="line.701"></a> +<span class="sourceLineNo">702</span> private int handleW(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.702"></a> +<span class="sourceLineNo">703</span> if (contains(value, index, 2, "WR")) {<a name="line.703"></a> +<span class="sourceLineNo">704</span> //-- can also be in middle of word --//<a name="line.704"></a> +<span class="sourceLineNo">705</span> result.append('R');<a name="line.705"></a> +<span class="sourceLineNo">706</span> index += 2;<a name="line.706"></a> +<span class="sourceLineNo">707</span> } else {<a name="line.707"></a> +<span class="sourceLineNo">708</span> if (index == 0 && (isVowel(charAt(value, index + 1)) ||<a name="line.708"></a> +<span class="sourceLineNo">709</span> contains(value, index, 2, "WH"))) {<a name="line.709"></a> +<span class="sourceLineNo">710</span> if (isVowel(charAt(value, index + 1))) {<a name="line.710"></a> +<span class="sourceLineNo">711</span> //-- Wasserman should match Vasserman --//<a name="line.711"></a> +<span class="sourceLineNo">712</span> result.append('A', 'F');<a name="line.712"></a> +<span class="sourceLineNo">713</span> } else {<a name="line.713"></a> +<span class="sourceLineNo">714</span> //-- need Uomo to match Womo --//<a name="line.714"></a> +<span class="sourceLineNo">715</span> result.append('A');<a name="line.715"></a> +<span class="sourceLineNo">716</span> }<a name="line.716"></a> +<span class="sourceLineNo">717</span> index++;<a name="line.717"></a> +<span class="sourceLineNo">718</span> } else if ((index == value.length() - 1 && isVowel(charAt(value, index - 1))) ||<a name="line.718"></a> +<span class="sourceLineNo">719</span> contains(value, index - 1, 5, "EWSKI", "EWSKY", "OWSKI", "OWSKY") ||<a name="line.719"></a> +<span class="sourceLineNo">720</span> contains(value, 0, 3, "SCH")) {<a name="line.720"></a> +<span class="sourceLineNo">721</span> //-- Arnow should match Arnoff --//<a name="line.721"></a> +<span class="sourceLineNo">722</span> result.appendAlternate('F');<a name="line.722"></a> +<span class="sourceLineNo">723</span> index++;<a name="line.723"></a> +<span class="sourceLineNo">724</span> } else if (contains(value, index, 4, "WICZ", "WITZ")) {<a name="line.724"></a> +<span class="sourceLineNo">725</span> //-- Polish e.g. "filipowicz" --//<a name="line.725"></a> +<span class="sourceLineNo">726</span> result.append("TS", "FX");<a name="line.726"></a> +<span class="sourceLineNo">727</span> index += 4;<a name="line.727"></a> +<span class="sourceLineNo">728</span> } else {<a name="line.728"></a> +<span class="sourceLineNo">729</span> index++;<a name="line.729"></a> +<span class="sourceLineNo">730</span> }<a name="line.730"></a> +<span class="sourceLineNo">731</span> }<a name="line.731"></a> +<span class="sourceLineNo">732</span> return index;<a name="line.732"></a> +<span class="sourceLineNo">733</span> }<a name="line.733"></a> +<span class="sourceLineNo">734</span><a name="line.734"></a> +<span class="sourceLineNo">735</span> /**<a name="line.735"></a> +<span class="sourceLineNo">736</span> * Handles 'X' cases.<a name="line.736"></a> +<span class="sourceLineNo">737</span> */<a name="line.737"></a> +<span class="sourceLineNo">738</span> private int handleX(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.738"></a> +<span class="sourceLineNo">739</span> if (index == 0) {<a name="line.739"></a> +<span class="sourceLineNo">740</span> result.append('S');<a name="line.740"></a> +<span class="sourceLineNo">741</span> index++;<a name="line.741"></a> +<span class="sourceLineNo">742</span> } else {<a name="line.742"></a> +<span class="sourceLineNo">743</span> if (!((index == value.length() - 1) &&<a name="line.743"></a> +<span class="sourceLineNo">744</span> (contains(value, index - 3, 3, "IAU", "EAU") ||<a name="line.744"></a> +<span class="sourceLineNo">745</span> contains(value, index - 2, 2, "AU", "OU")))) {<a name="line.745"></a> +<span class="sourceLineNo">746</span> //-- French e.g. breaux --//<a name="line.746"></a> +<span class="sourceLineNo">747</span> result.append("KS");<a name="line.747"></a> +<span class="sourceLineNo">748</span> }<a name="line.748"></a> +<span class="sourceLineNo">749</span> index = contains(value, index + 1, 1, "C", "X") ? index + 2 : index + 1;<a name="line.749"></a> +<span class="sourceLineNo">750</span> }<a name="line.750"></a> +<span class="sourceLineNo">751</span> return index;<a name="line.751"></a> +<span class="sourceLineNo">752</span> }<a name="line.752"></a> +<span class="sourceLineNo">753</span><a name="line.753"></a> +<span class="sourceLineNo">754</span> /**<a name="line.754"></a> +<span class="sourceLineNo">755</span> * Handles 'Z' cases.<a name="line.755"></a> +<span class="sourceLineNo">756</span> */<a name="line.756"></a> +<span class="sourceLineNo">757</span> private int handleZ(final String value, final DoubleMetaphoneResult result, int index,<a name="line.757"></a> +<span class="sourceLineNo">758</span> final boolean slavoGermanic) {<a name="line.758"></a> +<span class="sourceLineNo">759</span> if (charAt(value, index + 1) == 'H') {<a name="line.759"></a> +<span class="sourceLineNo">760</span> //-- Chinese pinyin e.g. "zhao" or Angelina "Zhang" --//<a name="line.760"></a> +<span class="sourceLineNo">761</span> result.append('J');<a name="line.761"></a> +<span class="sourceLineNo">762</span> index += 2;<a name="line.762"></a> +<span class="sourceLineNo">763</span> } else {<a name="line.763"></a> +<span class="sourceLineNo">764</span> if (contains(value, index + 1, 2, "ZO", "ZI", "ZA") ||<a name="line.764"></a> +<span class="sourceLineNo">765</span> (slavoGermanic && (index > 0 && charAt(value, index - 1) != 'T'))) {<a name="line.765"></a> +<span class="sourceLineNo">766</span> result.append("S", "TS");<a name="line.766"></a> +<span class="sourceLineNo">767</span> } else {<a name="line.767"></a> +<span class="sourceLineNo">768</span> result.append('S');<a name="line.768"></a> +<span class="sourceLineNo">769</span> }<a name="line.769"></a> +<span class="sourceLineNo">770</span> index = charAt(value, index + 1) == 'Z' ? index + 2 : index + 1;<a name="line.770"></a> +<span class="sourceLineNo">771</span> }<a name="line.771"></a> +<span class="sourceLineNo">772</span> return index;<a name="line.772"></a> +<span class="sourceLineNo">773</span> }<a name="line.773"></a> +<span class="sourceLineNo">774</span><a name="line.774"></a> +<span class="sourceLineNo">775</span> //-- BEGIN CONDITIONS --//<a name="line.775"></a> +<span class="sourceLineNo">776</span><a name="line.776"></a> +<span class="sourceLineNo">777</span> /**<a name="line.777"></a> +<span class="sourceLineNo">778</span> * Complex condition 0 for 'C'.<a name="line.778"></a> +<span class="sourceLineNo">779</span> */<a name="line.779"></a> +<span class="sourceLineNo">780</span> private boolean conditionC0(final String value, final int index) {<a name="line.780"></a> +<span class="sourceLineNo">781</span> if (contains(value, index, 4, "CHIA")) {<a name="line.781"></a> +<span class="sourceLineNo">782</span> return true;<a name="line.782"></a> +<span class="sourceLineNo">783</span> } else if (index <= 1) {<a name="line.783"></a> +<span class="sourceLineNo">784</span> return false;<a name="line.784"></a> +<span class="sourceLineNo">785</span> } else if (isVowel(charAt(value, index - 2))) {<a name="line.785"></a> +<span class="sourceLineNo">786</span> return false;<a name="line.786"></a> +<span class="sourceLineNo">787</span> } else if (!contains(value, index - 1, 3, "ACH")) {<a name="line.787"></a> +<span class="sourceLineNo">788</span> return false;<a name="line.788"></a> +<span class="sourceLineNo">789</span> } else {<a name="line.789"></a> +<span class="sourceLineNo">790</span> final char c = charAt(value, index + 2);<a name="line.790"></a> +<span class="sourceLineNo">791</span> return (c != 'I' && c != 'E') ||<a name="line.791"></a> +<span class="sourceLineNo">792</span> contains(value, index - 2, 6, "BACHER", "MACHER");<a name="line.792"></a> +<span class="sourceLineNo">793</span> }<a name="line.793"></a> +<span class="sourceLineNo">794</span> }<a name="line.794"></a> +<span class="sourceLineNo">795</span><a name="line.795"></a> +<span class="sourceLineNo">796</span> /**<a name="line.796"></a> +<span class="sourceLineNo">797</span> * Complex condition 0 for 'CH'.<a name="line.797"></a> +<span class="sourceLineNo">798</span> */<a name="line.798"></a> +<span class="sourceLineNo">799</span> private boolean conditionCH0(final String value, final int index) {<a name="line.799"></a> +<span class="sourceLineNo">800</span> if (index != 0) {<a name="line.800"></a> +<span class="sourceLineNo">801</span> return false;<a name="line.801"></a> +<span class="sourceLineNo">802</span> } else if (!contains(value, index + 1, 5, "HARAC", "HARIS") &&<a name="line.802"></a> +<span class="sourceLineNo">803</span> !contains(value, index + 1, 3, "HOR", "HYM", "HIA", "HEM")) {<a name="line.803"></a> +<span class="sourceLineNo">804</span> return false;<a name="line.804"></a> +<span class="sourceLineNo">805</span> } else if (contains(value, 0, 5, "CHORE")) {<a name="line.805"></a> +<span class="sourceLineNo">806</span> return false;<a name="line.806"></a> +<span class="sourceLineNo">807</span> } else {<a name="line.807"></a> +<span class="sourceLineNo">808</span> return true;<a name="line.808"></a> +<span class="sourceLineNo">809</span> }<a name="line.809"></a> +<span class="sourceLineNo">810</span> }<a name="line.810"></a> +<span class="sourceLineNo">811</span><a name="line.811"></a> +<span class="sourceLineNo">812</span> /**<a name="line.812"></a> +<span class="sourceLineNo">813</span> * Complex condition 1 for 'CH'.<a name="line.813"></a> +<span class="sourceLineNo">814</span> */<a name="line.814"></a> +<span class="sourceLineNo">815</span> private boolean conditionCH1(final String value, final int index) {<a name="line.815"></a> +<span class="sourceLineNo">816</span> return ((contains(value, 0, 4, "VAN ", "VON ") || contains(value, 0, 3, "SCH")) ||<a name="line.816"></a> +<span class="sourceLineNo">817</span> contains(value, index - 2, 6, "ORCHES", "ARCHIT", "ORCHID") ||<a name="line.817"></a> +<span class="sourceLineNo">818</span> contains(value, index + 2, 1, "T", "S") ||<a name="line.818"></a> +<span class="sourceLineNo">819</span> ((contains(value, index - 1, 1, "A", "O", "U", "E") || index == 0) &&<a name="line.819"></a> +<span class="sourceLineNo">820</span> (contains(value, index + 2, 1, L_R_N_M_B_H_F_V_W_SPACE) || index + 1 == value.length() - 1)));<a name="line.820"></a> +<span class="sourceLineNo">821</span> }<a name="line.821"></a> +<span class="sourceLineNo">822</span><a name="line.822"></a> +<span class="sourceLineNo">823</span> /**<a name="line.823"></a> +<span class="sourceLineNo">824</span> * Complex condition 0 for 'L'.<a name="line.824"></a> +<span class="sourceLineNo">825</span> */<a name="line.825"></a> +<span class="sourceLineNo">826</span> private boolean conditionL0(final String value, final int index) {<a name="line.826"></a> +<span class="sourceLineNo">827</span> if (index == value.length() - 3 &&<a name="line.827"></a> +<span class="sourceLineNo">828</span> contains(value, index - 1, 4, "ILLO", "ILLA", "ALLE")) {<a name="line.828"></a> +<span class="sourceLineNo">829</span> return true;<a name="line.829"></a> +<span class="sourceLineNo">830</span> } else if ((contains(value, value.length() - 2, 2, "AS", "OS") ||<a name="line.830"></a> +<span class="sourceLineNo">831</span> contains(value, value.length() - 1, 1, "A", "O")) &&<a name="line.831"></a> +<span class="sourceLineNo">832</span> contains(value, index - 1, 4, "ALLE")) {<a name="line.832"></a> +<span class="sourceLineNo">833</span> return true;<a name="line.833"></a> +<span class="sourceLineNo">834</span> } else {<a name="line.834"></a> +<span class="sourceLineNo">835</span> return false;<a name="line.835"></a> +<span class="sourceLineNo">836</span> }<a name="line.836"></a> +<span class="sourceLineNo">837</span> }<a name="line.837"></a> +<span class="sourceLineNo">838</span><a name="line.838"></a> +<span class="sourceLineNo">839</span> /**<a name="line.839"></a> +<span class="sourceLineNo">840</span> * Complex condition 0 for 'M'.<a name="line.840"></a> +<span class="sourceLineNo">841</span> */<a name="line.841"></a> +<span class="sourceLineNo">842</span> private boolean conditionM0(final String value, final int index) {<a name="line.842"></a> +<span class="sourceLineNo">843</span> if (charAt(value, index + 1) == 'M') {<a name="line.843"></a> +<span class="sourceLineNo">844</span> return true;<a name="line.844"></a> +<span class="sourceLineNo">845</span> }<a name="line.845"></a> +<span class="sourceLineNo">846</span> return contains(value, index - 1, 3, "UMB") &&<a name="line.846"></a> +<span class="sourceLineNo">847</span> ((index + 1) == value.length() - 1 || contains(value, index + 2, 2, "ER"));<a name="line.847"></a> +<span class="sourceLineNo">848</span> }<a name="line.848"></a> +<span class="sourceLineNo">849</span><a name="line.849"></a> +<span class="sourceLineNo">850</span> //-- BEGIN HELPER FUNCTIONS --//<a name="line.850"></a> +<span class="sourceLineNo">851</span><a name="line.851"></a> +<span class="sourceLineNo">852</span> /**<a name="line.852"></a> +<span class="sourceLineNo">853</span> * Determines whether or not a value is of slavo-germanic origin. A value is<a name="line.853"></a> +<span class="sourceLineNo">854</span> * of slavo-germanic origin if it contians any of 'W', 'K', 'CZ', or 'WITZ'.<a name="line.854"></a> +<span class="sourceLineNo">855</span> */<a name="line.855"></a> +<span class="sourceLineNo">856</span> private boolean isSlavoGermanic(final String value) {<a name="line.856"></a> +<span class="sourceLineNo">857</span> return value.indexOf('W') > -1 || value.indexOf('K') > -1 ||<a name="line.857"></a> +<span class="sourceLineNo">858</span> value.indexOf("CZ") > -1 || value.indexOf("WITZ") > -1;<a name="line.858"></a> +<span class="sourceLineNo">859</span> }<a name="line.859"></a> +<span class="sourceLineNo">860</span><a name="line.860"></a> +<span class="sourceLineNo">861</span> /**<a name="line.861"></a> +<span class="sourceLineNo">862</span> * Determines whether or not a character is a vowel or not<a name="line.862"></a> +<span class="sourceLineNo">863</span> */<a name="line.863"></a> +<span class="sourceLineNo">864</span> private boolean isVowel(final char ch) {<a name="line.864"></a> +<span class="sourceLineNo">865</span> return VOWELS.indexOf(ch) != -1;<a name="line.865"></a> +<span class="sourceLineNo">866</span> }<a name="line.866"></a> +<span class="sourceLineNo">867</span><a name="line.867"></a> +<span class="sourceLineNo">868</span> /**<a name="line.868"></a> +<span class="sourceLineNo">869</span> * Determines whether or not the value starts with a silent letter. It will<a name="line.869"></a> +<span class="sourceLineNo">870</span> * return {@code true} if the value starts with any of 'GN', 'KN',<a name="line.870"></a> +<span class="sourceLineNo">871</span> * 'PN', 'WR' or 'PS'.<a name="line.871"></a> +<span class="sourceLineNo">872</span> */<a name="line.872"></a> +<span class="sourceLineNo">873</span> private boolean isSilentStart(final String value) {<a name="line.873"></a> +<span class="sourceLineNo">874</span> boolean result = false;<a name="line.874"></a> +<span class="sourceLineNo">875</span> for (final String element : SILENT_START) {<a name="line.875"></a> +<span class="sourceLineNo">876</span> if (value.startsWith(element)) {<a name="line.876"></a> +<span class="sourceLineNo">877</span> result = true;<a name="line.877"></a> +<span class="sourceLineNo">878</span> break;<a name="line.878"></a> +<span class="sourceLineNo">879</span> }<a name="line.879"></a> +<span class="sourceLineNo">880</span> }<a name="line.880"></a> +<span class="sourceLineNo">881</span> return result;<a name="line.881"></a> +<span class="sourceLineNo">882</span> }<a name="line.882"></a> +<span class="sourceLineNo">883</span><a name="line.883"></a> +<span class="sourceLineNo">884</span> /**<a name="line.884"></a> +<span class="sourceLineNo">885</span> * Cleans the input.<a name="line.885"></a> +<span class="sourceLineNo">886</span> */<a name="line.886"></a> +<span class="sourceLineNo">887</span> private String cleanInput(String input) {<a name="line.887"></a> +<span class="sourceLineNo">888</span> if (input == null) {<a name="line.888"></a> +<span class="sourceLineNo">889</span> return null;<a name="line.889"></a> +<span class="sourceLineNo">890</span> }<a name="line.890"></a> +<span class="sourceLineNo">891</span> input = input.trim();<a name="line.891"></a> +<span class="sourceLineNo">892</span> if (input.length() == 0) {<a name="line.892"></a> +<span class="sourceLineNo">893</span> return null;<a name="line.893"></a> +<span class="sourceLineNo">894</span> }<a name="line.894"></a> +<span class="sourceLineNo">895</span> return input.toUpperCase(java.util.Locale.ENGLISH);<a name="line.895"></a> +<span class="sourceLineNo">896</span> }<a name="line.896"></a> +<span class="sourceLineNo">897</span><a name="line.897"></a> +<span class="sourceLineNo">898</span> /*<a name="line.898"></a> +<span class="sourceLineNo">899</span> * Gets the character at index {@code index} if available, otherwise<a name="line.899"></a> +<span class="sourceLineNo">900</span> * it returns {@code Character.MIN_VALUE} so that there is some sort<a name="line.900"></a> +<span class="sourceLineNo">901</span> * of a default.<a name="line.901"></a> +<span class="sourceLineNo">902</span> */<a name="line.902"></a> +<span class="sourceLineNo">903</span> protected char charAt(final String value, final int index) {<a name="line.903"></a> +<span class="sourceLineNo">904</span> if (index < 0 || index >= value.length()) {<a name="line.904"></a> +<span class="sourceLineNo">905</span> return Character.MIN_VALUE;<a name="line.905"></a> +<span class="sourceLineNo">906</span> }<a name="line.906"></a> +<span class="sourceLineNo">907</span> return value.charAt(index);<a name="line.907"></a> +<span class="sourceLineNo">908</span> }<a name="line.908"></a> +<span class="sourceLineNo">909</span><a name="line.909"></a> +<span class="sourceLineNo">910</span> /*<a name="line.910"></a> +<span class="sourceLineNo">911</span> * Determines whether {@code value} contains any of the criteria starting at index {@code start} and<a name="line.911"></a> +<span class="sourceLineNo">912</span> * matching up to length {@code length}.<a name="line.912"></a> +<span class="sourceLineNo">913</span> */<a name="line.913"></a> +<span class="sourceLineNo">914</span> protected static boolean contains(final String value, final int start, final int length,<a name="line.914"></a> +<span class="sourceLineNo">915</span> final String... criteria) {<a name="line.915"></a> +<span class="sourceLineNo">916</span> boolean result = false;<a name="line.916"></a> +<span class="sourceLineNo">917</span> if (start >= 0 && start + length <= value.length()) {<a name="line.917"></a> +<span class="sourceLineNo">918</span> final String target = value.substring(start, start + length);<a name="line.918"></a> +<span class="sourceLineNo">919</span><a name="line.919"></a> +<span class="sourceLineNo">920</span> for (final String element : criteria) {<a name="line.920"></a> +<span class="sourceLineNo">921</span> if (target.equals(element)) {<a name="line.921"></a> +<span class="sourceLineNo">922</span> result = true;<a name="line.922"></a> +<span class="sourceLineNo">923</span> break;<a name="line.923"></a> +<span class="sourceLineNo">924</span> }<a name="line.924"></a> +<span class="sourceLineNo">925</span> }<a name="line.925"></a> +<span class="sourceLineNo">926</span> }<a name="line.926"></a> +<span class="sourceLineNo">927</span> return result;<a name="line.927"></a> +<span class="sourceLineNo">928</span> }<a name="line.928"></a> +<span class="sourceLineNo">929</span><a name="line.929"></a> +<span class="sourceLineNo">930</span> //-- BEGIN INNER CLASSES --//<a name="line.930"></a> +<span class="sourceLineNo">931</span><a name="line.931"></a> +<span class="sourceLineNo">932</span> /**<a name="line.932"></a> +<span class="sourceLineNo">933</span> * Inner class for storing results, since there is the optional alternate encoding.<a name="line.933"></a> +<span class="sourceLineNo">934</span> */<a name="line.934"></a> +<span class="sourceLineNo">935</span> public class DoubleMetaphoneResult {<a name="line.935"></a> +<span class="sourceLineNo">936</span><a name="line.936"></a> +<span class="sourceLineNo">937</span> private final StringBuilder primary = new StringBuilder(getMaxCodeLen());<a name="line.937"></a> +<span class="sourceLineNo">938</span> private final StringBuilder alternate = new StringBuilder(getMaxCodeLen());<a name="line.938"></a> +<span class="sourceLineNo">939</span> private final int maxLength;<a name="line.939"></a> +<span class="sourceLineNo">940</span><a name="line.940"></a> +<span class="sourceLineNo">941</span> public DoubleMetaphoneResult(final int maxLength) {<a name="line.941"></a> +<span class="sourceLineNo">942</span> this.maxLength = maxLength;<a name="line.942"></a> +<span class="sourceLineNo">943</span> }<a name="line.943"></a> +<span class="sourceLineNo">944</span><a name="line.944"></a> +<span class="sourceLineNo">945</span> public void append(final char value) {<a name="line.945"></a> +<span class="sourceLineNo">946</span> appendPrimary(value);<a name="line.946"></a> +<span class="sourceLineNo">947</span> appendAlternate(value);<a name="line.947"></a> +<span class="sourceLineNo">948</span> }<a name="line.948"></a> +<span class="sourceLineNo">949</span><a name="line.949"></a> +<span class="sourceLineNo">950</span> public void append(final char primary, final char alternate) {<a name="line.950"></a> +<span class="sourceLineNo">951</span> appendPrimary(primary);<a name="line.951"></a> +<span class="sourceLineNo">952</span> appendAlternate(alternate);<a name="line.952"></a> +<span class="sourceLineNo">953</span> }<a name="line.953"></a> +<span class="sourceLineNo">954</span><a name="line.954"></a> +<span class="sourceLineNo">955</span> public void appendPrimary(final char value) {<a name="line.955"></a> +<span class="sourceLineNo">956</span> if (this.primary.length() < this.maxLength) {<a name="line.956"></a> +<span class="sourceLineNo">957</span> this.primary.append(value);<a name="line.957"></a> +<span class="sourceLineNo">958</span> }<a name="line.958"></a> +<span class="sourceLineNo">959</span> }<a name="line.959"></a> +<span class="sourceLineNo">960</span><a name="line.960"></a> +<span class="sourceLineNo">961</span> public void appendAlternate(final char value) {<a name="line.961"></a> +<span class="sourceLineNo">962</span> if (this.alternate.length() < this.maxLength) {<a name="line.962"></a> +<span class="sourceLineNo">963</span> this.alternate.append(value);<a name="line.963"></a> +<span class="sourceLineNo">964</span> }<a name="line.964"></a> +<span class="sourceLineNo">965</span> }<a name="line.965"></a> +<span class="sourceLineNo">966</span><a name="line.966"></a> +<span class="sourceLineNo">967</span> public void append(final String value) {<a name="line.967"></a> +<span class="sourceLineNo">968</span> appendPrimary(value);<a name="line.968"></a> +<span class="sourceLineNo">969</span> appendAlternate(value);<a name="line.969"></a> +<span class="sourceLineNo">970</span> }<a name="line.970"></a> +<span class="sourceLineNo">971</span><a name="line.971"></a> +<span class="sourceLineNo">972</span> public void append(final String primary, final String alternate) {<a name="line.972"></a> +<span class="sourceLineNo">973</span> appendPrimary(primary);<a name="line.973"></a> +<span class="sourceLineNo">974</span> appendAlternate(alternate);<a name="line.974"></a> +<span class="sourceLineNo">975</span> }<a name="line.975"></a> +<span class="sourceLineNo">976</span><a name="line.976"></a> +<span class="sourceLineNo">977</span> public void appendPrimary(final String value) {<a name="line.977"></a> +<span class="sourceLineNo">978</span> final int addChars = this.maxLength - this.primary.length();<a name="line.978"></a> +<span class="sourceLineNo">979</span> if (value.length() <= addChars) {<a name="line.979"></a> +<span class="sourceLineNo">980</span> this.primary.append(value);<a name="line.980"></a> +<span class="sourceLineNo">981</span> } else {<a name="line.981"></a> +<span class="sourceLineNo">982</span> this.primary.append(value.substring(0, addChars));<a name="line.982"></a> +<span class="sourceLineNo">983</span> }<a name="line.983"></a> +<span class="sourceLineNo">984</span> }<a name="line.984"></a> +<span class="sourceLineNo">985</span><a name="line.985"></a> +<span class="sourceLineNo">986</span> public void appendAlternate(final String value) {<a name="line.986"></a> +<span class="sourceLineNo">987</span> final int addChars = this.maxLength - this.alternate.length();<a name="line.987"></a> +<span class="sourceLineNo">988</span> if (value.length() <= addChars) {<a name="line.988"></a> +<span class="sourceLineNo">989</span> this.alternate.append(value);<a name="line.989"></a> +<span class="sourceLineNo">990</span> } else {<a name="line.990"></a> +<span class="sourceLineNo">991</span> this.alternate.append(value.substring(0, addChars));<a name="line.991"></a> +<span class="sourceLineNo">992</span> }<a name="line.992"></a> +<span class="sourceLineNo">993</span> }<a name="line.993"></a> +<span class="sourceLineNo">994</span><a name="line.994"></a> +<span class="sourceLineNo">995</span> public String getPrimary() {<a name="line.995"></a> +<span class="sourceLineNo">996</span> return this.primary.toString();<a name="line.996"></a> +<span class="sourceLineNo">997</span> }<a name="line.997"></a> +<span class="sourceLineNo">998</span><a name="line.998"></a> +<span class="sourceLineNo">999</span> public String getAlternate() {<a name="line.999"></a> +<span class="sourceLineNo">1000</span> return this.alternate.toString();<a name="line.1000"></a> +<span class="sourceLineNo">1001</span> }<a name="line.1001"></a> +<span class="sourceLineNo">1002</span><a name="line.1002"></a> +<span class="sourceLineNo">1003</span> public boolean isComplete() {<a name="line.1003"></a> +<span class="sourceLineNo">1004</span> return this.primary.length() >= this.maxLength &&<a name="line.1004"></a> +<span class="sourceLineNo">1005</span> this.alternate.length() >= this.maxLength;<a name="line.1005"></a> +<span class="sourceLineNo">1006</span> }<a name="line.1006"></a> +<span class="sourceLineNo">1007</span> }<a name="line.1007"></a> +<span class="sourceLineNo">1008</span>}<a name="line.1008"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/DoubleMetaphone.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/DoubleMetaphone.html new file mode 100644 index 0000000000000000000000000000000000000000..383acc881ba024117f3b528a09f49fa6725c7a9a --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/DoubleMetaphone.html @@ -0,0 +1,1080 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.EncoderException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import org.apache.commons.codec.StringEncoder;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import org.apache.commons.codec.binary.StringUtils;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>/**<a name="line.24"></a> +<span class="sourceLineNo">025</span> * Encodes a string into a double metaphone value. This Implementation is based on the algorithm by <CITE>Lawrence<a name="line.25"></a> +<span class="sourceLineNo">026</span> * Philips</CITE>.<a name="line.26"></a> +<span class="sourceLineNo">027</span> * <p><a name="line.27"></a> +<span class="sourceLineNo">028</span> * This class is conditionally thread-safe. The instance field for the maximum code length is mutable<a name="line.28"></a> +<span class="sourceLineNo">029</span> * {@link #setMaxCodeLen(int)} but is not volatile, and accesses are not synchronized. If an instance of the class is<a name="line.29"></a> +<span class="sourceLineNo">030</span> * shared between threads, the caller needs to ensure that suitable synchronization is used to ensure safe publication<a name="line.30"></a> +<span class="sourceLineNo">031</span> * of the value between threads, and must not invoke {@link #setMaxCodeLen(int)} after initial setup.<a name="line.31"></a> +<span class="sourceLineNo">032</span> *<a name="line.32"></a> +<span class="sourceLineNo">033</span> * @see <a href="http://drdobbs.com/184401251?pgno=2">Original Article</a><a name="line.33"></a> +<span class="sourceLineNo">034</span> * @see <a href="http://en.wikipedia.org/wiki/Metaphone">http://en.wikipedia.org/wiki/Metaphone</a><a name="line.34"></a> +<span class="sourceLineNo">035</span> *<a name="line.35"></a> +<span class="sourceLineNo">036</span> */<a name="line.36"></a> +<span class="sourceLineNo">037</span>public class DoubleMetaphone implements StringEncoder {<a name="line.37"></a> +<span class="sourceLineNo">038</span><a name="line.38"></a> +<span class="sourceLineNo">039</span> /**<a name="line.39"></a> +<span class="sourceLineNo">040</span> * "Vowels" to test for<a name="line.40"></a> +<span class="sourceLineNo">041</span> */<a name="line.41"></a> +<span class="sourceLineNo">042</span> private static final String VOWELS = "AEIOUY";<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> +<span class="sourceLineNo">044</span> /**<a name="line.44"></a> +<span class="sourceLineNo">045</span> * Prefixes when present which are not pronounced<a name="line.45"></a> +<span class="sourceLineNo">046</span> */<a name="line.46"></a> +<span class="sourceLineNo">047</span> private static final String[] SILENT_START =<a name="line.47"></a> +<span class="sourceLineNo">048</span> { "GN", "KN", "PN", "WR", "PS" };<a name="line.48"></a> +<span class="sourceLineNo">049</span> private static final String[] L_R_N_M_B_H_F_V_W_SPACE =<a name="line.49"></a> +<span class="sourceLineNo">050</span> { "L", "R", "N", "M", "B", "H", "F", "V", "W", " " };<a name="line.50"></a> +<span class="sourceLineNo">051</span> private static final String[] ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER =<a name="line.51"></a> +<span class="sourceLineNo">052</span> { "ES", "EP", "EB", "EL", "EY", "IB", "IL", "IN", "IE", "EI", "ER" };<a name="line.52"></a> +<span class="sourceLineNo">053</span> private static final String[] L_T_K_S_N_M_B_Z =<a name="line.53"></a> +<span class="sourceLineNo">054</span> { "L", "T", "K", "S", "N", "M", "B", "Z" };<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> /**<a name="line.56"></a> +<span class="sourceLineNo">057</span> * Maximum length of an encoding, default is 4<a name="line.57"></a> +<span class="sourceLineNo">058</span> */<a name="line.58"></a> +<span class="sourceLineNo">059</span> private int maxCodeLen = 4;<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> /**<a name="line.61"></a> +<span class="sourceLineNo">062</span> * Creates an instance of this DoubleMetaphone encoder<a name="line.62"></a> +<span class="sourceLineNo">063</span> */<a name="line.63"></a> +<span class="sourceLineNo">064</span> public DoubleMetaphone() {<a name="line.64"></a> +<span class="sourceLineNo">065</span> super();<a name="line.65"></a> +<span class="sourceLineNo">066</span> }<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> /**<a name="line.68"></a> +<span class="sourceLineNo">069</span> * Encode a value with Double Metaphone.<a name="line.69"></a> +<span class="sourceLineNo">070</span> *<a name="line.70"></a> +<span class="sourceLineNo">071</span> * @param value String to encode<a name="line.71"></a> +<span class="sourceLineNo">072</span> * @return an encoded string<a name="line.72"></a> +<span class="sourceLineNo">073</span> */<a name="line.73"></a> +<span class="sourceLineNo">074</span> public String doubleMetaphone(final String value) {<a name="line.74"></a> +<span class="sourceLineNo">075</span> return doubleMetaphone(value, false);<a name="line.75"></a> +<span class="sourceLineNo">076</span> }<a name="line.76"></a> +<span class="sourceLineNo">077</span><a name="line.77"></a> +<span class="sourceLineNo">078</span> /**<a name="line.78"></a> +<span class="sourceLineNo">079</span> * Encode a value with Double Metaphone, optionally using the alternate encoding.<a name="line.79"></a> +<span class="sourceLineNo">080</span> *<a name="line.80"></a> +<span class="sourceLineNo">081</span> * @param value String to encode<a name="line.81"></a> +<span class="sourceLineNo">082</span> * @param alternate use alternate encode<a name="line.82"></a> +<span class="sourceLineNo">083</span> * @return an encoded string<a name="line.83"></a> +<span class="sourceLineNo">084</span> */<a name="line.84"></a> +<span class="sourceLineNo">085</span> public String doubleMetaphone(String value, final boolean alternate) {<a name="line.85"></a> +<span class="sourceLineNo">086</span> value = cleanInput(value);<a name="line.86"></a> +<span class="sourceLineNo">087</span> if (value == null) {<a name="line.87"></a> +<span class="sourceLineNo">088</span> return null;<a name="line.88"></a> +<span class="sourceLineNo">089</span> }<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> final boolean slavoGermanic = isSlavoGermanic(value);<a name="line.91"></a> +<span class="sourceLineNo">092</span> int index = isSilentStart(value) ? 1 : 0;<a name="line.92"></a> +<span class="sourceLineNo">093</span><a name="line.93"></a> +<span class="sourceLineNo">094</span> final DoubleMetaphoneResult result = new DoubleMetaphoneResult(this.getMaxCodeLen());<a name="line.94"></a> +<span class="sourceLineNo">095</span><a name="line.95"></a> +<span class="sourceLineNo">096</span> while (!result.isComplete() && index <= value.length() - 1) {<a name="line.96"></a> +<span class="sourceLineNo">097</span> switch (value.charAt(index)) {<a name="line.97"></a> +<span class="sourceLineNo">098</span> case 'A':<a name="line.98"></a> +<span class="sourceLineNo">099</span> case 'E':<a name="line.99"></a> +<span class="sourceLineNo">100</span> case 'I':<a name="line.100"></a> +<span class="sourceLineNo">101</span> case 'O':<a name="line.101"></a> +<span class="sourceLineNo">102</span> case 'U':<a name="line.102"></a> +<span class="sourceLineNo">103</span> case 'Y':<a name="line.103"></a> +<span class="sourceLineNo">104</span> index = handleAEIOUY(result, index);<a name="line.104"></a> +<span class="sourceLineNo">105</span> break;<a name="line.105"></a> +<span class="sourceLineNo">106</span> case 'B':<a name="line.106"></a> +<span class="sourceLineNo">107</span> result.append('P');<a name="line.107"></a> +<span class="sourceLineNo">108</span> index = charAt(value, index + 1) == 'B' ? index + 2 : index + 1;<a name="line.108"></a> +<span class="sourceLineNo">109</span> break;<a name="line.109"></a> +<span class="sourceLineNo">110</span> case '\u00C7':<a name="line.110"></a> +<span class="sourceLineNo">111</span> // A C with a Cedilla<a name="line.111"></a> +<span class="sourceLineNo">112</span> result.append('S');<a name="line.112"></a> +<span class="sourceLineNo">113</span> index++;<a name="line.113"></a> +<span class="sourceLineNo">114</span> break;<a name="line.114"></a> +<span class="sourceLineNo">115</span> case 'C':<a name="line.115"></a> +<span class="sourceLineNo">116</span> index = handleC(value, result, index);<a name="line.116"></a> +<span class="sourceLineNo">117</span> break;<a name="line.117"></a> +<span class="sourceLineNo">118</span> case 'D':<a name="line.118"></a> +<span class="sourceLineNo">119</span> index = handleD(value, result, index);<a name="line.119"></a> +<span class="sourceLineNo">120</span> break;<a name="line.120"></a> +<span class="sourceLineNo">121</span> case 'F':<a name="line.121"></a> +<span class="sourceLineNo">122</span> result.append('F');<a name="line.122"></a> +<span class="sourceLineNo">123</span> index = charAt(value, index + 1) == 'F' ? index + 2 : index + 1;<a name="line.123"></a> +<span class="sourceLineNo">124</span> break;<a name="line.124"></a> +<span class="sourceLineNo">125</span> case 'G':<a name="line.125"></a> +<span class="sourceLineNo">126</span> index = handleG(value, result, index, slavoGermanic);<a name="line.126"></a> +<span class="sourceLineNo">127</span> break;<a name="line.127"></a> +<span class="sourceLineNo">128</span> case 'H':<a name="line.128"></a> +<span class="sourceLineNo">129</span> index = handleH(value, result, index);<a name="line.129"></a> +<span class="sourceLineNo">130</span> break;<a name="line.130"></a> +<span class="sourceLineNo">131</span> case 'J':<a name="line.131"></a> +<span class="sourceLineNo">132</span> index = handleJ(value, result, index, slavoGermanic);<a name="line.132"></a> +<span class="sourceLineNo">133</span> break;<a name="line.133"></a> +<span class="sourceLineNo">134</span> case 'K':<a name="line.134"></a> +<span class="sourceLineNo">135</span> result.append('K');<a name="line.135"></a> +<span class="sourceLineNo">136</span> index = charAt(value, index + 1) == 'K' ? index + 2 : index + 1;<a name="line.136"></a> +<span class="sourceLineNo">137</span> break;<a name="line.137"></a> +<span class="sourceLineNo">138</span> case 'L':<a name="line.138"></a> +<span class="sourceLineNo">139</span> index = handleL(value, result, index);<a name="line.139"></a> +<span class="sourceLineNo">140</span> break;<a name="line.140"></a> +<span class="sourceLineNo">141</span> case 'M':<a name="line.141"></a> +<span class="sourceLineNo">142</span> result.append('M');<a name="line.142"></a> +<span class="sourceLineNo">143</span> index = conditionM0(value, index) ? index + 2 : index + 1;<a name="line.143"></a> +<span class="sourceLineNo">144</span> break;<a name="line.144"></a> +<span class="sourceLineNo">145</span> case 'N':<a name="line.145"></a> +<span class="sourceLineNo">146</span> result.append('N');<a name="line.146"></a> +<span class="sourceLineNo">147</span> index = charAt(value, index + 1) == 'N' ? index + 2 : index + 1;<a name="line.147"></a> +<span class="sourceLineNo">148</span> break;<a name="line.148"></a> +<span class="sourceLineNo">149</span> case '\u00D1':<a name="line.149"></a> +<span class="sourceLineNo">150</span> // N with a tilde (spanish ene)<a name="line.150"></a> +<span class="sourceLineNo">151</span> result.append('N');<a name="line.151"></a> +<span class="sourceLineNo">152</span> index++;<a name="line.152"></a> +<span class="sourceLineNo">153</span> break;<a name="line.153"></a> +<span class="sourceLineNo">154</span> case 'P':<a name="line.154"></a> +<span class="sourceLineNo">155</span> index = handleP(value, result, index);<a name="line.155"></a> +<span class="sourceLineNo">156</span> break;<a name="line.156"></a> +<span class="sourceLineNo">157</span> case 'Q':<a name="line.157"></a> +<span class="sourceLineNo">158</span> result.append('K');<a name="line.158"></a> +<span class="sourceLineNo">159</span> index = charAt(value, index + 1) == 'Q' ? index + 2 : index + 1;<a name="line.159"></a> +<span class="sourceLineNo">160</span> break;<a name="line.160"></a> +<span class="sourceLineNo">161</span> case 'R':<a name="line.161"></a> +<span class="sourceLineNo">162</span> index = handleR(value, result, index, slavoGermanic);<a name="line.162"></a> +<span class="sourceLineNo">163</span> break;<a name="line.163"></a> +<span class="sourceLineNo">164</span> case 'S':<a name="line.164"></a> +<span class="sourceLineNo">165</span> index = handleS(value, result, index, slavoGermanic);<a name="line.165"></a> +<span class="sourceLineNo">166</span> break;<a name="line.166"></a> +<span class="sourceLineNo">167</span> case 'T':<a name="line.167"></a> +<span class="sourceLineNo">168</span> index = handleT(value, result, index);<a name="line.168"></a> +<span class="sourceLineNo">169</span> break;<a name="line.169"></a> +<span class="sourceLineNo">170</span> case 'V':<a name="line.170"></a> +<span class="sourceLineNo">171</span> result.append('F');<a name="line.171"></a> +<span class="sourceLineNo">172</span> index = charAt(value, index + 1) == 'V' ? index + 2 : index + 1;<a name="line.172"></a> +<span class="sourceLineNo">173</span> break;<a name="line.173"></a> +<span class="sourceLineNo">174</span> case 'W':<a name="line.174"></a> +<span class="sourceLineNo">175</span> index = handleW(value, result, index);<a name="line.175"></a> +<span class="sourceLineNo">176</span> break;<a name="line.176"></a> +<span class="sourceLineNo">177</span> case 'X':<a name="line.177"></a> +<span class="sourceLineNo">178</span> index = handleX(value, result, index);<a name="line.178"></a> +<span class="sourceLineNo">179</span> break;<a name="line.179"></a> +<span class="sourceLineNo">180</span> case 'Z':<a name="line.180"></a> +<span class="sourceLineNo">181</span> index = handleZ(value, result, index, slavoGermanic);<a name="line.181"></a> +<span class="sourceLineNo">182</span> break;<a name="line.182"></a> +<span class="sourceLineNo">183</span> default:<a name="line.183"></a> +<span class="sourceLineNo">184</span> index++;<a name="line.184"></a> +<span class="sourceLineNo">185</span> break;<a name="line.185"></a> +<span class="sourceLineNo">186</span> }<a name="line.186"></a> +<span class="sourceLineNo">187</span> }<a name="line.187"></a> +<span class="sourceLineNo">188</span><a name="line.188"></a> +<span class="sourceLineNo">189</span> return alternate ? result.getAlternate() : result.getPrimary();<a name="line.189"></a> +<span class="sourceLineNo">190</span> }<a name="line.190"></a> +<span class="sourceLineNo">191</span><a name="line.191"></a> +<span class="sourceLineNo">192</span> /**<a name="line.192"></a> +<span class="sourceLineNo">193</span> * Encode the value using DoubleMetaphone. It will only work if<a name="line.193"></a> +<span class="sourceLineNo">194</span> * {@code obj} is a {@code String} (like {@code Metaphone}).<a name="line.194"></a> +<span class="sourceLineNo">195</span> *<a name="line.195"></a> +<span class="sourceLineNo">196</span> * @param obj Object to encode (should be of type String)<a name="line.196"></a> +<span class="sourceLineNo">197</span> * @return An encoded Object (will be of type String)<a name="line.197"></a> +<span class="sourceLineNo">198</span> * @throws EncoderException encode parameter is not of type String<a name="line.198"></a> +<span class="sourceLineNo">199</span> */<a name="line.199"></a> +<span class="sourceLineNo">200</span> @Override<a name="line.200"></a> +<span class="sourceLineNo">201</span> public Object encode(final Object obj) throws EncoderException {<a name="line.201"></a> +<span class="sourceLineNo">202</span> if (!(obj instanceof String)) {<a name="line.202"></a> +<span class="sourceLineNo">203</span> throw new EncoderException("DoubleMetaphone encode parameter is not of type String");<a name="line.203"></a> +<span class="sourceLineNo">204</span> }<a name="line.204"></a> +<span class="sourceLineNo">205</span> return doubleMetaphone((String) obj);<a name="line.205"></a> +<span class="sourceLineNo">206</span> }<a name="line.206"></a> +<span class="sourceLineNo">207</span><a name="line.207"></a> +<span class="sourceLineNo">208</span> /**<a name="line.208"></a> +<span class="sourceLineNo">209</span> * Encode the value using DoubleMetaphone.<a name="line.209"></a> +<span class="sourceLineNo">210</span> *<a name="line.210"></a> +<span class="sourceLineNo">211</span> * @param value String to encode<a name="line.211"></a> +<span class="sourceLineNo">212</span> * @return An encoded String<a name="line.212"></a> +<span class="sourceLineNo">213</span> */<a name="line.213"></a> +<span class="sourceLineNo">214</span> @Override<a name="line.214"></a> +<span class="sourceLineNo">215</span> public String encode(final String value) {<a name="line.215"></a> +<span class="sourceLineNo">216</span> return doubleMetaphone(value);<a name="line.216"></a> +<span class="sourceLineNo">217</span> }<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> /**<a name="line.219"></a> +<span class="sourceLineNo">220</span> * Check if the Double Metaphone values of two {@code String} values<a name="line.220"></a> +<span class="sourceLineNo">221</span> * are equal.<a name="line.221"></a> +<span class="sourceLineNo">222</span> *<a name="line.222"></a> +<span class="sourceLineNo">223</span> * @param value1 The left-hand side of the encoded {@link String#equals(Object)}.<a name="line.223"></a> +<span class="sourceLineNo">224</span> * @param value2 The right-hand side of the encoded {@link String#equals(Object)}.<a name="line.224"></a> +<span class="sourceLineNo">225</span> * @return {@code true} if the encoded {@code String}s are equal;<a name="line.225"></a> +<span class="sourceLineNo">226</span> * {@code false} otherwise.<a name="line.226"></a> +<span class="sourceLineNo">227</span> * @see #isDoubleMetaphoneEqual(String,String,boolean)<a name="line.227"></a> +<span class="sourceLineNo">228</span> */<a name="line.228"></a> +<span class="sourceLineNo">229</span> public boolean isDoubleMetaphoneEqual(final String value1, final String value2) {<a name="line.229"></a> +<span class="sourceLineNo">230</span> return isDoubleMetaphoneEqual(value1, value2, false);<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> /**<a name="line.233"></a> +<span class="sourceLineNo">234</span> * Check if the Double Metaphone values of two {@code String} values<a name="line.234"></a> +<span class="sourceLineNo">235</span> * are equal, optionally using the alternate value.<a name="line.235"></a> +<span class="sourceLineNo">236</span> *<a name="line.236"></a> +<span class="sourceLineNo">237</span> * @param value1 The left-hand side of the encoded {@link String#equals(Object)}.<a name="line.237"></a> +<span class="sourceLineNo">238</span> * @param value2 The right-hand side of the encoded {@link String#equals(Object)}.<a name="line.238"></a> +<span class="sourceLineNo">239</span> * @param alternate use the alternate value if {@code true}.<a name="line.239"></a> +<span class="sourceLineNo">240</span> * @return {@code true} if the encoded {@code String}s are equal;<a name="line.240"></a> +<span class="sourceLineNo">241</span> * {@code false} otherwise.<a name="line.241"></a> +<span class="sourceLineNo">242</span> */<a name="line.242"></a> +<span class="sourceLineNo">243</span> public boolean isDoubleMetaphoneEqual(final String value1, final String value2, final boolean alternate) {<a name="line.243"></a> +<span class="sourceLineNo">244</span> return StringUtils.equals(doubleMetaphone(value1, alternate), doubleMetaphone(value2, alternate));<a name="line.244"></a> +<span class="sourceLineNo">245</span> }<a name="line.245"></a> +<span class="sourceLineNo">246</span><a name="line.246"></a> +<span class="sourceLineNo">247</span> /**<a name="line.247"></a> +<span class="sourceLineNo">248</span> * Returns the maxCodeLen.<a name="line.248"></a> +<span class="sourceLineNo">249</span> * @return int<a name="line.249"></a> +<span class="sourceLineNo">250</span> */<a name="line.250"></a> +<span class="sourceLineNo">251</span> public int getMaxCodeLen() {<a name="line.251"></a> +<span class="sourceLineNo">252</span> return this.maxCodeLen;<a name="line.252"></a> +<span class="sourceLineNo">253</span> }<a name="line.253"></a> +<span class="sourceLineNo">254</span><a name="line.254"></a> +<span class="sourceLineNo">255</span> /**<a name="line.255"></a> +<span class="sourceLineNo">256</span> * Sets the maxCodeLen.<a name="line.256"></a> +<span class="sourceLineNo">257</span> * @param maxCodeLen The maxCodeLen to set<a name="line.257"></a> +<span class="sourceLineNo">258</span> */<a name="line.258"></a> +<span class="sourceLineNo">259</span> public void setMaxCodeLen(final int maxCodeLen) {<a name="line.259"></a> +<span class="sourceLineNo">260</span> this.maxCodeLen = maxCodeLen;<a name="line.260"></a> +<span class="sourceLineNo">261</span> }<a name="line.261"></a> +<span class="sourceLineNo">262</span><a name="line.262"></a> +<span class="sourceLineNo">263</span> //-- BEGIN HANDLERS --//<a name="line.263"></a> +<span class="sourceLineNo">264</span><a name="line.264"></a> +<span class="sourceLineNo">265</span> /**<a name="line.265"></a> +<span class="sourceLineNo">266</span> * Handles 'A', 'E', 'I', 'O', 'U', and 'Y' cases.<a name="line.266"></a> +<span class="sourceLineNo">267</span> */<a name="line.267"></a> +<span class="sourceLineNo">268</span> private int handleAEIOUY(final DoubleMetaphoneResult result, final int index) {<a name="line.268"></a> +<span class="sourceLineNo">269</span> if (index == 0) {<a name="line.269"></a> +<span class="sourceLineNo">270</span> result.append('A');<a name="line.270"></a> +<span class="sourceLineNo">271</span> }<a name="line.271"></a> +<span class="sourceLineNo">272</span> return index + 1;<a name="line.272"></a> +<span class="sourceLineNo">273</span> }<a name="line.273"></a> +<span class="sourceLineNo">274</span><a name="line.274"></a> +<span class="sourceLineNo">275</span> /**<a name="line.275"></a> +<span class="sourceLineNo">276</span> * Handles 'C' cases.<a name="line.276"></a> +<span class="sourceLineNo">277</span> */<a name="line.277"></a> +<span class="sourceLineNo">278</span> private int handleC(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.278"></a> +<span class="sourceLineNo">279</span> if (conditionC0(value, index)) { // very confusing, moved out<a name="line.279"></a> +<span class="sourceLineNo">280</span> result.append('K');<a name="line.280"></a> +<span class="sourceLineNo">281</span> index += 2;<a name="line.281"></a> +<span class="sourceLineNo">282</span> } else if (index == 0 && contains(value, index, 6, "CAESAR")) {<a name="line.282"></a> +<span class="sourceLineNo">283</span> result.append('S');<a name="line.283"></a> +<span class="sourceLineNo">284</span> index += 2;<a name="line.284"></a> +<span class="sourceLineNo">285</span> } else if (contains(value, index, 2, "CH")) {<a name="line.285"></a> +<span class="sourceLineNo">286</span> index = handleCH(value, result, index);<a name="line.286"></a> +<span class="sourceLineNo">287</span> } else if (contains(value, index, 2, "CZ") &&<a name="line.287"></a> +<span class="sourceLineNo">288</span> !contains(value, index - 2, 4, "WICZ")) {<a name="line.288"></a> +<span class="sourceLineNo">289</span> //-- "Czerny" --//<a name="line.289"></a> +<span class="sourceLineNo">290</span> result.append('S', 'X');<a name="line.290"></a> +<span class="sourceLineNo">291</span> index += 2;<a name="line.291"></a> +<span class="sourceLineNo">292</span> } else if (contains(value, index + 1, 3, "CIA")) {<a name="line.292"></a> +<span class="sourceLineNo">293</span> //-- "focaccia" --//<a name="line.293"></a> +<span class="sourceLineNo">294</span> result.append('X');<a name="line.294"></a> +<span class="sourceLineNo">295</span> index += 3;<a name="line.295"></a> +<span class="sourceLineNo">296</span> } else if (contains(value, index, 2, "CC") &&<a name="line.296"></a> +<span class="sourceLineNo">297</span> !(index == 1 && charAt(value, 0) == 'M')) {<a name="line.297"></a> +<span class="sourceLineNo">298</span> //-- double "cc" but not "McClelland" --//<a name="line.298"></a> +<span class="sourceLineNo">299</span> return handleCC(value, result, index);<a name="line.299"></a> +<span class="sourceLineNo">300</span> } else if (contains(value, index, 2, "CK", "CG", "CQ")) {<a name="line.300"></a> +<span class="sourceLineNo">301</span> result.append('K');<a name="line.301"></a> +<span class="sourceLineNo">302</span> index += 2;<a name="line.302"></a> +<span class="sourceLineNo">303</span> } else if (contains(value, index, 2, "CI", "CE", "CY")) {<a name="line.303"></a> +<span class="sourceLineNo">304</span> //-- Italian vs. English --//<a name="line.304"></a> +<span class="sourceLineNo">305</span> if (contains(value, index, 3, "CIO", "CIE", "CIA")) {<a name="line.305"></a> +<span class="sourceLineNo">306</span> result.append('S', 'X');<a name="line.306"></a> +<span class="sourceLineNo">307</span> } else {<a name="line.307"></a> +<span class="sourceLineNo">308</span> result.append('S');<a name="line.308"></a> +<span class="sourceLineNo">309</span> }<a name="line.309"></a> +<span class="sourceLineNo">310</span> index += 2;<a name="line.310"></a> +<span class="sourceLineNo">311</span> } else {<a name="line.311"></a> +<span class="sourceLineNo">312</span> result.append('K');<a name="line.312"></a> +<span class="sourceLineNo">313</span> if (contains(value, index + 1, 2, " C", " Q", " G")) {<a name="line.313"></a> +<span class="sourceLineNo">314</span> //-- Mac Caffrey, Mac Gregor --//<a name="line.314"></a> +<span class="sourceLineNo">315</span> index += 3;<a name="line.315"></a> +<span class="sourceLineNo">316</span> } else if (contains(value, index + 1, 1, "C", "K", "Q") &&<a name="line.316"></a> +<span class="sourceLineNo">317</span> !contains(value, index + 1, 2, "CE", "CI")) {<a name="line.317"></a> +<span class="sourceLineNo">318</span> index += 2;<a name="line.318"></a> +<span class="sourceLineNo">319</span> } else {<a name="line.319"></a> +<span class="sourceLineNo">320</span> index++;<a name="line.320"></a> +<span class="sourceLineNo">321</span> }<a name="line.321"></a> +<span class="sourceLineNo">322</span> }<a name="line.322"></a> +<span class="sourceLineNo">323</span><a name="line.323"></a> +<span class="sourceLineNo">324</span> return index;<a name="line.324"></a> +<span class="sourceLineNo">325</span> }<a name="line.325"></a> +<span class="sourceLineNo">326</span><a name="line.326"></a> +<span class="sourceLineNo">327</span> /**<a name="line.327"></a> +<span class="sourceLineNo">328</span> * Handles 'CC' cases.<a name="line.328"></a> +<span class="sourceLineNo">329</span> */<a name="line.329"></a> +<span class="sourceLineNo">330</span> private int handleCC(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.330"></a> +<span class="sourceLineNo">331</span> if (contains(value, index + 2, 1, "I", "E", "H") &&<a name="line.331"></a> +<span class="sourceLineNo">332</span> !contains(value, index + 2, 2, "HU")) {<a name="line.332"></a> +<span class="sourceLineNo">333</span> //-- "bellocchio" but not "bacchus" --//<a name="line.333"></a> +<span class="sourceLineNo">334</span> if ((index == 1 && charAt(value, index - 1) == 'A') ||<a name="line.334"></a> +<span class="sourceLineNo">335</span> contains(value, index - 1, 5, "UCCEE", "UCCES")) {<a name="line.335"></a> +<span class="sourceLineNo">336</span> //-- "accident", "accede", "succeed" --//<a name="line.336"></a> +<span class="sourceLineNo">337</span> result.append("KS");<a name="line.337"></a> +<span class="sourceLineNo">338</span> } else {<a name="line.338"></a> +<span class="sourceLineNo">339</span> //-- "bacci", "bertucci", other Italian --//<a name="line.339"></a> +<span class="sourceLineNo">340</span> result.append('X');<a name="line.340"></a> +<span class="sourceLineNo">341</span> }<a name="line.341"></a> +<span class="sourceLineNo">342</span> index += 3;<a name="line.342"></a> +<span class="sourceLineNo">343</span> } else { // Pierce's rule<a name="line.343"></a> +<span class="sourceLineNo">344</span> result.append('K');<a name="line.344"></a> +<span class="sourceLineNo">345</span> index += 2;<a name="line.345"></a> +<span class="sourceLineNo">346</span> }<a name="line.346"></a> +<span class="sourceLineNo">347</span><a name="line.347"></a> +<span class="sourceLineNo">348</span> return index;<a name="line.348"></a> +<span class="sourceLineNo">349</span> }<a name="line.349"></a> +<span class="sourceLineNo">350</span><a name="line.350"></a> +<span class="sourceLineNo">351</span> /**<a name="line.351"></a> +<span class="sourceLineNo">352</span> * Handles 'CH' cases.<a name="line.352"></a> +<span class="sourceLineNo">353</span> */<a name="line.353"></a> +<span class="sourceLineNo">354</span> private int handleCH(final String value, final DoubleMetaphoneResult result, final int index) {<a name="line.354"></a> +<span class="sourceLineNo">355</span> if (index > 0 && contains(value, index, 4, "CHAE")) { // Michael<a name="line.355"></a> +<span class="sourceLineNo">356</span> result.append('K', 'X');<a name="line.356"></a> +<span class="sourceLineNo">357</span> return index + 2;<a name="line.357"></a> +<span class="sourceLineNo">358</span> } else if (conditionCH0(value, index)) {<a name="line.358"></a> +<span class="sourceLineNo">359</span> //-- Greek roots ("chemistry", "chorus", etc.) --//<a name="line.359"></a> +<span class="sourceLineNo">360</span> result.append('K');<a name="line.360"></a> +<span class="sourceLineNo">361</span> return index + 2;<a name="line.361"></a> +<span class="sourceLineNo">362</span> } else if (conditionCH1(value, index)) {<a name="line.362"></a> +<span class="sourceLineNo">363</span> //-- Germanic, Greek, or otherwise 'ch' for 'kh' sound --//<a name="line.363"></a> +<span class="sourceLineNo">364</span> result.append('K');<a name="line.364"></a> +<span class="sourceLineNo">365</span> return index + 2;<a name="line.365"></a> +<span class="sourceLineNo">366</span> } else {<a name="line.366"></a> +<span class="sourceLineNo">367</span> if (index > 0) {<a name="line.367"></a> +<span class="sourceLineNo">368</span> if (contains(value, 0, 2, "MC")) {<a name="line.368"></a> +<span class="sourceLineNo">369</span> result.append('K');<a name="line.369"></a> +<span class="sourceLineNo">370</span> } else {<a name="line.370"></a> +<span class="sourceLineNo">371</span> result.append('X', 'K');<a name="line.371"></a> +<span class="sourceLineNo">372</span> }<a name="line.372"></a> +<span class="sourceLineNo">373</span> } else {<a name="line.373"></a> +<span class="sourceLineNo">374</span> result.append('X');<a name="line.374"></a> +<span class="sourceLineNo">375</span> }<a name="line.375"></a> +<span class="sourceLineNo">376</span> return index + 2;<a name="line.376"></a> +<span class="sourceLineNo">377</span> }<a name="line.377"></a> +<span class="sourceLineNo">378</span> }<a name="line.378"></a> +<span class="sourceLineNo">379</span><a name="line.379"></a> +<span class="sourceLineNo">380</span> /**<a name="line.380"></a> +<span class="sourceLineNo">381</span> * Handles 'D' cases.<a name="line.381"></a> +<span class="sourceLineNo">382</span> */<a name="line.382"></a> +<span class="sourceLineNo">383</span> private int handleD(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.383"></a> +<span class="sourceLineNo">384</span> if (contains(value, index, 2, "DG")) {<a name="line.384"></a> +<span class="sourceLineNo">385</span> //-- "Edge" --//<a name="line.385"></a> +<span class="sourceLineNo">386</span> if (contains(value, index + 2, 1, "I", "E", "Y")) {<a name="line.386"></a> +<span class="sourceLineNo">387</span> result.append('J');<a name="line.387"></a> +<span class="sourceLineNo">388</span> index += 3;<a name="line.388"></a> +<span class="sourceLineNo">389</span> //-- "Edgar" --//<a name="line.389"></a> +<span class="sourceLineNo">390</span> } else {<a name="line.390"></a> +<span class="sourceLineNo">391</span> result.append("TK");<a name="line.391"></a> +<span class="sourceLineNo">392</span> index += 2;<a name="line.392"></a> +<span class="sourceLineNo">393</span> }<a name="line.393"></a> +<span class="sourceLineNo">394</span> } else if (contains(value, index, 2, "DT", "DD")) {<a name="line.394"></a> +<span class="sourceLineNo">395</span> result.append('T');<a name="line.395"></a> +<span class="sourceLineNo">396</span> index += 2;<a name="line.396"></a> +<span class="sourceLineNo">397</span> } else {<a name="line.397"></a> +<span class="sourceLineNo">398</span> result.append('T');<a name="line.398"></a> +<span class="sourceLineNo">399</span> index++;<a name="line.399"></a> +<span class="sourceLineNo">400</span> }<a name="line.400"></a> +<span class="sourceLineNo">401</span> return index;<a name="line.401"></a> +<span class="sourceLineNo">402</span> }<a name="line.402"></a> +<span class="sourceLineNo">403</span><a name="line.403"></a> +<span class="sourceLineNo">404</span> /**<a name="line.404"></a> +<span class="sourceLineNo">405</span> * Handles 'G' cases.<a name="line.405"></a> +<span class="sourceLineNo">406</span> */<a name="line.406"></a> +<span class="sourceLineNo">407</span> private int handleG(final String value, final DoubleMetaphoneResult result, int index,<a name="line.407"></a> +<span class="sourceLineNo">408</span> final boolean slavoGermanic) {<a name="line.408"></a> +<span class="sourceLineNo">409</span> if (charAt(value, index + 1) == 'H') {<a name="line.409"></a> +<span class="sourceLineNo">410</span> index = handleGH(value, result, index);<a name="line.410"></a> +<span class="sourceLineNo">411</span> } else if (charAt(value, index + 1) == 'N') {<a name="line.411"></a> +<span class="sourceLineNo">412</span> if (index == 1 && isVowel(charAt(value, 0)) && !slavoGermanic) {<a name="line.412"></a> +<span class="sourceLineNo">413</span> result.append("KN", "N");<a name="line.413"></a> +<span class="sourceLineNo">414</span> } else if (!contains(value, index + 2, 2, "EY") &&<a name="line.414"></a> +<span class="sourceLineNo">415</span> charAt(value, index + 1) != 'Y' && !slavoGermanic) {<a name="line.415"></a> +<span class="sourceLineNo">416</span> result.append("N", "KN");<a name="line.416"></a> +<span class="sourceLineNo">417</span> } else {<a name="line.417"></a> +<span class="sourceLineNo">418</span> result.append("KN");<a name="line.418"></a> +<span class="sourceLineNo">419</span> }<a name="line.419"></a> +<span class="sourceLineNo">420</span> index = index + 2;<a name="line.420"></a> +<span class="sourceLineNo">421</span> } else if (contains(value, index + 1, 2, "LI") && !slavoGermanic) {<a name="line.421"></a> +<span class="sourceLineNo">422</span> result.append("KL", "L");<a name="line.422"></a> +<span class="sourceLineNo">423</span> index += 2;<a name="line.423"></a> +<span class="sourceLineNo">424</span> } else if (index == 0 &&<a name="line.424"></a> +<span class="sourceLineNo">425</span> (charAt(value, index + 1) == 'Y' ||<a name="line.425"></a> +<span class="sourceLineNo">426</span> contains(value, index + 1, 2, ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER))) {<a name="line.426"></a> +<span class="sourceLineNo">427</span> //-- -ges-, -gep-, -gel-, -gie- at beginning --//<a name="line.427"></a> +<span class="sourceLineNo">428</span> result.append('K', 'J');<a name="line.428"></a> +<span class="sourceLineNo">429</span> index += 2;<a name="line.429"></a> +<span class="sourceLineNo">430</span> } else if ((contains(value, index + 1, 2, "ER") ||<a name="line.430"></a> +<span class="sourceLineNo">431</span> charAt(value, index + 1) == 'Y') &&<a name="line.431"></a> +<span class="sourceLineNo">432</span> !contains(value, 0, 6, "DANGER", "RANGER", "MANGER") &&<a name="line.432"></a> +<span class="sourceLineNo">433</span> !contains(value, index - 1, 1, "E", "I") &&<a name="line.433"></a> +<span class="sourceLineNo">434</span> !contains(value, index - 1, 3, "RGY", "OGY")) {<a name="line.434"></a> +<span class="sourceLineNo">435</span> //-- -ger-, -gy- --//<a name="line.435"></a> +<span class="sourceLineNo">436</span> result.append('K', 'J');<a name="line.436"></a> +<span class="sourceLineNo">437</span> index += 2;<a name="line.437"></a> +<span class="sourceLineNo">438</span> } else if (contains(value, index + 1, 1, "E", "I", "Y") ||<a name="line.438"></a> +<span class="sourceLineNo">439</span> contains(value, index - 1, 4, "AGGI", "OGGI")) {<a name="line.439"></a> +<span class="sourceLineNo">440</span> //-- Italian "biaggi" --//<a name="line.440"></a> +<span class="sourceLineNo">441</span> if (contains(value, 0 ,4, "VAN ", "VON ") ||<a name="line.441"></a> +<span class="sourceLineNo">442</span> contains(value, 0, 3, "SCH") ||<a name="line.442"></a> +<span class="sourceLineNo">443</span> contains(value, index + 1, 2, "ET")) {<a name="line.443"></a> +<span class="sourceLineNo">444</span> //-- obvious germanic --//<a name="line.444"></a> +<span class="sourceLineNo">445</span> result.append('K');<a name="line.445"></a> +<span class="sourceLineNo">446</span> } else if (contains(value, index + 1, 3, "IER")) {<a name="line.446"></a> +<span class="sourceLineNo">447</span> result.append('J');<a name="line.447"></a> +<span class="sourceLineNo">448</span> } else {<a name="line.448"></a> +<span class="sourceLineNo">449</span> result.append('J', 'K');<a name="line.449"></a> +<span class="sourceLineNo">450</span> }<a name="line.450"></a> +<span class="sourceLineNo">451</span> index += 2;<a name="line.451"></a> +<span class="sourceLineNo">452</span> } else if (charAt(value, index + 1) == 'G') {<a name="line.452"></a> +<span class="sourceLineNo">453</span> index += 2;<a name="line.453"></a> +<span class="sourceLineNo">454</span> result.append('K');<a name="line.454"></a> +<span class="sourceLineNo">455</span> } else {<a name="line.455"></a> +<span class="sourceLineNo">456</span> index++;<a name="line.456"></a> +<span class="sourceLineNo">457</span> result.append('K');<a name="line.457"></a> +<span class="sourceLineNo">458</span> }<a name="line.458"></a> +<span class="sourceLineNo">459</span> return index;<a name="line.459"></a> +<span class="sourceLineNo">460</span> }<a name="line.460"></a> +<span class="sourceLineNo">461</span><a name="line.461"></a> +<span class="sourceLineNo">462</span> /**<a name="line.462"></a> +<span class="sourceLineNo">463</span> * Handles 'GH' cases.<a name="line.463"></a> +<span class="sourceLineNo">464</span> */<a name="line.464"></a> +<span class="sourceLineNo">465</span> private int handleGH(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.465"></a> +<span class="sourceLineNo">466</span> if (index > 0 && !isVowel(charAt(value, index - 1))) {<a name="line.466"></a> +<span class="sourceLineNo">467</span> result.append('K');<a name="line.467"></a> +<span class="sourceLineNo">468</span> index += 2;<a name="line.468"></a> +<span class="sourceLineNo">469</span> } else if (index == 0) {<a name="line.469"></a> +<span class="sourceLineNo">470</span> if (charAt(value, index + 2) == 'I') {<a name="line.470"></a> +<span class="sourceLineNo">471</span> result.append('J');<a name="line.471"></a> +<span class="sourceLineNo">472</span> } else {<a name="line.472"></a> +<span class="sourceLineNo">473</span> result.append('K');<a name="line.473"></a> +<span class="sourceLineNo">474</span> }<a name="line.474"></a> +<span class="sourceLineNo">475</span> index += 2;<a name="line.475"></a> +<span class="sourceLineNo">476</span> } else if ((index > 1 && contains(value, index - 2, 1, "B", "H", "D")) ||<a name="line.476"></a> +<span class="sourceLineNo">477</span> (index > 2 && contains(value, index - 3, 1, "B", "H", "D")) ||<a name="line.477"></a> +<span class="sourceLineNo">478</span> (index > 3 && contains(value, index - 4, 1, "B", "H"))) {<a name="line.478"></a> +<span class="sourceLineNo">479</span> //-- Parker's rule (with some further refinements) - "hugh"<a name="line.479"></a> +<span class="sourceLineNo">480</span> index += 2;<a name="line.480"></a> +<span class="sourceLineNo">481</span> } else {<a name="line.481"></a> +<span class="sourceLineNo">482</span> if (index > 2 && charAt(value, index - 1) == 'U' &&<a name="line.482"></a> +<span class="sourceLineNo">483</span> contains(value, index - 3, 1, "C", "G", "L", "R", "T")) {<a name="line.483"></a> +<span class="sourceLineNo">484</span> //-- "laugh", "McLaughlin", "cough", "gough", "rough", "tough"<a name="line.484"></a> +<span class="sourceLineNo">485</span> result.append('F');<a name="line.485"></a> +<span class="sourceLineNo">486</span> } else if (index > 0 && charAt(value, index - 1) != 'I') {<a name="line.486"></a> +<span class="sourceLineNo">487</span> result.append('K');<a name="line.487"></a> +<span class="sourceLineNo">488</span> }<a name="line.488"></a> +<span class="sourceLineNo">489</span> index += 2;<a name="line.489"></a> +<span class="sourceLineNo">490</span> }<a name="line.490"></a> +<span class="sourceLineNo">491</span> return index;<a name="line.491"></a> +<span class="sourceLineNo">492</span> }<a name="line.492"></a> +<span class="sourceLineNo">493</span><a name="line.493"></a> +<span class="sourceLineNo">494</span> /**<a name="line.494"></a> +<span class="sourceLineNo">495</span> * Handles 'H' cases.<a name="line.495"></a> +<span class="sourceLineNo">496</span> */<a name="line.496"></a> +<span class="sourceLineNo">497</span> private int handleH(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.497"></a> +<span class="sourceLineNo">498</span> //-- only keep if first & before vowel or between 2 vowels --//<a name="line.498"></a> +<span class="sourceLineNo">499</span> if ((index == 0 || isVowel(charAt(value, index - 1))) &&<a name="line.499"></a> +<span class="sourceLineNo">500</span> isVowel(charAt(value, index + 1))) {<a name="line.500"></a> +<span class="sourceLineNo">501</span> result.append('H');<a name="line.501"></a> +<span class="sourceLineNo">502</span> index += 2;<a name="line.502"></a> +<span class="sourceLineNo">503</span> //-- also takes car of "HH" --//<a name="line.503"></a> +<span class="sourceLineNo">504</span> } else {<a name="line.504"></a> +<span class="sourceLineNo">505</span> index++;<a name="line.505"></a> +<span class="sourceLineNo">506</span> }<a name="line.506"></a> +<span class="sourceLineNo">507</span> return index;<a name="line.507"></a> +<span class="sourceLineNo">508</span> }<a name="line.508"></a> +<span class="sourceLineNo">509</span><a name="line.509"></a> +<span class="sourceLineNo">510</span> /**<a name="line.510"></a> +<span class="sourceLineNo">511</span> * Handles 'J' cases.<a name="line.511"></a> +<span class="sourceLineNo">512</span> */<a name="line.512"></a> +<span class="sourceLineNo">513</span> private int handleJ(final String value, final DoubleMetaphoneResult result, int index,<a name="line.513"></a> +<span class="sourceLineNo">514</span> final boolean slavoGermanic) {<a name="line.514"></a> +<span class="sourceLineNo">515</span> if (contains(value, index, 4, "JOSE") || contains(value, 0, 4, "SAN ")) {<a name="line.515"></a> +<span class="sourceLineNo">516</span> //-- obvious Spanish, "Jose", "San Jacinto" --//<a name="line.516"></a> +<span class="sourceLineNo">517</span> if ((index == 0 && (charAt(value, index + 4) == ' ') ||<a name="line.517"></a> +<span class="sourceLineNo">518</span> value.length() == 4) || contains(value, 0, 4, "SAN ")) {<a name="line.518"></a> +<span class="sourceLineNo">519</span> result.append('H');<a name="line.519"></a> +<span class="sourceLineNo">520</span> } else {<a name="line.520"></a> +<span class="sourceLineNo">521</span> result.append('J', 'H');<a name="line.521"></a> +<span class="sourceLineNo">522</span> }<a name="line.522"></a> +<span class="sourceLineNo">523</span> index++;<a name="line.523"></a> +<span class="sourceLineNo">524</span> } else {<a name="line.524"></a> +<span class="sourceLineNo">525</span> if (index == 0 && !contains(value, index, 4, "JOSE")) {<a name="line.525"></a> +<span class="sourceLineNo">526</span> result.append('J', 'A');<a name="line.526"></a> +<span class="sourceLineNo">527</span> } else if (isVowel(charAt(value, index - 1)) && !slavoGermanic &&<a name="line.527"></a> +<span class="sourceLineNo">528</span> (charAt(value, index + 1) == 'A' || charAt(value, index + 1) == 'O')) {<a name="line.528"></a> +<span class="sourceLineNo">529</span> result.append('J', 'H');<a name="line.529"></a> +<span class="sourceLineNo">530</span> } else if (index == value.length() - 1) {<a name="line.530"></a> +<span class="sourceLineNo">531</span> result.append('J', ' ');<a name="line.531"></a> +<span class="sourceLineNo">532</span> } else if (!contains(value, index + 1, 1, L_T_K_S_N_M_B_Z) &&<a name="line.532"></a> +<span class="sourceLineNo">533</span> !contains(value, index - 1, 1, "S", "K", "L")) {<a name="line.533"></a> +<span class="sourceLineNo">534</span> result.append('J');<a name="line.534"></a> +<span class="sourceLineNo">535</span> }<a name="line.535"></a> +<span class="sourceLineNo">536</span><a name="line.536"></a> +<span class="sourceLineNo">537</span> if (charAt(value, index + 1) == 'J') {<a name="line.537"></a> +<span class="sourceLineNo">538</span> index += 2;<a name="line.538"></a> +<span class="sourceLineNo">539</span> } else {<a name="line.539"></a> +<span class="sourceLineNo">540</span> index++;<a name="line.540"></a> +<span class="sourceLineNo">541</span> }<a name="line.541"></a> +<span class="sourceLineNo">542</span> }<a name="line.542"></a> +<span class="sourceLineNo">543</span> return index;<a name="line.543"></a> +<span class="sourceLineNo">544</span> }<a name="line.544"></a> +<span class="sourceLineNo">545</span><a name="line.545"></a> +<span class="sourceLineNo">546</span> /**<a name="line.546"></a> +<span class="sourceLineNo">547</span> * Handles 'L' cases.<a name="line.547"></a> +<span class="sourceLineNo">548</span> */<a name="line.548"></a> +<span class="sourceLineNo">549</span> private int handleL(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.549"></a> +<span class="sourceLineNo">550</span> if (charAt(value, index + 1) == 'L') {<a name="line.550"></a> +<span class="sourceLineNo">551</span> if (conditionL0(value, index)) {<a name="line.551"></a> +<span class="sourceLineNo">552</span> result.appendPrimary('L');<a name="line.552"></a> +<span class="sourceLineNo">553</span> } else {<a name="line.553"></a> +<span class="sourceLineNo">554</span> result.append('L');<a name="line.554"></a> +<span class="sourceLineNo">555</span> }<a name="line.555"></a> +<span class="sourceLineNo">556</span> index += 2;<a name="line.556"></a> +<span class="sourceLineNo">557</span> } else {<a name="line.557"></a> +<span class="sourceLineNo">558</span> index++;<a name="line.558"></a> +<span class="sourceLineNo">559</span> result.append('L');<a name="line.559"></a> +<span class="sourceLineNo">560</span> }<a name="line.560"></a> +<span class="sourceLineNo">561</span> return index;<a name="line.561"></a> +<span class="sourceLineNo">562</span> }<a name="line.562"></a> +<span class="sourceLineNo">563</span><a name="line.563"></a> +<span class="sourceLineNo">564</span> /**<a name="line.564"></a> +<span class="sourceLineNo">565</span> * Handles 'P' cases.<a name="line.565"></a> +<span class="sourceLineNo">566</span> */<a name="line.566"></a> +<span class="sourceLineNo">567</span> private int handleP(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.567"></a> +<span class="sourceLineNo">568</span> if (charAt(value, index + 1) == 'H') {<a name="line.568"></a> +<span class="sourceLineNo">569</span> result.append('F');<a name="line.569"></a> +<span class="sourceLineNo">570</span> index += 2;<a name="line.570"></a> +<span class="sourceLineNo">571</span> } else {<a name="line.571"></a> +<span class="sourceLineNo">572</span> result.append('P');<a name="line.572"></a> +<span class="sourceLineNo">573</span> index = contains(value, index + 1, 1, "P", "B") ? index + 2 : index + 1;<a name="line.573"></a> +<span class="sourceLineNo">574</span> }<a name="line.574"></a> +<span class="sourceLineNo">575</span> return index;<a name="line.575"></a> +<span class="sourceLineNo">576</span> }<a name="line.576"></a> +<span class="sourceLineNo">577</span><a name="line.577"></a> +<span class="sourceLineNo">578</span> /**<a name="line.578"></a> +<span class="sourceLineNo">579</span> * Handles 'R' cases.<a name="line.579"></a> +<span class="sourceLineNo">580</span> */<a name="line.580"></a> +<span class="sourceLineNo">581</span> private int handleR(final String value, final DoubleMetaphoneResult result, final int index,<a name="line.581"></a> +<span class="sourceLineNo">582</span> final boolean slavoGermanic) {<a name="line.582"></a> +<span class="sourceLineNo">583</span> if (index == value.length() - 1 && !slavoGermanic &&<a name="line.583"></a> +<span class="sourceLineNo">584</span> contains(value, index - 2, 2, "IE") &&<a name="line.584"></a> +<span class="sourceLineNo">585</span> !contains(value, index - 4, 2, "ME", "MA")) {<a name="line.585"></a> +<span class="sourceLineNo">586</span> result.appendAlternate('R');<a name="line.586"></a> +<span class="sourceLineNo">587</span> } else {<a name="line.587"></a> +<span class="sourceLineNo">588</span> result.append('R');<a name="line.588"></a> +<span class="sourceLineNo">589</span> }<a name="line.589"></a> +<span class="sourceLineNo">590</span> return charAt(value, index + 1) == 'R' ? index + 2 : index + 1;<a name="line.590"></a> +<span class="sourceLineNo">591</span> }<a name="line.591"></a> +<span class="sourceLineNo">592</span><a name="line.592"></a> +<span class="sourceLineNo">593</span> /**<a name="line.593"></a> +<span class="sourceLineNo">594</span> * Handles 'S' cases.<a name="line.594"></a> +<span class="sourceLineNo">595</span> */<a name="line.595"></a> +<span class="sourceLineNo">596</span> private int handleS(final String value, final DoubleMetaphoneResult result, int index,<a name="line.596"></a> +<span class="sourceLineNo">597</span> final boolean slavoGermanic) {<a name="line.597"></a> +<span class="sourceLineNo">598</span> if (contains(value, index - 1, 3, "ISL", "YSL")) {<a name="line.598"></a> +<span class="sourceLineNo">599</span> //-- special cases "island", "isle", "carlisle", "carlysle" --//<a name="line.599"></a> +<span class="sourceLineNo">600</span> index++;<a name="line.600"></a> +<span class="sourceLineNo">601</span> } else if (index == 0 && contains(value, index, 5, "SUGAR")) {<a name="line.601"></a> +<span class="sourceLineNo">602</span> //-- special case "sugar-" --//<a name="line.602"></a> +<span class="sourceLineNo">603</span> result.append('X', 'S');<a name="line.603"></a> +<span class="sourceLineNo">604</span> index++;<a name="line.604"></a> +<span class="sourceLineNo">605</span> } else if (contains(value, index, 2, "SH")) {<a name="line.605"></a> +<span class="sourceLineNo">606</span> if (contains(value, index + 1, 4, "HEIM", "HOEK", "HOLM", "HOLZ")) {<a name="line.606"></a> +<span class="sourceLineNo">607</span> //-- germanic --//<a name="line.607"></a> +<span class="sourceLineNo">608</span> result.append('S');<a name="line.608"></a> +<span class="sourceLineNo">609</span> } else {<a name="line.609"></a> +<span class="sourceLineNo">610</span> result.append('X');<a name="line.610"></a> +<span class="sourceLineNo">611</span> }<a name="line.611"></a> +<span class="sourceLineNo">612</span> index += 2;<a name="line.612"></a> +<span class="sourceLineNo">613</span> } else if (contains(value, index, 3, "SIO", "SIA") || contains(value, index, 4, "SIAN")) {<a name="line.613"></a> +<span class="sourceLineNo">614</span> //-- Italian and Armenian --//<a name="line.614"></a> +<span class="sourceLineNo">615</span> if (slavoGermanic) {<a name="line.615"></a> +<span class="sourceLineNo">616</span> result.append('S');<a name="line.616"></a> +<span class="sourceLineNo">617</span> } else {<a name="line.617"></a> +<span class="sourceLineNo">618</span> result.append('S', 'X');<a name="line.618"></a> +<span class="sourceLineNo">619</span> }<a name="line.619"></a> +<span class="sourceLineNo">620</span> index += 3;<a name="line.620"></a> +<span class="sourceLineNo">621</span> } else if ((index == 0 && contains(value, index + 1, 1, "M", "N", "L", "W")) ||<a name="line.621"></a> +<span class="sourceLineNo">622</span> contains(value, index + 1, 1, "Z")) {<a name="line.622"></a> +<span class="sourceLineNo">623</span> //-- german & anglicisations, e.g. "smith" match "schmidt" //<a name="line.623"></a> +<span class="sourceLineNo">624</span> // "snider" match "schneider" --//<a name="line.624"></a> +<span class="sourceLineNo">625</span> //-- also, -sz- in slavic language although in hungarian it //<a name="line.625"></a> +<span class="sourceLineNo">626</span> // is pronounced "s" --//<a name="line.626"></a> +<span class="sourceLineNo">627</span> result.append('S', 'X');<a name="line.627"></a> +<span class="sourceLineNo">628</span> index = contains(value, index + 1, 1, "Z") ? index + 2 : index + 1;<a name="line.628"></a> +<span class="sourceLineNo">629</span> } else if (contains(value, index, 2, "SC")) {<a name="line.629"></a> +<span class="sourceLineNo">630</span> index = handleSC(value, result, index);<a name="line.630"></a> +<span class="sourceLineNo">631</span> } else {<a name="line.631"></a> +<span class="sourceLineNo">632</span> if (index == value.length() - 1 && contains(value, index - 2, 2, "AI", "OI")) {<a name="line.632"></a> +<span class="sourceLineNo">633</span> //-- french e.g. "resnais", "artois" --//<a name="line.633"></a> +<span class="sourceLineNo">634</span> result.appendAlternate('S');<a name="line.634"></a> +<span class="sourceLineNo">635</span> } else {<a name="line.635"></a> +<span class="sourceLineNo">636</span> result.append('S');<a name="line.636"></a> +<span class="sourceLineNo">637</span> }<a name="line.637"></a> +<span class="sourceLineNo">638</span> index = contains(value, index + 1, 1, "S", "Z") ? index + 2 : index + 1;<a name="line.638"></a> +<span class="sourceLineNo">639</span> }<a name="line.639"></a> +<span class="sourceLineNo">640</span> return index;<a name="line.640"></a> +<span class="sourceLineNo">641</span> }<a name="line.641"></a> +<span class="sourceLineNo">642</span><a name="line.642"></a> +<span class="sourceLineNo">643</span> /**<a name="line.643"></a> +<span class="sourceLineNo">644</span> * Handles 'SC' cases.<a name="line.644"></a> +<span class="sourceLineNo">645</span> */<a name="line.645"></a> +<span class="sourceLineNo">646</span> private int handleSC(final String value, final DoubleMetaphoneResult result, final int index) {<a name="line.646"></a> +<span class="sourceLineNo">647</span> if (charAt(value, index + 2) == 'H') {<a name="line.647"></a> +<span class="sourceLineNo">648</span> //-- Schlesinger's rule --//<a name="line.648"></a> +<span class="sourceLineNo">649</span> if (contains(value, index + 3, 2, "OO", "ER", "EN", "UY", "ED", "EM")) {<a name="line.649"></a> +<span class="sourceLineNo">650</span> //-- Dutch origin, e.g. "school", "schooner" --//<a name="line.650"></a> +<span class="sourceLineNo">651</span> if (contains(value, index + 3, 2, "ER", "EN")) {<a name="line.651"></a> +<span class="sourceLineNo">652</span> //-- "schermerhorn", "schenker" --//<a name="line.652"></a> +<span class="sourceLineNo">653</span> result.append("X", "SK");<a name="line.653"></a> +<span class="sourceLineNo">654</span> } else {<a name="line.654"></a> +<span class="sourceLineNo">655</span> result.append("SK");<a name="line.655"></a> +<span class="sourceLineNo">656</span> }<a name="line.656"></a> +<span class="sourceLineNo">657</span> } else {<a name="line.657"></a> +<span class="sourceLineNo">658</span> if (index == 0 && !isVowel(charAt(value, 3)) && charAt(value, 3) != 'W') {<a name="line.658"></a> +<span class="sourceLineNo">659</span> result.append('X', 'S');<a name="line.659"></a> +<span class="sourceLineNo">660</span> } else {<a name="line.660"></a> +<span class="sourceLineNo">661</span> result.append('X');<a name="line.661"></a> +<span class="sourceLineNo">662</span> }<a name="line.662"></a> +<span class="sourceLineNo">663</span> }<a name="line.663"></a> +<span class="sourceLineNo">664</span> } else if (contains(value, index + 2, 1, "I", "E", "Y")) {<a name="line.664"></a> +<span class="sourceLineNo">665</span> result.append('S');<a name="line.665"></a> +<span class="sourceLineNo">666</span> } else {<a name="line.666"></a> +<span class="sourceLineNo">667</span> result.append("SK");<a name="line.667"></a> +<span class="sourceLineNo">668</span> }<a name="line.668"></a> +<span class="sourceLineNo">669</span> return index + 3;<a name="line.669"></a> +<span class="sourceLineNo">670</span> }<a name="line.670"></a> +<span class="sourceLineNo">671</span><a name="line.671"></a> +<span class="sourceLineNo">672</span> /**<a name="line.672"></a> +<span class="sourceLineNo">673</span> * Handles 'T' cases.<a name="line.673"></a> +<span class="sourceLineNo">674</span> */<a name="line.674"></a> +<span class="sourceLineNo">675</span> private int handleT(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.675"></a> +<span class="sourceLineNo">676</span> if (contains(value, index, 4, "TION")) {<a name="line.676"></a> +<span class="sourceLineNo">677</span> result.append('X');<a name="line.677"></a> +<span class="sourceLineNo">678</span> index += 3;<a name="line.678"></a> +<span class="sourceLineNo">679</span> } else if (contains(value, index, 3, "TIA", "TCH")) {<a name="line.679"></a> +<span class="sourceLineNo">680</span> result.append('X');<a name="line.680"></a> +<span class="sourceLineNo">681</span> index += 3;<a name="line.681"></a> +<span class="sourceLineNo">682</span> } else if (contains(value, index, 2, "TH") || contains(value, index, 3, "TTH")) {<a name="line.682"></a> +<span class="sourceLineNo">683</span> if (contains(value, index + 2, 2, "OM", "AM") ||<a name="line.683"></a> +<span class="sourceLineNo">684</span> //-- special case "thomas", "thames" or germanic --//<a name="line.684"></a> +<span class="sourceLineNo">685</span> contains(value, 0, 4, "VAN ", "VON ") ||<a name="line.685"></a> +<span class="sourceLineNo">686</span> contains(value, 0, 3, "SCH")) {<a name="line.686"></a> +<span class="sourceLineNo">687</span> result.append('T');<a name="line.687"></a> +<span class="sourceLineNo">688</span> } else {<a name="line.688"></a> +<span class="sourceLineNo">689</span> result.append('0', 'T');<a name="line.689"></a> +<span class="sourceLineNo">690</span> }<a name="line.690"></a> +<span class="sourceLineNo">691</span> index += 2;<a name="line.691"></a> +<span class="sourceLineNo">692</span> } else {<a name="line.692"></a> +<span class="sourceLineNo">693</span> result.append('T');<a name="line.693"></a> +<span class="sourceLineNo">694</span> index = contains(value, index + 1, 1, "T", "D") ? index + 2 : index + 1;<a name="line.694"></a> +<span class="sourceLineNo">695</span> }<a name="line.695"></a> +<span class="sourceLineNo">696</span> return index;<a name="line.696"></a> +<span class="sourceLineNo">697</span> }<a name="line.697"></a> +<span class="sourceLineNo">698</span><a name="line.698"></a> +<span class="sourceLineNo">699</span> /**<a name="line.699"></a> +<span class="sourceLineNo">700</span> * Handles 'W' cases.<a name="line.700"></a> +<span class="sourceLineNo">701</span> */<a name="line.701"></a> +<span class="sourceLineNo">702</span> private int handleW(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.702"></a> +<span class="sourceLineNo">703</span> if (contains(value, index, 2, "WR")) {<a name="line.703"></a> +<span class="sourceLineNo">704</span> //-- can also be in middle of word --//<a name="line.704"></a> +<span class="sourceLineNo">705</span> result.append('R');<a name="line.705"></a> +<span class="sourceLineNo">706</span> index += 2;<a name="line.706"></a> +<span class="sourceLineNo">707</span> } else {<a name="line.707"></a> +<span class="sourceLineNo">708</span> if (index == 0 && (isVowel(charAt(value, index + 1)) ||<a name="line.708"></a> +<span class="sourceLineNo">709</span> contains(value, index, 2, "WH"))) {<a name="line.709"></a> +<span class="sourceLineNo">710</span> if (isVowel(charAt(value, index + 1))) {<a name="line.710"></a> +<span class="sourceLineNo">711</span> //-- Wasserman should match Vasserman --//<a name="line.711"></a> +<span class="sourceLineNo">712</span> result.append('A', 'F');<a name="line.712"></a> +<span class="sourceLineNo">713</span> } else {<a name="line.713"></a> +<span class="sourceLineNo">714</span> //-- need Uomo to match Womo --//<a name="line.714"></a> +<span class="sourceLineNo">715</span> result.append('A');<a name="line.715"></a> +<span class="sourceLineNo">716</span> }<a name="line.716"></a> +<span class="sourceLineNo">717</span> index++;<a name="line.717"></a> +<span class="sourceLineNo">718</span> } else if ((index == value.length() - 1 && isVowel(charAt(value, index - 1))) ||<a name="line.718"></a> +<span class="sourceLineNo">719</span> contains(value, index - 1, 5, "EWSKI", "EWSKY", "OWSKI", "OWSKY") ||<a name="line.719"></a> +<span class="sourceLineNo">720</span> contains(value, 0, 3, "SCH")) {<a name="line.720"></a> +<span class="sourceLineNo">721</span> //-- Arnow should match Arnoff --//<a name="line.721"></a> +<span class="sourceLineNo">722</span> result.appendAlternate('F');<a name="line.722"></a> +<span class="sourceLineNo">723</span> index++;<a name="line.723"></a> +<span class="sourceLineNo">724</span> } else if (contains(value, index, 4, "WICZ", "WITZ")) {<a name="line.724"></a> +<span class="sourceLineNo">725</span> //-- Polish e.g. "filipowicz" --//<a name="line.725"></a> +<span class="sourceLineNo">726</span> result.append("TS", "FX");<a name="line.726"></a> +<span class="sourceLineNo">727</span> index += 4;<a name="line.727"></a> +<span class="sourceLineNo">728</span> } else {<a name="line.728"></a> +<span class="sourceLineNo">729</span> index++;<a name="line.729"></a> +<span class="sourceLineNo">730</span> }<a name="line.730"></a> +<span class="sourceLineNo">731</span> }<a name="line.731"></a> +<span class="sourceLineNo">732</span> return index;<a name="line.732"></a> +<span class="sourceLineNo">733</span> }<a name="line.733"></a> +<span class="sourceLineNo">734</span><a name="line.734"></a> +<span class="sourceLineNo">735</span> /**<a name="line.735"></a> +<span class="sourceLineNo">736</span> * Handles 'X' cases.<a name="line.736"></a> +<span class="sourceLineNo">737</span> */<a name="line.737"></a> +<span class="sourceLineNo">738</span> private int handleX(final String value, final DoubleMetaphoneResult result, int index) {<a name="line.738"></a> +<span class="sourceLineNo">739</span> if (index == 0) {<a name="line.739"></a> +<span class="sourceLineNo">740</span> result.append('S');<a name="line.740"></a> +<span class="sourceLineNo">741</span> index++;<a name="line.741"></a> +<span class="sourceLineNo">742</span> } else {<a name="line.742"></a> +<span class="sourceLineNo">743</span> if (!((index == value.length() - 1) &&<a name="line.743"></a> +<span class="sourceLineNo">744</span> (contains(value, index - 3, 3, "IAU", "EAU") ||<a name="line.744"></a> +<span class="sourceLineNo">745</span> contains(value, index - 2, 2, "AU", "OU")))) {<a name="line.745"></a> +<span class="sourceLineNo">746</span> //-- French e.g. breaux --//<a name="line.746"></a> +<span class="sourceLineNo">747</span> result.append("KS");<a name="line.747"></a> +<span class="sourceLineNo">748</span> }<a name="line.748"></a> +<span class="sourceLineNo">749</span> index = contains(value, index + 1, 1, "C", "X") ? index + 2 : index + 1;<a name="line.749"></a> +<span class="sourceLineNo">750</span> }<a name="line.750"></a> +<span class="sourceLineNo">751</span> return index;<a name="line.751"></a> +<span class="sourceLineNo">752</span> }<a name="line.752"></a> +<span class="sourceLineNo">753</span><a name="line.753"></a> +<span class="sourceLineNo">754</span> /**<a name="line.754"></a> +<span class="sourceLineNo">755</span> * Handles 'Z' cases.<a name="line.755"></a> +<span class="sourceLineNo">756</span> */<a name="line.756"></a> +<span class="sourceLineNo">757</span> private int handleZ(final String value, final DoubleMetaphoneResult result, int index,<a name="line.757"></a> +<span class="sourceLineNo">758</span> final boolean slavoGermanic) {<a name="line.758"></a> +<span class="sourceLineNo">759</span> if (charAt(value, index + 1) == 'H') {<a name="line.759"></a> +<span class="sourceLineNo">760</span> //-- Chinese pinyin e.g. "zhao" or Angelina "Zhang" --//<a name="line.760"></a> +<span class="sourceLineNo">761</span> result.append('J');<a name="line.761"></a> +<span class="sourceLineNo">762</span> index += 2;<a name="line.762"></a> +<span class="sourceLineNo">763</span> } else {<a name="line.763"></a> +<span class="sourceLineNo">764</span> if (contains(value, index + 1, 2, "ZO", "ZI", "ZA") ||<a name="line.764"></a> +<span class="sourceLineNo">765</span> (slavoGermanic && (index > 0 && charAt(value, index - 1) != 'T'))) {<a name="line.765"></a> +<span class="sourceLineNo">766</span> result.append("S", "TS");<a name="line.766"></a> +<span class="sourceLineNo">767</span> } else {<a name="line.767"></a> +<span class="sourceLineNo">768</span> result.append('S');<a name="line.768"></a> +<span class="sourceLineNo">769</span> }<a name="line.769"></a> +<span class="sourceLineNo">770</span> index = charAt(value, index + 1) == 'Z' ? index + 2 : index + 1;<a name="line.770"></a> +<span class="sourceLineNo">771</span> }<a name="line.771"></a> +<span class="sourceLineNo">772</span> return index;<a name="line.772"></a> +<span class="sourceLineNo">773</span> }<a name="line.773"></a> +<span class="sourceLineNo">774</span><a name="line.774"></a> +<span class="sourceLineNo">775</span> //-- BEGIN CONDITIONS --//<a name="line.775"></a> +<span class="sourceLineNo">776</span><a name="line.776"></a> +<span class="sourceLineNo">777</span> /**<a name="line.777"></a> +<span class="sourceLineNo">778</span> * Complex condition 0 for 'C'.<a name="line.778"></a> +<span class="sourceLineNo">779</span> */<a name="line.779"></a> +<span class="sourceLineNo">780</span> private boolean conditionC0(final String value, final int index) {<a name="line.780"></a> +<span class="sourceLineNo">781</span> if (contains(value, index, 4, "CHIA")) {<a name="line.781"></a> +<span class="sourceLineNo">782</span> return true;<a name="line.782"></a> +<span class="sourceLineNo">783</span> } else if (index <= 1) {<a name="line.783"></a> +<span class="sourceLineNo">784</span> return false;<a name="line.784"></a> +<span class="sourceLineNo">785</span> } else if (isVowel(charAt(value, index - 2))) {<a name="line.785"></a> +<span class="sourceLineNo">786</span> return false;<a name="line.786"></a> +<span class="sourceLineNo">787</span> } else if (!contains(value, index - 1, 3, "ACH")) {<a name="line.787"></a> +<span class="sourceLineNo">788</span> return false;<a name="line.788"></a> +<span class="sourceLineNo">789</span> } else {<a name="line.789"></a> +<span class="sourceLineNo">790</span> final char c = charAt(value, index + 2);<a name="line.790"></a> +<span class="sourceLineNo">791</span> return (c != 'I' && c != 'E') ||<a name="line.791"></a> +<span class="sourceLineNo">792</span> contains(value, index - 2, 6, "BACHER", "MACHER");<a name="line.792"></a> +<span class="sourceLineNo">793</span> }<a name="line.793"></a> +<span class="sourceLineNo">794</span> }<a name="line.794"></a> +<span class="sourceLineNo">795</span><a name="line.795"></a> +<span class="sourceLineNo">796</span> /**<a name="line.796"></a> +<span class="sourceLineNo">797</span> * Complex condition 0 for 'CH'.<a name="line.797"></a> +<span class="sourceLineNo">798</span> */<a name="line.798"></a> +<span class="sourceLineNo">799</span> private boolean conditionCH0(final String value, final int index) {<a name="line.799"></a> +<span class="sourceLineNo">800</span> if (index != 0) {<a name="line.800"></a> +<span class="sourceLineNo">801</span> return false;<a name="line.801"></a> +<span class="sourceLineNo">802</span> } else if (!contains(value, index + 1, 5, "HARAC", "HARIS") &&<a name="line.802"></a> +<span class="sourceLineNo">803</span> !contains(value, index + 1, 3, "HOR", "HYM", "HIA", "HEM")) {<a name="line.803"></a> +<span class="sourceLineNo">804</span> return false;<a name="line.804"></a> +<span class="sourceLineNo">805</span> } else if (contains(value, 0, 5, "CHORE")) {<a name="line.805"></a> +<span class="sourceLineNo">806</span> return false;<a name="line.806"></a> +<span class="sourceLineNo">807</span> } else {<a name="line.807"></a> +<span class="sourceLineNo">808</span> return true;<a name="line.808"></a> +<span class="sourceLineNo">809</span> }<a name="line.809"></a> +<span class="sourceLineNo">810</span> }<a name="line.810"></a> +<span class="sourceLineNo">811</span><a name="line.811"></a> +<span class="sourceLineNo">812</span> /**<a name="line.812"></a> +<span class="sourceLineNo">813</span> * Complex condition 1 for 'CH'.<a name="line.813"></a> +<span class="sourceLineNo">814</span> */<a name="line.814"></a> +<span class="sourceLineNo">815</span> private boolean conditionCH1(final String value, final int index) {<a name="line.815"></a> +<span class="sourceLineNo">816</span> return ((contains(value, 0, 4, "VAN ", "VON ") || contains(value, 0, 3, "SCH")) ||<a name="line.816"></a> +<span class="sourceLineNo">817</span> contains(value, index - 2, 6, "ORCHES", "ARCHIT", "ORCHID") ||<a name="line.817"></a> +<span class="sourceLineNo">818</span> contains(value, index + 2, 1, "T", "S") ||<a name="line.818"></a> +<span class="sourceLineNo">819</span> ((contains(value, index - 1, 1, "A", "O", "U", "E") || index == 0) &&<a name="line.819"></a> +<span class="sourceLineNo">820</span> (contains(value, index + 2, 1, L_R_N_M_B_H_F_V_W_SPACE) || index + 1 == value.length() - 1)));<a name="line.820"></a> +<span class="sourceLineNo">821</span> }<a name="line.821"></a> +<span class="sourceLineNo">822</span><a name="line.822"></a> +<span class="sourceLineNo">823</span> /**<a name="line.823"></a> +<span class="sourceLineNo">824</span> * Complex condition 0 for 'L'.<a name="line.824"></a> +<span class="sourceLineNo">825</span> */<a name="line.825"></a> +<span class="sourceLineNo">826</span> private boolean conditionL0(final String value, final int index) {<a name="line.826"></a> +<span class="sourceLineNo">827</span> if (index == value.length() - 3 &&<a name="line.827"></a> +<span class="sourceLineNo">828</span> contains(value, index - 1, 4, "ILLO", "ILLA", "ALLE")) {<a name="line.828"></a> +<span class="sourceLineNo">829</span> return true;<a name="line.829"></a> +<span class="sourceLineNo">830</span> } else if ((contains(value, value.length() - 2, 2, "AS", "OS") ||<a name="line.830"></a> +<span class="sourceLineNo">831</span> contains(value, value.length() - 1, 1, "A", "O")) &&<a name="line.831"></a> +<span class="sourceLineNo">832</span> contains(value, index - 1, 4, "ALLE")) {<a name="line.832"></a> +<span class="sourceLineNo">833</span> return true;<a name="line.833"></a> +<span class="sourceLineNo">834</span> } else {<a name="line.834"></a> +<span class="sourceLineNo">835</span> return false;<a name="line.835"></a> +<span class="sourceLineNo">836</span> }<a name="line.836"></a> +<span class="sourceLineNo">837</span> }<a name="line.837"></a> +<span class="sourceLineNo">838</span><a name="line.838"></a> +<span class="sourceLineNo">839</span> /**<a name="line.839"></a> +<span class="sourceLineNo">840</span> * Complex condition 0 for 'M'.<a name="line.840"></a> +<span class="sourceLineNo">841</span> */<a name="line.841"></a> +<span class="sourceLineNo">842</span> private boolean conditionM0(final String value, final int index) {<a name="line.842"></a> +<span class="sourceLineNo">843</span> if (charAt(value, index + 1) == 'M') {<a name="line.843"></a> +<span class="sourceLineNo">844</span> return true;<a name="line.844"></a> +<span class="sourceLineNo">845</span> }<a name="line.845"></a> +<span class="sourceLineNo">846</span> return contains(value, index - 1, 3, "UMB") &&<a name="line.846"></a> +<span class="sourceLineNo">847</span> ((index + 1) == value.length() - 1 || contains(value, index + 2, 2, "ER"));<a name="line.847"></a> +<span class="sourceLineNo">848</span> }<a name="line.848"></a> +<span class="sourceLineNo">849</span><a name="line.849"></a> +<span class="sourceLineNo">850</span> //-- BEGIN HELPER FUNCTIONS --//<a name="line.850"></a> +<span class="sourceLineNo">851</span><a name="line.851"></a> +<span class="sourceLineNo">852</span> /**<a name="line.852"></a> +<span class="sourceLineNo">853</span> * Determines whether or not a value is of slavo-germanic origin. A value is<a name="line.853"></a> +<span class="sourceLineNo">854</span> * of slavo-germanic origin if it contians any of 'W', 'K', 'CZ', or 'WITZ'.<a name="line.854"></a> +<span class="sourceLineNo">855</span> */<a name="line.855"></a> +<span class="sourceLineNo">856</span> private boolean isSlavoGermanic(final String value) {<a name="line.856"></a> +<span class="sourceLineNo">857</span> return value.indexOf('W') > -1 || value.indexOf('K') > -1 ||<a name="line.857"></a> +<span class="sourceLineNo">858</span> value.indexOf("CZ") > -1 || value.indexOf("WITZ") > -1;<a name="line.858"></a> +<span class="sourceLineNo">859</span> }<a name="line.859"></a> +<span class="sourceLineNo">860</span><a name="line.860"></a> +<span class="sourceLineNo">861</span> /**<a name="line.861"></a> +<span class="sourceLineNo">862</span> * Determines whether or not a character is a vowel or not<a name="line.862"></a> +<span class="sourceLineNo">863</span> */<a name="line.863"></a> +<span class="sourceLineNo">864</span> private boolean isVowel(final char ch) {<a name="line.864"></a> +<span class="sourceLineNo">865</span> return VOWELS.indexOf(ch) != -1;<a name="line.865"></a> +<span class="sourceLineNo">866</span> }<a name="line.866"></a> +<span class="sourceLineNo">867</span><a name="line.867"></a> +<span class="sourceLineNo">868</span> /**<a name="line.868"></a> +<span class="sourceLineNo">869</span> * Determines whether or not the value starts with a silent letter. It will<a name="line.869"></a> +<span class="sourceLineNo">870</span> * return {@code true} if the value starts with any of 'GN', 'KN',<a name="line.870"></a> +<span class="sourceLineNo">871</span> * 'PN', 'WR' or 'PS'.<a name="line.871"></a> +<span class="sourceLineNo">872</span> */<a name="line.872"></a> +<span class="sourceLineNo">873</span> private boolean isSilentStart(final String value) {<a name="line.873"></a> +<span class="sourceLineNo">874</span> boolean result = false;<a name="line.874"></a> +<span class="sourceLineNo">875</span> for (final String element : SILENT_START) {<a name="line.875"></a> +<span class="sourceLineNo">876</span> if (value.startsWith(element)) {<a name="line.876"></a> +<span class="sourceLineNo">877</span> result = true;<a name="line.877"></a> +<span class="sourceLineNo">878</span> break;<a name="line.878"></a> +<span class="sourceLineNo">879</span> }<a name="line.879"></a> +<span class="sourceLineNo">880</span> }<a name="line.880"></a> +<span class="sourceLineNo">881</span> return result;<a name="line.881"></a> +<span class="sourceLineNo">882</span> }<a name="line.882"></a> +<span class="sourceLineNo">883</span><a name="line.883"></a> +<span class="sourceLineNo">884</span> /**<a name="line.884"></a> +<span class="sourceLineNo">885</span> * Cleans the input.<a name="line.885"></a> +<span class="sourceLineNo">886</span> */<a name="line.886"></a> +<span class="sourceLineNo">887</span> private String cleanInput(String input) {<a name="line.887"></a> +<span class="sourceLineNo">888</span> if (input == null) {<a name="line.888"></a> +<span class="sourceLineNo">889</span> return null;<a name="line.889"></a> +<span class="sourceLineNo">890</span> }<a name="line.890"></a> +<span class="sourceLineNo">891</span> input = input.trim();<a name="line.891"></a> +<span class="sourceLineNo">892</span> if (input.length() == 0) {<a name="line.892"></a> +<span class="sourceLineNo">893</span> return null;<a name="line.893"></a> +<span class="sourceLineNo">894</span> }<a name="line.894"></a> +<span class="sourceLineNo">895</span> return input.toUpperCase(java.util.Locale.ENGLISH);<a name="line.895"></a> +<span class="sourceLineNo">896</span> }<a name="line.896"></a> +<span class="sourceLineNo">897</span><a name="line.897"></a> +<span class="sourceLineNo">898</span> /*<a name="line.898"></a> +<span class="sourceLineNo">899</span> * Gets the character at index {@code index} if available, otherwise<a name="line.899"></a> +<span class="sourceLineNo">900</span> * it returns {@code Character.MIN_VALUE} so that there is some sort<a name="line.900"></a> +<span class="sourceLineNo">901</span> * of a default.<a name="line.901"></a> +<span class="sourceLineNo">902</span> */<a name="line.902"></a> +<span class="sourceLineNo">903</span> protected char charAt(final String value, final int index) {<a name="line.903"></a> +<span class="sourceLineNo">904</span> if (index < 0 || index >= value.length()) {<a name="line.904"></a> +<span class="sourceLineNo">905</span> return Character.MIN_VALUE;<a name="line.905"></a> +<span class="sourceLineNo">906</span> }<a name="line.906"></a> +<span class="sourceLineNo">907</span> return value.charAt(index);<a name="line.907"></a> +<span class="sourceLineNo">908</span> }<a name="line.908"></a> +<span class="sourceLineNo">909</span><a name="line.909"></a> +<span class="sourceLineNo">910</span> /*<a name="line.910"></a> +<span class="sourceLineNo">911</span> * Determines whether {@code value} contains any of the criteria starting at index {@code start} and<a name="line.911"></a> +<span class="sourceLineNo">912</span> * matching up to length {@code length}.<a name="line.912"></a> +<span class="sourceLineNo">913</span> */<a name="line.913"></a> +<span class="sourceLineNo">914</span> protected static boolean contains(final String value, final int start, final int length,<a name="line.914"></a> +<span class="sourceLineNo">915</span> final String... criteria) {<a name="line.915"></a> +<span class="sourceLineNo">916</span> boolean result = false;<a name="line.916"></a> +<span class="sourceLineNo">917</span> if (start >= 0 && start + length <= value.length()) {<a name="line.917"></a> +<span class="sourceLineNo">918</span> final String target = value.substring(start, start + length);<a name="line.918"></a> +<span class="sourceLineNo">919</span><a name="line.919"></a> +<span class="sourceLineNo">920</span> for (final String element : criteria) {<a name="line.920"></a> +<span class="sourceLineNo">921</span> if (target.equals(element)) {<a name="line.921"></a> +<span class="sourceLineNo">922</span> result = true;<a name="line.922"></a> +<span class="sourceLineNo">923</span> break;<a name="line.923"></a> +<span class="sourceLineNo">924</span> }<a name="line.924"></a> +<span class="sourceLineNo">925</span> }<a name="line.925"></a> +<span class="sourceLineNo">926</span> }<a name="line.926"></a> +<span class="sourceLineNo">927</span> return result;<a name="line.927"></a> +<span class="sourceLineNo">928</span> }<a name="line.928"></a> +<span class="sourceLineNo">929</span><a name="line.929"></a> +<span class="sourceLineNo">930</span> //-- BEGIN INNER CLASSES --//<a name="line.930"></a> +<span class="sourceLineNo">931</span><a name="line.931"></a> +<span class="sourceLineNo">932</span> /**<a name="line.932"></a> +<span class="sourceLineNo">933</span> * Inner class for storing results, since there is the optional alternate encoding.<a name="line.933"></a> +<span class="sourceLineNo">934</span> */<a name="line.934"></a> +<span class="sourceLineNo">935</span> public class DoubleMetaphoneResult {<a name="line.935"></a> +<span class="sourceLineNo">936</span><a name="line.936"></a> +<span class="sourceLineNo">937</span> private final StringBuilder primary = new StringBuilder(getMaxCodeLen());<a name="line.937"></a> +<span class="sourceLineNo">938</span> private final StringBuilder alternate = new StringBuilder(getMaxCodeLen());<a name="line.938"></a> +<span class="sourceLineNo">939</span> private final int maxLength;<a name="line.939"></a> +<span class="sourceLineNo">940</span><a name="line.940"></a> +<span class="sourceLineNo">941</span> public DoubleMetaphoneResult(final int maxLength) {<a name="line.941"></a> +<span class="sourceLineNo">942</span> this.maxLength = maxLength;<a name="line.942"></a> +<span class="sourceLineNo">943</span> }<a name="line.943"></a> +<span class="sourceLineNo">944</span><a name="line.944"></a> +<span class="sourceLineNo">945</span> public void append(final char value) {<a name="line.945"></a> +<span class="sourceLineNo">946</span> appendPrimary(value);<a name="line.946"></a> +<span class="sourceLineNo">947</span> appendAlternate(value);<a name="line.947"></a> +<span class="sourceLineNo">948</span> }<a name="line.948"></a> +<span class="sourceLineNo">949</span><a name="line.949"></a> +<span class="sourceLineNo">950</span> public void append(final char primary, final char alternate) {<a name="line.950"></a> +<span class="sourceLineNo">951</span> appendPrimary(primary);<a name="line.951"></a> +<span class="sourceLineNo">952</span> appendAlternate(alternate);<a name="line.952"></a> +<span class="sourceLineNo">953</span> }<a name="line.953"></a> +<span class="sourceLineNo">954</span><a name="line.954"></a> +<span class="sourceLineNo">955</span> public void appendPrimary(final char value) {<a name="line.955"></a> +<span class="sourceLineNo">956</span> if (this.primary.length() < this.maxLength) {<a name="line.956"></a> +<span class="sourceLineNo">957</span> this.primary.append(value);<a name="line.957"></a> +<span class="sourceLineNo">958</span> }<a name="line.958"></a> +<span class="sourceLineNo">959</span> }<a name="line.959"></a> +<span class="sourceLineNo">960</span><a name="line.960"></a> +<span class="sourceLineNo">961</span> public void appendAlternate(final char value) {<a name="line.961"></a> +<span class="sourceLineNo">962</span> if (this.alternate.length() < this.maxLength) {<a name="line.962"></a> +<span class="sourceLineNo">963</span> this.alternate.append(value);<a name="line.963"></a> +<span class="sourceLineNo">964</span> }<a name="line.964"></a> +<span class="sourceLineNo">965</span> }<a name="line.965"></a> +<span class="sourceLineNo">966</span><a name="line.966"></a> +<span class="sourceLineNo">967</span> public void append(final String value) {<a name="line.967"></a> +<span class="sourceLineNo">968</span> appendPrimary(value);<a name="line.968"></a> +<span class="sourceLineNo">969</span> appendAlternate(value);<a name="line.969"></a> +<span class="sourceLineNo">970</span> }<a name="line.970"></a> +<span class="sourceLineNo">971</span><a name="line.971"></a> +<span class="sourceLineNo">972</span> public void append(final String primary, final String alternate) {<a name="line.972"></a> +<span class="sourceLineNo">973</span> appendPrimary(primary);<a name="line.973"></a> +<span class="sourceLineNo">974</span> appendAlternate(alternate);<a name="line.974"></a> +<span class="sourceLineNo">975</span> }<a name="line.975"></a> +<span class="sourceLineNo">976</span><a name="line.976"></a> +<span class="sourceLineNo">977</span> public void appendPrimary(final String value) {<a name="line.977"></a> +<span class="sourceLineNo">978</span> final int addChars = this.maxLength - this.primary.length();<a name="line.978"></a> +<span class="sourceLineNo">979</span> if (value.length() <= addChars) {<a name="line.979"></a> +<span class="sourceLineNo">980</span> this.primary.append(value);<a name="line.980"></a> +<span class="sourceLineNo">981</span> } else {<a name="line.981"></a> +<span class="sourceLineNo">982</span> this.primary.append(value.substring(0, addChars));<a name="line.982"></a> +<span class="sourceLineNo">983</span> }<a name="line.983"></a> +<span class="sourceLineNo">984</span> }<a name="line.984"></a> +<span class="sourceLineNo">985</span><a name="line.985"></a> +<span class="sourceLineNo">986</span> public void appendAlternate(final String value) {<a name="line.986"></a> +<span class="sourceLineNo">987</span> final int addChars = this.maxLength - this.alternate.length();<a name="line.987"></a> +<span class="sourceLineNo">988</span> if (value.length() <= addChars) {<a name="line.988"></a> +<span class="sourceLineNo">989</span> this.alternate.append(value);<a name="line.989"></a> +<span class="sourceLineNo">990</span> } else {<a name="line.990"></a> +<span class="sourceLineNo">991</span> this.alternate.append(value.substring(0, addChars));<a name="line.991"></a> +<span class="sourceLineNo">992</span> }<a name="line.992"></a> +<span class="sourceLineNo">993</span> }<a name="line.993"></a> +<span class="sourceLineNo">994</span><a name="line.994"></a> +<span class="sourceLineNo">995</span> public String getPrimary() {<a name="line.995"></a> +<span class="sourceLineNo">996</span> return this.primary.toString();<a name="line.996"></a> +<span class="sourceLineNo">997</span> }<a name="line.997"></a> +<span class="sourceLineNo">998</span><a name="line.998"></a> +<span class="sourceLineNo">999</span> public String getAlternate() {<a name="line.999"></a> +<span class="sourceLineNo">1000</span> return this.alternate.toString();<a name="line.1000"></a> +<span class="sourceLineNo">1001</span> }<a name="line.1001"></a> +<span class="sourceLineNo">1002</span><a name="line.1002"></a> +<span class="sourceLineNo">1003</span> public boolean isComplete() {<a name="line.1003"></a> +<span class="sourceLineNo">1004</span> return this.primary.length() >= this.maxLength &&<a name="line.1004"></a> +<span class="sourceLineNo">1005</span> this.alternate.length() >= this.maxLength;<a name="line.1005"></a> +<span class="sourceLineNo">1006</span> }<a name="line.1006"></a> +<span class="sourceLineNo">1007</span> }<a name="line.1007"></a> +<span class="sourceLineNo">1008</span>}<a name="line.1008"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/MatchRatingApproachEncoder.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/MatchRatingApproachEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..b86d24de469377c8ba45a3bece35c98193b0a93e --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/MatchRatingApproachEncoder.html @@ -0,0 +1,495 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>package org.apache.commons.codec.language;<a name="line.17"></a> +<span class="sourceLineNo">018</span><a name="line.18"></a> +<span class="sourceLineNo">019</span>import java.util.Locale;<a name="line.19"></a> +<span class="sourceLineNo">020</span><a name="line.20"></a> +<span class="sourceLineNo">021</span>import org.apache.commons.codec.EncoderException;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import org.apache.commons.codec.StringEncoder;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>/**<a name="line.24"></a> +<span class="sourceLineNo">025</span> * Match Rating Approach Phonetic Algorithm Developed by <CITE>Western Airlines</CITE> in 1977.<a name="line.25"></a> +<span class="sourceLineNo">026</span> *<a name="line.26"></a> +<span class="sourceLineNo">027</span> * This class is immutable and thread-safe.<a name="line.27"></a> +<span class="sourceLineNo">028</span> *<a name="line.28"></a> +<span class="sourceLineNo">029</span> * @see <a href="http://en.wikipedia.org/wiki/Match_rating_approach">Wikipedia - Match Rating Approach</a><a name="line.29"></a> +<span class="sourceLineNo">030</span> * @since 1.8<a name="line.30"></a> +<span class="sourceLineNo">031</span> */<a name="line.31"></a> +<span class="sourceLineNo">032</span>public class MatchRatingApproachEncoder implements StringEncoder {<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span> private static final String SPACE = " ";<a name="line.34"></a> +<span class="sourceLineNo">035</span><a name="line.35"></a> +<span class="sourceLineNo">036</span> private static final String EMPTY = "";<a name="line.36"></a> +<span class="sourceLineNo">037</span><a name="line.37"></a> +<span class="sourceLineNo">038</span> /**<a name="line.38"></a> +<span class="sourceLineNo">039</span> * Constants used mainly for the min rating value.<a name="line.39"></a> +<span class="sourceLineNo">040</span> */<a name="line.40"></a> +<span class="sourceLineNo">041</span> private static final int ONE = 1, TWO = 2, THREE = 3, FOUR = 4, FIVE = 5, SIX = 6, SEVEN = 7,<a name="line.41"></a> +<span class="sourceLineNo">042</span> ELEVEN = 11, TWELVE = 12;<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> +<span class="sourceLineNo">044</span> /**<a name="line.44"></a> +<span class="sourceLineNo">045</span> * The plain letter equivalent of the accented letters.<a name="line.45"></a> +<span class="sourceLineNo">046</span> */<a name="line.46"></a> +<span class="sourceLineNo">047</span> private static final String PLAIN_ASCII = "AaEeIiOoUu" + // grave<a name="line.47"></a> +<span class="sourceLineNo">048</span> "AaEeIiOoUuYy" + // acute<a name="line.48"></a> +<span class="sourceLineNo">049</span> "AaEeIiOoUuYy" + // circumflex<a name="line.49"></a> +<span class="sourceLineNo">050</span> "AaOoNn" + // tilde<a name="line.50"></a> +<span class="sourceLineNo">051</span> "AaEeIiOoUuYy" + // umlaut<a name="line.51"></a> +<span class="sourceLineNo">052</span> "Aa" + // ring<a name="line.52"></a> +<span class="sourceLineNo">053</span> "Cc" + // cedilla<a name="line.53"></a> +<span class="sourceLineNo">054</span> "OoUu"; // double acute<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> /**<a name="line.56"></a> +<span class="sourceLineNo">057</span> * Unicode characters corresponding to various accented letters. For example: \u00DA is U acute etc...<a name="line.57"></a> +<span class="sourceLineNo">058</span> */<a name="line.58"></a> +<span class="sourceLineNo">059</span> private static final String UNICODE = "\u00C0\u00E0\u00C8\u00E8\u00CC\u00EC\u00D2\u00F2\u00D9\u00F9" +<a name="line.59"></a> +<span class="sourceLineNo">060</span> "\u00C1\u00E1\u00C9\u00E9\u00CD\u00ED\u00D3\u00F3\u00DA\u00FA\u00DD\u00FD" +<a name="line.60"></a> +<span class="sourceLineNo">061</span> "\u00C2\u00E2\u00CA\u00EA\u00CE\u00EE\u00D4\u00F4\u00DB\u00FB\u0176\u0177" +<a name="line.61"></a> +<span class="sourceLineNo">062</span> "\u00C3\u00E3\u00D5\u00F5\u00D1\u00F1" +<a name="line.62"></a> +<span class="sourceLineNo">063</span> "\u00C4\u00E4\u00CB\u00EB\u00CF\u00EF\u00D6\u00F6\u00DC\u00FC\u0178\u00FF" +<a name="line.63"></a> +<span class="sourceLineNo">064</span> "\u00C5\u00E5" + "\u00C7\u00E7" + "\u0150\u0151\u0170\u0171";<a name="line.64"></a> +<span class="sourceLineNo">065</span><a name="line.65"></a> +<span class="sourceLineNo">066</span> private static final String[] DOUBLE_CONSONANT =<a name="line.66"></a> +<span class="sourceLineNo">067</span> new String[] { "BB", "CC", "DD", "FF", "GG", "HH", "JJ", "KK", "LL", "MM", "NN", "PP", "QQ", "RR", "SS",<a name="line.67"></a> +<span class="sourceLineNo">068</span> "TT", "VV", "WW", "XX", "YY", "ZZ" };<a name="line.68"></a> +<span class="sourceLineNo">069</span><a name="line.69"></a> +<span class="sourceLineNo">070</span> /**<a name="line.70"></a> +<span class="sourceLineNo">071</span> * Cleans up a name: 1. Upper-cases everything 2. Removes some common punctuation 3. Removes accents 4. Removes any<a name="line.71"></a> +<span class="sourceLineNo">072</span> * spaces.<a name="line.72"></a> +<span class="sourceLineNo">073</span> *<a name="line.73"></a> +<span class="sourceLineNo">074</span> * <h2>API Usage</h2><a name="line.74"></a> +<span class="sourceLineNo">075</span> * <p><a name="line.75"></a> +<span class="sourceLineNo">076</span> * Consider this method private, it is package protected for unit testing only.<a name="line.76"></a> +<span class="sourceLineNo">077</span> * </p><a name="line.77"></a> +<span class="sourceLineNo">078</span> *<a name="line.78"></a> +<span class="sourceLineNo">079</span> * @param name<a name="line.79"></a> +<span class="sourceLineNo">080</span> * The name to be cleaned<a name="line.80"></a> +<span class="sourceLineNo">081</span> * @return The cleaned name<a name="line.81"></a> +<span class="sourceLineNo">082</span> */<a name="line.82"></a> +<span class="sourceLineNo">083</span> String cleanName(final String name) {<a name="line.83"></a> +<span class="sourceLineNo">084</span> String upperName = name.toUpperCase(Locale.ENGLISH);<a name="line.84"></a> +<span class="sourceLineNo">085</span><a name="line.85"></a> +<span class="sourceLineNo">086</span> final String[] charsToTrim = { "\\-", "[&]", "\\'", "\\.", "[\\,]" };<a name="line.86"></a> +<span class="sourceLineNo">087</span> for (final String str : charsToTrim) {<a name="line.87"></a> +<span class="sourceLineNo">088</span> upperName = upperName.replaceAll(str, EMPTY);<a name="line.88"></a> +<span class="sourceLineNo">089</span> }<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> upperName = removeAccents(upperName);<a name="line.91"></a> +<span class="sourceLineNo">092</span> upperName = upperName.replaceAll("\\s+", EMPTY);<a name="line.92"></a> +<span class="sourceLineNo">093</span><a name="line.93"></a> +<span class="sourceLineNo">094</span> return upperName;<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span><a name="line.96"></a> +<span class="sourceLineNo">097</span> /**<a name="line.97"></a> +<span class="sourceLineNo">098</span> * Encodes an Object using the Match Rating Approach algorithm. Method is here to satisfy the requirements of the<a name="line.98"></a> +<span class="sourceLineNo">099</span> * Encoder interface Throws an EncoderException if input object is not of type java.lang.String.<a name="line.99"></a> +<span class="sourceLineNo">100</span> *<a name="line.100"></a> +<span class="sourceLineNo">101</span> * @param pObject<a name="line.101"></a> +<span class="sourceLineNo">102</span> * Object to encode<a name="line.102"></a> +<span class="sourceLineNo">103</span> * @return An object (or type java.lang.String) containing the Match Rating Approach code which corresponds to the<a name="line.103"></a> +<span class="sourceLineNo">104</span> * String supplied.<a name="line.104"></a> +<span class="sourceLineNo">105</span> * @throws EncoderException<a name="line.105"></a> +<span class="sourceLineNo">106</span> * if the parameter supplied is not of type java.lang.String<a name="line.106"></a> +<span class="sourceLineNo">107</span> */<a name="line.107"></a> +<span class="sourceLineNo">108</span> @Override<a name="line.108"></a> +<span class="sourceLineNo">109</span> public final Object encode(final Object pObject) throws EncoderException {<a name="line.109"></a> +<span class="sourceLineNo">110</span> if (!(pObject instanceof String)) {<a name="line.110"></a> +<span class="sourceLineNo">111</span> throw new EncoderException(<a name="line.111"></a> +<span class="sourceLineNo">112</span> "Parameter supplied to Match Rating Approach encoder is not of type java.lang.String");<a name="line.112"></a> +<span class="sourceLineNo">113</span> }<a name="line.113"></a> +<span class="sourceLineNo">114</span> return encode((String) pObject);<a name="line.114"></a> +<span class="sourceLineNo">115</span> }<a name="line.115"></a> +<span class="sourceLineNo">116</span><a name="line.116"></a> +<span class="sourceLineNo">117</span> /**<a name="line.117"></a> +<span class="sourceLineNo">118</span> * Encodes a String using the Match Rating Approach (MRA) algorithm.<a name="line.118"></a> +<span class="sourceLineNo">119</span> *<a name="line.119"></a> +<span class="sourceLineNo">120</span> * @param name<a name="line.120"></a> +<span class="sourceLineNo">121</span> * String object to encode<a name="line.121"></a> +<span class="sourceLineNo">122</span> * @return The MRA code corresponding to the String supplied<a name="line.122"></a> +<span class="sourceLineNo">123</span> */<a name="line.123"></a> +<span class="sourceLineNo">124</span> @Override<a name="line.124"></a> +<span class="sourceLineNo">125</span> public final String encode(String name) {<a name="line.125"></a> +<span class="sourceLineNo">126</span> // Bulletproof for trivial input - NINO<a name="line.126"></a> +<span class="sourceLineNo">127</span> if (name == null || EMPTY.equalsIgnoreCase(name) || SPACE.equalsIgnoreCase(name) || name.length() == 1) {<a name="line.127"></a> +<span class="sourceLineNo">128</span> return EMPTY;<a name="line.128"></a> +<span class="sourceLineNo">129</span> }<a name="line.129"></a> +<span class="sourceLineNo">130</span><a name="line.130"></a> +<span class="sourceLineNo">131</span> // Preprocessing<a name="line.131"></a> +<span class="sourceLineNo">132</span> name = cleanName(name);<a name="line.132"></a> +<span class="sourceLineNo">133</span><a name="line.133"></a> +<span class="sourceLineNo">134</span> // BEGIN: Actual encoding part of the algorithm...<a name="line.134"></a> +<span class="sourceLineNo">135</span> // 1. Delete all vowels unless the vowel begins the word<a name="line.135"></a> +<span class="sourceLineNo">136</span> name = removeVowels(name);<a name="line.136"></a> +<span class="sourceLineNo">137</span><a name="line.137"></a> +<span class="sourceLineNo">138</span> // 2. Remove second consonant from any double consonant<a name="line.138"></a> +<span class="sourceLineNo">139</span> name = removeDoubleConsonants(name);<a name="line.139"></a> +<span class="sourceLineNo">140</span><a name="line.140"></a> +<span class="sourceLineNo">141</span> // 3. Reduce codex to 6 letters by joining the first 3 and last 3 letters<a name="line.141"></a> +<span class="sourceLineNo">142</span> name = getFirst3Last3(name);<a name="line.142"></a> +<span class="sourceLineNo">143</span><a name="line.143"></a> +<span class="sourceLineNo">144</span> return name;<a name="line.144"></a> +<span class="sourceLineNo">145</span> }<a name="line.145"></a> +<span class="sourceLineNo">146</span><a name="line.146"></a> +<span class="sourceLineNo">147</span> /**<a name="line.147"></a> +<span class="sourceLineNo">148</span> * Gets the first and last 3 letters of a name (if &gt; 6 characters) Else just returns the name.<a name="line.148"></a> +<span class="sourceLineNo">149</span> *<a name="line.149"></a> +<span class="sourceLineNo">150</span> * <h2>API Usage</h2><a name="line.150"></a> +<span class="sourceLineNo">151</span> * <p><a name="line.151"></a> +<span class="sourceLineNo">152</span> * Consider this method private, it is package protected for unit testing only.<a name="line.152"></a> +<span class="sourceLineNo">153</span> * </p><a name="line.153"></a> +<span class="sourceLineNo">154</span> *<a name="line.154"></a> +<span class="sourceLineNo">155</span> * @param name<a name="line.155"></a> +<span class="sourceLineNo">156</span> * The string to get the substrings from<a name="line.156"></a> +<span class="sourceLineNo">157</span> * @return Annexed first and last 3 letters of input word.<a name="line.157"></a> +<span class="sourceLineNo">158</span> */<a name="line.158"></a> +<span class="sourceLineNo">159</span> String getFirst3Last3(final String name) {<a name="line.159"></a> +<span class="sourceLineNo">160</span> final int nameLength = name.length();<a name="line.160"></a> +<span class="sourceLineNo">161</span><a name="line.161"></a> +<span class="sourceLineNo">162</span> if (nameLength > SIX) {<a name="line.162"></a> +<span class="sourceLineNo">163</span> final String firstThree = name.substring(0, THREE);<a name="line.163"></a> +<span class="sourceLineNo">164</span> final String lastThree = name.substring(nameLength - THREE, nameLength);<a name="line.164"></a> +<span class="sourceLineNo">165</span> return firstThree + lastThree;<a name="line.165"></a> +<span class="sourceLineNo">166</span> }<a name="line.166"></a> +<span class="sourceLineNo">167</span> return name;<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span><a name="line.169"></a> +<span class="sourceLineNo">170</span> /**<a name="line.170"></a> +<span class="sourceLineNo">171</span> * Obtains the min rating of the length sum of the 2 names. In essence the larger the sum length the smaller the<a name="line.171"></a> +<span class="sourceLineNo">172</span> * min rating. Values strictly from documentation.<a name="line.172"></a> +<span class="sourceLineNo">173</span> *<a name="line.173"></a> +<span class="sourceLineNo">174</span> * <h2>API Usage</h2><a name="line.174"></a> +<span class="sourceLineNo">175</span> * <p><a name="line.175"></a> +<span class="sourceLineNo">176</span> * Consider this method private, it is package protected for unit testing only.<a name="line.176"></a> +<span class="sourceLineNo">177</span> * </p><a name="line.177"></a> +<span class="sourceLineNo">178</span> *<a name="line.178"></a> +<span class="sourceLineNo">179</span> * @param sumLength<a name="line.179"></a> +<span class="sourceLineNo">180</span> * The length of 2 strings sent down<a name="line.180"></a> +<span class="sourceLineNo">181</span> * @return The min rating value<a name="line.181"></a> +<span class="sourceLineNo">182</span> */<a name="line.182"></a> +<span class="sourceLineNo">183</span> int getMinRating(final int sumLength) {<a name="line.183"></a> +<span class="sourceLineNo">184</span> int minRating = 0;<a name="line.184"></a> +<span class="sourceLineNo">185</span><a name="line.185"></a> +<span class="sourceLineNo">186</span> if (sumLength <= FOUR) {<a name="line.186"></a> +<span class="sourceLineNo">187</span> minRating = FIVE;<a name="line.187"></a> +<span class="sourceLineNo">188</span> } else if (sumLength <= SEVEN) { // aready know it is at least 5<a name="line.188"></a> +<span class="sourceLineNo">189</span> minRating = FOUR;<a name="line.189"></a> +<span class="sourceLineNo">190</span> } else if (sumLength <= ELEVEN) { // aready know it is at least 8<a name="line.190"></a> +<span class="sourceLineNo">191</span> minRating = THREE;<a name="line.191"></a> +<span class="sourceLineNo">192</span> } else if (sumLength == TWELVE) {<a name="line.192"></a> +<span class="sourceLineNo">193</span> minRating = TWO;<a name="line.193"></a> +<span class="sourceLineNo">194</span> } else {<a name="line.194"></a> +<span class="sourceLineNo">195</span> minRating = ONE; // docs said little here.<a name="line.195"></a> +<span class="sourceLineNo">196</span> }<a name="line.196"></a> +<span class="sourceLineNo">197</span><a name="line.197"></a> +<span class="sourceLineNo">198</span> return minRating;<a name="line.198"></a> +<span class="sourceLineNo">199</span> }<a name="line.199"></a> +<span class="sourceLineNo">200</span><a name="line.200"></a> +<span class="sourceLineNo">201</span> /**<a name="line.201"></a> +<span class="sourceLineNo">202</span> * Determines if two names are homophonous via Match Rating Approach (MRA) algorithm. It should be noted that the<a name="line.202"></a> +<span class="sourceLineNo">203</span> * strings are cleaned in the same way as {@link #encode(String)}.<a name="line.203"></a> +<span class="sourceLineNo">204</span> *<a name="line.204"></a> +<span class="sourceLineNo">205</span> * @param name1<a name="line.205"></a> +<span class="sourceLineNo">206</span> * First of the 2 strings (names) to compare<a name="line.206"></a> +<span class="sourceLineNo">207</span> * @param name2<a name="line.207"></a> +<span class="sourceLineNo">208</span> * Second of the 2 names to compare<a name="line.208"></a> +<span class="sourceLineNo">209</span> * @return {@code true} if the encodings are identical {@code false} otherwise.<a name="line.209"></a> +<span class="sourceLineNo">210</span> */<a name="line.210"></a> +<span class="sourceLineNo">211</span> public boolean isEncodeEquals(String name1, String name2) {<a name="line.211"></a> +<span class="sourceLineNo">212</span> // Bulletproof for trivial input - NINO<a name="line.212"></a> +<span class="sourceLineNo">213</span> if (name1 == null || EMPTY.equalsIgnoreCase(name1) || SPACE.equalsIgnoreCase(name1)) {<a name="line.213"></a> +<span class="sourceLineNo">214</span> return false;<a name="line.214"></a> +<span class="sourceLineNo">215</span> } else if (name2 == null || EMPTY.equalsIgnoreCase(name2) || SPACE.equalsIgnoreCase(name2)) {<a name="line.215"></a> +<span class="sourceLineNo">216</span> return false;<a name="line.216"></a> +<span class="sourceLineNo">217</span> } else if (name1.length() == 1 || name2.length() == 1) {<a name="line.217"></a> +<span class="sourceLineNo">218</span> return false;<a name="line.218"></a> +<span class="sourceLineNo">219</span> } else if (name1.equalsIgnoreCase(name2)) {<a name="line.219"></a> +<span class="sourceLineNo">220</span> return true;<a name="line.220"></a> +<span class="sourceLineNo">221</span> }<a name="line.221"></a> +<span class="sourceLineNo">222</span><a name="line.222"></a> +<span class="sourceLineNo">223</span> // Preprocessing<a name="line.223"></a> +<span class="sourceLineNo">224</span> name1 = cleanName(name1);<a name="line.224"></a> +<span class="sourceLineNo">225</span> name2 = cleanName(name2);<a name="line.225"></a> +<span class="sourceLineNo">226</span><a name="line.226"></a> +<span class="sourceLineNo">227</span> // Actual MRA Algorithm<a name="line.227"></a> +<span class="sourceLineNo">228</span><a name="line.228"></a> +<span class="sourceLineNo">229</span> // 1. Remove vowels<a name="line.229"></a> +<span class="sourceLineNo">230</span> name1 = removeVowels(name1);<a name="line.230"></a> +<span class="sourceLineNo">231</span> name2 = removeVowels(name2);<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> // 2. Remove double consonants<a name="line.233"></a> +<span class="sourceLineNo">234</span> name1 = removeDoubleConsonants(name1);<a name="line.234"></a> +<span class="sourceLineNo">235</span> name2 = removeDoubleConsonants(name2);<a name="line.235"></a> +<span class="sourceLineNo">236</span><a name="line.236"></a> +<span class="sourceLineNo">237</span> // 3. Reduce down to 3 letters<a name="line.237"></a> +<span class="sourceLineNo">238</span> name1 = getFirst3Last3(name1);<a name="line.238"></a> +<span class="sourceLineNo">239</span> name2 = getFirst3Last3(name2);<a name="line.239"></a> +<span class="sourceLineNo">240</span><a name="line.240"></a> +<span class="sourceLineNo">241</span> // 4. Check for length difference - if 3 or greater then no similarity<a name="line.241"></a> +<span class="sourceLineNo">242</span> // comparison is done<a name="line.242"></a> +<span class="sourceLineNo">243</span> if (Math.abs(name1.length() - name2.length()) >= THREE) {<a name="line.243"></a> +<span class="sourceLineNo">244</span> return false;<a name="line.244"></a> +<span class="sourceLineNo">245</span> }<a name="line.245"></a> +<span class="sourceLineNo">246</span><a name="line.246"></a> +<span class="sourceLineNo">247</span> // 5. Obtain the minimum rating value by calculating the length sum of the<a name="line.247"></a> +<span class="sourceLineNo">248</span> // encoded Strings and sending it down.<a name="line.248"></a> +<span class="sourceLineNo">249</span> final int sumLength = Math.abs(name1.length() + name2.length());<a name="line.249"></a> +<span class="sourceLineNo">250</span> int minRating = 0;<a name="line.250"></a> +<span class="sourceLineNo">251</span> minRating = getMinRating(sumLength);<a name="line.251"></a> +<span class="sourceLineNo">252</span><a name="line.252"></a> +<span class="sourceLineNo">253</span> // 6. Process the encoded Strings from left to right and remove any<a name="line.253"></a> +<span class="sourceLineNo">254</span> // identical characters found from both Strings respectively.<a name="line.254"></a> +<span class="sourceLineNo">255</span> final int count = leftToRightThenRightToLeftProcessing(name1, name2);<a name="line.255"></a> +<span class="sourceLineNo">256</span><a name="line.256"></a> +<span class="sourceLineNo">257</span> // 7. Each PNI item that has a similarity rating equal to or greater than<a name="line.257"></a> +<span class="sourceLineNo">258</span> // the min is considered to be a good candidate match<a name="line.258"></a> +<span class="sourceLineNo">259</span> return count >= minRating;<a name="line.259"></a> +<span class="sourceLineNo">260</span><a name="line.260"></a> +<span class="sourceLineNo">261</span> }<a name="line.261"></a> +<span class="sourceLineNo">262</span><a name="line.262"></a> +<span class="sourceLineNo">263</span> /**<a name="line.263"></a> +<span class="sourceLineNo">264</span> * Determines if a letter is a vowel.<a name="line.264"></a> +<span class="sourceLineNo">265</span> *<a name="line.265"></a> +<span class="sourceLineNo">266</span> * <h2>API Usage</h2><a name="line.266"></a> +<span class="sourceLineNo">267</span> * <p><a name="line.267"></a> +<span class="sourceLineNo">268</span> * Consider this method private, it is package protected for unit testing only.<a name="line.268"></a> +<span class="sourceLineNo">269</span> * </p><a name="line.269"></a> +<span class="sourceLineNo">270</span> *<a name="line.270"></a> +<span class="sourceLineNo">271</span> * @param letter<a name="line.271"></a> +<span class="sourceLineNo">272</span> * The letter under investiagtion<a name="line.272"></a> +<span class="sourceLineNo">273</span> * @return True if a vowel, else false<a name="line.273"></a> +<span class="sourceLineNo">274</span> */<a name="line.274"></a> +<span class="sourceLineNo">275</span> boolean isVowel(final String letter) {<a name="line.275"></a> +<span class="sourceLineNo">276</span> return letter.equalsIgnoreCase("E") || letter.equalsIgnoreCase("A") || letter.equalsIgnoreCase("O") ||<a name="line.276"></a> +<span class="sourceLineNo">277</span> letter.equalsIgnoreCase("I") || letter.equalsIgnoreCase("U");<a name="line.277"></a> +<span class="sourceLineNo">278</span> }<a name="line.278"></a> +<span class="sourceLineNo">279</span><a name="line.279"></a> +<span class="sourceLineNo">280</span> /**<a name="line.280"></a> +<span class="sourceLineNo">281</span> * Processes the names from left to right (first) then right to left removing identical letters in same positions.<a name="line.281"></a> +<span class="sourceLineNo">282</span> * Then subtracts the longer string that remains from 6 and returns this.<a name="line.282"></a> +<span class="sourceLineNo">283</span> *<a name="line.283"></a> +<span class="sourceLineNo">284</span> * <h2>API Usage</h2><a name="line.284"></a> +<span class="sourceLineNo">285</span> * <p><a name="line.285"></a> +<span class="sourceLineNo">286</span> * Consider this method private, it is package protected for unit testing only.<a name="line.286"></a> +<span class="sourceLineNo">287</span> * </p><a name="line.287"></a> +<span class="sourceLineNo">288</span> *<a name="line.288"></a> +<span class="sourceLineNo">289</span> * @param name1<a name="line.289"></a> +<span class="sourceLineNo">290</span> * name2<a name="line.290"></a> +<span class="sourceLineNo">291</span> * @return the length as above<a name="line.291"></a> +<span class="sourceLineNo">292</span> */<a name="line.292"></a> +<span class="sourceLineNo">293</span> int leftToRightThenRightToLeftProcessing(final String name1, final String name2) {<a name="line.293"></a> +<span class="sourceLineNo">294</span> final char[] name1Char = name1.toCharArray();<a name="line.294"></a> +<span class="sourceLineNo">295</span> final char[] name2Char = name2.toCharArray();<a name="line.295"></a> +<span class="sourceLineNo">296</span><a name="line.296"></a> +<span class="sourceLineNo">297</span> final int name1Size = name1.length() - 1;<a name="line.297"></a> +<span class="sourceLineNo">298</span> final int name2Size = name2.length() - 1;<a name="line.298"></a> +<span class="sourceLineNo">299</span><a name="line.299"></a> +<span class="sourceLineNo">300</span> String name1LtRStart = EMPTY;<a name="line.300"></a> +<span class="sourceLineNo">301</span> String name1LtREnd = EMPTY;<a name="line.301"></a> +<span class="sourceLineNo">302</span><a name="line.302"></a> +<span class="sourceLineNo">303</span> String name2RtLStart = EMPTY;<a name="line.303"></a> +<span class="sourceLineNo">304</span> String name2RtLEnd = EMPTY;<a name="line.304"></a> +<span class="sourceLineNo">305</span><a name="line.305"></a> +<span class="sourceLineNo">306</span> for (int i = 0; i < name1Char.length; i++) {<a name="line.306"></a> +<span class="sourceLineNo">307</span> if (i > name2Size) {<a name="line.307"></a> +<span class="sourceLineNo">308</span> break;<a name="line.308"></a> +<span class="sourceLineNo">309</span> }<a name="line.309"></a> +<span class="sourceLineNo">310</span><a name="line.310"></a> +<span class="sourceLineNo">311</span> name1LtRStart = name1.substring(i, i + 1);<a name="line.311"></a> +<span class="sourceLineNo">312</span> name1LtREnd = name1.substring(name1Size - i, name1Size - i + 1);<a name="line.312"></a> +<span class="sourceLineNo">313</span><a name="line.313"></a> +<span class="sourceLineNo">314</span> name2RtLStart = name2.substring(i, i + 1);<a name="line.314"></a> +<span class="sourceLineNo">315</span> name2RtLEnd = name2.substring(name2Size - i, name2Size - i + 1);<a name="line.315"></a> +<span class="sourceLineNo">316</span><a name="line.316"></a> +<span class="sourceLineNo">317</span> // Left to right...<a name="line.317"></a> +<span class="sourceLineNo">318</span> if (name1LtRStart.equals(name2RtLStart)) {<a name="line.318"></a> +<span class="sourceLineNo">319</span> name1Char[i] = ' ';<a name="line.319"></a> +<span class="sourceLineNo">320</span> name2Char[i] = ' ';<a name="line.320"></a> +<span class="sourceLineNo">321</span> }<a name="line.321"></a> +<span class="sourceLineNo">322</span><a name="line.322"></a> +<span class="sourceLineNo">323</span> // Right to left...<a name="line.323"></a> +<span class="sourceLineNo">324</span> if (name1LtREnd.equals(name2RtLEnd)) {<a name="line.324"></a> +<span class="sourceLineNo">325</span> name1Char[name1Size - i] = ' ';<a name="line.325"></a> +<span class="sourceLineNo">326</span> name2Char[name2Size - i] = ' ';<a name="line.326"></a> +<span class="sourceLineNo">327</span> }<a name="line.327"></a> +<span class="sourceLineNo">328</span> }<a name="line.328"></a> +<span class="sourceLineNo">329</span><a name="line.329"></a> +<span class="sourceLineNo">330</span> // Char arrays -> string & remove extraneous space<a name="line.330"></a> +<span class="sourceLineNo">331</span> final String strA = new String(name1Char).replaceAll("\\s+", EMPTY);<a name="line.331"></a> +<span class="sourceLineNo">332</span> final String strB = new String(name2Char).replaceAll("\\s+", EMPTY);<a name="line.332"></a> +<span class="sourceLineNo">333</span><a name="line.333"></a> +<span class="sourceLineNo">334</span> // Final bit - subtract longest string from 6 and return this int value<a name="line.334"></a> +<span class="sourceLineNo">335</span> if (strA.length() > strB.length()) {<a name="line.335"></a> +<span class="sourceLineNo">336</span> return Math.abs(SIX - strA.length());<a name="line.336"></a> +<span class="sourceLineNo">337</span> }<a name="line.337"></a> +<span class="sourceLineNo">338</span> return Math.abs(SIX - strB.length());<a name="line.338"></a> +<span class="sourceLineNo">339</span> }<a name="line.339"></a> +<span class="sourceLineNo">340</span><a name="line.340"></a> +<span class="sourceLineNo">341</span> /**<a name="line.341"></a> +<span class="sourceLineNo">342</span> * Removes accented letters and replaces with non-accented ascii equivalent Case is preserved.<a name="line.342"></a> +<span class="sourceLineNo">343</span> * http://www.codecodex.com/wiki/Remove_accent_from_letters_%28ex_.%C3%A9_to_e%29<a name="line.343"></a> +<span class="sourceLineNo">344</span> *<a name="line.344"></a> +<span class="sourceLineNo">345</span> * @param accentedWord<a name="line.345"></a> +<span class="sourceLineNo">346</span> * The word that may have accents in it.<a name="line.346"></a> +<span class="sourceLineNo">347</span> * @return De-accented word<a name="line.347"></a> +<span class="sourceLineNo">348</span> */<a name="line.348"></a> +<span class="sourceLineNo">349</span> String removeAccents(final String accentedWord) {<a name="line.349"></a> +<span class="sourceLineNo">350</span> if (accentedWord == null) {<a name="line.350"></a> +<span class="sourceLineNo">351</span> return null;<a name="line.351"></a> +<span class="sourceLineNo">352</span> }<a name="line.352"></a> +<span class="sourceLineNo">353</span><a name="line.353"></a> +<span class="sourceLineNo">354</span> final StringBuilder sb = new StringBuilder();<a name="line.354"></a> +<span class="sourceLineNo">355</span> final int n = accentedWord.length();<a name="line.355"></a> +<span class="sourceLineNo">356</span><a name="line.356"></a> +<span class="sourceLineNo">357</span> for (int i = 0; i < n; i++) {<a name="line.357"></a> +<span class="sourceLineNo">358</span> final char c = accentedWord.charAt(i);<a name="line.358"></a> +<span class="sourceLineNo">359</span> final int pos = UNICODE.indexOf(c);<a name="line.359"></a> +<span class="sourceLineNo">360</span> if (pos > -1) {<a name="line.360"></a> +<span class="sourceLineNo">361</span> sb.append(PLAIN_ASCII.charAt(pos));<a name="line.361"></a> +<span class="sourceLineNo">362</span> } else {<a name="line.362"></a> +<span class="sourceLineNo">363</span> sb.append(c);<a name="line.363"></a> +<span class="sourceLineNo">364</span> }<a name="line.364"></a> +<span class="sourceLineNo">365</span> }<a name="line.365"></a> +<span class="sourceLineNo">366</span><a name="line.366"></a> +<span class="sourceLineNo">367</span> return sb.toString();<a name="line.367"></a> +<span class="sourceLineNo">368</span> }<a name="line.368"></a> +<span class="sourceLineNo">369</span><a name="line.369"></a> +<span class="sourceLineNo">370</span> /**<a name="line.370"></a> +<span class="sourceLineNo">371</span> * Replaces any double consonant pair with the single letter equivalent.<a name="line.371"></a> +<span class="sourceLineNo">372</span> *<a name="line.372"></a> +<span class="sourceLineNo">373</span> * <h2>API Usage</h2><a name="line.373"></a> +<span class="sourceLineNo">374</span> * <p><a name="line.374"></a> +<span class="sourceLineNo">375</span> * Consider this method private, it is package protected for unit testing only.<a name="line.375"></a> +<span class="sourceLineNo">376</span> * </p><a name="line.376"></a> +<span class="sourceLineNo">377</span> *<a name="line.377"></a> +<span class="sourceLineNo">378</span> * @param name<a name="line.378"></a> +<span class="sourceLineNo">379</span> * String to have double consonants removed<a name="line.379"></a> +<span class="sourceLineNo">380</span> * @return Single consonant word<a name="line.380"></a> +<span class="sourceLineNo">381</span> */<a name="line.381"></a> +<span class="sourceLineNo">382</span> String removeDoubleConsonants(final String name) {<a name="line.382"></a> +<span class="sourceLineNo">383</span> String replacedName = name.toUpperCase(Locale.ENGLISH);<a name="line.383"></a> +<span class="sourceLineNo">384</span> for (final String dc : DOUBLE_CONSONANT) {<a name="line.384"></a> +<span class="sourceLineNo">385</span> if (replacedName.contains(dc)) {<a name="line.385"></a> +<span class="sourceLineNo">386</span> final String singleLetter = dc.substring(0, 1);<a name="line.386"></a> +<span class="sourceLineNo">387</span> replacedName = replacedName.replace(dc, singleLetter);<a name="line.387"></a> +<span class="sourceLineNo">388</span> }<a name="line.388"></a> +<span class="sourceLineNo">389</span> }<a name="line.389"></a> +<span class="sourceLineNo">390</span> return replacedName;<a name="line.390"></a> +<span class="sourceLineNo">391</span> }<a name="line.391"></a> +<span class="sourceLineNo">392</span><a name="line.392"></a> +<span class="sourceLineNo">393</span> /**<a name="line.393"></a> +<span class="sourceLineNo">394</span> * Deletes all vowels unless the vowel begins the word.<a name="line.394"></a> +<span class="sourceLineNo">395</span> *<a name="line.395"></a> +<span class="sourceLineNo">396</span> * <h2>API Usage</h2><a name="line.396"></a> +<span class="sourceLineNo">397</span> * <p><a name="line.397"></a> +<span class="sourceLineNo">398</span> * Consider this method private, it is package protected for unit testing only.<a name="line.398"></a> +<span class="sourceLineNo">399</span> * </p><a name="line.399"></a> +<span class="sourceLineNo">400</span> *<a name="line.400"></a> +<span class="sourceLineNo">401</span> * @param name<a name="line.401"></a> +<span class="sourceLineNo">402</span> * The name to have vowels removed<a name="line.402"></a> +<span class="sourceLineNo">403</span> * @return De-voweled word<a name="line.403"></a> +<span class="sourceLineNo">404</span> */<a name="line.404"></a> +<span class="sourceLineNo">405</span> String removeVowels(String name) {<a name="line.405"></a> +<span class="sourceLineNo">406</span> // Extract first letter<a name="line.406"></a> +<span class="sourceLineNo">407</span> final String firstLetter = name.substring(0, 1);<a name="line.407"></a> +<span class="sourceLineNo">408</span><a name="line.408"></a> +<span class="sourceLineNo">409</span> name = name.replaceAll("A", EMPTY);<a name="line.409"></a> +<span class="sourceLineNo">410</span> name = name.replaceAll("E", EMPTY);<a name="line.410"></a> +<span class="sourceLineNo">411</span> name = name.replaceAll("I", EMPTY);<a name="line.411"></a> +<span class="sourceLineNo">412</span> name = name.replaceAll("O", EMPTY);<a name="line.412"></a> +<span class="sourceLineNo">413</span> name = name.replaceAll("U", EMPTY);<a name="line.413"></a> +<span class="sourceLineNo">414</span><a name="line.414"></a> +<span class="sourceLineNo">415</span> name = name.replaceAll("\\s{2,}\\b", SPACE);<a name="line.415"></a> +<span class="sourceLineNo">416</span><a name="line.416"></a> +<span class="sourceLineNo">417</span> // return isVowel(firstLetter) ? (firstLetter + name) : name;<a name="line.417"></a> +<span class="sourceLineNo">418</span> if (isVowel(firstLetter)) {<a name="line.418"></a> +<span class="sourceLineNo">419</span> return firstLetter + name;<a name="line.419"></a> +<span class="sourceLineNo">420</span> }<a name="line.420"></a> +<span class="sourceLineNo">421</span> return name;<a name="line.421"></a> +<span class="sourceLineNo">422</span> }<a name="line.422"></a> +<span class="sourceLineNo">423</span>}<a name="line.423"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Metaphone.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Metaphone.html new file mode 100644 index 0000000000000000000000000000000000000000..9f30321f7ce77a18cc27101c6c21b4682e47a043 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Metaphone.html @@ -0,0 +1,501 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.EncoderException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import org.apache.commons.codec.StringEncoder;<a name="line.21"></a> +<span class="sourceLineNo">022</span><a name="line.22"></a> +<span class="sourceLineNo">023</span>/**<a name="line.23"></a> +<span class="sourceLineNo">024</span> * Encodes a string into a Metaphone value.<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * Initial Java implementation by <CITE>William B. Brogden. December, 1997</CITE>.<a name="line.26"></a> +<span class="sourceLineNo">027</span> * Permission given by <CITE>wbrogden</CITE> for code to be used anywhere.<a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p><a name="line.28"></a> +<span class="sourceLineNo">029</span> * <CITE>Hanging on the Metaphone</CITE> by <CITE>Lawrence Philips</CITE> in <CITE>Computer Language of Dec. 1990,<a name="line.29"></a> +<span class="sourceLineNo">030</span> * p 39.</CITE><a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * Note, that this does not match the algorithm that ships with PHP, or the algorithm found in the Perl implementations:<a name="line.32"></a> +<span class="sourceLineNo">033</span> * </p><a name="line.33"></a> +<span class="sourceLineNo">034</span> * <ul><a name="line.34"></a> +<span class="sourceLineNo">035</span> * <li><a href="http://search.cpan.org/~mschwern/Text-Metaphone-1.96/Metaphone.pm">Text:Metaphone-1.96</a><a name="line.35"></a> +<span class="sourceLineNo">036</span> * (broken link 4/30/2013) </li><a name="line.36"></a> +<span class="sourceLineNo">037</span> * <li><a href="https://metacpan.org/source/MSCHWERN/Text-Metaphone-1.96//Metaphone.pm">Text:Metaphone-1.96</a><a name="line.37"></a> +<span class="sourceLineNo">038</span> * (link checked 4/30/2013) </li><a name="line.38"></a> +<span class="sourceLineNo">039</span> * </ul><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <p><a name="line.40"></a> +<span class="sourceLineNo">041</span> * They have had undocumented changes from the originally published algorithm.<a name="line.41"></a> +<span class="sourceLineNo">042</span> * For more information, see <a href="https://issues.apache.org/jira/browse/CODEC-57">CODEC-57</a>.<a name="line.42"></a> +<span class="sourceLineNo">043</span> * <p><a name="line.43"></a> +<span class="sourceLineNo">044</span> * This class is conditionally thread-safe.<a name="line.44"></a> +<span class="sourceLineNo">045</span> * The instance field for maximum code length is mutable {@link #setMaxCodeLen(int)}<a name="line.45"></a> +<span class="sourceLineNo">046</span> * but is not volatile, and accesses are not synchronized.<a name="line.46"></a> +<span class="sourceLineNo">047</span> * If an instance of the class is shared between threads, the caller needs to ensure that suitable synchronization<a name="line.47"></a> +<span class="sourceLineNo">048</span> * is used to ensure safe publication of the value between threads, and must not invoke {@link #setMaxCodeLen(int)}<a name="line.48"></a> +<span class="sourceLineNo">049</span> * after initial setup.<a name="line.49"></a> +<span class="sourceLineNo">050</span> *<a name="line.50"></a> +<span class="sourceLineNo">051</span> */<a name="line.51"></a> +<span class="sourceLineNo">052</span>public class Metaphone implements StringEncoder {<a name="line.52"></a> +<span class="sourceLineNo">053</span><a name="line.53"></a> +<span class="sourceLineNo">054</span> /**<a name="line.54"></a> +<span class="sourceLineNo">055</span> * Five values in the English language<a name="line.55"></a> +<span class="sourceLineNo">056</span> */<a name="line.56"></a> +<span class="sourceLineNo">057</span> private static final String VOWELS = "AEIOU";<a name="line.57"></a> +<span class="sourceLineNo">058</span><a name="line.58"></a> +<span class="sourceLineNo">059</span> /**<a name="line.59"></a> +<span class="sourceLineNo">060</span> * Variable used in Metaphone algorithm<a name="line.60"></a> +<span class="sourceLineNo">061</span> */<a name="line.61"></a> +<span class="sourceLineNo">062</span> private static final String FRONTV = "EIY";<a name="line.62"></a> +<span class="sourceLineNo">063</span><a name="line.63"></a> +<span class="sourceLineNo">064</span> /**<a name="line.64"></a> +<span class="sourceLineNo">065</span> * Variable used in Metaphone algorithm<a name="line.65"></a> +<span class="sourceLineNo">066</span> */<a name="line.66"></a> +<span class="sourceLineNo">067</span> private static final String VARSON = "CSPTG";<a name="line.67"></a> +<span class="sourceLineNo">068</span><a name="line.68"></a> +<span class="sourceLineNo">069</span> /**<a name="line.69"></a> +<span class="sourceLineNo">070</span> * The max code length for metaphone is 4<a name="line.70"></a> +<span class="sourceLineNo">071</span> */<a name="line.71"></a> +<span class="sourceLineNo">072</span> private int maxCodeLen = 4;<a name="line.72"></a> +<span class="sourceLineNo">073</span><a name="line.73"></a> +<span class="sourceLineNo">074</span> /**<a name="line.74"></a> +<span class="sourceLineNo">075</span> * Creates an instance of the Metaphone encoder<a name="line.75"></a> +<span class="sourceLineNo">076</span> */<a name="line.76"></a> +<span class="sourceLineNo">077</span> public Metaphone() {<a name="line.77"></a> +<span class="sourceLineNo">078</span> super();<a name="line.78"></a> +<span class="sourceLineNo">079</span> }<a name="line.79"></a> +<span class="sourceLineNo">080</span><a name="line.80"></a> +<span class="sourceLineNo">081</span> /**<a name="line.81"></a> +<span class="sourceLineNo">082</span> * Find the metaphone value of a String. This is similar to the<a name="line.82"></a> +<span class="sourceLineNo">083</span> * soundex algorithm, but better at finding similar sounding words.<a name="line.83"></a> +<span class="sourceLineNo">084</span> * All input is converted to upper case.<a name="line.84"></a> +<span class="sourceLineNo">085</span> * Limitations: Input format is expected to be a single ASCII word<a name="line.85"></a> +<span class="sourceLineNo">086</span> * with only characters in the A - Z range, no punctuation or numbers.<a name="line.86"></a> +<span class="sourceLineNo">087</span> *<a name="line.87"></a> +<span class="sourceLineNo">088</span> * @param txt String to find the metaphone code for<a name="line.88"></a> +<span class="sourceLineNo">089</span> * @return A metaphone code corresponding to the String supplied<a name="line.89"></a> +<span class="sourceLineNo">090</span> */<a name="line.90"></a> +<span class="sourceLineNo">091</span> public String metaphone(final String txt) {<a name="line.91"></a> +<span class="sourceLineNo">092</span> boolean hard = false;<a name="line.92"></a> +<span class="sourceLineNo">093</span> int txtLength;<a name="line.93"></a> +<span class="sourceLineNo">094</span> if (txt == null || (txtLength = txt.length()) == 0) {<a name="line.94"></a> +<span class="sourceLineNo">095</span> return "";<a name="line.95"></a> +<span class="sourceLineNo">096</span> }<a name="line.96"></a> +<span class="sourceLineNo">097</span> // single character is itself<a name="line.97"></a> +<span class="sourceLineNo">098</span> if (txtLength == 1) {<a name="line.98"></a> +<span class="sourceLineNo">099</span> return txt.toUpperCase(java.util.Locale.ENGLISH);<a name="line.99"></a> +<span class="sourceLineNo">100</span> }<a name="line.100"></a> +<span class="sourceLineNo">101</span><a name="line.101"></a> +<span class="sourceLineNo">102</span> final char[] inwd = txt.toUpperCase(java.util.Locale.ENGLISH).toCharArray();<a name="line.102"></a> +<span class="sourceLineNo">103</span><a name="line.103"></a> +<span class="sourceLineNo">104</span> final StringBuilder local = new StringBuilder(40); // manipulate<a name="line.104"></a> +<span class="sourceLineNo">105</span> final StringBuilder code = new StringBuilder(10); // output<a name="line.105"></a> +<span class="sourceLineNo">106</span> // handle initial 2 characters exceptions<a name="line.106"></a> +<span class="sourceLineNo">107</span> switch(inwd[0]) {<a name="line.107"></a> +<span class="sourceLineNo">108</span> case 'K':<a name="line.108"></a> +<span class="sourceLineNo">109</span> case 'G':<a name="line.109"></a> +<span class="sourceLineNo">110</span> case 'P': /* looking for KN, etc*/<a name="line.110"></a> +<span class="sourceLineNo">111</span> if (inwd[1] == 'N') {<a name="line.111"></a> +<span class="sourceLineNo">112</span> local.append(inwd, 1, inwd.length - 1);<a name="line.112"></a> +<span class="sourceLineNo">113</span> } else {<a name="line.113"></a> +<span class="sourceLineNo">114</span> local.append(inwd);<a name="line.114"></a> +<span class="sourceLineNo">115</span> }<a name="line.115"></a> +<span class="sourceLineNo">116</span> break;<a name="line.116"></a> +<span class="sourceLineNo">117</span> case 'A': /* looking for AE */<a name="line.117"></a> +<span class="sourceLineNo">118</span> if (inwd[1] == 'E') {<a name="line.118"></a> +<span class="sourceLineNo">119</span> local.append(inwd, 1, inwd.length - 1);<a name="line.119"></a> +<span class="sourceLineNo">120</span> } else {<a name="line.120"></a> +<span class="sourceLineNo">121</span> local.append(inwd);<a name="line.121"></a> +<span class="sourceLineNo">122</span> }<a name="line.122"></a> +<span class="sourceLineNo">123</span> break;<a name="line.123"></a> +<span class="sourceLineNo">124</span> case 'W': /* looking for WR or WH */<a name="line.124"></a> +<span class="sourceLineNo">125</span> if (inwd[1] == 'R') { // WR -> R<a name="line.125"></a> +<span class="sourceLineNo">126</span> local.append(inwd, 1, inwd.length - 1);<a name="line.126"></a> +<span class="sourceLineNo">127</span> break;<a name="line.127"></a> +<span class="sourceLineNo">128</span> }<a name="line.128"></a> +<span class="sourceLineNo">129</span> if (inwd[1] == 'H') {<a name="line.129"></a> +<span class="sourceLineNo">130</span> local.append(inwd, 1, inwd.length - 1);<a name="line.130"></a> +<span class="sourceLineNo">131</span> local.setCharAt(0, 'W'); // WH -> W<a name="line.131"></a> +<span class="sourceLineNo">132</span> } else {<a name="line.132"></a> +<span class="sourceLineNo">133</span> local.append(inwd);<a name="line.133"></a> +<span class="sourceLineNo">134</span> }<a name="line.134"></a> +<span class="sourceLineNo">135</span> break;<a name="line.135"></a> +<span class="sourceLineNo">136</span> case 'X': /* initial X becomes S */<a name="line.136"></a> +<span class="sourceLineNo">137</span> inwd[0] = 'S';<a name="line.137"></a> +<span class="sourceLineNo">138</span> local.append(inwd);<a name="line.138"></a> +<span class="sourceLineNo">139</span> break;<a name="line.139"></a> +<span class="sourceLineNo">140</span> default:<a name="line.140"></a> +<span class="sourceLineNo">141</span> local.append(inwd);<a name="line.141"></a> +<span class="sourceLineNo">142</span> } // now local has working string with initials fixed<a name="line.142"></a> +<span class="sourceLineNo">143</span><a name="line.143"></a> +<span class="sourceLineNo">144</span> final int wdsz = local.length();<a name="line.144"></a> +<span class="sourceLineNo">145</span> int n = 0;<a name="line.145"></a> +<span class="sourceLineNo">146</span><a name="line.146"></a> +<span class="sourceLineNo">147</span> while (code.length() < this.getMaxCodeLen() &&<a name="line.147"></a> +<span class="sourceLineNo">148</span> n < wdsz ) { // max code size of 4 works well<a name="line.148"></a> +<span class="sourceLineNo">149</span> final char symb = local.charAt(n);<a name="line.149"></a> +<span class="sourceLineNo">150</span> // remove duplicate letters except C<a name="line.150"></a> +<span class="sourceLineNo">151</span> if (symb != 'C' && isPreviousChar( local, n, symb ) ) {<a name="line.151"></a> +<span class="sourceLineNo">152</span> n++;<a name="line.152"></a> +<span class="sourceLineNo">153</span> } else { // not dup<a name="line.153"></a> +<span class="sourceLineNo">154</span> switch(symb) {<a name="line.154"></a> +<span class="sourceLineNo">155</span> case 'A':<a name="line.155"></a> +<span class="sourceLineNo">156</span> case 'E':<a name="line.156"></a> +<span class="sourceLineNo">157</span> case 'I':<a name="line.157"></a> +<span class="sourceLineNo">158</span> case 'O':<a name="line.158"></a> +<span class="sourceLineNo">159</span> case 'U':<a name="line.159"></a> +<span class="sourceLineNo">160</span> if (n == 0) {<a name="line.160"></a> +<span class="sourceLineNo">161</span> code.append(symb);<a name="line.161"></a> +<span class="sourceLineNo">162</span> }<a name="line.162"></a> +<span class="sourceLineNo">163</span> break; // only use vowel if leading char<a name="line.163"></a> +<span class="sourceLineNo">164</span> case 'B':<a name="line.164"></a> +<span class="sourceLineNo">165</span> if ( isPreviousChar(local, n, 'M') &&<a name="line.165"></a> +<span class="sourceLineNo">166</span> isLastChar(wdsz, n) ) { // B is silent if word ends in MB<a name="line.166"></a> +<span class="sourceLineNo">167</span> break;<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span> code.append(symb);<a name="line.169"></a> +<span class="sourceLineNo">170</span> break;<a name="line.170"></a> +<span class="sourceLineNo">171</span> case 'C': // lots of C special cases<a name="line.171"></a> +<span class="sourceLineNo">172</span> /* discard if SCI, SCE or SCY */<a name="line.172"></a> +<span class="sourceLineNo">173</span> if ( isPreviousChar(local, n, 'S') &&<a name="line.173"></a> +<span class="sourceLineNo">174</span> !isLastChar(wdsz, n) &&<a name="line.174"></a> +<span class="sourceLineNo">175</span> FRONTV.indexOf(local.charAt(n + 1)) >= 0 ) {<a name="line.175"></a> +<span class="sourceLineNo">176</span> break;<a name="line.176"></a> +<span class="sourceLineNo">177</span> }<a name="line.177"></a> +<span class="sourceLineNo">178</span> if (regionMatch(local, n, "CIA")) { // "CIA" -> X<a name="line.178"></a> +<span class="sourceLineNo">179</span> code.append('X');<a name="line.179"></a> +<span class="sourceLineNo">180</span> break;<a name="line.180"></a> +<span class="sourceLineNo">181</span> }<a name="line.181"></a> +<span class="sourceLineNo">182</span> if (!isLastChar(wdsz, n) &&<a name="line.182"></a> +<span class="sourceLineNo">183</span> FRONTV.indexOf(local.charAt(n + 1)) >= 0) {<a name="line.183"></a> +<span class="sourceLineNo">184</span> code.append('S');<a name="line.184"></a> +<span class="sourceLineNo">185</span> break; // CI,CE,CY -> S<a name="line.185"></a> +<span class="sourceLineNo">186</span> }<a name="line.186"></a> +<span class="sourceLineNo">187</span> if (isPreviousChar(local, n, 'S') &&<a name="line.187"></a> +<span class="sourceLineNo">188</span> isNextChar(local, n, 'H') ) { // SCH->sk<a name="line.188"></a> +<span class="sourceLineNo">189</span> code.append('K');<a name="line.189"></a> +<span class="sourceLineNo">190</span> break;<a name="line.190"></a> +<span class="sourceLineNo">191</span> }<a name="line.191"></a> +<span class="sourceLineNo">192</span> if (isNextChar(local, n, 'H')) { // detect CH<a name="line.192"></a> +<span class="sourceLineNo">193</span> if (n == 0 &&<a name="line.193"></a> +<span class="sourceLineNo">194</span> wdsz >= 3 &&<a name="line.194"></a> +<span class="sourceLineNo">195</span> isVowel(local,2) ) { // CH consonant -> K consonant<a name="line.195"></a> +<span class="sourceLineNo">196</span> code.append('K');<a name="line.196"></a> +<span class="sourceLineNo">197</span> } else {<a name="line.197"></a> +<span class="sourceLineNo">198</span> code.append('X'); // CHvowel -> X<a name="line.198"></a> +<span class="sourceLineNo">199</span> }<a name="line.199"></a> +<span class="sourceLineNo">200</span> } else {<a name="line.200"></a> +<span class="sourceLineNo">201</span> code.append('K');<a name="line.201"></a> +<span class="sourceLineNo">202</span> }<a name="line.202"></a> +<span class="sourceLineNo">203</span> break;<a name="line.203"></a> +<span class="sourceLineNo">204</span> case 'D':<a name="line.204"></a> +<span class="sourceLineNo">205</span> if (!isLastChar(wdsz, n + 1) &&<a name="line.205"></a> +<span class="sourceLineNo">206</span> isNextChar(local, n, 'G') &&<a name="line.206"></a> +<span class="sourceLineNo">207</span> FRONTV.indexOf(local.charAt(n + 2)) >= 0) { // DGE DGI DGY -> J<a name="line.207"></a> +<span class="sourceLineNo">208</span> code.append('J'); n += 2;<a name="line.208"></a> +<span class="sourceLineNo">209</span> } else {<a name="line.209"></a> +<span class="sourceLineNo">210</span> code.append('T');<a name="line.210"></a> +<span class="sourceLineNo">211</span> }<a name="line.211"></a> +<span class="sourceLineNo">212</span> break;<a name="line.212"></a> +<span class="sourceLineNo">213</span> case 'G': // GH silent at end or before consonant<a name="line.213"></a> +<span class="sourceLineNo">214</span> if (isLastChar(wdsz, n + 1) &&<a name="line.214"></a> +<span class="sourceLineNo">215</span> isNextChar(local, n, 'H')) {<a name="line.215"></a> +<span class="sourceLineNo">216</span> break;<a name="line.216"></a> +<span class="sourceLineNo">217</span> }<a name="line.217"></a> +<span class="sourceLineNo">218</span> if (!isLastChar(wdsz, n + 1) &&<a name="line.218"></a> +<span class="sourceLineNo">219</span> isNextChar(local,n,'H') &&<a name="line.219"></a> +<span class="sourceLineNo">220</span> !isVowel(local,n+2)) {<a name="line.220"></a> +<span class="sourceLineNo">221</span> break;<a name="line.221"></a> +<span class="sourceLineNo">222</span> }<a name="line.222"></a> +<span class="sourceLineNo">223</span> if (n > 0 &&<a name="line.223"></a> +<span class="sourceLineNo">224</span> ( regionMatch(local, n, "GN") ||<a name="line.224"></a> +<span class="sourceLineNo">225</span> regionMatch(local, n, "GNED") ) ) {<a name="line.225"></a> +<span class="sourceLineNo">226</span> break; // silent G<a name="line.226"></a> +<span class="sourceLineNo">227</span> }<a name="line.227"></a> +<span class="sourceLineNo">228</span> if (isPreviousChar(local, n, 'G')) {<a name="line.228"></a> +<span class="sourceLineNo">229</span> // NOTE: Given that duplicated chars are removed, I don't see how this can ever be true<a name="line.229"></a> +<span class="sourceLineNo">230</span> hard = true;<a name="line.230"></a> +<span class="sourceLineNo">231</span> } else {<a name="line.231"></a> +<span class="sourceLineNo">232</span> hard = false;<a name="line.232"></a> +<span class="sourceLineNo">233</span> }<a name="line.233"></a> +<span class="sourceLineNo">234</span> if (!isLastChar(wdsz, n) &&<a name="line.234"></a> +<span class="sourceLineNo">235</span> FRONTV.indexOf(local.charAt(n + 1)) >= 0 &&<a name="line.235"></a> +<span class="sourceLineNo">236</span> !hard) {<a name="line.236"></a> +<span class="sourceLineNo">237</span> code.append('J');<a name="line.237"></a> +<span class="sourceLineNo">238</span> } else {<a name="line.238"></a> +<span class="sourceLineNo">239</span> code.append('K');<a name="line.239"></a> +<span class="sourceLineNo">240</span> }<a name="line.240"></a> +<span class="sourceLineNo">241</span> break;<a name="line.241"></a> +<span class="sourceLineNo">242</span> case 'H':<a name="line.242"></a> +<span class="sourceLineNo">243</span> if (isLastChar(wdsz, n)) {<a name="line.243"></a> +<span class="sourceLineNo">244</span> break; // terminal H<a name="line.244"></a> +<span class="sourceLineNo">245</span> }<a name="line.245"></a> +<span class="sourceLineNo">246</span> if (n > 0 &&<a name="line.246"></a> +<span class="sourceLineNo">247</span> VARSON.indexOf(local.charAt(n - 1)) >= 0) {<a name="line.247"></a> +<span class="sourceLineNo">248</span> break;<a name="line.248"></a> +<span class="sourceLineNo">249</span> }<a name="line.249"></a> +<span class="sourceLineNo">250</span> if (isVowel(local,n+1)) {<a name="line.250"></a> +<span class="sourceLineNo">251</span> code.append('H'); // Hvowel<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span> break;<a name="line.253"></a> +<span class="sourceLineNo">254</span> case 'F':<a name="line.254"></a> +<span class="sourceLineNo">255</span> case 'J':<a name="line.255"></a> +<span class="sourceLineNo">256</span> case 'L':<a name="line.256"></a> +<span class="sourceLineNo">257</span> case 'M':<a name="line.257"></a> +<span class="sourceLineNo">258</span> case 'N':<a name="line.258"></a> +<span class="sourceLineNo">259</span> case 'R':<a name="line.259"></a> +<span class="sourceLineNo">260</span> code.append(symb);<a name="line.260"></a> +<span class="sourceLineNo">261</span> break;<a name="line.261"></a> +<span class="sourceLineNo">262</span> case 'K':<a name="line.262"></a> +<span class="sourceLineNo">263</span> if (n > 0) { // not initial<a name="line.263"></a> +<span class="sourceLineNo">264</span> if (!isPreviousChar(local, n, 'C')) {<a name="line.264"></a> +<span class="sourceLineNo">265</span> code.append(symb);<a name="line.265"></a> +<span class="sourceLineNo">266</span> }<a name="line.266"></a> +<span class="sourceLineNo">267</span> } else {<a name="line.267"></a> +<span class="sourceLineNo">268</span> code.append(symb); // initial K<a name="line.268"></a> +<span class="sourceLineNo">269</span> }<a name="line.269"></a> +<span class="sourceLineNo">270</span> break;<a name="line.270"></a> +<span class="sourceLineNo">271</span> case 'P':<a name="line.271"></a> +<span class="sourceLineNo">272</span> if (isNextChar(local,n,'H')) {<a name="line.272"></a> +<span class="sourceLineNo">273</span> // PH -> F<a name="line.273"></a> +<span class="sourceLineNo">274</span> code.append('F');<a name="line.274"></a> +<span class="sourceLineNo">275</span> } else {<a name="line.275"></a> +<span class="sourceLineNo">276</span> code.append(symb);<a name="line.276"></a> +<span class="sourceLineNo">277</span> }<a name="line.277"></a> +<span class="sourceLineNo">278</span> break;<a name="line.278"></a> +<span class="sourceLineNo">279</span> case 'Q':<a name="line.279"></a> +<span class="sourceLineNo">280</span> code.append('K');<a name="line.280"></a> +<span class="sourceLineNo">281</span> break;<a name="line.281"></a> +<span class="sourceLineNo">282</span> case 'S':<a name="line.282"></a> +<span class="sourceLineNo">283</span> if (regionMatch(local,n,"SH") ||<a name="line.283"></a> +<span class="sourceLineNo">284</span> regionMatch(local,n,"SIO") ||<a name="line.284"></a> +<span class="sourceLineNo">285</span> regionMatch(local,n,"SIA")) {<a name="line.285"></a> +<span class="sourceLineNo">286</span> code.append('X');<a name="line.286"></a> +<span class="sourceLineNo">287</span> } else {<a name="line.287"></a> +<span class="sourceLineNo">288</span> code.append('S');<a name="line.288"></a> +<span class="sourceLineNo">289</span> }<a name="line.289"></a> +<span class="sourceLineNo">290</span> break;<a name="line.290"></a> +<span class="sourceLineNo">291</span> case 'T':<a name="line.291"></a> +<span class="sourceLineNo">292</span> if (regionMatch(local,n,"TIA") ||<a name="line.292"></a> +<span class="sourceLineNo">293</span> regionMatch(local,n,"TIO")) {<a name="line.293"></a> +<span class="sourceLineNo">294</span> code.append('X');<a name="line.294"></a> +<span class="sourceLineNo">295</span> break;<a name="line.295"></a> +<span class="sourceLineNo">296</span> }<a name="line.296"></a> +<span class="sourceLineNo">297</span> if (regionMatch(local,n,"TCH")) {<a name="line.297"></a> +<span class="sourceLineNo">298</span> // Silent if in "TCH"<a name="line.298"></a> +<span class="sourceLineNo">299</span> break;<a name="line.299"></a> +<span class="sourceLineNo">300</span> }<a name="line.300"></a> +<span class="sourceLineNo">301</span> // substitute numeral 0 for TH (resembles theta after all)<a name="line.301"></a> +<span class="sourceLineNo">302</span> if (regionMatch(local,n,"TH")) {<a name="line.302"></a> +<span class="sourceLineNo">303</span> code.append('0');<a name="line.303"></a> +<span class="sourceLineNo">304</span> } else {<a name="line.304"></a> +<span class="sourceLineNo">305</span> code.append('T');<a name="line.305"></a> +<span class="sourceLineNo">306</span> }<a name="line.306"></a> +<span class="sourceLineNo">307</span> break;<a name="line.307"></a> +<span class="sourceLineNo">308</span> case 'V':<a name="line.308"></a> +<span class="sourceLineNo">309</span> code.append('F'); break;<a name="line.309"></a> +<span class="sourceLineNo">310</span> case 'W':<a name="line.310"></a> +<span class="sourceLineNo">311</span> case 'Y': // silent if not followed by vowel<a name="line.311"></a> +<span class="sourceLineNo">312</span> if (!isLastChar(wdsz,n) &&<a name="line.312"></a> +<span class="sourceLineNo">313</span> isVowel(local,n+1)) {<a name="line.313"></a> +<span class="sourceLineNo">314</span> code.append(symb);<a name="line.314"></a> +<span class="sourceLineNo">315</span> }<a name="line.315"></a> +<span class="sourceLineNo">316</span> break;<a name="line.316"></a> +<span class="sourceLineNo">317</span> case 'X':<a name="line.317"></a> +<span class="sourceLineNo">318</span> code.append('K');<a name="line.318"></a> +<span class="sourceLineNo">319</span> code.append('S');<a name="line.319"></a> +<span class="sourceLineNo">320</span> break;<a name="line.320"></a> +<span class="sourceLineNo">321</span> case 'Z':<a name="line.321"></a> +<span class="sourceLineNo">322</span> code.append('S');<a name="line.322"></a> +<span class="sourceLineNo">323</span> break;<a name="line.323"></a> +<span class="sourceLineNo">324</span> default:<a name="line.324"></a> +<span class="sourceLineNo">325</span> // do nothing<a name="line.325"></a> +<span class="sourceLineNo">326</span> break;<a name="line.326"></a> +<span class="sourceLineNo">327</span> } // end switch<a name="line.327"></a> +<span class="sourceLineNo">328</span> n++;<a name="line.328"></a> +<span class="sourceLineNo">329</span> } // end else from symb != 'C'<a name="line.329"></a> +<span class="sourceLineNo">330</span> if (code.length() > this.getMaxCodeLen()) {<a name="line.330"></a> +<span class="sourceLineNo">331</span> code.setLength(this.getMaxCodeLen());<a name="line.331"></a> +<span class="sourceLineNo">332</span> }<a name="line.332"></a> +<span class="sourceLineNo">333</span> }<a name="line.333"></a> +<span class="sourceLineNo">334</span> return code.toString();<a name="line.334"></a> +<span class="sourceLineNo">335</span> }<a name="line.335"></a> +<span class="sourceLineNo">336</span><a name="line.336"></a> +<span class="sourceLineNo">337</span> private boolean isVowel(final StringBuilder string, final int index) {<a name="line.337"></a> +<span class="sourceLineNo">338</span> return VOWELS.indexOf(string.charAt(index)) >= 0;<a name="line.338"></a> +<span class="sourceLineNo">339</span> }<a name="line.339"></a> +<span class="sourceLineNo">340</span><a name="line.340"></a> +<span class="sourceLineNo">341</span> private boolean isPreviousChar(final StringBuilder string, final int index, final char c) {<a name="line.341"></a> +<span class="sourceLineNo">342</span> boolean matches = false;<a name="line.342"></a> +<span class="sourceLineNo">343</span> if( index > 0 &&<a name="line.343"></a> +<span class="sourceLineNo">344</span> index < string.length() ) {<a name="line.344"></a> +<span class="sourceLineNo">345</span> matches = string.charAt(index - 1) == c;<a name="line.345"></a> +<span class="sourceLineNo">346</span> }<a name="line.346"></a> +<span class="sourceLineNo">347</span> return matches;<a name="line.347"></a> +<span class="sourceLineNo">348</span> }<a name="line.348"></a> +<span class="sourceLineNo">349</span><a name="line.349"></a> +<span class="sourceLineNo">350</span> private boolean isNextChar(final StringBuilder string, final int index, final char c) {<a name="line.350"></a> +<span class="sourceLineNo">351</span> boolean matches = false;<a name="line.351"></a> +<span class="sourceLineNo">352</span> if( index >= 0 &&<a name="line.352"></a> +<span class="sourceLineNo">353</span> index < string.length() - 1 ) {<a name="line.353"></a> +<span class="sourceLineNo">354</span> matches = string.charAt(index + 1) == c;<a name="line.354"></a> +<span class="sourceLineNo">355</span> }<a name="line.355"></a> +<span class="sourceLineNo">356</span> return matches;<a name="line.356"></a> +<span class="sourceLineNo">357</span> }<a name="line.357"></a> +<span class="sourceLineNo">358</span><a name="line.358"></a> +<span class="sourceLineNo">359</span> private boolean regionMatch(final StringBuilder string, final int index, final String test) {<a name="line.359"></a> +<span class="sourceLineNo">360</span> boolean matches = false;<a name="line.360"></a> +<span class="sourceLineNo">361</span> if( index >= 0 &&<a name="line.361"></a> +<span class="sourceLineNo">362</span> index + test.length() - 1 < string.length() ) {<a name="line.362"></a> +<span class="sourceLineNo">363</span> final String substring = string.substring( index, index + test.length());<a name="line.363"></a> +<span class="sourceLineNo">364</span> matches = substring.equals( test );<a name="line.364"></a> +<span class="sourceLineNo">365</span> }<a name="line.365"></a> +<span class="sourceLineNo">366</span> return matches;<a name="line.366"></a> +<span class="sourceLineNo">367</span> }<a name="line.367"></a> +<span class="sourceLineNo">368</span><a name="line.368"></a> +<span class="sourceLineNo">369</span> private boolean isLastChar(final int wdsz, final int n) {<a name="line.369"></a> +<span class="sourceLineNo">370</span> return n + 1 == wdsz;<a name="line.370"></a> +<span class="sourceLineNo">371</span> }<a name="line.371"></a> +<span class="sourceLineNo">372</span><a name="line.372"></a> +<span class="sourceLineNo">373</span><a name="line.373"></a> +<span class="sourceLineNo">374</span> /**<a name="line.374"></a> +<span class="sourceLineNo">375</span> * Encodes an Object using the metaphone algorithm. This method<a name="line.375"></a> +<span class="sourceLineNo">376</span> * is provided in order to satisfy the requirements of the<a name="line.376"></a> +<span class="sourceLineNo">377</span> * Encoder interface, and will throw an EncoderException if the<a name="line.377"></a> +<span class="sourceLineNo">378</span> * supplied object is not of type java.lang.String.<a name="line.378"></a> +<span class="sourceLineNo">379</span> *<a name="line.379"></a> +<span class="sourceLineNo">380</span> * @param obj Object to encode<a name="line.380"></a> +<span class="sourceLineNo">381</span> * @return An object (or type java.lang.String) containing the<a name="line.381"></a> +<span class="sourceLineNo">382</span> * metaphone code which corresponds to the String supplied.<a name="line.382"></a> +<span class="sourceLineNo">383</span> * @throws EncoderException if the parameter supplied is not<a name="line.383"></a> +<span class="sourceLineNo">384</span> * of type java.lang.String<a name="line.384"></a> +<span class="sourceLineNo">385</span> */<a name="line.385"></a> +<span class="sourceLineNo">386</span> @Override<a name="line.386"></a> +<span class="sourceLineNo">387</span> public Object encode(final Object obj) throws EncoderException {<a name="line.387"></a> +<span class="sourceLineNo">388</span> if (!(obj instanceof String)) {<a name="line.388"></a> +<span class="sourceLineNo">389</span> throw new EncoderException("Parameter supplied to Metaphone encode is not of type java.lang.String");<a name="line.389"></a> +<span class="sourceLineNo">390</span> }<a name="line.390"></a> +<span class="sourceLineNo">391</span> return metaphone((String) obj);<a name="line.391"></a> +<span class="sourceLineNo">392</span> }<a name="line.392"></a> +<span class="sourceLineNo">393</span><a name="line.393"></a> +<span class="sourceLineNo">394</span> /**<a name="line.394"></a> +<span class="sourceLineNo">395</span> * Encodes a String using the Metaphone algorithm.<a name="line.395"></a> +<span class="sourceLineNo">396</span> *<a name="line.396"></a> +<span class="sourceLineNo">397</span> * @param str String object to encode<a name="line.397"></a> +<span class="sourceLineNo">398</span> * @return The metaphone code corresponding to the String supplied<a name="line.398"></a> +<span class="sourceLineNo">399</span> */<a name="line.399"></a> +<span class="sourceLineNo">400</span> @Override<a name="line.400"></a> +<span class="sourceLineNo">401</span> public String encode(final String str) {<a name="line.401"></a> +<span class="sourceLineNo">402</span> return metaphone(str);<a name="line.402"></a> +<span class="sourceLineNo">403</span> }<a name="line.403"></a> +<span class="sourceLineNo">404</span><a name="line.404"></a> +<span class="sourceLineNo">405</span> /**<a name="line.405"></a> +<span class="sourceLineNo">406</span> * Tests is the metaphones of two strings are identical.<a name="line.406"></a> +<span class="sourceLineNo">407</span> *<a name="line.407"></a> +<span class="sourceLineNo">408</span> * @param str1 First of two strings to compare<a name="line.408"></a> +<span class="sourceLineNo">409</span> * @param str2 Second of two strings to compare<a name="line.409"></a> +<span class="sourceLineNo">410</span> * @return {@code true} if the metaphones of these strings are identical,<a name="line.410"></a> +<span class="sourceLineNo">411</span> * {@code false} otherwise.<a name="line.411"></a> +<span class="sourceLineNo">412</span> */<a name="line.412"></a> +<span class="sourceLineNo">413</span> public boolean isMetaphoneEqual(final String str1, final String str2) {<a name="line.413"></a> +<span class="sourceLineNo">414</span> return metaphone(str1).equals(metaphone(str2));<a name="line.414"></a> +<span class="sourceLineNo">415</span> }<a name="line.415"></a> +<span class="sourceLineNo">416</span><a name="line.416"></a> +<span class="sourceLineNo">417</span> /**<a name="line.417"></a> +<span class="sourceLineNo">418</span> * Returns the maxCodeLen.<a name="line.418"></a> +<span class="sourceLineNo">419</span> * @return int<a name="line.419"></a> +<span class="sourceLineNo">420</span> */<a name="line.420"></a> +<span class="sourceLineNo">421</span> public int getMaxCodeLen() { return this.maxCodeLen; }<a name="line.421"></a> +<span class="sourceLineNo">422</span><a name="line.422"></a> +<span class="sourceLineNo">423</span> /**<a name="line.423"></a> +<span class="sourceLineNo">424</span> * Sets the maxCodeLen.<a name="line.424"></a> +<span class="sourceLineNo">425</span> * @param maxCodeLen The maxCodeLen to set<a name="line.425"></a> +<span class="sourceLineNo">426</span> */<a name="line.426"></a> +<span class="sourceLineNo">427</span> public void setMaxCodeLen(final int maxCodeLen) { this.maxCodeLen = maxCodeLen; }<a name="line.427"></a> +<span class="sourceLineNo">428</span><a name="line.428"></a> +<span class="sourceLineNo">429</span>}<a name="line.429"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Nysiis.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Nysiis.html new file mode 100644 index 0000000000000000000000000000000000000000..843a90ee7226ac2298c9297ad67824f151621534 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Nysiis.html @@ -0,0 +1,389 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.regex.Pattern;<a name="line.20"></a> +<span class="sourceLineNo">021</span><a name="line.21"></a> +<span class="sourceLineNo">022</span>import org.apache.commons.codec.EncoderException;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import org.apache.commons.codec.StringEncoder;<a name="line.23"></a> +<span class="sourceLineNo">024</span><a name="line.24"></a> +<span class="sourceLineNo">025</span>/**<a name="line.25"></a> +<span class="sourceLineNo">026</span> * Encodes a string into a NYSIIS value. NYSIIS is an encoding used to relate similar names, but can also be used as a<a name="line.26"></a> +<span class="sourceLineNo">027</span> * general purpose scheme to find word with similar phonemes.<a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p><a name="line.28"></a> +<span class="sourceLineNo">029</span> * NYSIIS features an accuracy increase of 2.7% over the traditional Soundex algorithm.<a name="line.29"></a> +<span class="sourceLineNo">030</span> * <p><a name="line.30"></a> +<span class="sourceLineNo">031</span> * Algorithm description:<a name="line.31"></a> +<span class="sourceLineNo">032</span> * <pre><a name="line.32"></a> +<span class="sourceLineNo">033</span> * 1. Transcode first characters of name<a name="line.33"></a> +<span class="sourceLineNo">034</span> * 1a. MAC -&gt; MCC<a name="line.34"></a> +<span class="sourceLineNo">035</span> * 1b. KN -&gt; NN<a name="line.35"></a> +<span class="sourceLineNo">036</span> * 1c. K -&gt; C<a name="line.36"></a> +<span class="sourceLineNo">037</span> * 1d. PH -&gt; FF<a name="line.37"></a> +<span class="sourceLineNo">038</span> * 1e. PF -&gt; FF<a name="line.38"></a> +<span class="sourceLineNo">039</span> * 1f. SCH -&gt; SSS<a name="line.39"></a> +<span class="sourceLineNo">040</span> * 2. Transcode last characters of name<a name="line.40"></a> +<span class="sourceLineNo">041</span> * 2a. EE, IE -&gt; Y<a name="line.41"></a> +<span class="sourceLineNo">042</span> * 2b. DT,RT,RD,NT,ND -&gt; D<a name="line.42"></a> +<span class="sourceLineNo">043</span> * 3. First character of key = first character of name<a name="line.43"></a> +<span class="sourceLineNo">044</span> * 4. Transcode remaining characters by following these rules, incrementing by one character each time<a name="line.44"></a> +<span class="sourceLineNo">045</span> * 4a. EV -&gt; AF else A,E,I,O,U -&gt; A<a name="line.45"></a> +<span class="sourceLineNo">046</span> * 4b. Q -&gt; G<a name="line.46"></a> +<span class="sourceLineNo">047</span> * 4c. Z -&gt; S<a name="line.47"></a> +<span class="sourceLineNo">048</span> * 4d. M -&gt; N<a name="line.48"></a> +<span class="sourceLineNo">049</span> * 4e. KN -&gt; N else K -&gt; C<a name="line.49"></a> +<span class="sourceLineNo">050</span> * 4f. SCH -&gt; SSS<a name="line.50"></a> +<span class="sourceLineNo">051</span> * 4g. PH -&gt; FF<a name="line.51"></a> +<span class="sourceLineNo">052</span> * 4h. H -&gt; If previous or next is nonvowel, previous<a name="line.52"></a> +<span class="sourceLineNo">053</span> * 4i. W -&gt; If previous is vowel, previous<a name="line.53"></a> +<span class="sourceLineNo">054</span> * 4j. Add current to key if current != last key character<a name="line.54"></a> +<span class="sourceLineNo">055</span> * 5. If last character is S, remove it<a name="line.55"></a> +<span class="sourceLineNo">056</span> * 6. If last characters are AY, replace with Y<a name="line.56"></a> +<span class="sourceLineNo">057</span> * 7. If last character is A, remove it<a name="line.57"></a> +<span class="sourceLineNo">058</span> * 8. Collapse all strings of repeated characters<a name="line.58"></a> +<span class="sourceLineNo">059</span> * 9. Add original first character of name as first character of key<a name="line.59"></a> +<span class="sourceLineNo">060</span> * </pre><a name="line.60"></a> +<span class="sourceLineNo">061</span> * <p><a name="line.61"></a> +<span class="sourceLineNo">062</span> * This class is immutable and thread-safe.<a name="line.62"></a> +<span class="sourceLineNo">063</span> *<a name="line.63"></a> +<span class="sourceLineNo">064</span> * @see <a href="http://en.wikipedia.org/wiki/NYSIIS">NYSIIS on Wikipedia</a><a name="line.64"></a> +<span class="sourceLineNo">065</span> * @see <a href="http://www.dropby.com/NYSIIS.html">NYSIIS on dropby.com</a><a name="line.65"></a> +<span class="sourceLineNo">066</span> * @see Soundex<a name="line.66"></a> +<span class="sourceLineNo">067</span> * @since 1.7<a name="line.67"></a> +<span class="sourceLineNo">068</span> */<a name="line.68"></a> +<span class="sourceLineNo">069</span>public class Nysiis implements StringEncoder {<a name="line.69"></a> +<span class="sourceLineNo">070</span><a name="line.70"></a> +<span class="sourceLineNo">071</span> private static final char[] CHARS_A = new char[] { 'A' };<a name="line.71"></a> +<span class="sourceLineNo">072</span> private static final char[] CHARS_AF = new char[] { 'A', 'F' };<a name="line.72"></a> +<span class="sourceLineNo">073</span> private static final char[] CHARS_C = new char[] { 'C' };<a name="line.73"></a> +<span class="sourceLineNo">074</span> private static final char[] CHARS_FF = new char[] { 'F', 'F' };<a name="line.74"></a> +<span class="sourceLineNo">075</span> private static final char[] CHARS_G = new char[] { 'G' };<a name="line.75"></a> +<span class="sourceLineNo">076</span> private static final char[] CHARS_N = new char[] { 'N' };<a name="line.76"></a> +<span class="sourceLineNo">077</span> private static final char[] CHARS_NN = new char[] { 'N', 'N' };<a name="line.77"></a> +<span class="sourceLineNo">078</span> private static final char[] CHARS_S = new char[] { 'S' };<a name="line.78"></a> +<span class="sourceLineNo">079</span> private static final char[] CHARS_SSS = new char[] { 'S', 'S', 'S' };<a name="line.79"></a> +<span class="sourceLineNo">080</span><a name="line.80"></a> +<span class="sourceLineNo">081</span> private static final Pattern PAT_MAC = Pattern.compile("^MAC");<a name="line.81"></a> +<span class="sourceLineNo">082</span> private static final Pattern PAT_KN = Pattern.compile("^KN");<a name="line.82"></a> +<span class="sourceLineNo">083</span> private static final Pattern PAT_K = Pattern.compile("^K");<a name="line.83"></a> +<span class="sourceLineNo">084</span> private static final Pattern PAT_PH_PF = Pattern.compile("^(PH|PF)");<a name="line.84"></a> +<span class="sourceLineNo">085</span> private static final Pattern PAT_SCH = Pattern.compile("^SCH");<a name="line.85"></a> +<span class="sourceLineNo">086</span> private static final Pattern PAT_EE_IE = Pattern.compile("(EE|IE)$");<a name="line.86"></a> +<span class="sourceLineNo">087</span> private static final Pattern PAT_DT_ETC = Pattern.compile("(DT|RT|RD|NT|ND)$");<a name="line.87"></a> +<span class="sourceLineNo">088</span><a name="line.88"></a> +<span class="sourceLineNo">089</span> private static final char SPACE = ' ';<a name="line.89"></a> +<span class="sourceLineNo">090</span> private static final int TRUE_LENGTH = 6;<a name="line.90"></a> +<span class="sourceLineNo">091</span><a name="line.91"></a> +<span class="sourceLineNo">092</span> /**<a name="line.92"></a> +<span class="sourceLineNo">093</span> * Tests if the given character is a vowel.<a name="line.93"></a> +<span class="sourceLineNo">094</span> *<a name="line.94"></a> +<span class="sourceLineNo">095</span> * @param c<a name="line.95"></a> +<span class="sourceLineNo">096</span> * the character to test<a name="line.96"></a> +<span class="sourceLineNo">097</span> * @return {@code true} if the character is a vowel, {@code false} otherwise<a name="line.97"></a> +<span class="sourceLineNo">098</span> */<a name="line.98"></a> +<span class="sourceLineNo">099</span> private static boolean isVowel(final char c) {<a name="line.99"></a> +<span class="sourceLineNo">100</span> return c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U';<a name="line.100"></a> +<span class="sourceLineNo">101</span> }<a name="line.101"></a> +<span class="sourceLineNo">102</span><a name="line.102"></a> +<span class="sourceLineNo">103</span> /**<a name="line.103"></a> +<span class="sourceLineNo">104</span> * Transcodes the remaining parts of the String. The method operates on a sliding window, looking at 4 characters at<a name="line.104"></a> +<span class="sourceLineNo">105</span> * a time: [i-1, i, i+1, i+2].<a name="line.105"></a> +<span class="sourceLineNo">106</span> *<a name="line.106"></a> +<span class="sourceLineNo">107</span> * @param prev<a name="line.107"></a> +<span class="sourceLineNo">108</span> * the previous character<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @param curr<a name="line.109"></a> +<span class="sourceLineNo">110</span> * the current character<a name="line.110"></a> +<span class="sourceLineNo">111</span> * @param next<a name="line.111"></a> +<span class="sourceLineNo">112</span> * the next character<a name="line.112"></a> +<span class="sourceLineNo">113</span> * @param aNext<a name="line.113"></a> +<span class="sourceLineNo">114</span> * the after next character<a name="line.114"></a> +<span class="sourceLineNo">115</span> * @return a transcoded array of characters, starting from the current position<a name="line.115"></a> +<span class="sourceLineNo">116</span> */<a name="line.116"></a> +<span class="sourceLineNo">117</span> private static char[] transcodeRemaining(final char prev, final char curr, final char next, final char aNext) {<a name="line.117"></a> +<span class="sourceLineNo">118</span> // 1. EV -> AF<a name="line.118"></a> +<span class="sourceLineNo">119</span> if (curr == 'E' && next == 'V') {<a name="line.119"></a> +<span class="sourceLineNo">120</span> return CHARS_AF;<a name="line.120"></a> +<span class="sourceLineNo">121</span> }<a name="line.121"></a> +<span class="sourceLineNo">122</span><a name="line.122"></a> +<span class="sourceLineNo">123</span> // A, E, I, O, U -> A<a name="line.123"></a> +<span class="sourceLineNo">124</span> if (isVowel(curr)) {<a name="line.124"></a> +<span class="sourceLineNo">125</span> return CHARS_A;<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span><a name="line.127"></a> +<span class="sourceLineNo">128</span> // 2. Q -> G, Z -> S, M -> N<a name="line.128"></a> +<span class="sourceLineNo">129</span> if (curr == 'Q') {<a name="line.129"></a> +<span class="sourceLineNo">130</span> return CHARS_G;<a name="line.130"></a> +<span class="sourceLineNo">131</span> } else if (curr == 'Z') {<a name="line.131"></a> +<span class="sourceLineNo">132</span> return CHARS_S;<a name="line.132"></a> +<span class="sourceLineNo">133</span> } else if (curr == 'M') {<a name="line.133"></a> +<span class="sourceLineNo">134</span> return CHARS_N;<a name="line.134"></a> +<span class="sourceLineNo">135</span> }<a name="line.135"></a> +<span class="sourceLineNo">136</span><a name="line.136"></a> +<span class="sourceLineNo">137</span> // 3. KN -> NN else K -> C<a name="line.137"></a> +<span class="sourceLineNo">138</span> if (curr == 'K') {<a name="line.138"></a> +<span class="sourceLineNo">139</span> if (next == 'N') {<a name="line.139"></a> +<span class="sourceLineNo">140</span> return CHARS_NN;<a name="line.140"></a> +<span class="sourceLineNo">141</span> }<a name="line.141"></a> +<span class="sourceLineNo">142</span> return CHARS_C;<a name="line.142"></a> +<span class="sourceLineNo">143</span> }<a name="line.143"></a> +<span class="sourceLineNo">144</span><a name="line.144"></a> +<span class="sourceLineNo">145</span> // 4. SCH -> SSS<a name="line.145"></a> +<span class="sourceLineNo">146</span> if (curr == 'S' && next == 'C' && aNext == 'H') {<a name="line.146"></a> +<span class="sourceLineNo">147</span> return CHARS_SSS;<a name="line.147"></a> +<span class="sourceLineNo">148</span> }<a name="line.148"></a> +<span class="sourceLineNo">149</span><a name="line.149"></a> +<span class="sourceLineNo">150</span> // PH -> FF<a name="line.150"></a> +<span class="sourceLineNo">151</span> if (curr == 'P' && next == 'H') {<a name="line.151"></a> +<span class="sourceLineNo">152</span> return CHARS_FF;<a name="line.152"></a> +<span class="sourceLineNo">153</span> }<a name="line.153"></a> +<span class="sourceLineNo">154</span><a name="line.154"></a> +<span class="sourceLineNo">155</span> // 5. H -> If previous or next is a non vowel, previous.<a name="line.155"></a> +<span class="sourceLineNo">156</span> if (curr == 'H' && (!isVowel(prev) || !isVowel(next))) {<a name="line.156"></a> +<span class="sourceLineNo">157</span> return new char[] { prev };<a name="line.157"></a> +<span class="sourceLineNo">158</span> }<a name="line.158"></a> +<span class="sourceLineNo">159</span><a name="line.159"></a> +<span class="sourceLineNo">160</span> // 6. W -> If previous is vowel, previous.<a name="line.160"></a> +<span class="sourceLineNo">161</span> if (curr == 'W' && isVowel(prev)) {<a name="line.161"></a> +<span class="sourceLineNo">162</span> return new char[] { prev };<a name="line.162"></a> +<span class="sourceLineNo">163</span> }<a name="line.163"></a> +<span class="sourceLineNo">164</span><a name="line.164"></a> +<span class="sourceLineNo">165</span> return new char[] { curr };<a name="line.165"></a> +<span class="sourceLineNo">166</span> }<a name="line.166"></a> +<span class="sourceLineNo">167</span><a name="line.167"></a> +<span class="sourceLineNo">168</span> /** Indicates the strict mode. */<a name="line.168"></a> +<span class="sourceLineNo">169</span> private final boolean strict;<a name="line.169"></a> +<span class="sourceLineNo">170</span><a name="line.170"></a> +<span class="sourceLineNo">171</span> /**<a name="line.171"></a> +<span class="sourceLineNo">172</span> * Creates an instance of the {@link Nysiis} encoder with strict mode (original form),<a name="line.172"></a> +<span class="sourceLineNo">173</span> * i.e. encoded strings have a maximum length of 6.<a name="line.173"></a> +<span class="sourceLineNo">174</span> */<a name="line.174"></a> +<span class="sourceLineNo">175</span> public Nysiis() {<a name="line.175"></a> +<span class="sourceLineNo">176</span> this(true);<a name="line.176"></a> +<span class="sourceLineNo">177</span> }<a name="line.177"></a> +<span class="sourceLineNo">178</span><a name="line.178"></a> +<span class="sourceLineNo">179</span> /**<a name="line.179"></a> +<span class="sourceLineNo">180</span> * Create an instance of the {@link Nysiis} encoder with the specified strict mode:<a name="line.180"></a> +<span class="sourceLineNo">181</span> *<a name="line.181"></a> +<span class="sourceLineNo">182</span> * <ul><a name="line.182"></a> +<span class="sourceLineNo">183</span> * <li>{@code true}: encoded strings have a maximum length of 6</li><a name="line.183"></a> +<span class="sourceLineNo">184</span> * <li>{@code false}: encoded strings may have arbitrary length</li><a name="line.184"></a> +<span class="sourceLineNo">185</span> * </ul><a name="line.185"></a> +<span class="sourceLineNo">186</span> *<a name="line.186"></a> +<span class="sourceLineNo">187</span> * @param strict<a name="line.187"></a> +<span class="sourceLineNo">188</span> * the strict mode<a name="line.188"></a> +<span class="sourceLineNo">189</span> */<a name="line.189"></a> +<span class="sourceLineNo">190</span> public Nysiis(final boolean strict) {<a name="line.190"></a> +<span class="sourceLineNo">191</span> this.strict = strict;<a name="line.191"></a> +<span class="sourceLineNo">192</span> }<a name="line.192"></a> +<span class="sourceLineNo">193</span><a name="line.193"></a> +<span class="sourceLineNo">194</span> /**<a name="line.194"></a> +<span class="sourceLineNo">195</span> * Encodes an Object using the NYSIIS algorithm. This method is provided in order to satisfy the requirements of the<a name="line.195"></a> +<span class="sourceLineNo">196</span> * Encoder interface, and will throw an {@link EncoderException} if the supplied object is not of type<a name="line.196"></a> +<span class="sourceLineNo">197</span> * {@link String}.<a name="line.197"></a> +<span class="sourceLineNo">198</span> *<a name="line.198"></a> +<span class="sourceLineNo">199</span> * @param obj<a name="line.199"></a> +<span class="sourceLineNo">200</span> * Object to encode<a name="line.200"></a> +<span class="sourceLineNo">201</span> * @return An object (or a {@link String}) containing the NYSIIS code which corresponds to the given String.<a name="line.201"></a> +<span class="sourceLineNo">202</span> * @throws EncoderException<a name="line.202"></a> +<span class="sourceLineNo">203</span> * if the parameter supplied is not of a {@link String}<a name="line.203"></a> +<span class="sourceLineNo">204</span> * @throws IllegalArgumentException<a name="line.204"></a> +<span class="sourceLineNo">205</span> * if a character is not mapped<a name="line.205"></a> +<span class="sourceLineNo">206</span> */<a name="line.206"></a> +<span class="sourceLineNo">207</span> @Override<a name="line.207"></a> +<span class="sourceLineNo">208</span> public Object encode(final Object obj) throws EncoderException {<a name="line.208"></a> +<span class="sourceLineNo">209</span> if (!(obj instanceof String)) {<a name="line.209"></a> +<span class="sourceLineNo">210</span> throw new EncoderException("Parameter supplied to Nysiis encode is not of type java.lang.String");<a name="line.210"></a> +<span class="sourceLineNo">211</span> }<a name="line.211"></a> +<span class="sourceLineNo">212</span> return this.nysiis((String) obj);<a name="line.212"></a> +<span class="sourceLineNo">213</span> }<a name="line.213"></a> +<span class="sourceLineNo">214</span><a name="line.214"></a> +<span class="sourceLineNo">215</span> /**<a name="line.215"></a> +<span class="sourceLineNo">216</span> * Encodes a String using the NYSIIS algorithm.<a name="line.216"></a> +<span class="sourceLineNo">217</span> *<a name="line.217"></a> +<span class="sourceLineNo">218</span> * @param str<a name="line.218"></a> +<span class="sourceLineNo">219</span> * A String object to encode<a name="line.219"></a> +<span class="sourceLineNo">220</span> * @return A Nysiis code corresponding to the String supplied<a name="line.220"></a> +<span class="sourceLineNo">221</span> * @throws IllegalArgumentException<a name="line.221"></a> +<span class="sourceLineNo">222</span> * if a character is not mapped<a name="line.222"></a> +<span class="sourceLineNo">223</span> */<a name="line.223"></a> +<span class="sourceLineNo">224</span> @Override<a name="line.224"></a> +<span class="sourceLineNo">225</span> public String encode(final String str) {<a name="line.225"></a> +<span class="sourceLineNo">226</span> return this.nysiis(str);<a name="line.226"></a> +<span class="sourceLineNo">227</span> }<a name="line.227"></a> +<span class="sourceLineNo">228</span><a name="line.228"></a> +<span class="sourceLineNo">229</span> /**<a name="line.229"></a> +<span class="sourceLineNo">230</span> * Indicates the strict mode for this {@link Nysiis} encoder.<a name="line.230"></a> +<span class="sourceLineNo">231</span> *<a name="line.231"></a> +<span class="sourceLineNo">232</span> * @return {@code true} if the encoder is configured for strict mode, {@code false} otherwise<a name="line.232"></a> +<span class="sourceLineNo">233</span> */<a name="line.233"></a> +<span class="sourceLineNo">234</span> public boolean isStrict() {<a name="line.234"></a> +<span class="sourceLineNo">235</span> return this.strict;<a name="line.235"></a> +<span class="sourceLineNo">236</span> }<a name="line.236"></a> +<span class="sourceLineNo">237</span><a name="line.237"></a> +<span class="sourceLineNo">238</span> /**<a name="line.238"></a> +<span class="sourceLineNo">239</span> * Retrieves the NYSIIS code for a given String object.<a name="line.239"></a> +<span class="sourceLineNo">240</span> *<a name="line.240"></a> +<span class="sourceLineNo">241</span> * @param str<a name="line.241"></a> +<span class="sourceLineNo">242</span> * String to encode using the NYSIIS algorithm<a name="line.242"></a> +<span class="sourceLineNo">243</span> * @return A NYSIIS code for the String supplied<a name="line.243"></a> +<span class="sourceLineNo">244</span> */<a name="line.244"></a> +<span class="sourceLineNo">245</span> public String nysiis(String str) {<a name="line.245"></a> +<span class="sourceLineNo">246</span> if (str == null) {<a name="line.246"></a> +<span class="sourceLineNo">247</span> return null;<a name="line.247"></a> +<span class="sourceLineNo">248</span> }<a name="line.248"></a> +<span class="sourceLineNo">249</span><a name="line.249"></a> +<span class="sourceLineNo">250</span> // Use the same clean rules as Soundex<a name="line.250"></a> +<span class="sourceLineNo">251</span> str = SoundexUtils.clean(str);<a name="line.251"></a> +<span class="sourceLineNo">252</span><a name="line.252"></a> +<span class="sourceLineNo">253</span> if (str.length() == 0) {<a name="line.253"></a> +<span class="sourceLineNo">254</span> return str;<a name="line.254"></a> +<span class="sourceLineNo">255</span> }<a name="line.255"></a> +<span class="sourceLineNo">256</span><a name="line.256"></a> +<span class="sourceLineNo">257</span> // Translate first characters of name:<a name="line.257"></a> +<span class="sourceLineNo">258</span> // MAC -> MCC, KN -> NN, K -> C, PH | PF -> FF, SCH -> SSS<a name="line.258"></a> +<span class="sourceLineNo">259</span> str = PAT_MAC.matcher(str).replaceFirst("MCC");<a name="line.259"></a> +<span class="sourceLineNo">260</span> str = PAT_KN.matcher(str).replaceFirst("NN");<a name="line.260"></a> +<span class="sourceLineNo">261</span> str = PAT_K.matcher(str).replaceFirst("C");<a name="line.261"></a> +<span class="sourceLineNo">262</span> str = PAT_PH_PF.matcher(str).replaceFirst("FF");<a name="line.262"></a> +<span class="sourceLineNo">263</span> str = PAT_SCH.matcher(str).replaceFirst("SSS");<a name="line.263"></a> +<span class="sourceLineNo">264</span><a name="line.264"></a> +<span class="sourceLineNo">265</span> // Translate last characters of name:<a name="line.265"></a> +<span class="sourceLineNo">266</span> // EE -> Y, IE -> Y, DT | RT | RD | NT | ND -> D<a name="line.266"></a> +<span class="sourceLineNo">267</span> str = PAT_EE_IE.matcher(str).replaceFirst("Y");<a name="line.267"></a> +<span class="sourceLineNo">268</span> str = PAT_DT_ETC.matcher(str).replaceFirst("D");<a name="line.268"></a> +<span class="sourceLineNo">269</span><a name="line.269"></a> +<span class="sourceLineNo">270</span> // First character of key = first character of name.<a name="line.270"></a> +<span class="sourceLineNo">271</span> final StringBuilder key = new StringBuilder(str.length());<a name="line.271"></a> +<span class="sourceLineNo">272</span> key.append(str.charAt(0));<a name="line.272"></a> +<span class="sourceLineNo">273</span><a name="line.273"></a> +<span class="sourceLineNo">274</span> // Transcode remaining characters, incrementing by one character each time<a name="line.274"></a> +<span class="sourceLineNo">275</span> final char[] chars = str.toCharArray();<a name="line.275"></a> +<span class="sourceLineNo">276</span> final int len = chars.length;<a name="line.276"></a> +<span class="sourceLineNo">277</span><a name="line.277"></a> +<span class="sourceLineNo">278</span> for (int i = 1; i < len; i++) {<a name="line.278"></a> +<span class="sourceLineNo">279</span> final char next = i < len - 1 ? chars[i + 1] : SPACE;<a name="line.279"></a> +<span class="sourceLineNo">280</span> final char aNext = i < len - 2 ? chars[i + 2] : SPACE;<a name="line.280"></a> +<span class="sourceLineNo">281</span> final char[] transcoded = transcodeRemaining(chars[i - 1], chars[i], next, aNext);<a name="line.281"></a> +<span class="sourceLineNo">282</span> System.arraycopy(transcoded, 0, chars, i, transcoded.length);<a name="line.282"></a> +<span class="sourceLineNo">283</span><a name="line.283"></a> +<span class="sourceLineNo">284</span> // only append the current char to the key if it is different from the last one<a name="line.284"></a> +<span class="sourceLineNo">285</span> if (chars[i] != chars[i - 1]) {<a name="line.285"></a> +<span class="sourceLineNo">286</span> key.append(chars[i]);<a name="line.286"></a> +<span class="sourceLineNo">287</span> }<a name="line.287"></a> +<span class="sourceLineNo">288</span> }<a name="line.288"></a> +<span class="sourceLineNo">289</span><a name="line.289"></a> +<span class="sourceLineNo">290</span> if (key.length() > 1) {<a name="line.290"></a> +<span class="sourceLineNo">291</span> char lastChar = key.charAt(key.length() - 1);<a name="line.291"></a> +<span class="sourceLineNo">292</span><a name="line.292"></a> +<span class="sourceLineNo">293</span> // If last character is S, remove it.<a name="line.293"></a> +<span class="sourceLineNo">294</span> if (lastChar == 'S') {<a name="line.294"></a> +<span class="sourceLineNo">295</span> key.deleteCharAt(key.length() - 1);<a name="line.295"></a> +<span class="sourceLineNo">296</span> lastChar = key.charAt(key.length() - 1);<a name="line.296"></a> +<span class="sourceLineNo">297</span> }<a name="line.297"></a> +<span class="sourceLineNo">298</span><a name="line.298"></a> +<span class="sourceLineNo">299</span> if (key.length() > 2) {<a name="line.299"></a> +<span class="sourceLineNo">300</span> final char last2Char = key.charAt(key.length() - 2);<a name="line.300"></a> +<span class="sourceLineNo">301</span> // If last characters are AY, replace with Y.<a name="line.301"></a> +<span class="sourceLineNo">302</span> if (last2Char == 'A' && lastChar == 'Y') {<a name="line.302"></a> +<span class="sourceLineNo">303</span> key.deleteCharAt(key.length() - 2);<a name="line.303"></a> +<span class="sourceLineNo">304</span> }<a name="line.304"></a> +<span class="sourceLineNo">305</span> }<a name="line.305"></a> +<span class="sourceLineNo">306</span><a name="line.306"></a> +<span class="sourceLineNo">307</span> // If last character is A, remove it.<a name="line.307"></a> +<span class="sourceLineNo">308</span> if (lastChar == 'A') {<a name="line.308"></a> +<span class="sourceLineNo">309</span> key.deleteCharAt(key.length() - 1);<a name="line.309"></a> +<span class="sourceLineNo">310</span> }<a name="line.310"></a> +<span class="sourceLineNo">311</span> }<a name="line.311"></a> +<span class="sourceLineNo">312</span><a name="line.312"></a> +<span class="sourceLineNo">313</span> final String string = key.toString();<a name="line.313"></a> +<span class="sourceLineNo">314</span> return this.isStrict() ? string.substring(0, Math.min(TRUE_LENGTH, string.length())) : string;<a name="line.314"></a> +<span class="sourceLineNo">315</span> }<a name="line.315"></a> +<span class="sourceLineNo">316</span><a name="line.316"></a> +<span class="sourceLineNo">317</span>}<a name="line.317"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/RefinedSoundex.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/RefinedSoundex.html new file mode 100644 index 0000000000000000000000000000000000000000..516873752e31cefd4f8c604e38717115d11352af --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/RefinedSoundex.html @@ -0,0 +1,290 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.EncoderException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import org.apache.commons.codec.StringEncoder;<a name="line.21"></a> +<span class="sourceLineNo">022</span><a name="line.22"></a> +<span class="sourceLineNo">023</span>/**<a name="line.23"></a> +<span class="sourceLineNo">024</span> * Encodes a string into a Refined Soundex value. A refined soundex code is<a name="line.24"></a> +<span class="sourceLineNo">025</span> * optimized for spell checking words. Soundex method originally developed by<a name="line.25"></a> +<span class="sourceLineNo">026</span> * <CITE>Margaret Odell</CITE> and <CITE>Robert Russell</CITE>.<a name="line.26"></a> +<span class="sourceLineNo">027</span> *<a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p>This class is immutable and thread-safe.</p><a name="line.28"></a> +<span class="sourceLineNo">029</span> *<a name="line.29"></a> +<span class="sourceLineNo">030</span> */<a name="line.30"></a> +<span class="sourceLineNo">031</span>public class RefinedSoundex implements StringEncoder {<a name="line.31"></a> +<span class="sourceLineNo">032</span><a name="line.32"></a> +<span class="sourceLineNo">033</span> /**<a name="line.33"></a> +<span class="sourceLineNo">034</span> * Mapping:<a name="line.34"></a> +<span class="sourceLineNo">035</span> * <pre><a name="line.35"></a> +<span class="sourceLineNo">036</span> * 0: A E I O U Y H W<a name="line.36"></a> +<span class="sourceLineNo">037</span> * 1: B P<a name="line.37"></a> +<span class="sourceLineNo">038</span> * 2: F V<a name="line.38"></a> +<span class="sourceLineNo">039</span> * 3: C K S<a name="line.39"></a> +<span class="sourceLineNo">040</span> * 4: G J<a name="line.40"></a> +<span class="sourceLineNo">041</span> * 5: Q X Z<a name="line.41"></a> +<span class="sourceLineNo">042</span> * 6: D T<a name="line.42"></a> +<span class="sourceLineNo">043</span> * 7: L<a name="line.43"></a> +<span class="sourceLineNo">044</span> * 8: M N<a name="line.44"></a> +<span class="sourceLineNo">045</span> * 9: R<a name="line.45"></a> +<span class="sourceLineNo">046</span> * </pre><a name="line.46"></a> +<span class="sourceLineNo">047</span> * @since 1.4<a name="line.47"></a> +<span class="sourceLineNo">048</span> */<a name="line.48"></a> +<span class="sourceLineNo">049</span> // ABCDEFGHIJKLMNOPQRSTUVWXYZ<a name="line.49"></a> +<span class="sourceLineNo">050</span> public static final String US_ENGLISH_MAPPING_STRING = "01360240043788015936020505";<a name="line.50"></a> +<span class="sourceLineNo">051</span><a name="line.51"></a> +<span class="sourceLineNo">052</span> /**<a name="line.52"></a> +<span class="sourceLineNo">053</span> * RefinedSoundex is *refined* for a number of reasons one being that the<a name="line.53"></a> +<span class="sourceLineNo">054</span> * mappings have been altered. This implementation contains default<a name="line.54"></a> +<span class="sourceLineNo">055</span> * mappings for US English.<a name="line.55"></a> +<span class="sourceLineNo">056</span> */<a name="line.56"></a> +<span class="sourceLineNo">057</span> private static final char[] US_ENGLISH_MAPPING = US_ENGLISH_MAPPING_STRING.toCharArray();<a name="line.57"></a> +<span class="sourceLineNo">058</span><a name="line.58"></a> +<span class="sourceLineNo">059</span> /**<a name="line.59"></a> +<span class="sourceLineNo">060</span> * Every letter of the alphabet is "mapped" to a numerical value. This char<a name="line.60"></a> +<span class="sourceLineNo">061</span> * array holds the values to which each letter is mapped. This<a name="line.61"></a> +<span class="sourceLineNo">062</span> * implementation contains a default map for US_ENGLISH<a name="line.62"></a> +<span class="sourceLineNo">063</span> */<a name="line.63"></a> +<span class="sourceLineNo">064</span> private final char[] soundexMapping;<a name="line.64"></a> +<span class="sourceLineNo">065</span><a name="line.65"></a> +<span class="sourceLineNo">066</span> /**<a name="line.66"></a> +<span class="sourceLineNo">067</span> * This static variable contains an instance of the RefinedSoundex using<a name="line.67"></a> +<span class="sourceLineNo">068</span> * the US_ENGLISH mapping.<a name="line.68"></a> +<span class="sourceLineNo">069</span> */<a name="line.69"></a> +<span class="sourceLineNo">070</span> public static final RefinedSoundex US_ENGLISH = new RefinedSoundex();<a name="line.70"></a> +<span class="sourceLineNo">071</span><a name="line.71"></a> +<span class="sourceLineNo">072</span> /**<a name="line.72"></a> +<span class="sourceLineNo">073</span> * Creates an instance of the RefinedSoundex object using the default US<a name="line.73"></a> +<span class="sourceLineNo">074</span> * English mapping.<a name="line.74"></a> +<span class="sourceLineNo">075</span> */<a name="line.75"></a> +<span class="sourceLineNo">076</span> public RefinedSoundex() {<a name="line.76"></a> +<span class="sourceLineNo">077</span> this.soundexMapping = US_ENGLISH_MAPPING;<a name="line.77"></a> +<span class="sourceLineNo">078</span> }<a name="line.78"></a> +<span class="sourceLineNo">079</span><a name="line.79"></a> +<span class="sourceLineNo">080</span> /**<a name="line.80"></a> +<span class="sourceLineNo">081</span> * Creates a refined soundex instance using a custom mapping. This<a name="line.81"></a> +<span class="sourceLineNo">082</span> * constructor can be used to customize the mapping, and/or possibly<a name="line.82"></a> +<span class="sourceLineNo">083</span> * provide an internationalized mapping for a non-Western character set.<a name="line.83"></a> +<span class="sourceLineNo">084</span> *<a name="line.84"></a> +<span class="sourceLineNo">085</span> * @param mapping<a name="line.85"></a> +<span class="sourceLineNo">086</span> * Mapping array to use when finding the corresponding code for<a name="line.86"></a> +<span class="sourceLineNo">087</span> * a given character<a name="line.87"></a> +<span class="sourceLineNo">088</span> */<a name="line.88"></a> +<span class="sourceLineNo">089</span> public RefinedSoundex(final char[] mapping) {<a name="line.89"></a> +<span class="sourceLineNo">090</span> this.soundexMapping = new char[mapping.length];<a name="line.90"></a> +<span class="sourceLineNo">091</span> System.arraycopy(mapping, 0, this.soundexMapping, 0, mapping.length);<a name="line.91"></a> +<span class="sourceLineNo">092</span> }<a name="line.92"></a> +<span class="sourceLineNo">093</span><a name="line.93"></a> +<span class="sourceLineNo">094</span> /**<a name="line.94"></a> +<span class="sourceLineNo">095</span> * Creates a refined Soundex instance using a custom mapping. This constructor can be used to customize the mapping,<a name="line.95"></a> +<span class="sourceLineNo">096</span> * and/or possibly provide an internationalized mapping for a non-Western character set.<a name="line.96"></a> +<span class="sourceLineNo">097</span> *<a name="line.97"></a> +<span class="sourceLineNo">098</span> * @param mapping<a name="line.98"></a> +<span class="sourceLineNo">099</span> * Mapping string to use when finding the corresponding code for a given character<a name="line.99"></a> +<span class="sourceLineNo">100</span> * @since 1.4<a name="line.100"></a> +<span class="sourceLineNo">101</span> */<a name="line.101"></a> +<span class="sourceLineNo">102</span> public RefinedSoundex(final String mapping) {<a name="line.102"></a> +<span class="sourceLineNo">103</span> this.soundexMapping = mapping.toCharArray();<a name="line.103"></a> +<span class="sourceLineNo">104</span> }<a name="line.104"></a> +<span class="sourceLineNo">105</span><a name="line.105"></a> +<span class="sourceLineNo">106</span> /**<a name="line.106"></a> +<span class="sourceLineNo">107</span> * Returns the number of characters in the two encoded Strings that are the<a name="line.107"></a> +<span class="sourceLineNo">108</span> * same. This return value ranges from 0 to the length of the shortest<a name="line.108"></a> +<span class="sourceLineNo">109</span> * encoded String: 0 indicates little or no similarity, and 4 out of 4 (for<a name="line.109"></a> +<span class="sourceLineNo">110</span> * example) indicates strong similarity or identical values. For refined<a name="line.110"></a> +<span class="sourceLineNo">111</span> * Soundex, the return value can be greater than 4.<a name="line.111"></a> +<span class="sourceLineNo">112</span> *<a name="line.112"></a> +<span class="sourceLineNo">113</span> * @param s1<a name="line.113"></a> +<span class="sourceLineNo">114</span> * A String that will be encoded and compared.<a name="line.114"></a> +<span class="sourceLineNo">115</span> * @param s2<a name="line.115"></a> +<span class="sourceLineNo">116</span> * A String that will be encoded and compared.<a name="line.116"></a> +<span class="sourceLineNo">117</span> * @return The number of characters in the two encoded Strings that are the<a name="line.117"></a> +<span class="sourceLineNo">118</span> * same from 0 to to the length of the shortest encoded String.<a name="line.118"></a> +<span class="sourceLineNo">119</span> *<a name="line.119"></a> +<span class="sourceLineNo">120</span> * @see SoundexUtils#difference(StringEncoder,String,String)<a name="line.120"></a> +<span class="sourceLineNo">121</span> * @see <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp"><a name="line.121"></a> +<span class="sourceLineNo">122</span> * MS T-SQL DIFFERENCE</a><a name="line.122"></a> +<span class="sourceLineNo">123</span> *<a name="line.123"></a> +<span class="sourceLineNo">124</span> * @throws EncoderException<a name="line.124"></a> +<span class="sourceLineNo">125</span> * if an error occurs encoding one of the strings<a name="line.125"></a> +<span class="sourceLineNo">126</span> * @since 1.3<a name="line.126"></a> +<span class="sourceLineNo">127</span> */<a name="line.127"></a> +<span class="sourceLineNo">128</span> public int difference(final String s1, final String s2) throws EncoderException {<a name="line.128"></a> +<span class="sourceLineNo">129</span> return SoundexUtils.difference(this, s1, s2);<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> /**<a name="line.132"></a> +<span class="sourceLineNo">133</span> * Encodes an Object using the refined soundex algorithm. This method is<a name="line.133"></a> +<span class="sourceLineNo">134</span> * provided in order to satisfy the requirements of the Encoder interface,<a name="line.134"></a> +<span class="sourceLineNo">135</span> * and will throw an EncoderException if the supplied object is not of type<a name="line.135"></a> +<span class="sourceLineNo">136</span> * java.lang.String.<a name="line.136"></a> +<span class="sourceLineNo">137</span> *<a name="line.137"></a> +<span class="sourceLineNo">138</span> * @param obj<a name="line.138"></a> +<span class="sourceLineNo">139</span> * Object to encode<a name="line.139"></a> +<span class="sourceLineNo">140</span> * @return An object (or type java.lang.String) containing the refined<a name="line.140"></a> +<span class="sourceLineNo">141</span> * soundex code which corresponds to the String supplied.<a name="line.141"></a> +<span class="sourceLineNo">142</span> * @throws EncoderException<a name="line.142"></a> +<span class="sourceLineNo">143</span> * if the parameter supplied is not of type java.lang.String<a name="line.143"></a> +<span class="sourceLineNo">144</span> */<a name="line.144"></a> +<span class="sourceLineNo">145</span> @Override<a name="line.145"></a> +<span class="sourceLineNo">146</span> public Object encode(final Object obj) throws EncoderException {<a name="line.146"></a> +<span class="sourceLineNo">147</span> if (!(obj instanceof String)) {<a name="line.147"></a> +<span class="sourceLineNo">148</span> throw new EncoderException("Parameter supplied to RefinedSoundex encode is not of type java.lang.String");<a name="line.148"></a> +<span class="sourceLineNo">149</span> }<a name="line.149"></a> +<span class="sourceLineNo">150</span> return soundex((String) obj);<a name="line.150"></a> +<span class="sourceLineNo">151</span> }<a name="line.151"></a> +<span class="sourceLineNo">152</span><a name="line.152"></a> +<span class="sourceLineNo">153</span> /**<a name="line.153"></a> +<span class="sourceLineNo">154</span> * Encodes a String using the refined soundex algorithm.<a name="line.154"></a> +<span class="sourceLineNo">155</span> *<a name="line.155"></a> +<span class="sourceLineNo">156</span> * @param str<a name="line.156"></a> +<span class="sourceLineNo">157</span> * A String object to encode<a name="line.157"></a> +<span class="sourceLineNo">158</span> * @return A Soundex code corresponding to the String supplied<a name="line.158"></a> +<span class="sourceLineNo">159</span> */<a name="line.159"></a> +<span class="sourceLineNo">160</span> @Override<a name="line.160"></a> +<span class="sourceLineNo">161</span> public String encode(final String str) {<a name="line.161"></a> +<span class="sourceLineNo">162</span> return soundex(str);<a name="line.162"></a> +<span class="sourceLineNo">163</span> }<a name="line.163"></a> +<span class="sourceLineNo">164</span><a name="line.164"></a> +<span class="sourceLineNo">165</span> /**<a name="line.165"></a> +<span class="sourceLineNo">166</span> * Returns the mapping code for a given character. The mapping codes are<a name="line.166"></a> +<span class="sourceLineNo">167</span> * maintained in an internal char array named soundexMapping, and the<a name="line.167"></a> +<span class="sourceLineNo">168</span> * default values of these mappings are US English.<a name="line.168"></a> +<span class="sourceLineNo">169</span> *<a name="line.169"></a> +<span class="sourceLineNo">170</span> * @param c<a name="line.170"></a> +<span class="sourceLineNo">171</span> * char to get mapping for<a name="line.171"></a> +<span class="sourceLineNo">172</span> * @return A character (really a numeral) to return for the given char<a name="line.172"></a> +<span class="sourceLineNo">173</span> */<a name="line.173"></a> +<span class="sourceLineNo">174</span> char getMappingCode(final char c) {<a name="line.174"></a> +<span class="sourceLineNo">175</span> if (!Character.isLetter(c)) {<a name="line.175"></a> +<span class="sourceLineNo">176</span> return 0;<a name="line.176"></a> +<span class="sourceLineNo">177</span> }<a name="line.177"></a> +<span class="sourceLineNo">178</span> return this.soundexMapping[Character.toUpperCase(c) - 'A'];<a name="line.178"></a> +<span class="sourceLineNo">179</span> }<a name="line.179"></a> +<span class="sourceLineNo">180</span><a name="line.180"></a> +<span class="sourceLineNo">181</span> /**<a name="line.181"></a> +<span class="sourceLineNo">182</span> * Retrieves the Refined Soundex code for a given String object.<a name="line.182"></a> +<span class="sourceLineNo">183</span> *<a name="line.183"></a> +<span class="sourceLineNo">184</span> * @param str<a name="line.184"></a> +<span class="sourceLineNo">185</span> * String to encode using the Refined Soundex algorithm<a name="line.185"></a> +<span class="sourceLineNo">186</span> * @return A soundex code for the String supplied<a name="line.186"></a> +<span class="sourceLineNo">187</span> */<a name="line.187"></a> +<span class="sourceLineNo">188</span> public String soundex(String str) {<a name="line.188"></a> +<span class="sourceLineNo">189</span> if (str == null) {<a name="line.189"></a> +<span class="sourceLineNo">190</span> return null;<a name="line.190"></a> +<span class="sourceLineNo">191</span> }<a name="line.191"></a> +<span class="sourceLineNo">192</span> str = SoundexUtils.clean(str);<a name="line.192"></a> +<span class="sourceLineNo">193</span> if (str.length() == 0) {<a name="line.193"></a> +<span class="sourceLineNo">194</span> return str;<a name="line.194"></a> +<span class="sourceLineNo">195</span> }<a name="line.195"></a> +<span class="sourceLineNo">196</span><a name="line.196"></a> +<span class="sourceLineNo">197</span> final StringBuilder sBuf = new StringBuilder();<a name="line.197"></a> +<span class="sourceLineNo">198</span> sBuf.append(str.charAt(0));<a name="line.198"></a> +<span class="sourceLineNo">199</span><a name="line.199"></a> +<span class="sourceLineNo">200</span> char last, current;<a name="line.200"></a> +<span class="sourceLineNo">201</span> last = '*';<a name="line.201"></a> +<span class="sourceLineNo">202</span><a name="line.202"></a> +<span class="sourceLineNo">203</span> for (int i = 0; i < str.length(); i++) {<a name="line.203"></a> +<span class="sourceLineNo">204</span><a name="line.204"></a> +<span class="sourceLineNo">205</span> current = getMappingCode(str.charAt(i));<a name="line.205"></a> +<span class="sourceLineNo">206</span> if (current == last) {<a name="line.206"></a> +<span class="sourceLineNo">207</span> continue;<a name="line.207"></a> +<span class="sourceLineNo">208</span> } else if (current != 0) {<a name="line.208"></a> +<span class="sourceLineNo">209</span> sBuf.append(current);<a name="line.209"></a> +<span class="sourceLineNo">210</span> }<a name="line.210"></a> +<span class="sourceLineNo">211</span><a name="line.211"></a> +<span class="sourceLineNo">212</span> last = current;<a name="line.212"></a> +<span class="sourceLineNo">213</span><a name="line.213"></a> +<span class="sourceLineNo">214</span> }<a name="line.214"></a> +<span class="sourceLineNo">215</span><a name="line.215"></a> +<span class="sourceLineNo">216</span> return sBuf.toString();<a name="line.216"></a> +<span class="sourceLineNo">217</span> }<a name="line.217"></a> +<span class="sourceLineNo">218</span>}<a name="line.218"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Soundex.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Soundex.html new file mode 100644 index 0000000000000000000000000000000000000000..60f970f8801e619937c928859b43e56d56b7adad --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/Soundex.html @@ -0,0 +1,405 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.EncoderException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import org.apache.commons.codec.StringEncoder;<a name="line.21"></a> +<span class="sourceLineNo">022</span><a name="line.22"></a> +<span class="sourceLineNo">023</span>/**<a name="line.23"></a> +<span class="sourceLineNo">024</span> * Encodes a string into a Soundex value. Soundex is an encoding used to relate similar names, but can also be used as a<a name="line.24"></a> +<span class="sourceLineNo">025</span> * general purpose scheme to find word with similar phonemes.<a name="line.25"></a> +<span class="sourceLineNo">026</span> *<a name="line.26"></a> +<span class="sourceLineNo">027</span> * <p>This class is thread-safe.<a name="line.27"></a> +<span class="sourceLineNo">028</span> * Although not strictly immutable, the mutable fields are not actually used.</p><a name="line.28"></a> +<span class="sourceLineNo">029</span> */<a name="line.29"></a> +<span class="sourceLineNo">030</span>public class Soundex implements StringEncoder {<a name="line.30"></a> +<span class="sourceLineNo">031</span><a name="line.31"></a> +<span class="sourceLineNo">032</span> /**<a name="line.32"></a> +<span class="sourceLineNo">033</span> * The marker character used to indicate a silent (ignored) character.<a name="line.33"></a> +<span class="sourceLineNo">034</span> * These are ignored except when they appear as the first character.<a name="line.34"></a> +<span class="sourceLineNo">035</span> * <p><a name="line.35"></a> +<span class="sourceLineNo">036</span> * Note: the {@link #US_ENGLISH_MAPPING_STRING} does not use this mechanism<a name="line.36"></a> +<span class="sourceLineNo">037</span> * because changing it might break existing code. Mappings that don't contain<a name="line.37"></a> +<span class="sourceLineNo">038</span> * a silent marker code are treated as though H and W are silent.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * To override this, use the {@link #Soundex(String, boolean)} constructor.<a name="line.40"></a> +<span class="sourceLineNo">041</span> * @since 1.11<a name="line.41"></a> +<span class="sourceLineNo">042</span> */<a name="line.42"></a> +<span class="sourceLineNo">043</span> public static final char SILENT_MARKER = '-';<a name="line.43"></a> +<span class="sourceLineNo">044</span><a name="line.44"></a> +<span class="sourceLineNo">045</span> /**<a name="line.45"></a> +<span class="sourceLineNo">046</span> * This is a default mapping of the 26 letters used in US English. A value of {@code 0} for a letter position<a name="line.46"></a> +<span class="sourceLineNo">047</span> * means do not encode, but treat as a separator when it occurs between consonants with the same code.<a name="line.47"></a> +<span class="sourceLineNo">048</span> * <p><a name="line.48"></a> +<span class="sourceLineNo">049</span> * (This constant is provided as both an implementation convenience and to allow Javadoc to pick<a name="line.49"></a> +<span class="sourceLineNo">050</span> * up the value for the constant values page.)<a name="line.50"></a> +<span class="sourceLineNo">051</span> * <p><a name="line.51"></a> +<span class="sourceLineNo">052</span> * <b>Note that letters H and W are treated specially.</b><a name="line.52"></a> +<span class="sourceLineNo">053</span> * They are ignored (after the first letter) and don't act as separators<a name="line.53"></a> +<span class="sourceLineNo">054</span> * between consonants with the same code.<a name="line.54"></a> +<span class="sourceLineNo">055</span> */<a name="line.55"></a> +<span class="sourceLineNo">056</span> // ABCDEFGHIJKLMNOPQRSTUVWXYZ<a name="line.56"></a> +<span class="sourceLineNo">057</span> public static final String US_ENGLISH_MAPPING_STRING = "01230120022455012623010202";<a name="line.57"></a> +<span class="sourceLineNo">058</span><a name="line.58"></a> +<span class="sourceLineNo">059</span> /**<a name="line.59"></a> +<span class="sourceLineNo">060</span> * This is a default mapping of the 26 letters used in US English. A value of {@code 0} for a letter position<a name="line.60"></a> +<span class="sourceLineNo">061</span> * means do not encode.<a name="line.61"></a> +<span class="sourceLineNo">062</span> *<a name="line.62"></a> +<span class="sourceLineNo">063</span> * @see Soundex#Soundex(char[])<a name="line.63"></a> +<span class="sourceLineNo">064</span> */<a name="line.64"></a> +<span class="sourceLineNo">065</span> private static final char[] US_ENGLISH_MAPPING = US_ENGLISH_MAPPING_STRING.toCharArray();<a name="line.65"></a> +<span class="sourceLineNo">066</span><a name="line.66"></a> +<span class="sourceLineNo">067</span> /**<a name="line.67"></a> +<span class="sourceLineNo">068</span> * An instance of Soundex using the US_ENGLISH_MAPPING mapping.<a name="line.68"></a> +<span class="sourceLineNo">069</span> * This treats H and W as silent letters.<a name="line.69"></a> +<span class="sourceLineNo">070</span> * Apart from when they appear as the first letter, they are ignored.<a name="line.70"></a> +<span class="sourceLineNo">071</span> * They don't act as separators between duplicate codes.<a name="line.71"></a> +<span class="sourceLineNo">072</span> *<a name="line.72"></a> +<span class="sourceLineNo">073</span> * @see #US_ENGLISH_MAPPING_STRING<a name="line.73"></a> +<span class="sourceLineNo">074</span> */<a name="line.74"></a> +<span class="sourceLineNo">075</span> public static final Soundex US_ENGLISH = new Soundex();<a name="line.75"></a> +<span class="sourceLineNo">076</span><a name="line.76"></a> +<span class="sourceLineNo">077</span> /**<a name="line.77"></a> +<span class="sourceLineNo">078</span> * An instance of Soundex using the Simplified Soundex mapping, as described here:<a name="line.78"></a> +<span class="sourceLineNo">079</span> * http://west-penwith.org.uk/misc/soundex.htm<a name="line.79"></a> +<span class="sourceLineNo">080</span> * <p><a name="line.80"></a> +<span class="sourceLineNo">081</span> * This treats H and W the same as vowels (AEIOUY).<a name="line.81"></a> +<span class="sourceLineNo">082</span> * Such letters aren't encoded (after the first), but they do<a name="line.82"></a> +<span class="sourceLineNo">083</span> * act as separators when dropping duplicate codes.<a name="line.83"></a> +<span class="sourceLineNo">084</span> * The mapping is otherwise the same as for {@link #US_ENGLISH}<a name="line.84"></a> +<span class="sourceLineNo">085</span> * <p><a name="line.85"></a> +<span class="sourceLineNo">086</span> * @since 1.11<a name="line.86"></a> +<span class="sourceLineNo">087</span> */<a name="line.87"></a> +<span class="sourceLineNo">088</span> public static final Soundex US_ENGLISH_SIMPLIFIED = new Soundex(US_ENGLISH_MAPPING_STRING, false);<a name="line.88"></a> +<span class="sourceLineNo">089</span><a name="line.89"></a> +<span class="sourceLineNo">090</span> /**<a name="line.90"></a> +<span class="sourceLineNo">091</span> * An instance of Soundex using the mapping as per the Genealogy site:<a name="line.91"></a> +<span class="sourceLineNo">092</span> * http://www.genealogy.com/articles/research/00000060.html<a name="line.92"></a> +<span class="sourceLineNo">093</span> * <p><a name="line.93"></a> +<span class="sourceLineNo">094</span> * This treats vowels (AEIOUY), H and W as silent letters.<a name="line.94"></a> +<span class="sourceLineNo">095</span> * Such letters are ignored (after the first) and do not<a name="line.95"></a> +<span class="sourceLineNo">096</span> * act as separators when dropping duplicate codes.<a name="line.96"></a> +<span class="sourceLineNo">097</span> * <p><a name="line.97"></a> +<span class="sourceLineNo">098</span> * The codes for consonants are otherwise the same as for<a name="line.98"></a> +<span class="sourceLineNo">099</span> * {@link #US_ENGLISH_MAPPING_STRING} and {@link #US_ENGLISH_SIMPLIFIED}<a name="line.99"></a> +<span class="sourceLineNo">100</span> *<a name="line.100"></a> +<span class="sourceLineNo">101</span> * @since 1.11<a name="line.101"></a> +<span class="sourceLineNo">102</span> */<a name="line.102"></a> +<span class="sourceLineNo">103</span> public static final Soundex US_ENGLISH_GENEALOGY = new Soundex("-123-12--22455-12623-1-2-2");<a name="line.103"></a> +<span class="sourceLineNo">104</span> // ABCDEFGHIJKLMNOPQRSTUVWXYZ<a name="line.104"></a> +<span class="sourceLineNo">105</span><a name="line.105"></a> +<span class="sourceLineNo">106</span> /**<a name="line.106"></a> +<span class="sourceLineNo">107</span> * The maximum length of a Soundex code - Soundex codes are only four characters by definition.<a name="line.107"></a> +<span class="sourceLineNo">108</span> *<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @deprecated This feature is not needed since the encoding size must be constant. Will be removed in 2.0.<a name="line.109"></a> +<span class="sourceLineNo">110</span> */<a name="line.110"></a> +<span class="sourceLineNo">111</span> @Deprecated<a name="line.111"></a> +<span class="sourceLineNo">112</span> private int maxLength = 4;<a name="line.112"></a> +<span class="sourceLineNo">113</span><a name="line.113"></a> +<span class="sourceLineNo">114</span> /**<a name="line.114"></a> +<span class="sourceLineNo">115</span> * Every letter of the alphabet is "mapped" to a numerical value. This char array holds the values to which each<a name="line.115"></a> +<span class="sourceLineNo">116</span> * letter is mapped. This implementation contains a default map for US_ENGLISH<a name="line.116"></a> +<span class="sourceLineNo">117</span> */<a name="line.117"></a> +<span class="sourceLineNo">118</span> private final char[] soundexMapping;<a name="line.118"></a> +<span class="sourceLineNo">119</span><a name="line.119"></a> +<span class="sourceLineNo">120</span> /**<a name="line.120"></a> +<span class="sourceLineNo">121</span> * Should H and W be treated specially?<a name="line.121"></a> +<span class="sourceLineNo">122</span> * <p><a name="line.122"></a> +<span class="sourceLineNo">123</span> * In versions of the code prior to 1.11,<a name="line.123"></a> +<span class="sourceLineNo">124</span> * the code always treated H and W as silent (ignored) letters.<a name="line.124"></a> +<span class="sourceLineNo">125</span> * If this field is false, H and W are no longer special-cased.<a name="line.125"></a> +<span class="sourceLineNo">126</span> */<a name="line.126"></a> +<span class="sourceLineNo">127</span> private final boolean specialCaseHW;<a name="line.127"></a> +<span class="sourceLineNo">128</span><a name="line.128"></a> +<span class="sourceLineNo">129</span> /**<a name="line.129"></a> +<span class="sourceLineNo">130</span> * Creates an instance using US_ENGLISH_MAPPING<a name="line.130"></a> +<span class="sourceLineNo">131</span> *<a name="line.131"></a> +<span class="sourceLineNo">132</span> * @see Soundex#Soundex(char[])<a name="line.132"></a> +<span class="sourceLineNo">133</span> * @see Soundex#US_ENGLISH_MAPPING_STRING<a name="line.133"></a> +<span class="sourceLineNo">134</span> */<a name="line.134"></a> +<span class="sourceLineNo">135</span> public Soundex() {<a name="line.135"></a> +<span class="sourceLineNo">136</span> this.soundexMapping = US_ENGLISH_MAPPING;<a name="line.136"></a> +<span class="sourceLineNo">137</span> this.specialCaseHW = true;<a name="line.137"></a> +<span class="sourceLineNo">138</span> }<a name="line.138"></a> +<span class="sourceLineNo">139</span><a name="line.139"></a> +<span class="sourceLineNo">140</span> /**<a name="line.140"></a> +<span class="sourceLineNo">141</span> * Creates a soundex instance using the given mapping. This constructor can be used to provide an internationalized<a name="line.141"></a> +<span class="sourceLineNo">142</span> * mapping for a non-Western character set.<a name="line.142"></a> +<span class="sourceLineNo">143</span> *<a name="line.143"></a> +<span class="sourceLineNo">144</span> * Every letter of the alphabet is "mapped" to a numerical value. This char array holds the values to which each<a name="line.144"></a> +<span class="sourceLineNo">145</span> * letter is mapped. This implementation contains a default map for US_ENGLISH<a name="line.145"></a> +<span class="sourceLineNo">146</span> * <p><a name="line.146"></a> +<span class="sourceLineNo">147</span> * If the mapping contains an instance of {@link #SILENT_MARKER} then H and W are not given special treatment<a name="line.147"></a> +<span class="sourceLineNo">148</span> *<a name="line.148"></a> +<span class="sourceLineNo">149</span> * @param mapping<a name="line.149"></a> +<span class="sourceLineNo">150</span> * Mapping array to use when finding the corresponding code for a given character<a name="line.150"></a> +<span class="sourceLineNo">151</span> */<a name="line.151"></a> +<span class="sourceLineNo">152</span> public Soundex(final char[] mapping) {<a name="line.152"></a> +<span class="sourceLineNo">153</span> this.soundexMapping = new char[mapping.length];<a name="line.153"></a> +<span class="sourceLineNo">154</span> System.arraycopy(mapping, 0, this.soundexMapping, 0, mapping.length);<a name="line.154"></a> +<span class="sourceLineNo">155</span> this.specialCaseHW = !hasMarker(this.soundexMapping);<a name="line.155"></a> +<span class="sourceLineNo">156</span> }<a name="line.156"></a> +<span class="sourceLineNo">157</span><a name="line.157"></a> +<span class="sourceLineNo">158</span> private boolean hasMarker(final char[] mapping) {<a name="line.158"></a> +<span class="sourceLineNo">159</span> for(final char ch : mapping) {<a name="line.159"></a> +<span class="sourceLineNo">160</span> if (ch == SILENT_MARKER) {<a name="line.160"></a> +<span class="sourceLineNo">161</span> return true;<a name="line.161"></a> +<span class="sourceLineNo">162</span> }<a name="line.162"></a> +<span class="sourceLineNo">163</span> }<a name="line.163"></a> +<span class="sourceLineNo">164</span> return false;<a name="line.164"></a> +<span class="sourceLineNo">165</span> }<a name="line.165"></a> +<span class="sourceLineNo">166</span><a name="line.166"></a> +<span class="sourceLineNo">167</span> /**<a name="line.167"></a> +<span class="sourceLineNo">168</span> * Creates a refined soundex instance using a custom mapping. This constructor can be used to customize the mapping,<a name="line.168"></a> +<span class="sourceLineNo">169</span> * and/or possibly provide an internationalized mapping for a non-Western character set.<a name="line.169"></a> +<span class="sourceLineNo">170</span> * <p><a name="line.170"></a> +<span class="sourceLineNo">171</span> * If the mapping contains an instance of {@link #SILENT_MARKER} then H and W are not given special treatment<a name="line.171"></a> +<span class="sourceLineNo">172</span> *<a name="line.172"></a> +<span class="sourceLineNo">173</span> * @param mapping<a name="line.173"></a> +<span class="sourceLineNo">174</span> * Mapping string to use when finding the corresponding code for a given character<a name="line.174"></a> +<span class="sourceLineNo">175</span> * @since 1.4<a name="line.175"></a> +<span class="sourceLineNo">176</span> */<a name="line.176"></a> +<span class="sourceLineNo">177</span> public Soundex(final String mapping) {<a name="line.177"></a> +<span class="sourceLineNo">178</span> this.soundexMapping = mapping.toCharArray();<a name="line.178"></a> +<span class="sourceLineNo">179</span> this.specialCaseHW = !hasMarker(this.soundexMapping);<a name="line.179"></a> +<span class="sourceLineNo">180</span> }<a name="line.180"></a> +<span class="sourceLineNo">181</span><a name="line.181"></a> +<span class="sourceLineNo">182</span> /**<a name="line.182"></a> +<span class="sourceLineNo">183</span> * Creates a refined soundex instance using a custom mapping. This constructor can be used to customize the mapping,<a name="line.183"></a> +<span class="sourceLineNo">184</span> * and/or possibly provide an internationalized mapping for a non-Western character set.<a name="line.184"></a> +<span class="sourceLineNo">185</span> *<a name="line.185"></a> +<span class="sourceLineNo">186</span> * @param mapping<a name="line.186"></a> +<span class="sourceLineNo">187</span> * Mapping string to use when finding the corresponding code for a given character<a name="line.187"></a> +<span class="sourceLineNo">188</span> * @param specialCaseHW if true, then<a name="line.188"></a> +<span class="sourceLineNo">189</span> * @since 1.11<a name="line.189"></a> +<span class="sourceLineNo">190</span> */<a name="line.190"></a> +<span class="sourceLineNo">191</span> public Soundex(final String mapping, final boolean specialCaseHW) {<a name="line.191"></a> +<span class="sourceLineNo">192</span> this.soundexMapping = mapping.toCharArray();<a name="line.192"></a> +<span class="sourceLineNo">193</span> this.specialCaseHW = specialCaseHW;<a name="line.193"></a> +<span class="sourceLineNo">194</span> }<a name="line.194"></a> +<span class="sourceLineNo">195</span><a name="line.195"></a> +<span class="sourceLineNo">196</span> /**<a name="line.196"></a> +<span class="sourceLineNo">197</span> * Encodes the Strings and returns the number of characters in the two encoded Strings that are the same. This<a name="line.197"></a> +<span class="sourceLineNo">198</span> * return value ranges from 0 through 4: 0 indicates little or no similarity, and 4 indicates strong similarity or<a name="line.198"></a> +<span class="sourceLineNo">199</span> * identical values.<a name="line.199"></a> +<span class="sourceLineNo">200</span> *<a name="line.200"></a> +<span class="sourceLineNo">201</span> * @param s1<a name="line.201"></a> +<span class="sourceLineNo">202</span> * A String that will be encoded and compared.<a name="line.202"></a> +<span class="sourceLineNo">203</span> * @param s2<a name="line.203"></a> +<span class="sourceLineNo">204</span> * A String that will be encoded and compared.<a name="line.204"></a> +<span class="sourceLineNo">205</span> * @return The number of characters in the two encoded Strings that are the same from 0 to 4.<a name="line.205"></a> +<span class="sourceLineNo">206</span> *<a name="line.206"></a> +<span class="sourceLineNo">207</span> * @see SoundexUtils#difference(StringEncoder,String,String)<a name="line.207"></a> +<span class="sourceLineNo">208</span> * @see <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp"> MS<a name="line.208"></a> +<span class="sourceLineNo">209</span> * T-SQL DIFFERENCE </a><a name="line.209"></a> +<span class="sourceLineNo">210</span> *<a name="line.210"></a> +<span class="sourceLineNo">211</span> * @throws EncoderException<a name="line.211"></a> +<span class="sourceLineNo">212</span> * if an error occurs encoding one of the strings<a name="line.212"></a> +<span class="sourceLineNo">213</span> * @since 1.3<a name="line.213"></a> +<span class="sourceLineNo">214</span> */<a name="line.214"></a> +<span class="sourceLineNo">215</span> public int difference(final String s1, final String s2) throws EncoderException {<a name="line.215"></a> +<span class="sourceLineNo">216</span> return SoundexUtils.difference(this, s1, s2);<a name="line.216"></a> +<span class="sourceLineNo">217</span> }<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> /**<a name="line.219"></a> +<span class="sourceLineNo">220</span> * Encodes an Object using the soundex algorithm. This method is provided in order to satisfy the requirements of<a name="line.220"></a> +<span class="sourceLineNo">221</span> * the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.<a name="line.221"></a> +<span class="sourceLineNo">222</span> *<a name="line.222"></a> +<span class="sourceLineNo">223</span> * @param obj<a name="line.223"></a> +<span class="sourceLineNo">224</span> * Object to encode<a name="line.224"></a> +<span class="sourceLineNo">225</span> * @return An object (or type java.lang.String) containing the soundex code which corresponds to the String<a name="line.225"></a> +<span class="sourceLineNo">226</span> * supplied.<a name="line.226"></a> +<span class="sourceLineNo">227</span> * @throws EncoderException<a name="line.227"></a> +<span class="sourceLineNo">228</span> * if the parameter supplied is not of type java.lang.String<a name="line.228"></a> +<span class="sourceLineNo">229</span> * @throws IllegalArgumentException<a name="line.229"></a> +<span class="sourceLineNo">230</span> * if a character is not mapped<a name="line.230"></a> +<span class="sourceLineNo">231</span> */<a name="line.231"></a> +<span class="sourceLineNo">232</span> @Override<a name="line.232"></a> +<span class="sourceLineNo">233</span> public Object encode(final Object obj) throws EncoderException {<a name="line.233"></a> +<span class="sourceLineNo">234</span> if (!(obj instanceof String)) {<a name="line.234"></a> +<span class="sourceLineNo">235</span> throw new EncoderException("Parameter supplied to Soundex encode is not of type java.lang.String");<a name="line.235"></a> +<span class="sourceLineNo">236</span> }<a name="line.236"></a> +<span class="sourceLineNo">237</span> return soundex((String) obj);<a name="line.237"></a> +<span class="sourceLineNo">238</span> }<a name="line.238"></a> +<span class="sourceLineNo">239</span><a name="line.239"></a> +<span class="sourceLineNo">240</span> /**<a name="line.240"></a> +<span class="sourceLineNo">241</span> * Encodes a String using the soundex algorithm.<a name="line.241"></a> +<span class="sourceLineNo">242</span> *<a name="line.242"></a> +<span class="sourceLineNo">243</span> * @param str<a name="line.243"></a> +<span class="sourceLineNo">244</span> * A String object to encode<a name="line.244"></a> +<span class="sourceLineNo">245</span> * @return A Soundex code corresponding to the String supplied<a name="line.245"></a> +<span class="sourceLineNo">246</span> * @throws IllegalArgumentException<a name="line.246"></a> +<span class="sourceLineNo">247</span> * if a character is not mapped<a name="line.247"></a> +<span class="sourceLineNo">248</span> */<a name="line.248"></a> +<span class="sourceLineNo">249</span> @Override<a name="line.249"></a> +<span class="sourceLineNo">250</span> public String encode(final String str) {<a name="line.250"></a> +<span class="sourceLineNo">251</span> return soundex(str);<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span><a name="line.253"></a> +<span class="sourceLineNo">254</span> /**<a name="line.254"></a> +<span class="sourceLineNo">255</span> * Returns the maxLength. Standard Soundex<a name="line.255"></a> +<span class="sourceLineNo">256</span> *<a name="line.256"></a> +<span class="sourceLineNo">257</span> * @deprecated This feature is not needed since the encoding size must be constant. Will be removed in 2.0.<a name="line.257"></a> +<span class="sourceLineNo">258</span> * @return int<a name="line.258"></a> +<span class="sourceLineNo">259</span> */<a name="line.259"></a> +<span class="sourceLineNo">260</span> @Deprecated<a name="line.260"></a> +<span class="sourceLineNo">261</span> public int getMaxLength() {<a name="line.261"></a> +<span class="sourceLineNo">262</span> return this.maxLength;<a name="line.262"></a> +<span class="sourceLineNo">263</span> }<a name="line.263"></a> +<span class="sourceLineNo">264</span><a name="line.264"></a> +<span class="sourceLineNo">265</span> /**<a name="line.265"></a> +<span class="sourceLineNo">266</span> * Maps the given upper-case character to its Soundex code.<a name="line.266"></a> +<span class="sourceLineNo">267</span> *<a name="line.267"></a> +<span class="sourceLineNo">268</span> * @param ch<a name="line.268"></a> +<span class="sourceLineNo">269</span> * An upper-case character.<a name="line.269"></a> +<span class="sourceLineNo">270</span> * @return A Soundex code.<a name="line.270"></a> +<span class="sourceLineNo">271</span> * @throws IllegalArgumentException<a name="line.271"></a> +<span class="sourceLineNo">272</span> * Thrown if {@code ch} is not mapped.<a name="line.272"></a> +<span class="sourceLineNo">273</span> */<a name="line.273"></a> +<span class="sourceLineNo">274</span> private char map(final char ch) {<a name="line.274"></a> +<span class="sourceLineNo">275</span> final int index = ch - 'A';<a name="line.275"></a> +<span class="sourceLineNo">276</span> if (index < 0 || index >= this.soundexMapping.length) {<a name="line.276"></a> +<span class="sourceLineNo">277</span> throw new IllegalArgumentException("The character is not mapped: " + ch + " (index=" + index + ")");<a name="line.277"></a> +<span class="sourceLineNo">278</span> }<a name="line.278"></a> +<span class="sourceLineNo">279</span> return this.soundexMapping[index];<a name="line.279"></a> +<span class="sourceLineNo">280</span> }<a name="line.280"></a> +<span class="sourceLineNo">281</span><a name="line.281"></a> +<span class="sourceLineNo">282</span> /**<a name="line.282"></a> +<span class="sourceLineNo">283</span> * Sets the maxLength.<a name="line.283"></a> +<span class="sourceLineNo">284</span> *<a name="line.284"></a> +<span class="sourceLineNo">285</span> * @deprecated This feature is not needed since the encoding size must be constant. Will be removed in 2.0.<a name="line.285"></a> +<span class="sourceLineNo">286</span> * @param maxLength<a name="line.286"></a> +<span class="sourceLineNo">287</span> * The maxLength to set<a name="line.287"></a> +<span class="sourceLineNo">288</span> */<a name="line.288"></a> +<span class="sourceLineNo">289</span> @Deprecated<a name="line.289"></a> +<span class="sourceLineNo">290</span> public void setMaxLength(final int maxLength) {<a name="line.290"></a> +<span class="sourceLineNo">291</span> this.maxLength = maxLength;<a name="line.291"></a> +<span class="sourceLineNo">292</span> }<a name="line.292"></a> +<span class="sourceLineNo">293</span><a name="line.293"></a> +<span class="sourceLineNo">294</span> /**<a name="line.294"></a> +<span class="sourceLineNo">295</span> * Retrieves the Soundex code for a given String object.<a name="line.295"></a> +<span class="sourceLineNo">296</span> *<a name="line.296"></a> +<span class="sourceLineNo">297</span> * @param str<a name="line.297"></a> +<span class="sourceLineNo">298</span> * String to encode using the Soundex algorithm<a name="line.298"></a> +<span class="sourceLineNo">299</span> * @return A soundex code for the String supplied<a name="line.299"></a> +<span class="sourceLineNo">300</span> * @throws IllegalArgumentException<a name="line.300"></a> +<span class="sourceLineNo">301</span> * if a character is not mapped<a name="line.301"></a> +<span class="sourceLineNo">302</span> */<a name="line.302"></a> +<span class="sourceLineNo">303</span> public String soundex(String str) {<a name="line.303"></a> +<span class="sourceLineNo">304</span> if (str == null) {<a name="line.304"></a> +<span class="sourceLineNo">305</span> return null;<a name="line.305"></a> +<span class="sourceLineNo">306</span> }<a name="line.306"></a> +<span class="sourceLineNo">307</span> str = SoundexUtils.clean(str);<a name="line.307"></a> +<span class="sourceLineNo">308</span> if (str.length() == 0) {<a name="line.308"></a> +<span class="sourceLineNo">309</span> return str;<a name="line.309"></a> +<span class="sourceLineNo">310</span> }<a name="line.310"></a> +<span class="sourceLineNo">311</span> final char out[] = {'0', '0', '0', '0'};<a name="line.311"></a> +<span class="sourceLineNo">312</span> int count = 0;<a name="line.312"></a> +<span class="sourceLineNo">313</span> final char first = str.charAt(0);<a name="line.313"></a> +<span class="sourceLineNo">314</span> out[count++] = first;<a name="line.314"></a> +<span class="sourceLineNo">315</span> char lastDigit = map(first); // previous digit<a name="line.315"></a> +<span class="sourceLineNo">316</span> for(int i = 1; i < str.length() && count < out.length ; i++) {<a name="line.316"></a> +<span class="sourceLineNo">317</span> final char ch = str.charAt(i);<a name="line.317"></a> +<span class="sourceLineNo">318</span> if ((this.specialCaseHW) && (ch == 'H' || ch == 'W')) { // these are ignored completely<a name="line.318"></a> +<span class="sourceLineNo">319</span> continue;<a name="line.319"></a> +<span class="sourceLineNo">320</span> }<a name="line.320"></a> +<span class="sourceLineNo">321</span> final char digit = map(ch);<a name="line.321"></a> +<span class="sourceLineNo">322</span> if (digit == SILENT_MARKER) {<a name="line.322"></a> +<span class="sourceLineNo">323</span> continue;<a name="line.323"></a> +<span class="sourceLineNo">324</span> }<a name="line.324"></a> +<span class="sourceLineNo">325</span> if (digit != '0' && digit != lastDigit) { // don't store vowels or repeats<a name="line.325"></a> +<span class="sourceLineNo">326</span> out[count++] = digit;<a name="line.326"></a> +<span class="sourceLineNo">327</span> }<a name="line.327"></a> +<span class="sourceLineNo">328</span> lastDigit = digit;<a name="line.328"></a> +<span class="sourceLineNo">329</span> }<a name="line.329"></a> +<span class="sourceLineNo">330</span> return new String(out);<a name="line.330"></a> +<span class="sourceLineNo">331</span> }<a name="line.331"></a> +<span class="sourceLineNo">332</span><a name="line.332"></a> +<span class="sourceLineNo">333</span>}<a name="line.333"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/BeiderMorseEncoder.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/BeiderMorseEncoder.html new file mode 100644 index 0000000000000000000000000000000000000000..74aa5bc4030e2783181c98bf5b612dcea2d7027d --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/BeiderMorseEncoder.html @@ -0,0 +1,255 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import org.apache.commons.codec.EncoderException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import org.apache.commons.codec.StringEncoder;<a name="line.21"></a> +<span class="sourceLineNo">022</span><a name="line.22"></a> +<span class="sourceLineNo">023</span>/**<a name="line.23"></a> +<span class="sourceLineNo">024</span> * Encodes strings into their Beider-Morse phonetic encoding.<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <p><a name="line.25"></a> +<span class="sourceLineNo">026</span> * Beider-Morse phonetic encodings are optimised for family names. However, they may be useful for a wide range of<a name="line.26"></a> +<span class="sourceLineNo">027</span> * words.<a name="line.27"></a> +<span class="sourceLineNo">028</span> * <p><a name="line.28"></a> +<span class="sourceLineNo">029</span> * This encoder is intentionally mutable to allow dynamic configuration through bean properties. As such, it is mutable,<a name="line.29"></a> +<span class="sourceLineNo">030</span> * and may not be thread-safe. If you require a guaranteed thread-safe encoding then use {@link PhoneticEngine}<a name="line.30"></a> +<span class="sourceLineNo">031</span> * directly.<a name="line.31"></a> +<span class="sourceLineNo">032</span> * <p><a name="line.32"></a> +<span class="sourceLineNo">033</span> * <b>Encoding overview</b><a name="line.33"></a> +<span class="sourceLineNo">034</span> * <p><a name="line.34"></a> +<span class="sourceLineNo">035</span> * Beider-Morse phonetic encodings is a multi-step process. Firstly, a table of rules is consulted to guess what<a name="line.35"></a> +<span class="sourceLineNo">036</span> * language the word comes from. For example, if it ends in "{@code ault}" then it infers that the word is French.<a name="line.36"></a> +<span class="sourceLineNo">037</span> * Next, the word is translated into a phonetic representation using a language-specific phonetics table. Some runs of<a name="line.37"></a> +<span class="sourceLineNo">038</span> * letters can be pronounced in multiple ways, and a single run of letters may be potentially broken up into phonemes at<a name="line.38"></a> +<span class="sourceLineNo">039</span> * different places, so this stage results in a set of possible language-specific phonetic representations. Lastly, this<a name="line.39"></a> +<span class="sourceLineNo">040</span> * language-specific phonetic representation is processed by a table of rules that re-writes it phonetically taking into<a name="line.40"></a> +<span class="sourceLineNo">041</span> * account systematic pronunciation differences between languages, to move it towards a pan-indo-european phonetic<a name="line.41"></a> +<span class="sourceLineNo">042</span> * representation. Again, sometimes there are multiple ways this could be done and sometimes things that can be<a name="line.42"></a> +<span class="sourceLineNo">043</span> * pronounced in several ways in the source language have only one way to represent them in this average phonetic<a name="line.43"></a> +<span class="sourceLineNo">044</span> * language, so the result is again a set of phonetic spellings.<a name="line.44"></a> +<span class="sourceLineNo">045</span> * <p><a name="line.45"></a> +<span class="sourceLineNo">046</span> * Some names are treated as having multiple parts. This can be due to two things. Firstly, they may be hyphenated. In<a name="line.46"></a> +<span class="sourceLineNo">047</span> * this case, each individual hyphenated word is encoded, and then these are combined end-to-end for the final encoding.<a name="line.47"></a> +<span class="sourceLineNo">048</span> * Secondly, some names have standard prefixes, for example, "{@code Mac/Mc}" in Scottish (English) names. As<a name="line.48"></a> +<span class="sourceLineNo">049</span> * sometimes it is ambiguous whether the prefix is intended or is an accident of the spelling, the word is encoded once<a name="line.49"></a> +<span class="sourceLineNo">050</span> * with the prefix and once without it. The resulting encoding contains one and then the other result.<a name="line.50"></a> +<span class="sourceLineNo">051</span> * <p><a name="line.51"></a> +<span class="sourceLineNo">052</span> * <b>Encoding format</b><a name="line.52"></a> +<span class="sourceLineNo">053</span> * <p><a name="line.53"></a> +<span class="sourceLineNo">054</span> * Individual phonetic spellings of an input word are represented in upper- and lower-case roman characters. Where there<a name="line.54"></a> +<span class="sourceLineNo">055</span> * are multiple possible phonetic representations, these are joined with a pipe ({@code |}) character. If multiple<a name="line.55"></a> +<span class="sourceLineNo">056</span> * hyphenated words where found, or if the word may contain a name prefix, each encoded word is placed in elipses and<a name="line.56"></a> +<span class="sourceLineNo">057</span> * these blocks are then joined with hyphens. For example, "{@code d'ortley}" has a possible prefix. The form<a name="line.57"></a> +<span class="sourceLineNo">058</span> * without prefix encodes to "{@code ortlaj|ortlej}", while the form with prefix encodes to "<a name="line.58"></a> +<span class="sourceLineNo">059</span> * {@code dortlaj|dortlej}". Thus, the full, combined encoding is "{@code (ortlaj|ortlej)-(dortlaj|dortlej)}".<a name="line.59"></a> +<span class="sourceLineNo">060</span> * <p><a name="line.60"></a> +<span class="sourceLineNo">061</span> * The encoded forms are often quite a bit longer than the input strings. This is because a single input may have many<a name="line.61"></a> +<span class="sourceLineNo">062</span> * potential phonetic interpretations. For example, "{@code Renault}" encodes to "<a name="line.62"></a> +<span class="sourceLineNo">063</span> * {@code rYnDlt|rYnalt|rYnult|rinDlt|rinalt|rinult}". The {@code APPROX} rules will tend to produce larger<a name="line.63"></a> +<span class="sourceLineNo">064</span> * encodings as they consider a wider range of possible, approximate phonetic interpretations of the original word.<a name="line.64"></a> +<span class="sourceLineNo">065</span> * Down-stream applications may wish to further process the encoding for indexing or lookup purposes, for example, by<a name="line.65"></a> +<span class="sourceLineNo">066</span> * splitting on pipe ({@code |}) and indexing under each of these alternatives.<a name="line.66"></a> +<span class="sourceLineNo">067</span> * <p><a name="line.67"></a> +<span class="sourceLineNo">068</span> * <b>Note</b>: this version of the Beider-Morse encoding is equivalent with v3.4 of the reference implementation.<a name="line.68"></a> +<span class="sourceLineNo">069</span> * </p><a name="line.69"></a> +<span class="sourceLineNo">070</span> * @see <a href="http://stevemorse.org/phonetics/bmpm.htm">Beider-Morse Phonetic Matching</a><a name="line.70"></a> +<span class="sourceLineNo">071</span> * @see <a href="http://stevemorse.org/phoneticinfo.htm">Reference implementation</a><a name="line.71"></a> +<span class="sourceLineNo">072</span> *<a name="line.72"></a> +<span class="sourceLineNo">073</span> * <p><a name="line.73"></a> +<span class="sourceLineNo">074</span> * This class is Not ThreadSafe<a name="line.74"></a> +<span class="sourceLineNo">075</span> * </p><a name="line.75"></a> +<span class="sourceLineNo">076</span> * @since 1.6<a name="line.76"></a> +<span class="sourceLineNo">077</span> */<a name="line.77"></a> +<span class="sourceLineNo">078</span>public class BeiderMorseEncoder implements StringEncoder {<a name="line.78"></a> +<span class="sourceLineNo">079</span> // Implementation note: This class is a spring-friendly facade to PhoneticEngine. It allows read/write configuration<a name="line.79"></a> +<span class="sourceLineNo">080</span> // of an immutable PhoneticEngine instance that will be delegated to for the actual encoding.<a name="line.80"></a> +<span class="sourceLineNo">081</span><a name="line.81"></a> +<span class="sourceLineNo">082</span> // a cached object<a name="line.82"></a> +<span class="sourceLineNo">083</span> private PhoneticEngine engine = new PhoneticEngine(NameType.GENERIC, RuleType.APPROX, true);<a name="line.83"></a> +<span class="sourceLineNo">084</span><a name="line.84"></a> +<span class="sourceLineNo">085</span> @Override<a name="line.85"></a> +<span class="sourceLineNo">086</span> public Object encode(final Object source) throws EncoderException {<a name="line.86"></a> +<span class="sourceLineNo">087</span> if (!(source instanceof String)) {<a name="line.87"></a> +<span class="sourceLineNo">088</span> throw new EncoderException("BeiderMorseEncoder encode parameter is not of type String");<a name="line.88"></a> +<span class="sourceLineNo">089</span> }<a name="line.89"></a> +<span class="sourceLineNo">090</span> return encode((String) source);<a name="line.90"></a> +<span class="sourceLineNo">091</span> }<a name="line.91"></a> +<span class="sourceLineNo">092</span><a name="line.92"></a> +<span class="sourceLineNo">093</span> @Override<a name="line.93"></a> +<span class="sourceLineNo">094</span> public String encode(final String source) throws EncoderException {<a name="line.94"></a> +<span class="sourceLineNo">095</span> if (source == null) {<a name="line.95"></a> +<span class="sourceLineNo">096</span> return null;<a name="line.96"></a> +<span class="sourceLineNo">097</span> }<a name="line.97"></a> +<span class="sourceLineNo">098</span> return this.engine.encode(source);<a name="line.98"></a> +<span class="sourceLineNo">099</span> }<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> /**<a name="line.101"></a> +<span class="sourceLineNo">102</span> * Gets the name type currently in operation.<a name="line.102"></a> +<span class="sourceLineNo">103</span> *<a name="line.103"></a> +<span class="sourceLineNo">104</span> * @return the NameType currently being used<a name="line.104"></a> +<span class="sourceLineNo">105</span> */<a name="line.105"></a> +<span class="sourceLineNo">106</span> public NameType getNameType() {<a name="line.106"></a> +<span class="sourceLineNo">107</span> return this.engine.getNameType();<a name="line.107"></a> +<span class="sourceLineNo">108</span> }<a name="line.108"></a> +<span class="sourceLineNo">109</span><a name="line.109"></a> +<span class="sourceLineNo">110</span> /**<a name="line.110"></a> +<span class="sourceLineNo">111</span> * Gets the rule type currently in operation.<a name="line.111"></a> +<span class="sourceLineNo">112</span> *<a name="line.112"></a> +<span class="sourceLineNo">113</span> * @return the RuleType currently being used<a name="line.113"></a> +<span class="sourceLineNo">114</span> */<a name="line.114"></a> +<span class="sourceLineNo">115</span> public RuleType getRuleType() {<a name="line.115"></a> +<span class="sourceLineNo">116</span> return this.engine.getRuleType();<a name="line.116"></a> +<span class="sourceLineNo">117</span> }<a name="line.117"></a> +<span class="sourceLineNo">118</span><a name="line.118"></a> +<span class="sourceLineNo">119</span> /**<a name="line.119"></a> +<span class="sourceLineNo">120</span> * Discovers if multiple possible encodings are concatenated.<a name="line.120"></a> +<span class="sourceLineNo">121</span> *<a name="line.121"></a> +<span class="sourceLineNo">122</span> * @return true if multiple encodings are concatenated, false if just the first one is returned<a name="line.122"></a> +<span class="sourceLineNo">123</span> */<a name="line.123"></a> +<span class="sourceLineNo">124</span> public boolean isConcat() {<a name="line.124"></a> +<span class="sourceLineNo">125</span> return this.engine.isConcat();<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span><a name="line.127"></a> +<span class="sourceLineNo">128</span> /**<a name="line.128"></a> +<span class="sourceLineNo">129</span> * Sets how multiple possible phonetic encodings are combined.<a name="line.129"></a> +<span class="sourceLineNo">130</span> *<a name="line.130"></a> +<span class="sourceLineNo">131</span> * @param concat<a name="line.131"></a> +<span class="sourceLineNo">132</span> * true if multiple encodings are to be combined with a '|', false if just the first one is<a name="line.132"></a> +<span class="sourceLineNo">133</span> * to be considered<a name="line.133"></a> +<span class="sourceLineNo">134</span> */<a name="line.134"></a> +<span class="sourceLineNo">135</span> public void setConcat(final boolean concat) {<a name="line.135"></a> +<span class="sourceLineNo">136</span> this.engine = new PhoneticEngine(this.engine.getNameType(),<a name="line.136"></a> +<span class="sourceLineNo">137</span> this.engine.getRuleType(),<a name="line.137"></a> +<span class="sourceLineNo">138</span> concat,<a name="line.138"></a> +<span class="sourceLineNo">139</span> this.engine.getMaxPhonemes());<a name="line.139"></a> +<span class="sourceLineNo">140</span> }<a name="line.140"></a> +<span class="sourceLineNo">141</span><a name="line.141"></a> +<span class="sourceLineNo">142</span> /**<a name="line.142"></a> +<span class="sourceLineNo">143</span> * Sets the type of name. Use {@link NameType#GENERIC} unless you specifically want phonetic encodings<a name="line.143"></a> +<span class="sourceLineNo">144</span> * optimized for Ashkenazi or Sephardic Jewish family names.<a name="line.144"></a> +<span class="sourceLineNo">145</span> *<a name="line.145"></a> +<span class="sourceLineNo">146</span> * @param nameType<a name="line.146"></a> +<span class="sourceLineNo">147</span> * the NameType in use<a name="line.147"></a> +<span class="sourceLineNo">148</span> */<a name="line.148"></a> +<span class="sourceLineNo">149</span> public void setNameType(final NameType nameType) {<a name="line.149"></a> +<span class="sourceLineNo">150</span> this.engine = new PhoneticEngine(nameType,<a name="line.150"></a> +<span class="sourceLineNo">151</span> this.engine.getRuleType(),<a name="line.151"></a> +<span class="sourceLineNo">152</span> this.engine.isConcat(),<a name="line.152"></a> +<span class="sourceLineNo">153</span> this.engine.getMaxPhonemes());<a name="line.153"></a> +<span class="sourceLineNo">154</span> }<a name="line.154"></a> +<span class="sourceLineNo">155</span><a name="line.155"></a> +<span class="sourceLineNo">156</span> /**<a name="line.156"></a> +<span class="sourceLineNo">157</span> * Sets the rule type to apply. This will widen or narrow the range of phonetic encodings considered.<a name="line.157"></a> +<span class="sourceLineNo">158</span> *<a name="line.158"></a> +<span class="sourceLineNo">159</span> * @param ruleType<a name="line.159"></a> +<span class="sourceLineNo">160</span> * {@link RuleType#APPROX} or {@link RuleType#EXACT} for approximate or exact phonetic matches<a name="line.160"></a> +<span class="sourceLineNo">161</span> */<a name="line.161"></a> +<span class="sourceLineNo">162</span> public void setRuleType(final RuleType ruleType) {<a name="line.162"></a> +<span class="sourceLineNo">163</span> this.engine = new PhoneticEngine(this.engine.getNameType(),<a name="line.163"></a> +<span class="sourceLineNo">164</span> ruleType,<a name="line.164"></a> +<span class="sourceLineNo">165</span> this.engine.isConcat(),<a name="line.165"></a> +<span class="sourceLineNo">166</span> this.engine.getMaxPhonemes());<a name="line.166"></a> +<span class="sourceLineNo">167</span> }<a name="line.167"></a> +<span class="sourceLineNo">168</span><a name="line.168"></a> +<span class="sourceLineNo">169</span> /**<a name="line.169"></a> +<span class="sourceLineNo">170</span> * Sets the number of maximum of phonemes that shall be considered by the engine.<a name="line.170"></a> +<span class="sourceLineNo">171</span> *<a name="line.171"></a> +<span class="sourceLineNo">172</span> * @param maxPhonemes<a name="line.172"></a> +<span class="sourceLineNo">173</span> * the maximum number of phonemes returned by the engine<a name="line.173"></a> +<span class="sourceLineNo">174</span> * @since 1.7<a name="line.174"></a> +<span class="sourceLineNo">175</span> */<a name="line.175"></a> +<span class="sourceLineNo">176</span> public void setMaxPhonemes(final int maxPhonemes) {<a name="line.176"></a> +<span class="sourceLineNo">177</span> this.engine = new PhoneticEngine(this.engine.getNameType(),<a name="line.177"></a> +<span class="sourceLineNo">178</span> this.engine.getRuleType(),<a name="line.178"></a> +<span class="sourceLineNo">179</span> this.engine.isConcat(),<a name="line.179"></a> +<span class="sourceLineNo">180</span> maxPhonemes);<a name="line.180"></a> +<span class="sourceLineNo">181</span> }<a name="line.181"></a> +<span class="sourceLineNo">182</span><a name="line.182"></a> +<span class="sourceLineNo">183</span>}<a name="line.183"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Lang.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Lang.html new file mode 100644 index 0000000000000000000000000000000000000000..d646a7ca8eecde0a00e1bf0b21ddfe2bb348b1f7 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Lang.html @@ -0,0 +1,295 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.ArrayList;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.Arrays;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.Collections;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.EnumMap;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.HashSet;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.List;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.Locale;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import java.util.Map;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import java.util.Scanner;<a name="line.28"></a> +<span class="sourceLineNo">029</span>import java.util.Set;<a name="line.29"></a> +<span class="sourceLineNo">030</span>import java.util.regex.Pattern;<a name="line.30"></a> +<span class="sourceLineNo">031</span><a name="line.31"></a> +<span class="sourceLineNo">032</span>import org.apache.commons.codec.Resources;<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span>/**<a name="line.34"></a> +<span class="sourceLineNo">035</span> * Language guessing utility.<a name="line.35"></a> +<span class="sourceLineNo">036</span> * <p><a name="line.36"></a> +<span class="sourceLineNo">037</span> * This class encapsulates rules used to guess the possible languages that a word originates from. This is<a name="line.37"></a> +<span class="sourceLineNo">038</span> * done by reference to a whole series of rules distributed in resource files.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * Instances of this class are typically managed through the static factory method instance().<a name="line.40"></a> +<span class="sourceLineNo">041</span> * Unless you are developing your own language guessing rules, you will not need to interact with this class directly.<a name="line.41"></a> +<span class="sourceLineNo">042</span> * <p><a name="line.42"></a> +<span class="sourceLineNo">043</span> * This class is intended to be immutable and thread-safe.<a name="line.43"></a> +<span class="sourceLineNo">044</span> * <p><a name="line.44"></a> +<span class="sourceLineNo">045</span> * <b>Lang resources</b><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <p><a name="line.46"></a> +<span class="sourceLineNo">047</span> * Language guessing rules are typically loaded from resource files. These are UTF-8 encoded text files.<a name="line.47"></a> +<span class="sourceLineNo">048</span> * They are systematically named following the pattern:<a name="line.48"></a> +<span class="sourceLineNo">049</span> * <blockquote>org/apache/commons/codec/language/bm/lang.txt</blockquote><a name="line.49"></a> +<span class="sourceLineNo">050</span> * The format of these resources is the following:<a name="line.50"></a> +<span class="sourceLineNo">051</span> * <ul><a name="line.51"></a> +<span class="sourceLineNo">052</span> * <li><b>Rules:</b> whitespace separated strings.<a name="line.52"></a> +<span class="sourceLineNo">053</span> * There should be 3 columns to each row, and these will be interpreted as:<a name="line.53"></a> +<span class="sourceLineNo">054</span> * <ol><a name="line.54"></a> +<span class="sourceLineNo">055</span> * <li>pattern: a regular expression.</li><a name="line.55"></a> +<span class="sourceLineNo">056</span> * <li>languages: a '+'-separated list of languages.</li><a name="line.56"></a> +<span class="sourceLineNo">057</span> * <li>acceptOnMatch: 'true' or 'false' indicating if a match rules in or rules out the language.</li><a name="line.57"></a> +<span class="sourceLineNo">058</span> * </ol><a name="line.58"></a> +<span class="sourceLineNo">059</span> * </li><a name="line.59"></a> +<span class="sourceLineNo">060</span> * <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text following on that line to be<a name="line.60"></a> +<span class="sourceLineNo">061</span> * discarded as a comment.</li><a name="line.61"></a> +<span class="sourceLineNo">062</span> * <li><b>Multi-line comments:</b> Any line starting with '/*' will start multi-line commenting mode.<a name="line.62"></a> +<span class="sourceLineNo">063</span> * This will skip all content until a line ending in '*' and '/' is found.</li><a name="line.63"></a> +<span class="sourceLineNo">064</span> * <li><b>Blank lines:</b> All blank lines will be skipped.</li><a name="line.64"></a> +<span class="sourceLineNo">065</span> * </ul><a name="line.65"></a> +<span class="sourceLineNo">066</span> * <p><a name="line.66"></a> +<span class="sourceLineNo">067</span> * Port of lang.php<a name="line.67"></a> +<span class="sourceLineNo">068</span> *<a name="line.68"></a> +<span class="sourceLineNo">069</span> * @since 1.6<a name="line.69"></a> +<span class="sourceLineNo">070</span> */<a name="line.70"></a> +<span class="sourceLineNo">071</span>public class Lang {<a name="line.71"></a> +<span class="sourceLineNo">072</span> // Implementation note: This class is divided into two sections. The first part is a static factory interface that<a name="line.72"></a> +<span class="sourceLineNo">073</span> // exposes the LANGUAGE_RULES_RN resource as a Lang instance. The second part is the Lang instance methods that<a name="line.73"></a> +<span class="sourceLineNo">074</span> // encapsulate a particular language-guessing rule table and the language guessing itself.<a name="line.74"></a> +<span class="sourceLineNo">075</span> //<a name="line.75"></a> +<span class="sourceLineNo">076</span> // It may make sense in the future to expose the private constructor to allow power users to build custom language-<a name="line.76"></a> +<span class="sourceLineNo">077</span> // guessing rules, perhaps by marking it protected and allowing sub-classing. However, the vast majority of users<a name="line.77"></a> +<span class="sourceLineNo">078</span> // should be strongly encouraged to use the static factory {@code instance} method to get their Lang instances.<a name="line.78"></a> +<span class="sourceLineNo">079</span><a name="line.79"></a> +<span class="sourceLineNo">080</span> private static final class LangRule {<a name="line.80"></a> +<span class="sourceLineNo">081</span> private final boolean acceptOnMatch;<a name="line.81"></a> +<span class="sourceLineNo">082</span> private final Set<String> languages;<a name="line.82"></a> +<span class="sourceLineNo">083</span> private final Pattern pattern;<a name="line.83"></a> +<span class="sourceLineNo">084</span><a name="line.84"></a> +<span class="sourceLineNo">085</span> private LangRule(final Pattern pattern, final Set<String> languages, final boolean acceptOnMatch) {<a name="line.85"></a> +<span class="sourceLineNo">086</span> this.pattern = pattern;<a name="line.86"></a> +<span class="sourceLineNo">087</span> this.languages = languages;<a name="line.87"></a> +<span class="sourceLineNo">088</span> this.acceptOnMatch = acceptOnMatch;<a name="line.88"></a> +<span class="sourceLineNo">089</span> }<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> public boolean matches(final String txt) {<a name="line.91"></a> +<span class="sourceLineNo">092</span> return this.pattern.matcher(txt).find();<a name="line.92"></a> +<span class="sourceLineNo">093</span> }<a name="line.93"></a> +<span class="sourceLineNo">094</span> }<a name="line.94"></a> +<span class="sourceLineNo">095</span><a name="line.95"></a> +<span class="sourceLineNo">096</span> private static final Map<NameType, Lang> Langs = new EnumMap<>(NameType.class);<a name="line.96"></a> +<span class="sourceLineNo">097</span><a name="line.97"></a> +<span class="sourceLineNo">098</span> private static final String LANGUAGE_RULES_RN = "org/apache/commons/codec/language/bm/%s_lang.txt";<a name="line.98"></a> +<span class="sourceLineNo">099</span><a name="line.99"></a> +<span class="sourceLineNo">100</span> static {<a name="line.100"></a> +<span class="sourceLineNo">101</span> for (final NameType s : NameType.values()) {<a name="line.101"></a> +<span class="sourceLineNo">102</span> Langs.put(s, loadFromResource(String.format(LANGUAGE_RULES_RN, s.getName()), Languages.getInstance(s)));<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span> }<a name="line.104"></a> +<span class="sourceLineNo">105</span><a name="line.105"></a> +<span class="sourceLineNo">106</span> /**<a name="line.106"></a> +<span class="sourceLineNo">107</span> * Gets a Lang instance for one of the supported NameTypes.<a name="line.107"></a> +<span class="sourceLineNo">108</span> *<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @param nameType<a name="line.109"></a> +<span class="sourceLineNo">110</span> * the NameType to look up<a name="line.110"></a> +<span class="sourceLineNo">111</span> * @return a Lang encapsulating the language guessing rules for that name type<a name="line.111"></a> +<span class="sourceLineNo">112</span> */<a name="line.112"></a> +<span class="sourceLineNo">113</span> public static Lang instance(final NameType nameType) {<a name="line.113"></a> +<span class="sourceLineNo">114</span> return Langs.get(nameType);<a name="line.114"></a> +<span class="sourceLineNo">115</span> }<a name="line.115"></a> +<span class="sourceLineNo">116</span><a name="line.116"></a> +<span class="sourceLineNo">117</span> /**<a name="line.117"></a> +<span class="sourceLineNo">118</span> * Loads language rules from a resource.<a name="line.118"></a> +<span class="sourceLineNo">119</span> * <p><a name="line.119"></a> +<span class="sourceLineNo">120</span> * In normal use, you will obtain instances of Lang through the {@link #instance(NameType)} method.<a name="line.120"></a> +<span class="sourceLineNo">121</span> * You will only need to call this yourself if you are developing custom language mapping rules.<a name="line.121"></a> +<span class="sourceLineNo">122</span> *<a name="line.122"></a> +<span class="sourceLineNo">123</span> * @param languageRulesResourceName<a name="line.123"></a> +<span class="sourceLineNo">124</span> * the fully-qualified resource name to load<a name="line.124"></a> +<span class="sourceLineNo">125</span> * @param languages<a name="line.125"></a> +<span class="sourceLineNo">126</span> * the languages that these rules will support<a name="line.126"></a> +<span class="sourceLineNo">127</span> * @return a Lang encapsulating the loaded language-guessing rules.<a name="line.127"></a> +<span class="sourceLineNo">128</span> */<a name="line.128"></a> +<span class="sourceLineNo">129</span> public static Lang loadFromResource(final String languageRulesResourceName, final Languages languages) {<a name="line.129"></a> +<span class="sourceLineNo">130</span> final List<LangRule> rules = new ArrayList<>();<a name="line.130"></a> +<span class="sourceLineNo">131</span> try (final Scanner scanner = new Scanner(Resources.getInputStream(languageRulesResourceName),<a name="line.131"></a> +<span class="sourceLineNo">132</span> ResourceConstants.ENCODING)) {<a name="line.132"></a> +<span class="sourceLineNo">133</span> boolean inExtendedComment = false;<a name="line.133"></a> +<span class="sourceLineNo">134</span> while (scanner.hasNextLine()) {<a name="line.134"></a> +<span class="sourceLineNo">135</span> final String rawLine = scanner.nextLine();<a name="line.135"></a> +<span class="sourceLineNo">136</span> String line = rawLine;<a name="line.136"></a> +<span class="sourceLineNo">137</span> if (inExtendedComment) {<a name="line.137"></a> +<span class="sourceLineNo">138</span> // check for closing comment marker, otherwise discard doc comment line<a name="line.138"></a> +<span class="sourceLineNo">139</span> if (line.endsWith(ResourceConstants.EXT_CMT_END)) {<a name="line.139"></a> +<span class="sourceLineNo">140</span> inExtendedComment = false;<a name="line.140"></a> +<span class="sourceLineNo">141</span> }<a name="line.141"></a> +<span class="sourceLineNo">142</span> } else {<a name="line.142"></a> +<span class="sourceLineNo">143</span> if (line.startsWith(ResourceConstants.EXT_CMT_START)) {<a name="line.143"></a> +<span class="sourceLineNo">144</span> inExtendedComment = true;<a name="line.144"></a> +<span class="sourceLineNo">145</span> } else {<a name="line.145"></a> +<span class="sourceLineNo">146</span> // discard comments<a name="line.146"></a> +<span class="sourceLineNo">147</span> final int cmtI = line.indexOf(ResourceConstants.CMT);<a name="line.147"></a> +<span class="sourceLineNo">148</span> if (cmtI >= 0) {<a name="line.148"></a> +<span class="sourceLineNo">149</span> line = line.substring(0, cmtI);<a name="line.149"></a> +<span class="sourceLineNo">150</span> }<a name="line.150"></a> +<span class="sourceLineNo">151</span><a name="line.151"></a> +<span class="sourceLineNo">152</span> // trim leading-trailing whitespace<a name="line.152"></a> +<span class="sourceLineNo">153</span> line = line.trim();<a name="line.153"></a> +<span class="sourceLineNo">154</span><a name="line.154"></a> +<span class="sourceLineNo">155</span> if (line.length() == 0) {<a name="line.155"></a> +<span class="sourceLineNo">156</span> continue; // empty lines can be safely skipped<a name="line.156"></a> +<span class="sourceLineNo">157</span> }<a name="line.157"></a> +<span class="sourceLineNo">158</span><a name="line.158"></a> +<span class="sourceLineNo">159</span> // split it up<a name="line.159"></a> +<span class="sourceLineNo">160</span> final String[] parts = line.split("\\s+");<a name="line.160"></a> +<span class="sourceLineNo">161</span><a name="line.161"></a> +<span class="sourceLineNo">162</span> if (parts.length != 3) {<a name="line.162"></a> +<span class="sourceLineNo">163</span> throw new IllegalArgumentException("Malformed line '" + rawLine +<a name="line.163"></a> +<span class="sourceLineNo">164</span> "' in language resource '" + languageRulesResourceName + "'");<a name="line.164"></a> +<span class="sourceLineNo">165</span> }<a name="line.165"></a> +<span class="sourceLineNo">166</span><a name="line.166"></a> +<span class="sourceLineNo">167</span> final Pattern pattern = Pattern.compile(parts[0]);<a name="line.167"></a> +<span class="sourceLineNo">168</span> final String[] langs = parts[1].split("\\+");<a name="line.168"></a> +<span class="sourceLineNo">169</span> final boolean accept = parts[2].equals("true");<a name="line.169"></a> +<span class="sourceLineNo">170</span><a name="line.170"></a> +<span class="sourceLineNo">171</span> rules.add(new LangRule(pattern, new HashSet<>(Arrays.asList(langs)), accept));<a name="line.171"></a> +<span class="sourceLineNo">172</span> }<a name="line.172"></a> +<span class="sourceLineNo">173</span> }<a name="line.173"></a> +<span class="sourceLineNo">174</span> }<a name="line.174"></a> +<span class="sourceLineNo">175</span> }<a name="line.175"></a> +<span class="sourceLineNo">176</span> return new Lang(rules, languages);<a name="line.176"></a> +<span class="sourceLineNo">177</span> }<a name="line.177"></a> +<span class="sourceLineNo">178</span><a name="line.178"></a> +<span class="sourceLineNo">179</span> private final Languages languages;<a name="line.179"></a> +<span class="sourceLineNo">180</span> private final List<LangRule> rules;<a name="line.180"></a> +<span class="sourceLineNo">181</span><a name="line.181"></a> +<span class="sourceLineNo">182</span> private Lang(final List<LangRule> rules, final Languages languages) {<a name="line.182"></a> +<span class="sourceLineNo">183</span> this.rules = Collections.unmodifiableList(rules);<a name="line.183"></a> +<span class="sourceLineNo">184</span> this.languages = languages;<a name="line.184"></a> +<span class="sourceLineNo">185</span> }<a name="line.185"></a> +<span class="sourceLineNo">186</span><a name="line.186"></a> +<span class="sourceLineNo">187</span> /**<a name="line.187"></a> +<span class="sourceLineNo">188</span> * Guesses the language of a word.<a name="line.188"></a> +<span class="sourceLineNo">189</span> *<a name="line.189"></a> +<span class="sourceLineNo">190</span> * @param text<a name="line.190"></a> +<span class="sourceLineNo">191</span> * the word<a name="line.191"></a> +<span class="sourceLineNo">192</span> * @return the language that the word originates from or {@link Languages#ANY} if there was no unique match<a name="line.192"></a> +<span class="sourceLineNo">193</span> */<a name="line.193"></a> +<span class="sourceLineNo">194</span> public String guessLanguage(final String text) {<a name="line.194"></a> +<span class="sourceLineNo">195</span> final Languages.LanguageSet ls = guessLanguages(text);<a name="line.195"></a> +<span class="sourceLineNo">196</span> return ls.isSingleton() ? ls.getAny() : Languages.ANY;<a name="line.196"></a> +<span class="sourceLineNo">197</span> }<a name="line.197"></a> +<span class="sourceLineNo">198</span><a name="line.198"></a> +<span class="sourceLineNo">199</span> /**<a name="line.199"></a> +<span class="sourceLineNo">200</span> * Guesses the languages of a word.<a name="line.200"></a> +<span class="sourceLineNo">201</span> *<a name="line.201"></a> +<span class="sourceLineNo">202</span> * @param input<a name="line.202"></a> +<span class="sourceLineNo">203</span> * the word<a name="line.203"></a> +<span class="sourceLineNo">204</span> * @return a Set of Strings of language names that are potential matches for the input word<a name="line.204"></a> +<span class="sourceLineNo">205</span> */<a name="line.205"></a> +<span class="sourceLineNo">206</span> public Languages.LanguageSet guessLanguages(final String input) {<a name="line.206"></a> +<span class="sourceLineNo">207</span> final String text = input.toLowerCase(Locale.ENGLISH);<a name="line.207"></a> +<span class="sourceLineNo">208</span><a name="line.208"></a> +<span class="sourceLineNo">209</span> final Set<String> langs = new HashSet<>(this.languages.getLanguages());<a name="line.209"></a> +<span class="sourceLineNo">210</span> for (final LangRule rule : this.rules) {<a name="line.210"></a> +<span class="sourceLineNo">211</span> if (rule.matches(text)) {<a name="line.211"></a> +<span class="sourceLineNo">212</span> if (rule.acceptOnMatch) {<a name="line.212"></a> +<span class="sourceLineNo">213</span> langs.retainAll(rule.languages);<a name="line.213"></a> +<span class="sourceLineNo">214</span> } else {<a name="line.214"></a> +<span class="sourceLineNo">215</span> langs.removeAll(rule.languages);<a name="line.215"></a> +<span class="sourceLineNo">216</span> }<a name="line.216"></a> +<span class="sourceLineNo">217</span> }<a name="line.217"></a> +<span class="sourceLineNo">218</span> }<a name="line.218"></a> +<span class="sourceLineNo">219</span><a name="line.219"></a> +<span class="sourceLineNo">220</span> final Languages.LanguageSet ls = Languages.LanguageSet.from(langs);<a name="line.220"></a> +<span class="sourceLineNo">221</span> return ls.equals(Languages.NO_LANGUAGES) ? Languages.ANY_LANGUAGE : ls;<a name="line.221"></a> +<span class="sourceLineNo">222</span> }<a name="line.222"></a> +<span class="sourceLineNo">223</span>}<a name="line.223"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Languages.LanguageSet.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Languages.LanguageSet.html new file mode 100644 index 0000000000000000000000000000000000000000..cb9b17c54166b7c8a3f35a18024fa70c25a6a52c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Languages.LanguageSet.html @@ -0,0 +1,363 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.Collections;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.EnumMap;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.HashSet;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.Map;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.NoSuchElementException;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.Scanner;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.Set;<a name="line.26"></a> +<span class="sourceLineNo">027</span><a name="line.27"></a> +<span class="sourceLineNo">028</span>import org.apache.commons.codec.Resources;<a name="line.28"></a> +<span class="sourceLineNo">029</span><a name="line.29"></a> +<span class="sourceLineNo">030</span>/**<a name="line.30"></a> +<span class="sourceLineNo">031</span> * Language codes.<a name="line.31"></a> +<span class="sourceLineNo">032</span> * <p><a name="line.32"></a> +<span class="sourceLineNo">033</span> * Language codes are typically loaded from resource files. These are UTF-8<a name="line.33"></a> +<span class="sourceLineNo">034</span> * encoded text files. They are systematically named following the pattern:<a name="line.34"></a> +<span class="sourceLineNo">035</span> * <blockquote>org/apache/commons/codec/language/bm/${{@link NameType#getName()}<a name="line.35"></a> +<span class="sourceLineNo">036</span> * languages.txt</blockquote><a name="line.36"></a> +<span class="sourceLineNo">037</span> * <p><a name="line.37"></a> +<span class="sourceLineNo">038</span> * The format of these resources is the following:<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <ul><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <li><b>Language:</b> a single string containing no whitespace</li><a name="line.40"></a> +<span class="sourceLineNo">041</span> * <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text<a name="line.41"></a> +<span class="sourceLineNo">042</span> * following on that line to be discarded as a comment.</li><a name="line.42"></a> +<span class="sourceLineNo">043</span> * <li><b>Multi-line comments:</b> Any line starting with '/*' will start<a name="line.43"></a> +<span class="sourceLineNo">044</span> * multi-line commenting mode. This will skip all content until a line ending in<a name="line.44"></a> +<span class="sourceLineNo">045</span> * '*' and '/' is found.</li><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <li><b>Blank lines:</b> All blank lines will be skipped.</li><a name="line.46"></a> +<span class="sourceLineNo">047</span> * </ul><a name="line.47"></a> +<span class="sourceLineNo">048</span> * <p><a name="line.48"></a> +<span class="sourceLineNo">049</span> * Ported from language.php<a name="line.49"></a> +<span class="sourceLineNo">050</span> * <p><a name="line.50"></a> +<span class="sourceLineNo">051</span> * This class is immutable and thread-safe.<a name="line.51"></a> +<span class="sourceLineNo">052</span> *<a name="line.52"></a> +<span class="sourceLineNo">053</span> * @since 1.6<a name="line.53"></a> +<span class="sourceLineNo">054</span> */<a name="line.54"></a> +<span class="sourceLineNo">055</span>public class Languages {<a name="line.55"></a> +<span class="sourceLineNo">056</span> // Implementation note: This class is divided into two sections. The first part<a name="line.56"></a> +<span class="sourceLineNo">057</span> // is a static factory interface that<a name="line.57"></a> +<span class="sourceLineNo">058</span> // exposes org/apache/commons/codec/language/bm/%s_languages.txt for %s in<a name="line.58"></a> +<span class="sourceLineNo">059</span> // NameType.* as a list of supported<a name="line.59"></a> +<span class="sourceLineNo">060</span> // languages, and a second part that provides instance methods for accessing<a name="line.60"></a> +<span class="sourceLineNo">061</span> // this set for supported languages.<a name="line.61"></a> +<span class="sourceLineNo">062</span><a name="line.62"></a> +<span class="sourceLineNo">063</span> /**<a name="line.63"></a> +<span class="sourceLineNo">064</span> * A set of languages.<a name="line.64"></a> +<span class="sourceLineNo">065</span> */<a name="line.65"></a> +<span class="sourceLineNo">066</span> public static abstract class LanguageSet {<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> public static LanguageSet from(final Set<String> langs) {<a name="line.68"></a> +<span class="sourceLineNo">069</span> return langs.isEmpty() ? NO_LANGUAGES : new SomeLanguages(langs);<a name="line.69"></a> +<span class="sourceLineNo">070</span> }<a name="line.70"></a> +<span class="sourceLineNo">071</span><a name="line.71"></a> +<span class="sourceLineNo">072</span> public abstract boolean contains(String language);<a name="line.72"></a> +<span class="sourceLineNo">073</span><a name="line.73"></a> +<span class="sourceLineNo">074</span> public abstract String getAny();<a name="line.74"></a> +<span class="sourceLineNo">075</span><a name="line.75"></a> +<span class="sourceLineNo">076</span> public abstract boolean isEmpty();<a name="line.76"></a> +<span class="sourceLineNo">077</span><a name="line.77"></a> +<span class="sourceLineNo">078</span> public abstract boolean isSingleton();<a name="line.78"></a> +<span class="sourceLineNo">079</span><a name="line.79"></a> +<span class="sourceLineNo">080</span> public abstract LanguageSet restrictTo(LanguageSet other);<a name="line.80"></a> +<span class="sourceLineNo">081</span><a name="line.81"></a> +<span class="sourceLineNo">082</span> abstract LanguageSet merge(LanguageSet other);<a name="line.82"></a> +<span class="sourceLineNo">083</span> }<a name="line.83"></a> +<span class="sourceLineNo">084</span><a name="line.84"></a> +<span class="sourceLineNo">085</span> /**<a name="line.85"></a> +<span class="sourceLineNo">086</span> * Some languages, explicitly enumerated.<a name="line.86"></a> +<span class="sourceLineNo">087</span> */<a name="line.87"></a> +<span class="sourceLineNo">088</span> public static final class SomeLanguages extends LanguageSet {<a name="line.88"></a> +<span class="sourceLineNo">089</span> private final Set<String> languages;<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> private SomeLanguages(final Set<String> languages) {<a name="line.91"></a> +<span class="sourceLineNo">092</span> this.languages = Collections.unmodifiableSet(languages);<a name="line.92"></a> +<span class="sourceLineNo">093</span> }<a name="line.93"></a> +<span class="sourceLineNo">094</span><a name="line.94"></a> +<span class="sourceLineNo">095</span> @Override<a name="line.95"></a> +<span class="sourceLineNo">096</span> public boolean contains(final String language) {<a name="line.96"></a> +<span class="sourceLineNo">097</span> return this.languages.contains(language);<a name="line.97"></a> +<span class="sourceLineNo">098</span> }<a name="line.98"></a> +<span class="sourceLineNo">099</span><a name="line.99"></a> +<span class="sourceLineNo">100</span> @Override<a name="line.100"></a> +<span class="sourceLineNo">101</span> public String getAny() {<a name="line.101"></a> +<span class="sourceLineNo">102</span> return this.languages.iterator().next();<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> public Set<String> getLanguages() {<a name="line.105"></a> +<span class="sourceLineNo">106</span> return this.languages;<a name="line.106"></a> +<span class="sourceLineNo">107</span> }<a name="line.107"></a> +<span class="sourceLineNo">108</span><a name="line.108"></a> +<span class="sourceLineNo">109</span> @Override<a name="line.109"></a> +<span class="sourceLineNo">110</span> public boolean isEmpty() {<a name="line.110"></a> +<span class="sourceLineNo">111</span> return this.languages.isEmpty();<a name="line.111"></a> +<span class="sourceLineNo">112</span> }<a name="line.112"></a> +<span class="sourceLineNo">113</span><a name="line.113"></a> +<span class="sourceLineNo">114</span> @Override<a name="line.114"></a> +<span class="sourceLineNo">115</span> public boolean isSingleton() {<a name="line.115"></a> +<span class="sourceLineNo">116</span> return this.languages.size() == 1;<a name="line.116"></a> +<span class="sourceLineNo">117</span> }<a name="line.117"></a> +<span class="sourceLineNo">118</span><a name="line.118"></a> +<span class="sourceLineNo">119</span> @Override<a name="line.119"></a> +<span class="sourceLineNo">120</span> public LanguageSet restrictTo(final LanguageSet other) {<a name="line.120"></a> +<span class="sourceLineNo">121</span> if (other == NO_LANGUAGES) {<a name="line.121"></a> +<span class="sourceLineNo">122</span> return other;<a name="line.122"></a> +<span class="sourceLineNo">123</span> } else if (other == ANY_LANGUAGE) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> return this;<a name="line.124"></a> +<span class="sourceLineNo">125</span> } else {<a name="line.125"></a> +<span class="sourceLineNo">126</span> final SomeLanguages sl = (SomeLanguages) other;<a name="line.126"></a> +<span class="sourceLineNo">127</span> final Set<String> ls = new HashSet<>(Math.min(languages.size(), sl.languages.size()));<a name="line.127"></a> +<span class="sourceLineNo">128</span> for (final String lang : languages) {<a name="line.128"></a> +<span class="sourceLineNo">129</span> if (sl.languages.contains(lang)) {<a name="line.129"></a> +<span class="sourceLineNo">130</span> ls.add(lang);<a name="line.130"></a> +<span class="sourceLineNo">131</span> }<a name="line.131"></a> +<span class="sourceLineNo">132</span> }<a name="line.132"></a> +<span class="sourceLineNo">133</span> return from(ls);<a name="line.133"></a> +<span class="sourceLineNo">134</span> }<a name="line.134"></a> +<span class="sourceLineNo">135</span> }<a name="line.135"></a> +<span class="sourceLineNo">136</span><a name="line.136"></a> +<span class="sourceLineNo">137</span> @Override<a name="line.137"></a> +<span class="sourceLineNo">138</span> public LanguageSet merge(final LanguageSet other) {<a name="line.138"></a> +<span class="sourceLineNo">139</span> if (other == NO_LANGUAGES) {<a name="line.139"></a> +<span class="sourceLineNo">140</span> return this;<a name="line.140"></a> +<span class="sourceLineNo">141</span> } else if (other == ANY_LANGUAGE) {<a name="line.141"></a> +<span class="sourceLineNo">142</span> return other;<a name="line.142"></a> +<span class="sourceLineNo">143</span> } else {<a name="line.143"></a> +<span class="sourceLineNo">144</span> final SomeLanguages sl = (SomeLanguages) other;<a name="line.144"></a> +<span class="sourceLineNo">145</span> final Set<String> ls = new HashSet<>(languages);<a name="line.145"></a> +<span class="sourceLineNo">146</span> for (final String lang : sl.languages) {<a name="line.146"></a> +<span class="sourceLineNo">147</span> ls.add(lang);<a name="line.147"></a> +<span class="sourceLineNo">148</span> }<a name="line.148"></a> +<span class="sourceLineNo">149</span> return from(ls);<a name="line.149"></a> +<span class="sourceLineNo">150</span> }<a name="line.150"></a> +<span class="sourceLineNo">151</span> }<a name="line.151"></a> +<span class="sourceLineNo">152</span><a name="line.152"></a> +<span class="sourceLineNo">153</span> @Override<a name="line.153"></a> +<span class="sourceLineNo">154</span> public String toString() {<a name="line.154"></a> +<span class="sourceLineNo">155</span> return "Languages(" + languages.toString() + ")";<a name="line.155"></a> +<span class="sourceLineNo">156</span> }<a name="line.156"></a> +<span class="sourceLineNo">157</span><a name="line.157"></a> +<span class="sourceLineNo">158</span> }<a name="line.158"></a> +<span class="sourceLineNo">159</span><a name="line.159"></a> +<span class="sourceLineNo">160</span> public static final String ANY = "any";<a name="line.160"></a> +<span class="sourceLineNo">161</span><a name="line.161"></a> +<span class="sourceLineNo">162</span> private static final Map<NameType, Languages> LANGUAGES = new EnumMap<>(NameType.class);<a name="line.162"></a> +<span class="sourceLineNo">163</span><a name="line.163"></a> +<span class="sourceLineNo">164</span> static {<a name="line.164"></a> +<span class="sourceLineNo">165</span> for (final NameType s : NameType.values()) {<a name="line.165"></a> +<span class="sourceLineNo">166</span> LANGUAGES.put(s, getInstance(langResourceName(s)));<a name="line.166"></a> +<span class="sourceLineNo">167</span> }<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span><a name="line.169"></a> +<span class="sourceLineNo">170</span> public static Languages getInstance(final NameType nameType) {<a name="line.170"></a> +<span class="sourceLineNo">171</span> return LANGUAGES.get(nameType);<a name="line.171"></a> +<span class="sourceLineNo">172</span> }<a name="line.172"></a> +<span class="sourceLineNo">173</span><a name="line.173"></a> +<span class="sourceLineNo">174</span> public static Languages getInstance(final String languagesResourceName) {<a name="line.174"></a> +<span class="sourceLineNo">175</span> // read languages list<a name="line.175"></a> +<span class="sourceLineNo">176</span> final Set<String> ls = new HashSet<>();<a name="line.176"></a> +<span class="sourceLineNo">177</span> try (final Scanner lsScanner = new Scanner(Resources.getInputStream(languagesResourceName),<a name="line.177"></a> +<span class="sourceLineNo">178</span> ResourceConstants.ENCODING)) {<a name="line.178"></a> +<span class="sourceLineNo">179</span> boolean inExtendedComment = false;<a name="line.179"></a> +<span class="sourceLineNo">180</span> while (lsScanner.hasNextLine()) {<a name="line.180"></a> +<span class="sourceLineNo">181</span> final String line = lsScanner.nextLine().trim();<a name="line.181"></a> +<span class="sourceLineNo">182</span> if (inExtendedComment) {<a name="line.182"></a> +<span class="sourceLineNo">183</span> if (line.endsWith(ResourceConstants.EXT_CMT_END)) {<a name="line.183"></a> +<span class="sourceLineNo">184</span> inExtendedComment = false;<a name="line.184"></a> +<span class="sourceLineNo">185</span> }<a name="line.185"></a> +<span class="sourceLineNo">186</span> } else {<a name="line.186"></a> +<span class="sourceLineNo">187</span> if (line.startsWith(ResourceConstants.EXT_CMT_START)) {<a name="line.187"></a> +<span class="sourceLineNo">188</span> inExtendedComment = true;<a name="line.188"></a> +<span class="sourceLineNo">189</span> } else if (line.length() > 0) {<a name="line.189"></a> +<span class="sourceLineNo">190</span> ls.add(line);<a name="line.190"></a> +<span class="sourceLineNo">191</span> }<a name="line.191"></a> +<span class="sourceLineNo">192</span> }<a name="line.192"></a> +<span class="sourceLineNo">193</span> }<a name="line.193"></a> +<span class="sourceLineNo">194</span> return new Languages(Collections.unmodifiableSet(ls));<a name="line.194"></a> +<span class="sourceLineNo">195</span> }<a name="line.195"></a> +<span class="sourceLineNo">196</span> }<a name="line.196"></a> +<span class="sourceLineNo">197</span><a name="line.197"></a> +<span class="sourceLineNo">198</span> private static String langResourceName(final NameType nameType) {<a name="line.198"></a> +<span class="sourceLineNo">199</span> return String.format("org/apache/commons/codec/language/bm/%s_languages.txt", nameType.getName());<a name="line.199"></a> +<span class="sourceLineNo">200</span> }<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> private final Set<String> languages;<a name="line.202"></a> +<span class="sourceLineNo">203</span><a name="line.203"></a> +<span class="sourceLineNo">204</span> /**<a name="line.204"></a> +<span class="sourceLineNo">205</span> * No languages at all.<a name="line.205"></a> +<span class="sourceLineNo">206</span> */<a name="line.206"></a> +<span class="sourceLineNo">207</span> public static final LanguageSet NO_LANGUAGES = new LanguageSet() {<a name="line.207"></a> +<span class="sourceLineNo">208</span> @Override<a name="line.208"></a> +<span class="sourceLineNo">209</span> public boolean contains(final String language) {<a name="line.209"></a> +<span class="sourceLineNo">210</span> return false;<a name="line.210"></a> +<span class="sourceLineNo">211</span> }<a name="line.211"></a> +<span class="sourceLineNo">212</span><a name="line.212"></a> +<span class="sourceLineNo">213</span> @Override<a name="line.213"></a> +<span class="sourceLineNo">214</span> public String getAny() {<a name="line.214"></a> +<span class="sourceLineNo">215</span> throw new NoSuchElementException("Can't fetch any language from the empty language set.");<a name="line.215"></a> +<span class="sourceLineNo">216</span> }<a name="line.216"></a> +<span class="sourceLineNo">217</span><a name="line.217"></a> +<span class="sourceLineNo">218</span> @Override<a name="line.218"></a> +<span class="sourceLineNo">219</span> public boolean isEmpty() {<a name="line.219"></a> +<span class="sourceLineNo">220</span> return true;<a name="line.220"></a> +<span class="sourceLineNo">221</span> }<a name="line.221"></a> +<span class="sourceLineNo">222</span><a name="line.222"></a> +<span class="sourceLineNo">223</span> @Override<a name="line.223"></a> +<span class="sourceLineNo">224</span> public boolean isSingleton() {<a name="line.224"></a> +<span class="sourceLineNo">225</span> return false;<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span><a name="line.227"></a> +<span class="sourceLineNo">228</span> @Override<a name="line.228"></a> +<span class="sourceLineNo">229</span> public LanguageSet restrictTo(final LanguageSet other) {<a name="line.229"></a> +<span class="sourceLineNo">230</span> return this;<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> @Override<a name="line.233"></a> +<span class="sourceLineNo">234</span> public LanguageSet merge(final LanguageSet other) {<a name="line.234"></a> +<span class="sourceLineNo">235</span> return other;<a name="line.235"></a> +<span class="sourceLineNo">236</span> }<a name="line.236"></a> +<span class="sourceLineNo">237</span><a name="line.237"></a> +<span class="sourceLineNo">238</span> @Override<a name="line.238"></a> +<span class="sourceLineNo">239</span> public String toString() {<a name="line.239"></a> +<span class="sourceLineNo">240</span> return "NO_LANGUAGES";<a name="line.240"></a> +<span class="sourceLineNo">241</span> }<a name="line.241"></a> +<span class="sourceLineNo">242</span> };<a name="line.242"></a> +<span class="sourceLineNo">243</span><a name="line.243"></a> +<span class="sourceLineNo">244</span> /**<a name="line.244"></a> +<span class="sourceLineNo">245</span> * Any/all languages.<a name="line.245"></a> +<span class="sourceLineNo">246</span> */<a name="line.246"></a> +<span class="sourceLineNo">247</span> public static final LanguageSet ANY_LANGUAGE = new LanguageSet() {<a name="line.247"></a> +<span class="sourceLineNo">248</span> @Override<a name="line.248"></a> +<span class="sourceLineNo">249</span> public boolean contains(final String language) {<a name="line.249"></a> +<span class="sourceLineNo">250</span> return true;<a name="line.250"></a> +<span class="sourceLineNo">251</span> }<a name="line.251"></a> +<span class="sourceLineNo">252</span><a name="line.252"></a> +<span class="sourceLineNo">253</span> @Override<a name="line.253"></a> +<span class="sourceLineNo">254</span> public String getAny() {<a name="line.254"></a> +<span class="sourceLineNo">255</span> throw new NoSuchElementException("Can't fetch any language from the any language set.");<a name="line.255"></a> +<span class="sourceLineNo">256</span> }<a name="line.256"></a> +<span class="sourceLineNo">257</span><a name="line.257"></a> +<span class="sourceLineNo">258</span> @Override<a name="line.258"></a> +<span class="sourceLineNo">259</span> public boolean isEmpty() {<a name="line.259"></a> +<span class="sourceLineNo">260</span> return false;<a name="line.260"></a> +<span class="sourceLineNo">261</span> }<a name="line.261"></a> +<span class="sourceLineNo">262</span><a name="line.262"></a> +<span class="sourceLineNo">263</span> @Override<a name="line.263"></a> +<span class="sourceLineNo">264</span> public boolean isSingleton() {<a name="line.264"></a> +<span class="sourceLineNo">265</span> return false;<a name="line.265"></a> +<span class="sourceLineNo">266</span> }<a name="line.266"></a> +<span class="sourceLineNo">267</span><a name="line.267"></a> +<span class="sourceLineNo">268</span> @Override<a name="line.268"></a> +<span class="sourceLineNo">269</span> public LanguageSet restrictTo(final LanguageSet other) {<a name="line.269"></a> +<span class="sourceLineNo">270</span> return other;<a name="line.270"></a> +<span class="sourceLineNo">271</span> }<a name="line.271"></a> +<span class="sourceLineNo">272</span><a name="line.272"></a> +<span class="sourceLineNo">273</span> @Override<a name="line.273"></a> +<span class="sourceLineNo">274</span> public LanguageSet merge(final LanguageSet other) {<a name="line.274"></a> +<span class="sourceLineNo">275</span> return other;<a name="line.275"></a> +<span class="sourceLineNo">276</span> }<a name="line.276"></a> +<span class="sourceLineNo">277</span><a name="line.277"></a> +<span class="sourceLineNo">278</span> @Override<a name="line.278"></a> +<span class="sourceLineNo">279</span> public String toString() {<a name="line.279"></a> +<span class="sourceLineNo">280</span> return "ANY_LANGUAGE";<a name="line.280"></a> +<span class="sourceLineNo">281</span> }<a name="line.281"></a> +<span class="sourceLineNo">282</span> };<a name="line.282"></a> +<span class="sourceLineNo">283</span><a name="line.283"></a> +<span class="sourceLineNo">284</span> private Languages(final Set<String> languages) {<a name="line.284"></a> +<span class="sourceLineNo">285</span> this.languages = languages;<a name="line.285"></a> +<span class="sourceLineNo">286</span> }<a name="line.286"></a> +<span class="sourceLineNo">287</span><a name="line.287"></a> +<span class="sourceLineNo">288</span> public Set<String> getLanguages() {<a name="line.288"></a> +<span class="sourceLineNo">289</span> return this.languages;<a name="line.289"></a> +<span class="sourceLineNo">290</span> }<a name="line.290"></a> +<span class="sourceLineNo">291</span>}<a name="line.291"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Languages.SomeLanguages.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Languages.SomeLanguages.html new file mode 100644 index 0000000000000000000000000000000000000000..cb9b17c54166b7c8a3f35a18024fa70c25a6a52c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Languages.SomeLanguages.html @@ -0,0 +1,363 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.Collections;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.EnumMap;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.HashSet;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.Map;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.NoSuchElementException;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.Scanner;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.Set;<a name="line.26"></a> +<span class="sourceLineNo">027</span><a name="line.27"></a> +<span class="sourceLineNo">028</span>import org.apache.commons.codec.Resources;<a name="line.28"></a> +<span class="sourceLineNo">029</span><a name="line.29"></a> +<span class="sourceLineNo">030</span>/**<a name="line.30"></a> +<span class="sourceLineNo">031</span> * Language codes.<a name="line.31"></a> +<span class="sourceLineNo">032</span> * <p><a name="line.32"></a> +<span class="sourceLineNo">033</span> * Language codes are typically loaded from resource files. These are UTF-8<a name="line.33"></a> +<span class="sourceLineNo">034</span> * encoded text files. They are systematically named following the pattern:<a name="line.34"></a> +<span class="sourceLineNo">035</span> * <blockquote>org/apache/commons/codec/language/bm/${{@link NameType#getName()}<a name="line.35"></a> +<span class="sourceLineNo">036</span> * languages.txt</blockquote><a name="line.36"></a> +<span class="sourceLineNo">037</span> * <p><a name="line.37"></a> +<span class="sourceLineNo">038</span> * The format of these resources is the following:<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <ul><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <li><b>Language:</b> a single string containing no whitespace</li><a name="line.40"></a> +<span class="sourceLineNo">041</span> * <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text<a name="line.41"></a> +<span class="sourceLineNo">042</span> * following on that line to be discarded as a comment.</li><a name="line.42"></a> +<span class="sourceLineNo">043</span> * <li><b>Multi-line comments:</b> Any line starting with '/*' will start<a name="line.43"></a> +<span class="sourceLineNo">044</span> * multi-line commenting mode. This will skip all content until a line ending in<a name="line.44"></a> +<span class="sourceLineNo">045</span> * '*' and '/' is found.</li><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <li><b>Blank lines:</b> All blank lines will be skipped.</li><a name="line.46"></a> +<span class="sourceLineNo">047</span> * </ul><a name="line.47"></a> +<span class="sourceLineNo">048</span> * <p><a name="line.48"></a> +<span class="sourceLineNo">049</span> * Ported from language.php<a name="line.49"></a> +<span class="sourceLineNo">050</span> * <p><a name="line.50"></a> +<span class="sourceLineNo">051</span> * This class is immutable and thread-safe.<a name="line.51"></a> +<span class="sourceLineNo">052</span> *<a name="line.52"></a> +<span class="sourceLineNo">053</span> * @since 1.6<a name="line.53"></a> +<span class="sourceLineNo">054</span> */<a name="line.54"></a> +<span class="sourceLineNo">055</span>public class Languages {<a name="line.55"></a> +<span class="sourceLineNo">056</span> // Implementation note: This class is divided into two sections. The first part<a name="line.56"></a> +<span class="sourceLineNo">057</span> // is a static factory interface that<a name="line.57"></a> +<span class="sourceLineNo">058</span> // exposes org/apache/commons/codec/language/bm/%s_languages.txt for %s in<a name="line.58"></a> +<span class="sourceLineNo">059</span> // NameType.* as a list of supported<a name="line.59"></a> +<span class="sourceLineNo">060</span> // languages, and a second part that provides instance methods for accessing<a name="line.60"></a> +<span class="sourceLineNo">061</span> // this set for supported languages.<a name="line.61"></a> +<span class="sourceLineNo">062</span><a name="line.62"></a> +<span class="sourceLineNo">063</span> /**<a name="line.63"></a> +<span class="sourceLineNo">064</span> * A set of languages.<a name="line.64"></a> +<span class="sourceLineNo">065</span> */<a name="line.65"></a> +<span class="sourceLineNo">066</span> public static abstract class LanguageSet {<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> public static LanguageSet from(final Set<String> langs) {<a name="line.68"></a> +<span class="sourceLineNo">069</span> return langs.isEmpty() ? NO_LANGUAGES : new SomeLanguages(langs);<a name="line.69"></a> +<span class="sourceLineNo">070</span> }<a name="line.70"></a> +<span class="sourceLineNo">071</span><a name="line.71"></a> +<span class="sourceLineNo">072</span> public abstract boolean contains(String language);<a name="line.72"></a> +<span class="sourceLineNo">073</span><a name="line.73"></a> +<span class="sourceLineNo">074</span> public abstract String getAny();<a name="line.74"></a> +<span class="sourceLineNo">075</span><a name="line.75"></a> +<span class="sourceLineNo">076</span> public abstract boolean isEmpty();<a name="line.76"></a> +<span class="sourceLineNo">077</span><a name="line.77"></a> +<span class="sourceLineNo">078</span> public abstract boolean isSingleton();<a name="line.78"></a> +<span class="sourceLineNo">079</span><a name="line.79"></a> +<span class="sourceLineNo">080</span> public abstract LanguageSet restrictTo(LanguageSet other);<a name="line.80"></a> +<span class="sourceLineNo">081</span><a name="line.81"></a> +<span class="sourceLineNo">082</span> abstract LanguageSet merge(LanguageSet other);<a name="line.82"></a> +<span class="sourceLineNo">083</span> }<a name="line.83"></a> +<span class="sourceLineNo">084</span><a name="line.84"></a> +<span class="sourceLineNo">085</span> /**<a name="line.85"></a> +<span class="sourceLineNo">086</span> * Some languages, explicitly enumerated.<a name="line.86"></a> +<span class="sourceLineNo">087</span> */<a name="line.87"></a> +<span class="sourceLineNo">088</span> public static final class SomeLanguages extends LanguageSet {<a name="line.88"></a> +<span class="sourceLineNo">089</span> private final Set<String> languages;<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> private SomeLanguages(final Set<String> languages) {<a name="line.91"></a> +<span class="sourceLineNo">092</span> this.languages = Collections.unmodifiableSet(languages);<a name="line.92"></a> +<span class="sourceLineNo">093</span> }<a name="line.93"></a> +<span class="sourceLineNo">094</span><a name="line.94"></a> +<span class="sourceLineNo">095</span> @Override<a name="line.95"></a> +<span class="sourceLineNo">096</span> public boolean contains(final String language) {<a name="line.96"></a> +<span class="sourceLineNo">097</span> return this.languages.contains(language);<a name="line.97"></a> +<span class="sourceLineNo">098</span> }<a name="line.98"></a> +<span class="sourceLineNo">099</span><a name="line.99"></a> +<span class="sourceLineNo">100</span> @Override<a name="line.100"></a> +<span class="sourceLineNo">101</span> public String getAny() {<a name="line.101"></a> +<span class="sourceLineNo">102</span> return this.languages.iterator().next();<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> public Set<String> getLanguages() {<a name="line.105"></a> +<span class="sourceLineNo">106</span> return this.languages;<a name="line.106"></a> +<span class="sourceLineNo">107</span> }<a name="line.107"></a> +<span class="sourceLineNo">108</span><a name="line.108"></a> +<span class="sourceLineNo">109</span> @Override<a name="line.109"></a> +<span class="sourceLineNo">110</span> public boolean isEmpty() {<a name="line.110"></a> +<span class="sourceLineNo">111</span> return this.languages.isEmpty();<a name="line.111"></a> +<span class="sourceLineNo">112</span> }<a name="line.112"></a> +<span class="sourceLineNo">113</span><a name="line.113"></a> +<span class="sourceLineNo">114</span> @Override<a name="line.114"></a> +<span class="sourceLineNo">115</span> public boolean isSingleton() {<a name="line.115"></a> +<span class="sourceLineNo">116</span> return this.languages.size() == 1;<a name="line.116"></a> +<span class="sourceLineNo">117</span> }<a name="line.117"></a> +<span class="sourceLineNo">118</span><a name="line.118"></a> +<span class="sourceLineNo">119</span> @Override<a name="line.119"></a> +<span class="sourceLineNo">120</span> public LanguageSet restrictTo(final LanguageSet other) {<a name="line.120"></a> +<span class="sourceLineNo">121</span> if (other == NO_LANGUAGES) {<a name="line.121"></a> +<span class="sourceLineNo">122</span> return other;<a name="line.122"></a> +<span class="sourceLineNo">123</span> } else if (other == ANY_LANGUAGE) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> return this;<a name="line.124"></a> +<span class="sourceLineNo">125</span> } else {<a name="line.125"></a> +<span class="sourceLineNo">126</span> final SomeLanguages sl = (SomeLanguages) other;<a name="line.126"></a> +<span class="sourceLineNo">127</span> final Set<String> ls = new HashSet<>(Math.min(languages.size(), sl.languages.size()));<a name="line.127"></a> +<span class="sourceLineNo">128</span> for (final String lang : languages) {<a name="line.128"></a> +<span class="sourceLineNo">129</span> if (sl.languages.contains(lang)) {<a name="line.129"></a> +<span class="sourceLineNo">130</span> ls.add(lang);<a name="line.130"></a> +<span class="sourceLineNo">131</span> }<a name="line.131"></a> +<span class="sourceLineNo">132</span> }<a name="line.132"></a> +<span class="sourceLineNo">133</span> return from(ls);<a name="line.133"></a> +<span class="sourceLineNo">134</span> }<a name="line.134"></a> +<span class="sourceLineNo">135</span> }<a name="line.135"></a> +<span class="sourceLineNo">136</span><a name="line.136"></a> +<span class="sourceLineNo">137</span> @Override<a name="line.137"></a> +<span class="sourceLineNo">138</span> public LanguageSet merge(final LanguageSet other) {<a name="line.138"></a> +<span class="sourceLineNo">139</span> if (other == NO_LANGUAGES) {<a name="line.139"></a> +<span class="sourceLineNo">140</span> return this;<a name="line.140"></a> +<span class="sourceLineNo">141</span> } else if (other == ANY_LANGUAGE) {<a name="line.141"></a> +<span class="sourceLineNo">142</span> return other;<a name="line.142"></a> +<span class="sourceLineNo">143</span> } else {<a name="line.143"></a> +<span class="sourceLineNo">144</span> final SomeLanguages sl = (SomeLanguages) other;<a name="line.144"></a> +<span class="sourceLineNo">145</span> final Set<String> ls = new HashSet<>(languages);<a name="line.145"></a> +<span class="sourceLineNo">146</span> for (final String lang : sl.languages) {<a name="line.146"></a> +<span class="sourceLineNo">147</span> ls.add(lang);<a name="line.147"></a> +<span class="sourceLineNo">148</span> }<a name="line.148"></a> +<span class="sourceLineNo">149</span> return from(ls);<a name="line.149"></a> +<span class="sourceLineNo">150</span> }<a name="line.150"></a> +<span class="sourceLineNo">151</span> }<a name="line.151"></a> +<span class="sourceLineNo">152</span><a name="line.152"></a> +<span class="sourceLineNo">153</span> @Override<a name="line.153"></a> +<span class="sourceLineNo">154</span> public String toString() {<a name="line.154"></a> +<span class="sourceLineNo">155</span> return "Languages(" + languages.toString() + ")";<a name="line.155"></a> +<span class="sourceLineNo">156</span> }<a name="line.156"></a> +<span class="sourceLineNo">157</span><a name="line.157"></a> +<span class="sourceLineNo">158</span> }<a name="line.158"></a> +<span class="sourceLineNo">159</span><a name="line.159"></a> +<span class="sourceLineNo">160</span> public static final String ANY = "any";<a name="line.160"></a> +<span class="sourceLineNo">161</span><a name="line.161"></a> +<span class="sourceLineNo">162</span> private static final Map<NameType, Languages> LANGUAGES = new EnumMap<>(NameType.class);<a name="line.162"></a> +<span class="sourceLineNo">163</span><a name="line.163"></a> +<span class="sourceLineNo">164</span> static {<a name="line.164"></a> +<span class="sourceLineNo">165</span> for (final NameType s : NameType.values()) {<a name="line.165"></a> +<span class="sourceLineNo">166</span> LANGUAGES.put(s, getInstance(langResourceName(s)));<a name="line.166"></a> +<span class="sourceLineNo">167</span> }<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span><a name="line.169"></a> +<span class="sourceLineNo">170</span> public static Languages getInstance(final NameType nameType) {<a name="line.170"></a> +<span class="sourceLineNo">171</span> return LANGUAGES.get(nameType);<a name="line.171"></a> +<span class="sourceLineNo">172</span> }<a name="line.172"></a> +<span class="sourceLineNo">173</span><a name="line.173"></a> +<span class="sourceLineNo">174</span> public static Languages getInstance(final String languagesResourceName) {<a name="line.174"></a> +<span class="sourceLineNo">175</span> // read languages list<a name="line.175"></a> +<span class="sourceLineNo">176</span> final Set<String> ls = new HashSet<>();<a name="line.176"></a> +<span class="sourceLineNo">177</span> try (final Scanner lsScanner = new Scanner(Resources.getInputStream(languagesResourceName),<a name="line.177"></a> +<span class="sourceLineNo">178</span> ResourceConstants.ENCODING)) {<a name="line.178"></a> +<span class="sourceLineNo">179</span> boolean inExtendedComment = false;<a name="line.179"></a> +<span class="sourceLineNo">180</span> while (lsScanner.hasNextLine()) {<a name="line.180"></a> +<span class="sourceLineNo">181</span> final String line = lsScanner.nextLine().trim();<a name="line.181"></a> +<span class="sourceLineNo">182</span> if (inExtendedComment) {<a name="line.182"></a> +<span class="sourceLineNo">183</span> if (line.endsWith(ResourceConstants.EXT_CMT_END)) {<a name="line.183"></a> +<span class="sourceLineNo">184</span> inExtendedComment = false;<a name="line.184"></a> +<span class="sourceLineNo">185</span> }<a name="line.185"></a> +<span class="sourceLineNo">186</span> } else {<a name="line.186"></a> +<span class="sourceLineNo">187</span> if (line.startsWith(ResourceConstants.EXT_CMT_START)) {<a name="line.187"></a> +<span class="sourceLineNo">188</span> inExtendedComment = true;<a name="line.188"></a> +<span class="sourceLineNo">189</span> } else if (line.length() > 0) {<a name="line.189"></a> +<span class="sourceLineNo">190</span> ls.add(line);<a name="line.190"></a> +<span class="sourceLineNo">191</span> }<a name="line.191"></a> +<span class="sourceLineNo">192</span> }<a name="line.192"></a> +<span class="sourceLineNo">193</span> }<a name="line.193"></a> +<span class="sourceLineNo">194</span> return new Languages(Collections.unmodifiableSet(ls));<a name="line.194"></a> +<span class="sourceLineNo">195</span> }<a name="line.195"></a> +<span class="sourceLineNo">196</span> }<a name="line.196"></a> +<span class="sourceLineNo">197</span><a name="line.197"></a> +<span class="sourceLineNo">198</span> private static String langResourceName(final NameType nameType) {<a name="line.198"></a> +<span class="sourceLineNo">199</span> return String.format("org/apache/commons/codec/language/bm/%s_languages.txt", nameType.getName());<a name="line.199"></a> +<span class="sourceLineNo">200</span> }<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> private final Set<String> languages;<a name="line.202"></a> +<span class="sourceLineNo">203</span><a name="line.203"></a> +<span class="sourceLineNo">204</span> /**<a name="line.204"></a> +<span class="sourceLineNo">205</span> * No languages at all.<a name="line.205"></a> +<span class="sourceLineNo">206</span> */<a name="line.206"></a> +<span class="sourceLineNo">207</span> public static final LanguageSet NO_LANGUAGES = new LanguageSet() {<a name="line.207"></a> +<span class="sourceLineNo">208</span> @Override<a name="line.208"></a> +<span class="sourceLineNo">209</span> public boolean contains(final String language) {<a name="line.209"></a> +<span class="sourceLineNo">210</span> return false;<a name="line.210"></a> +<span class="sourceLineNo">211</span> }<a name="line.211"></a> +<span class="sourceLineNo">212</span><a name="line.212"></a> +<span class="sourceLineNo">213</span> @Override<a name="line.213"></a> +<span class="sourceLineNo">214</span> public String getAny() {<a name="line.214"></a> +<span class="sourceLineNo">215</span> throw new NoSuchElementException("Can't fetch any language from the empty language set.");<a name="line.215"></a> +<span class="sourceLineNo">216</span> }<a name="line.216"></a> +<span class="sourceLineNo">217</span><a name="line.217"></a> +<span class="sourceLineNo">218</span> @Override<a name="line.218"></a> +<span class="sourceLineNo">219</span> public boolean isEmpty() {<a name="line.219"></a> +<span class="sourceLineNo">220</span> return true;<a name="line.220"></a> +<span class="sourceLineNo">221</span> }<a name="line.221"></a> +<span class="sourceLineNo">222</span><a name="line.222"></a> +<span class="sourceLineNo">223</span> @Override<a name="line.223"></a> +<span class="sourceLineNo">224</span> public boolean isSingleton() {<a name="line.224"></a> +<span class="sourceLineNo">225</span> return false;<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span><a name="line.227"></a> +<span class="sourceLineNo">228</span> @Override<a name="line.228"></a> +<span class="sourceLineNo">229</span> public LanguageSet restrictTo(final LanguageSet other) {<a name="line.229"></a> +<span class="sourceLineNo">230</span> return this;<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> @Override<a name="line.233"></a> +<span class="sourceLineNo">234</span> public LanguageSet merge(final LanguageSet other) {<a name="line.234"></a> +<span class="sourceLineNo">235</span> return other;<a name="line.235"></a> +<span class="sourceLineNo">236</span> }<a name="line.236"></a> +<span class="sourceLineNo">237</span><a name="line.237"></a> +<span class="sourceLineNo">238</span> @Override<a name="line.238"></a> +<span class="sourceLineNo">239</span> public String toString() {<a name="line.239"></a> +<span class="sourceLineNo">240</span> return "NO_LANGUAGES";<a name="line.240"></a> +<span class="sourceLineNo">241</span> }<a name="line.241"></a> +<span class="sourceLineNo">242</span> };<a name="line.242"></a> +<span class="sourceLineNo">243</span><a name="line.243"></a> +<span class="sourceLineNo">244</span> /**<a name="line.244"></a> +<span class="sourceLineNo">245</span> * Any/all languages.<a name="line.245"></a> +<span class="sourceLineNo">246</span> */<a name="line.246"></a> +<span class="sourceLineNo">247</span> public static final LanguageSet ANY_LANGUAGE = new LanguageSet() {<a name="line.247"></a> +<span class="sourceLineNo">248</span> @Override<a name="line.248"></a> +<span class="sourceLineNo">249</span> public boolean contains(final String language) {<a name="line.249"></a> +<span class="sourceLineNo">250</span> return true;<a name="line.250"></a> +<span class="sourceLineNo">251</span> }<a name="line.251"></a> +<span class="sourceLineNo">252</span><a name="line.252"></a> +<span class="sourceLineNo">253</span> @Override<a name="line.253"></a> +<span class="sourceLineNo">254</span> public String getAny() {<a name="line.254"></a> +<span class="sourceLineNo">255</span> throw new NoSuchElementException("Can't fetch any language from the any language set.");<a name="line.255"></a> +<span class="sourceLineNo">256</span> }<a name="line.256"></a> +<span class="sourceLineNo">257</span><a name="line.257"></a> +<span class="sourceLineNo">258</span> @Override<a name="line.258"></a> +<span class="sourceLineNo">259</span> public boolean isEmpty() {<a name="line.259"></a> +<span class="sourceLineNo">260</span> return false;<a name="line.260"></a> +<span class="sourceLineNo">261</span> }<a name="line.261"></a> +<span class="sourceLineNo">262</span><a name="line.262"></a> +<span class="sourceLineNo">263</span> @Override<a name="line.263"></a> +<span class="sourceLineNo">264</span> public boolean isSingleton() {<a name="line.264"></a> +<span class="sourceLineNo">265</span> return false;<a name="line.265"></a> +<span class="sourceLineNo">266</span> }<a name="line.266"></a> +<span class="sourceLineNo">267</span><a name="line.267"></a> +<span class="sourceLineNo">268</span> @Override<a name="line.268"></a> +<span class="sourceLineNo">269</span> public LanguageSet restrictTo(final LanguageSet other) {<a name="line.269"></a> +<span class="sourceLineNo">270</span> return other;<a name="line.270"></a> +<span class="sourceLineNo">271</span> }<a name="line.271"></a> +<span class="sourceLineNo">272</span><a name="line.272"></a> +<span class="sourceLineNo">273</span> @Override<a name="line.273"></a> +<span class="sourceLineNo">274</span> public LanguageSet merge(final LanguageSet other) {<a name="line.274"></a> +<span class="sourceLineNo">275</span> return other;<a name="line.275"></a> +<span class="sourceLineNo">276</span> }<a name="line.276"></a> +<span class="sourceLineNo">277</span><a name="line.277"></a> +<span class="sourceLineNo">278</span> @Override<a name="line.278"></a> +<span class="sourceLineNo">279</span> public String toString() {<a name="line.279"></a> +<span class="sourceLineNo">280</span> return "ANY_LANGUAGE";<a name="line.280"></a> +<span class="sourceLineNo">281</span> }<a name="line.281"></a> +<span class="sourceLineNo">282</span> };<a name="line.282"></a> +<span class="sourceLineNo">283</span><a name="line.283"></a> +<span class="sourceLineNo">284</span> private Languages(final Set<String> languages) {<a name="line.284"></a> +<span class="sourceLineNo">285</span> this.languages = languages;<a name="line.285"></a> +<span class="sourceLineNo">286</span> }<a name="line.286"></a> +<span class="sourceLineNo">287</span><a name="line.287"></a> +<span class="sourceLineNo">288</span> public Set<String> getLanguages() {<a name="line.288"></a> +<span class="sourceLineNo">289</span> return this.languages;<a name="line.289"></a> +<span class="sourceLineNo">290</span> }<a name="line.290"></a> +<span class="sourceLineNo">291</span>}<a name="line.291"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Languages.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Languages.html new file mode 100644 index 0000000000000000000000000000000000000000..cb9b17c54166b7c8a3f35a18024fa70c25a6a52c --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Languages.html @@ -0,0 +1,363 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.Collections;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.EnumMap;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.HashSet;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.Map;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.NoSuchElementException;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.Scanner;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.Set;<a name="line.26"></a> +<span class="sourceLineNo">027</span><a name="line.27"></a> +<span class="sourceLineNo">028</span>import org.apache.commons.codec.Resources;<a name="line.28"></a> +<span class="sourceLineNo">029</span><a name="line.29"></a> +<span class="sourceLineNo">030</span>/**<a name="line.30"></a> +<span class="sourceLineNo">031</span> * Language codes.<a name="line.31"></a> +<span class="sourceLineNo">032</span> * <p><a name="line.32"></a> +<span class="sourceLineNo">033</span> * Language codes are typically loaded from resource files. These are UTF-8<a name="line.33"></a> +<span class="sourceLineNo">034</span> * encoded text files. They are systematically named following the pattern:<a name="line.34"></a> +<span class="sourceLineNo">035</span> * <blockquote>org/apache/commons/codec/language/bm/${{@link NameType#getName()}<a name="line.35"></a> +<span class="sourceLineNo">036</span> * languages.txt</blockquote><a name="line.36"></a> +<span class="sourceLineNo">037</span> * <p><a name="line.37"></a> +<span class="sourceLineNo">038</span> * The format of these resources is the following:<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <ul><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <li><b>Language:</b> a single string containing no whitespace</li><a name="line.40"></a> +<span class="sourceLineNo">041</span> * <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text<a name="line.41"></a> +<span class="sourceLineNo">042</span> * following on that line to be discarded as a comment.</li><a name="line.42"></a> +<span class="sourceLineNo">043</span> * <li><b>Multi-line comments:</b> Any line starting with '/*' will start<a name="line.43"></a> +<span class="sourceLineNo">044</span> * multi-line commenting mode. This will skip all content until a line ending in<a name="line.44"></a> +<span class="sourceLineNo">045</span> * '*' and '/' is found.</li><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <li><b>Blank lines:</b> All blank lines will be skipped.</li><a name="line.46"></a> +<span class="sourceLineNo">047</span> * </ul><a name="line.47"></a> +<span class="sourceLineNo">048</span> * <p><a name="line.48"></a> +<span class="sourceLineNo">049</span> * Ported from language.php<a name="line.49"></a> +<span class="sourceLineNo">050</span> * <p><a name="line.50"></a> +<span class="sourceLineNo">051</span> * This class is immutable and thread-safe.<a name="line.51"></a> +<span class="sourceLineNo">052</span> *<a name="line.52"></a> +<span class="sourceLineNo">053</span> * @since 1.6<a name="line.53"></a> +<span class="sourceLineNo">054</span> */<a name="line.54"></a> +<span class="sourceLineNo">055</span>public class Languages {<a name="line.55"></a> +<span class="sourceLineNo">056</span> // Implementation note: This class is divided into two sections. The first part<a name="line.56"></a> +<span class="sourceLineNo">057</span> // is a static factory interface that<a name="line.57"></a> +<span class="sourceLineNo">058</span> // exposes org/apache/commons/codec/language/bm/%s_languages.txt for %s in<a name="line.58"></a> +<span class="sourceLineNo">059</span> // NameType.* as a list of supported<a name="line.59"></a> +<span class="sourceLineNo">060</span> // languages, and a second part that provides instance methods for accessing<a name="line.60"></a> +<span class="sourceLineNo">061</span> // this set for supported languages.<a name="line.61"></a> +<span class="sourceLineNo">062</span><a name="line.62"></a> +<span class="sourceLineNo">063</span> /**<a name="line.63"></a> +<span class="sourceLineNo">064</span> * A set of languages.<a name="line.64"></a> +<span class="sourceLineNo">065</span> */<a name="line.65"></a> +<span class="sourceLineNo">066</span> public static abstract class LanguageSet {<a name="line.66"></a> +<span class="sourceLineNo">067</span><a name="line.67"></a> +<span class="sourceLineNo">068</span> public static LanguageSet from(final Set<String> langs) {<a name="line.68"></a> +<span class="sourceLineNo">069</span> return langs.isEmpty() ? NO_LANGUAGES : new SomeLanguages(langs);<a name="line.69"></a> +<span class="sourceLineNo">070</span> }<a name="line.70"></a> +<span class="sourceLineNo">071</span><a name="line.71"></a> +<span class="sourceLineNo">072</span> public abstract boolean contains(String language);<a name="line.72"></a> +<span class="sourceLineNo">073</span><a name="line.73"></a> +<span class="sourceLineNo">074</span> public abstract String getAny();<a name="line.74"></a> +<span class="sourceLineNo">075</span><a name="line.75"></a> +<span class="sourceLineNo">076</span> public abstract boolean isEmpty();<a name="line.76"></a> +<span class="sourceLineNo">077</span><a name="line.77"></a> +<span class="sourceLineNo">078</span> public abstract boolean isSingleton();<a name="line.78"></a> +<span class="sourceLineNo">079</span><a name="line.79"></a> +<span class="sourceLineNo">080</span> public abstract LanguageSet restrictTo(LanguageSet other);<a name="line.80"></a> +<span class="sourceLineNo">081</span><a name="line.81"></a> +<span class="sourceLineNo">082</span> abstract LanguageSet merge(LanguageSet other);<a name="line.82"></a> +<span class="sourceLineNo">083</span> }<a name="line.83"></a> +<span class="sourceLineNo">084</span><a name="line.84"></a> +<span class="sourceLineNo">085</span> /**<a name="line.85"></a> +<span class="sourceLineNo">086</span> * Some languages, explicitly enumerated.<a name="line.86"></a> +<span class="sourceLineNo">087</span> */<a name="line.87"></a> +<span class="sourceLineNo">088</span> public static final class SomeLanguages extends LanguageSet {<a name="line.88"></a> +<span class="sourceLineNo">089</span> private final Set<String> languages;<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> private SomeLanguages(final Set<String> languages) {<a name="line.91"></a> +<span class="sourceLineNo">092</span> this.languages = Collections.unmodifiableSet(languages);<a name="line.92"></a> +<span class="sourceLineNo">093</span> }<a name="line.93"></a> +<span class="sourceLineNo">094</span><a name="line.94"></a> +<span class="sourceLineNo">095</span> @Override<a name="line.95"></a> +<span class="sourceLineNo">096</span> public boolean contains(final String language) {<a name="line.96"></a> +<span class="sourceLineNo">097</span> return this.languages.contains(language);<a name="line.97"></a> +<span class="sourceLineNo">098</span> }<a name="line.98"></a> +<span class="sourceLineNo">099</span><a name="line.99"></a> +<span class="sourceLineNo">100</span> @Override<a name="line.100"></a> +<span class="sourceLineNo">101</span> public String getAny() {<a name="line.101"></a> +<span class="sourceLineNo">102</span> return this.languages.iterator().next();<a name="line.102"></a> +<span class="sourceLineNo">103</span> }<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> public Set<String> getLanguages() {<a name="line.105"></a> +<span class="sourceLineNo">106</span> return this.languages;<a name="line.106"></a> +<span class="sourceLineNo">107</span> }<a name="line.107"></a> +<span class="sourceLineNo">108</span><a name="line.108"></a> +<span class="sourceLineNo">109</span> @Override<a name="line.109"></a> +<span class="sourceLineNo">110</span> public boolean isEmpty() {<a name="line.110"></a> +<span class="sourceLineNo">111</span> return this.languages.isEmpty();<a name="line.111"></a> +<span class="sourceLineNo">112</span> }<a name="line.112"></a> +<span class="sourceLineNo">113</span><a name="line.113"></a> +<span class="sourceLineNo">114</span> @Override<a name="line.114"></a> +<span class="sourceLineNo">115</span> public boolean isSingleton() {<a name="line.115"></a> +<span class="sourceLineNo">116</span> return this.languages.size() == 1;<a name="line.116"></a> +<span class="sourceLineNo">117</span> }<a name="line.117"></a> +<span class="sourceLineNo">118</span><a name="line.118"></a> +<span class="sourceLineNo">119</span> @Override<a name="line.119"></a> +<span class="sourceLineNo">120</span> public LanguageSet restrictTo(final LanguageSet other) {<a name="line.120"></a> +<span class="sourceLineNo">121</span> if (other == NO_LANGUAGES) {<a name="line.121"></a> +<span class="sourceLineNo">122</span> return other;<a name="line.122"></a> +<span class="sourceLineNo">123</span> } else if (other == ANY_LANGUAGE) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> return this;<a name="line.124"></a> +<span class="sourceLineNo">125</span> } else {<a name="line.125"></a> +<span class="sourceLineNo">126</span> final SomeLanguages sl = (SomeLanguages) other;<a name="line.126"></a> +<span class="sourceLineNo">127</span> final Set<String> ls = new HashSet<>(Math.min(languages.size(), sl.languages.size()));<a name="line.127"></a> +<span class="sourceLineNo">128</span> for (final String lang : languages) {<a name="line.128"></a> +<span class="sourceLineNo">129</span> if (sl.languages.contains(lang)) {<a name="line.129"></a> +<span class="sourceLineNo">130</span> ls.add(lang);<a name="line.130"></a> +<span class="sourceLineNo">131</span> }<a name="line.131"></a> +<span class="sourceLineNo">132</span> }<a name="line.132"></a> +<span class="sourceLineNo">133</span> return from(ls);<a name="line.133"></a> +<span class="sourceLineNo">134</span> }<a name="line.134"></a> +<span class="sourceLineNo">135</span> }<a name="line.135"></a> +<span class="sourceLineNo">136</span><a name="line.136"></a> +<span class="sourceLineNo">137</span> @Override<a name="line.137"></a> +<span class="sourceLineNo">138</span> public LanguageSet merge(final LanguageSet other) {<a name="line.138"></a> +<span class="sourceLineNo">139</span> if (other == NO_LANGUAGES) {<a name="line.139"></a> +<span class="sourceLineNo">140</span> return this;<a name="line.140"></a> +<span class="sourceLineNo">141</span> } else if (other == ANY_LANGUAGE) {<a name="line.141"></a> +<span class="sourceLineNo">142</span> return other;<a name="line.142"></a> +<span class="sourceLineNo">143</span> } else {<a name="line.143"></a> +<span class="sourceLineNo">144</span> final SomeLanguages sl = (SomeLanguages) other;<a name="line.144"></a> +<span class="sourceLineNo">145</span> final Set<String> ls = new HashSet<>(languages);<a name="line.145"></a> +<span class="sourceLineNo">146</span> for (final String lang : sl.languages) {<a name="line.146"></a> +<span class="sourceLineNo">147</span> ls.add(lang);<a name="line.147"></a> +<span class="sourceLineNo">148</span> }<a name="line.148"></a> +<span class="sourceLineNo">149</span> return from(ls);<a name="line.149"></a> +<span class="sourceLineNo">150</span> }<a name="line.150"></a> +<span class="sourceLineNo">151</span> }<a name="line.151"></a> +<span class="sourceLineNo">152</span><a name="line.152"></a> +<span class="sourceLineNo">153</span> @Override<a name="line.153"></a> +<span class="sourceLineNo">154</span> public String toString() {<a name="line.154"></a> +<span class="sourceLineNo">155</span> return "Languages(" + languages.toString() + ")";<a name="line.155"></a> +<span class="sourceLineNo">156</span> }<a name="line.156"></a> +<span class="sourceLineNo">157</span><a name="line.157"></a> +<span class="sourceLineNo">158</span> }<a name="line.158"></a> +<span class="sourceLineNo">159</span><a name="line.159"></a> +<span class="sourceLineNo">160</span> public static final String ANY = "any";<a name="line.160"></a> +<span class="sourceLineNo">161</span><a name="line.161"></a> +<span class="sourceLineNo">162</span> private static final Map<NameType, Languages> LANGUAGES = new EnumMap<>(NameType.class);<a name="line.162"></a> +<span class="sourceLineNo">163</span><a name="line.163"></a> +<span class="sourceLineNo">164</span> static {<a name="line.164"></a> +<span class="sourceLineNo">165</span> for (final NameType s : NameType.values()) {<a name="line.165"></a> +<span class="sourceLineNo">166</span> LANGUAGES.put(s, getInstance(langResourceName(s)));<a name="line.166"></a> +<span class="sourceLineNo">167</span> }<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span><a name="line.169"></a> +<span class="sourceLineNo">170</span> public static Languages getInstance(final NameType nameType) {<a name="line.170"></a> +<span class="sourceLineNo">171</span> return LANGUAGES.get(nameType);<a name="line.171"></a> +<span class="sourceLineNo">172</span> }<a name="line.172"></a> +<span class="sourceLineNo">173</span><a name="line.173"></a> +<span class="sourceLineNo">174</span> public static Languages getInstance(final String languagesResourceName) {<a name="line.174"></a> +<span class="sourceLineNo">175</span> // read languages list<a name="line.175"></a> +<span class="sourceLineNo">176</span> final Set<String> ls = new HashSet<>();<a name="line.176"></a> +<span class="sourceLineNo">177</span> try (final Scanner lsScanner = new Scanner(Resources.getInputStream(languagesResourceName),<a name="line.177"></a> +<span class="sourceLineNo">178</span> ResourceConstants.ENCODING)) {<a name="line.178"></a> +<span class="sourceLineNo">179</span> boolean inExtendedComment = false;<a name="line.179"></a> +<span class="sourceLineNo">180</span> while (lsScanner.hasNextLine()) {<a name="line.180"></a> +<span class="sourceLineNo">181</span> final String line = lsScanner.nextLine().trim();<a name="line.181"></a> +<span class="sourceLineNo">182</span> if (inExtendedComment) {<a name="line.182"></a> +<span class="sourceLineNo">183</span> if (line.endsWith(ResourceConstants.EXT_CMT_END)) {<a name="line.183"></a> +<span class="sourceLineNo">184</span> inExtendedComment = false;<a name="line.184"></a> +<span class="sourceLineNo">185</span> }<a name="line.185"></a> +<span class="sourceLineNo">186</span> } else {<a name="line.186"></a> +<span class="sourceLineNo">187</span> if (line.startsWith(ResourceConstants.EXT_CMT_START)) {<a name="line.187"></a> +<span class="sourceLineNo">188</span> inExtendedComment = true;<a name="line.188"></a> +<span class="sourceLineNo">189</span> } else if (line.length() > 0) {<a name="line.189"></a> +<span class="sourceLineNo">190</span> ls.add(line);<a name="line.190"></a> +<span class="sourceLineNo">191</span> }<a name="line.191"></a> +<span class="sourceLineNo">192</span> }<a name="line.192"></a> +<span class="sourceLineNo">193</span> }<a name="line.193"></a> +<span class="sourceLineNo">194</span> return new Languages(Collections.unmodifiableSet(ls));<a name="line.194"></a> +<span class="sourceLineNo">195</span> }<a name="line.195"></a> +<span class="sourceLineNo">196</span> }<a name="line.196"></a> +<span class="sourceLineNo">197</span><a name="line.197"></a> +<span class="sourceLineNo">198</span> private static String langResourceName(final NameType nameType) {<a name="line.198"></a> +<span class="sourceLineNo">199</span> return String.format("org/apache/commons/codec/language/bm/%s_languages.txt", nameType.getName());<a name="line.199"></a> +<span class="sourceLineNo">200</span> }<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> private final Set<String> languages;<a name="line.202"></a> +<span class="sourceLineNo">203</span><a name="line.203"></a> +<span class="sourceLineNo">204</span> /**<a name="line.204"></a> +<span class="sourceLineNo">205</span> * No languages at all.<a name="line.205"></a> +<span class="sourceLineNo">206</span> */<a name="line.206"></a> +<span class="sourceLineNo">207</span> public static final LanguageSet NO_LANGUAGES = new LanguageSet() {<a name="line.207"></a> +<span class="sourceLineNo">208</span> @Override<a name="line.208"></a> +<span class="sourceLineNo">209</span> public boolean contains(final String language) {<a name="line.209"></a> +<span class="sourceLineNo">210</span> return false;<a name="line.210"></a> +<span class="sourceLineNo">211</span> }<a name="line.211"></a> +<span class="sourceLineNo">212</span><a name="line.212"></a> +<span class="sourceLineNo">213</span> @Override<a name="line.213"></a> +<span class="sourceLineNo">214</span> public String getAny() {<a name="line.214"></a> +<span class="sourceLineNo">215</span> throw new NoSuchElementException("Can't fetch any language from the empty language set.");<a name="line.215"></a> +<span class="sourceLineNo">216</span> }<a name="line.216"></a> +<span class="sourceLineNo">217</span><a name="line.217"></a> +<span class="sourceLineNo">218</span> @Override<a name="line.218"></a> +<span class="sourceLineNo">219</span> public boolean isEmpty() {<a name="line.219"></a> +<span class="sourceLineNo">220</span> return true;<a name="line.220"></a> +<span class="sourceLineNo">221</span> }<a name="line.221"></a> +<span class="sourceLineNo">222</span><a name="line.222"></a> +<span class="sourceLineNo">223</span> @Override<a name="line.223"></a> +<span class="sourceLineNo">224</span> public boolean isSingleton() {<a name="line.224"></a> +<span class="sourceLineNo">225</span> return false;<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span><a name="line.227"></a> +<span class="sourceLineNo">228</span> @Override<a name="line.228"></a> +<span class="sourceLineNo">229</span> public LanguageSet restrictTo(final LanguageSet other) {<a name="line.229"></a> +<span class="sourceLineNo">230</span> return this;<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> @Override<a name="line.233"></a> +<span class="sourceLineNo">234</span> public LanguageSet merge(final LanguageSet other) {<a name="line.234"></a> +<span class="sourceLineNo">235</span> return other;<a name="line.235"></a> +<span class="sourceLineNo">236</span> }<a name="line.236"></a> +<span class="sourceLineNo">237</span><a name="line.237"></a> +<span class="sourceLineNo">238</span> @Override<a name="line.238"></a> +<span class="sourceLineNo">239</span> public String toString() {<a name="line.239"></a> +<span class="sourceLineNo">240</span> return "NO_LANGUAGES";<a name="line.240"></a> +<span class="sourceLineNo">241</span> }<a name="line.241"></a> +<span class="sourceLineNo">242</span> };<a name="line.242"></a> +<span class="sourceLineNo">243</span><a name="line.243"></a> +<span class="sourceLineNo">244</span> /**<a name="line.244"></a> +<span class="sourceLineNo">245</span> * Any/all languages.<a name="line.245"></a> +<span class="sourceLineNo">246</span> */<a name="line.246"></a> +<span class="sourceLineNo">247</span> public static final LanguageSet ANY_LANGUAGE = new LanguageSet() {<a name="line.247"></a> +<span class="sourceLineNo">248</span> @Override<a name="line.248"></a> +<span class="sourceLineNo">249</span> public boolean contains(final String language) {<a name="line.249"></a> +<span class="sourceLineNo">250</span> return true;<a name="line.250"></a> +<span class="sourceLineNo">251</span> }<a name="line.251"></a> +<span class="sourceLineNo">252</span><a name="line.252"></a> +<span class="sourceLineNo">253</span> @Override<a name="line.253"></a> +<span class="sourceLineNo">254</span> public String getAny() {<a name="line.254"></a> +<span class="sourceLineNo">255</span> throw new NoSuchElementException("Can't fetch any language from the any language set.");<a name="line.255"></a> +<span class="sourceLineNo">256</span> }<a name="line.256"></a> +<span class="sourceLineNo">257</span><a name="line.257"></a> +<span class="sourceLineNo">258</span> @Override<a name="line.258"></a> +<span class="sourceLineNo">259</span> public boolean isEmpty() {<a name="line.259"></a> +<span class="sourceLineNo">260</span> return false;<a name="line.260"></a> +<span class="sourceLineNo">261</span> }<a name="line.261"></a> +<span class="sourceLineNo">262</span><a name="line.262"></a> +<span class="sourceLineNo">263</span> @Override<a name="line.263"></a> +<span class="sourceLineNo">264</span> public boolean isSingleton() {<a name="line.264"></a> +<span class="sourceLineNo">265</span> return false;<a name="line.265"></a> +<span class="sourceLineNo">266</span> }<a name="line.266"></a> +<span class="sourceLineNo">267</span><a name="line.267"></a> +<span class="sourceLineNo">268</span> @Override<a name="line.268"></a> +<span class="sourceLineNo">269</span> public LanguageSet restrictTo(final LanguageSet other) {<a name="line.269"></a> +<span class="sourceLineNo">270</span> return other;<a name="line.270"></a> +<span class="sourceLineNo">271</span> }<a name="line.271"></a> +<span class="sourceLineNo">272</span><a name="line.272"></a> +<span class="sourceLineNo">273</span> @Override<a name="line.273"></a> +<span class="sourceLineNo">274</span> public LanguageSet merge(final LanguageSet other) {<a name="line.274"></a> +<span class="sourceLineNo">275</span> return other;<a name="line.275"></a> +<span class="sourceLineNo">276</span> }<a name="line.276"></a> +<span class="sourceLineNo">277</span><a name="line.277"></a> +<span class="sourceLineNo">278</span> @Override<a name="line.278"></a> +<span class="sourceLineNo">279</span> public String toString() {<a name="line.279"></a> +<span class="sourceLineNo">280</span> return "ANY_LANGUAGE";<a name="line.280"></a> +<span class="sourceLineNo">281</span> }<a name="line.281"></a> +<span class="sourceLineNo">282</span> };<a name="line.282"></a> +<span class="sourceLineNo">283</span><a name="line.283"></a> +<span class="sourceLineNo">284</span> private Languages(final Set<String> languages) {<a name="line.284"></a> +<span class="sourceLineNo">285</span> this.languages = languages;<a name="line.285"></a> +<span class="sourceLineNo">286</span> }<a name="line.286"></a> +<span class="sourceLineNo">287</span><a name="line.287"></a> +<span class="sourceLineNo">288</span> public Set<String> getLanguages() {<a name="line.288"></a> +<span class="sourceLineNo">289</span> return this.languages;<a name="line.289"></a> +<span class="sourceLineNo">290</span> }<a name="line.290"></a> +<span class="sourceLineNo">291</span>}<a name="line.291"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/NameType.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/NameType.html new file mode 100644 index 0000000000000000000000000000000000000000..af918cd36ee3913d3e505be3b9d0cb6b9091299e --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/NameType.html @@ -0,0 +1,124 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Supported types of names. Unless you are matching particular family names, use {@link #GENERIC}. The<a name="line.21"></a> +<span class="sourceLineNo">022</span> * {@code GENERIC} NameType should work reasonably well for non-name words. The other encodings are<a name="line.22"></a> +<span class="sourceLineNo">023</span> * specifically tuned to family names, and may not work well at all for general text.<a name="line.23"></a> +<span class="sourceLineNo">024</span> *<a name="line.24"></a> +<span class="sourceLineNo">025</span> * @since 1.6<a name="line.25"></a> +<span class="sourceLineNo">026</span> */<a name="line.26"></a> +<span class="sourceLineNo">027</span>public enum NameType {<a name="line.27"></a> +<span class="sourceLineNo">028</span><a name="line.28"></a> +<span class="sourceLineNo">029</span> /** Ashkenazi family names */<a name="line.29"></a> +<span class="sourceLineNo">030</span> ASHKENAZI("ash"),<a name="line.30"></a> +<span class="sourceLineNo">031</span><a name="line.31"></a> +<span class="sourceLineNo">032</span> /** Generic names and words */<a name="line.32"></a> +<span class="sourceLineNo">033</span> GENERIC("gen"),<a name="line.33"></a> +<span class="sourceLineNo">034</span><a name="line.34"></a> +<span class="sourceLineNo">035</span> /** Sephardic family names */<a name="line.35"></a> +<span class="sourceLineNo">036</span> SEPHARDIC("sep");<a name="line.36"></a> +<span class="sourceLineNo">037</span><a name="line.37"></a> +<span class="sourceLineNo">038</span> private final String name;<a name="line.38"></a> +<span class="sourceLineNo">039</span><a name="line.39"></a> +<span class="sourceLineNo">040</span> NameType(final String name) {<a name="line.40"></a> +<span class="sourceLineNo">041</span> this.name = name;<a name="line.41"></a> +<span class="sourceLineNo">042</span> }<a name="line.42"></a> +<span class="sourceLineNo">043</span><a name="line.43"></a> +<span class="sourceLineNo">044</span> /**<a name="line.44"></a> +<span class="sourceLineNo">045</span> * Gets the short version of the name type.<a name="line.45"></a> +<span class="sourceLineNo">046</span> *<a name="line.46"></a> +<span class="sourceLineNo">047</span> * @return the NameType short string<a name="line.47"></a> +<span class="sourceLineNo">048</span> */<a name="line.48"></a> +<span class="sourceLineNo">049</span> public String getName() {<a name="line.49"></a> +<span class="sourceLineNo">050</span> return this.name;<a name="line.50"></a> +<span class="sourceLineNo">051</span> }<a name="line.51"></a> +<span class="sourceLineNo">052</span>}<a name="line.52"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/PhoneticEngine.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/PhoneticEngine.html new file mode 100644 index 0000000000000000000000000000000000000000..fbd480c1326fbd3d55cb486ca1c60490a5f5102d --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/PhoneticEngine.html @@ -0,0 +1,597 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.ArrayList;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.Arrays;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.Collections;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.EnumMap;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.HashSet;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.Iterator;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.LinkedHashSet;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import java.util.List;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import java.util.Locale;<a name="line.28"></a> +<span class="sourceLineNo">029</span>import java.util.Map;<a name="line.29"></a> +<span class="sourceLineNo">030</span>import java.util.Objects;<a name="line.30"></a> +<span class="sourceLineNo">031</span>import java.util.Set;<a name="line.31"></a> +<span class="sourceLineNo">032</span>import java.util.TreeMap;<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span>import org.apache.commons.codec.language.bm.Languages.LanguageSet;<a name="line.34"></a> +<span class="sourceLineNo">035</span>import org.apache.commons.codec.language.bm.Rule.Phoneme;<a name="line.35"></a> +<span class="sourceLineNo">036</span><a name="line.36"></a> +<span class="sourceLineNo">037</span>/**<a name="line.37"></a> +<span class="sourceLineNo">038</span> * Converts words into potential phonetic representations.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * This is a two-stage process. Firstly, the word is converted into a phonetic representation that takes<a name="line.40"></a> +<span class="sourceLineNo">041</span> * into account the likely source language. Next, this phonetic representation is converted into a<a name="line.41"></a> +<span class="sourceLineNo">042</span> * pan-European 'average' representation, allowing comparison between different versions of essentially<a name="line.42"></a> +<span class="sourceLineNo">043</span> * the same word from different languages.<a name="line.43"></a> +<span class="sourceLineNo">044</span> * <p><a name="line.44"></a> +<span class="sourceLineNo">045</span> * This class is intentionally immutable and thread-safe.<a name="line.45"></a> +<span class="sourceLineNo">046</span> * If you wish to alter the settings for a PhoneticEngine, you<a name="line.46"></a> +<span class="sourceLineNo">047</span> * must make a new one with the updated settings.<a name="line.47"></a> +<span class="sourceLineNo">048</span> * <p><a name="line.48"></a> +<span class="sourceLineNo">049</span> * Ported from phoneticengine.php<a name="line.49"></a> +<span class="sourceLineNo">050</span> *<a name="line.50"></a> +<span class="sourceLineNo">051</span> * @since 1.6<a name="line.51"></a> +<span class="sourceLineNo">052</span> */<a name="line.52"></a> +<span class="sourceLineNo">053</span>public class PhoneticEngine {<a name="line.53"></a> +<span class="sourceLineNo">054</span><a name="line.54"></a> +<span class="sourceLineNo">055</span> /**<a name="line.55"></a> +<span class="sourceLineNo">056</span> * Utility for manipulating a set of phonemes as they are being built up. Not intended for use outside<a name="line.56"></a> +<span class="sourceLineNo">057</span> * this package, and probably not outside the {@link PhoneticEngine} class.<a name="line.57"></a> +<span class="sourceLineNo">058</span> *<a name="line.58"></a> +<span class="sourceLineNo">059</span> * @since 1.6<a name="line.59"></a> +<span class="sourceLineNo">060</span> */<a name="line.60"></a> +<span class="sourceLineNo">061</span> static final class PhonemeBuilder {<a name="line.61"></a> +<span class="sourceLineNo">062</span><a name="line.62"></a> +<span class="sourceLineNo">063</span> /**<a name="line.63"></a> +<span class="sourceLineNo">064</span> * An empty builder where all phonemes must come from some set of languages. This will contain a single<a name="line.64"></a> +<span class="sourceLineNo">065</span> * phoneme of zero characters. This can then be appended to. This should be the only way to create a new<a name="line.65"></a> +<span class="sourceLineNo">066</span> * phoneme from scratch.<a name="line.66"></a> +<span class="sourceLineNo">067</span> *<a name="line.67"></a> +<span class="sourceLineNo">068</span> * @param languages the set of languages<a name="line.68"></a> +<span class="sourceLineNo">069</span> * @return a new, empty phoneme builder<a name="line.69"></a> +<span class="sourceLineNo">070</span> */<a name="line.70"></a> +<span class="sourceLineNo">071</span> public static PhonemeBuilder empty(final Languages.LanguageSet languages) {<a name="line.71"></a> +<span class="sourceLineNo">072</span> return new PhonemeBuilder(new Rule.Phoneme("", languages));<a name="line.72"></a> +<span class="sourceLineNo">073</span> }<a name="line.73"></a> +<span class="sourceLineNo">074</span><a name="line.74"></a> +<span class="sourceLineNo">075</span> private final Set<Rule.Phoneme> phonemes;<a name="line.75"></a> +<span class="sourceLineNo">076</span><a name="line.76"></a> +<span class="sourceLineNo">077</span> private PhonemeBuilder(final Rule.Phoneme phoneme) {<a name="line.77"></a> +<span class="sourceLineNo">078</span> this.phonemes = new LinkedHashSet<>();<a name="line.78"></a> +<span class="sourceLineNo">079</span> this.phonemes.add(phoneme);<a name="line.79"></a> +<span class="sourceLineNo">080</span> }<a name="line.80"></a> +<span class="sourceLineNo">081</span><a name="line.81"></a> +<span class="sourceLineNo">082</span> private PhonemeBuilder(final Set<Rule.Phoneme> phonemes) {<a name="line.82"></a> +<span class="sourceLineNo">083</span> this.phonemes = phonemes;<a name="line.83"></a> +<span class="sourceLineNo">084</span> }<a name="line.84"></a> +<span class="sourceLineNo">085</span><a name="line.85"></a> +<span class="sourceLineNo">086</span> /**<a name="line.86"></a> +<span class="sourceLineNo">087</span> * Creates a new phoneme builder containing all phonemes in this one extended by {@code str}.<a name="line.87"></a> +<span class="sourceLineNo">088</span> *<a name="line.88"></a> +<span class="sourceLineNo">089</span> * @param str the characters to append to the phonemes<a name="line.89"></a> +<span class="sourceLineNo">090</span> */<a name="line.90"></a> +<span class="sourceLineNo">091</span> public void append(final CharSequence str) {<a name="line.91"></a> +<span class="sourceLineNo">092</span> for (final Rule.Phoneme ph : this.phonemes) {<a name="line.92"></a> +<span class="sourceLineNo">093</span> ph.append(str);<a name="line.93"></a> +<span class="sourceLineNo">094</span> }<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span><a name="line.96"></a> +<span class="sourceLineNo">097</span> /**<a name="line.97"></a> +<span class="sourceLineNo">098</span> * Applies the given phoneme expression to all phonemes in this phoneme builder.<a name="line.98"></a> +<span class="sourceLineNo">099</span> * <p><a name="line.99"></a> +<span class="sourceLineNo">100</span> * This will lengthen phonemes that have compatible language sets to the expression, and drop those that are<a name="line.100"></a> +<span class="sourceLineNo">101</span> * incompatible.<a name="line.101"></a> +<span class="sourceLineNo">102</span> *<a name="line.102"></a> +<span class="sourceLineNo">103</span> * @param phonemeExpr the expression to apply<a name="line.103"></a> +<span class="sourceLineNo">104</span> * @param maxPhonemes the maximum number of phonemes to build up<a name="line.104"></a> +<span class="sourceLineNo">105</span> */<a name="line.105"></a> +<span class="sourceLineNo">106</span> public void apply(final Rule.PhonemeExpr phonemeExpr, final int maxPhonemes) {<a name="line.106"></a> +<span class="sourceLineNo">107</span> final Set<Rule.Phoneme> newPhonemes = new LinkedHashSet<>(maxPhonemes);<a name="line.107"></a> +<span class="sourceLineNo">108</span><a name="line.108"></a> +<span class="sourceLineNo">109</span> EXPR: for (final Rule.Phoneme left : this.phonemes) {<a name="line.109"></a> +<span class="sourceLineNo">110</span> for (final Rule.Phoneme right : phonemeExpr.getPhonemes()) {<a name="line.110"></a> +<span class="sourceLineNo">111</span> final LanguageSet languages = left.getLanguages().restrictTo(right.getLanguages());<a name="line.111"></a> +<span class="sourceLineNo">112</span> if (!languages.isEmpty()) {<a name="line.112"></a> +<span class="sourceLineNo">113</span> final Rule.Phoneme join = new Phoneme(left, right, languages);<a name="line.113"></a> +<span class="sourceLineNo">114</span> if (newPhonemes.size() < maxPhonemes) {<a name="line.114"></a> +<span class="sourceLineNo">115</span> newPhonemes.add(join);<a name="line.115"></a> +<span class="sourceLineNo">116</span> if (newPhonemes.size() >= maxPhonemes) {<a name="line.116"></a> +<span class="sourceLineNo">117</span> break EXPR;<a name="line.117"></a> +<span class="sourceLineNo">118</span> }<a name="line.118"></a> +<span class="sourceLineNo">119</span> }<a name="line.119"></a> +<span class="sourceLineNo">120</span> }<a name="line.120"></a> +<span class="sourceLineNo">121</span> }<a name="line.121"></a> +<span class="sourceLineNo">122</span> }<a name="line.122"></a> +<span class="sourceLineNo">123</span><a name="line.123"></a> +<span class="sourceLineNo">124</span> this.phonemes.clear();<a name="line.124"></a> +<span class="sourceLineNo">125</span> this.phonemes.addAll(newPhonemes);<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span><a name="line.127"></a> +<span class="sourceLineNo">128</span> /**<a name="line.128"></a> +<span class="sourceLineNo">129</span> * Gets underlying phoneme set. Please don't mutate.<a name="line.129"></a> +<span class="sourceLineNo">130</span> *<a name="line.130"></a> +<span class="sourceLineNo">131</span> * @return the phoneme set<a name="line.131"></a> +<span class="sourceLineNo">132</span> */<a name="line.132"></a> +<span class="sourceLineNo">133</span> public Set<Rule.Phoneme> getPhonemes() {<a name="line.133"></a> +<span class="sourceLineNo">134</span> return this.phonemes;<a name="line.134"></a> +<span class="sourceLineNo">135</span> }<a name="line.135"></a> +<span class="sourceLineNo">136</span><a name="line.136"></a> +<span class="sourceLineNo">137</span> /**<a name="line.137"></a> +<span class="sourceLineNo">138</span> * Stringifies the phoneme set. This produces a single string of the strings of each phoneme,<a name="line.138"></a> +<span class="sourceLineNo">139</span> * joined with a pipe. This is explicitly provided in place of toString as it is a potentially<a name="line.139"></a> +<span class="sourceLineNo">140</span> * expensive operation, which should be avoided when debugging.<a name="line.140"></a> +<span class="sourceLineNo">141</span> *<a name="line.141"></a> +<span class="sourceLineNo">142</span> * @return the stringified phoneme set<a name="line.142"></a> +<span class="sourceLineNo">143</span> */<a name="line.143"></a> +<span class="sourceLineNo">144</span> public String makeString() {<a name="line.144"></a> +<span class="sourceLineNo">145</span> final StringBuilder sb = new StringBuilder();<a name="line.145"></a> +<span class="sourceLineNo">146</span><a name="line.146"></a> +<span class="sourceLineNo">147</span> for (final Rule.Phoneme ph : this.phonemes) {<a name="line.147"></a> +<span class="sourceLineNo">148</span> if (sb.length() > 0) {<a name="line.148"></a> +<span class="sourceLineNo">149</span> sb.append("|");<a name="line.149"></a> +<span class="sourceLineNo">150</span> }<a name="line.150"></a> +<span class="sourceLineNo">151</span> sb.append(ph.getPhonemeText());<a name="line.151"></a> +<span class="sourceLineNo">152</span> }<a name="line.152"></a> +<span class="sourceLineNo">153</span><a name="line.153"></a> +<span class="sourceLineNo">154</span> return sb.toString();<a name="line.154"></a> +<span class="sourceLineNo">155</span> }<a name="line.155"></a> +<span class="sourceLineNo">156</span> }<a name="line.156"></a> +<span class="sourceLineNo">157</span><a name="line.157"></a> +<span class="sourceLineNo">158</span> /**<a name="line.158"></a> +<span class="sourceLineNo">159</span> * A function closure capturing the application of a list of rules to an input sequence at a particular offset.<a name="line.159"></a> +<span class="sourceLineNo">160</span> * After invocation, the values {@code i} and {@code found} are updated. {@code i} points to the<a name="line.160"></a> +<span class="sourceLineNo">161</span> * index of the next char in {@code input} that must be processed next (the input up to that index having been<a name="line.161"></a> +<span class="sourceLineNo">162</span> * processed already), and {@code found} indicates if a matching rule was found or not. In the case where a<a name="line.162"></a> +<span class="sourceLineNo">163</span> * matching rule was found, {@code phonemeBuilder} is replaced with a new builder containing the phonemes<a name="line.163"></a> +<span class="sourceLineNo">164</span> * updated by the matching rule.<a name="line.164"></a> +<span class="sourceLineNo">165</span> *<a name="line.165"></a> +<span class="sourceLineNo">166</span> * Although this class is not thread-safe (it has mutable unprotected fields), it is not shared between threads<a name="line.166"></a> +<span class="sourceLineNo">167</span> * as it is constructed as needed by the calling methods.<a name="line.167"></a> +<span class="sourceLineNo">168</span> * @since 1.6<a name="line.168"></a> +<span class="sourceLineNo">169</span> */<a name="line.169"></a> +<span class="sourceLineNo">170</span> private static final class RulesApplication {<a name="line.170"></a> +<span class="sourceLineNo">171</span> private final Map<String, List<Rule>> finalRules;<a name="line.171"></a> +<span class="sourceLineNo">172</span> private final CharSequence input;<a name="line.172"></a> +<span class="sourceLineNo">173</span><a name="line.173"></a> +<span class="sourceLineNo">174</span> private final PhonemeBuilder phonemeBuilder;<a name="line.174"></a> +<span class="sourceLineNo">175</span> private int i;<a name="line.175"></a> +<span class="sourceLineNo">176</span> private final int maxPhonemes;<a name="line.176"></a> +<span class="sourceLineNo">177</span> private boolean found;<a name="line.177"></a> +<span class="sourceLineNo">178</span><a name="line.178"></a> +<span class="sourceLineNo">179</span> public RulesApplication(final Map<String, List<Rule>> finalRules, final CharSequence input,<a name="line.179"></a> +<span class="sourceLineNo">180</span> final PhonemeBuilder phonemeBuilder, final int i, final int maxPhonemes) {<a name="line.180"></a> +<span class="sourceLineNo">181</span> Objects.requireNonNull(finalRules, "finalRules");<a name="line.181"></a> +<span class="sourceLineNo">182</span> this.finalRules = finalRules;<a name="line.182"></a> +<span class="sourceLineNo">183</span> this.phonemeBuilder = phonemeBuilder;<a name="line.183"></a> +<span class="sourceLineNo">184</span> this.input = input;<a name="line.184"></a> +<span class="sourceLineNo">185</span> this.i = i;<a name="line.185"></a> +<span class="sourceLineNo">186</span> this.maxPhonemes = maxPhonemes;<a name="line.186"></a> +<span class="sourceLineNo">187</span> }<a name="line.187"></a> +<span class="sourceLineNo">188</span><a name="line.188"></a> +<span class="sourceLineNo">189</span> public int getI() {<a name="line.189"></a> +<span class="sourceLineNo">190</span> return this.i;<a name="line.190"></a> +<span class="sourceLineNo">191</span> }<a name="line.191"></a> +<span class="sourceLineNo">192</span><a name="line.192"></a> +<span class="sourceLineNo">193</span> public PhonemeBuilder getPhonemeBuilder() {<a name="line.193"></a> +<span class="sourceLineNo">194</span> return this.phonemeBuilder;<a name="line.194"></a> +<span class="sourceLineNo">195</span> }<a name="line.195"></a> +<span class="sourceLineNo">196</span><a name="line.196"></a> +<span class="sourceLineNo">197</span> /**<a name="line.197"></a> +<span class="sourceLineNo">198</span> * Invokes the rules. Loops over the rules list, stopping at the first one that has a matching context<a name="line.198"></a> +<span class="sourceLineNo">199</span> * and pattern. Then applies this rule to the phoneme builder to produce updated phonemes. If there was no<a name="line.199"></a> +<span class="sourceLineNo">200</span> * match, {@code i} is advanced one and the character is silently dropped from the phonetic spelling.<a name="line.200"></a> +<span class="sourceLineNo">201</span> *<a name="line.201"></a> +<span class="sourceLineNo">202</span> * @return {@code this}<a name="line.202"></a> +<span class="sourceLineNo">203</span> */<a name="line.203"></a> +<span class="sourceLineNo">204</span> public RulesApplication invoke() {<a name="line.204"></a> +<span class="sourceLineNo">205</span> this.found = false;<a name="line.205"></a> +<span class="sourceLineNo">206</span> int patternLength = 1;<a name="line.206"></a> +<span class="sourceLineNo">207</span> final List<Rule> rules = this.finalRules.get(input.subSequence(i, i+patternLength));<a name="line.207"></a> +<span class="sourceLineNo">208</span> if (rules != null) {<a name="line.208"></a> +<span class="sourceLineNo">209</span> for (final Rule rule : rules) {<a name="line.209"></a> +<span class="sourceLineNo">210</span> final String pattern = rule.getPattern();<a name="line.210"></a> +<span class="sourceLineNo">211</span> patternLength = pattern.length();<a name="line.211"></a> +<span class="sourceLineNo">212</span> if (rule.patternAndContextMatches(this.input, this.i)) {<a name="line.212"></a> +<span class="sourceLineNo">213</span> this.phonemeBuilder.apply(rule.getPhoneme(), maxPhonemes);<a name="line.213"></a> +<span class="sourceLineNo">214</span> this.found = true;<a name="line.214"></a> +<span class="sourceLineNo">215</span> break;<a name="line.215"></a> +<span class="sourceLineNo">216</span> }<a name="line.216"></a> +<span class="sourceLineNo">217</span> }<a name="line.217"></a> +<span class="sourceLineNo">218</span> }<a name="line.218"></a> +<span class="sourceLineNo">219</span><a name="line.219"></a> +<span class="sourceLineNo">220</span> if (!this.found) {<a name="line.220"></a> +<span class="sourceLineNo">221</span> patternLength = 1;<a name="line.221"></a> +<span class="sourceLineNo">222</span> }<a name="line.222"></a> +<span class="sourceLineNo">223</span><a name="line.223"></a> +<span class="sourceLineNo">224</span> this.i += patternLength;<a name="line.224"></a> +<span class="sourceLineNo">225</span> return this;<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span><a name="line.227"></a> +<span class="sourceLineNo">228</span> public boolean isFound() {<a name="line.228"></a> +<span class="sourceLineNo">229</span> return this.found;<a name="line.229"></a> +<span class="sourceLineNo">230</span> }<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> private static final Map<NameType, Set<String>> NAME_PREFIXES = new EnumMap<>(NameType.class);<a name="line.233"></a> +<span class="sourceLineNo">234</span><a name="line.234"></a> +<span class="sourceLineNo">235</span> static {<a name="line.235"></a> +<span class="sourceLineNo">236</span> NAME_PREFIXES.put(NameType.ASHKENAZI,<a name="line.236"></a> +<span class="sourceLineNo">237</span> Collections.unmodifiableSet(<a name="line.237"></a> +<span class="sourceLineNo">238</span> new HashSet<>(Arrays.asList("bar", "ben", "da", "de", "van", "von"))));<a name="line.238"></a> +<span class="sourceLineNo">239</span> NAME_PREFIXES.put(NameType.SEPHARDIC,<a name="line.239"></a> +<span class="sourceLineNo">240</span> Collections.unmodifiableSet(<a name="line.240"></a> +<span class="sourceLineNo">241</span> new HashSet<>(Arrays.asList("al", "el", "da", "dal", "de", "del", "dela", "de la",<a name="line.241"></a> +<span class="sourceLineNo">242</span> "della", "des", "di", "do", "dos", "du", "van", "von"))));<a name="line.242"></a> +<span class="sourceLineNo">243</span> NAME_PREFIXES.put(NameType.GENERIC,<a name="line.243"></a> +<span class="sourceLineNo">244</span> Collections.unmodifiableSet(<a name="line.244"></a> +<span class="sourceLineNo">245</span> new HashSet<>(Arrays.asList("da", "dal", "de", "del", "dela", "de la", "della",<a name="line.245"></a> +<span class="sourceLineNo">246</span> "des", "di", "do", "dos", "du", "van", "von"))));<a name="line.246"></a> +<span class="sourceLineNo">247</span> }<a name="line.247"></a> +<span class="sourceLineNo">248</span><a name="line.248"></a> +<span class="sourceLineNo">249</span> /**<a name="line.249"></a> +<span class="sourceLineNo">250</span> * Joins some strings with an internal separator.<a name="line.250"></a> +<span class="sourceLineNo">251</span> * @param strings Strings to join<a name="line.251"></a> +<span class="sourceLineNo">252</span> * @param sep String to separate them with<a name="line.252"></a> +<span class="sourceLineNo">253</span> * @return a single String consisting of each element of {@code strings} interleaved by {@code sep}<a name="line.253"></a> +<span class="sourceLineNo">254</span> */<a name="line.254"></a> +<span class="sourceLineNo">255</span> private static String join(final Iterable<String> strings, final String sep) {<a name="line.255"></a> +<span class="sourceLineNo">256</span> final StringBuilder sb = new StringBuilder();<a name="line.256"></a> +<span class="sourceLineNo">257</span> final Iterator<String> si = strings.iterator();<a name="line.257"></a> +<span class="sourceLineNo">258</span> if (si.hasNext()) {<a name="line.258"></a> +<span class="sourceLineNo">259</span> sb.append(si.next());<a name="line.259"></a> +<span class="sourceLineNo">260</span> }<a name="line.260"></a> +<span class="sourceLineNo">261</span> while (si.hasNext()) {<a name="line.261"></a> +<span class="sourceLineNo">262</span> sb.append(sep).append(si.next());<a name="line.262"></a> +<span class="sourceLineNo">263</span> }<a name="line.263"></a> +<span class="sourceLineNo">264</span><a name="line.264"></a> +<span class="sourceLineNo">265</span> return sb.toString();<a name="line.265"></a> +<span class="sourceLineNo">266</span> }<a name="line.266"></a> +<span class="sourceLineNo">267</span><a name="line.267"></a> +<span class="sourceLineNo">268</span> private static final int DEFAULT_MAX_PHONEMES = 20;<a name="line.268"></a> +<span class="sourceLineNo">269</span><a name="line.269"></a> +<span class="sourceLineNo">270</span> private final Lang lang;<a name="line.270"></a> +<span class="sourceLineNo">271</span><a name="line.271"></a> +<span class="sourceLineNo">272</span> private final NameType nameType;<a name="line.272"></a> +<span class="sourceLineNo">273</span><a name="line.273"></a> +<span class="sourceLineNo">274</span> private final RuleType ruleType;<a name="line.274"></a> +<span class="sourceLineNo">275</span><a name="line.275"></a> +<span class="sourceLineNo">276</span> private final boolean concat;<a name="line.276"></a> +<span class="sourceLineNo">277</span><a name="line.277"></a> +<span class="sourceLineNo">278</span> private final int maxPhonemes;<a name="line.278"></a> +<span class="sourceLineNo">279</span><a name="line.279"></a> +<span class="sourceLineNo">280</span> /**<a name="line.280"></a> +<span class="sourceLineNo">281</span> * Generates a new, fully-configured phonetic engine.<a name="line.281"></a> +<span class="sourceLineNo">282</span> *<a name="line.282"></a> +<span class="sourceLineNo">283</span> * @param nameType<a name="line.283"></a> +<span class="sourceLineNo">284</span> * the type of names it will use<a name="line.284"></a> +<span class="sourceLineNo">285</span> * @param ruleType<a name="line.285"></a> +<span class="sourceLineNo">286</span> * the type of rules it will apply<a name="line.286"></a> +<span class="sourceLineNo">287</span> * @param concat<a name="line.287"></a> +<span class="sourceLineNo">288</span> * if it will concatenate multiple encodings<a name="line.288"></a> +<span class="sourceLineNo">289</span> */<a name="line.289"></a> +<span class="sourceLineNo">290</span> public PhoneticEngine(final NameType nameType, final RuleType ruleType, final boolean concat) {<a name="line.290"></a> +<span class="sourceLineNo">291</span> this(nameType, ruleType, concat, DEFAULT_MAX_PHONEMES);<a name="line.291"></a> +<span class="sourceLineNo">292</span> }<a name="line.292"></a> +<span class="sourceLineNo">293</span><a name="line.293"></a> +<span class="sourceLineNo">294</span> /**<a name="line.294"></a> +<span class="sourceLineNo">295</span> * Generates a new, fully-configured phonetic engine.<a name="line.295"></a> +<span class="sourceLineNo">296</span> *<a name="line.296"></a> +<span class="sourceLineNo">297</span> * @param nameType<a name="line.297"></a> +<span class="sourceLineNo">298</span> * the type of names it will use<a name="line.298"></a> +<span class="sourceLineNo">299</span> * @param ruleType<a name="line.299"></a> +<span class="sourceLineNo">300</span> * the type of rules it will apply<a name="line.300"></a> +<span class="sourceLineNo">301</span> * @param concat<a name="line.301"></a> +<span class="sourceLineNo">302</span> * if it will concatenate multiple encodings<a name="line.302"></a> +<span class="sourceLineNo">303</span> * @param maxPhonemes<a name="line.303"></a> +<span class="sourceLineNo">304</span> * the maximum number of phonemes that will be handled<a name="line.304"></a> +<span class="sourceLineNo">305</span> * @since 1.7<a name="line.305"></a> +<span class="sourceLineNo">306</span> */<a name="line.306"></a> +<span class="sourceLineNo">307</span> public PhoneticEngine(final NameType nameType, final RuleType ruleType, final boolean concat,<a name="line.307"></a> +<span class="sourceLineNo">308</span> final int maxPhonemes) {<a name="line.308"></a> +<span class="sourceLineNo">309</span> if (ruleType == RuleType.RULES) {<a name="line.309"></a> +<span class="sourceLineNo">310</span> throw new IllegalArgumentException("ruleType must not be " + RuleType.RULES);<a name="line.310"></a> +<span class="sourceLineNo">311</span> }<a name="line.311"></a> +<span class="sourceLineNo">312</span> this.nameType = nameType;<a name="line.312"></a> +<span class="sourceLineNo">313</span> this.ruleType = ruleType;<a name="line.313"></a> +<span class="sourceLineNo">314</span> this.concat = concat;<a name="line.314"></a> +<span class="sourceLineNo">315</span> this.lang = Lang.instance(nameType);<a name="line.315"></a> +<span class="sourceLineNo">316</span> this.maxPhonemes = maxPhonemes;<a name="line.316"></a> +<span class="sourceLineNo">317</span> }<a name="line.317"></a> +<span class="sourceLineNo">318</span><a name="line.318"></a> +<span class="sourceLineNo">319</span> /**<a name="line.319"></a> +<span class="sourceLineNo">320</span> * Applies the final rules to convert from a language-specific phonetic representation to a<a name="line.320"></a> +<span class="sourceLineNo">321</span> * language-independent representation.<a name="line.321"></a> +<span class="sourceLineNo">322</span> *<a name="line.322"></a> +<span class="sourceLineNo">323</span> * @param phonemeBuilder the current phonemes<a name="line.323"></a> +<span class="sourceLineNo">324</span> * @param finalRules the final rules to apply<a name="line.324"></a> +<span class="sourceLineNo">325</span> * @return the resulting phonemes<a name="line.325"></a> +<span class="sourceLineNo">326</span> */<a name="line.326"></a> +<span class="sourceLineNo">327</span> private PhonemeBuilder applyFinalRules(final PhonemeBuilder phonemeBuilder,<a name="line.327"></a> +<span class="sourceLineNo">328</span> final Map<String, List<Rule>> finalRules) {<a name="line.328"></a> +<span class="sourceLineNo">329</span> Objects.requireNonNull(finalRules, "finalRules");<a name="line.329"></a> +<span class="sourceLineNo">330</span> if (finalRules.isEmpty()) {<a name="line.330"></a> +<span class="sourceLineNo">331</span> return phonemeBuilder;<a name="line.331"></a> +<span class="sourceLineNo">332</span> }<a name="line.332"></a> +<span class="sourceLineNo">333</span><a name="line.333"></a> +<span class="sourceLineNo">334</span> final Map<Rule.Phoneme, Rule.Phoneme> phonemes =<a name="line.334"></a> +<span class="sourceLineNo">335</span> new TreeMap<>(Rule.Phoneme.COMPARATOR);<a name="line.335"></a> +<span class="sourceLineNo">336</span><a name="line.336"></a> +<span class="sourceLineNo">337</span> for (final Rule.Phoneme phoneme : phonemeBuilder.getPhonemes()) {<a name="line.337"></a> +<span class="sourceLineNo">338</span> PhonemeBuilder subBuilder = PhonemeBuilder.empty(phoneme.getLanguages());<a name="line.338"></a> +<span class="sourceLineNo">339</span> final String phonemeText = phoneme.getPhonemeText().toString();<a name="line.339"></a> +<span class="sourceLineNo">340</span><a name="line.340"></a> +<span class="sourceLineNo">341</span> for (int i = 0; i < phonemeText.length();) {<a name="line.341"></a> +<span class="sourceLineNo">342</span> final RulesApplication rulesApplication =<a name="line.342"></a> +<span class="sourceLineNo">343</span> new RulesApplication(finalRules, phonemeText, subBuilder, i, maxPhonemes).invoke();<a name="line.343"></a> +<span class="sourceLineNo">344</span> final boolean found = rulesApplication.isFound();<a name="line.344"></a> +<span class="sourceLineNo">345</span> subBuilder = rulesApplication.getPhonemeBuilder();<a name="line.345"></a> +<span class="sourceLineNo">346</span><a name="line.346"></a> +<span class="sourceLineNo">347</span> if (!found) {<a name="line.347"></a> +<span class="sourceLineNo">348</span> // not found, appending as-is<a name="line.348"></a> +<span class="sourceLineNo">349</span> subBuilder.append(phonemeText.subSequence(i, i + 1));<a name="line.349"></a> +<span class="sourceLineNo">350</span> }<a name="line.350"></a> +<span class="sourceLineNo">351</span><a name="line.351"></a> +<span class="sourceLineNo">352</span> i = rulesApplication.getI();<a name="line.352"></a> +<span class="sourceLineNo">353</span> }<a name="line.353"></a> +<span class="sourceLineNo">354</span><a name="line.354"></a> +<span class="sourceLineNo">355</span> // the phonemes map orders the phonemes only based on their text, but ignores the language set<a name="line.355"></a> +<span class="sourceLineNo">356</span> // when adding new phonemes, check for equal phonemes and merge their language set, otherwise<a name="line.356"></a> +<span class="sourceLineNo">357</span> // phonemes with the same text but different language set get lost<a name="line.357"></a> +<span class="sourceLineNo">358</span> for (final Rule.Phoneme newPhoneme : subBuilder.getPhonemes()) {<a name="line.358"></a> +<span class="sourceLineNo">359</span> if (phonemes.containsKey(newPhoneme)) {<a name="line.359"></a> +<span class="sourceLineNo">360</span> final Rule.Phoneme oldPhoneme = phonemes.remove(newPhoneme);<a name="line.360"></a> +<span class="sourceLineNo">361</span> final Rule.Phoneme mergedPhoneme = oldPhoneme.mergeWithLanguage(newPhoneme.getLanguages());<a name="line.361"></a> +<span class="sourceLineNo">362</span> phonemes.put(mergedPhoneme, mergedPhoneme);<a name="line.362"></a> +<span class="sourceLineNo">363</span> } else {<a name="line.363"></a> +<span class="sourceLineNo">364</span> phonemes.put(newPhoneme, newPhoneme);<a name="line.364"></a> +<span class="sourceLineNo">365</span> }<a name="line.365"></a> +<span class="sourceLineNo">366</span> }<a name="line.366"></a> +<span class="sourceLineNo">367</span> }<a name="line.367"></a> +<span class="sourceLineNo">368</span><a name="line.368"></a> +<span class="sourceLineNo">369</span> return new PhonemeBuilder(phonemes.keySet());<a name="line.369"></a> +<span class="sourceLineNo">370</span> }<a name="line.370"></a> +<span class="sourceLineNo">371</span><a name="line.371"></a> +<span class="sourceLineNo">372</span> /**<a name="line.372"></a> +<span class="sourceLineNo">373</span> * Encodes a string to its phonetic representation.<a name="line.373"></a> +<span class="sourceLineNo">374</span> *<a name="line.374"></a> +<span class="sourceLineNo">375</span> * @param input<a name="line.375"></a> +<span class="sourceLineNo">376</span> * the String to encode<a name="line.376"></a> +<span class="sourceLineNo">377</span> * @return the encoding of the input<a name="line.377"></a> +<span class="sourceLineNo">378</span> */<a name="line.378"></a> +<span class="sourceLineNo">379</span> public String encode(final String input) {<a name="line.379"></a> +<span class="sourceLineNo">380</span> final Languages.LanguageSet languageSet = this.lang.guessLanguages(input);<a name="line.380"></a> +<span class="sourceLineNo">381</span> return encode(input, languageSet);<a name="line.381"></a> +<span class="sourceLineNo">382</span> }<a name="line.382"></a> +<span class="sourceLineNo">383</span><a name="line.383"></a> +<span class="sourceLineNo">384</span> /**<a name="line.384"></a> +<span class="sourceLineNo">385</span> * Encodes an input string into an output phonetic representation, given a set of possible origin languages.<a name="line.385"></a> +<span class="sourceLineNo">386</span> *<a name="line.386"></a> +<span class="sourceLineNo">387</span> * @param input<a name="line.387"></a> +<span class="sourceLineNo">388</span> * String to phoneticise; a String with dashes or spaces separating each word<a name="line.388"></a> +<span class="sourceLineNo">389</span> * @param languageSet<a name="line.389"></a> +<span class="sourceLineNo">390</span> * set of possible origin languages<a name="line.390"></a> +<span class="sourceLineNo">391</span> * @return a phonetic representation of the input; a String containing '-'-separated phonetic representations of the<a name="line.391"></a> +<span class="sourceLineNo">392</span> * input<a name="line.392"></a> +<span class="sourceLineNo">393</span> */<a name="line.393"></a> +<span class="sourceLineNo">394</span> public String encode(String input, final Languages.LanguageSet languageSet) {<a name="line.394"></a> +<span class="sourceLineNo">395</span> final Map<String, List<Rule>> rules = Rule.getInstanceMap(this.nameType, RuleType.RULES, languageSet);<a name="line.395"></a> +<span class="sourceLineNo">396</span> // rules common across many (all) languages<a name="line.396"></a> +<span class="sourceLineNo">397</span> final Map<String, List<Rule>> finalRules1 = Rule.getInstanceMap(this.nameType, this.ruleType, "common");<a name="line.397"></a> +<span class="sourceLineNo">398</span> // rules that apply to a specific language that may be ambiguous or wrong if applied to other languages<a name="line.398"></a> +<span class="sourceLineNo">399</span> final Map<String, List<Rule>> finalRules2 = Rule.getInstanceMap(this.nameType, this.ruleType, languageSet);<a name="line.399"></a> +<span class="sourceLineNo">400</span><a name="line.400"></a> +<span class="sourceLineNo">401</span> // tidy the input<a name="line.401"></a> +<span class="sourceLineNo">402</span> // lower case is a locale-dependent operation<a name="line.402"></a> +<span class="sourceLineNo">403</span> input = input.toLowerCase(Locale.ENGLISH).replace('-', ' ').trim();<a name="line.403"></a> +<span class="sourceLineNo">404</span><a name="line.404"></a> +<span class="sourceLineNo">405</span> if (this.nameType == NameType.GENERIC) {<a name="line.405"></a> +<span class="sourceLineNo">406</span> if (input.length() >= 2 && input.substring(0, 2).equals("d'")) { // check for d'<a name="line.406"></a> +<span class="sourceLineNo">407</span> final String remainder = input.substring(2);<a name="line.407"></a> +<span class="sourceLineNo">408</span> final String combined = "d" + remainder;<a name="line.408"></a> +<span class="sourceLineNo">409</span> return "(" + encode(remainder) + ")-(" + encode(combined) + ")";<a name="line.409"></a> +<span class="sourceLineNo">410</span> }<a name="line.410"></a> +<span class="sourceLineNo">411</span> for (final String l : NAME_PREFIXES.get(this.nameType)) {<a name="line.411"></a> +<span class="sourceLineNo">412</span> // handle generic prefixes<a name="line.412"></a> +<span class="sourceLineNo">413</span> if (input.startsWith(l + " ")) {<a name="line.413"></a> +<span class="sourceLineNo">414</span> // check for any prefix in the words list<a name="line.414"></a> +<span class="sourceLineNo">415</span> final String remainder = input.substring(l.length() + 1); // input without the prefix<a name="line.415"></a> +<span class="sourceLineNo">416</span> final String combined = l + remainder; // input with prefix without space<a name="line.416"></a> +<span class="sourceLineNo">417</span> return "(" + encode(remainder) + ")-(" + encode(combined) + ")";<a name="line.417"></a> +<span class="sourceLineNo">418</span> }<a name="line.418"></a> +<span class="sourceLineNo">419</span> }<a name="line.419"></a> +<span class="sourceLineNo">420</span> }<a name="line.420"></a> +<span class="sourceLineNo">421</span><a name="line.421"></a> +<span class="sourceLineNo">422</span> final List<String> words = Arrays.asList(input.split("\\s+"));<a name="line.422"></a> +<span class="sourceLineNo">423</span> final List<String> words2 = new ArrayList<>();<a name="line.423"></a> +<span class="sourceLineNo">424</span><a name="line.424"></a> +<span class="sourceLineNo">425</span> // special-case handling of word prefixes based upon the name type<a name="line.425"></a> +<span class="sourceLineNo">426</span> switch (this.nameType) {<a name="line.426"></a> +<span class="sourceLineNo">427</span> case SEPHARDIC:<a name="line.427"></a> +<span class="sourceLineNo">428</span> for (final String aWord : words) {<a name="line.428"></a> +<span class="sourceLineNo">429</span> final String[] parts = aWord.split("'");<a name="line.429"></a> +<span class="sourceLineNo">430</span> final String lastPart = parts[parts.length - 1];<a name="line.430"></a> +<span class="sourceLineNo">431</span> words2.add(lastPart);<a name="line.431"></a> +<span class="sourceLineNo">432</span> }<a name="line.432"></a> +<span class="sourceLineNo">433</span> words2.removeAll(NAME_PREFIXES.get(this.nameType));<a name="line.433"></a> +<span class="sourceLineNo">434</span> break;<a name="line.434"></a> +<span class="sourceLineNo">435</span> case ASHKENAZI:<a name="line.435"></a> +<span class="sourceLineNo">436</span> words2.addAll(words);<a name="line.436"></a> +<span class="sourceLineNo">437</span> words2.removeAll(NAME_PREFIXES.get(this.nameType));<a name="line.437"></a> +<span class="sourceLineNo">438</span> break;<a name="line.438"></a> +<span class="sourceLineNo">439</span> case GENERIC:<a name="line.439"></a> +<span class="sourceLineNo">440</span> words2.addAll(words);<a name="line.440"></a> +<span class="sourceLineNo">441</span> break;<a name="line.441"></a> +<span class="sourceLineNo">442</span> default:<a name="line.442"></a> +<span class="sourceLineNo">443</span> throw new IllegalStateException("Unreachable case: " + this.nameType);<a name="line.443"></a> +<span class="sourceLineNo">444</span> }<a name="line.444"></a> +<span class="sourceLineNo">445</span><a name="line.445"></a> +<span class="sourceLineNo">446</span> if (this.concat) {<a name="line.446"></a> +<span class="sourceLineNo">447</span> // concat mode enabled<a name="line.447"></a> +<span class="sourceLineNo">448</span> input = join(words2, " ");<a name="line.448"></a> +<span class="sourceLineNo">449</span> } else if (words2.size() == 1) {<a name="line.449"></a> +<span class="sourceLineNo">450</span> // not a multi-word name<a name="line.450"></a> +<span class="sourceLineNo">451</span> input = words.iterator().next();<a name="line.451"></a> +<span class="sourceLineNo">452</span> } else {<a name="line.452"></a> +<span class="sourceLineNo">453</span> // encode each word in a multi-word name separately (normally used for approx matches)<a name="line.453"></a> +<span class="sourceLineNo">454</span> final StringBuilder result = new StringBuilder();<a name="line.454"></a> +<span class="sourceLineNo">455</span> for (final String word : words2) {<a name="line.455"></a> +<span class="sourceLineNo">456</span> result.append("-").append(encode(word));<a name="line.456"></a> +<span class="sourceLineNo">457</span> }<a name="line.457"></a> +<span class="sourceLineNo">458</span> // return the result without the leading "-"<a name="line.458"></a> +<span class="sourceLineNo">459</span> return result.substring(1);<a name="line.459"></a> +<span class="sourceLineNo">460</span> }<a name="line.460"></a> +<span class="sourceLineNo">461</span><a name="line.461"></a> +<span class="sourceLineNo">462</span> PhonemeBuilder phonemeBuilder = PhonemeBuilder.empty(languageSet);<a name="line.462"></a> +<span class="sourceLineNo">463</span><a name="line.463"></a> +<span class="sourceLineNo">464</span> // loop over each char in the input - we will handle the increment manually<a name="line.464"></a> +<span class="sourceLineNo">465</span> for (int i = 0; i < input.length();) {<a name="line.465"></a> +<span class="sourceLineNo">466</span> final RulesApplication rulesApplication =<a name="line.466"></a> +<span class="sourceLineNo">467</span> new RulesApplication(rules, input, phonemeBuilder, i, maxPhonemes).invoke();<a name="line.467"></a> +<span class="sourceLineNo">468</span> i = rulesApplication.getI();<a name="line.468"></a> +<span class="sourceLineNo">469</span> phonemeBuilder = rulesApplication.getPhonemeBuilder();<a name="line.469"></a> +<span class="sourceLineNo">470</span> }<a name="line.470"></a> +<span class="sourceLineNo">471</span><a name="line.471"></a> +<span class="sourceLineNo">472</span> // Apply the general rules<a name="line.472"></a> +<span class="sourceLineNo">473</span> phonemeBuilder = applyFinalRules(phonemeBuilder, finalRules1);<a name="line.473"></a> +<span class="sourceLineNo">474</span> // Apply the language-specific rules<a name="line.474"></a> +<span class="sourceLineNo">475</span> phonemeBuilder = applyFinalRules(phonemeBuilder, finalRules2);<a name="line.475"></a> +<span class="sourceLineNo">476</span><a name="line.476"></a> +<span class="sourceLineNo">477</span> return phonemeBuilder.makeString();<a name="line.477"></a> +<span class="sourceLineNo">478</span> }<a name="line.478"></a> +<span class="sourceLineNo">479</span><a name="line.479"></a> +<span class="sourceLineNo">480</span> /**<a name="line.480"></a> +<span class="sourceLineNo">481</span> * Gets the Lang language guessing rules being used.<a name="line.481"></a> +<span class="sourceLineNo">482</span> *<a name="line.482"></a> +<span class="sourceLineNo">483</span> * @return the Lang in use<a name="line.483"></a> +<span class="sourceLineNo">484</span> */<a name="line.484"></a> +<span class="sourceLineNo">485</span> public Lang getLang() {<a name="line.485"></a> +<span class="sourceLineNo">486</span> return this.lang;<a name="line.486"></a> +<span class="sourceLineNo">487</span> }<a name="line.487"></a> +<span class="sourceLineNo">488</span><a name="line.488"></a> +<span class="sourceLineNo">489</span> /**<a name="line.489"></a> +<span class="sourceLineNo">490</span> * Gets the NameType being used.<a name="line.490"></a> +<span class="sourceLineNo">491</span> *<a name="line.491"></a> +<span class="sourceLineNo">492</span> * @return the NameType in use<a name="line.492"></a> +<span class="sourceLineNo">493</span> */<a name="line.493"></a> +<span class="sourceLineNo">494</span> public NameType getNameType() {<a name="line.494"></a> +<span class="sourceLineNo">495</span> return this.nameType;<a name="line.495"></a> +<span class="sourceLineNo">496</span> }<a name="line.496"></a> +<span class="sourceLineNo">497</span><a name="line.497"></a> +<span class="sourceLineNo">498</span> /**<a name="line.498"></a> +<span class="sourceLineNo">499</span> * Gets the RuleType being used.<a name="line.499"></a> +<span class="sourceLineNo">500</span> *<a name="line.500"></a> +<span class="sourceLineNo">501</span> * @return the RuleType in use<a name="line.501"></a> +<span class="sourceLineNo">502</span> */<a name="line.502"></a> +<span class="sourceLineNo">503</span> public RuleType getRuleType() {<a name="line.503"></a> +<span class="sourceLineNo">504</span> return this.ruleType;<a name="line.504"></a> +<span class="sourceLineNo">505</span> }<a name="line.505"></a> +<span class="sourceLineNo">506</span><a name="line.506"></a> +<span class="sourceLineNo">507</span> /**<a name="line.507"></a> +<span class="sourceLineNo">508</span> * Gets if multiple phonetic encodings are concatenated or if just the first one is kept.<a name="line.508"></a> +<span class="sourceLineNo">509</span> *<a name="line.509"></a> +<span class="sourceLineNo">510</span> * @return true if multiple phonetic encodings are returned, false if just the first is<a name="line.510"></a> +<span class="sourceLineNo">511</span> */<a name="line.511"></a> +<span class="sourceLineNo">512</span> public boolean isConcat() {<a name="line.512"></a> +<span class="sourceLineNo">513</span> return this.concat;<a name="line.513"></a> +<span class="sourceLineNo">514</span> }<a name="line.514"></a> +<span class="sourceLineNo">515</span><a name="line.515"></a> +<span class="sourceLineNo">516</span> /**<a name="line.516"></a> +<span class="sourceLineNo">517</span> * Gets the maximum number of phonemes the engine will calculate for a given input.<a name="line.517"></a> +<span class="sourceLineNo">518</span> *<a name="line.518"></a> +<span class="sourceLineNo">519</span> * @return the maximum number of phonemes<a name="line.519"></a> +<span class="sourceLineNo">520</span> * @since 1.7<a name="line.520"></a> +<span class="sourceLineNo">521</span> */<a name="line.521"></a> +<span class="sourceLineNo">522</span> public int getMaxPhonemes() {<a name="line.522"></a> +<span class="sourceLineNo">523</span> return this.maxPhonemes;<a name="line.523"></a> +<span class="sourceLineNo">524</span> }<a name="line.524"></a> +<span class="sourceLineNo">525</span>}<a name="line.525"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.Phoneme.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.Phoneme.html new file mode 100644 index 0000000000000000000000000000000000000000..f62994dca13e1019a68ab6655dcc91d3eb4ba987 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.Phoneme.html @@ -0,0 +1,778 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.ArrayList;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.Arrays;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.Collections;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.Comparator;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.EnumMap;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.HashMap;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.HashSet;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import java.util.List;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import java.util.Map;<a name="line.28"></a> +<span class="sourceLineNo">029</span>import java.util.Scanner;<a name="line.29"></a> +<span class="sourceLineNo">030</span>import java.util.Set;<a name="line.30"></a> +<span class="sourceLineNo">031</span>import java.util.regex.Matcher;<a name="line.31"></a> +<span class="sourceLineNo">032</span>import java.util.regex.Pattern;<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span>import org.apache.commons.codec.Resources;<a name="line.34"></a> +<span class="sourceLineNo">035</span>import org.apache.commons.codec.language.bm.Languages.LanguageSet;<a name="line.35"></a> +<span class="sourceLineNo">036</span><a name="line.36"></a> +<span class="sourceLineNo">037</span>/**<a name="line.37"></a> +<span class="sourceLineNo">038</span> * A phoneme rule.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * Rules have a pattern, left context, right context, output phoneme, set of languages for which they apply<a name="line.40"></a> +<span class="sourceLineNo">041</span> * and a logical flag indicating if all languages must be in play. A rule matches if:<a name="line.41"></a> +<span class="sourceLineNo">042</span> * <ul><a name="line.42"></a> +<span class="sourceLineNo">043</span> * <li>the pattern matches at the current position</li><a name="line.43"></a> +<span class="sourceLineNo">044</span> * <li>the string up until the beginning of the pattern matches the left context</li><a name="line.44"></a> +<span class="sourceLineNo">045</span> * <li>the string from the end of the pattern matches the right context</li><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <li>logical is ALL and all languages are in scope; or</li><a name="line.46"></a> +<span class="sourceLineNo">047</span> * <li>logical is any other value and at least one language is in scope</li><a name="line.47"></a> +<span class="sourceLineNo">048</span> * </ul><a name="line.48"></a> +<span class="sourceLineNo">049</span> * <p><a name="line.49"></a> +<span class="sourceLineNo">050</span> * Rules are typically generated by parsing rules resources. In normal use, there will be no need for the user<a name="line.50"></a> +<span class="sourceLineNo">051</span> * to explicitly construct their own.<a name="line.51"></a> +<span class="sourceLineNo">052</span> * <p><a name="line.52"></a> +<span class="sourceLineNo">053</span> * Rules are immutable and thread-safe.<a name="line.53"></a> +<span class="sourceLineNo">054</span> * <p><a name="line.54"></a> +<span class="sourceLineNo">055</span> * <b>Rules resources</b><a name="line.55"></a> +<span class="sourceLineNo">056</span> * <p><a name="line.56"></a> +<span class="sourceLineNo">057</span> * Rules are typically loaded from resource files. These are UTF-8 encoded text files. They are systematically<a name="line.57"></a> +<span class="sourceLineNo">058</span> * named following the pattern:<a name="line.58"></a> +<span class="sourceLineNo">059</span> * <blockquote>org/apache/commons/codec/language/bm/${NameType#getName}_${RuleType#getName}_${language}.txt</blockquote><a name="line.59"></a> +<span class="sourceLineNo">060</span> * <p><a name="line.60"></a> +<span class="sourceLineNo">061</span> * The format of these resources is the following:<a name="line.61"></a> +<span class="sourceLineNo">062</span> * <ul><a name="line.62"></a> +<span class="sourceLineNo">063</span> * <li><b>Rules:</b> whitespace separated, double-quoted strings. There should be 4 columns to each row, and these<a name="line.63"></a> +<span class="sourceLineNo">064</span> * will be interpreted as:<a name="line.64"></a> +<span class="sourceLineNo">065</span> * <ol><a name="line.65"></a> +<span class="sourceLineNo">066</span> * <li>pattern</li><a name="line.66"></a> +<span class="sourceLineNo">067</span> * <li>left context</li><a name="line.67"></a> +<span class="sourceLineNo">068</span> * <li>right context</li><a name="line.68"></a> +<span class="sourceLineNo">069</span> * <li>phoneme</li><a name="line.69"></a> +<span class="sourceLineNo">070</span> * </ol><a name="line.70"></a> +<span class="sourceLineNo">071</span> * </li><a name="line.71"></a> +<span class="sourceLineNo">072</span> * <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text following on that line to be discarded<a name="line.72"></a> +<span class="sourceLineNo">073</span> * as a comment.</li><a name="line.73"></a> +<span class="sourceLineNo">074</span> * <li><b>Multi-line comments:</b> Any line starting with '/*' will start multi-line commenting mode. This will skip<a name="line.74"></a> +<span class="sourceLineNo">075</span> * all content until a line ending in '*' and '/' is found.</li><a name="line.75"></a> +<span class="sourceLineNo">076</span> * <li><b>Blank lines:</b> All blank lines will be skipped.</li><a name="line.76"></a> +<span class="sourceLineNo">077</span> * </ul><a name="line.77"></a> +<span class="sourceLineNo">078</span> *<a name="line.78"></a> +<span class="sourceLineNo">079</span> * @since 1.6<a name="line.79"></a> +<span class="sourceLineNo">080</span> */<a name="line.80"></a> +<span class="sourceLineNo">081</span>public class Rule {<a name="line.81"></a> +<span class="sourceLineNo">082</span><a name="line.82"></a> +<span class="sourceLineNo">083</span> public static final class Phoneme implements PhonemeExpr {<a name="line.83"></a> +<span class="sourceLineNo">084</span> public static final Comparator<Phoneme> COMPARATOR = new Comparator<Phoneme>() {<a name="line.84"></a> +<span class="sourceLineNo">085</span> @Override<a name="line.85"></a> +<span class="sourceLineNo">086</span> public int compare(final Phoneme o1, final Phoneme o2) {<a name="line.86"></a> +<span class="sourceLineNo">087</span> for (int i = 0; i < o1.phonemeText.length(); i++) {<a name="line.87"></a> +<span class="sourceLineNo">088</span> if (i >= o2.phonemeText.length()) {<a name="line.88"></a> +<span class="sourceLineNo">089</span> return +1;<a name="line.89"></a> +<span class="sourceLineNo">090</span> }<a name="line.90"></a> +<span class="sourceLineNo">091</span> final int c = o1.phonemeText.charAt(i) - o2.phonemeText.charAt(i);<a name="line.91"></a> +<span class="sourceLineNo">092</span> if (c != 0) {<a name="line.92"></a> +<span class="sourceLineNo">093</span> return c;<a name="line.93"></a> +<span class="sourceLineNo">094</span> }<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span><a name="line.96"></a> +<span class="sourceLineNo">097</span> if (o1.phonemeText.length() < o2.phonemeText.length()) {<a name="line.97"></a> +<span class="sourceLineNo">098</span> return -1;<a name="line.98"></a> +<span class="sourceLineNo">099</span> }<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> return 0;<a name="line.101"></a> +<span class="sourceLineNo">102</span> }<a name="line.102"></a> +<span class="sourceLineNo">103</span> };<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> private final StringBuilder phonemeText;<a name="line.105"></a> +<span class="sourceLineNo">106</span> private final Languages.LanguageSet languages;<a name="line.106"></a> +<span class="sourceLineNo">107</span><a name="line.107"></a> +<span class="sourceLineNo">108</span> public Phoneme(final CharSequence phonemeText, final Languages.LanguageSet languages) {<a name="line.108"></a> +<span class="sourceLineNo">109</span> this.phonemeText = new StringBuilder(phonemeText);<a name="line.109"></a> +<span class="sourceLineNo">110</span> this.languages = languages;<a name="line.110"></a> +<span class="sourceLineNo">111</span> }<a name="line.111"></a> +<span class="sourceLineNo">112</span><a name="line.112"></a> +<span class="sourceLineNo">113</span> public Phoneme(final Phoneme phonemeLeft, final Phoneme phonemeRight) {<a name="line.113"></a> +<span class="sourceLineNo">114</span> this(phonemeLeft.phonemeText, phonemeLeft.languages);<a name="line.114"></a> +<span class="sourceLineNo">115</span> this.phonemeText.append(phonemeRight.phonemeText);<a name="line.115"></a> +<span class="sourceLineNo">116</span> }<a name="line.116"></a> +<span class="sourceLineNo">117</span><a name="line.117"></a> +<span class="sourceLineNo">118</span> public Phoneme(final Phoneme phonemeLeft, final Phoneme phonemeRight, final Languages.LanguageSet languages) {<a name="line.118"></a> +<span class="sourceLineNo">119</span> this(phonemeLeft.phonemeText, languages);<a name="line.119"></a> +<span class="sourceLineNo">120</span> this.phonemeText.append(phonemeRight.phonemeText);<a name="line.120"></a> +<span class="sourceLineNo">121</span> }<a name="line.121"></a> +<span class="sourceLineNo">122</span><a name="line.122"></a> +<span class="sourceLineNo">123</span> public Phoneme append(final CharSequence str) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> this.phonemeText.append(str);<a name="line.124"></a> +<span class="sourceLineNo">125</span> return this;<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span><a name="line.127"></a> +<span class="sourceLineNo">128</span> public Languages.LanguageSet getLanguages() {<a name="line.128"></a> +<span class="sourceLineNo">129</span> return this.languages;<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> @Override<a name="line.132"></a> +<span class="sourceLineNo">133</span> public Iterable<Phoneme> getPhonemes() {<a name="line.133"></a> +<span class="sourceLineNo">134</span> return Collections.singleton(this);<a name="line.134"></a> +<span class="sourceLineNo">135</span> }<a name="line.135"></a> +<span class="sourceLineNo">136</span><a name="line.136"></a> +<span class="sourceLineNo">137</span> public CharSequence getPhonemeText() {<a name="line.137"></a> +<span class="sourceLineNo">138</span> return this.phonemeText;<a name="line.138"></a> +<span class="sourceLineNo">139</span> }<a name="line.139"></a> +<span class="sourceLineNo">140</span><a name="line.140"></a> +<span class="sourceLineNo">141</span> /**<a name="line.141"></a> +<span class="sourceLineNo">142</span> * Deprecated since 1.9.<a name="line.142"></a> +<span class="sourceLineNo">143</span> *<a name="line.143"></a> +<span class="sourceLineNo">144</span> * @param right the Phoneme to join<a name="line.144"></a> +<span class="sourceLineNo">145</span> * @return a new Phoneme<a name="line.145"></a> +<span class="sourceLineNo">146</span> * @deprecated since 1.9<a name="line.146"></a> +<span class="sourceLineNo">147</span> */<a name="line.147"></a> +<span class="sourceLineNo">148</span> @Deprecated<a name="line.148"></a> +<span class="sourceLineNo">149</span> public Phoneme join(final Phoneme right) {<a name="line.149"></a> +<span class="sourceLineNo">150</span> return new Phoneme(this.phonemeText.toString() + right.phonemeText.toString(),<a name="line.150"></a> +<span class="sourceLineNo">151</span> this.languages.restrictTo(right.languages));<a name="line.151"></a> +<span class="sourceLineNo">152</span> }<a name="line.152"></a> +<span class="sourceLineNo">153</span><a name="line.153"></a> +<span class="sourceLineNo">154</span> /**<a name="line.154"></a> +<span class="sourceLineNo">155</span> * Returns a new Phoneme with the same text but a union of its<a name="line.155"></a> +<span class="sourceLineNo">156</span> * current language set and the given one.<a name="line.156"></a> +<span class="sourceLineNo">157</span> *<a name="line.157"></a> +<span class="sourceLineNo">158</span> * @param lang the language set to merge<a name="line.158"></a> +<span class="sourceLineNo">159</span> * @return a new Phoneme<a name="line.159"></a> +<span class="sourceLineNo">160</span> */<a name="line.160"></a> +<span class="sourceLineNo">161</span> public Phoneme mergeWithLanguage(final LanguageSet lang) {<a name="line.161"></a> +<span class="sourceLineNo">162</span> return new Phoneme(this.phonemeText.toString(), this.languages.merge(lang));<a name="line.162"></a> +<span class="sourceLineNo">163</span> }<a name="line.163"></a> +<span class="sourceLineNo">164</span><a name="line.164"></a> +<span class="sourceLineNo">165</span> @Override<a name="line.165"></a> +<span class="sourceLineNo">166</span> public String toString() {<a name="line.166"></a> +<span class="sourceLineNo">167</span> return phonemeText.toString() + "[" + languages + "]";<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span> }<a name="line.169"></a> +<span class="sourceLineNo">170</span><a name="line.170"></a> +<span class="sourceLineNo">171</span> public interface PhonemeExpr {<a name="line.171"></a> +<span class="sourceLineNo">172</span> Iterable<Phoneme> getPhonemes();<a name="line.172"></a> +<span class="sourceLineNo">173</span> }<a name="line.173"></a> +<span class="sourceLineNo">174</span><a name="line.174"></a> +<span class="sourceLineNo">175</span> public static final class PhonemeList implements PhonemeExpr {<a name="line.175"></a> +<span class="sourceLineNo">176</span> private final List<Phoneme> phonemes;<a name="line.176"></a> +<span class="sourceLineNo">177</span><a name="line.177"></a> +<span class="sourceLineNo">178</span> public PhonemeList(final List<Phoneme> phonemes) {<a name="line.178"></a> +<span class="sourceLineNo">179</span> this.phonemes = phonemes;<a name="line.179"></a> +<span class="sourceLineNo">180</span> }<a name="line.180"></a> +<span class="sourceLineNo">181</span><a name="line.181"></a> +<span class="sourceLineNo">182</span> @Override<a name="line.182"></a> +<span class="sourceLineNo">183</span> public List<Phoneme> getPhonemes() {<a name="line.183"></a> +<span class="sourceLineNo">184</span> return this.phonemes;<a name="line.184"></a> +<span class="sourceLineNo">185</span> }<a name="line.185"></a> +<span class="sourceLineNo">186</span> }<a name="line.186"></a> +<span class="sourceLineNo">187</span><a name="line.187"></a> +<span class="sourceLineNo">188</span> /**<a name="line.188"></a> +<span class="sourceLineNo">189</span> * A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations.<a name="line.189"></a> +<span class="sourceLineNo">190</span> */<a name="line.190"></a> +<span class="sourceLineNo">191</span> public interface RPattern {<a name="line.191"></a> +<span class="sourceLineNo">192</span> boolean isMatch(CharSequence input);<a name="line.192"></a> +<span class="sourceLineNo">193</span> }<a name="line.193"></a> +<span class="sourceLineNo">194</span><a name="line.194"></a> +<span class="sourceLineNo">195</span> public static final RPattern ALL_STRINGS_RMATCHER = new RPattern() {<a name="line.195"></a> +<span class="sourceLineNo">196</span> @Override<a name="line.196"></a> +<span class="sourceLineNo">197</span> public boolean isMatch(final CharSequence input) {<a name="line.197"></a> +<span class="sourceLineNo">198</span> return true;<a name="line.198"></a> +<span class="sourceLineNo">199</span> }<a name="line.199"></a> +<span class="sourceLineNo">200</span> };<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> public static final String ALL = "ALL";<a name="line.202"></a> +<span class="sourceLineNo">203</span><a name="line.203"></a> +<span class="sourceLineNo">204</span> private static final String DOUBLE_QUOTE = "\"";<a name="line.204"></a> +<span class="sourceLineNo">205</span><a name="line.205"></a> +<span class="sourceLineNo">206</span> private static final String HASH_INCLUDE = "#include";<a name="line.206"></a> +<span class="sourceLineNo">207</span><a name="line.207"></a> +<span class="sourceLineNo">208</span> private static final Map<NameType, Map<RuleType, Map<String, Map<String, List<Rule>>>>> RULES =<a name="line.208"></a> +<span class="sourceLineNo">209</span> new EnumMap<>(NameType.class);<a name="line.209"></a> +<span class="sourceLineNo">210</span><a name="line.210"></a> +<span class="sourceLineNo">211</span> static {<a name="line.211"></a> +<span class="sourceLineNo">212</span> for (final NameType s : NameType.values()) {<a name="line.212"></a> +<span class="sourceLineNo">213</span> final Map<RuleType, Map<String, Map<String, List<Rule>>>> rts =<a name="line.213"></a> +<span class="sourceLineNo">214</span> new EnumMap<>(RuleType.class);<a name="line.214"></a> +<span class="sourceLineNo">215</span><a name="line.215"></a> +<span class="sourceLineNo">216</span> for (final RuleType rt : RuleType.values()) {<a name="line.216"></a> +<span class="sourceLineNo">217</span> final Map<String, Map<String, List<Rule>>> rs = new HashMap<>();<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> final Languages ls = Languages.getInstance(s);<a name="line.219"></a> +<span class="sourceLineNo">220</span> for (final String l : ls.getLanguages()) {<a name="line.220"></a> +<span class="sourceLineNo">221</span> try (final Scanner scanner = createScanner(s, rt, l)) {<a name="line.221"></a> +<span class="sourceLineNo">222</span> rs.put(l, parseRules(scanner, createResourceName(s, rt, l)));<a name="line.222"></a> +<span class="sourceLineNo">223</span> } catch (final IllegalStateException e) {<a name="line.223"></a> +<span class="sourceLineNo">224</span> throw new IllegalStateException("Problem processing " + createResourceName(s, rt, l), e);<a name="line.224"></a> +<span class="sourceLineNo">225</span> }<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span> if (!rt.equals(RuleType.RULES)) {<a name="line.227"></a> +<span class="sourceLineNo">228</span> try (final Scanner scanner = createScanner(s, rt, "common")) {<a name="line.228"></a> +<span class="sourceLineNo">229</span> rs.put("common", parseRules(scanner, createResourceName(s, rt, "common")));<a name="line.229"></a> +<span class="sourceLineNo">230</span> }<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> rts.put(rt, Collections.unmodifiableMap(rs));<a name="line.233"></a> +<span class="sourceLineNo">234</span> }<a name="line.234"></a> +<span class="sourceLineNo">235</span><a name="line.235"></a> +<span class="sourceLineNo">236</span> RULES.put(s, Collections.unmodifiableMap(rts));<a name="line.236"></a> +<span class="sourceLineNo">237</span> }<a name="line.237"></a> +<span class="sourceLineNo">238</span> }<a name="line.238"></a> +<span class="sourceLineNo">239</span><a name="line.239"></a> +<span class="sourceLineNo">240</span> private static boolean contains(final CharSequence chars, final char input) {<a name="line.240"></a> +<span class="sourceLineNo">241</span> for (int i = 0; i < chars.length(); i++) {<a name="line.241"></a> +<span class="sourceLineNo">242</span> if (chars.charAt(i) == input) {<a name="line.242"></a> +<span class="sourceLineNo">243</span> return true;<a name="line.243"></a> +<span class="sourceLineNo">244</span> }<a name="line.244"></a> +<span class="sourceLineNo">245</span> }<a name="line.245"></a> +<span class="sourceLineNo">246</span> return false;<a name="line.246"></a> +<span class="sourceLineNo">247</span> }<a name="line.247"></a> +<span class="sourceLineNo">248</span><a name="line.248"></a> +<span class="sourceLineNo">249</span> private static String createResourceName(final NameType nameType, final RuleType rt, final String lang) {<a name="line.249"></a> +<span class="sourceLineNo">250</span> return String.format("org/apache/commons/codec/language/bm/%s_%s_%s.txt",<a name="line.250"></a> +<span class="sourceLineNo">251</span> nameType.getName(), rt.getName(), lang);<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span><a name="line.253"></a> +<span class="sourceLineNo">254</span> private static Scanner createScanner(final NameType nameType, final RuleType rt, final String lang) {<a name="line.254"></a> +<span class="sourceLineNo">255</span> final String resName = createResourceName(nameType, rt, lang);<a name="line.255"></a> +<span class="sourceLineNo">256</span> return new Scanner(Resources.getInputStream(resName), ResourceConstants.ENCODING);<a name="line.256"></a> +<span class="sourceLineNo">257</span> }<a name="line.257"></a> +<span class="sourceLineNo">258</span><a name="line.258"></a> +<span class="sourceLineNo">259</span> private static Scanner createScanner(final String lang) {<a name="line.259"></a> +<span class="sourceLineNo">260</span> final String resName = String.format("org/apache/commons/codec/language/bm/%s.txt", lang);<a name="line.260"></a> +<span class="sourceLineNo">261</span> return new Scanner(Resources.getInputStream(resName), ResourceConstants.ENCODING);<a name="line.261"></a> +<span class="sourceLineNo">262</span> }<a name="line.262"></a> +<span class="sourceLineNo">263</span><a name="line.263"></a> +<span class="sourceLineNo">264</span> private static boolean endsWith(final CharSequence input, final CharSequence suffix) {<a name="line.264"></a> +<span class="sourceLineNo">265</span> if (suffix.length() > input.length()) {<a name="line.265"></a> +<span class="sourceLineNo">266</span> return false;<a name="line.266"></a> +<span class="sourceLineNo">267</span> }<a name="line.267"></a> +<span class="sourceLineNo">268</span> for (int i = input.length() - 1, j = suffix.length() - 1; j >= 0; i--, j--) {<a name="line.268"></a> +<span class="sourceLineNo">269</span> if (input.charAt(i) != suffix.charAt(j)) {<a name="line.269"></a> +<span class="sourceLineNo">270</span> return false;<a name="line.270"></a> +<span class="sourceLineNo">271</span> }<a name="line.271"></a> +<span class="sourceLineNo">272</span> }<a name="line.272"></a> +<span class="sourceLineNo">273</span> return true;<a name="line.273"></a> +<span class="sourceLineNo">274</span> }<a name="line.274"></a> +<span class="sourceLineNo">275</span><a name="line.275"></a> +<span class="sourceLineNo">276</span> /**<a name="line.276"></a> +<span class="sourceLineNo">277</span> * Gets rules for a combination of name type, rule type and languages.<a name="line.277"></a> +<span class="sourceLineNo">278</span> *<a name="line.278"></a> +<span class="sourceLineNo">279</span> * @param nameType<a name="line.279"></a> +<span class="sourceLineNo">280</span> * the NameType to consider<a name="line.280"></a> +<span class="sourceLineNo">281</span> * @param rt<a name="line.281"></a> +<span class="sourceLineNo">282</span> * the RuleType to consider<a name="line.282"></a> +<span class="sourceLineNo">283</span> * @param langs<a name="line.283"></a> +<span class="sourceLineNo">284</span> * the set of languages to consider<a name="line.284"></a> +<span class="sourceLineNo">285</span> * @return a list of Rules that apply<a name="line.285"></a> +<span class="sourceLineNo">286</span> */<a name="line.286"></a> +<span class="sourceLineNo">287</span> public static List<Rule> getInstance(final NameType nameType, final RuleType rt,<a name="line.287"></a> +<span class="sourceLineNo">288</span> final Languages.LanguageSet langs) {<a name="line.288"></a> +<span class="sourceLineNo">289</span> final Map<String, List<Rule>> ruleMap = getInstanceMap(nameType, rt, langs);<a name="line.289"></a> +<span class="sourceLineNo">290</span> final List<Rule> allRules = new ArrayList<>();<a name="line.290"></a> +<span class="sourceLineNo">291</span> for (final List<Rule> rules : ruleMap.values()) {<a name="line.291"></a> +<span class="sourceLineNo">292</span> allRules.addAll(rules);<a name="line.292"></a> +<span class="sourceLineNo">293</span> }<a name="line.293"></a> +<span class="sourceLineNo">294</span> return allRules;<a name="line.294"></a> +<span class="sourceLineNo">295</span> }<a name="line.295"></a> +<span class="sourceLineNo">296</span><a name="line.296"></a> +<span class="sourceLineNo">297</span> /**<a name="line.297"></a> +<span class="sourceLineNo">298</span> * Gets rules for a combination of name type, rule type and a single language.<a name="line.298"></a> +<span class="sourceLineNo">299</span> *<a name="line.299"></a> +<span class="sourceLineNo">300</span> * @param nameType<a name="line.300"></a> +<span class="sourceLineNo">301</span> * the NameType to consider<a name="line.301"></a> +<span class="sourceLineNo">302</span> * @param rt<a name="line.302"></a> +<span class="sourceLineNo">303</span> * the RuleType to consider<a name="line.303"></a> +<span class="sourceLineNo">304</span> * @param lang<a name="line.304"></a> +<span class="sourceLineNo">305</span> * the language to consider<a name="line.305"></a> +<span class="sourceLineNo">306</span> * @return a list of Rules that apply<a name="line.306"></a> +<span class="sourceLineNo">307</span> */<a name="line.307"></a> +<span class="sourceLineNo">308</span> public static List<Rule> getInstance(final NameType nameType, final RuleType rt, final String lang) {<a name="line.308"></a> +<span class="sourceLineNo">309</span> return getInstance(nameType, rt, LanguageSet.from(new HashSet<>(Arrays.asList(lang))));<a name="line.309"></a> +<span class="sourceLineNo">310</span> }<a name="line.310"></a> +<span class="sourceLineNo">311</span><a name="line.311"></a> +<span class="sourceLineNo">312</span> /**<a name="line.312"></a> +<span class="sourceLineNo">313</span> * Gets rules for a combination of name type, rule type and languages.<a name="line.313"></a> +<span class="sourceLineNo">314</span> *<a name="line.314"></a> +<span class="sourceLineNo">315</span> * @param nameType<a name="line.315"></a> +<span class="sourceLineNo">316</span> * the NameType to consider<a name="line.316"></a> +<span class="sourceLineNo">317</span> * @param rt<a name="line.317"></a> +<span class="sourceLineNo">318</span> * the RuleType to consider<a name="line.318"></a> +<span class="sourceLineNo">319</span> * @param langs<a name="line.319"></a> +<span class="sourceLineNo">320</span> * the set of languages to consider<a name="line.320"></a> +<span class="sourceLineNo">321</span> * @return a map containing all Rules that apply, grouped by the first character of the rule pattern<a name="line.321"></a> +<span class="sourceLineNo">322</span> * @since 1.9<a name="line.322"></a> +<span class="sourceLineNo">323</span> */<a name="line.323"></a> +<span class="sourceLineNo">324</span> public static Map<String, List<Rule>> getInstanceMap(final NameType nameType, final RuleType rt,<a name="line.324"></a> +<span class="sourceLineNo">325</span> final Languages.LanguageSet langs) {<a name="line.325"></a> +<span class="sourceLineNo">326</span> return langs.isSingleton() ? getInstanceMap(nameType, rt, langs.getAny()) :<a name="line.326"></a> +<span class="sourceLineNo">327</span> getInstanceMap(nameType, rt, Languages.ANY);<a name="line.327"></a> +<span class="sourceLineNo">328</span> }<a name="line.328"></a> +<span class="sourceLineNo">329</span><a name="line.329"></a> +<span class="sourceLineNo">330</span> /**<a name="line.330"></a> +<span class="sourceLineNo">331</span> * Gets rules for a combination of name type, rule type and a single language.<a name="line.331"></a> +<span class="sourceLineNo">332</span> *<a name="line.332"></a> +<span class="sourceLineNo">333</span> * @param nameType<a name="line.333"></a> +<span class="sourceLineNo">334</span> * the NameType to consider<a name="line.334"></a> +<span class="sourceLineNo">335</span> * @param rt<a name="line.335"></a> +<span class="sourceLineNo">336</span> * the RuleType to consider<a name="line.336"></a> +<span class="sourceLineNo">337</span> * @param lang<a name="line.337"></a> +<span class="sourceLineNo">338</span> * the language to consider<a name="line.338"></a> +<span class="sourceLineNo">339</span> * @return a map containing all Rules that apply, grouped by the first character of the rule pattern<a name="line.339"></a> +<span class="sourceLineNo">340</span> * @since 1.9<a name="line.340"></a> +<span class="sourceLineNo">341</span> */<a name="line.341"></a> +<span class="sourceLineNo">342</span> public static Map<String, List<Rule>> getInstanceMap(final NameType nameType, final RuleType rt,<a name="line.342"></a> +<span class="sourceLineNo">343</span> final String lang) {<a name="line.343"></a> +<span class="sourceLineNo">344</span> final Map<String, List<Rule>> rules = RULES.get(nameType).get(rt).get(lang);<a name="line.344"></a> +<span class="sourceLineNo">345</span><a name="line.345"></a> +<span class="sourceLineNo">346</span> if (rules == null) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> throw new IllegalArgumentException(String.format("No rules found for %s, %s, %s.",<a name="line.347"></a> +<span class="sourceLineNo">348</span> nameType.getName(), rt.getName(), lang));<a name="line.348"></a> +<span class="sourceLineNo">349</span> }<a name="line.349"></a> +<span class="sourceLineNo">350</span><a name="line.350"></a> +<span class="sourceLineNo">351</span> return rules;<a name="line.351"></a> +<span class="sourceLineNo">352</span> }<a name="line.352"></a> +<span class="sourceLineNo">353</span><a name="line.353"></a> +<span class="sourceLineNo">354</span> private static Phoneme parsePhoneme(final String ph) {<a name="line.354"></a> +<span class="sourceLineNo">355</span> final int open = ph.indexOf("[");<a name="line.355"></a> +<span class="sourceLineNo">356</span> if (open >= 0) {<a name="line.356"></a> +<span class="sourceLineNo">357</span> if (!ph.endsWith("]")) {<a name="line.357"></a> +<span class="sourceLineNo">358</span> throw new IllegalArgumentException("Phoneme expression contains a '[' but does not end in ']'");<a name="line.358"></a> +<span class="sourceLineNo">359</span> }<a name="line.359"></a> +<span class="sourceLineNo">360</span> final String before = ph.substring(0, open);<a name="line.360"></a> +<span class="sourceLineNo">361</span> final String in = ph.substring(open + 1, ph.length() - 1);<a name="line.361"></a> +<span class="sourceLineNo">362</span> final Set<String> langs = new HashSet<>(Arrays.asList(in.split("[+]")));<a name="line.362"></a> +<span class="sourceLineNo">363</span><a name="line.363"></a> +<span class="sourceLineNo">364</span> return new Phoneme(before, Languages.LanguageSet.from(langs));<a name="line.364"></a> +<span class="sourceLineNo">365</span> }<a name="line.365"></a> +<span class="sourceLineNo">366</span> return new Phoneme(ph, Languages.ANY_LANGUAGE);<a name="line.366"></a> +<span class="sourceLineNo">367</span> }<a name="line.367"></a> +<span class="sourceLineNo">368</span><a name="line.368"></a> +<span class="sourceLineNo">369</span> private static PhonemeExpr parsePhonemeExpr(final String ph) {<a name="line.369"></a> +<span class="sourceLineNo">370</span> if (ph.startsWith("(")) { // we have a bracketed list of options<a name="line.370"></a> +<span class="sourceLineNo">371</span> if (!ph.endsWith(")")) {<a name="line.371"></a> +<span class="sourceLineNo">372</span> throw new IllegalArgumentException("Phoneme starts with '(' so must end with ')'");<a name="line.372"></a> +<span class="sourceLineNo">373</span> }<a name="line.373"></a> +<span class="sourceLineNo">374</span><a name="line.374"></a> +<span class="sourceLineNo">375</span> final List<Phoneme> phs = new ArrayList<>();<a name="line.375"></a> +<span class="sourceLineNo">376</span> final String body = ph.substring(1, ph.length() - 1);<a name="line.376"></a> +<span class="sourceLineNo">377</span> for (final String part : body.split("[|]")) {<a name="line.377"></a> +<span class="sourceLineNo">378</span> phs.add(parsePhoneme(part));<a name="line.378"></a> +<span class="sourceLineNo">379</span> }<a name="line.379"></a> +<span class="sourceLineNo">380</span> if (body.startsWith("|") || body.endsWith("|")) {<a name="line.380"></a> +<span class="sourceLineNo">381</span> phs.add(new Phoneme("", Languages.ANY_LANGUAGE));<a name="line.381"></a> +<span class="sourceLineNo">382</span> }<a name="line.382"></a> +<span class="sourceLineNo">383</span><a name="line.383"></a> +<span class="sourceLineNo">384</span> return new PhonemeList(phs);<a name="line.384"></a> +<span class="sourceLineNo">385</span> }<a name="line.385"></a> +<span class="sourceLineNo">386</span> return parsePhoneme(ph);<a name="line.386"></a> +<span class="sourceLineNo">387</span> }<a name="line.387"></a> +<span class="sourceLineNo">388</span><a name="line.388"></a> +<span class="sourceLineNo">389</span> private static Map<String, List<Rule>> parseRules(final Scanner scanner, final String location) {<a name="line.389"></a> +<span class="sourceLineNo">390</span> final Map<String, List<Rule>> lines = new HashMap<>();<a name="line.390"></a> +<span class="sourceLineNo">391</span> int currentLine = 0;<a name="line.391"></a> +<span class="sourceLineNo">392</span><a name="line.392"></a> +<span class="sourceLineNo">393</span> boolean inMultilineComment = false;<a name="line.393"></a> +<span class="sourceLineNo">394</span> while (scanner.hasNextLine()) {<a name="line.394"></a> +<span class="sourceLineNo">395</span> currentLine++;<a name="line.395"></a> +<span class="sourceLineNo">396</span> final String rawLine = scanner.nextLine();<a name="line.396"></a> +<span class="sourceLineNo">397</span> String line = rawLine;<a name="line.397"></a> +<span class="sourceLineNo">398</span><a name="line.398"></a> +<span class="sourceLineNo">399</span> if (inMultilineComment) {<a name="line.399"></a> +<span class="sourceLineNo">400</span> if (line.endsWith(ResourceConstants.EXT_CMT_END)) {<a name="line.400"></a> +<span class="sourceLineNo">401</span> inMultilineComment = false;<a name="line.401"></a> +<span class="sourceLineNo">402</span> }<a name="line.402"></a> +<span class="sourceLineNo">403</span> } else {<a name="line.403"></a> +<span class="sourceLineNo">404</span> if (line.startsWith(ResourceConstants.EXT_CMT_START)) {<a name="line.404"></a> +<span class="sourceLineNo">405</span> inMultilineComment = true;<a name="line.405"></a> +<span class="sourceLineNo">406</span> } else {<a name="line.406"></a> +<span class="sourceLineNo">407</span> // discard comments<a name="line.407"></a> +<span class="sourceLineNo">408</span> final int cmtI = line.indexOf(ResourceConstants.CMT);<a name="line.408"></a> +<span class="sourceLineNo">409</span> if (cmtI >= 0) {<a name="line.409"></a> +<span class="sourceLineNo">410</span> line = line.substring(0, cmtI);<a name="line.410"></a> +<span class="sourceLineNo">411</span> }<a name="line.411"></a> +<span class="sourceLineNo">412</span><a name="line.412"></a> +<span class="sourceLineNo">413</span> // trim leading-trailing whitespace<a name="line.413"></a> +<span class="sourceLineNo">414</span> line = line.trim();<a name="line.414"></a> +<span class="sourceLineNo">415</span><a name="line.415"></a> +<span class="sourceLineNo">416</span> if (line.length() == 0) {<a name="line.416"></a> +<span class="sourceLineNo">417</span> continue; // empty lines can be safely skipped<a name="line.417"></a> +<span class="sourceLineNo">418</span> }<a name="line.418"></a> +<span class="sourceLineNo">419</span><a name="line.419"></a> +<span class="sourceLineNo">420</span> if (line.startsWith(HASH_INCLUDE)) {<a name="line.420"></a> +<span class="sourceLineNo">421</span> // include statement<a name="line.421"></a> +<span class="sourceLineNo">422</span> final String incl = line.substring(HASH_INCLUDE.length()).trim();<a name="line.422"></a> +<span class="sourceLineNo">423</span> if (incl.contains(" ")) {<a name="line.423"></a> +<span class="sourceLineNo">424</span> throw new IllegalArgumentException("Malformed import statement '" + rawLine + "' in " +<a name="line.424"></a> +<span class="sourceLineNo">425</span> location);<a name="line.425"></a> +<span class="sourceLineNo">426</span> }<a name="line.426"></a> +<span class="sourceLineNo">427</span> try (final Scanner hashIncludeScanner = createScanner(incl)) {<a name="line.427"></a> +<span class="sourceLineNo">428</span> lines.putAll(parseRules(hashIncludeScanner, location + "->" + incl));<a name="line.428"></a> +<span class="sourceLineNo">429</span> }<a name="line.429"></a> +<span class="sourceLineNo">430</span> } else {<a name="line.430"></a> +<span class="sourceLineNo">431</span> // rule<a name="line.431"></a> +<span class="sourceLineNo">432</span> final String[] parts = line.split("\\s+");<a name="line.432"></a> +<span class="sourceLineNo">433</span> if (parts.length != 4) {<a name="line.433"></a> +<span class="sourceLineNo">434</span> throw new IllegalArgumentException("Malformed rule statement split into " + parts.length +<a name="line.434"></a> +<span class="sourceLineNo">435</span> " parts: " + rawLine + " in " + location);<a name="line.435"></a> +<span class="sourceLineNo">436</span> }<a name="line.436"></a> +<span class="sourceLineNo">437</span> try {<a name="line.437"></a> +<span class="sourceLineNo">438</span> final String pat = stripQuotes(parts[0]);<a name="line.438"></a> +<span class="sourceLineNo">439</span> final String lCon = stripQuotes(parts[1]);<a name="line.439"></a> +<span class="sourceLineNo">440</span> final String rCon = stripQuotes(parts[2]);<a name="line.440"></a> +<span class="sourceLineNo">441</span> final PhonemeExpr ph = parsePhonemeExpr(stripQuotes(parts[3]));<a name="line.441"></a> +<span class="sourceLineNo">442</span> final int cLine = currentLine;<a name="line.442"></a> +<span class="sourceLineNo">443</span> final Rule r = new Rule(pat, lCon, rCon, ph) {<a name="line.443"></a> +<span class="sourceLineNo">444</span> private final int myLine = cLine;<a name="line.444"></a> +<span class="sourceLineNo">445</span> private final String loc = location;<a name="line.445"></a> +<span class="sourceLineNo">446</span><a name="line.446"></a> +<span class="sourceLineNo">447</span> @Override<a name="line.447"></a> +<span class="sourceLineNo">448</span> public String toString() {<a name="line.448"></a> +<span class="sourceLineNo">449</span> final StringBuilder sb = new StringBuilder();<a name="line.449"></a> +<span class="sourceLineNo">450</span> sb.append("Rule");<a name="line.450"></a> +<span class="sourceLineNo">451</span> sb.append("{line=").append(myLine);<a name="line.451"></a> +<span class="sourceLineNo">452</span> sb.append(", loc='").append(loc).append('\'');<a name="line.452"></a> +<span class="sourceLineNo">453</span> sb.append(", pat='").append(pat).append('\'');<a name="line.453"></a> +<span class="sourceLineNo">454</span> sb.append(", lcon='").append(lCon).append('\'');<a name="line.454"></a> +<span class="sourceLineNo">455</span> sb.append(", rcon='").append(rCon).append('\'');<a name="line.455"></a> +<span class="sourceLineNo">456</span> sb.append('}');<a name="line.456"></a> +<span class="sourceLineNo">457</span> return sb.toString();<a name="line.457"></a> +<span class="sourceLineNo">458</span> }<a name="line.458"></a> +<span class="sourceLineNo">459</span> };<a name="line.459"></a> +<span class="sourceLineNo">460</span> final String patternKey = r.pattern.substring(0,1);<a name="line.460"></a> +<span class="sourceLineNo">461</span> List<Rule> rules = lines.get(patternKey);<a name="line.461"></a> +<span class="sourceLineNo">462</span> if (rules == null) {<a name="line.462"></a> +<span class="sourceLineNo">463</span> rules = new ArrayList<>();<a name="line.463"></a> +<span class="sourceLineNo">464</span> lines.put(patternKey, rules);<a name="line.464"></a> +<span class="sourceLineNo">465</span> }<a name="line.465"></a> +<span class="sourceLineNo">466</span> rules.add(r);<a name="line.466"></a> +<span class="sourceLineNo">467</span> } catch (final IllegalArgumentException e) {<a name="line.467"></a> +<span class="sourceLineNo">468</span> throw new IllegalStateException("Problem parsing line '" + currentLine + "' in " +<a name="line.468"></a> +<span class="sourceLineNo">469</span> location, e);<a name="line.469"></a> +<span class="sourceLineNo">470</span> }<a name="line.470"></a> +<span class="sourceLineNo">471</span> }<a name="line.471"></a> +<span class="sourceLineNo">472</span> }<a name="line.472"></a> +<span class="sourceLineNo">473</span> }<a name="line.473"></a> +<span class="sourceLineNo">474</span> }<a name="line.474"></a> +<span class="sourceLineNo">475</span><a name="line.475"></a> +<span class="sourceLineNo">476</span> return lines;<a name="line.476"></a> +<span class="sourceLineNo">477</span> }<a name="line.477"></a> +<span class="sourceLineNo">478</span><a name="line.478"></a> +<span class="sourceLineNo">479</span> /**<a name="line.479"></a> +<span class="sourceLineNo">480</span> * Attempts to compile the regex into direct string ops, falling back to Pattern and Matcher in the worst case.<a name="line.480"></a> +<span class="sourceLineNo">481</span> *<a name="line.481"></a> +<span class="sourceLineNo">482</span> * @param regex<a name="line.482"></a> +<span class="sourceLineNo">483</span> * the regular expression to compile<a name="line.483"></a> +<span class="sourceLineNo">484</span> * @return an RPattern that will match this regex<a name="line.484"></a> +<span class="sourceLineNo">485</span> */<a name="line.485"></a> +<span class="sourceLineNo">486</span> private static RPattern pattern(final String regex) {<a name="line.486"></a> +<span class="sourceLineNo">487</span> final boolean startsWith = regex.startsWith("^");<a name="line.487"></a> +<span class="sourceLineNo">488</span> final boolean endsWith = regex.endsWith("$");<a name="line.488"></a> +<span class="sourceLineNo">489</span> final String content = regex.substring(startsWith ? 1 : 0, endsWith ? regex.length() - 1 : regex.length());<a name="line.489"></a> +<span class="sourceLineNo">490</span> final boolean boxes = content.contains("[");<a name="line.490"></a> +<span class="sourceLineNo">491</span><a name="line.491"></a> +<span class="sourceLineNo">492</span> if (!boxes) {<a name="line.492"></a> +<span class="sourceLineNo">493</span> if (startsWith && endsWith) {<a name="line.493"></a> +<span class="sourceLineNo">494</span> // exact match<a name="line.494"></a> +<span class="sourceLineNo">495</span> if (content.length() == 0) {<a name="line.495"></a> +<span class="sourceLineNo">496</span> // empty<a name="line.496"></a> +<span class="sourceLineNo">497</span> return new RPattern() {<a name="line.497"></a> +<span class="sourceLineNo">498</span> @Override<a name="line.498"></a> +<span class="sourceLineNo">499</span> public boolean isMatch(final CharSequence input) {<a name="line.499"></a> +<span class="sourceLineNo">500</span> return input.length() == 0;<a name="line.500"></a> +<span class="sourceLineNo">501</span> }<a name="line.501"></a> +<span class="sourceLineNo">502</span> };<a name="line.502"></a> +<span class="sourceLineNo">503</span> }<a name="line.503"></a> +<span class="sourceLineNo">504</span> return new RPattern() {<a name="line.504"></a> +<span class="sourceLineNo">505</span> @Override<a name="line.505"></a> +<span class="sourceLineNo">506</span> public boolean isMatch(final CharSequence input) {<a name="line.506"></a> +<span class="sourceLineNo">507</span> return input.equals(content);<a name="line.507"></a> +<span class="sourceLineNo">508</span> }<a name="line.508"></a> +<span class="sourceLineNo">509</span> };<a name="line.509"></a> +<span class="sourceLineNo">510</span> } else if ((startsWith || endsWith) && content.length() == 0) {<a name="line.510"></a> +<span class="sourceLineNo">511</span> // matches every string<a name="line.511"></a> +<span class="sourceLineNo">512</span> return ALL_STRINGS_RMATCHER;<a name="line.512"></a> +<span class="sourceLineNo">513</span> } else if (startsWith) {<a name="line.513"></a> +<span class="sourceLineNo">514</span> // matches from start<a name="line.514"></a> +<span class="sourceLineNo">515</span> return new RPattern() {<a name="line.515"></a> +<span class="sourceLineNo">516</span> @Override<a name="line.516"></a> +<span class="sourceLineNo">517</span> public boolean isMatch(final CharSequence input) {<a name="line.517"></a> +<span class="sourceLineNo">518</span> return startsWith(input, content);<a name="line.518"></a> +<span class="sourceLineNo">519</span> }<a name="line.519"></a> +<span class="sourceLineNo">520</span> };<a name="line.520"></a> +<span class="sourceLineNo">521</span> } else if (endsWith) {<a name="line.521"></a> +<span class="sourceLineNo">522</span> // matches from start<a name="line.522"></a> +<span class="sourceLineNo">523</span> return new RPattern() {<a name="line.523"></a> +<span class="sourceLineNo">524</span> @Override<a name="line.524"></a> +<span class="sourceLineNo">525</span> public boolean isMatch(final CharSequence input) {<a name="line.525"></a> +<span class="sourceLineNo">526</span> return endsWith(input, content);<a name="line.526"></a> +<span class="sourceLineNo">527</span> }<a name="line.527"></a> +<span class="sourceLineNo">528</span> };<a name="line.528"></a> +<span class="sourceLineNo">529</span> }<a name="line.529"></a> +<span class="sourceLineNo">530</span> } else {<a name="line.530"></a> +<span class="sourceLineNo">531</span> final boolean startsWithBox = content.startsWith("[");<a name="line.531"></a> +<span class="sourceLineNo">532</span> final boolean endsWithBox = content.endsWith("]");<a name="line.532"></a> +<span class="sourceLineNo">533</span><a name="line.533"></a> +<span class="sourceLineNo">534</span> if (startsWithBox && endsWithBox) {<a name="line.534"></a> +<span class="sourceLineNo">535</span> String boxContent = content.substring(1, content.length() - 1);<a name="line.535"></a> +<span class="sourceLineNo">536</span> if (!boxContent.contains("[")) {<a name="line.536"></a> +<span class="sourceLineNo">537</span> // box containing alternatives<a name="line.537"></a> +<span class="sourceLineNo">538</span> final boolean negate = boxContent.startsWith("^");<a name="line.538"></a> +<span class="sourceLineNo">539</span> if (negate) {<a name="line.539"></a> +<span class="sourceLineNo">540</span> boxContent = boxContent.substring(1);<a name="line.540"></a> +<span class="sourceLineNo">541</span> }<a name="line.541"></a> +<span class="sourceLineNo">542</span> final String bContent = boxContent;<a name="line.542"></a> +<span class="sourceLineNo">543</span> final boolean shouldMatch = !negate;<a name="line.543"></a> +<span class="sourceLineNo">544</span><a name="line.544"></a> +<span class="sourceLineNo">545</span> if (startsWith && endsWith) {<a name="line.545"></a> +<span class="sourceLineNo">546</span> // exact match<a name="line.546"></a> +<span class="sourceLineNo">547</span> return new RPattern() {<a name="line.547"></a> +<span class="sourceLineNo">548</span> @Override<a name="line.548"></a> +<span class="sourceLineNo">549</span> public boolean isMatch(final CharSequence input) {<a name="line.549"></a> +<span class="sourceLineNo">550</span> return input.length() == 1 && contains(bContent, input.charAt(0)) == shouldMatch;<a name="line.550"></a> +<span class="sourceLineNo">551</span> }<a name="line.551"></a> +<span class="sourceLineNo">552</span> };<a name="line.552"></a> +<span class="sourceLineNo">553</span> } else if (startsWith) {<a name="line.553"></a> +<span class="sourceLineNo">554</span> // first char<a name="line.554"></a> +<span class="sourceLineNo">555</span> return new RPattern() {<a name="line.555"></a> +<span class="sourceLineNo">556</span> @Override<a name="line.556"></a> +<span class="sourceLineNo">557</span> public boolean isMatch(final CharSequence input) {<a name="line.557"></a> +<span class="sourceLineNo">558</span> return input.length() > 0 && contains(bContent, input.charAt(0)) == shouldMatch;<a name="line.558"></a> +<span class="sourceLineNo">559</span> }<a name="line.559"></a> +<span class="sourceLineNo">560</span> };<a name="line.560"></a> +<span class="sourceLineNo">561</span> } else if (endsWith) {<a name="line.561"></a> +<span class="sourceLineNo">562</span> // last char<a name="line.562"></a> +<span class="sourceLineNo">563</span> return new RPattern() {<a name="line.563"></a> +<span class="sourceLineNo">564</span> @Override<a name="line.564"></a> +<span class="sourceLineNo">565</span> public boolean isMatch(final CharSequence input) {<a name="line.565"></a> +<span class="sourceLineNo">566</span> return input.length() > 0 &&<a name="line.566"></a> +<span class="sourceLineNo">567</span> contains(bContent, input.charAt(input.length() - 1)) == shouldMatch;<a name="line.567"></a> +<span class="sourceLineNo">568</span> }<a name="line.568"></a> +<span class="sourceLineNo">569</span> };<a name="line.569"></a> +<span class="sourceLineNo">570</span> }<a name="line.570"></a> +<span class="sourceLineNo">571</span> }<a name="line.571"></a> +<span class="sourceLineNo">572</span> }<a name="line.572"></a> +<span class="sourceLineNo">573</span> }<a name="line.573"></a> +<span class="sourceLineNo">574</span><a name="line.574"></a> +<span class="sourceLineNo">575</span> return new RPattern() {<a name="line.575"></a> +<span class="sourceLineNo">576</span> Pattern pattern = Pattern.compile(regex);<a name="line.576"></a> +<span class="sourceLineNo">577</span><a name="line.577"></a> +<span class="sourceLineNo">578</span> @Override<a name="line.578"></a> +<span class="sourceLineNo">579</span> public boolean isMatch(final CharSequence input) {<a name="line.579"></a> +<span class="sourceLineNo">580</span> final Matcher matcher = pattern.matcher(input);<a name="line.580"></a> +<span class="sourceLineNo">581</span> return matcher.find();<a name="line.581"></a> +<span class="sourceLineNo">582</span> }<a name="line.582"></a> +<span class="sourceLineNo">583</span> };<a name="line.583"></a> +<span class="sourceLineNo">584</span> }<a name="line.584"></a> +<span class="sourceLineNo">585</span><a name="line.585"></a> +<span class="sourceLineNo">586</span> private static boolean startsWith(final CharSequence input, final CharSequence prefix) {<a name="line.586"></a> +<span class="sourceLineNo">587</span> if (prefix.length() > input.length()) {<a name="line.587"></a> +<span class="sourceLineNo">588</span> return false;<a name="line.588"></a> +<span class="sourceLineNo">589</span> }<a name="line.589"></a> +<span class="sourceLineNo">590</span> for (int i = 0; i < prefix.length(); i++) {<a name="line.590"></a> +<span class="sourceLineNo">591</span> if (input.charAt(i) != prefix.charAt(i)) {<a name="line.591"></a> +<span class="sourceLineNo">592</span> return false;<a name="line.592"></a> +<span class="sourceLineNo">593</span> }<a name="line.593"></a> +<span class="sourceLineNo">594</span> }<a name="line.594"></a> +<span class="sourceLineNo">595</span> return true;<a name="line.595"></a> +<span class="sourceLineNo">596</span> }<a name="line.596"></a> +<span class="sourceLineNo">597</span><a name="line.597"></a> +<span class="sourceLineNo">598</span> private static String stripQuotes(String str) {<a name="line.598"></a> +<span class="sourceLineNo">599</span> if (str.startsWith(DOUBLE_QUOTE)) {<a name="line.599"></a> +<span class="sourceLineNo">600</span> str = str.substring(1);<a name="line.600"></a> +<span class="sourceLineNo">601</span> }<a name="line.601"></a> +<span class="sourceLineNo">602</span><a name="line.602"></a> +<span class="sourceLineNo">603</span> if (str.endsWith(DOUBLE_QUOTE)) {<a name="line.603"></a> +<span class="sourceLineNo">604</span> str = str.substring(0, str.length() - 1);<a name="line.604"></a> +<span class="sourceLineNo">605</span> }<a name="line.605"></a> +<span class="sourceLineNo">606</span><a name="line.606"></a> +<span class="sourceLineNo">607</span> return str;<a name="line.607"></a> +<span class="sourceLineNo">608</span> }<a name="line.608"></a> +<span class="sourceLineNo">609</span><a name="line.609"></a> +<span class="sourceLineNo">610</span> private final RPattern lContext;<a name="line.610"></a> +<span class="sourceLineNo">611</span><a name="line.611"></a> +<span class="sourceLineNo">612</span> private final String pattern;<a name="line.612"></a> +<span class="sourceLineNo">613</span><a name="line.613"></a> +<span class="sourceLineNo">614</span> private final PhonemeExpr phoneme;<a name="line.614"></a> +<span class="sourceLineNo">615</span><a name="line.615"></a> +<span class="sourceLineNo">616</span> private final RPattern rContext;<a name="line.616"></a> +<span class="sourceLineNo">617</span><a name="line.617"></a> +<span class="sourceLineNo">618</span> /**<a name="line.618"></a> +<span class="sourceLineNo">619</span> * Creates a new rule.<a name="line.619"></a> +<span class="sourceLineNo">620</span> *<a name="line.620"></a> +<span class="sourceLineNo">621</span> * @param pattern<a name="line.621"></a> +<span class="sourceLineNo">622</span> * the pattern<a name="line.622"></a> +<span class="sourceLineNo">623</span> * @param lContext<a name="line.623"></a> +<span class="sourceLineNo">624</span> * the left context<a name="line.624"></a> +<span class="sourceLineNo">625</span> * @param rContext<a name="line.625"></a> +<span class="sourceLineNo">626</span> * the right context<a name="line.626"></a> +<span class="sourceLineNo">627</span> * @param phoneme<a name="line.627"></a> +<span class="sourceLineNo">628</span> * the resulting phoneme<a name="line.628"></a> +<span class="sourceLineNo">629</span> */<a name="line.629"></a> +<span class="sourceLineNo">630</span> public Rule(final String pattern, final String lContext, final String rContext, final PhonemeExpr phoneme) {<a name="line.630"></a> +<span class="sourceLineNo">631</span> this.pattern = pattern;<a name="line.631"></a> +<span class="sourceLineNo">632</span> this.lContext = pattern(lContext + "$");<a name="line.632"></a> +<span class="sourceLineNo">633</span> this.rContext = pattern("^" + rContext);<a name="line.633"></a> +<span class="sourceLineNo">634</span> this.phoneme = phoneme;<a name="line.634"></a> +<span class="sourceLineNo">635</span> }<a name="line.635"></a> +<span class="sourceLineNo">636</span><a name="line.636"></a> +<span class="sourceLineNo">637</span> /**<a name="line.637"></a> +<span class="sourceLineNo">638</span> * Gets the left context. This is a regular expression that must match to the left of the pattern.<a name="line.638"></a> +<span class="sourceLineNo">639</span> *<a name="line.639"></a> +<span class="sourceLineNo">640</span> * @return the left context Pattern<a name="line.640"></a> +<span class="sourceLineNo">641</span> */<a name="line.641"></a> +<span class="sourceLineNo">642</span> public RPattern getLContext() {<a name="line.642"></a> +<span class="sourceLineNo">643</span> return this.lContext;<a name="line.643"></a> +<span class="sourceLineNo">644</span> }<a name="line.644"></a> +<span class="sourceLineNo">645</span><a name="line.645"></a> +<span class="sourceLineNo">646</span> /**<a name="line.646"></a> +<span class="sourceLineNo">647</span> * Gets the pattern. This is a string-literal that must exactly match.<a name="line.647"></a> +<span class="sourceLineNo">648</span> *<a name="line.648"></a> +<span class="sourceLineNo">649</span> * @return the pattern<a name="line.649"></a> +<span class="sourceLineNo">650</span> */<a name="line.650"></a> +<span class="sourceLineNo">651</span> public String getPattern() {<a name="line.651"></a> +<span class="sourceLineNo">652</span> return this.pattern;<a name="line.652"></a> +<span class="sourceLineNo">653</span> }<a name="line.653"></a> +<span class="sourceLineNo">654</span><a name="line.654"></a> +<span class="sourceLineNo">655</span> /**<a name="line.655"></a> +<span class="sourceLineNo">656</span> * Gets the phoneme. If the rule matches, this is the phoneme associated with the pattern match.<a name="line.656"></a> +<span class="sourceLineNo">657</span> *<a name="line.657"></a> +<span class="sourceLineNo">658</span> * @return the phoneme<a name="line.658"></a> +<span class="sourceLineNo">659</span> */<a name="line.659"></a> +<span class="sourceLineNo">660</span> public PhonemeExpr getPhoneme() {<a name="line.660"></a> +<span class="sourceLineNo">661</span> return this.phoneme;<a name="line.661"></a> +<span class="sourceLineNo">662</span> }<a name="line.662"></a> +<span class="sourceLineNo">663</span><a name="line.663"></a> +<span class="sourceLineNo">664</span> /**<a name="line.664"></a> +<span class="sourceLineNo">665</span> * Gets the right context. This is a regular expression that must match to the right of the pattern.<a name="line.665"></a> +<span class="sourceLineNo">666</span> *<a name="line.666"></a> +<span class="sourceLineNo">667</span> * @return the right context Pattern<a name="line.667"></a> +<span class="sourceLineNo">668</span> */<a name="line.668"></a> +<span class="sourceLineNo">669</span> public RPattern getRContext() {<a name="line.669"></a> +<span class="sourceLineNo">670</span> return this.rContext;<a name="line.670"></a> +<span class="sourceLineNo">671</span> }<a name="line.671"></a> +<span class="sourceLineNo">672</span><a name="line.672"></a> +<span class="sourceLineNo">673</span> /**<a name="line.673"></a> +<span class="sourceLineNo">674</span> * Decides if the pattern and context match the input starting at a position. It is a match if the<a name="line.674"></a> +<span class="sourceLineNo">675</span> * {@code lContext} matches {@code input} up to {@code i}, {@code pattern} matches at i and<a name="line.675"></a> +<span class="sourceLineNo">676</span> * {@code rContext} matches from the end of the match of {@code pattern} to the end of {@code input}.<a name="line.676"></a> +<span class="sourceLineNo">677</span> *<a name="line.677"></a> +<span class="sourceLineNo">678</span> * @param input<a name="line.678"></a> +<span class="sourceLineNo">679</span> * the input String<a name="line.679"></a> +<span class="sourceLineNo">680</span> * @param i<a name="line.680"></a> +<span class="sourceLineNo">681</span> * the int position within the input<a name="line.681"></a> +<span class="sourceLineNo">682</span> * @return true if the pattern and left/right context match, false otherwise<a name="line.682"></a> +<span class="sourceLineNo">683</span> */<a name="line.683"></a> +<span class="sourceLineNo">684</span> public boolean patternAndContextMatches(final CharSequence input, final int i) {<a name="line.684"></a> +<span class="sourceLineNo">685</span> if (i < 0) {<a name="line.685"></a> +<span class="sourceLineNo">686</span> throw new IndexOutOfBoundsException("Can not match pattern at negative indexes");<a name="line.686"></a> +<span class="sourceLineNo">687</span> }<a name="line.687"></a> +<span class="sourceLineNo">688</span><a name="line.688"></a> +<span class="sourceLineNo">689</span> final int patternLength = this.pattern.length();<a name="line.689"></a> +<span class="sourceLineNo">690</span> final int ipl = i + patternLength;<a name="line.690"></a> +<span class="sourceLineNo">691</span><a name="line.691"></a> +<span class="sourceLineNo">692</span> if (ipl > input.length()) {<a name="line.692"></a> +<span class="sourceLineNo">693</span> // not enough room for the pattern to match<a name="line.693"></a> +<span class="sourceLineNo">694</span> return false;<a name="line.694"></a> +<span class="sourceLineNo">695</span> }<a name="line.695"></a> +<span class="sourceLineNo">696</span><a name="line.696"></a> +<span class="sourceLineNo">697</span> // evaluate the pattern, left context and right context<a name="line.697"></a> +<span class="sourceLineNo">698</span> // fail early if any of the evaluations is not successful<a name="line.698"></a> +<span class="sourceLineNo">699</span> if (!input.subSequence(i, ipl).equals(this.pattern)) {<a name="line.699"></a> +<span class="sourceLineNo">700</span> return false;<a name="line.700"></a> +<span class="sourceLineNo">701</span> } else if (!this.rContext.isMatch(input.subSequence(ipl, input.length()))) {<a name="line.701"></a> +<span class="sourceLineNo">702</span> return false;<a name="line.702"></a> +<span class="sourceLineNo">703</span> }<a name="line.703"></a> +<span class="sourceLineNo">704</span> return this.lContext.isMatch(input.subSequence(0, i));<a name="line.704"></a> +<span class="sourceLineNo">705</span> }<a name="line.705"></a> +<span class="sourceLineNo">706</span>}<a name="line.706"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html new file mode 100644 index 0000000000000000000000000000000000000000..f62994dca13e1019a68ab6655dcc91d3eb4ba987 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.PhonemeExpr.html @@ -0,0 +1,778 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.ArrayList;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.Arrays;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.Collections;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.Comparator;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.EnumMap;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.HashMap;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.HashSet;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import java.util.List;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import java.util.Map;<a name="line.28"></a> +<span class="sourceLineNo">029</span>import java.util.Scanner;<a name="line.29"></a> +<span class="sourceLineNo">030</span>import java.util.Set;<a name="line.30"></a> +<span class="sourceLineNo">031</span>import java.util.regex.Matcher;<a name="line.31"></a> +<span class="sourceLineNo">032</span>import java.util.regex.Pattern;<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span>import org.apache.commons.codec.Resources;<a name="line.34"></a> +<span class="sourceLineNo">035</span>import org.apache.commons.codec.language.bm.Languages.LanguageSet;<a name="line.35"></a> +<span class="sourceLineNo">036</span><a name="line.36"></a> +<span class="sourceLineNo">037</span>/**<a name="line.37"></a> +<span class="sourceLineNo">038</span> * A phoneme rule.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * Rules have a pattern, left context, right context, output phoneme, set of languages for which they apply<a name="line.40"></a> +<span class="sourceLineNo">041</span> * and a logical flag indicating if all languages must be in play. A rule matches if:<a name="line.41"></a> +<span class="sourceLineNo">042</span> * <ul><a name="line.42"></a> +<span class="sourceLineNo">043</span> * <li>the pattern matches at the current position</li><a name="line.43"></a> +<span class="sourceLineNo">044</span> * <li>the string up until the beginning of the pattern matches the left context</li><a name="line.44"></a> +<span class="sourceLineNo">045</span> * <li>the string from the end of the pattern matches the right context</li><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <li>logical is ALL and all languages are in scope; or</li><a name="line.46"></a> +<span class="sourceLineNo">047</span> * <li>logical is any other value and at least one language is in scope</li><a name="line.47"></a> +<span class="sourceLineNo">048</span> * </ul><a name="line.48"></a> +<span class="sourceLineNo">049</span> * <p><a name="line.49"></a> +<span class="sourceLineNo">050</span> * Rules are typically generated by parsing rules resources. In normal use, there will be no need for the user<a name="line.50"></a> +<span class="sourceLineNo">051</span> * to explicitly construct their own.<a name="line.51"></a> +<span class="sourceLineNo">052</span> * <p><a name="line.52"></a> +<span class="sourceLineNo">053</span> * Rules are immutable and thread-safe.<a name="line.53"></a> +<span class="sourceLineNo">054</span> * <p><a name="line.54"></a> +<span class="sourceLineNo">055</span> * <b>Rules resources</b><a name="line.55"></a> +<span class="sourceLineNo">056</span> * <p><a name="line.56"></a> +<span class="sourceLineNo">057</span> * Rules are typically loaded from resource files. These are UTF-8 encoded text files. They are systematically<a name="line.57"></a> +<span class="sourceLineNo">058</span> * named following the pattern:<a name="line.58"></a> +<span class="sourceLineNo">059</span> * <blockquote>org/apache/commons/codec/language/bm/${NameType#getName}_${RuleType#getName}_${language}.txt</blockquote><a name="line.59"></a> +<span class="sourceLineNo">060</span> * <p><a name="line.60"></a> +<span class="sourceLineNo">061</span> * The format of these resources is the following:<a name="line.61"></a> +<span class="sourceLineNo">062</span> * <ul><a name="line.62"></a> +<span class="sourceLineNo">063</span> * <li><b>Rules:</b> whitespace separated, double-quoted strings. There should be 4 columns to each row, and these<a name="line.63"></a> +<span class="sourceLineNo">064</span> * will be interpreted as:<a name="line.64"></a> +<span class="sourceLineNo">065</span> * <ol><a name="line.65"></a> +<span class="sourceLineNo">066</span> * <li>pattern</li><a name="line.66"></a> +<span class="sourceLineNo">067</span> * <li>left context</li><a name="line.67"></a> +<span class="sourceLineNo">068</span> * <li>right context</li><a name="line.68"></a> +<span class="sourceLineNo">069</span> * <li>phoneme</li><a name="line.69"></a> +<span class="sourceLineNo">070</span> * </ol><a name="line.70"></a> +<span class="sourceLineNo">071</span> * </li><a name="line.71"></a> +<span class="sourceLineNo">072</span> * <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text following on that line to be discarded<a name="line.72"></a> +<span class="sourceLineNo">073</span> * as a comment.</li><a name="line.73"></a> +<span class="sourceLineNo">074</span> * <li><b>Multi-line comments:</b> Any line starting with '/*' will start multi-line commenting mode. This will skip<a name="line.74"></a> +<span class="sourceLineNo">075</span> * all content until a line ending in '*' and '/' is found.</li><a name="line.75"></a> +<span class="sourceLineNo">076</span> * <li><b>Blank lines:</b> All blank lines will be skipped.</li><a name="line.76"></a> +<span class="sourceLineNo">077</span> * </ul><a name="line.77"></a> +<span class="sourceLineNo">078</span> *<a name="line.78"></a> +<span class="sourceLineNo">079</span> * @since 1.6<a name="line.79"></a> +<span class="sourceLineNo">080</span> */<a name="line.80"></a> +<span class="sourceLineNo">081</span>public class Rule {<a name="line.81"></a> +<span class="sourceLineNo">082</span><a name="line.82"></a> +<span class="sourceLineNo">083</span> public static final class Phoneme implements PhonemeExpr {<a name="line.83"></a> +<span class="sourceLineNo">084</span> public static final Comparator<Phoneme> COMPARATOR = new Comparator<Phoneme>() {<a name="line.84"></a> +<span class="sourceLineNo">085</span> @Override<a name="line.85"></a> +<span class="sourceLineNo">086</span> public int compare(final Phoneme o1, final Phoneme o2) {<a name="line.86"></a> +<span class="sourceLineNo">087</span> for (int i = 0; i < o1.phonemeText.length(); i++) {<a name="line.87"></a> +<span class="sourceLineNo">088</span> if (i >= o2.phonemeText.length()) {<a name="line.88"></a> +<span class="sourceLineNo">089</span> return +1;<a name="line.89"></a> +<span class="sourceLineNo">090</span> }<a name="line.90"></a> +<span class="sourceLineNo">091</span> final int c = o1.phonemeText.charAt(i) - o2.phonemeText.charAt(i);<a name="line.91"></a> +<span class="sourceLineNo">092</span> if (c != 0) {<a name="line.92"></a> +<span class="sourceLineNo">093</span> return c;<a name="line.93"></a> +<span class="sourceLineNo">094</span> }<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span><a name="line.96"></a> +<span class="sourceLineNo">097</span> if (o1.phonemeText.length() < o2.phonemeText.length()) {<a name="line.97"></a> +<span class="sourceLineNo">098</span> return -1;<a name="line.98"></a> +<span class="sourceLineNo">099</span> }<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> return 0;<a name="line.101"></a> +<span class="sourceLineNo">102</span> }<a name="line.102"></a> +<span class="sourceLineNo">103</span> };<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> private final StringBuilder phonemeText;<a name="line.105"></a> +<span class="sourceLineNo">106</span> private final Languages.LanguageSet languages;<a name="line.106"></a> +<span class="sourceLineNo">107</span><a name="line.107"></a> +<span class="sourceLineNo">108</span> public Phoneme(final CharSequence phonemeText, final Languages.LanguageSet languages) {<a name="line.108"></a> +<span class="sourceLineNo">109</span> this.phonemeText = new StringBuilder(phonemeText);<a name="line.109"></a> +<span class="sourceLineNo">110</span> this.languages = languages;<a name="line.110"></a> +<span class="sourceLineNo">111</span> }<a name="line.111"></a> +<span class="sourceLineNo">112</span><a name="line.112"></a> +<span class="sourceLineNo">113</span> public Phoneme(final Phoneme phonemeLeft, final Phoneme phonemeRight) {<a name="line.113"></a> +<span class="sourceLineNo">114</span> this(phonemeLeft.phonemeText, phonemeLeft.languages);<a name="line.114"></a> +<span class="sourceLineNo">115</span> this.phonemeText.append(phonemeRight.phonemeText);<a name="line.115"></a> +<span class="sourceLineNo">116</span> }<a name="line.116"></a> +<span class="sourceLineNo">117</span><a name="line.117"></a> +<span class="sourceLineNo">118</span> public Phoneme(final Phoneme phonemeLeft, final Phoneme phonemeRight, final Languages.LanguageSet languages) {<a name="line.118"></a> +<span class="sourceLineNo">119</span> this(phonemeLeft.phonemeText, languages);<a name="line.119"></a> +<span class="sourceLineNo">120</span> this.phonemeText.append(phonemeRight.phonemeText);<a name="line.120"></a> +<span class="sourceLineNo">121</span> }<a name="line.121"></a> +<span class="sourceLineNo">122</span><a name="line.122"></a> +<span class="sourceLineNo">123</span> public Phoneme append(final CharSequence str) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> this.phonemeText.append(str);<a name="line.124"></a> +<span class="sourceLineNo">125</span> return this;<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span><a name="line.127"></a> +<span class="sourceLineNo">128</span> public Languages.LanguageSet getLanguages() {<a name="line.128"></a> +<span class="sourceLineNo">129</span> return this.languages;<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> @Override<a name="line.132"></a> +<span class="sourceLineNo">133</span> public Iterable<Phoneme> getPhonemes() {<a name="line.133"></a> +<span class="sourceLineNo">134</span> return Collections.singleton(this);<a name="line.134"></a> +<span class="sourceLineNo">135</span> }<a name="line.135"></a> +<span class="sourceLineNo">136</span><a name="line.136"></a> +<span class="sourceLineNo">137</span> public CharSequence getPhonemeText() {<a name="line.137"></a> +<span class="sourceLineNo">138</span> return this.phonemeText;<a name="line.138"></a> +<span class="sourceLineNo">139</span> }<a name="line.139"></a> +<span class="sourceLineNo">140</span><a name="line.140"></a> +<span class="sourceLineNo">141</span> /**<a name="line.141"></a> +<span class="sourceLineNo">142</span> * Deprecated since 1.9.<a name="line.142"></a> +<span class="sourceLineNo">143</span> *<a name="line.143"></a> +<span class="sourceLineNo">144</span> * @param right the Phoneme to join<a name="line.144"></a> +<span class="sourceLineNo">145</span> * @return a new Phoneme<a name="line.145"></a> +<span class="sourceLineNo">146</span> * @deprecated since 1.9<a name="line.146"></a> +<span class="sourceLineNo">147</span> */<a name="line.147"></a> +<span class="sourceLineNo">148</span> @Deprecated<a name="line.148"></a> +<span class="sourceLineNo">149</span> public Phoneme join(final Phoneme right) {<a name="line.149"></a> +<span class="sourceLineNo">150</span> return new Phoneme(this.phonemeText.toString() + right.phonemeText.toString(),<a name="line.150"></a> +<span class="sourceLineNo">151</span> this.languages.restrictTo(right.languages));<a name="line.151"></a> +<span class="sourceLineNo">152</span> }<a name="line.152"></a> +<span class="sourceLineNo">153</span><a name="line.153"></a> +<span class="sourceLineNo">154</span> /**<a name="line.154"></a> +<span class="sourceLineNo">155</span> * Returns a new Phoneme with the same text but a union of its<a name="line.155"></a> +<span class="sourceLineNo">156</span> * current language set and the given one.<a name="line.156"></a> +<span class="sourceLineNo">157</span> *<a name="line.157"></a> +<span class="sourceLineNo">158</span> * @param lang the language set to merge<a name="line.158"></a> +<span class="sourceLineNo">159</span> * @return a new Phoneme<a name="line.159"></a> +<span class="sourceLineNo">160</span> */<a name="line.160"></a> +<span class="sourceLineNo">161</span> public Phoneme mergeWithLanguage(final LanguageSet lang) {<a name="line.161"></a> +<span class="sourceLineNo">162</span> return new Phoneme(this.phonemeText.toString(), this.languages.merge(lang));<a name="line.162"></a> +<span class="sourceLineNo">163</span> }<a name="line.163"></a> +<span class="sourceLineNo">164</span><a name="line.164"></a> +<span class="sourceLineNo">165</span> @Override<a name="line.165"></a> +<span class="sourceLineNo">166</span> public String toString() {<a name="line.166"></a> +<span class="sourceLineNo">167</span> return phonemeText.toString() + "[" + languages + "]";<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span> }<a name="line.169"></a> +<span class="sourceLineNo">170</span><a name="line.170"></a> +<span class="sourceLineNo">171</span> public interface PhonemeExpr {<a name="line.171"></a> +<span class="sourceLineNo">172</span> Iterable<Phoneme> getPhonemes();<a name="line.172"></a> +<span class="sourceLineNo">173</span> }<a name="line.173"></a> +<span class="sourceLineNo">174</span><a name="line.174"></a> +<span class="sourceLineNo">175</span> public static final class PhonemeList implements PhonemeExpr {<a name="line.175"></a> +<span class="sourceLineNo">176</span> private final List<Phoneme> phonemes;<a name="line.176"></a> +<span class="sourceLineNo">177</span><a name="line.177"></a> +<span class="sourceLineNo">178</span> public PhonemeList(final List<Phoneme> phonemes) {<a name="line.178"></a> +<span class="sourceLineNo">179</span> this.phonemes = phonemes;<a name="line.179"></a> +<span class="sourceLineNo">180</span> }<a name="line.180"></a> +<span class="sourceLineNo">181</span><a name="line.181"></a> +<span class="sourceLineNo">182</span> @Override<a name="line.182"></a> +<span class="sourceLineNo">183</span> public List<Phoneme> getPhonemes() {<a name="line.183"></a> +<span class="sourceLineNo">184</span> return this.phonemes;<a name="line.184"></a> +<span class="sourceLineNo">185</span> }<a name="line.185"></a> +<span class="sourceLineNo">186</span> }<a name="line.186"></a> +<span class="sourceLineNo">187</span><a name="line.187"></a> +<span class="sourceLineNo">188</span> /**<a name="line.188"></a> +<span class="sourceLineNo">189</span> * A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations.<a name="line.189"></a> +<span class="sourceLineNo">190</span> */<a name="line.190"></a> +<span class="sourceLineNo">191</span> public interface RPattern {<a name="line.191"></a> +<span class="sourceLineNo">192</span> boolean isMatch(CharSequence input);<a name="line.192"></a> +<span class="sourceLineNo">193</span> }<a name="line.193"></a> +<span class="sourceLineNo">194</span><a name="line.194"></a> +<span class="sourceLineNo">195</span> public static final RPattern ALL_STRINGS_RMATCHER = new RPattern() {<a name="line.195"></a> +<span class="sourceLineNo">196</span> @Override<a name="line.196"></a> +<span class="sourceLineNo">197</span> public boolean isMatch(final CharSequence input) {<a name="line.197"></a> +<span class="sourceLineNo">198</span> return true;<a name="line.198"></a> +<span class="sourceLineNo">199</span> }<a name="line.199"></a> +<span class="sourceLineNo">200</span> };<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> public static final String ALL = "ALL";<a name="line.202"></a> +<span class="sourceLineNo">203</span><a name="line.203"></a> +<span class="sourceLineNo">204</span> private static final String DOUBLE_QUOTE = "\"";<a name="line.204"></a> +<span class="sourceLineNo">205</span><a name="line.205"></a> +<span class="sourceLineNo">206</span> private static final String HASH_INCLUDE = "#include";<a name="line.206"></a> +<span class="sourceLineNo">207</span><a name="line.207"></a> +<span class="sourceLineNo">208</span> private static final Map<NameType, Map<RuleType, Map<String, Map<String, List<Rule>>>>> RULES =<a name="line.208"></a> +<span class="sourceLineNo">209</span> new EnumMap<>(NameType.class);<a name="line.209"></a> +<span class="sourceLineNo">210</span><a name="line.210"></a> +<span class="sourceLineNo">211</span> static {<a name="line.211"></a> +<span class="sourceLineNo">212</span> for (final NameType s : NameType.values()) {<a name="line.212"></a> +<span class="sourceLineNo">213</span> final Map<RuleType, Map<String, Map<String, List<Rule>>>> rts =<a name="line.213"></a> +<span class="sourceLineNo">214</span> new EnumMap<>(RuleType.class);<a name="line.214"></a> +<span class="sourceLineNo">215</span><a name="line.215"></a> +<span class="sourceLineNo">216</span> for (final RuleType rt : RuleType.values()) {<a name="line.216"></a> +<span class="sourceLineNo">217</span> final Map<String, Map<String, List<Rule>>> rs = new HashMap<>();<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> final Languages ls = Languages.getInstance(s);<a name="line.219"></a> +<span class="sourceLineNo">220</span> for (final String l : ls.getLanguages()) {<a name="line.220"></a> +<span class="sourceLineNo">221</span> try (final Scanner scanner = createScanner(s, rt, l)) {<a name="line.221"></a> +<span class="sourceLineNo">222</span> rs.put(l, parseRules(scanner, createResourceName(s, rt, l)));<a name="line.222"></a> +<span class="sourceLineNo">223</span> } catch (final IllegalStateException e) {<a name="line.223"></a> +<span class="sourceLineNo">224</span> throw new IllegalStateException("Problem processing " + createResourceName(s, rt, l), e);<a name="line.224"></a> +<span class="sourceLineNo">225</span> }<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span> if (!rt.equals(RuleType.RULES)) {<a name="line.227"></a> +<span class="sourceLineNo">228</span> try (final Scanner scanner = createScanner(s, rt, "common")) {<a name="line.228"></a> +<span class="sourceLineNo">229</span> rs.put("common", parseRules(scanner, createResourceName(s, rt, "common")));<a name="line.229"></a> +<span class="sourceLineNo">230</span> }<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> rts.put(rt, Collections.unmodifiableMap(rs));<a name="line.233"></a> +<span class="sourceLineNo">234</span> }<a name="line.234"></a> +<span class="sourceLineNo">235</span><a name="line.235"></a> +<span class="sourceLineNo">236</span> RULES.put(s, Collections.unmodifiableMap(rts));<a name="line.236"></a> +<span class="sourceLineNo">237</span> }<a name="line.237"></a> +<span class="sourceLineNo">238</span> }<a name="line.238"></a> +<span class="sourceLineNo">239</span><a name="line.239"></a> +<span class="sourceLineNo">240</span> private static boolean contains(final CharSequence chars, final char input) {<a name="line.240"></a> +<span class="sourceLineNo">241</span> for (int i = 0; i < chars.length(); i++) {<a name="line.241"></a> +<span class="sourceLineNo">242</span> if (chars.charAt(i) == input) {<a name="line.242"></a> +<span class="sourceLineNo">243</span> return true;<a name="line.243"></a> +<span class="sourceLineNo">244</span> }<a name="line.244"></a> +<span class="sourceLineNo">245</span> }<a name="line.245"></a> +<span class="sourceLineNo">246</span> return false;<a name="line.246"></a> +<span class="sourceLineNo">247</span> }<a name="line.247"></a> +<span class="sourceLineNo">248</span><a name="line.248"></a> +<span class="sourceLineNo">249</span> private static String createResourceName(final NameType nameType, final RuleType rt, final String lang) {<a name="line.249"></a> +<span class="sourceLineNo">250</span> return String.format("org/apache/commons/codec/language/bm/%s_%s_%s.txt",<a name="line.250"></a> +<span class="sourceLineNo">251</span> nameType.getName(), rt.getName(), lang);<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span><a name="line.253"></a> +<span class="sourceLineNo">254</span> private static Scanner createScanner(final NameType nameType, final RuleType rt, final String lang) {<a name="line.254"></a> +<span class="sourceLineNo">255</span> final String resName = createResourceName(nameType, rt, lang);<a name="line.255"></a> +<span class="sourceLineNo">256</span> return new Scanner(Resources.getInputStream(resName), ResourceConstants.ENCODING);<a name="line.256"></a> +<span class="sourceLineNo">257</span> }<a name="line.257"></a> +<span class="sourceLineNo">258</span><a name="line.258"></a> +<span class="sourceLineNo">259</span> private static Scanner createScanner(final String lang) {<a name="line.259"></a> +<span class="sourceLineNo">260</span> final String resName = String.format("org/apache/commons/codec/language/bm/%s.txt", lang);<a name="line.260"></a> +<span class="sourceLineNo">261</span> return new Scanner(Resources.getInputStream(resName), ResourceConstants.ENCODING);<a name="line.261"></a> +<span class="sourceLineNo">262</span> }<a name="line.262"></a> +<span class="sourceLineNo">263</span><a name="line.263"></a> +<span class="sourceLineNo">264</span> private static boolean endsWith(final CharSequence input, final CharSequence suffix) {<a name="line.264"></a> +<span class="sourceLineNo">265</span> if (suffix.length() > input.length()) {<a name="line.265"></a> +<span class="sourceLineNo">266</span> return false;<a name="line.266"></a> +<span class="sourceLineNo">267</span> }<a name="line.267"></a> +<span class="sourceLineNo">268</span> for (int i = input.length() - 1, j = suffix.length() - 1; j >= 0; i--, j--) {<a name="line.268"></a> +<span class="sourceLineNo">269</span> if (input.charAt(i) != suffix.charAt(j)) {<a name="line.269"></a> +<span class="sourceLineNo">270</span> return false;<a name="line.270"></a> +<span class="sourceLineNo">271</span> }<a name="line.271"></a> +<span class="sourceLineNo">272</span> }<a name="line.272"></a> +<span class="sourceLineNo">273</span> return true;<a name="line.273"></a> +<span class="sourceLineNo">274</span> }<a name="line.274"></a> +<span class="sourceLineNo">275</span><a name="line.275"></a> +<span class="sourceLineNo">276</span> /**<a name="line.276"></a> +<span class="sourceLineNo">277</span> * Gets rules for a combination of name type, rule type and languages.<a name="line.277"></a> +<span class="sourceLineNo">278</span> *<a name="line.278"></a> +<span class="sourceLineNo">279</span> * @param nameType<a name="line.279"></a> +<span class="sourceLineNo">280</span> * the NameType to consider<a name="line.280"></a> +<span class="sourceLineNo">281</span> * @param rt<a name="line.281"></a> +<span class="sourceLineNo">282</span> * the RuleType to consider<a name="line.282"></a> +<span class="sourceLineNo">283</span> * @param langs<a name="line.283"></a> +<span class="sourceLineNo">284</span> * the set of languages to consider<a name="line.284"></a> +<span class="sourceLineNo">285</span> * @return a list of Rules that apply<a name="line.285"></a> +<span class="sourceLineNo">286</span> */<a name="line.286"></a> +<span class="sourceLineNo">287</span> public static List<Rule> getInstance(final NameType nameType, final RuleType rt,<a name="line.287"></a> +<span class="sourceLineNo">288</span> final Languages.LanguageSet langs) {<a name="line.288"></a> +<span class="sourceLineNo">289</span> final Map<String, List<Rule>> ruleMap = getInstanceMap(nameType, rt, langs);<a name="line.289"></a> +<span class="sourceLineNo">290</span> final List<Rule> allRules = new ArrayList<>();<a name="line.290"></a> +<span class="sourceLineNo">291</span> for (final List<Rule> rules : ruleMap.values()) {<a name="line.291"></a> +<span class="sourceLineNo">292</span> allRules.addAll(rules);<a name="line.292"></a> +<span class="sourceLineNo">293</span> }<a name="line.293"></a> +<span class="sourceLineNo">294</span> return allRules;<a name="line.294"></a> +<span class="sourceLineNo">295</span> }<a name="line.295"></a> +<span class="sourceLineNo">296</span><a name="line.296"></a> +<span class="sourceLineNo">297</span> /**<a name="line.297"></a> +<span class="sourceLineNo">298</span> * Gets rules for a combination of name type, rule type and a single language.<a name="line.298"></a> +<span class="sourceLineNo">299</span> *<a name="line.299"></a> +<span class="sourceLineNo">300</span> * @param nameType<a name="line.300"></a> +<span class="sourceLineNo">301</span> * the NameType to consider<a name="line.301"></a> +<span class="sourceLineNo">302</span> * @param rt<a name="line.302"></a> +<span class="sourceLineNo">303</span> * the RuleType to consider<a name="line.303"></a> +<span class="sourceLineNo">304</span> * @param lang<a name="line.304"></a> +<span class="sourceLineNo">305</span> * the language to consider<a name="line.305"></a> +<span class="sourceLineNo">306</span> * @return a list of Rules that apply<a name="line.306"></a> +<span class="sourceLineNo">307</span> */<a name="line.307"></a> +<span class="sourceLineNo">308</span> public static List<Rule> getInstance(final NameType nameType, final RuleType rt, final String lang) {<a name="line.308"></a> +<span class="sourceLineNo">309</span> return getInstance(nameType, rt, LanguageSet.from(new HashSet<>(Arrays.asList(lang))));<a name="line.309"></a> +<span class="sourceLineNo">310</span> }<a name="line.310"></a> +<span class="sourceLineNo">311</span><a name="line.311"></a> +<span class="sourceLineNo">312</span> /**<a name="line.312"></a> +<span class="sourceLineNo">313</span> * Gets rules for a combination of name type, rule type and languages.<a name="line.313"></a> +<span class="sourceLineNo">314</span> *<a name="line.314"></a> +<span class="sourceLineNo">315</span> * @param nameType<a name="line.315"></a> +<span class="sourceLineNo">316</span> * the NameType to consider<a name="line.316"></a> +<span class="sourceLineNo">317</span> * @param rt<a name="line.317"></a> +<span class="sourceLineNo">318</span> * the RuleType to consider<a name="line.318"></a> +<span class="sourceLineNo">319</span> * @param langs<a name="line.319"></a> +<span class="sourceLineNo">320</span> * the set of languages to consider<a name="line.320"></a> +<span class="sourceLineNo">321</span> * @return a map containing all Rules that apply, grouped by the first character of the rule pattern<a name="line.321"></a> +<span class="sourceLineNo">322</span> * @since 1.9<a name="line.322"></a> +<span class="sourceLineNo">323</span> */<a name="line.323"></a> +<span class="sourceLineNo">324</span> public static Map<String, List<Rule>> getInstanceMap(final NameType nameType, final RuleType rt,<a name="line.324"></a> +<span class="sourceLineNo">325</span> final Languages.LanguageSet langs) {<a name="line.325"></a> +<span class="sourceLineNo">326</span> return langs.isSingleton() ? getInstanceMap(nameType, rt, langs.getAny()) :<a name="line.326"></a> +<span class="sourceLineNo">327</span> getInstanceMap(nameType, rt, Languages.ANY);<a name="line.327"></a> +<span class="sourceLineNo">328</span> }<a name="line.328"></a> +<span class="sourceLineNo">329</span><a name="line.329"></a> +<span class="sourceLineNo">330</span> /**<a name="line.330"></a> +<span class="sourceLineNo">331</span> * Gets rules for a combination of name type, rule type and a single language.<a name="line.331"></a> +<span class="sourceLineNo">332</span> *<a name="line.332"></a> +<span class="sourceLineNo">333</span> * @param nameType<a name="line.333"></a> +<span class="sourceLineNo">334</span> * the NameType to consider<a name="line.334"></a> +<span class="sourceLineNo">335</span> * @param rt<a name="line.335"></a> +<span class="sourceLineNo">336</span> * the RuleType to consider<a name="line.336"></a> +<span class="sourceLineNo">337</span> * @param lang<a name="line.337"></a> +<span class="sourceLineNo">338</span> * the language to consider<a name="line.338"></a> +<span class="sourceLineNo">339</span> * @return a map containing all Rules that apply, grouped by the first character of the rule pattern<a name="line.339"></a> +<span class="sourceLineNo">340</span> * @since 1.9<a name="line.340"></a> +<span class="sourceLineNo">341</span> */<a name="line.341"></a> +<span class="sourceLineNo">342</span> public static Map<String, List<Rule>> getInstanceMap(final NameType nameType, final RuleType rt,<a name="line.342"></a> +<span class="sourceLineNo">343</span> final String lang) {<a name="line.343"></a> +<span class="sourceLineNo">344</span> final Map<String, List<Rule>> rules = RULES.get(nameType).get(rt).get(lang);<a name="line.344"></a> +<span class="sourceLineNo">345</span><a name="line.345"></a> +<span class="sourceLineNo">346</span> if (rules == null) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> throw new IllegalArgumentException(String.format("No rules found for %s, %s, %s.",<a name="line.347"></a> +<span class="sourceLineNo">348</span> nameType.getName(), rt.getName(), lang));<a name="line.348"></a> +<span class="sourceLineNo">349</span> }<a name="line.349"></a> +<span class="sourceLineNo">350</span><a name="line.350"></a> +<span class="sourceLineNo">351</span> return rules;<a name="line.351"></a> +<span class="sourceLineNo">352</span> }<a name="line.352"></a> +<span class="sourceLineNo">353</span><a name="line.353"></a> +<span class="sourceLineNo">354</span> private static Phoneme parsePhoneme(final String ph) {<a name="line.354"></a> +<span class="sourceLineNo">355</span> final int open = ph.indexOf("[");<a name="line.355"></a> +<span class="sourceLineNo">356</span> if (open >= 0) {<a name="line.356"></a> +<span class="sourceLineNo">357</span> if (!ph.endsWith("]")) {<a name="line.357"></a> +<span class="sourceLineNo">358</span> throw new IllegalArgumentException("Phoneme expression contains a '[' but does not end in ']'");<a name="line.358"></a> +<span class="sourceLineNo">359</span> }<a name="line.359"></a> +<span class="sourceLineNo">360</span> final String before = ph.substring(0, open);<a name="line.360"></a> +<span class="sourceLineNo">361</span> final String in = ph.substring(open + 1, ph.length() - 1);<a name="line.361"></a> +<span class="sourceLineNo">362</span> final Set<String> langs = new HashSet<>(Arrays.asList(in.split("[+]")));<a name="line.362"></a> +<span class="sourceLineNo">363</span><a name="line.363"></a> +<span class="sourceLineNo">364</span> return new Phoneme(before, Languages.LanguageSet.from(langs));<a name="line.364"></a> +<span class="sourceLineNo">365</span> }<a name="line.365"></a> +<span class="sourceLineNo">366</span> return new Phoneme(ph, Languages.ANY_LANGUAGE);<a name="line.366"></a> +<span class="sourceLineNo">367</span> }<a name="line.367"></a> +<span class="sourceLineNo">368</span><a name="line.368"></a> +<span class="sourceLineNo">369</span> private static PhonemeExpr parsePhonemeExpr(final String ph) {<a name="line.369"></a> +<span class="sourceLineNo">370</span> if (ph.startsWith("(")) { // we have a bracketed list of options<a name="line.370"></a> +<span class="sourceLineNo">371</span> if (!ph.endsWith(")")) {<a name="line.371"></a> +<span class="sourceLineNo">372</span> throw new IllegalArgumentException("Phoneme starts with '(' so must end with ')'");<a name="line.372"></a> +<span class="sourceLineNo">373</span> }<a name="line.373"></a> +<span class="sourceLineNo">374</span><a name="line.374"></a> +<span class="sourceLineNo">375</span> final List<Phoneme> phs = new ArrayList<>();<a name="line.375"></a> +<span class="sourceLineNo">376</span> final String body = ph.substring(1, ph.length() - 1);<a name="line.376"></a> +<span class="sourceLineNo">377</span> for (final String part : body.split("[|]")) {<a name="line.377"></a> +<span class="sourceLineNo">378</span> phs.add(parsePhoneme(part));<a name="line.378"></a> +<span class="sourceLineNo">379</span> }<a name="line.379"></a> +<span class="sourceLineNo">380</span> if (body.startsWith("|") || body.endsWith("|")) {<a name="line.380"></a> +<span class="sourceLineNo">381</span> phs.add(new Phoneme("", Languages.ANY_LANGUAGE));<a name="line.381"></a> +<span class="sourceLineNo">382</span> }<a name="line.382"></a> +<span class="sourceLineNo">383</span><a name="line.383"></a> +<span class="sourceLineNo">384</span> return new PhonemeList(phs);<a name="line.384"></a> +<span class="sourceLineNo">385</span> }<a name="line.385"></a> +<span class="sourceLineNo">386</span> return parsePhoneme(ph);<a name="line.386"></a> +<span class="sourceLineNo">387</span> }<a name="line.387"></a> +<span class="sourceLineNo">388</span><a name="line.388"></a> +<span class="sourceLineNo">389</span> private static Map<String, List<Rule>> parseRules(final Scanner scanner, final String location) {<a name="line.389"></a> +<span class="sourceLineNo">390</span> final Map<String, List<Rule>> lines = new HashMap<>();<a name="line.390"></a> +<span class="sourceLineNo">391</span> int currentLine = 0;<a name="line.391"></a> +<span class="sourceLineNo">392</span><a name="line.392"></a> +<span class="sourceLineNo">393</span> boolean inMultilineComment = false;<a name="line.393"></a> +<span class="sourceLineNo">394</span> while (scanner.hasNextLine()) {<a name="line.394"></a> +<span class="sourceLineNo">395</span> currentLine++;<a name="line.395"></a> +<span class="sourceLineNo">396</span> final String rawLine = scanner.nextLine();<a name="line.396"></a> +<span class="sourceLineNo">397</span> String line = rawLine;<a name="line.397"></a> +<span class="sourceLineNo">398</span><a name="line.398"></a> +<span class="sourceLineNo">399</span> if (inMultilineComment) {<a name="line.399"></a> +<span class="sourceLineNo">400</span> if (line.endsWith(ResourceConstants.EXT_CMT_END)) {<a name="line.400"></a> +<span class="sourceLineNo">401</span> inMultilineComment = false;<a name="line.401"></a> +<span class="sourceLineNo">402</span> }<a name="line.402"></a> +<span class="sourceLineNo">403</span> } else {<a name="line.403"></a> +<span class="sourceLineNo">404</span> if (line.startsWith(ResourceConstants.EXT_CMT_START)) {<a name="line.404"></a> +<span class="sourceLineNo">405</span> inMultilineComment = true;<a name="line.405"></a> +<span class="sourceLineNo">406</span> } else {<a name="line.406"></a> +<span class="sourceLineNo">407</span> // discard comments<a name="line.407"></a> +<span class="sourceLineNo">408</span> final int cmtI = line.indexOf(ResourceConstants.CMT);<a name="line.408"></a> +<span class="sourceLineNo">409</span> if (cmtI >= 0) {<a name="line.409"></a> +<span class="sourceLineNo">410</span> line = line.substring(0, cmtI);<a name="line.410"></a> +<span class="sourceLineNo">411</span> }<a name="line.411"></a> +<span class="sourceLineNo">412</span><a name="line.412"></a> +<span class="sourceLineNo">413</span> // trim leading-trailing whitespace<a name="line.413"></a> +<span class="sourceLineNo">414</span> line = line.trim();<a name="line.414"></a> +<span class="sourceLineNo">415</span><a name="line.415"></a> +<span class="sourceLineNo">416</span> if (line.length() == 0) {<a name="line.416"></a> +<span class="sourceLineNo">417</span> continue; // empty lines can be safely skipped<a name="line.417"></a> +<span class="sourceLineNo">418</span> }<a name="line.418"></a> +<span class="sourceLineNo">419</span><a name="line.419"></a> +<span class="sourceLineNo">420</span> if (line.startsWith(HASH_INCLUDE)) {<a name="line.420"></a> +<span class="sourceLineNo">421</span> // include statement<a name="line.421"></a> +<span class="sourceLineNo">422</span> final String incl = line.substring(HASH_INCLUDE.length()).trim();<a name="line.422"></a> +<span class="sourceLineNo">423</span> if (incl.contains(" ")) {<a name="line.423"></a> +<span class="sourceLineNo">424</span> throw new IllegalArgumentException("Malformed import statement '" + rawLine + "' in " +<a name="line.424"></a> +<span class="sourceLineNo">425</span> location);<a name="line.425"></a> +<span class="sourceLineNo">426</span> }<a name="line.426"></a> +<span class="sourceLineNo">427</span> try (final Scanner hashIncludeScanner = createScanner(incl)) {<a name="line.427"></a> +<span class="sourceLineNo">428</span> lines.putAll(parseRules(hashIncludeScanner, location + "->" + incl));<a name="line.428"></a> +<span class="sourceLineNo">429</span> }<a name="line.429"></a> +<span class="sourceLineNo">430</span> } else {<a name="line.430"></a> +<span class="sourceLineNo">431</span> // rule<a name="line.431"></a> +<span class="sourceLineNo">432</span> final String[] parts = line.split("\\s+");<a name="line.432"></a> +<span class="sourceLineNo">433</span> if (parts.length != 4) {<a name="line.433"></a> +<span class="sourceLineNo">434</span> throw new IllegalArgumentException("Malformed rule statement split into " + parts.length +<a name="line.434"></a> +<span class="sourceLineNo">435</span> " parts: " + rawLine + " in " + location);<a name="line.435"></a> +<span class="sourceLineNo">436</span> }<a name="line.436"></a> +<span class="sourceLineNo">437</span> try {<a name="line.437"></a> +<span class="sourceLineNo">438</span> final String pat = stripQuotes(parts[0]);<a name="line.438"></a> +<span class="sourceLineNo">439</span> final String lCon = stripQuotes(parts[1]);<a name="line.439"></a> +<span class="sourceLineNo">440</span> final String rCon = stripQuotes(parts[2]);<a name="line.440"></a> +<span class="sourceLineNo">441</span> final PhonemeExpr ph = parsePhonemeExpr(stripQuotes(parts[3]));<a name="line.441"></a> +<span class="sourceLineNo">442</span> final int cLine = currentLine;<a name="line.442"></a> +<span class="sourceLineNo">443</span> final Rule r = new Rule(pat, lCon, rCon, ph) {<a name="line.443"></a> +<span class="sourceLineNo">444</span> private final int myLine = cLine;<a name="line.444"></a> +<span class="sourceLineNo">445</span> private final String loc = location;<a name="line.445"></a> +<span class="sourceLineNo">446</span><a name="line.446"></a> +<span class="sourceLineNo">447</span> @Override<a name="line.447"></a> +<span class="sourceLineNo">448</span> public String toString() {<a name="line.448"></a> +<span class="sourceLineNo">449</span> final StringBuilder sb = new StringBuilder();<a name="line.449"></a> +<span class="sourceLineNo">450</span> sb.append("Rule");<a name="line.450"></a> +<span class="sourceLineNo">451</span> sb.append("{line=").append(myLine);<a name="line.451"></a> +<span class="sourceLineNo">452</span> sb.append(", loc='").append(loc).append('\'');<a name="line.452"></a> +<span class="sourceLineNo">453</span> sb.append(", pat='").append(pat).append('\'');<a name="line.453"></a> +<span class="sourceLineNo">454</span> sb.append(", lcon='").append(lCon).append('\'');<a name="line.454"></a> +<span class="sourceLineNo">455</span> sb.append(", rcon='").append(rCon).append('\'');<a name="line.455"></a> +<span class="sourceLineNo">456</span> sb.append('}');<a name="line.456"></a> +<span class="sourceLineNo">457</span> return sb.toString();<a name="line.457"></a> +<span class="sourceLineNo">458</span> }<a name="line.458"></a> +<span class="sourceLineNo">459</span> };<a name="line.459"></a> +<span class="sourceLineNo">460</span> final String patternKey = r.pattern.substring(0,1);<a name="line.460"></a> +<span class="sourceLineNo">461</span> List<Rule> rules = lines.get(patternKey);<a name="line.461"></a> +<span class="sourceLineNo">462</span> if (rules == null) {<a name="line.462"></a> +<span class="sourceLineNo">463</span> rules = new ArrayList<>();<a name="line.463"></a> +<span class="sourceLineNo">464</span> lines.put(patternKey, rules);<a name="line.464"></a> +<span class="sourceLineNo">465</span> }<a name="line.465"></a> +<span class="sourceLineNo">466</span> rules.add(r);<a name="line.466"></a> +<span class="sourceLineNo">467</span> } catch (final IllegalArgumentException e) {<a name="line.467"></a> +<span class="sourceLineNo">468</span> throw new IllegalStateException("Problem parsing line '" + currentLine + "' in " +<a name="line.468"></a> +<span class="sourceLineNo">469</span> location, e);<a name="line.469"></a> +<span class="sourceLineNo">470</span> }<a name="line.470"></a> +<span class="sourceLineNo">471</span> }<a name="line.471"></a> +<span class="sourceLineNo">472</span> }<a name="line.472"></a> +<span class="sourceLineNo">473</span> }<a name="line.473"></a> +<span class="sourceLineNo">474</span> }<a name="line.474"></a> +<span class="sourceLineNo">475</span><a name="line.475"></a> +<span class="sourceLineNo">476</span> return lines;<a name="line.476"></a> +<span class="sourceLineNo">477</span> }<a name="line.477"></a> +<span class="sourceLineNo">478</span><a name="line.478"></a> +<span class="sourceLineNo">479</span> /**<a name="line.479"></a> +<span class="sourceLineNo">480</span> * Attempts to compile the regex into direct string ops, falling back to Pattern and Matcher in the worst case.<a name="line.480"></a> +<span class="sourceLineNo">481</span> *<a name="line.481"></a> +<span class="sourceLineNo">482</span> * @param regex<a name="line.482"></a> +<span class="sourceLineNo">483</span> * the regular expression to compile<a name="line.483"></a> +<span class="sourceLineNo">484</span> * @return an RPattern that will match this regex<a name="line.484"></a> +<span class="sourceLineNo">485</span> */<a name="line.485"></a> +<span class="sourceLineNo">486</span> private static RPattern pattern(final String regex) {<a name="line.486"></a> +<span class="sourceLineNo">487</span> final boolean startsWith = regex.startsWith("^");<a name="line.487"></a> +<span class="sourceLineNo">488</span> final boolean endsWith = regex.endsWith("$");<a name="line.488"></a> +<span class="sourceLineNo">489</span> final String content = regex.substring(startsWith ? 1 : 0, endsWith ? regex.length() - 1 : regex.length());<a name="line.489"></a> +<span class="sourceLineNo">490</span> final boolean boxes = content.contains("[");<a name="line.490"></a> +<span class="sourceLineNo">491</span><a name="line.491"></a> +<span class="sourceLineNo">492</span> if (!boxes) {<a name="line.492"></a> +<span class="sourceLineNo">493</span> if (startsWith && endsWith) {<a name="line.493"></a> +<span class="sourceLineNo">494</span> // exact match<a name="line.494"></a> +<span class="sourceLineNo">495</span> if (content.length() == 0) {<a name="line.495"></a> +<span class="sourceLineNo">496</span> // empty<a name="line.496"></a> +<span class="sourceLineNo">497</span> return new RPattern() {<a name="line.497"></a> +<span class="sourceLineNo">498</span> @Override<a name="line.498"></a> +<span class="sourceLineNo">499</span> public boolean isMatch(final CharSequence input) {<a name="line.499"></a> +<span class="sourceLineNo">500</span> return input.length() == 0;<a name="line.500"></a> +<span class="sourceLineNo">501</span> }<a name="line.501"></a> +<span class="sourceLineNo">502</span> };<a name="line.502"></a> +<span class="sourceLineNo">503</span> }<a name="line.503"></a> +<span class="sourceLineNo">504</span> return new RPattern() {<a name="line.504"></a> +<span class="sourceLineNo">505</span> @Override<a name="line.505"></a> +<span class="sourceLineNo">506</span> public boolean isMatch(final CharSequence input) {<a name="line.506"></a> +<span class="sourceLineNo">507</span> return input.equals(content);<a name="line.507"></a> +<span class="sourceLineNo">508</span> }<a name="line.508"></a> +<span class="sourceLineNo">509</span> };<a name="line.509"></a> +<span class="sourceLineNo">510</span> } else if ((startsWith || endsWith) && content.length() == 0) {<a name="line.510"></a> +<span class="sourceLineNo">511</span> // matches every string<a name="line.511"></a> +<span class="sourceLineNo">512</span> return ALL_STRINGS_RMATCHER;<a name="line.512"></a> +<span class="sourceLineNo">513</span> } else if (startsWith) {<a name="line.513"></a> +<span class="sourceLineNo">514</span> // matches from start<a name="line.514"></a> +<span class="sourceLineNo">515</span> return new RPattern() {<a name="line.515"></a> +<span class="sourceLineNo">516</span> @Override<a name="line.516"></a> +<span class="sourceLineNo">517</span> public boolean isMatch(final CharSequence input) {<a name="line.517"></a> +<span class="sourceLineNo">518</span> return startsWith(input, content);<a name="line.518"></a> +<span class="sourceLineNo">519</span> }<a name="line.519"></a> +<span class="sourceLineNo">520</span> };<a name="line.520"></a> +<span class="sourceLineNo">521</span> } else if (endsWith) {<a name="line.521"></a> +<span class="sourceLineNo">522</span> // matches from start<a name="line.522"></a> +<span class="sourceLineNo">523</span> return new RPattern() {<a name="line.523"></a> +<span class="sourceLineNo">524</span> @Override<a name="line.524"></a> +<span class="sourceLineNo">525</span> public boolean isMatch(final CharSequence input) {<a name="line.525"></a> +<span class="sourceLineNo">526</span> return endsWith(input, content);<a name="line.526"></a> +<span class="sourceLineNo">527</span> }<a name="line.527"></a> +<span class="sourceLineNo">528</span> };<a name="line.528"></a> +<span class="sourceLineNo">529</span> }<a name="line.529"></a> +<span class="sourceLineNo">530</span> } else {<a name="line.530"></a> +<span class="sourceLineNo">531</span> final boolean startsWithBox = content.startsWith("[");<a name="line.531"></a> +<span class="sourceLineNo">532</span> final boolean endsWithBox = content.endsWith("]");<a name="line.532"></a> +<span class="sourceLineNo">533</span><a name="line.533"></a> +<span class="sourceLineNo">534</span> if (startsWithBox && endsWithBox) {<a name="line.534"></a> +<span class="sourceLineNo">535</span> String boxContent = content.substring(1, content.length() - 1);<a name="line.535"></a> +<span class="sourceLineNo">536</span> if (!boxContent.contains("[")) {<a name="line.536"></a> +<span class="sourceLineNo">537</span> // box containing alternatives<a name="line.537"></a> +<span class="sourceLineNo">538</span> final boolean negate = boxContent.startsWith("^");<a name="line.538"></a> +<span class="sourceLineNo">539</span> if (negate) {<a name="line.539"></a> +<span class="sourceLineNo">540</span> boxContent = boxContent.substring(1);<a name="line.540"></a> +<span class="sourceLineNo">541</span> }<a name="line.541"></a> +<span class="sourceLineNo">542</span> final String bContent = boxContent;<a name="line.542"></a> +<span class="sourceLineNo">543</span> final boolean shouldMatch = !negate;<a name="line.543"></a> +<span class="sourceLineNo">544</span><a name="line.544"></a> +<span class="sourceLineNo">545</span> if (startsWith && endsWith) {<a name="line.545"></a> +<span class="sourceLineNo">546</span> // exact match<a name="line.546"></a> +<span class="sourceLineNo">547</span> return new RPattern() {<a name="line.547"></a> +<span class="sourceLineNo">548</span> @Override<a name="line.548"></a> +<span class="sourceLineNo">549</span> public boolean isMatch(final CharSequence input) {<a name="line.549"></a> +<span class="sourceLineNo">550</span> return input.length() == 1 && contains(bContent, input.charAt(0)) == shouldMatch;<a name="line.550"></a> +<span class="sourceLineNo">551</span> }<a name="line.551"></a> +<span class="sourceLineNo">552</span> };<a name="line.552"></a> +<span class="sourceLineNo">553</span> } else if (startsWith) {<a name="line.553"></a> +<span class="sourceLineNo">554</span> // first char<a name="line.554"></a> +<span class="sourceLineNo">555</span> return new RPattern() {<a name="line.555"></a> +<span class="sourceLineNo">556</span> @Override<a name="line.556"></a> +<span class="sourceLineNo">557</span> public boolean isMatch(final CharSequence input) {<a name="line.557"></a> +<span class="sourceLineNo">558</span> return input.length() > 0 && contains(bContent, input.charAt(0)) == shouldMatch;<a name="line.558"></a> +<span class="sourceLineNo">559</span> }<a name="line.559"></a> +<span class="sourceLineNo">560</span> };<a name="line.560"></a> +<span class="sourceLineNo">561</span> } else if (endsWith) {<a name="line.561"></a> +<span class="sourceLineNo">562</span> // last char<a name="line.562"></a> +<span class="sourceLineNo">563</span> return new RPattern() {<a name="line.563"></a> +<span class="sourceLineNo">564</span> @Override<a name="line.564"></a> +<span class="sourceLineNo">565</span> public boolean isMatch(final CharSequence input) {<a name="line.565"></a> +<span class="sourceLineNo">566</span> return input.length() > 0 &&<a name="line.566"></a> +<span class="sourceLineNo">567</span> contains(bContent, input.charAt(input.length() - 1)) == shouldMatch;<a name="line.567"></a> +<span class="sourceLineNo">568</span> }<a name="line.568"></a> +<span class="sourceLineNo">569</span> };<a name="line.569"></a> +<span class="sourceLineNo">570</span> }<a name="line.570"></a> +<span class="sourceLineNo">571</span> }<a name="line.571"></a> +<span class="sourceLineNo">572</span> }<a name="line.572"></a> +<span class="sourceLineNo">573</span> }<a name="line.573"></a> +<span class="sourceLineNo">574</span><a name="line.574"></a> +<span class="sourceLineNo">575</span> return new RPattern() {<a name="line.575"></a> +<span class="sourceLineNo">576</span> Pattern pattern = Pattern.compile(regex);<a name="line.576"></a> +<span class="sourceLineNo">577</span><a name="line.577"></a> +<span class="sourceLineNo">578</span> @Override<a name="line.578"></a> +<span class="sourceLineNo">579</span> public boolean isMatch(final CharSequence input) {<a name="line.579"></a> +<span class="sourceLineNo">580</span> final Matcher matcher = pattern.matcher(input);<a name="line.580"></a> +<span class="sourceLineNo">581</span> return matcher.find();<a name="line.581"></a> +<span class="sourceLineNo">582</span> }<a name="line.582"></a> +<span class="sourceLineNo">583</span> };<a name="line.583"></a> +<span class="sourceLineNo">584</span> }<a name="line.584"></a> +<span class="sourceLineNo">585</span><a name="line.585"></a> +<span class="sourceLineNo">586</span> private static boolean startsWith(final CharSequence input, final CharSequence prefix) {<a name="line.586"></a> +<span class="sourceLineNo">587</span> if (prefix.length() > input.length()) {<a name="line.587"></a> +<span class="sourceLineNo">588</span> return false;<a name="line.588"></a> +<span class="sourceLineNo">589</span> }<a name="line.589"></a> +<span class="sourceLineNo">590</span> for (int i = 0; i < prefix.length(); i++) {<a name="line.590"></a> +<span class="sourceLineNo">591</span> if (input.charAt(i) != prefix.charAt(i)) {<a name="line.591"></a> +<span class="sourceLineNo">592</span> return false;<a name="line.592"></a> +<span class="sourceLineNo">593</span> }<a name="line.593"></a> +<span class="sourceLineNo">594</span> }<a name="line.594"></a> +<span class="sourceLineNo">595</span> return true;<a name="line.595"></a> +<span class="sourceLineNo">596</span> }<a name="line.596"></a> +<span class="sourceLineNo">597</span><a name="line.597"></a> +<span class="sourceLineNo">598</span> private static String stripQuotes(String str) {<a name="line.598"></a> +<span class="sourceLineNo">599</span> if (str.startsWith(DOUBLE_QUOTE)) {<a name="line.599"></a> +<span class="sourceLineNo">600</span> str = str.substring(1);<a name="line.600"></a> +<span class="sourceLineNo">601</span> }<a name="line.601"></a> +<span class="sourceLineNo">602</span><a name="line.602"></a> +<span class="sourceLineNo">603</span> if (str.endsWith(DOUBLE_QUOTE)) {<a name="line.603"></a> +<span class="sourceLineNo">604</span> str = str.substring(0, str.length() - 1);<a name="line.604"></a> +<span class="sourceLineNo">605</span> }<a name="line.605"></a> +<span class="sourceLineNo">606</span><a name="line.606"></a> +<span class="sourceLineNo">607</span> return str;<a name="line.607"></a> +<span class="sourceLineNo">608</span> }<a name="line.608"></a> +<span class="sourceLineNo">609</span><a name="line.609"></a> +<span class="sourceLineNo">610</span> private final RPattern lContext;<a name="line.610"></a> +<span class="sourceLineNo">611</span><a name="line.611"></a> +<span class="sourceLineNo">612</span> private final String pattern;<a name="line.612"></a> +<span class="sourceLineNo">613</span><a name="line.613"></a> +<span class="sourceLineNo">614</span> private final PhonemeExpr phoneme;<a name="line.614"></a> +<span class="sourceLineNo">615</span><a name="line.615"></a> +<span class="sourceLineNo">616</span> private final RPattern rContext;<a name="line.616"></a> +<span class="sourceLineNo">617</span><a name="line.617"></a> +<span class="sourceLineNo">618</span> /**<a name="line.618"></a> +<span class="sourceLineNo">619</span> * Creates a new rule.<a name="line.619"></a> +<span class="sourceLineNo">620</span> *<a name="line.620"></a> +<span class="sourceLineNo">621</span> * @param pattern<a name="line.621"></a> +<span class="sourceLineNo">622</span> * the pattern<a name="line.622"></a> +<span class="sourceLineNo">623</span> * @param lContext<a name="line.623"></a> +<span class="sourceLineNo">624</span> * the left context<a name="line.624"></a> +<span class="sourceLineNo">625</span> * @param rContext<a name="line.625"></a> +<span class="sourceLineNo">626</span> * the right context<a name="line.626"></a> +<span class="sourceLineNo">627</span> * @param phoneme<a name="line.627"></a> +<span class="sourceLineNo">628</span> * the resulting phoneme<a name="line.628"></a> +<span class="sourceLineNo">629</span> */<a name="line.629"></a> +<span class="sourceLineNo">630</span> public Rule(final String pattern, final String lContext, final String rContext, final PhonemeExpr phoneme) {<a name="line.630"></a> +<span class="sourceLineNo">631</span> this.pattern = pattern;<a name="line.631"></a> +<span class="sourceLineNo">632</span> this.lContext = pattern(lContext + "$");<a name="line.632"></a> +<span class="sourceLineNo">633</span> this.rContext = pattern("^" + rContext);<a name="line.633"></a> +<span class="sourceLineNo">634</span> this.phoneme = phoneme;<a name="line.634"></a> +<span class="sourceLineNo">635</span> }<a name="line.635"></a> +<span class="sourceLineNo">636</span><a name="line.636"></a> +<span class="sourceLineNo">637</span> /**<a name="line.637"></a> +<span class="sourceLineNo">638</span> * Gets the left context. This is a regular expression that must match to the left of the pattern.<a name="line.638"></a> +<span class="sourceLineNo">639</span> *<a name="line.639"></a> +<span class="sourceLineNo">640</span> * @return the left context Pattern<a name="line.640"></a> +<span class="sourceLineNo">641</span> */<a name="line.641"></a> +<span class="sourceLineNo">642</span> public RPattern getLContext() {<a name="line.642"></a> +<span class="sourceLineNo">643</span> return this.lContext;<a name="line.643"></a> +<span class="sourceLineNo">644</span> }<a name="line.644"></a> +<span class="sourceLineNo">645</span><a name="line.645"></a> +<span class="sourceLineNo">646</span> /**<a name="line.646"></a> +<span class="sourceLineNo">647</span> * Gets the pattern. This is a string-literal that must exactly match.<a name="line.647"></a> +<span class="sourceLineNo">648</span> *<a name="line.648"></a> +<span class="sourceLineNo">649</span> * @return the pattern<a name="line.649"></a> +<span class="sourceLineNo">650</span> */<a name="line.650"></a> +<span class="sourceLineNo">651</span> public String getPattern() {<a name="line.651"></a> +<span class="sourceLineNo">652</span> return this.pattern;<a name="line.652"></a> +<span class="sourceLineNo">653</span> }<a name="line.653"></a> +<span class="sourceLineNo">654</span><a name="line.654"></a> +<span class="sourceLineNo">655</span> /**<a name="line.655"></a> +<span class="sourceLineNo">656</span> * Gets the phoneme. If the rule matches, this is the phoneme associated with the pattern match.<a name="line.656"></a> +<span class="sourceLineNo">657</span> *<a name="line.657"></a> +<span class="sourceLineNo">658</span> * @return the phoneme<a name="line.658"></a> +<span class="sourceLineNo">659</span> */<a name="line.659"></a> +<span class="sourceLineNo">660</span> public PhonemeExpr getPhoneme() {<a name="line.660"></a> +<span class="sourceLineNo">661</span> return this.phoneme;<a name="line.661"></a> +<span class="sourceLineNo">662</span> }<a name="line.662"></a> +<span class="sourceLineNo">663</span><a name="line.663"></a> +<span class="sourceLineNo">664</span> /**<a name="line.664"></a> +<span class="sourceLineNo">665</span> * Gets the right context. This is a regular expression that must match to the right of the pattern.<a name="line.665"></a> +<span class="sourceLineNo">666</span> *<a name="line.666"></a> +<span class="sourceLineNo">667</span> * @return the right context Pattern<a name="line.667"></a> +<span class="sourceLineNo">668</span> */<a name="line.668"></a> +<span class="sourceLineNo">669</span> public RPattern getRContext() {<a name="line.669"></a> +<span class="sourceLineNo">670</span> return this.rContext;<a name="line.670"></a> +<span class="sourceLineNo">671</span> }<a name="line.671"></a> +<span class="sourceLineNo">672</span><a name="line.672"></a> +<span class="sourceLineNo">673</span> /**<a name="line.673"></a> +<span class="sourceLineNo">674</span> * Decides if the pattern and context match the input starting at a position. It is a match if the<a name="line.674"></a> +<span class="sourceLineNo">675</span> * {@code lContext} matches {@code input} up to {@code i}, {@code pattern} matches at i and<a name="line.675"></a> +<span class="sourceLineNo">676</span> * {@code rContext} matches from the end of the match of {@code pattern} to the end of {@code input}.<a name="line.676"></a> +<span class="sourceLineNo">677</span> *<a name="line.677"></a> +<span class="sourceLineNo">678</span> * @param input<a name="line.678"></a> +<span class="sourceLineNo">679</span> * the input String<a name="line.679"></a> +<span class="sourceLineNo">680</span> * @param i<a name="line.680"></a> +<span class="sourceLineNo">681</span> * the int position within the input<a name="line.681"></a> +<span class="sourceLineNo">682</span> * @return true if the pattern and left/right context match, false otherwise<a name="line.682"></a> +<span class="sourceLineNo">683</span> */<a name="line.683"></a> +<span class="sourceLineNo">684</span> public boolean patternAndContextMatches(final CharSequence input, final int i) {<a name="line.684"></a> +<span class="sourceLineNo">685</span> if (i < 0) {<a name="line.685"></a> +<span class="sourceLineNo">686</span> throw new IndexOutOfBoundsException("Can not match pattern at negative indexes");<a name="line.686"></a> +<span class="sourceLineNo">687</span> }<a name="line.687"></a> +<span class="sourceLineNo">688</span><a name="line.688"></a> +<span class="sourceLineNo">689</span> final int patternLength = this.pattern.length();<a name="line.689"></a> +<span class="sourceLineNo">690</span> final int ipl = i + patternLength;<a name="line.690"></a> +<span class="sourceLineNo">691</span><a name="line.691"></a> +<span class="sourceLineNo">692</span> if (ipl > input.length()) {<a name="line.692"></a> +<span class="sourceLineNo">693</span> // not enough room for the pattern to match<a name="line.693"></a> +<span class="sourceLineNo">694</span> return false;<a name="line.694"></a> +<span class="sourceLineNo">695</span> }<a name="line.695"></a> +<span class="sourceLineNo">696</span><a name="line.696"></a> +<span class="sourceLineNo">697</span> // evaluate the pattern, left context and right context<a name="line.697"></a> +<span class="sourceLineNo">698</span> // fail early if any of the evaluations is not successful<a name="line.698"></a> +<span class="sourceLineNo">699</span> if (!input.subSequence(i, ipl).equals(this.pattern)) {<a name="line.699"></a> +<span class="sourceLineNo">700</span> return false;<a name="line.700"></a> +<span class="sourceLineNo">701</span> } else if (!this.rContext.isMatch(input.subSequence(ipl, input.length()))) {<a name="line.701"></a> +<span class="sourceLineNo">702</span> return false;<a name="line.702"></a> +<span class="sourceLineNo">703</span> }<a name="line.703"></a> +<span class="sourceLineNo">704</span> return this.lContext.isMatch(input.subSequence(0, i));<a name="line.704"></a> +<span class="sourceLineNo">705</span> }<a name="line.705"></a> +<span class="sourceLineNo">706</span>}<a name="line.706"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.PhonemeList.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.PhonemeList.html new file mode 100644 index 0000000000000000000000000000000000000000..f62994dca13e1019a68ab6655dcc91d3eb4ba987 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.PhonemeList.html @@ -0,0 +1,778 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.ArrayList;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.Arrays;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.Collections;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.Comparator;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.EnumMap;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.HashMap;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.HashSet;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import java.util.List;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import java.util.Map;<a name="line.28"></a> +<span class="sourceLineNo">029</span>import java.util.Scanner;<a name="line.29"></a> +<span class="sourceLineNo">030</span>import java.util.Set;<a name="line.30"></a> +<span class="sourceLineNo">031</span>import java.util.regex.Matcher;<a name="line.31"></a> +<span class="sourceLineNo">032</span>import java.util.regex.Pattern;<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span>import org.apache.commons.codec.Resources;<a name="line.34"></a> +<span class="sourceLineNo">035</span>import org.apache.commons.codec.language.bm.Languages.LanguageSet;<a name="line.35"></a> +<span class="sourceLineNo">036</span><a name="line.36"></a> +<span class="sourceLineNo">037</span>/**<a name="line.37"></a> +<span class="sourceLineNo">038</span> * A phoneme rule.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * Rules have a pattern, left context, right context, output phoneme, set of languages for which they apply<a name="line.40"></a> +<span class="sourceLineNo">041</span> * and a logical flag indicating if all languages must be in play. A rule matches if:<a name="line.41"></a> +<span class="sourceLineNo">042</span> * <ul><a name="line.42"></a> +<span class="sourceLineNo">043</span> * <li>the pattern matches at the current position</li><a name="line.43"></a> +<span class="sourceLineNo">044</span> * <li>the string up until the beginning of the pattern matches the left context</li><a name="line.44"></a> +<span class="sourceLineNo">045</span> * <li>the string from the end of the pattern matches the right context</li><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <li>logical is ALL and all languages are in scope; or</li><a name="line.46"></a> +<span class="sourceLineNo">047</span> * <li>logical is any other value and at least one language is in scope</li><a name="line.47"></a> +<span class="sourceLineNo">048</span> * </ul><a name="line.48"></a> +<span class="sourceLineNo">049</span> * <p><a name="line.49"></a> +<span class="sourceLineNo">050</span> * Rules are typically generated by parsing rules resources. In normal use, there will be no need for the user<a name="line.50"></a> +<span class="sourceLineNo">051</span> * to explicitly construct their own.<a name="line.51"></a> +<span class="sourceLineNo">052</span> * <p><a name="line.52"></a> +<span class="sourceLineNo">053</span> * Rules are immutable and thread-safe.<a name="line.53"></a> +<span class="sourceLineNo">054</span> * <p><a name="line.54"></a> +<span class="sourceLineNo">055</span> * <b>Rules resources</b><a name="line.55"></a> +<span class="sourceLineNo">056</span> * <p><a name="line.56"></a> +<span class="sourceLineNo">057</span> * Rules are typically loaded from resource files. These are UTF-8 encoded text files. They are systematically<a name="line.57"></a> +<span class="sourceLineNo">058</span> * named following the pattern:<a name="line.58"></a> +<span class="sourceLineNo">059</span> * <blockquote>org/apache/commons/codec/language/bm/${NameType#getName}_${RuleType#getName}_${language}.txt</blockquote><a name="line.59"></a> +<span class="sourceLineNo">060</span> * <p><a name="line.60"></a> +<span class="sourceLineNo">061</span> * The format of these resources is the following:<a name="line.61"></a> +<span class="sourceLineNo">062</span> * <ul><a name="line.62"></a> +<span class="sourceLineNo">063</span> * <li><b>Rules:</b> whitespace separated, double-quoted strings. There should be 4 columns to each row, and these<a name="line.63"></a> +<span class="sourceLineNo">064</span> * will be interpreted as:<a name="line.64"></a> +<span class="sourceLineNo">065</span> * <ol><a name="line.65"></a> +<span class="sourceLineNo">066</span> * <li>pattern</li><a name="line.66"></a> +<span class="sourceLineNo">067</span> * <li>left context</li><a name="line.67"></a> +<span class="sourceLineNo">068</span> * <li>right context</li><a name="line.68"></a> +<span class="sourceLineNo">069</span> * <li>phoneme</li><a name="line.69"></a> +<span class="sourceLineNo">070</span> * </ol><a name="line.70"></a> +<span class="sourceLineNo">071</span> * </li><a name="line.71"></a> +<span class="sourceLineNo">072</span> * <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text following on that line to be discarded<a name="line.72"></a> +<span class="sourceLineNo">073</span> * as a comment.</li><a name="line.73"></a> +<span class="sourceLineNo">074</span> * <li><b>Multi-line comments:</b> Any line starting with '/*' will start multi-line commenting mode. This will skip<a name="line.74"></a> +<span class="sourceLineNo">075</span> * all content until a line ending in '*' and '/' is found.</li><a name="line.75"></a> +<span class="sourceLineNo">076</span> * <li><b>Blank lines:</b> All blank lines will be skipped.</li><a name="line.76"></a> +<span class="sourceLineNo">077</span> * </ul><a name="line.77"></a> +<span class="sourceLineNo">078</span> *<a name="line.78"></a> +<span class="sourceLineNo">079</span> * @since 1.6<a name="line.79"></a> +<span class="sourceLineNo">080</span> */<a name="line.80"></a> +<span class="sourceLineNo">081</span>public class Rule {<a name="line.81"></a> +<span class="sourceLineNo">082</span><a name="line.82"></a> +<span class="sourceLineNo">083</span> public static final class Phoneme implements PhonemeExpr {<a name="line.83"></a> +<span class="sourceLineNo">084</span> public static final Comparator<Phoneme> COMPARATOR = new Comparator<Phoneme>() {<a name="line.84"></a> +<span class="sourceLineNo">085</span> @Override<a name="line.85"></a> +<span class="sourceLineNo">086</span> public int compare(final Phoneme o1, final Phoneme o2) {<a name="line.86"></a> +<span class="sourceLineNo">087</span> for (int i = 0; i < o1.phonemeText.length(); i++) {<a name="line.87"></a> +<span class="sourceLineNo">088</span> if (i >= o2.phonemeText.length()) {<a name="line.88"></a> +<span class="sourceLineNo">089</span> return +1;<a name="line.89"></a> +<span class="sourceLineNo">090</span> }<a name="line.90"></a> +<span class="sourceLineNo">091</span> final int c = o1.phonemeText.charAt(i) - o2.phonemeText.charAt(i);<a name="line.91"></a> +<span class="sourceLineNo">092</span> if (c != 0) {<a name="line.92"></a> +<span class="sourceLineNo">093</span> return c;<a name="line.93"></a> +<span class="sourceLineNo">094</span> }<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span><a name="line.96"></a> +<span class="sourceLineNo">097</span> if (o1.phonemeText.length() < o2.phonemeText.length()) {<a name="line.97"></a> +<span class="sourceLineNo">098</span> return -1;<a name="line.98"></a> +<span class="sourceLineNo">099</span> }<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> return 0;<a name="line.101"></a> +<span class="sourceLineNo">102</span> }<a name="line.102"></a> +<span class="sourceLineNo">103</span> };<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> private final StringBuilder phonemeText;<a name="line.105"></a> +<span class="sourceLineNo">106</span> private final Languages.LanguageSet languages;<a name="line.106"></a> +<span class="sourceLineNo">107</span><a name="line.107"></a> +<span class="sourceLineNo">108</span> public Phoneme(final CharSequence phonemeText, final Languages.LanguageSet languages) {<a name="line.108"></a> +<span class="sourceLineNo">109</span> this.phonemeText = new StringBuilder(phonemeText);<a name="line.109"></a> +<span class="sourceLineNo">110</span> this.languages = languages;<a name="line.110"></a> +<span class="sourceLineNo">111</span> }<a name="line.111"></a> +<span class="sourceLineNo">112</span><a name="line.112"></a> +<span class="sourceLineNo">113</span> public Phoneme(final Phoneme phonemeLeft, final Phoneme phonemeRight) {<a name="line.113"></a> +<span class="sourceLineNo">114</span> this(phonemeLeft.phonemeText, phonemeLeft.languages);<a name="line.114"></a> +<span class="sourceLineNo">115</span> this.phonemeText.append(phonemeRight.phonemeText);<a name="line.115"></a> +<span class="sourceLineNo">116</span> }<a name="line.116"></a> +<span class="sourceLineNo">117</span><a name="line.117"></a> +<span class="sourceLineNo">118</span> public Phoneme(final Phoneme phonemeLeft, final Phoneme phonemeRight, final Languages.LanguageSet languages) {<a name="line.118"></a> +<span class="sourceLineNo">119</span> this(phonemeLeft.phonemeText, languages);<a name="line.119"></a> +<span class="sourceLineNo">120</span> this.phonemeText.append(phonemeRight.phonemeText);<a name="line.120"></a> +<span class="sourceLineNo">121</span> }<a name="line.121"></a> +<span class="sourceLineNo">122</span><a name="line.122"></a> +<span class="sourceLineNo">123</span> public Phoneme append(final CharSequence str) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> this.phonemeText.append(str);<a name="line.124"></a> +<span class="sourceLineNo">125</span> return this;<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span><a name="line.127"></a> +<span class="sourceLineNo">128</span> public Languages.LanguageSet getLanguages() {<a name="line.128"></a> +<span class="sourceLineNo">129</span> return this.languages;<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> @Override<a name="line.132"></a> +<span class="sourceLineNo">133</span> public Iterable<Phoneme> getPhonemes() {<a name="line.133"></a> +<span class="sourceLineNo">134</span> return Collections.singleton(this);<a name="line.134"></a> +<span class="sourceLineNo">135</span> }<a name="line.135"></a> +<span class="sourceLineNo">136</span><a name="line.136"></a> +<span class="sourceLineNo">137</span> public CharSequence getPhonemeText() {<a name="line.137"></a> +<span class="sourceLineNo">138</span> return this.phonemeText;<a name="line.138"></a> +<span class="sourceLineNo">139</span> }<a name="line.139"></a> +<span class="sourceLineNo">140</span><a name="line.140"></a> +<span class="sourceLineNo">141</span> /**<a name="line.141"></a> +<span class="sourceLineNo">142</span> * Deprecated since 1.9.<a name="line.142"></a> +<span class="sourceLineNo">143</span> *<a name="line.143"></a> +<span class="sourceLineNo">144</span> * @param right the Phoneme to join<a name="line.144"></a> +<span class="sourceLineNo">145</span> * @return a new Phoneme<a name="line.145"></a> +<span class="sourceLineNo">146</span> * @deprecated since 1.9<a name="line.146"></a> +<span class="sourceLineNo">147</span> */<a name="line.147"></a> +<span class="sourceLineNo">148</span> @Deprecated<a name="line.148"></a> +<span class="sourceLineNo">149</span> public Phoneme join(final Phoneme right) {<a name="line.149"></a> +<span class="sourceLineNo">150</span> return new Phoneme(this.phonemeText.toString() + right.phonemeText.toString(),<a name="line.150"></a> +<span class="sourceLineNo">151</span> this.languages.restrictTo(right.languages));<a name="line.151"></a> +<span class="sourceLineNo">152</span> }<a name="line.152"></a> +<span class="sourceLineNo">153</span><a name="line.153"></a> +<span class="sourceLineNo">154</span> /**<a name="line.154"></a> +<span class="sourceLineNo">155</span> * Returns a new Phoneme with the same text but a union of its<a name="line.155"></a> +<span class="sourceLineNo">156</span> * current language set and the given one.<a name="line.156"></a> +<span class="sourceLineNo">157</span> *<a name="line.157"></a> +<span class="sourceLineNo">158</span> * @param lang the language set to merge<a name="line.158"></a> +<span class="sourceLineNo">159</span> * @return a new Phoneme<a name="line.159"></a> +<span class="sourceLineNo">160</span> */<a name="line.160"></a> +<span class="sourceLineNo">161</span> public Phoneme mergeWithLanguage(final LanguageSet lang) {<a name="line.161"></a> +<span class="sourceLineNo">162</span> return new Phoneme(this.phonemeText.toString(), this.languages.merge(lang));<a name="line.162"></a> +<span class="sourceLineNo">163</span> }<a name="line.163"></a> +<span class="sourceLineNo">164</span><a name="line.164"></a> +<span class="sourceLineNo">165</span> @Override<a name="line.165"></a> +<span class="sourceLineNo">166</span> public String toString() {<a name="line.166"></a> +<span class="sourceLineNo">167</span> return phonemeText.toString() + "[" + languages + "]";<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span> }<a name="line.169"></a> +<span class="sourceLineNo">170</span><a name="line.170"></a> +<span class="sourceLineNo">171</span> public interface PhonemeExpr {<a name="line.171"></a> +<span class="sourceLineNo">172</span> Iterable<Phoneme> getPhonemes();<a name="line.172"></a> +<span class="sourceLineNo">173</span> }<a name="line.173"></a> +<span class="sourceLineNo">174</span><a name="line.174"></a> +<span class="sourceLineNo">175</span> public static final class PhonemeList implements PhonemeExpr {<a name="line.175"></a> +<span class="sourceLineNo">176</span> private final List<Phoneme> phonemes;<a name="line.176"></a> +<span class="sourceLineNo">177</span><a name="line.177"></a> +<span class="sourceLineNo">178</span> public PhonemeList(final List<Phoneme> phonemes) {<a name="line.178"></a> +<span class="sourceLineNo">179</span> this.phonemes = phonemes;<a name="line.179"></a> +<span class="sourceLineNo">180</span> }<a name="line.180"></a> +<span class="sourceLineNo">181</span><a name="line.181"></a> +<span class="sourceLineNo">182</span> @Override<a name="line.182"></a> +<span class="sourceLineNo">183</span> public List<Phoneme> getPhonemes() {<a name="line.183"></a> +<span class="sourceLineNo">184</span> return this.phonemes;<a name="line.184"></a> +<span class="sourceLineNo">185</span> }<a name="line.185"></a> +<span class="sourceLineNo">186</span> }<a name="line.186"></a> +<span class="sourceLineNo">187</span><a name="line.187"></a> +<span class="sourceLineNo">188</span> /**<a name="line.188"></a> +<span class="sourceLineNo">189</span> * A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations.<a name="line.189"></a> +<span class="sourceLineNo">190</span> */<a name="line.190"></a> +<span class="sourceLineNo">191</span> public interface RPattern {<a name="line.191"></a> +<span class="sourceLineNo">192</span> boolean isMatch(CharSequence input);<a name="line.192"></a> +<span class="sourceLineNo">193</span> }<a name="line.193"></a> +<span class="sourceLineNo">194</span><a name="line.194"></a> +<span class="sourceLineNo">195</span> public static final RPattern ALL_STRINGS_RMATCHER = new RPattern() {<a name="line.195"></a> +<span class="sourceLineNo">196</span> @Override<a name="line.196"></a> +<span class="sourceLineNo">197</span> public boolean isMatch(final CharSequence input) {<a name="line.197"></a> +<span class="sourceLineNo">198</span> return true;<a name="line.198"></a> +<span class="sourceLineNo">199</span> }<a name="line.199"></a> +<span class="sourceLineNo">200</span> };<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> public static final String ALL = "ALL";<a name="line.202"></a> +<span class="sourceLineNo">203</span><a name="line.203"></a> +<span class="sourceLineNo">204</span> private static final String DOUBLE_QUOTE = "\"";<a name="line.204"></a> +<span class="sourceLineNo">205</span><a name="line.205"></a> +<span class="sourceLineNo">206</span> private static final String HASH_INCLUDE = "#include";<a name="line.206"></a> +<span class="sourceLineNo">207</span><a name="line.207"></a> +<span class="sourceLineNo">208</span> private static final Map<NameType, Map<RuleType, Map<String, Map<String, List<Rule>>>>> RULES =<a name="line.208"></a> +<span class="sourceLineNo">209</span> new EnumMap<>(NameType.class);<a name="line.209"></a> +<span class="sourceLineNo">210</span><a name="line.210"></a> +<span class="sourceLineNo">211</span> static {<a name="line.211"></a> +<span class="sourceLineNo">212</span> for (final NameType s : NameType.values()) {<a name="line.212"></a> +<span class="sourceLineNo">213</span> final Map<RuleType, Map<String, Map<String, List<Rule>>>> rts =<a name="line.213"></a> +<span class="sourceLineNo">214</span> new EnumMap<>(RuleType.class);<a name="line.214"></a> +<span class="sourceLineNo">215</span><a name="line.215"></a> +<span class="sourceLineNo">216</span> for (final RuleType rt : RuleType.values()) {<a name="line.216"></a> +<span class="sourceLineNo">217</span> final Map<String, Map<String, List<Rule>>> rs = new HashMap<>();<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> final Languages ls = Languages.getInstance(s);<a name="line.219"></a> +<span class="sourceLineNo">220</span> for (final String l : ls.getLanguages()) {<a name="line.220"></a> +<span class="sourceLineNo">221</span> try (final Scanner scanner = createScanner(s, rt, l)) {<a name="line.221"></a> +<span class="sourceLineNo">222</span> rs.put(l, parseRules(scanner, createResourceName(s, rt, l)));<a name="line.222"></a> +<span class="sourceLineNo">223</span> } catch (final IllegalStateException e) {<a name="line.223"></a> +<span class="sourceLineNo">224</span> throw new IllegalStateException("Problem processing " + createResourceName(s, rt, l), e);<a name="line.224"></a> +<span class="sourceLineNo">225</span> }<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span> if (!rt.equals(RuleType.RULES)) {<a name="line.227"></a> +<span class="sourceLineNo">228</span> try (final Scanner scanner = createScanner(s, rt, "common")) {<a name="line.228"></a> +<span class="sourceLineNo">229</span> rs.put("common", parseRules(scanner, createResourceName(s, rt, "common")));<a name="line.229"></a> +<span class="sourceLineNo">230</span> }<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> rts.put(rt, Collections.unmodifiableMap(rs));<a name="line.233"></a> +<span class="sourceLineNo">234</span> }<a name="line.234"></a> +<span class="sourceLineNo">235</span><a name="line.235"></a> +<span class="sourceLineNo">236</span> RULES.put(s, Collections.unmodifiableMap(rts));<a name="line.236"></a> +<span class="sourceLineNo">237</span> }<a name="line.237"></a> +<span class="sourceLineNo">238</span> }<a name="line.238"></a> +<span class="sourceLineNo">239</span><a name="line.239"></a> +<span class="sourceLineNo">240</span> private static boolean contains(final CharSequence chars, final char input) {<a name="line.240"></a> +<span class="sourceLineNo">241</span> for (int i = 0; i < chars.length(); i++) {<a name="line.241"></a> +<span class="sourceLineNo">242</span> if (chars.charAt(i) == input) {<a name="line.242"></a> +<span class="sourceLineNo">243</span> return true;<a name="line.243"></a> +<span class="sourceLineNo">244</span> }<a name="line.244"></a> +<span class="sourceLineNo">245</span> }<a name="line.245"></a> +<span class="sourceLineNo">246</span> return false;<a name="line.246"></a> +<span class="sourceLineNo">247</span> }<a name="line.247"></a> +<span class="sourceLineNo">248</span><a name="line.248"></a> +<span class="sourceLineNo">249</span> private static String createResourceName(final NameType nameType, final RuleType rt, final String lang) {<a name="line.249"></a> +<span class="sourceLineNo">250</span> return String.format("org/apache/commons/codec/language/bm/%s_%s_%s.txt",<a name="line.250"></a> +<span class="sourceLineNo">251</span> nameType.getName(), rt.getName(), lang);<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span><a name="line.253"></a> +<span class="sourceLineNo">254</span> private static Scanner createScanner(final NameType nameType, final RuleType rt, final String lang) {<a name="line.254"></a> +<span class="sourceLineNo">255</span> final String resName = createResourceName(nameType, rt, lang);<a name="line.255"></a> +<span class="sourceLineNo">256</span> return new Scanner(Resources.getInputStream(resName), ResourceConstants.ENCODING);<a name="line.256"></a> +<span class="sourceLineNo">257</span> }<a name="line.257"></a> +<span class="sourceLineNo">258</span><a name="line.258"></a> +<span class="sourceLineNo">259</span> private static Scanner createScanner(final String lang) {<a name="line.259"></a> +<span class="sourceLineNo">260</span> final String resName = String.format("org/apache/commons/codec/language/bm/%s.txt", lang);<a name="line.260"></a> +<span class="sourceLineNo">261</span> return new Scanner(Resources.getInputStream(resName), ResourceConstants.ENCODING);<a name="line.261"></a> +<span class="sourceLineNo">262</span> }<a name="line.262"></a> +<span class="sourceLineNo">263</span><a name="line.263"></a> +<span class="sourceLineNo">264</span> private static boolean endsWith(final CharSequence input, final CharSequence suffix) {<a name="line.264"></a> +<span class="sourceLineNo">265</span> if (suffix.length() > input.length()) {<a name="line.265"></a> +<span class="sourceLineNo">266</span> return false;<a name="line.266"></a> +<span class="sourceLineNo">267</span> }<a name="line.267"></a> +<span class="sourceLineNo">268</span> for (int i = input.length() - 1, j = suffix.length() - 1; j >= 0; i--, j--) {<a name="line.268"></a> +<span class="sourceLineNo">269</span> if (input.charAt(i) != suffix.charAt(j)) {<a name="line.269"></a> +<span class="sourceLineNo">270</span> return false;<a name="line.270"></a> +<span class="sourceLineNo">271</span> }<a name="line.271"></a> +<span class="sourceLineNo">272</span> }<a name="line.272"></a> +<span class="sourceLineNo">273</span> return true;<a name="line.273"></a> +<span class="sourceLineNo">274</span> }<a name="line.274"></a> +<span class="sourceLineNo">275</span><a name="line.275"></a> +<span class="sourceLineNo">276</span> /**<a name="line.276"></a> +<span class="sourceLineNo">277</span> * Gets rules for a combination of name type, rule type and languages.<a name="line.277"></a> +<span class="sourceLineNo">278</span> *<a name="line.278"></a> +<span class="sourceLineNo">279</span> * @param nameType<a name="line.279"></a> +<span class="sourceLineNo">280</span> * the NameType to consider<a name="line.280"></a> +<span class="sourceLineNo">281</span> * @param rt<a name="line.281"></a> +<span class="sourceLineNo">282</span> * the RuleType to consider<a name="line.282"></a> +<span class="sourceLineNo">283</span> * @param langs<a name="line.283"></a> +<span class="sourceLineNo">284</span> * the set of languages to consider<a name="line.284"></a> +<span class="sourceLineNo">285</span> * @return a list of Rules that apply<a name="line.285"></a> +<span class="sourceLineNo">286</span> */<a name="line.286"></a> +<span class="sourceLineNo">287</span> public static List<Rule> getInstance(final NameType nameType, final RuleType rt,<a name="line.287"></a> +<span class="sourceLineNo">288</span> final Languages.LanguageSet langs) {<a name="line.288"></a> +<span class="sourceLineNo">289</span> final Map<String, List<Rule>> ruleMap = getInstanceMap(nameType, rt, langs);<a name="line.289"></a> +<span class="sourceLineNo">290</span> final List<Rule> allRules = new ArrayList<>();<a name="line.290"></a> +<span class="sourceLineNo">291</span> for (final List<Rule> rules : ruleMap.values()) {<a name="line.291"></a> +<span class="sourceLineNo">292</span> allRules.addAll(rules);<a name="line.292"></a> +<span class="sourceLineNo">293</span> }<a name="line.293"></a> +<span class="sourceLineNo">294</span> return allRules;<a name="line.294"></a> +<span class="sourceLineNo">295</span> }<a name="line.295"></a> +<span class="sourceLineNo">296</span><a name="line.296"></a> +<span class="sourceLineNo">297</span> /**<a name="line.297"></a> +<span class="sourceLineNo">298</span> * Gets rules for a combination of name type, rule type and a single language.<a name="line.298"></a> +<span class="sourceLineNo">299</span> *<a name="line.299"></a> +<span class="sourceLineNo">300</span> * @param nameType<a name="line.300"></a> +<span class="sourceLineNo">301</span> * the NameType to consider<a name="line.301"></a> +<span class="sourceLineNo">302</span> * @param rt<a name="line.302"></a> +<span class="sourceLineNo">303</span> * the RuleType to consider<a name="line.303"></a> +<span class="sourceLineNo">304</span> * @param lang<a name="line.304"></a> +<span class="sourceLineNo">305</span> * the language to consider<a name="line.305"></a> +<span class="sourceLineNo">306</span> * @return a list of Rules that apply<a name="line.306"></a> +<span class="sourceLineNo">307</span> */<a name="line.307"></a> +<span class="sourceLineNo">308</span> public static List<Rule> getInstance(final NameType nameType, final RuleType rt, final String lang) {<a name="line.308"></a> +<span class="sourceLineNo">309</span> return getInstance(nameType, rt, LanguageSet.from(new HashSet<>(Arrays.asList(lang))));<a name="line.309"></a> +<span class="sourceLineNo">310</span> }<a name="line.310"></a> +<span class="sourceLineNo">311</span><a name="line.311"></a> +<span class="sourceLineNo">312</span> /**<a name="line.312"></a> +<span class="sourceLineNo">313</span> * Gets rules for a combination of name type, rule type and languages.<a name="line.313"></a> +<span class="sourceLineNo">314</span> *<a name="line.314"></a> +<span class="sourceLineNo">315</span> * @param nameType<a name="line.315"></a> +<span class="sourceLineNo">316</span> * the NameType to consider<a name="line.316"></a> +<span class="sourceLineNo">317</span> * @param rt<a name="line.317"></a> +<span class="sourceLineNo">318</span> * the RuleType to consider<a name="line.318"></a> +<span class="sourceLineNo">319</span> * @param langs<a name="line.319"></a> +<span class="sourceLineNo">320</span> * the set of languages to consider<a name="line.320"></a> +<span class="sourceLineNo">321</span> * @return a map containing all Rules that apply, grouped by the first character of the rule pattern<a name="line.321"></a> +<span class="sourceLineNo">322</span> * @since 1.9<a name="line.322"></a> +<span class="sourceLineNo">323</span> */<a name="line.323"></a> +<span class="sourceLineNo">324</span> public static Map<String, List<Rule>> getInstanceMap(final NameType nameType, final RuleType rt,<a name="line.324"></a> +<span class="sourceLineNo">325</span> final Languages.LanguageSet langs) {<a name="line.325"></a> +<span class="sourceLineNo">326</span> return langs.isSingleton() ? getInstanceMap(nameType, rt, langs.getAny()) :<a name="line.326"></a> +<span class="sourceLineNo">327</span> getInstanceMap(nameType, rt, Languages.ANY);<a name="line.327"></a> +<span class="sourceLineNo">328</span> }<a name="line.328"></a> +<span class="sourceLineNo">329</span><a name="line.329"></a> +<span class="sourceLineNo">330</span> /**<a name="line.330"></a> +<span class="sourceLineNo">331</span> * Gets rules for a combination of name type, rule type and a single language.<a name="line.331"></a> +<span class="sourceLineNo">332</span> *<a name="line.332"></a> +<span class="sourceLineNo">333</span> * @param nameType<a name="line.333"></a> +<span class="sourceLineNo">334</span> * the NameType to consider<a name="line.334"></a> +<span class="sourceLineNo">335</span> * @param rt<a name="line.335"></a> +<span class="sourceLineNo">336</span> * the RuleType to consider<a name="line.336"></a> +<span class="sourceLineNo">337</span> * @param lang<a name="line.337"></a> +<span class="sourceLineNo">338</span> * the language to consider<a name="line.338"></a> +<span class="sourceLineNo">339</span> * @return a map containing all Rules that apply, grouped by the first character of the rule pattern<a name="line.339"></a> +<span class="sourceLineNo">340</span> * @since 1.9<a name="line.340"></a> +<span class="sourceLineNo">341</span> */<a name="line.341"></a> +<span class="sourceLineNo">342</span> public static Map<String, List<Rule>> getInstanceMap(final NameType nameType, final RuleType rt,<a name="line.342"></a> +<span class="sourceLineNo">343</span> final String lang) {<a name="line.343"></a> +<span class="sourceLineNo">344</span> final Map<String, List<Rule>> rules = RULES.get(nameType).get(rt).get(lang);<a name="line.344"></a> +<span class="sourceLineNo">345</span><a name="line.345"></a> +<span class="sourceLineNo">346</span> if (rules == null) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> throw new IllegalArgumentException(String.format("No rules found for %s, %s, %s.",<a name="line.347"></a> +<span class="sourceLineNo">348</span> nameType.getName(), rt.getName(), lang));<a name="line.348"></a> +<span class="sourceLineNo">349</span> }<a name="line.349"></a> +<span class="sourceLineNo">350</span><a name="line.350"></a> +<span class="sourceLineNo">351</span> return rules;<a name="line.351"></a> +<span class="sourceLineNo">352</span> }<a name="line.352"></a> +<span class="sourceLineNo">353</span><a name="line.353"></a> +<span class="sourceLineNo">354</span> private static Phoneme parsePhoneme(final String ph) {<a name="line.354"></a> +<span class="sourceLineNo">355</span> final int open = ph.indexOf("[");<a name="line.355"></a> +<span class="sourceLineNo">356</span> if (open >= 0) {<a name="line.356"></a> +<span class="sourceLineNo">357</span> if (!ph.endsWith("]")) {<a name="line.357"></a> +<span class="sourceLineNo">358</span> throw new IllegalArgumentException("Phoneme expression contains a '[' but does not end in ']'");<a name="line.358"></a> +<span class="sourceLineNo">359</span> }<a name="line.359"></a> +<span class="sourceLineNo">360</span> final String before = ph.substring(0, open);<a name="line.360"></a> +<span class="sourceLineNo">361</span> final String in = ph.substring(open + 1, ph.length() - 1);<a name="line.361"></a> +<span class="sourceLineNo">362</span> final Set<String> langs = new HashSet<>(Arrays.asList(in.split("[+]")));<a name="line.362"></a> +<span class="sourceLineNo">363</span><a name="line.363"></a> +<span class="sourceLineNo">364</span> return new Phoneme(before, Languages.LanguageSet.from(langs));<a name="line.364"></a> +<span class="sourceLineNo">365</span> }<a name="line.365"></a> +<span class="sourceLineNo">366</span> return new Phoneme(ph, Languages.ANY_LANGUAGE);<a name="line.366"></a> +<span class="sourceLineNo">367</span> }<a name="line.367"></a> +<span class="sourceLineNo">368</span><a name="line.368"></a> +<span class="sourceLineNo">369</span> private static PhonemeExpr parsePhonemeExpr(final String ph) {<a name="line.369"></a> +<span class="sourceLineNo">370</span> if (ph.startsWith("(")) { // we have a bracketed list of options<a name="line.370"></a> +<span class="sourceLineNo">371</span> if (!ph.endsWith(")")) {<a name="line.371"></a> +<span class="sourceLineNo">372</span> throw new IllegalArgumentException("Phoneme starts with '(' so must end with ')'");<a name="line.372"></a> +<span class="sourceLineNo">373</span> }<a name="line.373"></a> +<span class="sourceLineNo">374</span><a name="line.374"></a> +<span class="sourceLineNo">375</span> final List<Phoneme> phs = new ArrayList<>();<a name="line.375"></a> +<span class="sourceLineNo">376</span> final String body = ph.substring(1, ph.length() - 1);<a name="line.376"></a> +<span class="sourceLineNo">377</span> for (final String part : body.split("[|]")) {<a name="line.377"></a> +<span class="sourceLineNo">378</span> phs.add(parsePhoneme(part));<a name="line.378"></a> +<span class="sourceLineNo">379</span> }<a name="line.379"></a> +<span class="sourceLineNo">380</span> if (body.startsWith("|") || body.endsWith("|")) {<a name="line.380"></a> +<span class="sourceLineNo">381</span> phs.add(new Phoneme("", Languages.ANY_LANGUAGE));<a name="line.381"></a> +<span class="sourceLineNo">382</span> }<a name="line.382"></a> +<span class="sourceLineNo">383</span><a name="line.383"></a> +<span class="sourceLineNo">384</span> return new PhonemeList(phs);<a name="line.384"></a> +<span class="sourceLineNo">385</span> }<a name="line.385"></a> +<span class="sourceLineNo">386</span> return parsePhoneme(ph);<a name="line.386"></a> +<span class="sourceLineNo">387</span> }<a name="line.387"></a> +<span class="sourceLineNo">388</span><a name="line.388"></a> +<span class="sourceLineNo">389</span> private static Map<String, List<Rule>> parseRules(final Scanner scanner, final String location) {<a name="line.389"></a> +<span class="sourceLineNo">390</span> final Map<String, List<Rule>> lines = new HashMap<>();<a name="line.390"></a> +<span class="sourceLineNo">391</span> int currentLine = 0;<a name="line.391"></a> +<span class="sourceLineNo">392</span><a name="line.392"></a> +<span class="sourceLineNo">393</span> boolean inMultilineComment = false;<a name="line.393"></a> +<span class="sourceLineNo">394</span> while (scanner.hasNextLine()) {<a name="line.394"></a> +<span class="sourceLineNo">395</span> currentLine++;<a name="line.395"></a> +<span class="sourceLineNo">396</span> final String rawLine = scanner.nextLine();<a name="line.396"></a> +<span class="sourceLineNo">397</span> String line = rawLine;<a name="line.397"></a> +<span class="sourceLineNo">398</span><a name="line.398"></a> +<span class="sourceLineNo">399</span> if (inMultilineComment) {<a name="line.399"></a> +<span class="sourceLineNo">400</span> if (line.endsWith(ResourceConstants.EXT_CMT_END)) {<a name="line.400"></a> +<span class="sourceLineNo">401</span> inMultilineComment = false;<a name="line.401"></a> +<span class="sourceLineNo">402</span> }<a name="line.402"></a> +<span class="sourceLineNo">403</span> } else {<a name="line.403"></a> +<span class="sourceLineNo">404</span> if (line.startsWith(ResourceConstants.EXT_CMT_START)) {<a name="line.404"></a> +<span class="sourceLineNo">405</span> inMultilineComment = true;<a name="line.405"></a> +<span class="sourceLineNo">406</span> } else {<a name="line.406"></a> +<span class="sourceLineNo">407</span> // discard comments<a name="line.407"></a> +<span class="sourceLineNo">408</span> final int cmtI = line.indexOf(ResourceConstants.CMT);<a name="line.408"></a> +<span class="sourceLineNo">409</span> if (cmtI >= 0) {<a name="line.409"></a> +<span class="sourceLineNo">410</span> line = line.substring(0, cmtI);<a name="line.410"></a> +<span class="sourceLineNo">411</span> }<a name="line.411"></a> +<span class="sourceLineNo">412</span><a name="line.412"></a> +<span class="sourceLineNo">413</span> // trim leading-trailing whitespace<a name="line.413"></a> +<span class="sourceLineNo">414</span> line = line.trim();<a name="line.414"></a> +<span class="sourceLineNo">415</span><a name="line.415"></a> +<span class="sourceLineNo">416</span> if (line.length() == 0) {<a name="line.416"></a> +<span class="sourceLineNo">417</span> continue; // empty lines can be safely skipped<a name="line.417"></a> +<span class="sourceLineNo">418</span> }<a name="line.418"></a> +<span class="sourceLineNo">419</span><a name="line.419"></a> +<span class="sourceLineNo">420</span> if (line.startsWith(HASH_INCLUDE)) {<a name="line.420"></a> +<span class="sourceLineNo">421</span> // include statement<a name="line.421"></a> +<span class="sourceLineNo">422</span> final String incl = line.substring(HASH_INCLUDE.length()).trim();<a name="line.422"></a> +<span class="sourceLineNo">423</span> if (incl.contains(" ")) {<a name="line.423"></a> +<span class="sourceLineNo">424</span> throw new IllegalArgumentException("Malformed import statement '" + rawLine + "' in " +<a name="line.424"></a> +<span class="sourceLineNo">425</span> location);<a name="line.425"></a> +<span class="sourceLineNo">426</span> }<a name="line.426"></a> +<span class="sourceLineNo">427</span> try (final Scanner hashIncludeScanner = createScanner(incl)) {<a name="line.427"></a> +<span class="sourceLineNo">428</span> lines.putAll(parseRules(hashIncludeScanner, location + "->" + incl));<a name="line.428"></a> +<span class="sourceLineNo">429</span> }<a name="line.429"></a> +<span class="sourceLineNo">430</span> } else {<a name="line.430"></a> +<span class="sourceLineNo">431</span> // rule<a name="line.431"></a> +<span class="sourceLineNo">432</span> final String[] parts = line.split("\\s+");<a name="line.432"></a> +<span class="sourceLineNo">433</span> if (parts.length != 4) {<a name="line.433"></a> +<span class="sourceLineNo">434</span> throw new IllegalArgumentException("Malformed rule statement split into " + parts.length +<a name="line.434"></a> +<span class="sourceLineNo">435</span> " parts: " + rawLine + " in " + location);<a name="line.435"></a> +<span class="sourceLineNo">436</span> }<a name="line.436"></a> +<span class="sourceLineNo">437</span> try {<a name="line.437"></a> +<span class="sourceLineNo">438</span> final String pat = stripQuotes(parts[0]);<a name="line.438"></a> +<span class="sourceLineNo">439</span> final String lCon = stripQuotes(parts[1]);<a name="line.439"></a> +<span class="sourceLineNo">440</span> final String rCon = stripQuotes(parts[2]);<a name="line.440"></a> +<span class="sourceLineNo">441</span> final PhonemeExpr ph = parsePhonemeExpr(stripQuotes(parts[3]));<a name="line.441"></a> +<span class="sourceLineNo">442</span> final int cLine = currentLine;<a name="line.442"></a> +<span class="sourceLineNo">443</span> final Rule r = new Rule(pat, lCon, rCon, ph) {<a name="line.443"></a> +<span class="sourceLineNo">444</span> private final int myLine = cLine;<a name="line.444"></a> +<span class="sourceLineNo">445</span> private final String loc = location;<a name="line.445"></a> +<span class="sourceLineNo">446</span><a name="line.446"></a> +<span class="sourceLineNo">447</span> @Override<a name="line.447"></a> +<span class="sourceLineNo">448</span> public String toString() {<a name="line.448"></a> +<span class="sourceLineNo">449</span> final StringBuilder sb = new StringBuilder();<a name="line.449"></a> +<span class="sourceLineNo">450</span> sb.append("Rule");<a name="line.450"></a> +<span class="sourceLineNo">451</span> sb.append("{line=").append(myLine);<a name="line.451"></a> +<span class="sourceLineNo">452</span> sb.append(", loc='").append(loc).append('\'');<a name="line.452"></a> +<span class="sourceLineNo">453</span> sb.append(", pat='").append(pat).append('\'');<a name="line.453"></a> +<span class="sourceLineNo">454</span> sb.append(", lcon='").append(lCon).append('\'');<a name="line.454"></a> +<span class="sourceLineNo">455</span> sb.append(", rcon='").append(rCon).append('\'');<a name="line.455"></a> +<span class="sourceLineNo">456</span> sb.append('}');<a name="line.456"></a> +<span class="sourceLineNo">457</span> return sb.toString();<a name="line.457"></a> +<span class="sourceLineNo">458</span> }<a name="line.458"></a> +<span class="sourceLineNo">459</span> };<a name="line.459"></a> +<span class="sourceLineNo">460</span> final String patternKey = r.pattern.substring(0,1);<a name="line.460"></a> +<span class="sourceLineNo">461</span> List<Rule> rules = lines.get(patternKey);<a name="line.461"></a> +<span class="sourceLineNo">462</span> if (rules == null) {<a name="line.462"></a> +<span class="sourceLineNo">463</span> rules = new ArrayList<>();<a name="line.463"></a> +<span class="sourceLineNo">464</span> lines.put(patternKey, rules);<a name="line.464"></a> +<span class="sourceLineNo">465</span> }<a name="line.465"></a> +<span class="sourceLineNo">466</span> rules.add(r);<a name="line.466"></a> +<span class="sourceLineNo">467</span> } catch (final IllegalArgumentException e) {<a name="line.467"></a> +<span class="sourceLineNo">468</span> throw new IllegalStateException("Problem parsing line '" + currentLine + "' in " +<a name="line.468"></a> +<span class="sourceLineNo">469</span> location, e);<a name="line.469"></a> +<span class="sourceLineNo">470</span> }<a name="line.470"></a> +<span class="sourceLineNo">471</span> }<a name="line.471"></a> +<span class="sourceLineNo">472</span> }<a name="line.472"></a> +<span class="sourceLineNo">473</span> }<a name="line.473"></a> +<span class="sourceLineNo">474</span> }<a name="line.474"></a> +<span class="sourceLineNo">475</span><a name="line.475"></a> +<span class="sourceLineNo">476</span> return lines;<a name="line.476"></a> +<span class="sourceLineNo">477</span> }<a name="line.477"></a> +<span class="sourceLineNo">478</span><a name="line.478"></a> +<span class="sourceLineNo">479</span> /**<a name="line.479"></a> +<span class="sourceLineNo">480</span> * Attempts to compile the regex into direct string ops, falling back to Pattern and Matcher in the worst case.<a name="line.480"></a> +<span class="sourceLineNo">481</span> *<a name="line.481"></a> +<span class="sourceLineNo">482</span> * @param regex<a name="line.482"></a> +<span class="sourceLineNo">483</span> * the regular expression to compile<a name="line.483"></a> +<span class="sourceLineNo">484</span> * @return an RPattern that will match this regex<a name="line.484"></a> +<span class="sourceLineNo">485</span> */<a name="line.485"></a> +<span class="sourceLineNo">486</span> private static RPattern pattern(final String regex) {<a name="line.486"></a> +<span class="sourceLineNo">487</span> final boolean startsWith = regex.startsWith("^");<a name="line.487"></a> +<span class="sourceLineNo">488</span> final boolean endsWith = regex.endsWith("$");<a name="line.488"></a> +<span class="sourceLineNo">489</span> final String content = regex.substring(startsWith ? 1 : 0, endsWith ? regex.length() - 1 : regex.length());<a name="line.489"></a> +<span class="sourceLineNo">490</span> final boolean boxes = content.contains("[");<a name="line.490"></a> +<span class="sourceLineNo">491</span><a name="line.491"></a> +<span class="sourceLineNo">492</span> if (!boxes) {<a name="line.492"></a> +<span class="sourceLineNo">493</span> if (startsWith && endsWith) {<a name="line.493"></a> +<span class="sourceLineNo">494</span> // exact match<a name="line.494"></a> +<span class="sourceLineNo">495</span> if (content.length() == 0) {<a name="line.495"></a> +<span class="sourceLineNo">496</span> // empty<a name="line.496"></a> +<span class="sourceLineNo">497</span> return new RPattern() {<a name="line.497"></a> +<span class="sourceLineNo">498</span> @Override<a name="line.498"></a> +<span class="sourceLineNo">499</span> public boolean isMatch(final CharSequence input) {<a name="line.499"></a> +<span class="sourceLineNo">500</span> return input.length() == 0;<a name="line.500"></a> +<span class="sourceLineNo">501</span> }<a name="line.501"></a> +<span class="sourceLineNo">502</span> };<a name="line.502"></a> +<span class="sourceLineNo">503</span> }<a name="line.503"></a> +<span class="sourceLineNo">504</span> return new RPattern() {<a name="line.504"></a> +<span class="sourceLineNo">505</span> @Override<a name="line.505"></a> +<span class="sourceLineNo">506</span> public boolean isMatch(final CharSequence input) {<a name="line.506"></a> +<span class="sourceLineNo">507</span> return input.equals(content);<a name="line.507"></a> +<span class="sourceLineNo">508</span> }<a name="line.508"></a> +<span class="sourceLineNo">509</span> };<a name="line.509"></a> +<span class="sourceLineNo">510</span> } else if ((startsWith || endsWith) && content.length() == 0) {<a name="line.510"></a> +<span class="sourceLineNo">511</span> // matches every string<a name="line.511"></a> +<span class="sourceLineNo">512</span> return ALL_STRINGS_RMATCHER;<a name="line.512"></a> +<span class="sourceLineNo">513</span> } else if (startsWith) {<a name="line.513"></a> +<span class="sourceLineNo">514</span> // matches from start<a name="line.514"></a> +<span class="sourceLineNo">515</span> return new RPattern() {<a name="line.515"></a> +<span class="sourceLineNo">516</span> @Override<a name="line.516"></a> +<span class="sourceLineNo">517</span> public boolean isMatch(final CharSequence input) {<a name="line.517"></a> +<span class="sourceLineNo">518</span> return startsWith(input, content);<a name="line.518"></a> +<span class="sourceLineNo">519</span> }<a name="line.519"></a> +<span class="sourceLineNo">520</span> };<a name="line.520"></a> +<span class="sourceLineNo">521</span> } else if (endsWith) {<a name="line.521"></a> +<span class="sourceLineNo">522</span> // matches from start<a name="line.522"></a> +<span class="sourceLineNo">523</span> return new RPattern() {<a name="line.523"></a> +<span class="sourceLineNo">524</span> @Override<a name="line.524"></a> +<span class="sourceLineNo">525</span> public boolean isMatch(final CharSequence input) {<a name="line.525"></a> +<span class="sourceLineNo">526</span> return endsWith(input, content);<a name="line.526"></a> +<span class="sourceLineNo">527</span> }<a name="line.527"></a> +<span class="sourceLineNo">528</span> };<a name="line.528"></a> +<span class="sourceLineNo">529</span> }<a name="line.529"></a> +<span class="sourceLineNo">530</span> } else {<a name="line.530"></a> +<span class="sourceLineNo">531</span> final boolean startsWithBox = content.startsWith("[");<a name="line.531"></a> +<span class="sourceLineNo">532</span> final boolean endsWithBox = content.endsWith("]");<a name="line.532"></a> +<span class="sourceLineNo">533</span><a name="line.533"></a> +<span class="sourceLineNo">534</span> if (startsWithBox && endsWithBox) {<a name="line.534"></a> +<span class="sourceLineNo">535</span> String boxContent = content.substring(1, content.length() - 1);<a name="line.535"></a> +<span class="sourceLineNo">536</span> if (!boxContent.contains("[")) {<a name="line.536"></a> +<span class="sourceLineNo">537</span> // box containing alternatives<a name="line.537"></a> +<span class="sourceLineNo">538</span> final boolean negate = boxContent.startsWith("^");<a name="line.538"></a> +<span class="sourceLineNo">539</span> if (negate) {<a name="line.539"></a> +<span class="sourceLineNo">540</span> boxContent = boxContent.substring(1);<a name="line.540"></a> +<span class="sourceLineNo">541</span> }<a name="line.541"></a> +<span class="sourceLineNo">542</span> final String bContent = boxContent;<a name="line.542"></a> +<span class="sourceLineNo">543</span> final boolean shouldMatch = !negate;<a name="line.543"></a> +<span class="sourceLineNo">544</span><a name="line.544"></a> +<span class="sourceLineNo">545</span> if (startsWith && endsWith) {<a name="line.545"></a> +<span class="sourceLineNo">546</span> // exact match<a name="line.546"></a> +<span class="sourceLineNo">547</span> return new RPattern() {<a name="line.547"></a> +<span class="sourceLineNo">548</span> @Override<a name="line.548"></a> +<span class="sourceLineNo">549</span> public boolean isMatch(final CharSequence input) {<a name="line.549"></a> +<span class="sourceLineNo">550</span> return input.length() == 1 && contains(bContent, input.charAt(0)) == shouldMatch;<a name="line.550"></a> +<span class="sourceLineNo">551</span> }<a name="line.551"></a> +<span class="sourceLineNo">552</span> };<a name="line.552"></a> +<span class="sourceLineNo">553</span> } else if (startsWith) {<a name="line.553"></a> +<span class="sourceLineNo">554</span> // first char<a name="line.554"></a> +<span class="sourceLineNo">555</span> return new RPattern() {<a name="line.555"></a> +<span class="sourceLineNo">556</span> @Override<a name="line.556"></a> +<span class="sourceLineNo">557</span> public boolean isMatch(final CharSequence input) {<a name="line.557"></a> +<span class="sourceLineNo">558</span> return input.length() > 0 && contains(bContent, input.charAt(0)) == shouldMatch;<a name="line.558"></a> +<span class="sourceLineNo">559</span> }<a name="line.559"></a> +<span class="sourceLineNo">560</span> };<a name="line.560"></a> +<span class="sourceLineNo">561</span> } else if (endsWith) {<a name="line.561"></a> +<span class="sourceLineNo">562</span> // last char<a name="line.562"></a> +<span class="sourceLineNo">563</span> return new RPattern() {<a name="line.563"></a> +<span class="sourceLineNo">564</span> @Override<a name="line.564"></a> +<span class="sourceLineNo">565</span> public boolean isMatch(final CharSequence input) {<a name="line.565"></a> +<span class="sourceLineNo">566</span> return input.length() > 0 &&<a name="line.566"></a> +<span class="sourceLineNo">567</span> contains(bContent, input.charAt(input.length() - 1)) == shouldMatch;<a name="line.567"></a> +<span class="sourceLineNo">568</span> }<a name="line.568"></a> +<span class="sourceLineNo">569</span> };<a name="line.569"></a> +<span class="sourceLineNo">570</span> }<a name="line.570"></a> +<span class="sourceLineNo">571</span> }<a name="line.571"></a> +<span class="sourceLineNo">572</span> }<a name="line.572"></a> +<span class="sourceLineNo">573</span> }<a name="line.573"></a> +<span class="sourceLineNo">574</span><a name="line.574"></a> +<span class="sourceLineNo">575</span> return new RPattern() {<a name="line.575"></a> +<span class="sourceLineNo">576</span> Pattern pattern = Pattern.compile(regex);<a name="line.576"></a> +<span class="sourceLineNo">577</span><a name="line.577"></a> +<span class="sourceLineNo">578</span> @Override<a name="line.578"></a> +<span class="sourceLineNo">579</span> public boolean isMatch(final CharSequence input) {<a name="line.579"></a> +<span class="sourceLineNo">580</span> final Matcher matcher = pattern.matcher(input);<a name="line.580"></a> +<span class="sourceLineNo">581</span> return matcher.find();<a name="line.581"></a> +<span class="sourceLineNo">582</span> }<a name="line.582"></a> +<span class="sourceLineNo">583</span> };<a name="line.583"></a> +<span class="sourceLineNo">584</span> }<a name="line.584"></a> +<span class="sourceLineNo">585</span><a name="line.585"></a> +<span class="sourceLineNo">586</span> private static boolean startsWith(final CharSequence input, final CharSequence prefix) {<a name="line.586"></a> +<span class="sourceLineNo">587</span> if (prefix.length() > input.length()) {<a name="line.587"></a> +<span class="sourceLineNo">588</span> return false;<a name="line.588"></a> +<span class="sourceLineNo">589</span> }<a name="line.589"></a> +<span class="sourceLineNo">590</span> for (int i = 0; i < prefix.length(); i++) {<a name="line.590"></a> +<span class="sourceLineNo">591</span> if (input.charAt(i) != prefix.charAt(i)) {<a name="line.591"></a> +<span class="sourceLineNo">592</span> return false;<a name="line.592"></a> +<span class="sourceLineNo">593</span> }<a name="line.593"></a> +<span class="sourceLineNo">594</span> }<a name="line.594"></a> +<span class="sourceLineNo">595</span> return true;<a name="line.595"></a> +<span class="sourceLineNo">596</span> }<a name="line.596"></a> +<span class="sourceLineNo">597</span><a name="line.597"></a> +<span class="sourceLineNo">598</span> private static String stripQuotes(String str) {<a name="line.598"></a> +<span class="sourceLineNo">599</span> if (str.startsWith(DOUBLE_QUOTE)) {<a name="line.599"></a> +<span class="sourceLineNo">600</span> str = str.substring(1);<a name="line.600"></a> +<span class="sourceLineNo">601</span> }<a name="line.601"></a> +<span class="sourceLineNo">602</span><a name="line.602"></a> +<span class="sourceLineNo">603</span> if (str.endsWith(DOUBLE_QUOTE)) {<a name="line.603"></a> +<span class="sourceLineNo">604</span> str = str.substring(0, str.length() - 1);<a name="line.604"></a> +<span class="sourceLineNo">605</span> }<a name="line.605"></a> +<span class="sourceLineNo">606</span><a name="line.606"></a> +<span class="sourceLineNo">607</span> return str;<a name="line.607"></a> +<span class="sourceLineNo">608</span> }<a name="line.608"></a> +<span class="sourceLineNo">609</span><a name="line.609"></a> +<span class="sourceLineNo">610</span> private final RPattern lContext;<a name="line.610"></a> +<span class="sourceLineNo">611</span><a name="line.611"></a> +<span class="sourceLineNo">612</span> private final String pattern;<a name="line.612"></a> +<span class="sourceLineNo">613</span><a name="line.613"></a> +<span class="sourceLineNo">614</span> private final PhonemeExpr phoneme;<a name="line.614"></a> +<span class="sourceLineNo">615</span><a name="line.615"></a> +<span class="sourceLineNo">616</span> private final RPattern rContext;<a name="line.616"></a> +<span class="sourceLineNo">617</span><a name="line.617"></a> +<span class="sourceLineNo">618</span> /**<a name="line.618"></a> +<span class="sourceLineNo">619</span> * Creates a new rule.<a name="line.619"></a> +<span class="sourceLineNo">620</span> *<a name="line.620"></a> +<span class="sourceLineNo">621</span> * @param pattern<a name="line.621"></a> +<span class="sourceLineNo">622</span> * the pattern<a name="line.622"></a> +<span class="sourceLineNo">623</span> * @param lContext<a name="line.623"></a> +<span class="sourceLineNo">624</span> * the left context<a name="line.624"></a> +<span class="sourceLineNo">625</span> * @param rContext<a name="line.625"></a> +<span class="sourceLineNo">626</span> * the right context<a name="line.626"></a> +<span class="sourceLineNo">627</span> * @param phoneme<a name="line.627"></a> +<span class="sourceLineNo">628</span> * the resulting phoneme<a name="line.628"></a> +<span class="sourceLineNo">629</span> */<a name="line.629"></a> +<span class="sourceLineNo">630</span> public Rule(final String pattern, final String lContext, final String rContext, final PhonemeExpr phoneme) {<a name="line.630"></a> +<span class="sourceLineNo">631</span> this.pattern = pattern;<a name="line.631"></a> +<span class="sourceLineNo">632</span> this.lContext = pattern(lContext + "$");<a name="line.632"></a> +<span class="sourceLineNo">633</span> this.rContext = pattern("^" + rContext);<a name="line.633"></a> +<span class="sourceLineNo">634</span> this.phoneme = phoneme;<a name="line.634"></a> +<span class="sourceLineNo">635</span> }<a name="line.635"></a> +<span class="sourceLineNo">636</span><a name="line.636"></a> +<span class="sourceLineNo">637</span> /**<a name="line.637"></a> +<span class="sourceLineNo">638</span> * Gets the left context. This is a regular expression that must match to the left of the pattern.<a name="line.638"></a> +<span class="sourceLineNo">639</span> *<a name="line.639"></a> +<span class="sourceLineNo">640</span> * @return the left context Pattern<a name="line.640"></a> +<span class="sourceLineNo">641</span> */<a name="line.641"></a> +<span class="sourceLineNo">642</span> public RPattern getLContext() {<a name="line.642"></a> +<span class="sourceLineNo">643</span> return this.lContext;<a name="line.643"></a> +<span class="sourceLineNo">644</span> }<a name="line.644"></a> +<span class="sourceLineNo">645</span><a name="line.645"></a> +<span class="sourceLineNo">646</span> /**<a name="line.646"></a> +<span class="sourceLineNo">647</span> * Gets the pattern. This is a string-literal that must exactly match.<a name="line.647"></a> +<span class="sourceLineNo">648</span> *<a name="line.648"></a> +<span class="sourceLineNo">649</span> * @return the pattern<a name="line.649"></a> +<span class="sourceLineNo">650</span> */<a name="line.650"></a> +<span class="sourceLineNo">651</span> public String getPattern() {<a name="line.651"></a> +<span class="sourceLineNo">652</span> return this.pattern;<a name="line.652"></a> +<span class="sourceLineNo">653</span> }<a name="line.653"></a> +<span class="sourceLineNo">654</span><a name="line.654"></a> +<span class="sourceLineNo">655</span> /**<a name="line.655"></a> +<span class="sourceLineNo">656</span> * Gets the phoneme. If the rule matches, this is the phoneme associated with the pattern match.<a name="line.656"></a> +<span class="sourceLineNo">657</span> *<a name="line.657"></a> +<span class="sourceLineNo">658</span> * @return the phoneme<a name="line.658"></a> +<span class="sourceLineNo">659</span> */<a name="line.659"></a> +<span class="sourceLineNo">660</span> public PhonemeExpr getPhoneme() {<a name="line.660"></a> +<span class="sourceLineNo">661</span> return this.phoneme;<a name="line.661"></a> +<span class="sourceLineNo">662</span> }<a name="line.662"></a> +<span class="sourceLineNo">663</span><a name="line.663"></a> +<span class="sourceLineNo">664</span> /**<a name="line.664"></a> +<span class="sourceLineNo">665</span> * Gets the right context. This is a regular expression that must match to the right of the pattern.<a name="line.665"></a> +<span class="sourceLineNo">666</span> *<a name="line.666"></a> +<span class="sourceLineNo">667</span> * @return the right context Pattern<a name="line.667"></a> +<span class="sourceLineNo">668</span> */<a name="line.668"></a> +<span class="sourceLineNo">669</span> public RPattern getRContext() {<a name="line.669"></a> +<span class="sourceLineNo">670</span> return this.rContext;<a name="line.670"></a> +<span class="sourceLineNo">671</span> }<a name="line.671"></a> +<span class="sourceLineNo">672</span><a name="line.672"></a> +<span class="sourceLineNo">673</span> /**<a name="line.673"></a> +<span class="sourceLineNo">674</span> * Decides if the pattern and context match the input starting at a position. It is a match if the<a name="line.674"></a> +<span class="sourceLineNo">675</span> * {@code lContext} matches {@code input} up to {@code i}, {@code pattern} matches at i and<a name="line.675"></a> +<span class="sourceLineNo">676</span> * {@code rContext} matches from the end of the match of {@code pattern} to the end of {@code input}.<a name="line.676"></a> +<span class="sourceLineNo">677</span> *<a name="line.677"></a> +<span class="sourceLineNo">678</span> * @param input<a name="line.678"></a> +<span class="sourceLineNo">679</span> * the input String<a name="line.679"></a> +<span class="sourceLineNo">680</span> * @param i<a name="line.680"></a> +<span class="sourceLineNo">681</span> * the int position within the input<a name="line.681"></a> +<span class="sourceLineNo">682</span> * @return true if the pattern and left/right context match, false otherwise<a name="line.682"></a> +<span class="sourceLineNo">683</span> */<a name="line.683"></a> +<span class="sourceLineNo">684</span> public boolean patternAndContextMatches(final CharSequence input, final int i) {<a name="line.684"></a> +<span class="sourceLineNo">685</span> if (i < 0) {<a name="line.685"></a> +<span class="sourceLineNo">686</span> throw new IndexOutOfBoundsException("Can not match pattern at negative indexes");<a name="line.686"></a> +<span class="sourceLineNo">687</span> }<a name="line.687"></a> +<span class="sourceLineNo">688</span><a name="line.688"></a> +<span class="sourceLineNo">689</span> final int patternLength = this.pattern.length();<a name="line.689"></a> +<span class="sourceLineNo">690</span> final int ipl = i + patternLength;<a name="line.690"></a> +<span class="sourceLineNo">691</span><a name="line.691"></a> +<span class="sourceLineNo">692</span> if (ipl > input.length()) {<a name="line.692"></a> +<span class="sourceLineNo">693</span> // not enough room for the pattern to match<a name="line.693"></a> +<span class="sourceLineNo">694</span> return false;<a name="line.694"></a> +<span class="sourceLineNo">695</span> }<a name="line.695"></a> +<span class="sourceLineNo">696</span><a name="line.696"></a> +<span class="sourceLineNo">697</span> // evaluate the pattern, left context and right context<a name="line.697"></a> +<span class="sourceLineNo">698</span> // fail early if any of the evaluations is not successful<a name="line.698"></a> +<span class="sourceLineNo">699</span> if (!input.subSequence(i, ipl).equals(this.pattern)) {<a name="line.699"></a> +<span class="sourceLineNo">700</span> return false;<a name="line.700"></a> +<span class="sourceLineNo">701</span> } else if (!this.rContext.isMatch(input.subSequence(ipl, input.length()))) {<a name="line.701"></a> +<span class="sourceLineNo">702</span> return false;<a name="line.702"></a> +<span class="sourceLineNo">703</span> }<a name="line.703"></a> +<span class="sourceLineNo">704</span> return this.lContext.isMatch(input.subSequence(0, i));<a name="line.704"></a> +<span class="sourceLineNo">705</span> }<a name="line.705"></a> +<span class="sourceLineNo">706</span>}<a name="line.706"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.RPattern.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.RPattern.html new file mode 100644 index 0000000000000000000000000000000000000000..f62994dca13e1019a68ab6655dcc91d3eb4ba987 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.RPattern.html @@ -0,0 +1,778 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.ArrayList;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.Arrays;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.Collections;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.Comparator;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.EnumMap;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.HashMap;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.HashSet;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import java.util.List;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import java.util.Map;<a name="line.28"></a> +<span class="sourceLineNo">029</span>import java.util.Scanner;<a name="line.29"></a> +<span class="sourceLineNo">030</span>import java.util.Set;<a name="line.30"></a> +<span class="sourceLineNo">031</span>import java.util.regex.Matcher;<a name="line.31"></a> +<span class="sourceLineNo">032</span>import java.util.regex.Pattern;<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span>import org.apache.commons.codec.Resources;<a name="line.34"></a> +<span class="sourceLineNo">035</span>import org.apache.commons.codec.language.bm.Languages.LanguageSet;<a name="line.35"></a> +<span class="sourceLineNo">036</span><a name="line.36"></a> +<span class="sourceLineNo">037</span>/**<a name="line.37"></a> +<span class="sourceLineNo">038</span> * A phoneme rule.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * Rules have a pattern, left context, right context, output phoneme, set of languages for which they apply<a name="line.40"></a> +<span class="sourceLineNo">041</span> * and a logical flag indicating if all languages must be in play. A rule matches if:<a name="line.41"></a> +<span class="sourceLineNo">042</span> * <ul><a name="line.42"></a> +<span class="sourceLineNo">043</span> * <li>the pattern matches at the current position</li><a name="line.43"></a> +<span class="sourceLineNo">044</span> * <li>the string up until the beginning of the pattern matches the left context</li><a name="line.44"></a> +<span class="sourceLineNo">045</span> * <li>the string from the end of the pattern matches the right context</li><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <li>logical is ALL and all languages are in scope; or</li><a name="line.46"></a> +<span class="sourceLineNo">047</span> * <li>logical is any other value and at least one language is in scope</li><a name="line.47"></a> +<span class="sourceLineNo">048</span> * </ul><a name="line.48"></a> +<span class="sourceLineNo">049</span> * <p><a name="line.49"></a> +<span class="sourceLineNo">050</span> * Rules are typically generated by parsing rules resources. In normal use, there will be no need for the user<a name="line.50"></a> +<span class="sourceLineNo">051</span> * to explicitly construct their own.<a name="line.51"></a> +<span class="sourceLineNo">052</span> * <p><a name="line.52"></a> +<span class="sourceLineNo">053</span> * Rules are immutable and thread-safe.<a name="line.53"></a> +<span class="sourceLineNo">054</span> * <p><a name="line.54"></a> +<span class="sourceLineNo">055</span> * <b>Rules resources</b><a name="line.55"></a> +<span class="sourceLineNo">056</span> * <p><a name="line.56"></a> +<span class="sourceLineNo">057</span> * Rules are typically loaded from resource files. These are UTF-8 encoded text files. They are systematically<a name="line.57"></a> +<span class="sourceLineNo">058</span> * named following the pattern:<a name="line.58"></a> +<span class="sourceLineNo">059</span> * <blockquote>org/apache/commons/codec/language/bm/${NameType#getName}_${RuleType#getName}_${language}.txt</blockquote><a name="line.59"></a> +<span class="sourceLineNo">060</span> * <p><a name="line.60"></a> +<span class="sourceLineNo">061</span> * The format of these resources is the following:<a name="line.61"></a> +<span class="sourceLineNo">062</span> * <ul><a name="line.62"></a> +<span class="sourceLineNo">063</span> * <li><b>Rules:</b> whitespace separated, double-quoted strings. There should be 4 columns to each row, and these<a name="line.63"></a> +<span class="sourceLineNo">064</span> * will be interpreted as:<a name="line.64"></a> +<span class="sourceLineNo">065</span> * <ol><a name="line.65"></a> +<span class="sourceLineNo">066</span> * <li>pattern</li><a name="line.66"></a> +<span class="sourceLineNo">067</span> * <li>left context</li><a name="line.67"></a> +<span class="sourceLineNo">068</span> * <li>right context</li><a name="line.68"></a> +<span class="sourceLineNo">069</span> * <li>phoneme</li><a name="line.69"></a> +<span class="sourceLineNo">070</span> * </ol><a name="line.70"></a> +<span class="sourceLineNo">071</span> * </li><a name="line.71"></a> +<span class="sourceLineNo">072</span> * <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text following on that line to be discarded<a name="line.72"></a> +<span class="sourceLineNo">073</span> * as a comment.</li><a name="line.73"></a> +<span class="sourceLineNo">074</span> * <li><b>Multi-line comments:</b> Any line starting with '/*' will start multi-line commenting mode. This will skip<a name="line.74"></a> +<span class="sourceLineNo">075</span> * all content until a line ending in '*' and '/' is found.</li><a name="line.75"></a> +<span class="sourceLineNo">076</span> * <li><b>Blank lines:</b> All blank lines will be skipped.</li><a name="line.76"></a> +<span class="sourceLineNo">077</span> * </ul><a name="line.77"></a> +<span class="sourceLineNo">078</span> *<a name="line.78"></a> +<span class="sourceLineNo">079</span> * @since 1.6<a name="line.79"></a> +<span class="sourceLineNo">080</span> */<a name="line.80"></a> +<span class="sourceLineNo">081</span>public class Rule {<a name="line.81"></a> +<span class="sourceLineNo">082</span><a name="line.82"></a> +<span class="sourceLineNo">083</span> public static final class Phoneme implements PhonemeExpr {<a name="line.83"></a> +<span class="sourceLineNo">084</span> public static final Comparator<Phoneme> COMPARATOR = new Comparator<Phoneme>() {<a name="line.84"></a> +<span class="sourceLineNo">085</span> @Override<a name="line.85"></a> +<span class="sourceLineNo">086</span> public int compare(final Phoneme o1, final Phoneme o2) {<a name="line.86"></a> +<span class="sourceLineNo">087</span> for (int i = 0; i < o1.phonemeText.length(); i++) {<a name="line.87"></a> +<span class="sourceLineNo">088</span> if (i >= o2.phonemeText.length()) {<a name="line.88"></a> +<span class="sourceLineNo">089</span> return +1;<a name="line.89"></a> +<span class="sourceLineNo">090</span> }<a name="line.90"></a> +<span class="sourceLineNo">091</span> final int c = o1.phonemeText.charAt(i) - o2.phonemeText.charAt(i);<a name="line.91"></a> +<span class="sourceLineNo">092</span> if (c != 0) {<a name="line.92"></a> +<span class="sourceLineNo">093</span> return c;<a name="line.93"></a> +<span class="sourceLineNo">094</span> }<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span><a name="line.96"></a> +<span class="sourceLineNo">097</span> if (o1.phonemeText.length() < o2.phonemeText.length()) {<a name="line.97"></a> +<span class="sourceLineNo">098</span> return -1;<a name="line.98"></a> +<span class="sourceLineNo">099</span> }<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> return 0;<a name="line.101"></a> +<span class="sourceLineNo">102</span> }<a name="line.102"></a> +<span class="sourceLineNo">103</span> };<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> private final StringBuilder phonemeText;<a name="line.105"></a> +<span class="sourceLineNo">106</span> private final Languages.LanguageSet languages;<a name="line.106"></a> +<span class="sourceLineNo">107</span><a name="line.107"></a> +<span class="sourceLineNo">108</span> public Phoneme(final CharSequence phonemeText, final Languages.LanguageSet languages) {<a name="line.108"></a> +<span class="sourceLineNo">109</span> this.phonemeText = new StringBuilder(phonemeText);<a name="line.109"></a> +<span class="sourceLineNo">110</span> this.languages = languages;<a name="line.110"></a> +<span class="sourceLineNo">111</span> }<a name="line.111"></a> +<span class="sourceLineNo">112</span><a name="line.112"></a> +<span class="sourceLineNo">113</span> public Phoneme(final Phoneme phonemeLeft, final Phoneme phonemeRight) {<a name="line.113"></a> +<span class="sourceLineNo">114</span> this(phonemeLeft.phonemeText, phonemeLeft.languages);<a name="line.114"></a> +<span class="sourceLineNo">115</span> this.phonemeText.append(phonemeRight.phonemeText);<a name="line.115"></a> +<span class="sourceLineNo">116</span> }<a name="line.116"></a> +<span class="sourceLineNo">117</span><a name="line.117"></a> +<span class="sourceLineNo">118</span> public Phoneme(final Phoneme phonemeLeft, final Phoneme phonemeRight, final Languages.LanguageSet languages) {<a name="line.118"></a> +<span class="sourceLineNo">119</span> this(phonemeLeft.phonemeText, languages);<a name="line.119"></a> +<span class="sourceLineNo">120</span> this.phonemeText.append(phonemeRight.phonemeText);<a name="line.120"></a> +<span class="sourceLineNo">121</span> }<a name="line.121"></a> +<span class="sourceLineNo">122</span><a name="line.122"></a> +<span class="sourceLineNo">123</span> public Phoneme append(final CharSequence str) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> this.phonemeText.append(str);<a name="line.124"></a> +<span class="sourceLineNo">125</span> return this;<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span><a name="line.127"></a> +<span class="sourceLineNo">128</span> public Languages.LanguageSet getLanguages() {<a name="line.128"></a> +<span class="sourceLineNo">129</span> return this.languages;<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> @Override<a name="line.132"></a> +<span class="sourceLineNo">133</span> public Iterable<Phoneme> getPhonemes() {<a name="line.133"></a> +<span class="sourceLineNo">134</span> return Collections.singleton(this);<a name="line.134"></a> +<span class="sourceLineNo">135</span> }<a name="line.135"></a> +<span class="sourceLineNo">136</span><a name="line.136"></a> +<span class="sourceLineNo">137</span> public CharSequence getPhonemeText() {<a name="line.137"></a> +<span class="sourceLineNo">138</span> return this.phonemeText;<a name="line.138"></a> +<span class="sourceLineNo">139</span> }<a name="line.139"></a> +<span class="sourceLineNo">140</span><a name="line.140"></a> +<span class="sourceLineNo">141</span> /**<a name="line.141"></a> +<span class="sourceLineNo">142</span> * Deprecated since 1.9.<a name="line.142"></a> +<span class="sourceLineNo">143</span> *<a name="line.143"></a> +<span class="sourceLineNo">144</span> * @param right the Phoneme to join<a name="line.144"></a> +<span class="sourceLineNo">145</span> * @return a new Phoneme<a name="line.145"></a> +<span class="sourceLineNo">146</span> * @deprecated since 1.9<a name="line.146"></a> +<span class="sourceLineNo">147</span> */<a name="line.147"></a> +<span class="sourceLineNo">148</span> @Deprecated<a name="line.148"></a> +<span class="sourceLineNo">149</span> public Phoneme join(final Phoneme right) {<a name="line.149"></a> +<span class="sourceLineNo">150</span> return new Phoneme(this.phonemeText.toString() + right.phonemeText.toString(),<a name="line.150"></a> +<span class="sourceLineNo">151</span> this.languages.restrictTo(right.languages));<a name="line.151"></a> +<span class="sourceLineNo">152</span> }<a name="line.152"></a> +<span class="sourceLineNo">153</span><a name="line.153"></a> +<span class="sourceLineNo">154</span> /**<a name="line.154"></a> +<span class="sourceLineNo">155</span> * Returns a new Phoneme with the same text but a union of its<a name="line.155"></a> +<span class="sourceLineNo">156</span> * current language set and the given one.<a name="line.156"></a> +<span class="sourceLineNo">157</span> *<a name="line.157"></a> +<span class="sourceLineNo">158</span> * @param lang the language set to merge<a name="line.158"></a> +<span class="sourceLineNo">159</span> * @return a new Phoneme<a name="line.159"></a> +<span class="sourceLineNo">160</span> */<a name="line.160"></a> +<span class="sourceLineNo">161</span> public Phoneme mergeWithLanguage(final LanguageSet lang) {<a name="line.161"></a> +<span class="sourceLineNo">162</span> return new Phoneme(this.phonemeText.toString(), this.languages.merge(lang));<a name="line.162"></a> +<span class="sourceLineNo">163</span> }<a name="line.163"></a> +<span class="sourceLineNo">164</span><a name="line.164"></a> +<span class="sourceLineNo">165</span> @Override<a name="line.165"></a> +<span class="sourceLineNo">166</span> public String toString() {<a name="line.166"></a> +<span class="sourceLineNo">167</span> return phonemeText.toString() + "[" + languages + "]";<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span> }<a name="line.169"></a> +<span class="sourceLineNo">170</span><a name="line.170"></a> +<span class="sourceLineNo">171</span> public interface PhonemeExpr {<a name="line.171"></a> +<span class="sourceLineNo">172</span> Iterable<Phoneme> getPhonemes();<a name="line.172"></a> +<span class="sourceLineNo">173</span> }<a name="line.173"></a> +<span class="sourceLineNo">174</span><a name="line.174"></a> +<span class="sourceLineNo">175</span> public static final class PhonemeList implements PhonemeExpr {<a name="line.175"></a> +<span class="sourceLineNo">176</span> private final List<Phoneme> phonemes;<a name="line.176"></a> +<span class="sourceLineNo">177</span><a name="line.177"></a> +<span class="sourceLineNo">178</span> public PhonemeList(final List<Phoneme> phonemes) {<a name="line.178"></a> +<span class="sourceLineNo">179</span> this.phonemes = phonemes;<a name="line.179"></a> +<span class="sourceLineNo">180</span> }<a name="line.180"></a> +<span class="sourceLineNo">181</span><a name="line.181"></a> +<span class="sourceLineNo">182</span> @Override<a name="line.182"></a> +<span class="sourceLineNo">183</span> public List<Phoneme> getPhonemes() {<a name="line.183"></a> +<span class="sourceLineNo">184</span> return this.phonemes;<a name="line.184"></a> +<span class="sourceLineNo">185</span> }<a name="line.185"></a> +<span class="sourceLineNo">186</span> }<a name="line.186"></a> +<span class="sourceLineNo">187</span><a name="line.187"></a> +<span class="sourceLineNo">188</span> /**<a name="line.188"></a> +<span class="sourceLineNo">189</span> * A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations.<a name="line.189"></a> +<span class="sourceLineNo">190</span> */<a name="line.190"></a> +<span class="sourceLineNo">191</span> public interface RPattern {<a name="line.191"></a> +<span class="sourceLineNo">192</span> boolean isMatch(CharSequence input);<a name="line.192"></a> +<span class="sourceLineNo">193</span> }<a name="line.193"></a> +<span class="sourceLineNo">194</span><a name="line.194"></a> +<span class="sourceLineNo">195</span> public static final RPattern ALL_STRINGS_RMATCHER = new RPattern() {<a name="line.195"></a> +<span class="sourceLineNo">196</span> @Override<a name="line.196"></a> +<span class="sourceLineNo">197</span> public boolean isMatch(final CharSequence input) {<a name="line.197"></a> +<span class="sourceLineNo">198</span> return true;<a name="line.198"></a> +<span class="sourceLineNo">199</span> }<a name="line.199"></a> +<span class="sourceLineNo">200</span> };<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> public static final String ALL = "ALL";<a name="line.202"></a> +<span class="sourceLineNo">203</span><a name="line.203"></a> +<span class="sourceLineNo">204</span> private static final String DOUBLE_QUOTE = "\"";<a name="line.204"></a> +<span class="sourceLineNo">205</span><a name="line.205"></a> +<span class="sourceLineNo">206</span> private static final String HASH_INCLUDE = "#include";<a name="line.206"></a> +<span class="sourceLineNo">207</span><a name="line.207"></a> +<span class="sourceLineNo">208</span> private static final Map<NameType, Map<RuleType, Map<String, Map<String, List<Rule>>>>> RULES =<a name="line.208"></a> +<span class="sourceLineNo">209</span> new EnumMap<>(NameType.class);<a name="line.209"></a> +<span class="sourceLineNo">210</span><a name="line.210"></a> +<span class="sourceLineNo">211</span> static {<a name="line.211"></a> +<span class="sourceLineNo">212</span> for (final NameType s : NameType.values()) {<a name="line.212"></a> +<span class="sourceLineNo">213</span> final Map<RuleType, Map<String, Map<String, List<Rule>>>> rts =<a name="line.213"></a> +<span class="sourceLineNo">214</span> new EnumMap<>(RuleType.class);<a name="line.214"></a> +<span class="sourceLineNo">215</span><a name="line.215"></a> +<span class="sourceLineNo">216</span> for (final RuleType rt : RuleType.values()) {<a name="line.216"></a> +<span class="sourceLineNo">217</span> final Map<String, Map<String, List<Rule>>> rs = new HashMap<>();<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> final Languages ls = Languages.getInstance(s);<a name="line.219"></a> +<span class="sourceLineNo">220</span> for (final String l : ls.getLanguages()) {<a name="line.220"></a> +<span class="sourceLineNo">221</span> try (final Scanner scanner = createScanner(s, rt, l)) {<a name="line.221"></a> +<span class="sourceLineNo">222</span> rs.put(l, parseRules(scanner, createResourceName(s, rt, l)));<a name="line.222"></a> +<span class="sourceLineNo">223</span> } catch (final IllegalStateException e) {<a name="line.223"></a> +<span class="sourceLineNo">224</span> throw new IllegalStateException("Problem processing " + createResourceName(s, rt, l), e);<a name="line.224"></a> +<span class="sourceLineNo">225</span> }<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span> if (!rt.equals(RuleType.RULES)) {<a name="line.227"></a> +<span class="sourceLineNo">228</span> try (final Scanner scanner = createScanner(s, rt, "common")) {<a name="line.228"></a> +<span class="sourceLineNo">229</span> rs.put("common", parseRules(scanner, createResourceName(s, rt, "common")));<a name="line.229"></a> +<span class="sourceLineNo">230</span> }<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> rts.put(rt, Collections.unmodifiableMap(rs));<a name="line.233"></a> +<span class="sourceLineNo">234</span> }<a name="line.234"></a> +<span class="sourceLineNo">235</span><a name="line.235"></a> +<span class="sourceLineNo">236</span> RULES.put(s, Collections.unmodifiableMap(rts));<a name="line.236"></a> +<span class="sourceLineNo">237</span> }<a name="line.237"></a> +<span class="sourceLineNo">238</span> }<a name="line.238"></a> +<span class="sourceLineNo">239</span><a name="line.239"></a> +<span class="sourceLineNo">240</span> private static boolean contains(final CharSequence chars, final char input) {<a name="line.240"></a> +<span class="sourceLineNo">241</span> for (int i = 0; i < chars.length(); i++) {<a name="line.241"></a> +<span class="sourceLineNo">242</span> if (chars.charAt(i) == input) {<a name="line.242"></a> +<span class="sourceLineNo">243</span> return true;<a name="line.243"></a> +<span class="sourceLineNo">244</span> }<a name="line.244"></a> +<span class="sourceLineNo">245</span> }<a name="line.245"></a> +<span class="sourceLineNo">246</span> return false;<a name="line.246"></a> +<span class="sourceLineNo">247</span> }<a name="line.247"></a> +<span class="sourceLineNo">248</span><a name="line.248"></a> +<span class="sourceLineNo">249</span> private static String createResourceName(final NameType nameType, final RuleType rt, final String lang) {<a name="line.249"></a> +<span class="sourceLineNo">250</span> return String.format("org/apache/commons/codec/language/bm/%s_%s_%s.txt",<a name="line.250"></a> +<span class="sourceLineNo">251</span> nameType.getName(), rt.getName(), lang);<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span><a name="line.253"></a> +<span class="sourceLineNo">254</span> private static Scanner createScanner(final NameType nameType, final RuleType rt, final String lang) {<a name="line.254"></a> +<span class="sourceLineNo">255</span> final String resName = createResourceName(nameType, rt, lang);<a name="line.255"></a> +<span class="sourceLineNo">256</span> return new Scanner(Resources.getInputStream(resName), ResourceConstants.ENCODING);<a name="line.256"></a> +<span class="sourceLineNo">257</span> }<a name="line.257"></a> +<span class="sourceLineNo">258</span><a name="line.258"></a> +<span class="sourceLineNo">259</span> private static Scanner createScanner(final String lang) {<a name="line.259"></a> +<span class="sourceLineNo">260</span> final String resName = String.format("org/apache/commons/codec/language/bm/%s.txt", lang);<a name="line.260"></a> +<span class="sourceLineNo">261</span> return new Scanner(Resources.getInputStream(resName), ResourceConstants.ENCODING);<a name="line.261"></a> +<span class="sourceLineNo">262</span> }<a name="line.262"></a> +<span class="sourceLineNo">263</span><a name="line.263"></a> +<span class="sourceLineNo">264</span> private static boolean endsWith(final CharSequence input, final CharSequence suffix) {<a name="line.264"></a> +<span class="sourceLineNo">265</span> if (suffix.length() > input.length()) {<a name="line.265"></a> +<span class="sourceLineNo">266</span> return false;<a name="line.266"></a> +<span class="sourceLineNo">267</span> }<a name="line.267"></a> +<span class="sourceLineNo">268</span> for (int i = input.length() - 1, j = suffix.length() - 1; j >= 0; i--, j--) {<a name="line.268"></a> +<span class="sourceLineNo">269</span> if (input.charAt(i) != suffix.charAt(j)) {<a name="line.269"></a> +<span class="sourceLineNo">270</span> return false;<a name="line.270"></a> +<span class="sourceLineNo">271</span> }<a name="line.271"></a> +<span class="sourceLineNo">272</span> }<a name="line.272"></a> +<span class="sourceLineNo">273</span> return true;<a name="line.273"></a> +<span class="sourceLineNo">274</span> }<a name="line.274"></a> +<span class="sourceLineNo">275</span><a name="line.275"></a> +<span class="sourceLineNo">276</span> /**<a name="line.276"></a> +<span class="sourceLineNo">277</span> * Gets rules for a combination of name type, rule type and languages.<a name="line.277"></a> +<span class="sourceLineNo">278</span> *<a name="line.278"></a> +<span class="sourceLineNo">279</span> * @param nameType<a name="line.279"></a> +<span class="sourceLineNo">280</span> * the NameType to consider<a name="line.280"></a> +<span class="sourceLineNo">281</span> * @param rt<a name="line.281"></a> +<span class="sourceLineNo">282</span> * the RuleType to consider<a name="line.282"></a> +<span class="sourceLineNo">283</span> * @param langs<a name="line.283"></a> +<span class="sourceLineNo">284</span> * the set of languages to consider<a name="line.284"></a> +<span class="sourceLineNo">285</span> * @return a list of Rules that apply<a name="line.285"></a> +<span class="sourceLineNo">286</span> */<a name="line.286"></a> +<span class="sourceLineNo">287</span> public static List<Rule> getInstance(final NameType nameType, final RuleType rt,<a name="line.287"></a> +<span class="sourceLineNo">288</span> final Languages.LanguageSet langs) {<a name="line.288"></a> +<span class="sourceLineNo">289</span> final Map<String, List<Rule>> ruleMap = getInstanceMap(nameType, rt, langs);<a name="line.289"></a> +<span class="sourceLineNo">290</span> final List<Rule> allRules = new ArrayList<>();<a name="line.290"></a> +<span class="sourceLineNo">291</span> for (final List<Rule> rules : ruleMap.values()) {<a name="line.291"></a> +<span class="sourceLineNo">292</span> allRules.addAll(rules);<a name="line.292"></a> +<span class="sourceLineNo">293</span> }<a name="line.293"></a> +<span class="sourceLineNo">294</span> return allRules;<a name="line.294"></a> +<span class="sourceLineNo">295</span> }<a name="line.295"></a> +<span class="sourceLineNo">296</span><a name="line.296"></a> +<span class="sourceLineNo">297</span> /**<a name="line.297"></a> +<span class="sourceLineNo">298</span> * Gets rules for a combination of name type, rule type and a single language.<a name="line.298"></a> +<span class="sourceLineNo">299</span> *<a name="line.299"></a> +<span class="sourceLineNo">300</span> * @param nameType<a name="line.300"></a> +<span class="sourceLineNo">301</span> * the NameType to consider<a name="line.301"></a> +<span class="sourceLineNo">302</span> * @param rt<a name="line.302"></a> +<span class="sourceLineNo">303</span> * the RuleType to consider<a name="line.303"></a> +<span class="sourceLineNo">304</span> * @param lang<a name="line.304"></a> +<span class="sourceLineNo">305</span> * the language to consider<a name="line.305"></a> +<span class="sourceLineNo">306</span> * @return a list of Rules that apply<a name="line.306"></a> +<span class="sourceLineNo">307</span> */<a name="line.307"></a> +<span class="sourceLineNo">308</span> public static List<Rule> getInstance(final NameType nameType, final RuleType rt, final String lang) {<a name="line.308"></a> +<span class="sourceLineNo">309</span> return getInstance(nameType, rt, LanguageSet.from(new HashSet<>(Arrays.asList(lang))));<a name="line.309"></a> +<span class="sourceLineNo">310</span> }<a name="line.310"></a> +<span class="sourceLineNo">311</span><a name="line.311"></a> +<span class="sourceLineNo">312</span> /**<a name="line.312"></a> +<span class="sourceLineNo">313</span> * Gets rules for a combination of name type, rule type and languages.<a name="line.313"></a> +<span class="sourceLineNo">314</span> *<a name="line.314"></a> +<span class="sourceLineNo">315</span> * @param nameType<a name="line.315"></a> +<span class="sourceLineNo">316</span> * the NameType to consider<a name="line.316"></a> +<span class="sourceLineNo">317</span> * @param rt<a name="line.317"></a> +<span class="sourceLineNo">318</span> * the RuleType to consider<a name="line.318"></a> +<span class="sourceLineNo">319</span> * @param langs<a name="line.319"></a> +<span class="sourceLineNo">320</span> * the set of languages to consider<a name="line.320"></a> +<span class="sourceLineNo">321</span> * @return a map containing all Rules that apply, grouped by the first character of the rule pattern<a name="line.321"></a> +<span class="sourceLineNo">322</span> * @since 1.9<a name="line.322"></a> +<span class="sourceLineNo">323</span> */<a name="line.323"></a> +<span class="sourceLineNo">324</span> public static Map<String, List<Rule>> getInstanceMap(final NameType nameType, final RuleType rt,<a name="line.324"></a> +<span class="sourceLineNo">325</span> final Languages.LanguageSet langs) {<a name="line.325"></a> +<span class="sourceLineNo">326</span> return langs.isSingleton() ? getInstanceMap(nameType, rt, langs.getAny()) :<a name="line.326"></a> +<span class="sourceLineNo">327</span> getInstanceMap(nameType, rt, Languages.ANY);<a name="line.327"></a> +<span class="sourceLineNo">328</span> }<a name="line.328"></a> +<span class="sourceLineNo">329</span><a name="line.329"></a> +<span class="sourceLineNo">330</span> /**<a name="line.330"></a> +<span class="sourceLineNo">331</span> * Gets rules for a combination of name type, rule type and a single language.<a name="line.331"></a> +<span class="sourceLineNo">332</span> *<a name="line.332"></a> +<span class="sourceLineNo">333</span> * @param nameType<a name="line.333"></a> +<span class="sourceLineNo">334</span> * the NameType to consider<a name="line.334"></a> +<span class="sourceLineNo">335</span> * @param rt<a name="line.335"></a> +<span class="sourceLineNo">336</span> * the RuleType to consider<a name="line.336"></a> +<span class="sourceLineNo">337</span> * @param lang<a name="line.337"></a> +<span class="sourceLineNo">338</span> * the language to consider<a name="line.338"></a> +<span class="sourceLineNo">339</span> * @return a map containing all Rules that apply, grouped by the first character of the rule pattern<a name="line.339"></a> +<span class="sourceLineNo">340</span> * @since 1.9<a name="line.340"></a> +<span class="sourceLineNo">341</span> */<a name="line.341"></a> +<span class="sourceLineNo">342</span> public static Map<String, List<Rule>> getInstanceMap(final NameType nameType, final RuleType rt,<a name="line.342"></a> +<span class="sourceLineNo">343</span> final String lang) {<a name="line.343"></a> +<span class="sourceLineNo">344</span> final Map<String, List<Rule>> rules = RULES.get(nameType).get(rt).get(lang);<a name="line.344"></a> +<span class="sourceLineNo">345</span><a name="line.345"></a> +<span class="sourceLineNo">346</span> if (rules == null) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> throw new IllegalArgumentException(String.format("No rules found for %s, %s, %s.",<a name="line.347"></a> +<span class="sourceLineNo">348</span> nameType.getName(), rt.getName(), lang));<a name="line.348"></a> +<span class="sourceLineNo">349</span> }<a name="line.349"></a> +<span class="sourceLineNo">350</span><a name="line.350"></a> +<span class="sourceLineNo">351</span> return rules;<a name="line.351"></a> +<span class="sourceLineNo">352</span> }<a name="line.352"></a> +<span class="sourceLineNo">353</span><a name="line.353"></a> +<span class="sourceLineNo">354</span> private static Phoneme parsePhoneme(final String ph) {<a name="line.354"></a> +<span class="sourceLineNo">355</span> final int open = ph.indexOf("[");<a name="line.355"></a> +<span class="sourceLineNo">356</span> if (open >= 0) {<a name="line.356"></a> +<span class="sourceLineNo">357</span> if (!ph.endsWith("]")) {<a name="line.357"></a> +<span class="sourceLineNo">358</span> throw new IllegalArgumentException("Phoneme expression contains a '[' but does not end in ']'");<a name="line.358"></a> +<span class="sourceLineNo">359</span> }<a name="line.359"></a> +<span class="sourceLineNo">360</span> final String before = ph.substring(0, open);<a name="line.360"></a> +<span class="sourceLineNo">361</span> final String in = ph.substring(open + 1, ph.length() - 1);<a name="line.361"></a> +<span class="sourceLineNo">362</span> final Set<String> langs = new HashSet<>(Arrays.asList(in.split("[+]")));<a name="line.362"></a> +<span class="sourceLineNo">363</span><a name="line.363"></a> +<span class="sourceLineNo">364</span> return new Phoneme(before, Languages.LanguageSet.from(langs));<a name="line.364"></a> +<span class="sourceLineNo">365</span> }<a name="line.365"></a> +<span class="sourceLineNo">366</span> return new Phoneme(ph, Languages.ANY_LANGUAGE);<a name="line.366"></a> +<span class="sourceLineNo">367</span> }<a name="line.367"></a> +<span class="sourceLineNo">368</span><a name="line.368"></a> +<span class="sourceLineNo">369</span> private static PhonemeExpr parsePhonemeExpr(final String ph) {<a name="line.369"></a> +<span class="sourceLineNo">370</span> if (ph.startsWith("(")) { // we have a bracketed list of options<a name="line.370"></a> +<span class="sourceLineNo">371</span> if (!ph.endsWith(")")) {<a name="line.371"></a> +<span class="sourceLineNo">372</span> throw new IllegalArgumentException("Phoneme starts with '(' so must end with ')'");<a name="line.372"></a> +<span class="sourceLineNo">373</span> }<a name="line.373"></a> +<span class="sourceLineNo">374</span><a name="line.374"></a> +<span class="sourceLineNo">375</span> final List<Phoneme> phs = new ArrayList<>();<a name="line.375"></a> +<span class="sourceLineNo">376</span> final String body = ph.substring(1, ph.length() - 1);<a name="line.376"></a> +<span class="sourceLineNo">377</span> for (final String part : body.split("[|]")) {<a name="line.377"></a> +<span class="sourceLineNo">378</span> phs.add(parsePhoneme(part));<a name="line.378"></a> +<span class="sourceLineNo">379</span> }<a name="line.379"></a> +<span class="sourceLineNo">380</span> if (body.startsWith("|") || body.endsWith("|")) {<a name="line.380"></a> +<span class="sourceLineNo">381</span> phs.add(new Phoneme("", Languages.ANY_LANGUAGE));<a name="line.381"></a> +<span class="sourceLineNo">382</span> }<a name="line.382"></a> +<span class="sourceLineNo">383</span><a name="line.383"></a> +<span class="sourceLineNo">384</span> return new PhonemeList(phs);<a name="line.384"></a> +<span class="sourceLineNo">385</span> }<a name="line.385"></a> +<span class="sourceLineNo">386</span> return parsePhoneme(ph);<a name="line.386"></a> +<span class="sourceLineNo">387</span> }<a name="line.387"></a> +<span class="sourceLineNo">388</span><a name="line.388"></a> +<span class="sourceLineNo">389</span> private static Map<String, List<Rule>> parseRules(final Scanner scanner, final String location) {<a name="line.389"></a> +<span class="sourceLineNo">390</span> final Map<String, List<Rule>> lines = new HashMap<>();<a name="line.390"></a> +<span class="sourceLineNo">391</span> int currentLine = 0;<a name="line.391"></a> +<span class="sourceLineNo">392</span><a name="line.392"></a> +<span class="sourceLineNo">393</span> boolean inMultilineComment = false;<a name="line.393"></a> +<span class="sourceLineNo">394</span> while (scanner.hasNextLine()) {<a name="line.394"></a> +<span class="sourceLineNo">395</span> currentLine++;<a name="line.395"></a> +<span class="sourceLineNo">396</span> final String rawLine = scanner.nextLine();<a name="line.396"></a> +<span class="sourceLineNo">397</span> String line = rawLine;<a name="line.397"></a> +<span class="sourceLineNo">398</span><a name="line.398"></a> +<span class="sourceLineNo">399</span> if (inMultilineComment) {<a name="line.399"></a> +<span class="sourceLineNo">400</span> if (line.endsWith(ResourceConstants.EXT_CMT_END)) {<a name="line.400"></a> +<span class="sourceLineNo">401</span> inMultilineComment = false;<a name="line.401"></a> +<span class="sourceLineNo">402</span> }<a name="line.402"></a> +<span class="sourceLineNo">403</span> } else {<a name="line.403"></a> +<span class="sourceLineNo">404</span> if (line.startsWith(ResourceConstants.EXT_CMT_START)) {<a name="line.404"></a> +<span class="sourceLineNo">405</span> inMultilineComment = true;<a name="line.405"></a> +<span class="sourceLineNo">406</span> } else {<a name="line.406"></a> +<span class="sourceLineNo">407</span> // discard comments<a name="line.407"></a> +<span class="sourceLineNo">408</span> final int cmtI = line.indexOf(ResourceConstants.CMT);<a name="line.408"></a> +<span class="sourceLineNo">409</span> if (cmtI >= 0) {<a name="line.409"></a> +<span class="sourceLineNo">410</span> line = line.substring(0, cmtI);<a name="line.410"></a> +<span class="sourceLineNo">411</span> }<a name="line.411"></a> +<span class="sourceLineNo">412</span><a name="line.412"></a> +<span class="sourceLineNo">413</span> // trim leading-trailing whitespace<a name="line.413"></a> +<span class="sourceLineNo">414</span> line = line.trim();<a name="line.414"></a> +<span class="sourceLineNo">415</span><a name="line.415"></a> +<span class="sourceLineNo">416</span> if (line.length() == 0) {<a name="line.416"></a> +<span class="sourceLineNo">417</span> continue; // empty lines can be safely skipped<a name="line.417"></a> +<span class="sourceLineNo">418</span> }<a name="line.418"></a> +<span class="sourceLineNo">419</span><a name="line.419"></a> +<span class="sourceLineNo">420</span> if (line.startsWith(HASH_INCLUDE)) {<a name="line.420"></a> +<span class="sourceLineNo">421</span> // include statement<a name="line.421"></a> +<span class="sourceLineNo">422</span> final String incl = line.substring(HASH_INCLUDE.length()).trim();<a name="line.422"></a> +<span class="sourceLineNo">423</span> if (incl.contains(" ")) {<a name="line.423"></a> +<span class="sourceLineNo">424</span> throw new IllegalArgumentException("Malformed import statement '" + rawLine + "' in " +<a name="line.424"></a> +<span class="sourceLineNo">425</span> location);<a name="line.425"></a> +<span class="sourceLineNo">426</span> }<a name="line.426"></a> +<span class="sourceLineNo">427</span> try (final Scanner hashIncludeScanner = createScanner(incl)) {<a name="line.427"></a> +<span class="sourceLineNo">428</span> lines.putAll(parseRules(hashIncludeScanner, location + "->" + incl));<a name="line.428"></a> +<span class="sourceLineNo">429</span> }<a name="line.429"></a> +<span class="sourceLineNo">430</span> } else {<a name="line.430"></a> +<span class="sourceLineNo">431</span> // rule<a name="line.431"></a> +<span class="sourceLineNo">432</span> final String[] parts = line.split("\\s+");<a name="line.432"></a> +<span class="sourceLineNo">433</span> if (parts.length != 4) {<a name="line.433"></a> +<span class="sourceLineNo">434</span> throw new IllegalArgumentException("Malformed rule statement split into " + parts.length +<a name="line.434"></a> +<span class="sourceLineNo">435</span> " parts: " + rawLine + " in " + location);<a name="line.435"></a> +<span class="sourceLineNo">436</span> }<a name="line.436"></a> +<span class="sourceLineNo">437</span> try {<a name="line.437"></a> +<span class="sourceLineNo">438</span> final String pat = stripQuotes(parts[0]);<a name="line.438"></a> +<span class="sourceLineNo">439</span> final String lCon = stripQuotes(parts[1]);<a name="line.439"></a> +<span class="sourceLineNo">440</span> final String rCon = stripQuotes(parts[2]);<a name="line.440"></a> +<span class="sourceLineNo">441</span> final PhonemeExpr ph = parsePhonemeExpr(stripQuotes(parts[3]));<a name="line.441"></a> +<span class="sourceLineNo">442</span> final int cLine = currentLine;<a name="line.442"></a> +<span class="sourceLineNo">443</span> final Rule r = new Rule(pat, lCon, rCon, ph) {<a name="line.443"></a> +<span class="sourceLineNo">444</span> private final int myLine = cLine;<a name="line.444"></a> +<span class="sourceLineNo">445</span> private final String loc = location;<a name="line.445"></a> +<span class="sourceLineNo">446</span><a name="line.446"></a> +<span class="sourceLineNo">447</span> @Override<a name="line.447"></a> +<span class="sourceLineNo">448</span> public String toString() {<a name="line.448"></a> +<span class="sourceLineNo">449</span> final StringBuilder sb = new StringBuilder();<a name="line.449"></a> +<span class="sourceLineNo">450</span> sb.append("Rule");<a name="line.450"></a> +<span class="sourceLineNo">451</span> sb.append("{line=").append(myLine);<a name="line.451"></a> +<span class="sourceLineNo">452</span> sb.append(", loc='").append(loc).append('\'');<a name="line.452"></a> +<span class="sourceLineNo">453</span> sb.append(", pat='").append(pat).append('\'');<a name="line.453"></a> +<span class="sourceLineNo">454</span> sb.append(", lcon='").append(lCon).append('\'');<a name="line.454"></a> +<span class="sourceLineNo">455</span> sb.append(", rcon='").append(rCon).append('\'');<a name="line.455"></a> +<span class="sourceLineNo">456</span> sb.append('}');<a name="line.456"></a> +<span class="sourceLineNo">457</span> return sb.toString();<a name="line.457"></a> +<span class="sourceLineNo">458</span> }<a name="line.458"></a> +<span class="sourceLineNo">459</span> };<a name="line.459"></a> +<span class="sourceLineNo">460</span> final String patternKey = r.pattern.substring(0,1);<a name="line.460"></a> +<span class="sourceLineNo">461</span> List<Rule> rules = lines.get(patternKey);<a name="line.461"></a> +<span class="sourceLineNo">462</span> if (rules == null) {<a name="line.462"></a> +<span class="sourceLineNo">463</span> rules = new ArrayList<>();<a name="line.463"></a> +<span class="sourceLineNo">464</span> lines.put(patternKey, rules);<a name="line.464"></a> +<span class="sourceLineNo">465</span> }<a name="line.465"></a> +<span class="sourceLineNo">466</span> rules.add(r);<a name="line.466"></a> +<span class="sourceLineNo">467</span> } catch (final IllegalArgumentException e) {<a name="line.467"></a> +<span class="sourceLineNo">468</span> throw new IllegalStateException("Problem parsing line '" + currentLine + "' in " +<a name="line.468"></a> +<span class="sourceLineNo">469</span> location, e);<a name="line.469"></a> +<span class="sourceLineNo">470</span> }<a name="line.470"></a> +<span class="sourceLineNo">471</span> }<a name="line.471"></a> +<span class="sourceLineNo">472</span> }<a name="line.472"></a> +<span class="sourceLineNo">473</span> }<a name="line.473"></a> +<span class="sourceLineNo">474</span> }<a name="line.474"></a> +<span class="sourceLineNo">475</span><a name="line.475"></a> +<span class="sourceLineNo">476</span> return lines;<a name="line.476"></a> +<span class="sourceLineNo">477</span> }<a name="line.477"></a> +<span class="sourceLineNo">478</span><a name="line.478"></a> +<span class="sourceLineNo">479</span> /**<a name="line.479"></a> +<span class="sourceLineNo">480</span> * Attempts to compile the regex into direct string ops, falling back to Pattern and Matcher in the worst case.<a name="line.480"></a> +<span class="sourceLineNo">481</span> *<a name="line.481"></a> +<span class="sourceLineNo">482</span> * @param regex<a name="line.482"></a> +<span class="sourceLineNo">483</span> * the regular expression to compile<a name="line.483"></a> +<span class="sourceLineNo">484</span> * @return an RPattern that will match this regex<a name="line.484"></a> +<span class="sourceLineNo">485</span> */<a name="line.485"></a> +<span class="sourceLineNo">486</span> private static RPattern pattern(final String regex) {<a name="line.486"></a> +<span class="sourceLineNo">487</span> final boolean startsWith = regex.startsWith("^");<a name="line.487"></a> +<span class="sourceLineNo">488</span> final boolean endsWith = regex.endsWith("$");<a name="line.488"></a> +<span class="sourceLineNo">489</span> final String content = regex.substring(startsWith ? 1 : 0, endsWith ? regex.length() - 1 : regex.length());<a name="line.489"></a> +<span class="sourceLineNo">490</span> final boolean boxes = content.contains("[");<a name="line.490"></a> +<span class="sourceLineNo">491</span><a name="line.491"></a> +<span class="sourceLineNo">492</span> if (!boxes) {<a name="line.492"></a> +<span class="sourceLineNo">493</span> if (startsWith && endsWith) {<a name="line.493"></a> +<span class="sourceLineNo">494</span> // exact match<a name="line.494"></a> +<span class="sourceLineNo">495</span> if (content.length() == 0) {<a name="line.495"></a> +<span class="sourceLineNo">496</span> // empty<a name="line.496"></a> +<span class="sourceLineNo">497</span> return new RPattern() {<a name="line.497"></a> +<span class="sourceLineNo">498</span> @Override<a name="line.498"></a> +<span class="sourceLineNo">499</span> public boolean isMatch(final CharSequence input) {<a name="line.499"></a> +<span class="sourceLineNo">500</span> return input.length() == 0;<a name="line.500"></a> +<span class="sourceLineNo">501</span> }<a name="line.501"></a> +<span class="sourceLineNo">502</span> };<a name="line.502"></a> +<span class="sourceLineNo">503</span> }<a name="line.503"></a> +<span class="sourceLineNo">504</span> return new RPattern() {<a name="line.504"></a> +<span class="sourceLineNo">505</span> @Override<a name="line.505"></a> +<span class="sourceLineNo">506</span> public boolean isMatch(final CharSequence input) {<a name="line.506"></a> +<span class="sourceLineNo">507</span> return input.equals(content);<a name="line.507"></a> +<span class="sourceLineNo">508</span> }<a name="line.508"></a> +<span class="sourceLineNo">509</span> };<a name="line.509"></a> +<span class="sourceLineNo">510</span> } else if ((startsWith || endsWith) && content.length() == 0) {<a name="line.510"></a> +<span class="sourceLineNo">511</span> // matches every string<a name="line.511"></a> +<span class="sourceLineNo">512</span> return ALL_STRINGS_RMATCHER;<a name="line.512"></a> +<span class="sourceLineNo">513</span> } else if (startsWith) {<a name="line.513"></a> +<span class="sourceLineNo">514</span> // matches from start<a name="line.514"></a> +<span class="sourceLineNo">515</span> return new RPattern() {<a name="line.515"></a> +<span class="sourceLineNo">516</span> @Override<a name="line.516"></a> +<span class="sourceLineNo">517</span> public boolean isMatch(final CharSequence input) {<a name="line.517"></a> +<span class="sourceLineNo">518</span> return startsWith(input, content);<a name="line.518"></a> +<span class="sourceLineNo">519</span> }<a name="line.519"></a> +<span class="sourceLineNo">520</span> };<a name="line.520"></a> +<span class="sourceLineNo">521</span> } else if (endsWith) {<a name="line.521"></a> +<span class="sourceLineNo">522</span> // matches from start<a name="line.522"></a> +<span class="sourceLineNo">523</span> return new RPattern() {<a name="line.523"></a> +<span class="sourceLineNo">524</span> @Override<a name="line.524"></a> +<span class="sourceLineNo">525</span> public boolean isMatch(final CharSequence input) {<a name="line.525"></a> +<span class="sourceLineNo">526</span> return endsWith(input, content);<a name="line.526"></a> +<span class="sourceLineNo">527</span> }<a name="line.527"></a> +<span class="sourceLineNo">528</span> };<a name="line.528"></a> +<span class="sourceLineNo">529</span> }<a name="line.529"></a> +<span class="sourceLineNo">530</span> } else {<a name="line.530"></a> +<span class="sourceLineNo">531</span> final boolean startsWithBox = content.startsWith("[");<a name="line.531"></a> +<span class="sourceLineNo">532</span> final boolean endsWithBox = content.endsWith("]");<a name="line.532"></a> +<span class="sourceLineNo">533</span><a name="line.533"></a> +<span class="sourceLineNo">534</span> if (startsWithBox && endsWithBox) {<a name="line.534"></a> +<span class="sourceLineNo">535</span> String boxContent = content.substring(1, content.length() - 1);<a name="line.535"></a> +<span class="sourceLineNo">536</span> if (!boxContent.contains("[")) {<a name="line.536"></a> +<span class="sourceLineNo">537</span> // box containing alternatives<a name="line.537"></a> +<span class="sourceLineNo">538</span> final boolean negate = boxContent.startsWith("^");<a name="line.538"></a> +<span class="sourceLineNo">539</span> if (negate) {<a name="line.539"></a> +<span class="sourceLineNo">540</span> boxContent = boxContent.substring(1);<a name="line.540"></a> +<span class="sourceLineNo">541</span> }<a name="line.541"></a> +<span class="sourceLineNo">542</span> final String bContent = boxContent;<a name="line.542"></a> +<span class="sourceLineNo">543</span> final boolean shouldMatch = !negate;<a name="line.543"></a> +<span class="sourceLineNo">544</span><a name="line.544"></a> +<span class="sourceLineNo">545</span> if (startsWith && endsWith) {<a name="line.545"></a> +<span class="sourceLineNo">546</span> // exact match<a name="line.546"></a> +<span class="sourceLineNo">547</span> return new RPattern() {<a name="line.547"></a> +<span class="sourceLineNo">548</span> @Override<a name="line.548"></a> +<span class="sourceLineNo">549</span> public boolean isMatch(final CharSequence input) {<a name="line.549"></a> +<span class="sourceLineNo">550</span> return input.length() == 1 && contains(bContent, input.charAt(0)) == shouldMatch;<a name="line.550"></a> +<span class="sourceLineNo">551</span> }<a name="line.551"></a> +<span class="sourceLineNo">552</span> };<a name="line.552"></a> +<span class="sourceLineNo">553</span> } else if (startsWith) {<a name="line.553"></a> +<span class="sourceLineNo">554</span> // first char<a name="line.554"></a> +<span class="sourceLineNo">555</span> return new RPattern() {<a name="line.555"></a> +<span class="sourceLineNo">556</span> @Override<a name="line.556"></a> +<span class="sourceLineNo">557</span> public boolean isMatch(final CharSequence input) {<a name="line.557"></a> +<span class="sourceLineNo">558</span> return input.length() > 0 && contains(bContent, input.charAt(0)) == shouldMatch;<a name="line.558"></a> +<span class="sourceLineNo">559</span> }<a name="line.559"></a> +<span class="sourceLineNo">560</span> };<a name="line.560"></a> +<span class="sourceLineNo">561</span> } else if (endsWith) {<a name="line.561"></a> +<span class="sourceLineNo">562</span> // last char<a name="line.562"></a> +<span class="sourceLineNo">563</span> return new RPattern() {<a name="line.563"></a> +<span class="sourceLineNo">564</span> @Override<a name="line.564"></a> +<span class="sourceLineNo">565</span> public boolean isMatch(final CharSequence input) {<a name="line.565"></a> +<span class="sourceLineNo">566</span> return input.length() > 0 &&<a name="line.566"></a> +<span class="sourceLineNo">567</span> contains(bContent, input.charAt(input.length() - 1)) == shouldMatch;<a name="line.567"></a> +<span class="sourceLineNo">568</span> }<a name="line.568"></a> +<span class="sourceLineNo">569</span> };<a name="line.569"></a> +<span class="sourceLineNo">570</span> }<a name="line.570"></a> +<span class="sourceLineNo">571</span> }<a name="line.571"></a> +<span class="sourceLineNo">572</span> }<a name="line.572"></a> +<span class="sourceLineNo">573</span> }<a name="line.573"></a> +<span class="sourceLineNo">574</span><a name="line.574"></a> +<span class="sourceLineNo">575</span> return new RPattern() {<a name="line.575"></a> +<span class="sourceLineNo">576</span> Pattern pattern = Pattern.compile(regex);<a name="line.576"></a> +<span class="sourceLineNo">577</span><a name="line.577"></a> +<span class="sourceLineNo">578</span> @Override<a name="line.578"></a> +<span class="sourceLineNo">579</span> public boolean isMatch(final CharSequence input) {<a name="line.579"></a> +<span class="sourceLineNo">580</span> final Matcher matcher = pattern.matcher(input);<a name="line.580"></a> +<span class="sourceLineNo">581</span> return matcher.find();<a name="line.581"></a> +<span class="sourceLineNo">582</span> }<a name="line.582"></a> +<span class="sourceLineNo">583</span> };<a name="line.583"></a> +<span class="sourceLineNo">584</span> }<a name="line.584"></a> +<span class="sourceLineNo">585</span><a name="line.585"></a> +<span class="sourceLineNo">586</span> private static boolean startsWith(final CharSequence input, final CharSequence prefix) {<a name="line.586"></a> +<span class="sourceLineNo">587</span> if (prefix.length() > input.length()) {<a name="line.587"></a> +<span class="sourceLineNo">588</span> return false;<a name="line.588"></a> +<span class="sourceLineNo">589</span> }<a name="line.589"></a> +<span class="sourceLineNo">590</span> for (int i = 0; i < prefix.length(); i++) {<a name="line.590"></a> +<span class="sourceLineNo">591</span> if (input.charAt(i) != prefix.charAt(i)) {<a name="line.591"></a> +<span class="sourceLineNo">592</span> return false;<a name="line.592"></a> +<span class="sourceLineNo">593</span> }<a name="line.593"></a> +<span class="sourceLineNo">594</span> }<a name="line.594"></a> +<span class="sourceLineNo">595</span> return true;<a name="line.595"></a> +<span class="sourceLineNo">596</span> }<a name="line.596"></a> +<span class="sourceLineNo">597</span><a name="line.597"></a> +<span class="sourceLineNo">598</span> private static String stripQuotes(String str) {<a name="line.598"></a> +<span class="sourceLineNo">599</span> if (str.startsWith(DOUBLE_QUOTE)) {<a name="line.599"></a> +<span class="sourceLineNo">600</span> str = str.substring(1);<a name="line.600"></a> +<span class="sourceLineNo">601</span> }<a name="line.601"></a> +<span class="sourceLineNo">602</span><a name="line.602"></a> +<span class="sourceLineNo">603</span> if (str.endsWith(DOUBLE_QUOTE)) {<a name="line.603"></a> +<span class="sourceLineNo">604</span> str = str.substring(0, str.length() - 1);<a name="line.604"></a> +<span class="sourceLineNo">605</span> }<a name="line.605"></a> +<span class="sourceLineNo">606</span><a name="line.606"></a> +<span class="sourceLineNo">607</span> return str;<a name="line.607"></a> +<span class="sourceLineNo">608</span> }<a name="line.608"></a> +<span class="sourceLineNo">609</span><a name="line.609"></a> +<span class="sourceLineNo">610</span> private final RPattern lContext;<a name="line.610"></a> +<span class="sourceLineNo">611</span><a name="line.611"></a> +<span class="sourceLineNo">612</span> private final String pattern;<a name="line.612"></a> +<span class="sourceLineNo">613</span><a name="line.613"></a> +<span class="sourceLineNo">614</span> private final PhonemeExpr phoneme;<a name="line.614"></a> +<span class="sourceLineNo">615</span><a name="line.615"></a> +<span class="sourceLineNo">616</span> private final RPattern rContext;<a name="line.616"></a> +<span class="sourceLineNo">617</span><a name="line.617"></a> +<span class="sourceLineNo">618</span> /**<a name="line.618"></a> +<span class="sourceLineNo">619</span> * Creates a new rule.<a name="line.619"></a> +<span class="sourceLineNo">620</span> *<a name="line.620"></a> +<span class="sourceLineNo">621</span> * @param pattern<a name="line.621"></a> +<span class="sourceLineNo">622</span> * the pattern<a name="line.622"></a> +<span class="sourceLineNo">623</span> * @param lContext<a name="line.623"></a> +<span class="sourceLineNo">624</span> * the left context<a name="line.624"></a> +<span class="sourceLineNo">625</span> * @param rContext<a name="line.625"></a> +<span class="sourceLineNo">626</span> * the right context<a name="line.626"></a> +<span class="sourceLineNo">627</span> * @param phoneme<a name="line.627"></a> +<span class="sourceLineNo">628</span> * the resulting phoneme<a name="line.628"></a> +<span class="sourceLineNo">629</span> */<a name="line.629"></a> +<span class="sourceLineNo">630</span> public Rule(final String pattern, final String lContext, final String rContext, final PhonemeExpr phoneme) {<a name="line.630"></a> +<span class="sourceLineNo">631</span> this.pattern = pattern;<a name="line.631"></a> +<span class="sourceLineNo">632</span> this.lContext = pattern(lContext + "$");<a name="line.632"></a> +<span class="sourceLineNo">633</span> this.rContext = pattern("^" + rContext);<a name="line.633"></a> +<span class="sourceLineNo">634</span> this.phoneme = phoneme;<a name="line.634"></a> +<span class="sourceLineNo">635</span> }<a name="line.635"></a> +<span class="sourceLineNo">636</span><a name="line.636"></a> +<span class="sourceLineNo">637</span> /**<a name="line.637"></a> +<span class="sourceLineNo">638</span> * Gets the left context. This is a regular expression that must match to the left of the pattern.<a name="line.638"></a> +<span class="sourceLineNo">639</span> *<a name="line.639"></a> +<span class="sourceLineNo">640</span> * @return the left context Pattern<a name="line.640"></a> +<span class="sourceLineNo">641</span> */<a name="line.641"></a> +<span class="sourceLineNo">642</span> public RPattern getLContext() {<a name="line.642"></a> +<span class="sourceLineNo">643</span> return this.lContext;<a name="line.643"></a> +<span class="sourceLineNo">644</span> }<a name="line.644"></a> +<span class="sourceLineNo">645</span><a name="line.645"></a> +<span class="sourceLineNo">646</span> /**<a name="line.646"></a> +<span class="sourceLineNo">647</span> * Gets the pattern. This is a string-literal that must exactly match.<a name="line.647"></a> +<span class="sourceLineNo">648</span> *<a name="line.648"></a> +<span class="sourceLineNo">649</span> * @return the pattern<a name="line.649"></a> +<span class="sourceLineNo">650</span> */<a name="line.650"></a> +<span class="sourceLineNo">651</span> public String getPattern() {<a name="line.651"></a> +<span class="sourceLineNo">652</span> return this.pattern;<a name="line.652"></a> +<span class="sourceLineNo">653</span> }<a name="line.653"></a> +<span class="sourceLineNo">654</span><a name="line.654"></a> +<span class="sourceLineNo">655</span> /**<a name="line.655"></a> +<span class="sourceLineNo">656</span> * Gets the phoneme. If the rule matches, this is the phoneme associated with the pattern match.<a name="line.656"></a> +<span class="sourceLineNo">657</span> *<a name="line.657"></a> +<span class="sourceLineNo">658</span> * @return the phoneme<a name="line.658"></a> +<span class="sourceLineNo">659</span> */<a name="line.659"></a> +<span class="sourceLineNo">660</span> public PhonemeExpr getPhoneme() {<a name="line.660"></a> +<span class="sourceLineNo">661</span> return this.phoneme;<a name="line.661"></a> +<span class="sourceLineNo">662</span> }<a name="line.662"></a> +<span class="sourceLineNo">663</span><a name="line.663"></a> +<span class="sourceLineNo">664</span> /**<a name="line.664"></a> +<span class="sourceLineNo">665</span> * Gets the right context. This is a regular expression that must match to the right of the pattern.<a name="line.665"></a> +<span class="sourceLineNo">666</span> *<a name="line.666"></a> +<span class="sourceLineNo">667</span> * @return the right context Pattern<a name="line.667"></a> +<span class="sourceLineNo">668</span> */<a name="line.668"></a> +<span class="sourceLineNo">669</span> public RPattern getRContext() {<a name="line.669"></a> +<span class="sourceLineNo">670</span> return this.rContext;<a name="line.670"></a> +<span class="sourceLineNo">671</span> }<a name="line.671"></a> +<span class="sourceLineNo">672</span><a name="line.672"></a> +<span class="sourceLineNo">673</span> /**<a name="line.673"></a> +<span class="sourceLineNo">674</span> * Decides if the pattern and context match the input starting at a position. It is a match if the<a name="line.674"></a> +<span class="sourceLineNo">675</span> * {@code lContext} matches {@code input} up to {@code i}, {@code pattern} matches at i and<a name="line.675"></a> +<span class="sourceLineNo">676</span> * {@code rContext} matches from the end of the match of {@code pattern} to the end of {@code input}.<a name="line.676"></a> +<span class="sourceLineNo">677</span> *<a name="line.677"></a> +<span class="sourceLineNo">678</span> * @param input<a name="line.678"></a> +<span class="sourceLineNo">679</span> * the input String<a name="line.679"></a> +<span class="sourceLineNo">680</span> * @param i<a name="line.680"></a> +<span class="sourceLineNo">681</span> * the int position within the input<a name="line.681"></a> +<span class="sourceLineNo">682</span> * @return true if the pattern and left/right context match, false otherwise<a name="line.682"></a> +<span class="sourceLineNo">683</span> */<a name="line.683"></a> +<span class="sourceLineNo">684</span> public boolean patternAndContextMatches(final CharSequence input, final int i) {<a name="line.684"></a> +<span class="sourceLineNo">685</span> if (i < 0) {<a name="line.685"></a> +<span class="sourceLineNo">686</span> throw new IndexOutOfBoundsException("Can not match pattern at negative indexes");<a name="line.686"></a> +<span class="sourceLineNo">687</span> }<a name="line.687"></a> +<span class="sourceLineNo">688</span><a name="line.688"></a> +<span class="sourceLineNo">689</span> final int patternLength = this.pattern.length();<a name="line.689"></a> +<span class="sourceLineNo">690</span> final int ipl = i + patternLength;<a name="line.690"></a> +<span class="sourceLineNo">691</span><a name="line.691"></a> +<span class="sourceLineNo">692</span> if (ipl > input.length()) {<a name="line.692"></a> +<span class="sourceLineNo">693</span> // not enough room for the pattern to match<a name="line.693"></a> +<span class="sourceLineNo">694</span> return false;<a name="line.694"></a> +<span class="sourceLineNo">695</span> }<a name="line.695"></a> +<span class="sourceLineNo">696</span><a name="line.696"></a> +<span class="sourceLineNo">697</span> // evaluate the pattern, left context and right context<a name="line.697"></a> +<span class="sourceLineNo">698</span> // fail early if any of the evaluations is not successful<a name="line.698"></a> +<span class="sourceLineNo">699</span> if (!input.subSequence(i, ipl).equals(this.pattern)) {<a name="line.699"></a> +<span class="sourceLineNo">700</span> return false;<a name="line.700"></a> +<span class="sourceLineNo">701</span> } else if (!this.rContext.isMatch(input.subSequence(ipl, input.length()))) {<a name="line.701"></a> +<span class="sourceLineNo">702</span> return false;<a name="line.702"></a> +<span class="sourceLineNo">703</span> }<a name="line.703"></a> +<span class="sourceLineNo">704</span> return this.lContext.isMatch(input.subSequence(0, i));<a name="line.704"></a> +<span class="sourceLineNo">705</span> }<a name="line.705"></a> +<span class="sourceLineNo">706</span>}<a name="line.706"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.html new file mode 100644 index 0000000000000000000000000000000000000000..f62994dca13e1019a68ab6655dcc91d3eb4ba987 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/Rule.html @@ -0,0 +1,778 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.util.ArrayList;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.Arrays;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.Collections;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.Comparator;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.util.EnumMap;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.util.HashMap;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.HashSet;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import java.util.List;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import java.util.Map;<a name="line.28"></a> +<span class="sourceLineNo">029</span>import java.util.Scanner;<a name="line.29"></a> +<span class="sourceLineNo">030</span>import java.util.Set;<a name="line.30"></a> +<span class="sourceLineNo">031</span>import java.util.regex.Matcher;<a name="line.31"></a> +<span class="sourceLineNo">032</span>import java.util.regex.Pattern;<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span>import org.apache.commons.codec.Resources;<a name="line.34"></a> +<span class="sourceLineNo">035</span>import org.apache.commons.codec.language.bm.Languages.LanguageSet;<a name="line.35"></a> +<span class="sourceLineNo">036</span><a name="line.36"></a> +<span class="sourceLineNo">037</span>/**<a name="line.37"></a> +<span class="sourceLineNo">038</span> * A phoneme rule.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * <p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * Rules have a pattern, left context, right context, output phoneme, set of languages for which they apply<a name="line.40"></a> +<span class="sourceLineNo">041</span> * and a logical flag indicating if all languages must be in play. A rule matches if:<a name="line.41"></a> +<span class="sourceLineNo">042</span> * <ul><a name="line.42"></a> +<span class="sourceLineNo">043</span> * <li>the pattern matches at the current position</li><a name="line.43"></a> +<span class="sourceLineNo">044</span> * <li>the string up until the beginning of the pattern matches the left context</li><a name="line.44"></a> +<span class="sourceLineNo">045</span> * <li>the string from the end of the pattern matches the right context</li><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <li>logical is ALL and all languages are in scope; or</li><a name="line.46"></a> +<span class="sourceLineNo">047</span> * <li>logical is any other value and at least one language is in scope</li><a name="line.47"></a> +<span class="sourceLineNo">048</span> * </ul><a name="line.48"></a> +<span class="sourceLineNo">049</span> * <p><a name="line.49"></a> +<span class="sourceLineNo">050</span> * Rules are typically generated by parsing rules resources. In normal use, there will be no need for the user<a name="line.50"></a> +<span class="sourceLineNo">051</span> * to explicitly construct their own.<a name="line.51"></a> +<span class="sourceLineNo">052</span> * <p><a name="line.52"></a> +<span class="sourceLineNo">053</span> * Rules are immutable and thread-safe.<a name="line.53"></a> +<span class="sourceLineNo">054</span> * <p><a name="line.54"></a> +<span class="sourceLineNo">055</span> * <b>Rules resources</b><a name="line.55"></a> +<span class="sourceLineNo">056</span> * <p><a name="line.56"></a> +<span class="sourceLineNo">057</span> * Rules are typically loaded from resource files. These are UTF-8 encoded text files. They are systematically<a name="line.57"></a> +<span class="sourceLineNo">058</span> * named following the pattern:<a name="line.58"></a> +<span class="sourceLineNo">059</span> * <blockquote>org/apache/commons/codec/language/bm/${NameType#getName}_${RuleType#getName}_${language}.txt</blockquote><a name="line.59"></a> +<span class="sourceLineNo">060</span> * <p><a name="line.60"></a> +<span class="sourceLineNo">061</span> * The format of these resources is the following:<a name="line.61"></a> +<span class="sourceLineNo">062</span> * <ul><a name="line.62"></a> +<span class="sourceLineNo">063</span> * <li><b>Rules:</b> whitespace separated, double-quoted strings. There should be 4 columns to each row, and these<a name="line.63"></a> +<span class="sourceLineNo">064</span> * will be interpreted as:<a name="line.64"></a> +<span class="sourceLineNo">065</span> * <ol><a name="line.65"></a> +<span class="sourceLineNo">066</span> * <li>pattern</li><a name="line.66"></a> +<span class="sourceLineNo">067</span> * <li>left context</li><a name="line.67"></a> +<span class="sourceLineNo">068</span> * <li>right context</li><a name="line.68"></a> +<span class="sourceLineNo">069</span> * <li>phoneme</li><a name="line.69"></a> +<span class="sourceLineNo">070</span> * </ol><a name="line.70"></a> +<span class="sourceLineNo">071</span> * </li><a name="line.71"></a> +<span class="sourceLineNo">072</span> * <li><b>End-of-line comments:</b> Any occurrence of '//' will cause all text following on that line to be discarded<a name="line.72"></a> +<span class="sourceLineNo">073</span> * as a comment.</li><a name="line.73"></a> +<span class="sourceLineNo">074</span> * <li><b>Multi-line comments:</b> Any line starting with '/*' will start multi-line commenting mode. This will skip<a name="line.74"></a> +<span class="sourceLineNo">075</span> * all content until a line ending in '*' and '/' is found.</li><a name="line.75"></a> +<span class="sourceLineNo">076</span> * <li><b>Blank lines:</b> All blank lines will be skipped.</li><a name="line.76"></a> +<span class="sourceLineNo">077</span> * </ul><a name="line.77"></a> +<span class="sourceLineNo">078</span> *<a name="line.78"></a> +<span class="sourceLineNo">079</span> * @since 1.6<a name="line.79"></a> +<span class="sourceLineNo">080</span> */<a name="line.80"></a> +<span class="sourceLineNo">081</span>public class Rule {<a name="line.81"></a> +<span class="sourceLineNo">082</span><a name="line.82"></a> +<span class="sourceLineNo">083</span> public static final class Phoneme implements PhonemeExpr {<a name="line.83"></a> +<span class="sourceLineNo">084</span> public static final Comparator<Phoneme> COMPARATOR = new Comparator<Phoneme>() {<a name="line.84"></a> +<span class="sourceLineNo">085</span> @Override<a name="line.85"></a> +<span class="sourceLineNo">086</span> public int compare(final Phoneme o1, final Phoneme o2) {<a name="line.86"></a> +<span class="sourceLineNo">087</span> for (int i = 0; i < o1.phonemeText.length(); i++) {<a name="line.87"></a> +<span class="sourceLineNo">088</span> if (i >= o2.phonemeText.length()) {<a name="line.88"></a> +<span class="sourceLineNo">089</span> return +1;<a name="line.89"></a> +<span class="sourceLineNo">090</span> }<a name="line.90"></a> +<span class="sourceLineNo">091</span> final int c = o1.phonemeText.charAt(i) - o2.phonemeText.charAt(i);<a name="line.91"></a> +<span class="sourceLineNo">092</span> if (c != 0) {<a name="line.92"></a> +<span class="sourceLineNo">093</span> return c;<a name="line.93"></a> +<span class="sourceLineNo">094</span> }<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span><a name="line.96"></a> +<span class="sourceLineNo">097</span> if (o1.phonemeText.length() < o2.phonemeText.length()) {<a name="line.97"></a> +<span class="sourceLineNo">098</span> return -1;<a name="line.98"></a> +<span class="sourceLineNo">099</span> }<a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> return 0;<a name="line.101"></a> +<span class="sourceLineNo">102</span> }<a name="line.102"></a> +<span class="sourceLineNo">103</span> };<a name="line.103"></a> +<span class="sourceLineNo">104</span><a name="line.104"></a> +<span class="sourceLineNo">105</span> private final StringBuilder phonemeText;<a name="line.105"></a> +<span class="sourceLineNo">106</span> private final Languages.LanguageSet languages;<a name="line.106"></a> +<span class="sourceLineNo">107</span><a name="line.107"></a> +<span class="sourceLineNo">108</span> public Phoneme(final CharSequence phonemeText, final Languages.LanguageSet languages) {<a name="line.108"></a> +<span class="sourceLineNo">109</span> this.phonemeText = new StringBuilder(phonemeText);<a name="line.109"></a> +<span class="sourceLineNo">110</span> this.languages = languages;<a name="line.110"></a> +<span class="sourceLineNo">111</span> }<a name="line.111"></a> +<span class="sourceLineNo">112</span><a name="line.112"></a> +<span class="sourceLineNo">113</span> public Phoneme(final Phoneme phonemeLeft, final Phoneme phonemeRight) {<a name="line.113"></a> +<span class="sourceLineNo">114</span> this(phonemeLeft.phonemeText, phonemeLeft.languages);<a name="line.114"></a> +<span class="sourceLineNo">115</span> this.phonemeText.append(phonemeRight.phonemeText);<a name="line.115"></a> +<span class="sourceLineNo">116</span> }<a name="line.116"></a> +<span class="sourceLineNo">117</span><a name="line.117"></a> +<span class="sourceLineNo">118</span> public Phoneme(final Phoneme phonemeLeft, final Phoneme phonemeRight, final Languages.LanguageSet languages) {<a name="line.118"></a> +<span class="sourceLineNo">119</span> this(phonemeLeft.phonemeText, languages);<a name="line.119"></a> +<span class="sourceLineNo">120</span> this.phonemeText.append(phonemeRight.phonemeText);<a name="line.120"></a> +<span class="sourceLineNo">121</span> }<a name="line.121"></a> +<span class="sourceLineNo">122</span><a name="line.122"></a> +<span class="sourceLineNo">123</span> public Phoneme append(final CharSequence str) {<a name="line.123"></a> +<span class="sourceLineNo">124</span> this.phonemeText.append(str);<a name="line.124"></a> +<span class="sourceLineNo">125</span> return this;<a name="line.125"></a> +<span class="sourceLineNo">126</span> }<a name="line.126"></a> +<span class="sourceLineNo">127</span><a name="line.127"></a> +<span class="sourceLineNo">128</span> public Languages.LanguageSet getLanguages() {<a name="line.128"></a> +<span class="sourceLineNo">129</span> return this.languages;<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span><a name="line.131"></a> +<span class="sourceLineNo">132</span> @Override<a name="line.132"></a> +<span class="sourceLineNo">133</span> public Iterable<Phoneme> getPhonemes() {<a name="line.133"></a> +<span class="sourceLineNo">134</span> return Collections.singleton(this);<a name="line.134"></a> +<span class="sourceLineNo">135</span> }<a name="line.135"></a> +<span class="sourceLineNo">136</span><a name="line.136"></a> +<span class="sourceLineNo">137</span> public CharSequence getPhonemeText() {<a name="line.137"></a> +<span class="sourceLineNo">138</span> return this.phonemeText;<a name="line.138"></a> +<span class="sourceLineNo">139</span> }<a name="line.139"></a> +<span class="sourceLineNo">140</span><a name="line.140"></a> +<span class="sourceLineNo">141</span> /**<a name="line.141"></a> +<span class="sourceLineNo">142</span> * Deprecated since 1.9.<a name="line.142"></a> +<span class="sourceLineNo">143</span> *<a name="line.143"></a> +<span class="sourceLineNo">144</span> * @param right the Phoneme to join<a name="line.144"></a> +<span class="sourceLineNo">145</span> * @return a new Phoneme<a name="line.145"></a> +<span class="sourceLineNo">146</span> * @deprecated since 1.9<a name="line.146"></a> +<span class="sourceLineNo">147</span> */<a name="line.147"></a> +<span class="sourceLineNo">148</span> @Deprecated<a name="line.148"></a> +<span class="sourceLineNo">149</span> public Phoneme join(final Phoneme right) {<a name="line.149"></a> +<span class="sourceLineNo">150</span> return new Phoneme(this.phonemeText.toString() + right.phonemeText.toString(),<a name="line.150"></a> +<span class="sourceLineNo">151</span> this.languages.restrictTo(right.languages));<a name="line.151"></a> +<span class="sourceLineNo">152</span> }<a name="line.152"></a> +<span class="sourceLineNo">153</span><a name="line.153"></a> +<span class="sourceLineNo">154</span> /**<a name="line.154"></a> +<span class="sourceLineNo">155</span> * Returns a new Phoneme with the same text but a union of its<a name="line.155"></a> +<span class="sourceLineNo">156</span> * current language set and the given one.<a name="line.156"></a> +<span class="sourceLineNo">157</span> *<a name="line.157"></a> +<span class="sourceLineNo">158</span> * @param lang the language set to merge<a name="line.158"></a> +<span class="sourceLineNo">159</span> * @return a new Phoneme<a name="line.159"></a> +<span class="sourceLineNo">160</span> */<a name="line.160"></a> +<span class="sourceLineNo">161</span> public Phoneme mergeWithLanguage(final LanguageSet lang) {<a name="line.161"></a> +<span class="sourceLineNo">162</span> return new Phoneme(this.phonemeText.toString(), this.languages.merge(lang));<a name="line.162"></a> +<span class="sourceLineNo">163</span> }<a name="line.163"></a> +<span class="sourceLineNo">164</span><a name="line.164"></a> +<span class="sourceLineNo">165</span> @Override<a name="line.165"></a> +<span class="sourceLineNo">166</span> public String toString() {<a name="line.166"></a> +<span class="sourceLineNo">167</span> return phonemeText.toString() + "[" + languages + "]";<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span> }<a name="line.169"></a> +<span class="sourceLineNo">170</span><a name="line.170"></a> +<span class="sourceLineNo">171</span> public interface PhonemeExpr {<a name="line.171"></a> +<span class="sourceLineNo">172</span> Iterable<Phoneme> getPhonemes();<a name="line.172"></a> +<span class="sourceLineNo">173</span> }<a name="line.173"></a> +<span class="sourceLineNo">174</span><a name="line.174"></a> +<span class="sourceLineNo">175</span> public static final class PhonemeList implements PhonemeExpr {<a name="line.175"></a> +<span class="sourceLineNo">176</span> private final List<Phoneme> phonemes;<a name="line.176"></a> +<span class="sourceLineNo">177</span><a name="line.177"></a> +<span class="sourceLineNo">178</span> public PhonemeList(final List<Phoneme> phonemes) {<a name="line.178"></a> +<span class="sourceLineNo">179</span> this.phonemes = phonemes;<a name="line.179"></a> +<span class="sourceLineNo">180</span> }<a name="line.180"></a> +<span class="sourceLineNo">181</span><a name="line.181"></a> +<span class="sourceLineNo">182</span> @Override<a name="line.182"></a> +<span class="sourceLineNo">183</span> public List<Phoneme> getPhonemes() {<a name="line.183"></a> +<span class="sourceLineNo">184</span> return this.phonemes;<a name="line.184"></a> +<span class="sourceLineNo">185</span> }<a name="line.185"></a> +<span class="sourceLineNo">186</span> }<a name="line.186"></a> +<span class="sourceLineNo">187</span><a name="line.187"></a> +<span class="sourceLineNo">188</span> /**<a name="line.188"></a> +<span class="sourceLineNo">189</span> * A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations.<a name="line.189"></a> +<span class="sourceLineNo">190</span> */<a name="line.190"></a> +<span class="sourceLineNo">191</span> public interface RPattern {<a name="line.191"></a> +<span class="sourceLineNo">192</span> boolean isMatch(CharSequence input);<a name="line.192"></a> +<span class="sourceLineNo">193</span> }<a name="line.193"></a> +<span class="sourceLineNo">194</span><a name="line.194"></a> +<span class="sourceLineNo">195</span> public static final RPattern ALL_STRINGS_RMATCHER = new RPattern() {<a name="line.195"></a> +<span class="sourceLineNo">196</span> @Override<a name="line.196"></a> +<span class="sourceLineNo">197</span> public boolean isMatch(final CharSequence input) {<a name="line.197"></a> +<span class="sourceLineNo">198</span> return true;<a name="line.198"></a> +<span class="sourceLineNo">199</span> }<a name="line.199"></a> +<span class="sourceLineNo">200</span> };<a name="line.200"></a> +<span class="sourceLineNo">201</span><a name="line.201"></a> +<span class="sourceLineNo">202</span> public static final String ALL = "ALL";<a name="line.202"></a> +<span class="sourceLineNo">203</span><a name="line.203"></a> +<span class="sourceLineNo">204</span> private static final String DOUBLE_QUOTE = "\"";<a name="line.204"></a> +<span class="sourceLineNo">205</span><a name="line.205"></a> +<span class="sourceLineNo">206</span> private static final String HASH_INCLUDE = "#include";<a name="line.206"></a> +<span class="sourceLineNo">207</span><a name="line.207"></a> +<span class="sourceLineNo">208</span> private static final Map<NameType, Map<RuleType, Map<String, Map<String, List<Rule>>>>> RULES =<a name="line.208"></a> +<span class="sourceLineNo">209</span> new EnumMap<>(NameType.class);<a name="line.209"></a> +<span class="sourceLineNo">210</span><a name="line.210"></a> +<span class="sourceLineNo">211</span> static {<a name="line.211"></a> +<span class="sourceLineNo">212</span> for (final NameType s : NameType.values()) {<a name="line.212"></a> +<span class="sourceLineNo">213</span> final Map<RuleType, Map<String, Map<String, List<Rule>>>> rts =<a name="line.213"></a> +<span class="sourceLineNo">214</span> new EnumMap<>(RuleType.class);<a name="line.214"></a> +<span class="sourceLineNo">215</span><a name="line.215"></a> +<span class="sourceLineNo">216</span> for (final RuleType rt : RuleType.values()) {<a name="line.216"></a> +<span class="sourceLineNo">217</span> final Map<String, Map<String, List<Rule>>> rs = new HashMap<>();<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> final Languages ls = Languages.getInstance(s);<a name="line.219"></a> +<span class="sourceLineNo">220</span> for (final String l : ls.getLanguages()) {<a name="line.220"></a> +<span class="sourceLineNo">221</span> try (final Scanner scanner = createScanner(s, rt, l)) {<a name="line.221"></a> +<span class="sourceLineNo">222</span> rs.put(l, parseRules(scanner, createResourceName(s, rt, l)));<a name="line.222"></a> +<span class="sourceLineNo">223</span> } catch (final IllegalStateException e) {<a name="line.223"></a> +<span class="sourceLineNo">224</span> throw new IllegalStateException("Problem processing " + createResourceName(s, rt, l), e);<a name="line.224"></a> +<span class="sourceLineNo">225</span> }<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span> if (!rt.equals(RuleType.RULES)) {<a name="line.227"></a> +<span class="sourceLineNo">228</span> try (final Scanner scanner = createScanner(s, rt, "common")) {<a name="line.228"></a> +<span class="sourceLineNo">229</span> rs.put("common", parseRules(scanner, createResourceName(s, rt, "common")));<a name="line.229"></a> +<span class="sourceLineNo">230</span> }<a name="line.230"></a> +<span class="sourceLineNo">231</span> }<a name="line.231"></a> +<span class="sourceLineNo">232</span><a name="line.232"></a> +<span class="sourceLineNo">233</span> rts.put(rt, Collections.unmodifiableMap(rs));<a name="line.233"></a> +<span class="sourceLineNo">234</span> }<a name="line.234"></a> +<span class="sourceLineNo">235</span><a name="line.235"></a> +<span class="sourceLineNo">236</span> RULES.put(s, Collections.unmodifiableMap(rts));<a name="line.236"></a> +<span class="sourceLineNo">237</span> }<a name="line.237"></a> +<span class="sourceLineNo">238</span> }<a name="line.238"></a> +<span class="sourceLineNo">239</span><a name="line.239"></a> +<span class="sourceLineNo">240</span> private static boolean contains(final CharSequence chars, final char input) {<a name="line.240"></a> +<span class="sourceLineNo">241</span> for (int i = 0; i < chars.length(); i++) {<a name="line.241"></a> +<span class="sourceLineNo">242</span> if (chars.charAt(i) == input) {<a name="line.242"></a> +<span class="sourceLineNo">243</span> return true;<a name="line.243"></a> +<span class="sourceLineNo">244</span> }<a name="line.244"></a> +<span class="sourceLineNo">245</span> }<a name="line.245"></a> +<span class="sourceLineNo">246</span> return false;<a name="line.246"></a> +<span class="sourceLineNo">247</span> }<a name="line.247"></a> +<span class="sourceLineNo">248</span><a name="line.248"></a> +<span class="sourceLineNo">249</span> private static String createResourceName(final NameType nameType, final RuleType rt, final String lang) {<a name="line.249"></a> +<span class="sourceLineNo">250</span> return String.format("org/apache/commons/codec/language/bm/%s_%s_%s.txt",<a name="line.250"></a> +<span class="sourceLineNo">251</span> nameType.getName(), rt.getName(), lang);<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span><a name="line.253"></a> +<span class="sourceLineNo">254</span> private static Scanner createScanner(final NameType nameType, final RuleType rt, final String lang) {<a name="line.254"></a> +<span class="sourceLineNo">255</span> final String resName = createResourceName(nameType, rt, lang);<a name="line.255"></a> +<span class="sourceLineNo">256</span> return new Scanner(Resources.getInputStream(resName), ResourceConstants.ENCODING);<a name="line.256"></a> +<span class="sourceLineNo">257</span> }<a name="line.257"></a> +<span class="sourceLineNo">258</span><a name="line.258"></a> +<span class="sourceLineNo">259</span> private static Scanner createScanner(final String lang) {<a name="line.259"></a> +<span class="sourceLineNo">260</span> final String resName = String.format("org/apache/commons/codec/language/bm/%s.txt", lang);<a name="line.260"></a> +<span class="sourceLineNo">261</span> return new Scanner(Resources.getInputStream(resName), ResourceConstants.ENCODING);<a name="line.261"></a> +<span class="sourceLineNo">262</span> }<a name="line.262"></a> +<span class="sourceLineNo">263</span><a name="line.263"></a> +<span class="sourceLineNo">264</span> private static boolean endsWith(final CharSequence input, final CharSequence suffix) {<a name="line.264"></a> +<span class="sourceLineNo">265</span> if (suffix.length() > input.length()) {<a name="line.265"></a> +<span class="sourceLineNo">266</span> return false;<a name="line.266"></a> +<span class="sourceLineNo">267</span> }<a name="line.267"></a> +<span class="sourceLineNo">268</span> for (int i = input.length() - 1, j = suffix.length() - 1; j >= 0; i--, j--) {<a name="line.268"></a> +<span class="sourceLineNo">269</span> if (input.charAt(i) != suffix.charAt(j)) {<a name="line.269"></a> +<span class="sourceLineNo">270</span> return false;<a name="line.270"></a> +<span class="sourceLineNo">271</span> }<a name="line.271"></a> +<span class="sourceLineNo">272</span> }<a name="line.272"></a> +<span class="sourceLineNo">273</span> return true;<a name="line.273"></a> +<span class="sourceLineNo">274</span> }<a name="line.274"></a> +<span class="sourceLineNo">275</span><a name="line.275"></a> +<span class="sourceLineNo">276</span> /**<a name="line.276"></a> +<span class="sourceLineNo">277</span> * Gets rules for a combination of name type, rule type and languages.<a name="line.277"></a> +<span class="sourceLineNo">278</span> *<a name="line.278"></a> +<span class="sourceLineNo">279</span> * @param nameType<a name="line.279"></a> +<span class="sourceLineNo">280</span> * the NameType to consider<a name="line.280"></a> +<span class="sourceLineNo">281</span> * @param rt<a name="line.281"></a> +<span class="sourceLineNo">282</span> * the RuleType to consider<a name="line.282"></a> +<span class="sourceLineNo">283</span> * @param langs<a name="line.283"></a> +<span class="sourceLineNo">284</span> * the set of languages to consider<a name="line.284"></a> +<span class="sourceLineNo">285</span> * @return a list of Rules that apply<a name="line.285"></a> +<span class="sourceLineNo">286</span> */<a name="line.286"></a> +<span class="sourceLineNo">287</span> public static List<Rule> getInstance(final NameType nameType, final RuleType rt,<a name="line.287"></a> +<span class="sourceLineNo">288</span> final Languages.LanguageSet langs) {<a name="line.288"></a> +<span class="sourceLineNo">289</span> final Map<String, List<Rule>> ruleMap = getInstanceMap(nameType, rt, langs);<a name="line.289"></a> +<span class="sourceLineNo">290</span> final List<Rule> allRules = new ArrayList<>();<a name="line.290"></a> +<span class="sourceLineNo">291</span> for (final List<Rule> rules : ruleMap.values()) {<a name="line.291"></a> +<span class="sourceLineNo">292</span> allRules.addAll(rules);<a name="line.292"></a> +<span class="sourceLineNo">293</span> }<a name="line.293"></a> +<span class="sourceLineNo">294</span> return allRules;<a name="line.294"></a> +<span class="sourceLineNo">295</span> }<a name="line.295"></a> +<span class="sourceLineNo">296</span><a name="line.296"></a> +<span class="sourceLineNo">297</span> /**<a name="line.297"></a> +<span class="sourceLineNo">298</span> * Gets rules for a combination of name type, rule type and a single language.<a name="line.298"></a> +<span class="sourceLineNo">299</span> *<a name="line.299"></a> +<span class="sourceLineNo">300</span> * @param nameType<a name="line.300"></a> +<span class="sourceLineNo">301</span> * the NameType to consider<a name="line.301"></a> +<span class="sourceLineNo">302</span> * @param rt<a name="line.302"></a> +<span class="sourceLineNo">303</span> * the RuleType to consider<a name="line.303"></a> +<span class="sourceLineNo">304</span> * @param lang<a name="line.304"></a> +<span class="sourceLineNo">305</span> * the language to consider<a name="line.305"></a> +<span class="sourceLineNo">306</span> * @return a list of Rules that apply<a name="line.306"></a> +<span class="sourceLineNo">307</span> */<a name="line.307"></a> +<span class="sourceLineNo">308</span> public static List<Rule> getInstance(final NameType nameType, final RuleType rt, final String lang) {<a name="line.308"></a> +<span class="sourceLineNo">309</span> return getInstance(nameType, rt, LanguageSet.from(new HashSet<>(Arrays.asList(lang))));<a name="line.309"></a> +<span class="sourceLineNo">310</span> }<a name="line.310"></a> +<span class="sourceLineNo">311</span><a name="line.311"></a> +<span class="sourceLineNo">312</span> /**<a name="line.312"></a> +<span class="sourceLineNo">313</span> * Gets rules for a combination of name type, rule type and languages.<a name="line.313"></a> +<span class="sourceLineNo">314</span> *<a name="line.314"></a> +<span class="sourceLineNo">315</span> * @param nameType<a name="line.315"></a> +<span class="sourceLineNo">316</span> * the NameType to consider<a name="line.316"></a> +<span class="sourceLineNo">317</span> * @param rt<a name="line.317"></a> +<span class="sourceLineNo">318</span> * the RuleType to consider<a name="line.318"></a> +<span class="sourceLineNo">319</span> * @param langs<a name="line.319"></a> +<span class="sourceLineNo">320</span> * the set of languages to consider<a name="line.320"></a> +<span class="sourceLineNo">321</span> * @return a map containing all Rules that apply, grouped by the first character of the rule pattern<a name="line.321"></a> +<span class="sourceLineNo">322</span> * @since 1.9<a name="line.322"></a> +<span class="sourceLineNo">323</span> */<a name="line.323"></a> +<span class="sourceLineNo">324</span> public static Map<String, List<Rule>> getInstanceMap(final NameType nameType, final RuleType rt,<a name="line.324"></a> +<span class="sourceLineNo">325</span> final Languages.LanguageSet langs) {<a name="line.325"></a> +<span class="sourceLineNo">326</span> return langs.isSingleton() ? getInstanceMap(nameType, rt, langs.getAny()) :<a name="line.326"></a> +<span class="sourceLineNo">327</span> getInstanceMap(nameType, rt, Languages.ANY);<a name="line.327"></a> +<span class="sourceLineNo">328</span> }<a name="line.328"></a> +<span class="sourceLineNo">329</span><a name="line.329"></a> +<span class="sourceLineNo">330</span> /**<a name="line.330"></a> +<span class="sourceLineNo">331</span> * Gets rules for a combination of name type, rule type and a single language.<a name="line.331"></a> +<span class="sourceLineNo">332</span> *<a name="line.332"></a> +<span class="sourceLineNo">333</span> * @param nameType<a name="line.333"></a> +<span class="sourceLineNo">334</span> * the NameType to consider<a name="line.334"></a> +<span class="sourceLineNo">335</span> * @param rt<a name="line.335"></a> +<span class="sourceLineNo">336</span> * the RuleType to consider<a name="line.336"></a> +<span class="sourceLineNo">337</span> * @param lang<a name="line.337"></a> +<span class="sourceLineNo">338</span> * the language to consider<a name="line.338"></a> +<span class="sourceLineNo">339</span> * @return a map containing all Rules that apply, grouped by the first character of the rule pattern<a name="line.339"></a> +<span class="sourceLineNo">340</span> * @since 1.9<a name="line.340"></a> +<span class="sourceLineNo">341</span> */<a name="line.341"></a> +<span class="sourceLineNo">342</span> public static Map<String, List<Rule>> getInstanceMap(final NameType nameType, final RuleType rt,<a name="line.342"></a> +<span class="sourceLineNo">343</span> final String lang) {<a name="line.343"></a> +<span class="sourceLineNo">344</span> final Map<String, List<Rule>> rules = RULES.get(nameType).get(rt).get(lang);<a name="line.344"></a> +<span class="sourceLineNo">345</span><a name="line.345"></a> +<span class="sourceLineNo">346</span> if (rules == null) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> throw new IllegalArgumentException(String.format("No rules found for %s, %s, %s.",<a name="line.347"></a> +<span class="sourceLineNo">348</span> nameType.getName(), rt.getName(), lang));<a name="line.348"></a> +<span class="sourceLineNo">349</span> }<a name="line.349"></a> +<span class="sourceLineNo">350</span><a name="line.350"></a> +<span class="sourceLineNo">351</span> return rules;<a name="line.351"></a> +<span class="sourceLineNo">352</span> }<a name="line.352"></a> +<span class="sourceLineNo">353</span><a name="line.353"></a> +<span class="sourceLineNo">354</span> private static Phoneme parsePhoneme(final String ph) {<a name="line.354"></a> +<span class="sourceLineNo">355</span> final int open = ph.indexOf("[");<a name="line.355"></a> +<span class="sourceLineNo">356</span> if (open >= 0) {<a name="line.356"></a> +<span class="sourceLineNo">357</span> if (!ph.endsWith("]")) {<a name="line.357"></a> +<span class="sourceLineNo">358</span> throw new IllegalArgumentException("Phoneme expression contains a '[' but does not end in ']'");<a name="line.358"></a> +<span class="sourceLineNo">359</span> }<a name="line.359"></a> +<span class="sourceLineNo">360</span> final String before = ph.substring(0, open);<a name="line.360"></a> +<span class="sourceLineNo">361</span> final String in = ph.substring(open + 1, ph.length() - 1);<a name="line.361"></a> +<span class="sourceLineNo">362</span> final Set<String> langs = new HashSet<>(Arrays.asList(in.split("[+]")));<a name="line.362"></a> +<span class="sourceLineNo">363</span><a name="line.363"></a> +<span class="sourceLineNo">364</span> return new Phoneme(before, Languages.LanguageSet.from(langs));<a name="line.364"></a> +<span class="sourceLineNo">365</span> }<a name="line.365"></a> +<span class="sourceLineNo">366</span> return new Phoneme(ph, Languages.ANY_LANGUAGE);<a name="line.366"></a> +<span class="sourceLineNo">367</span> }<a name="line.367"></a> +<span class="sourceLineNo">368</span><a name="line.368"></a> +<span class="sourceLineNo">369</span> private static PhonemeExpr parsePhonemeExpr(final String ph) {<a name="line.369"></a> +<span class="sourceLineNo">370</span> if (ph.startsWith("(")) { // we have a bracketed list of options<a name="line.370"></a> +<span class="sourceLineNo">371</span> if (!ph.endsWith(")")) {<a name="line.371"></a> +<span class="sourceLineNo">372</span> throw new IllegalArgumentException("Phoneme starts with '(' so must end with ')'");<a name="line.372"></a> +<span class="sourceLineNo">373</span> }<a name="line.373"></a> +<span class="sourceLineNo">374</span><a name="line.374"></a> +<span class="sourceLineNo">375</span> final List<Phoneme> phs = new ArrayList<>();<a name="line.375"></a> +<span class="sourceLineNo">376</span> final String body = ph.substring(1, ph.length() - 1);<a name="line.376"></a> +<span class="sourceLineNo">377</span> for (final String part : body.split("[|]")) {<a name="line.377"></a> +<span class="sourceLineNo">378</span> phs.add(parsePhoneme(part));<a name="line.378"></a> +<span class="sourceLineNo">379</span> }<a name="line.379"></a> +<span class="sourceLineNo">380</span> if (body.startsWith("|") || body.endsWith("|")) {<a name="line.380"></a> +<span class="sourceLineNo">381</span> phs.add(new Phoneme("", Languages.ANY_LANGUAGE));<a name="line.381"></a> +<span class="sourceLineNo">382</span> }<a name="line.382"></a> +<span class="sourceLineNo">383</span><a name="line.383"></a> +<span class="sourceLineNo">384</span> return new PhonemeList(phs);<a name="line.384"></a> +<span class="sourceLineNo">385</span> }<a name="line.385"></a> +<span class="sourceLineNo">386</span> return parsePhoneme(ph);<a name="line.386"></a> +<span class="sourceLineNo">387</span> }<a name="line.387"></a> +<span class="sourceLineNo">388</span><a name="line.388"></a> +<span class="sourceLineNo">389</span> private static Map<String, List<Rule>> parseRules(final Scanner scanner, final String location) {<a name="line.389"></a> +<span class="sourceLineNo">390</span> final Map<String, List<Rule>> lines = new HashMap<>();<a name="line.390"></a> +<span class="sourceLineNo">391</span> int currentLine = 0;<a name="line.391"></a> +<span class="sourceLineNo">392</span><a name="line.392"></a> +<span class="sourceLineNo">393</span> boolean inMultilineComment = false;<a name="line.393"></a> +<span class="sourceLineNo">394</span> while (scanner.hasNextLine()) {<a name="line.394"></a> +<span class="sourceLineNo">395</span> currentLine++;<a name="line.395"></a> +<span class="sourceLineNo">396</span> final String rawLine = scanner.nextLine();<a name="line.396"></a> +<span class="sourceLineNo">397</span> String line = rawLine;<a name="line.397"></a> +<span class="sourceLineNo">398</span><a name="line.398"></a> +<span class="sourceLineNo">399</span> if (inMultilineComment) {<a name="line.399"></a> +<span class="sourceLineNo">400</span> if (line.endsWith(ResourceConstants.EXT_CMT_END)) {<a name="line.400"></a> +<span class="sourceLineNo">401</span> inMultilineComment = false;<a name="line.401"></a> +<span class="sourceLineNo">402</span> }<a name="line.402"></a> +<span class="sourceLineNo">403</span> } else {<a name="line.403"></a> +<span class="sourceLineNo">404</span> if (line.startsWith(ResourceConstants.EXT_CMT_START)) {<a name="line.404"></a> +<span class="sourceLineNo">405</span> inMultilineComment = true;<a name="line.405"></a> +<span class="sourceLineNo">406</span> } else {<a name="line.406"></a> +<span class="sourceLineNo">407</span> // discard comments<a name="line.407"></a> +<span class="sourceLineNo">408</span> final int cmtI = line.indexOf(ResourceConstants.CMT);<a name="line.408"></a> +<span class="sourceLineNo">409</span> if (cmtI >= 0) {<a name="line.409"></a> +<span class="sourceLineNo">410</span> line = line.substring(0, cmtI);<a name="line.410"></a> +<span class="sourceLineNo">411</span> }<a name="line.411"></a> +<span class="sourceLineNo">412</span><a name="line.412"></a> +<span class="sourceLineNo">413</span> // trim leading-trailing whitespace<a name="line.413"></a> +<span class="sourceLineNo">414</span> line = line.trim();<a name="line.414"></a> +<span class="sourceLineNo">415</span><a name="line.415"></a> +<span class="sourceLineNo">416</span> if (line.length() == 0) {<a name="line.416"></a> +<span class="sourceLineNo">417</span> continue; // empty lines can be safely skipped<a name="line.417"></a> +<span class="sourceLineNo">418</span> }<a name="line.418"></a> +<span class="sourceLineNo">419</span><a name="line.419"></a> +<span class="sourceLineNo">420</span> if (line.startsWith(HASH_INCLUDE)) {<a name="line.420"></a> +<span class="sourceLineNo">421</span> // include statement<a name="line.421"></a> +<span class="sourceLineNo">422</span> final String incl = line.substring(HASH_INCLUDE.length()).trim();<a name="line.422"></a> +<span class="sourceLineNo">423</span> if (incl.contains(" ")) {<a name="line.423"></a> +<span class="sourceLineNo">424</span> throw new IllegalArgumentException("Malformed import statement '" + rawLine + "' in " +<a name="line.424"></a> +<span class="sourceLineNo">425</span> location);<a name="line.425"></a> +<span class="sourceLineNo">426</span> }<a name="line.426"></a> +<span class="sourceLineNo">427</span> try (final Scanner hashIncludeScanner = createScanner(incl)) {<a name="line.427"></a> +<span class="sourceLineNo">428</span> lines.putAll(parseRules(hashIncludeScanner, location + "->" + incl));<a name="line.428"></a> +<span class="sourceLineNo">429</span> }<a name="line.429"></a> +<span class="sourceLineNo">430</span> } else {<a name="line.430"></a> +<span class="sourceLineNo">431</span> // rule<a name="line.431"></a> +<span class="sourceLineNo">432</span> final String[] parts = line.split("\\s+");<a name="line.432"></a> +<span class="sourceLineNo">433</span> if (parts.length != 4) {<a name="line.433"></a> +<span class="sourceLineNo">434</span> throw new IllegalArgumentException("Malformed rule statement split into " + parts.length +<a name="line.434"></a> +<span class="sourceLineNo">435</span> " parts: " + rawLine + " in " + location);<a name="line.435"></a> +<span class="sourceLineNo">436</span> }<a name="line.436"></a> +<span class="sourceLineNo">437</span> try {<a name="line.437"></a> +<span class="sourceLineNo">438</span> final String pat = stripQuotes(parts[0]);<a name="line.438"></a> +<span class="sourceLineNo">439</span> final String lCon = stripQuotes(parts[1]);<a name="line.439"></a> +<span class="sourceLineNo">440</span> final String rCon = stripQuotes(parts[2]);<a name="line.440"></a> +<span class="sourceLineNo">441</span> final PhonemeExpr ph = parsePhonemeExpr(stripQuotes(parts[3]));<a name="line.441"></a> +<span class="sourceLineNo">442</span> final int cLine = currentLine;<a name="line.442"></a> +<span class="sourceLineNo">443</span> final Rule r = new Rule(pat, lCon, rCon, ph) {<a name="line.443"></a> +<span class="sourceLineNo">444</span> private final int myLine = cLine;<a name="line.444"></a> +<span class="sourceLineNo">445</span> private final String loc = location;<a name="line.445"></a> +<span class="sourceLineNo">446</span><a name="line.446"></a> +<span class="sourceLineNo">447</span> @Override<a name="line.447"></a> +<span class="sourceLineNo">448</span> public String toString() {<a name="line.448"></a> +<span class="sourceLineNo">449</span> final StringBuilder sb = new StringBuilder();<a name="line.449"></a> +<span class="sourceLineNo">450</span> sb.append("Rule");<a name="line.450"></a> +<span class="sourceLineNo">451</span> sb.append("{line=").append(myLine);<a name="line.451"></a> +<span class="sourceLineNo">452</span> sb.append(", loc='").append(loc).append('\'');<a name="line.452"></a> +<span class="sourceLineNo">453</span> sb.append(", pat='").append(pat).append('\'');<a name="line.453"></a> +<span class="sourceLineNo">454</span> sb.append(", lcon='").append(lCon).append('\'');<a name="line.454"></a> +<span class="sourceLineNo">455</span> sb.append(", rcon='").append(rCon).append('\'');<a name="line.455"></a> +<span class="sourceLineNo">456</span> sb.append('}');<a name="line.456"></a> +<span class="sourceLineNo">457</span> return sb.toString();<a name="line.457"></a> +<span class="sourceLineNo">458</span> }<a name="line.458"></a> +<span class="sourceLineNo">459</span> };<a name="line.459"></a> +<span class="sourceLineNo">460</span> final String patternKey = r.pattern.substring(0,1);<a name="line.460"></a> +<span class="sourceLineNo">461</span> List<Rule> rules = lines.get(patternKey);<a name="line.461"></a> +<span class="sourceLineNo">462</span> if (rules == null) {<a name="line.462"></a> +<span class="sourceLineNo">463</span> rules = new ArrayList<>();<a name="line.463"></a> +<span class="sourceLineNo">464</span> lines.put(patternKey, rules);<a name="line.464"></a> +<span class="sourceLineNo">465</span> }<a name="line.465"></a> +<span class="sourceLineNo">466</span> rules.add(r);<a name="line.466"></a> +<span class="sourceLineNo">467</span> } catch (final IllegalArgumentException e) {<a name="line.467"></a> +<span class="sourceLineNo">468</span> throw new IllegalStateException("Problem parsing line '" + currentLine + "' in " +<a name="line.468"></a> +<span class="sourceLineNo">469</span> location, e);<a name="line.469"></a> +<span class="sourceLineNo">470</span> }<a name="line.470"></a> +<span class="sourceLineNo">471</span> }<a name="line.471"></a> +<span class="sourceLineNo">472</span> }<a name="line.472"></a> +<span class="sourceLineNo">473</span> }<a name="line.473"></a> +<span class="sourceLineNo">474</span> }<a name="line.474"></a> +<span class="sourceLineNo">475</span><a name="line.475"></a> +<span class="sourceLineNo">476</span> return lines;<a name="line.476"></a> +<span class="sourceLineNo">477</span> }<a name="line.477"></a> +<span class="sourceLineNo">478</span><a name="line.478"></a> +<span class="sourceLineNo">479</span> /**<a name="line.479"></a> +<span class="sourceLineNo">480</span> * Attempts to compile the regex into direct string ops, falling back to Pattern and Matcher in the worst case.<a name="line.480"></a> +<span class="sourceLineNo">481</span> *<a name="line.481"></a> +<span class="sourceLineNo">482</span> * @param regex<a name="line.482"></a> +<span class="sourceLineNo">483</span> * the regular expression to compile<a name="line.483"></a> +<span class="sourceLineNo">484</span> * @return an RPattern that will match this regex<a name="line.484"></a> +<span class="sourceLineNo">485</span> */<a name="line.485"></a> +<span class="sourceLineNo">486</span> private static RPattern pattern(final String regex) {<a name="line.486"></a> +<span class="sourceLineNo">487</span> final boolean startsWith = regex.startsWith("^");<a name="line.487"></a> +<span class="sourceLineNo">488</span> final boolean endsWith = regex.endsWith("$");<a name="line.488"></a> +<span class="sourceLineNo">489</span> final String content = regex.substring(startsWith ? 1 : 0, endsWith ? regex.length() - 1 : regex.length());<a name="line.489"></a> +<span class="sourceLineNo">490</span> final boolean boxes = content.contains("[");<a name="line.490"></a> +<span class="sourceLineNo">491</span><a name="line.491"></a> +<span class="sourceLineNo">492</span> if (!boxes) {<a name="line.492"></a> +<span class="sourceLineNo">493</span> if (startsWith && endsWith) {<a name="line.493"></a> +<span class="sourceLineNo">494</span> // exact match<a name="line.494"></a> +<span class="sourceLineNo">495</span> if (content.length() == 0) {<a name="line.495"></a> +<span class="sourceLineNo">496</span> // empty<a name="line.496"></a> +<span class="sourceLineNo">497</span> return new RPattern() {<a name="line.497"></a> +<span class="sourceLineNo">498</span> @Override<a name="line.498"></a> +<span class="sourceLineNo">499</span> public boolean isMatch(final CharSequence input) {<a name="line.499"></a> +<span class="sourceLineNo">500</span> return input.length() == 0;<a name="line.500"></a> +<span class="sourceLineNo">501</span> }<a name="line.501"></a> +<span class="sourceLineNo">502</span> };<a name="line.502"></a> +<span class="sourceLineNo">503</span> }<a name="line.503"></a> +<span class="sourceLineNo">504</span> return new RPattern() {<a name="line.504"></a> +<span class="sourceLineNo">505</span> @Override<a name="line.505"></a> +<span class="sourceLineNo">506</span> public boolean isMatch(final CharSequence input) {<a name="line.506"></a> +<span class="sourceLineNo">507</span> return input.equals(content);<a name="line.507"></a> +<span class="sourceLineNo">508</span> }<a name="line.508"></a> +<span class="sourceLineNo">509</span> };<a name="line.509"></a> +<span class="sourceLineNo">510</span> } else if ((startsWith || endsWith) && content.length() == 0) {<a name="line.510"></a> +<span class="sourceLineNo">511</span> // matches every string<a name="line.511"></a> +<span class="sourceLineNo">512</span> return ALL_STRINGS_RMATCHER;<a name="line.512"></a> +<span class="sourceLineNo">513</span> } else if (startsWith) {<a name="line.513"></a> +<span class="sourceLineNo">514</span> // matches from start<a name="line.514"></a> +<span class="sourceLineNo">515</span> return new RPattern() {<a name="line.515"></a> +<span class="sourceLineNo">516</span> @Override<a name="line.516"></a> +<span class="sourceLineNo">517</span> public boolean isMatch(final CharSequence input) {<a name="line.517"></a> +<span class="sourceLineNo">518</span> return startsWith(input, content);<a name="line.518"></a> +<span class="sourceLineNo">519</span> }<a name="line.519"></a> +<span class="sourceLineNo">520</span> };<a name="line.520"></a> +<span class="sourceLineNo">521</span> } else if (endsWith) {<a name="line.521"></a> +<span class="sourceLineNo">522</span> // matches from start<a name="line.522"></a> +<span class="sourceLineNo">523</span> return new RPattern() {<a name="line.523"></a> +<span class="sourceLineNo">524</span> @Override<a name="line.524"></a> +<span class="sourceLineNo">525</span> public boolean isMatch(final CharSequence input) {<a name="line.525"></a> +<span class="sourceLineNo">526</span> return endsWith(input, content);<a name="line.526"></a> +<span class="sourceLineNo">527</span> }<a name="line.527"></a> +<span class="sourceLineNo">528</span> };<a name="line.528"></a> +<span class="sourceLineNo">529</span> }<a name="line.529"></a> +<span class="sourceLineNo">530</span> } else {<a name="line.530"></a> +<span class="sourceLineNo">531</span> final boolean startsWithBox = content.startsWith("[");<a name="line.531"></a> +<span class="sourceLineNo">532</span> final boolean endsWithBox = content.endsWith("]");<a name="line.532"></a> +<span class="sourceLineNo">533</span><a name="line.533"></a> +<span class="sourceLineNo">534</span> if (startsWithBox && endsWithBox) {<a name="line.534"></a> +<span class="sourceLineNo">535</span> String boxContent = content.substring(1, content.length() - 1);<a name="line.535"></a> +<span class="sourceLineNo">536</span> if (!boxContent.contains("[")) {<a name="line.536"></a> +<span class="sourceLineNo">537</span> // box containing alternatives<a name="line.537"></a> +<span class="sourceLineNo">538</span> final boolean negate = boxContent.startsWith("^");<a name="line.538"></a> +<span class="sourceLineNo">539</span> if (negate) {<a name="line.539"></a> +<span class="sourceLineNo">540</span> boxContent = boxContent.substring(1);<a name="line.540"></a> +<span class="sourceLineNo">541</span> }<a name="line.541"></a> +<span class="sourceLineNo">542</span> final String bContent = boxContent;<a name="line.542"></a> +<span class="sourceLineNo">543</span> final boolean shouldMatch = !negate;<a name="line.543"></a> +<span class="sourceLineNo">544</span><a name="line.544"></a> +<span class="sourceLineNo">545</span> if (startsWith && endsWith) {<a name="line.545"></a> +<span class="sourceLineNo">546</span> // exact match<a name="line.546"></a> +<span class="sourceLineNo">547</span> return new RPattern() {<a name="line.547"></a> +<span class="sourceLineNo">548</span> @Override<a name="line.548"></a> +<span class="sourceLineNo">549</span> public boolean isMatch(final CharSequence input) {<a name="line.549"></a> +<span class="sourceLineNo">550</span> return input.length() == 1 && contains(bContent, input.charAt(0)) == shouldMatch;<a name="line.550"></a> +<span class="sourceLineNo">551</span> }<a name="line.551"></a> +<span class="sourceLineNo">552</span> };<a name="line.552"></a> +<span class="sourceLineNo">553</span> } else if (startsWith) {<a name="line.553"></a> +<span class="sourceLineNo">554</span> // first char<a name="line.554"></a> +<span class="sourceLineNo">555</span> return new RPattern() {<a name="line.555"></a> +<span class="sourceLineNo">556</span> @Override<a name="line.556"></a> +<span class="sourceLineNo">557</span> public boolean isMatch(final CharSequence input) {<a name="line.557"></a> +<span class="sourceLineNo">558</span> return input.length() > 0 && contains(bContent, input.charAt(0)) == shouldMatch;<a name="line.558"></a> +<span class="sourceLineNo">559</span> }<a name="line.559"></a> +<span class="sourceLineNo">560</span> };<a name="line.560"></a> +<span class="sourceLineNo">561</span> } else if (endsWith) {<a name="line.561"></a> +<span class="sourceLineNo">562</span> // last char<a name="line.562"></a> +<span class="sourceLineNo">563</span> return new RPattern() {<a name="line.563"></a> +<span class="sourceLineNo">564</span> @Override<a name="line.564"></a> +<span class="sourceLineNo">565</span> public boolean isMatch(final CharSequence input) {<a name="line.565"></a> +<span class="sourceLineNo">566</span> return input.length() > 0 &&<a name="line.566"></a> +<span class="sourceLineNo">567</span> contains(bContent, input.charAt(input.length() - 1)) == shouldMatch;<a name="line.567"></a> +<span class="sourceLineNo">568</span> }<a name="line.568"></a> +<span class="sourceLineNo">569</span> };<a name="line.569"></a> +<span class="sourceLineNo">570</span> }<a name="line.570"></a> +<span class="sourceLineNo">571</span> }<a name="line.571"></a> +<span class="sourceLineNo">572</span> }<a name="line.572"></a> +<span class="sourceLineNo">573</span> }<a name="line.573"></a> +<span class="sourceLineNo">574</span><a name="line.574"></a> +<span class="sourceLineNo">575</span> return new RPattern() {<a name="line.575"></a> +<span class="sourceLineNo">576</span> Pattern pattern = Pattern.compile(regex);<a name="line.576"></a> +<span class="sourceLineNo">577</span><a name="line.577"></a> +<span class="sourceLineNo">578</span> @Override<a name="line.578"></a> +<span class="sourceLineNo">579</span> public boolean isMatch(final CharSequence input) {<a name="line.579"></a> +<span class="sourceLineNo">580</span> final Matcher matcher = pattern.matcher(input);<a name="line.580"></a> +<span class="sourceLineNo">581</span> return matcher.find();<a name="line.581"></a> +<span class="sourceLineNo">582</span> }<a name="line.582"></a> +<span class="sourceLineNo">583</span> };<a name="line.583"></a> +<span class="sourceLineNo">584</span> }<a name="line.584"></a> +<span class="sourceLineNo">585</span><a name="line.585"></a> +<span class="sourceLineNo">586</span> private static boolean startsWith(final CharSequence input, final CharSequence prefix) {<a name="line.586"></a> +<span class="sourceLineNo">587</span> if (prefix.length() > input.length()) {<a name="line.587"></a> +<span class="sourceLineNo">588</span> return false;<a name="line.588"></a> +<span class="sourceLineNo">589</span> }<a name="line.589"></a> +<span class="sourceLineNo">590</span> for (int i = 0; i < prefix.length(); i++) {<a name="line.590"></a> +<span class="sourceLineNo">591</span> if (input.charAt(i) != prefix.charAt(i)) {<a name="line.591"></a> +<span class="sourceLineNo">592</span> return false;<a name="line.592"></a> +<span class="sourceLineNo">593</span> }<a name="line.593"></a> +<span class="sourceLineNo">594</span> }<a name="line.594"></a> +<span class="sourceLineNo">595</span> return true;<a name="line.595"></a> +<span class="sourceLineNo">596</span> }<a name="line.596"></a> +<span class="sourceLineNo">597</span><a name="line.597"></a> +<span class="sourceLineNo">598</span> private static String stripQuotes(String str) {<a name="line.598"></a> +<span class="sourceLineNo">599</span> if (str.startsWith(DOUBLE_QUOTE)) {<a name="line.599"></a> +<span class="sourceLineNo">600</span> str = str.substring(1);<a name="line.600"></a> +<span class="sourceLineNo">601</span> }<a name="line.601"></a> +<span class="sourceLineNo">602</span><a name="line.602"></a> +<span class="sourceLineNo">603</span> if (str.endsWith(DOUBLE_QUOTE)) {<a name="line.603"></a> +<span class="sourceLineNo">604</span> str = str.substring(0, str.length() - 1);<a name="line.604"></a> +<span class="sourceLineNo">605</span> }<a name="line.605"></a> +<span class="sourceLineNo">606</span><a name="line.606"></a> +<span class="sourceLineNo">607</span> return str;<a name="line.607"></a> +<span class="sourceLineNo">608</span> }<a name="line.608"></a> +<span class="sourceLineNo">609</span><a name="line.609"></a> +<span class="sourceLineNo">610</span> private final RPattern lContext;<a name="line.610"></a> +<span class="sourceLineNo">611</span><a name="line.611"></a> +<span class="sourceLineNo">612</span> private final String pattern;<a name="line.612"></a> +<span class="sourceLineNo">613</span><a name="line.613"></a> +<span class="sourceLineNo">614</span> private final PhonemeExpr phoneme;<a name="line.614"></a> +<span class="sourceLineNo">615</span><a name="line.615"></a> +<span class="sourceLineNo">616</span> private final RPattern rContext;<a name="line.616"></a> +<span class="sourceLineNo">617</span><a name="line.617"></a> +<span class="sourceLineNo">618</span> /**<a name="line.618"></a> +<span class="sourceLineNo">619</span> * Creates a new rule.<a name="line.619"></a> +<span class="sourceLineNo">620</span> *<a name="line.620"></a> +<span class="sourceLineNo">621</span> * @param pattern<a name="line.621"></a> +<span class="sourceLineNo">622</span> * the pattern<a name="line.622"></a> +<span class="sourceLineNo">623</span> * @param lContext<a name="line.623"></a> +<span class="sourceLineNo">624</span> * the left context<a name="line.624"></a> +<span class="sourceLineNo">625</span> * @param rContext<a name="line.625"></a> +<span class="sourceLineNo">626</span> * the right context<a name="line.626"></a> +<span class="sourceLineNo">627</span> * @param phoneme<a name="line.627"></a> +<span class="sourceLineNo">628</span> * the resulting phoneme<a name="line.628"></a> +<span class="sourceLineNo">629</span> */<a name="line.629"></a> +<span class="sourceLineNo">630</span> public Rule(final String pattern, final String lContext, final String rContext, final PhonemeExpr phoneme) {<a name="line.630"></a> +<span class="sourceLineNo">631</span> this.pattern = pattern;<a name="line.631"></a> +<span class="sourceLineNo">632</span> this.lContext = pattern(lContext + "$");<a name="line.632"></a> +<span class="sourceLineNo">633</span> this.rContext = pattern("^" + rContext);<a name="line.633"></a> +<span class="sourceLineNo">634</span> this.phoneme = phoneme;<a name="line.634"></a> +<span class="sourceLineNo">635</span> }<a name="line.635"></a> +<span class="sourceLineNo">636</span><a name="line.636"></a> +<span class="sourceLineNo">637</span> /**<a name="line.637"></a> +<span class="sourceLineNo">638</span> * Gets the left context. This is a regular expression that must match to the left of the pattern.<a name="line.638"></a> +<span class="sourceLineNo">639</span> *<a name="line.639"></a> +<span class="sourceLineNo">640</span> * @return the left context Pattern<a name="line.640"></a> +<span class="sourceLineNo">641</span> */<a name="line.641"></a> +<span class="sourceLineNo">642</span> public RPattern getLContext() {<a name="line.642"></a> +<span class="sourceLineNo">643</span> return this.lContext;<a name="line.643"></a> +<span class="sourceLineNo">644</span> }<a name="line.644"></a> +<span class="sourceLineNo">645</span><a name="line.645"></a> +<span class="sourceLineNo">646</span> /**<a name="line.646"></a> +<span class="sourceLineNo">647</span> * Gets the pattern. This is a string-literal that must exactly match.<a name="line.647"></a> +<span class="sourceLineNo">648</span> *<a name="line.648"></a> +<span class="sourceLineNo">649</span> * @return the pattern<a name="line.649"></a> +<span class="sourceLineNo">650</span> */<a name="line.650"></a> +<span class="sourceLineNo">651</span> public String getPattern() {<a name="line.651"></a> +<span class="sourceLineNo">652</span> return this.pattern;<a name="line.652"></a> +<span class="sourceLineNo">653</span> }<a name="line.653"></a> +<span class="sourceLineNo">654</span><a name="line.654"></a> +<span class="sourceLineNo">655</span> /**<a name="line.655"></a> +<span class="sourceLineNo">656</span> * Gets the phoneme. If the rule matches, this is the phoneme associated with the pattern match.<a name="line.656"></a> +<span class="sourceLineNo">657</span> *<a name="line.657"></a> +<span class="sourceLineNo">658</span> * @return the phoneme<a name="line.658"></a> +<span class="sourceLineNo">659</span> */<a name="line.659"></a> +<span class="sourceLineNo">660</span> public PhonemeExpr getPhoneme() {<a name="line.660"></a> +<span class="sourceLineNo">661</span> return this.phoneme;<a name="line.661"></a> +<span class="sourceLineNo">662</span> }<a name="line.662"></a> +<span class="sourceLineNo">663</span><a name="line.663"></a> +<span class="sourceLineNo">664</span> /**<a name="line.664"></a> +<span class="sourceLineNo">665</span> * Gets the right context. This is a regular expression that must match to the right of the pattern.<a name="line.665"></a> +<span class="sourceLineNo">666</span> *<a name="line.666"></a> +<span class="sourceLineNo">667</span> * @return the right context Pattern<a name="line.667"></a> +<span class="sourceLineNo">668</span> */<a name="line.668"></a> +<span class="sourceLineNo">669</span> public RPattern getRContext() {<a name="line.669"></a> +<span class="sourceLineNo">670</span> return this.rContext;<a name="line.670"></a> +<span class="sourceLineNo">671</span> }<a name="line.671"></a> +<span class="sourceLineNo">672</span><a name="line.672"></a> +<span class="sourceLineNo">673</span> /**<a name="line.673"></a> +<span class="sourceLineNo">674</span> * Decides if the pattern and context match the input starting at a position. It is a match if the<a name="line.674"></a> +<span class="sourceLineNo">675</span> * {@code lContext} matches {@code input} up to {@code i}, {@code pattern} matches at i and<a name="line.675"></a> +<span class="sourceLineNo">676</span> * {@code rContext} matches from the end of the match of {@code pattern} to the end of {@code input}.<a name="line.676"></a> +<span class="sourceLineNo">677</span> *<a name="line.677"></a> +<span class="sourceLineNo">678</span> * @param input<a name="line.678"></a> +<span class="sourceLineNo">679</span> * the input String<a name="line.679"></a> +<span class="sourceLineNo">680</span> * @param i<a name="line.680"></a> +<span class="sourceLineNo">681</span> * the int position within the input<a name="line.681"></a> +<span class="sourceLineNo">682</span> * @return true if the pattern and left/right context match, false otherwise<a name="line.682"></a> +<span class="sourceLineNo">683</span> */<a name="line.683"></a> +<span class="sourceLineNo">684</span> public boolean patternAndContextMatches(final CharSequence input, final int i) {<a name="line.684"></a> +<span class="sourceLineNo">685</span> if (i < 0) {<a name="line.685"></a> +<span class="sourceLineNo">686</span> throw new IndexOutOfBoundsException("Can not match pattern at negative indexes");<a name="line.686"></a> +<span class="sourceLineNo">687</span> }<a name="line.687"></a> +<span class="sourceLineNo">688</span><a name="line.688"></a> +<span class="sourceLineNo">689</span> final int patternLength = this.pattern.length();<a name="line.689"></a> +<span class="sourceLineNo">690</span> final int ipl = i + patternLength;<a name="line.690"></a> +<span class="sourceLineNo">691</span><a name="line.691"></a> +<span class="sourceLineNo">692</span> if (ipl > input.length()) {<a name="line.692"></a> +<span class="sourceLineNo">693</span> // not enough room for the pattern to match<a name="line.693"></a> +<span class="sourceLineNo">694</span> return false;<a name="line.694"></a> +<span class="sourceLineNo">695</span> }<a name="line.695"></a> +<span class="sourceLineNo">696</span><a name="line.696"></a> +<span class="sourceLineNo">697</span> // evaluate the pattern, left context and right context<a name="line.697"></a> +<span class="sourceLineNo">698</span> // fail early if any of the evaluations is not successful<a name="line.698"></a> +<span class="sourceLineNo">699</span> if (!input.subSequence(i, ipl).equals(this.pattern)) {<a name="line.699"></a> +<span class="sourceLineNo">700</span> return false;<a name="line.700"></a> +<span class="sourceLineNo">701</span> } else if (!this.rContext.isMatch(input.subSequence(ipl, input.length()))) {<a name="line.701"></a> +<span class="sourceLineNo">702</span> return false;<a name="line.702"></a> +<span class="sourceLineNo">703</span> }<a name="line.703"></a> +<span class="sourceLineNo">704</span> return this.lContext.isMatch(input.subSequence(0, i));<a name="line.704"></a> +<span class="sourceLineNo">705</span> }<a name="line.705"></a> +<span class="sourceLineNo">706</span>}<a name="line.706"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/RuleType.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/RuleType.html new file mode 100644 index 0000000000000000000000000000000000000000..7a5fb0562a342905e516d384b5d4d2357a9f64e7 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/language/bm/RuleType.html @@ -0,0 +1,121 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.language.bm;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>/**<a name="line.20"></a> +<span class="sourceLineNo">021</span> * Types of rule.<a name="line.21"></a> +<span class="sourceLineNo">022</span> *<a name="line.22"></a> +<span class="sourceLineNo">023</span> * @since 1.6<a name="line.23"></a> +<span class="sourceLineNo">024</span> */<a name="line.24"></a> +<span class="sourceLineNo">025</span>public enum RuleType {<a name="line.25"></a> +<span class="sourceLineNo">026</span><a name="line.26"></a> +<span class="sourceLineNo">027</span> /** Approximate rules, which will lead to the largest number of phonetic interpretations. */<a name="line.27"></a> +<span class="sourceLineNo">028</span> APPROX("approx"),<a name="line.28"></a> +<span class="sourceLineNo">029</span> /** Exact rules, which will lead to a minimum number of phonetic interpretations. */<a name="line.29"></a> +<span class="sourceLineNo">030</span> EXACT("exact"),<a name="line.30"></a> +<span class="sourceLineNo">031</span> /** For internal use only. Please use {@link #APPROX} or {@link #EXACT}. */<a name="line.31"></a> +<span class="sourceLineNo">032</span> RULES("rules");<a name="line.32"></a> +<span class="sourceLineNo">033</span><a name="line.33"></a> +<span class="sourceLineNo">034</span> private final String name;<a name="line.34"></a> +<span class="sourceLineNo">035</span><a name="line.35"></a> +<span class="sourceLineNo">036</span> RuleType(final String name) {<a name="line.36"></a> +<span class="sourceLineNo">037</span> this.name = name;<a name="line.37"></a> +<span class="sourceLineNo">038</span> }<a name="line.38"></a> +<span class="sourceLineNo">039</span><a name="line.39"></a> +<span class="sourceLineNo">040</span> /**<a name="line.40"></a> +<span class="sourceLineNo">041</span> * Gets the rule name.<a name="line.41"></a> +<span class="sourceLineNo">042</span> *<a name="line.42"></a> +<span class="sourceLineNo">043</span> * @return the rule name.<a name="line.43"></a> +<span class="sourceLineNo">044</span> */<a name="line.44"></a> +<span class="sourceLineNo">045</span> public String getName() {<a name="line.45"></a> +<span class="sourceLineNo">046</span> return this.name;<a name="line.46"></a> +<span class="sourceLineNo">047</span> }<a name="line.47"></a> +<span class="sourceLineNo">048</span><a name="line.48"></a> +<span class="sourceLineNo">049</span>}<a name="line.49"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/BCodec.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/BCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..caabbee2559d4b7ff1698fa4ca00a95088f24dff --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/BCodec.html @@ -0,0 +1,367 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.net;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.UnsupportedEncodingException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.nio.charset.Charset;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.nio.charset.StandardCharsets;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>import org.apache.commons.codec.CodecPolicy;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import org.apache.commons.codec.DecoderException;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import org.apache.commons.codec.EncoderException;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import org.apache.commons.codec.StringDecoder;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import org.apache.commons.codec.StringEncoder;<a name="line.28"></a> +<span class="sourceLineNo">029</span>import org.apache.commons.codec.binary.Base64;<a name="line.29"></a> +<span class="sourceLineNo">030</span>import org.apache.commons.codec.binary.BaseNCodec;<a name="line.30"></a> +<span class="sourceLineNo">031</span><a name="line.31"></a> +<span class="sourceLineNo">032</span>/**<a name="line.32"></a> +<span class="sourceLineNo">033</span> * Identical to the Base64 encoding defined by <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a><a name="line.33"></a> +<span class="sourceLineNo">034</span> * and allows a character set to be specified.<a name="line.34"></a> +<span class="sourceLineNo">035</span> * <p><a name="line.35"></a> +<span class="sourceLineNo">036</span> * <a href="http://www.ietf.org/rfc/rfc1522.txt">RFC 1522</a> describes techniques to allow the encoding of non-ASCII<a name="line.36"></a> +<span class="sourceLineNo">037</span> * text in various portions of a RFC 822 [2] message header, in a manner which is unlikely to confuse existing message<a name="line.37"></a> +<span class="sourceLineNo">038</span> * handling software.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * </p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <p><a name="line.40"></a> +<span class="sourceLineNo">041</span> * This class is immutable and thread-safe.<a name="line.41"></a> +<span class="sourceLineNo">042</span> * </p><a name="line.42"></a> +<span class="sourceLineNo">043</span> *<a name="line.43"></a> +<span class="sourceLineNo">044</span> * @see <a href="http://www.ietf.org/rfc/rfc1522.txt">MIME (Multipurpose Internet Mail Extensions) Part Two: Message<a name="line.44"></a> +<span class="sourceLineNo">045</span> * Header Extensions for Non-ASCII Text</a><a name="line.45"></a> +<span class="sourceLineNo">046</span> *<a name="line.46"></a> +<span class="sourceLineNo">047</span> * @since 1.3<a name="line.47"></a> +<span class="sourceLineNo">048</span> */<a name="line.48"></a> +<span class="sourceLineNo">049</span>public class BCodec extends RFC1522Codec implements StringEncoder, StringDecoder {<a name="line.49"></a> +<span class="sourceLineNo">050</span><a name="line.50"></a> +<span class="sourceLineNo">051</span> /**<a name="line.51"></a> +<span class="sourceLineNo">052</span> * The default decoding policy.<a name="line.52"></a> +<span class="sourceLineNo">053</span> */<a name="line.53"></a> +<span class="sourceLineNo">054</span> private static final CodecPolicy DECODING_POLICY_DEFAULT = CodecPolicy.LENIENT;<a name="line.54"></a> +<span class="sourceLineNo">055</span><a name="line.55"></a> +<span class="sourceLineNo">056</span> /**<a name="line.56"></a> +<span class="sourceLineNo">057</span> * The default Charset used for string decoding and encoding.<a name="line.57"></a> +<span class="sourceLineNo">058</span> */<a name="line.58"></a> +<span class="sourceLineNo">059</span> private final Charset charset;<a name="line.59"></a> +<span class="sourceLineNo">060</span><a name="line.60"></a> +<span class="sourceLineNo">061</span> /**<a name="line.61"></a> +<span class="sourceLineNo">062</span> * If true then decoding should throw an exception for impossible combinations of bits at the<a name="line.62"></a> +<span class="sourceLineNo">063</span> * end of the byte input. The default is to decode as much of them as possible.<a name="line.63"></a> +<span class="sourceLineNo">064</span> */<a name="line.64"></a> +<span class="sourceLineNo">065</span> private final CodecPolicy decodingPolicy;<a name="line.65"></a> +<span class="sourceLineNo">066</span><a name="line.66"></a> +<span class="sourceLineNo">067</span> /**<a name="line.67"></a> +<span class="sourceLineNo">068</span> * Default constructor.<a name="line.68"></a> +<span class="sourceLineNo">069</span> */<a name="line.69"></a> +<span class="sourceLineNo">070</span> public BCodec() {<a name="line.70"></a> +<span class="sourceLineNo">071</span> this(StandardCharsets.UTF_8);<a name="line.71"></a> +<span class="sourceLineNo">072</span> }<a name="line.72"></a> +<span class="sourceLineNo">073</span><a name="line.73"></a> +<span class="sourceLineNo">074</span> /**<a name="line.74"></a> +<span class="sourceLineNo">075</span> * Constructor which allows for the selection of a default Charset<a name="line.75"></a> +<span class="sourceLineNo">076</span> *<a name="line.76"></a> +<span class="sourceLineNo">077</span> * @param charset<a name="line.77"></a> +<span class="sourceLineNo">078</span> * the default string Charset to use.<a name="line.78"></a> +<span class="sourceLineNo">079</span> *<a name="line.79"></a> +<span class="sourceLineNo">080</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.80"></a> +<span class="sourceLineNo">081</span> * @since 1.7<a name="line.81"></a> +<span class="sourceLineNo">082</span> */<a name="line.82"></a> +<span class="sourceLineNo">083</span> public BCodec(final Charset charset) {<a name="line.83"></a> +<span class="sourceLineNo">084</span> this(charset, DECODING_POLICY_DEFAULT);<a name="line.84"></a> +<span class="sourceLineNo">085</span> }<a name="line.85"></a> +<span class="sourceLineNo">086</span><a name="line.86"></a> +<span class="sourceLineNo">087</span> /**<a name="line.87"></a> +<span class="sourceLineNo">088</span> * Constructor which allows for the selection of a default Charset.<a name="line.88"></a> +<span class="sourceLineNo">089</span> *<a name="line.89"></a> +<span class="sourceLineNo">090</span> * @param charset<a name="line.90"></a> +<span class="sourceLineNo">091</span> * the default string Charset to use.<a name="line.91"></a> +<span class="sourceLineNo">092</span> * @param decodingPolicy The decoding policy.<a name="line.92"></a> +<span class="sourceLineNo">093</span> *<a name="line.93"></a> +<span class="sourceLineNo">094</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.94"></a> +<span class="sourceLineNo">095</span> * @since 1.15<a name="line.95"></a> +<span class="sourceLineNo">096</span> */<a name="line.96"></a> +<span class="sourceLineNo">097</span> public BCodec(final Charset charset, final CodecPolicy decodingPolicy) {<a name="line.97"></a> +<span class="sourceLineNo">098</span> this.charset = charset;<a name="line.98"></a> +<span class="sourceLineNo">099</span> this.decodingPolicy = decodingPolicy;<a name="line.99"></a> +<span class="sourceLineNo">100</span> }<a name="line.100"></a> +<span class="sourceLineNo">101</span><a name="line.101"></a> +<span class="sourceLineNo">102</span> /**<a name="line.102"></a> +<span class="sourceLineNo">103</span> * Constructor which allows for the selection of a default Charset<a name="line.103"></a> +<span class="sourceLineNo">104</span> *<a name="line.104"></a> +<span class="sourceLineNo">105</span> * @param charsetName<a name="line.105"></a> +<span class="sourceLineNo">106</span> * the default Charset to use.<a name="line.106"></a> +<span class="sourceLineNo">107</span> * @throws java.nio.charset.UnsupportedCharsetException<a name="line.107"></a> +<span class="sourceLineNo">108</span> * If the named Charset is unavailable<a name="line.108"></a> +<span class="sourceLineNo">109</span> * @since 1.7 throws UnsupportedCharsetException if the named Charset is unavailable<a name="line.109"></a> +<span class="sourceLineNo">110</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.110"></a> +<span class="sourceLineNo">111</span> */<a name="line.111"></a> +<span class="sourceLineNo">112</span> public BCodec(final String charsetName) {<a name="line.112"></a> +<span class="sourceLineNo">113</span> this(Charset.forName(charsetName));<a name="line.113"></a> +<span class="sourceLineNo">114</span> }<a name="line.114"></a> +<span class="sourceLineNo">115</span><a name="line.115"></a> +<span class="sourceLineNo">116</span> /**<a name="line.116"></a> +<span class="sourceLineNo">117</span> * Returns true if decoding behavior is strict. Decoding will raise a<a name="line.117"></a> +<span class="sourceLineNo">118</span> * {@link DecoderException} if trailing bits are not part of a valid Base64 encoding.<a name="line.118"></a> +<span class="sourceLineNo">119</span> *<a name="line.119"></a> +<span class="sourceLineNo">120</span> * <p>The default is false for lenient encoding. Decoding will compose trailing bits<a name="line.120"></a> +<span class="sourceLineNo">121</span> * into 8-bit bytes and discard the remainder.<a name="line.121"></a> +<span class="sourceLineNo">122</span> *<a name="line.122"></a> +<span class="sourceLineNo">123</span> * @return true if using strict decoding<a name="line.123"></a> +<span class="sourceLineNo">124</span> * @since 1.15<a name="line.124"></a> +<span class="sourceLineNo">125</span> */<a name="line.125"></a> +<span class="sourceLineNo">126</span> public boolean isStrictDecoding() {<a name="line.126"></a> +<span class="sourceLineNo">127</span> return decodingPolicy == CodecPolicy.STRICT;<a name="line.127"></a> +<span class="sourceLineNo">128</span> }<a name="line.128"></a> +<span class="sourceLineNo">129</span><a name="line.129"></a> +<span class="sourceLineNo">130</span> @Override<a name="line.130"></a> +<span class="sourceLineNo">131</span> protected String getEncoding() {<a name="line.131"></a> +<span class="sourceLineNo">132</span> return "B";<a name="line.132"></a> +<span class="sourceLineNo">133</span> }<a name="line.133"></a> +<span class="sourceLineNo">134</span><a name="line.134"></a> +<span class="sourceLineNo">135</span> @Override<a name="line.135"></a> +<span class="sourceLineNo">136</span> protected byte[] doEncoding(final byte[] bytes) {<a name="line.136"></a> +<span class="sourceLineNo">137</span> if (bytes == null) {<a name="line.137"></a> +<span class="sourceLineNo">138</span> return null;<a name="line.138"></a> +<span class="sourceLineNo">139</span> }<a name="line.139"></a> +<span class="sourceLineNo">140</span> return Base64.encodeBase64(bytes);<a name="line.140"></a> +<span class="sourceLineNo">141</span> }<a name="line.141"></a> +<span class="sourceLineNo">142</span><a name="line.142"></a> +<span class="sourceLineNo">143</span> @Override<a name="line.143"></a> +<span class="sourceLineNo">144</span> protected byte[] doDecoding(final byte[] bytes) {<a name="line.144"></a> +<span class="sourceLineNo">145</span> if (bytes == null) {<a name="line.145"></a> +<span class="sourceLineNo">146</span> return null;<a name="line.146"></a> +<span class="sourceLineNo">147</span> }<a name="line.147"></a> +<span class="sourceLineNo">148</span> return new Base64(0, BaseNCodec.getChunkSeparator(), false, decodingPolicy).decode(bytes);<a name="line.148"></a> +<span class="sourceLineNo">149</span> }<a name="line.149"></a> +<span class="sourceLineNo">150</span><a name="line.150"></a> +<span class="sourceLineNo">151</span> /**<a name="line.151"></a> +<span class="sourceLineNo">152</span> * Encodes a string into its Base64 form using the specified Charset. Unsafe characters are escaped.<a name="line.152"></a> +<span class="sourceLineNo">153</span> *<a name="line.153"></a> +<span class="sourceLineNo">154</span> * @param strSource<a name="line.154"></a> +<span class="sourceLineNo">155</span> * string to convert to Base64 form<a name="line.155"></a> +<span class="sourceLineNo">156</span> * @param sourceCharset<a name="line.156"></a> +<span class="sourceLineNo">157</span> * the Charset for {@code value}<a name="line.157"></a> +<span class="sourceLineNo">158</span> * @return Base64 string<a name="line.158"></a> +<span class="sourceLineNo">159</span> * @throws EncoderException<a name="line.159"></a> +<span class="sourceLineNo">160</span> * thrown if a failure condition is encountered during the encoding process.<a name="line.160"></a> +<span class="sourceLineNo">161</span> * @since 1.7<a name="line.161"></a> +<span class="sourceLineNo">162</span> */<a name="line.162"></a> +<span class="sourceLineNo">163</span> public String encode(final String strSource, final Charset sourceCharset) throws EncoderException {<a name="line.163"></a> +<span class="sourceLineNo">164</span> if (strSource == null) {<a name="line.164"></a> +<span class="sourceLineNo">165</span> return null;<a name="line.165"></a> +<span class="sourceLineNo">166</span> }<a name="line.166"></a> +<span class="sourceLineNo">167</span> return encodeText(strSource, sourceCharset);<a name="line.167"></a> +<span class="sourceLineNo">168</span> }<a name="line.168"></a> +<span class="sourceLineNo">169</span><a name="line.169"></a> +<span class="sourceLineNo">170</span> /**<a name="line.170"></a> +<span class="sourceLineNo">171</span> * Encodes a string into its Base64 form using the specified Charset. Unsafe characters are escaped.<a name="line.171"></a> +<span class="sourceLineNo">172</span> *<a name="line.172"></a> +<span class="sourceLineNo">173</span> * @param strSource<a name="line.173"></a> +<span class="sourceLineNo">174</span> * string to convert to Base64 form<a name="line.174"></a> +<span class="sourceLineNo">175</span> * @param sourceCharset<a name="line.175"></a> +<span class="sourceLineNo">176</span> * the Charset for {@code value}<a name="line.176"></a> +<span class="sourceLineNo">177</span> * @return Base64 string<a name="line.177"></a> +<span class="sourceLineNo">178</span> * @throws EncoderException<a name="line.178"></a> +<span class="sourceLineNo">179</span> * thrown if a failure condition is encountered during the encoding process.<a name="line.179"></a> +<span class="sourceLineNo">180</span> */<a name="line.180"></a> +<span class="sourceLineNo">181</span> public String encode(final String strSource, final String sourceCharset) throws EncoderException {<a name="line.181"></a> +<span class="sourceLineNo">182</span> if (strSource == null) {<a name="line.182"></a> +<span class="sourceLineNo">183</span> return null;<a name="line.183"></a> +<span class="sourceLineNo">184</span> }<a name="line.184"></a> +<span class="sourceLineNo">185</span> try {<a name="line.185"></a> +<span class="sourceLineNo">186</span> return this.encodeText(strSource, sourceCharset);<a name="line.186"></a> +<span class="sourceLineNo">187</span> } catch (final UnsupportedEncodingException e) {<a name="line.187"></a> +<span class="sourceLineNo">188</span> throw new EncoderException(e.getMessage(), e);<a name="line.188"></a> +<span class="sourceLineNo">189</span> }<a name="line.189"></a> +<span class="sourceLineNo">190</span> }<a name="line.190"></a> +<span class="sourceLineNo">191</span><a name="line.191"></a> +<span class="sourceLineNo">192</span> /**<a name="line.192"></a> +<span class="sourceLineNo">193</span> * Encodes a string into its Base64 form using the default Charset. Unsafe characters are escaped.<a name="line.193"></a> +<span class="sourceLineNo">194</span> *<a name="line.194"></a> +<span class="sourceLineNo">195</span> * @param strSource<a name="line.195"></a> +<span class="sourceLineNo">196</span> * string to convert to Base64 form<a name="line.196"></a> +<span class="sourceLineNo">197</span> * @return Base64 string<a name="line.197"></a> +<span class="sourceLineNo">198</span> * @throws EncoderException<a name="line.198"></a> +<span class="sourceLineNo">199</span> * thrown if a failure condition is encountered during the encoding process.<a name="line.199"></a> +<span class="sourceLineNo">200</span> */<a name="line.200"></a> +<span class="sourceLineNo">201</span> @Override<a name="line.201"></a> +<span class="sourceLineNo">202</span> public String encode(final String strSource) throws EncoderException {<a name="line.202"></a> +<span class="sourceLineNo">203</span> if (strSource == null) {<a name="line.203"></a> +<span class="sourceLineNo">204</span> return null;<a name="line.204"></a> +<span class="sourceLineNo">205</span> }<a name="line.205"></a> +<span class="sourceLineNo">206</span> return encode(strSource, this.getCharset());<a name="line.206"></a> +<span class="sourceLineNo">207</span> }<a name="line.207"></a> +<span class="sourceLineNo">208</span><a name="line.208"></a> +<span class="sourceLineNo">209</span> /**<a name="line.209"></a> +<span class="sourceLineNo">210</span> * Decodes a Base64 string into its original form. Escaped characters are converted back to their original<a name="line.210"></a> +<span class="sourceLineNo">211</span> * representation.<a name="line.211"></a> +<span class="sourceLineNo">212</span> *<a name="line.212"></a> +<span class="sourceLineNo">213</span> * @param value<a name="line.213"></a> +<span class="sourceLineNo">214</span> * Base64 string to convert into its original form<a name="line.214"></a> +<span class="sourceLineNo">215</span> * @return original string<a name="line.215"></a> +<span class="sourceLineNo">216</span> * @throws DecoderException<a name="line.216"></a> +<span class="sourceLineNo">217</span> * A decoder exception is thrown if a failure condition is encountered during the decode process.<a name="line.217"></a> +<span class="sourceLineNo">218</span> */<a name="line.218"></a> +<span class="sourceLineNo">219</span> @Override<a name="line.219"></a> +<span class="sourceLineNo">220</span> public String decode(final String value) throws DecoderException {<a name="line.220"></a> +<span class="sourceLineNo">221</span> if (value == null) {<a name="line.221"></a> +<span class="sourceLineNo">222</span> return null;<a name="line.222"></a> +<span class="sourceLineNo">223</span> }<a name="line.223"></a> +<span class="sourceLineNo">224</span> try {<a name="line.224"></a> +<span class="sourceLineNo">225</span> return this.decodeText(value);<a name="line.225"></a> +<span class="sourceLineNo">226</span> } catch (final UnsupportedEncodingException | IllegalArgumentException e) {<a name="line.226"></a> +<span class="sourceLineNo">227</span> throw new DecoderException(e.getMessage(), e);<a name="line.227"></a> +<span class="sourceLineNo">228</span> }<a name="line.228"></a> +<span class="sourceLineNo">229</span> }<a name="line.229"></a> +<span class="sourceLineNo">230</span><a name="line.230"></a> +<span class="sourceLineNo">231</span> /**<a name="line.231"></a> +<span class="sourceLineNo">232</span> * Encodes an object into its Base64 form using the default Charset. Unsafe characters are escaped.<a name="line.232"></a> +<span class="sourceLineNo">233</span> *<a name="line.233"></a> +<span class="sourceLineNo">234</span> * @param value<a name="line.234"></a> +<span class="sourceLineNo">235</span> * object to convert to Base64 form<a name="line.235"></a> +<span class="sourceLineNo">236</span> * @return Base64 object<a name="line.236"></a> +<span class="sourceLineNo">237</span> * @throws EncoderException<a name="line.237"></a> +<span class="sourceLineNo">238</span> * thrown if a failure condition is encountered during the encoding process.<a name="line.238"></a> +<span class="sourceLineNo">239</span> */<a name="line.239"></a> +<span class="sourceLineNo">240</span> @Override<a name="line.240"></a> +<span class="sourceLineNo">241</span> public Object encode(final Object value) throws EncoderException {<a name="line.241"></a> +<span class="sourceLineNo">242</span> if (value == null) {<a name="line.242"></a> +<span class="sourceLineNo">243</span> return null;<a name="line.243"></a> +<span class="sourceLineNo">244</span> } else if (value instanceof String) {<a name="line.244"></a> +<span class="sourceLineNo">245</span> return encode((String) value);<a name="line.245"></a> +<span class="sourceLineNo">246</span> } else {<a name="line.246"></a> +<span class="sourceLineNo">247</span> throw new EncoderException("Objects of type " +<a name="line.247"></a> +<span class="sourceLineNo">248</span> value.getClass().getName() +<a name="line.248"></a> +<span class="sourceLineNo">249</span> " cannot be encoded using BCodec");<a name="line.249"></a> +<span class="sourceLineNo">250</span> }<a name="line.250"></a> +<span class="sourceLineNo">251</span> }<a name="line.251"></a> +<span class="sourceLineNo">252</span><a name="line.252"></a> +<span class="sourceLineNo">253</span> /**<a name="line.253"></a> +<span class="sourceLineNo">254</span> * Decodes a Base64 object into its original form. Escaped characters are converted back to their original<a name="line.254"></a> +<span class="sourceLineNo">255</span> * representation.<a name="line.255"></a> +<span class="sourceLineNo">256</span> *<a name="line.256"></a> +<span class="sourceLineNo">257</span> * @param value<a name="line.257"></a> +<span class="sourceLineNo">258</span> * Base64 object to convert into its original form<a name="line.258"></a> +<span class="sourceLineNo">259</span> * @return original object<a name="line.259"></a> +<span class="sourceLineNo">260</span> * @throws DecoderException<a name="line.260"></a> +<span class="sourceLineNo">261</span> * Thrown if the argument is not a {@code String}. Thrown if a failure condition is encountered<a name="line.261"></a> +<span class="sourceLineNo">262</span> * during the decode process.<a name="line.262"></a> +<span class="sourceLineNo">263</span> */<a name="line.263"></a> +<span class="sourceLineNo">264</span> @Override<a name="line.264"></a> +<span class="sourceLineNo">265</span> public Object decode(final Object value) throws DecoderException {<a name="line.265"></a> +<span class="sourceLineNo">266</span> if (value == null) {<a name="line.266"></a> +<span class="sourceLineNo">267</span> return null;<a name="line.267"></a> +<span class="sourceLineNo">268</span> } else if (value instanceof String) {<a name="line.268"></a> +<span class="sourceLineNo">269</span> return decode((String) value);<a name="line.269"></a> +<span class="sourceLineNo">270</span> } else {<a name="line.270"></a> +<span class="sourceLineNo">271</span> throw new DecoderException("Objects of type " +<a name="line.271"></a> +<span class="sourceLineNo">272</span> value.getClass().getName() +<a name="line.272"></a> +<span class="sourceLineNo">273</span> " cannot be decoded using BCodec");<a name="line.273"></a> +<span class="sourceLineNo">274</span> }<a name="line.274"></a> +<span class="sourceLineNo">275</span> }<a name="line.275"></a> +<span class="sourceLineNo">276</span><a name="line.276"></a> +<span class="sourceLineNo">277</span> /**<a name="line.277"></a> +<span class="sourceLineNo">278</span> * Gets the default Charset name used for string decoding and encoding.<a name="line.278"></a> +<span class="sourceLineNo">279</span> *<a name="line.279"></a> +<span class="sourceLineNo">280</span> * @return the default Charset name<a name="line.280"></a> +<span class="sourceLineNo">281</span> * @since 1.7<a name="line.281"></a> +<span class="sourceLineNo">282</span> */<a name="line.282"></a> +<span class="sourceLineNo">283</span> public Charset getCharset() {<a name="line.283"></a> +<span class="sourceLineNo">284</span> return this.charset;<a name="line.284"></a> +<span class="sourceLineNo">285</span> }<a name="line.285"></a> +<span class="sourceLineNo">286</span><a name="line.286"></a> +<span class="sourceLineNo">287</span> /**<a name="line.287"></a> +<span class="sourceLineNo">288</span> * Gets the default Charset name used for string decoding and encoding.<a name="line.288"></a> +<span class="sourceLineNo">289</span> *<a name="line.289"></a> +<span class="sourceLineNo">290</span> * @return the default Charset name<a name="line.290"></a> +<span class="sourceLineNo">291</span> */<a name="line.291"></a> +<span class="sourceLineNo">292</span> public String getDefaultCharset() {<a name="line.292"></a> +<span class="sourceLineNo">293</span> return this.charset.name();<a name="line.293"></a> +<span class="sourceLineNo">294</span> }<a name="line.294"></a> +<span class="sourceLineNo">295</span>}<a name="line.295"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/PercentCodec.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/PercentCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..c7070a32c9ddbb47b02a5c0d67bae1e123e7ab1f --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/PercentCodec.html @@ -0,0 +1,335 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.net;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.nio.ByteBuffer;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.util.BitSet;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import org.apache.commons.codec.BinaryDecoder;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import org.apache.commons.codec.BinaryEncoder;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import org.apache.commons.codec.DecoderException;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import org.apache.commons.codec.EncoderException;<a name="line.25"></a> +<span class="sourceLineNo">026</span><a name="line.26"></a> +<span class="sourceLineNo">027</span>/**<a name="line.27"></a> +<span class="sourceLineNo">028</span> * Implements the Percent-Encoding scheme, as described in HTTP 1.1 specification. For extensibility, an array of<a name="line.28"></a> +<span class="sourceLineNo">029</span> * special US-ASCII characters can be specified in order to perform proper URI encoding for the different parts<a name="line.29"></a> +<span class="sourceLineNo">030</span> * of the URI.<a name="line.30"></a> +<span class="sourceLineNo">031</span> * <p><a name="line.31"></a> +<span class="sourceLineNo">032</span> * This class is immutable. It is also thread-safe besides using BitSet which is not thread-safe, but its public<a name="line.32"></a> +<span class="sourceLineNo">033</span> * interface only call the access<a name="line.33"></a> +<span class="sourceLineNo">034</span> * </p><a name="line.34"></a> +<span class="sourceLineNo">035</span> *<a name="line.35"></a> +<span class="sourceLineNo">036</span> * @see <a href="https://tools.ietf.org/html/rfc3986#section-2.1">Percent-Encoding</a><a name="line.36"></a> +<span class="sourceLineNo">037</span> * @since 1.12<a name="line.37"></a> +<span class="sourceLineNo">038</span> */<a name="line.38"></a> +<span class="sourceLineNo">039</span>public class PercentCodec implements BinaryEncoder, BinaryDecoder {<a name="line.39"></a> +<span class="sourceLineNo">040</span><a name="line.40"></a> +<span class="sourceLineNo">041</span> /**<a name="line.41"></a> +<span class="sourceLineNo">042</span> * The escape character used by the Percent-Encoding in order to introduce an encoded character.<a name="line.42"></a> +<span class="sourceLineNo">043</span> */<a name="line.43"></a> +<span class="sourceLineNo">044</span><a name="line.44"></a> +<span class="sourceLineNo">045</span> private static final byte ESCAPE_CHAR = '%';<a name="line.45"></a> +<span class="sourceLineNo">046</span><a name="line.46"></a> +<span class="sourceLineNo">047</span> /**<a name="line.47"></a> +<span class="sourceLineNo">048</span> * The bit set used to store the character that should be always encoded<a name="line.48"></a> +<span class="sourceLineNo">049</span> */<a name="line.49"></a> +<span class="sourceLineNo">050</span> private final BitSet alwaysEncodeChars = new BitSet();<a name="line.50"></a> +<span class="sourceLineNo">051</span><a name="line.51"></a> +<span class="sourceLineNo">052</span> /**<a name="line.52"></a> +<span class="sourceLineNo">053</span> * The flag defining if the space character should be encoded as '+'<a name="line.53"></a> +<span class="sourceLineNo">054</span> */<a name="line.54"></a> +<span class="sourceLineNo">055</span> private final boolean plusForSpace;<a name="line.55"></a> +<span class="sourceLineNo">056</span><a name="line.56"></a> +<span class="sourceLineNo">057</span> /**<a name="line.57"></a> +<span class="sourceLineNo">058</span> * The minimum and maximum code of the bytes that is inserted in the bit set, used to prevent look-ups<a name="line.58"></a> +<span class="sourceLineNo">059</span> */<a name="line.59"></a> +<span class="sourceLineNo">060</span> private int alwaysEncodeCharsMin = Integer.MAX_VALUE, alwaysEncodeCharsMax = Integer.MIN_VALUE;<a name="line.60"></a> +<span class="sourceLineNo">061</span><a name="line.61"></a> +<span class="sourceLineNo">062</span> /**<a name="line.62"></a> +<span class="sourceLineNo">063</span> * Constructs a Percent coded that will encode all the non US-ASCII characters using the Percent-Encoding<a name="line.63"></a> +<span class="sourceLineNo">064</span> * while it will not encode all the US-ASCII characters, except for character '%' that is used as escape<a name="line.64"></a> +<span class="sourceLineNo">065</span> * character for Percent-Encoding.<a name="line.65"></a> +<span class="sourceLineNo">066</span> */<a name="line.66"></a> +<span class="sourceLineNo">067</span> public PercentCodec() {<a name="line.67"></a> +<span class="sourceLineNo">068</span> this.plusForSpace = false;<a name="line.68"></a> +<span class="sourceLineNo">069</span> insertAlwaysEncodeChar(ESCAPE_CHAR);<a name="line.69"></a> +<span class="sourceLineNo">070</span> }<a name="line.70"></a> +<span class="sourceLineNo">071</span><a name="line.71"></a> +<span class="sourceLineNo">072</span> /**<a name="line.72"></a> +<span class="sourceLineNo">073</span> * Constructs a Percent codec by specifying the characters that belong to US-ASCII that should<a name="line.73"></a> +<span class="sourceLineNo">074</span> * always be encoded. The rest US-ASCII characters will not be encoded, except for character '%' that<a name="line.74"></a> +<span class="sourceLineNo">075</span> * is used as escape character for Percent-Encoding.<a name="line.75"></a> +<span class="sourceLineNo">076</span> *<a name="line.76"></a> +<span class="sourceLineNo">077</span> * @param alwaysEncodeChars the unsafe characters that should always be encoded<a name="line.77"></a> +<span class="sourceLineNo">078</span> * @param plusForSpace the flag defining if the space character should be encoded as '+'<a name="line.78"></a> +<span class="sourceLineNo">079</span> */<a name="line.79"></a> +<span class="sourceLineNo">080</span> public PercentCodec(final byte[] alwaysEncodeChars, final boolean plusForSpace) {<a name="line.80"></a> +<span class="sourceLineNo">081</span> this.plusForSpace = plusForSpace;<a name="line.81"></a> +<span class="sourceLineNo">082</span> insertAlwaysEncodeChars(alwaysEncodeChars);<a name="line.82"></a> +<span class="sourceLineNo">083</span> }<a name="line.83"></a> +<span class="sourceLineNo">084</span><a name="line.84"></a> +<span class="sourceLineNo">085</span> /**<a name="line.85"></a> +<span class="sourceLineNo">086</span> * Adds the byte array into a BitSet for faster lookup<a name="line.86"></a> +<span class="sourceLineNo">087</span> *<a name="line.87"></a> +<span class="sourceLineNo">088</span> * @param alwaysEncodeCharsArray<a name="line.88"></a> +<span class="sourceLineNo">089</span> */<a name="line.89"></a> +<span class="sourceLineNo">090</span> private void insertAlwaysEncodeChars(final byte[] alwaysEncodeCharsArray) {<a name="line.90"></a> +<span class="sourceLineNo">091</span> if (alwaysEncodeCharsArray != null) {<a name="line.91"></a> +<span class="sourceLineNo">092</span> for (final byte b : alwaysEncodeCharsArray) {<a name="line.92"></a> +<span class="sourceLineNo">093</span> insertAlwaysEncodeChar(b);<a name="line.93"></a> +<span class="sourceLineNo">094</span> }<a name="line.94"></a> +<span class="sourceLineNo">095</span> }<a name="line.95"></a> +<span class="sourceLineNo">096</span> insertAlwaysEncodeChar(ESCAPE_CHAR);<a name="line.96"></a> +<span class="sourceLineNo">097</span> }<a name="line.97"></a> +<span class="sourceLineNo">098</span><a name="line.98"></a> +<span class="sourceLineNo">099</span> /**<a name="line.99"></a> +<span class="sourceLineNo">100</span> * Inserts a single character into a BitSet and maintains the min and max of the characters of the<a name="line.100"></a> +<span class="sourceLineNo">101</span> * {@code BitSet alwaysEncodeChars} in order to avoid look-ups when a byte is out of this range.<a name="line.101"></a> +<span class="sourceLineNo">102</span> *<a name="line.102"></a> +<span class="sourceLineNo">103</span> * @param b the byte that is candidate for min and max limit<a name="line.103"></a> +<span class="sourceLineNo">104</span> */<a name="line.104"></a> +<span class="sourceLineNo">105</span> private void insertAlwaysEncodeChar(final byte b) {<a name="line.105"></a> +<span class="sourceLineNo">106</span> this.alwaysEncodeChars.set(b);<a name="line.106"></a> +<span class="sourceLineNo">107</span> if (b < alwaysEncodeCharsMin) {<a name="line.107"></a> +<span class="sourceLineNo">108</span> alwaysEncodeCharsMin = b;<a name="line.108"></a> +<span class="sourceLineNo">109</span> }<a name="line.109"></a> +<span class="sourceLineNo">110</span> if (b > alwaysEncodeCharsMax) {<a name="line.110"></a> +<span class="sourceLineNo">111</span> alwaysEncodeCharsMax = b;<a name="line.111"></a> +<span class="sourceLineNo">112</span> }<a name="line.112"></a> +<span class="sourceLineNo">113</span> }<a name="line.113"></a> +<span class="sourceLineNo">114</span><a name="line.114"></a> +<span class="sourceLineNo">115</span> /**<a name="line.115"></a> +<span class="sourceLineNo">116</span> * Percent-Encoding based on RFC 3986. The non US-ASCII characters are encoded, as well as the<a name="line.116"></a> +<span class="sourceLineNo">117</span> * US-ASCII characters that are configured to be always encoded.<a name="line.117"></a> +<span class="sourceLineNo">118</span> */<a name="line.118"></a> +<span class="sourceLineNo">119</span> @Override<a name="line.119"></a> +<span class="sourceLineNo">120</span> public byte[] encode(final byte[] bytes) throws EncoderException {<a name="line.120"></a> +<span class="sourceLineNo">121</span> if (bytes == null) {<a name="line.121"></a> +<span class="sourceLineNo">122</span> return null;<a name="line.122"></a> +<span class="sourceLineNo">123</span> }<a name="line.123"></a> +<span class="sourceLineNo">124</span><a name="line.124"></a> +<span class="sourceLineNo">125</span> final int expectedEncodingBytes = expectedEncodingBytes(bytes);<a name="line.125"></a> +<span class="sourceLineNo">126</span> final boolean willEncode = expectedEncodingBytes != bytes.length;<a name="line.126"></a> +<span class="sourceLineNo">127</span> if (willEncode || (plusForSpace && containsSpace(bytes))) {<a name="line.127"></a> +<span class="sourceLineNo">128</span> return doEncode(bytes, expectedEncodingBytes, willEncode);<a name="line.128"></a> +<span class="sourceLineNo">129</span> }<a name="line.129"></a> +<span class="sourceLineNo">130</span> return bytes;<a name="line.130"></a> +<span class="sourceLineNo">131</span> }<a name="line.131"></a> +<span class="sourceLineNo">132</span><a name="line.132"></a> +<span class="sourceLineNo">133</span> private byte[] doEncode(final byte[] bytes, final int expectedLength, final boolean willEncode) {<a name="line.133"></a> +<span class="sourceLineNo">134</span> final ByteBuffer buffer = ByteBuffer.allocate(expectedLength);<a name="line.134"></a> +<span class="sourceLineNo">135</span> for (final byte b : bytes) {<a name="line.135"></a> +<span class="sourceLineNo">136</span> if (willEncode && canEncode(b)) {<a name="line.136"></a> +<span class="sourceLineNo">137</span> byte bb = b;<a name="line.137"></a> +<span class="sourceLineNo">138</span> if (bb < 0) {<a name="line.138"></a> +<span class="sourceLineNo">139</span> bb = (byte) (256 + bb);<a name="line.139"></a> +<span class="sourceLineNo">140</span> }<a name="line.140"></a> +<span class="sourceLineNo">141</span> final char hex1 = Utils.hexDigit(bb >> 4);<a name="line.141"></a> +<span class="sourceLineNo">142</span> final char hex2 = Utils.hexDigit(bb);<a name="line.142"></a> +<span class="sourceLineNo">143</span> buffer.put(ESCAPE_CHAR);<a name="line.143"></a> +<span class="sourceLineNo">144</span> buffer.put((byte) hex1);<a name="line.144"></a> +<span class="sourceLineNo">145</span> buffer.put((byte) hex2);<a name="line.145"></a> +<span class="sourceLineNo">146</span> } else {<a name="line.146"></a> +<span class="sourceLineNo">147</span> if (plusForSpace && b == ' ') {<a name="line.147"></a> +<span class="sourceLineNo">148</span> buffer.put((byte) '+');<a name="line.148"></a> +<span class="sourceLineNo">149</span> } else {<a name="line.149"></a> +<span class="sourceLineNo">150</span> buffer.put(b);<a name="line.150"></a> +<span class="sourceLineNo">151</span> }<a name="line.151"></a> +<span class="sourceLineNo">152</span> }<a name="line.152"></a> +<span class="sourceLineNo">153</span> }<a name="line.153"></a> +<span class="sourceLineNo">154</span> return buffer.array();<a name="line.154"></a> +<span class="sourceLineNo">155</span> }<a name="line.155"></a> +<span class="sourceLineNo">156</span><a name="line.156"></a> +<span class="sourceLineNo">157</span> private int expectedEncodingBytes(final byte[] bytes) {<a name="line.157"></a> +<span class="sourceLineNo">158</span> int byteCount = 0;<a name="line.158"></a> +<span class="sourceLineNo">159</span> for (final byte b : bytes) {<a name="line.159"></a> +<span class="sourceLineNo">160</span> byteCount += canEncode(b) ? 3: 1;<a name="line.160"></a> +<span class="sourceLineNo">161</span> }<a name="line.161"></a> +<span class="sourceLineNo">162</span> return byteCount;<a name="line.162"></a> +<span class="sourceLineNo">163</span> }<a name="line.163"></a> +<span class="sourceLineNo">164</span><a name="line.164"></a> +<span class="sourceLineNo">165</span> private boolean containsSpace(final byte[] bytes) {<a name="line.165"></a> +<span class="sourceLineNo">166</span> for (final byte b : bytes) {<a name="line.166"></a> +<span class="sourceLineNo">167</span> if (b == ' ') {<a name="line.167"></a> +<span class="sourceLineNo">168</span> return true;<a name="line.168"></a> +<span class="sourceLineNo">169</span> }<a name="line.169"></a> +<span class="sourceLineNo">170</span> }<a name="line.170"></a> +<span class="sourceLineNo">171</span> return false;<a name="line.171"></a> +<span class="sourceLineNo">172</span> }<a name="line.172"></a> +<span class="sourceLineNo">173</span><a name="line.173"></a> +<span class="sourceLineNo">174</span> private boolean canEncode(final byte c) {<a name="line.174"></a> +<span class="sourceLineNo">175</span> return !isAsciiChar(c) || (inAlwaysEncodeCharsRange(c) && alwaysEncodeChars.get(c));<a name="line.175"></a> +<span class="sourceLineNo">176</span> }<a name="line.176"></a> +<span class="sourceLineNo">177</span><a name="line.177"></a> +<span class="sourceLineNo">178</span> private boolean inAlwaysEncodeCharsRange(final byte c) {<a name="line.178"></a> +<span class="sourceLineNo">179</span> return c >= alwaysEncodeCharsMin && c <= alwaysEncodeCharsMax;<a name="line.179"></a> +<span class="sourceLineNo">180</span> }<a name="line.180"></a> +<span class="sourceLineNo">181</span><a name="line.181"></a> +<span class="sourceLineNo">182</span> private boolean isAsciiChar(final byte c) {<a name="line.182"></a> +<span class="sourceLineNo">183</span> return c >= 0;<a name="line.183"></a> +<span class="sourceLineNo">184</span> }<a name="line.184"></a> +<span class="sourceLineNo">185</span><a name="line.185"></a> +<span class="sourceLineNo">186</span> /**<a name="line.186"></a> +<span class="sourceLineNo">187</span> * Decode bytes encoded with Percent-Encoding based on RFC 3986. The reverse process is performed in order to<a name="line.187"></a> +<span class="sourceLineNo">188</span> * decode the encoded characters to Unicode.<a name="line.188"></a> +<span class="sourceLineNo">189</span> */<a name="line.189"></a> +<span class="sourceLineNo">190</span> @Override<a name="line.190"></a> +<span class="sourceLineNo">191</span> public byte[] decode(final byte[] bytes) throws DecoderException {<a name="line.191"></a> +<span class="sourceLineNo">192</span> if (bytes == null) {<a name="line.192"></a> +<span class="sourceLineNo">193</span> return null;<a name="line.193"></a> +<span class="sourceLineNo">194</span> }<a name="line.194"></a> +<span class="sourceLineNo">195</span><a name="line.195"></a> +<span class="sourceLineNo">196</span> final ByteBuffer buffer = ByteBuffer.allocate(expectedDecodingBytes(bytes));<a name="line.196"></a> +<span class="sourceLineNo">197</span> for (int i = 0; i < bytes.length; i++) {<a name="line.197"></a> +<span class="sourceLineNo">198</span> final byte b = bytes[i];<a name="line.198"></a> +<span class="sourceLineNo">199</span> if (b == ESCAPE_CHAR) {<a name="line.199"></a> +<span class="sourceLineNo">200</span> try {<a name="line.200"></a> +<span class="sourceLineNo">201</span> final int u = Utils.digit16(bytes[++i]);<a name="line.201"></a> +<span class="sourceLineNo">202</span> final int l = Utils.digit16(bytes[++i]);<a name="line.202"></a> +<span class="sourceLineNo">203</span> buffer.put((byte) ((u << 4) + l));<a name="line.203"></a> +<span class="sourceLineNo">204</span> } catch (final ArrayIndexOutOfBoundsException e) {<a name="line.204"></a> +<span class="sourceLineNo">205</span> throw new DecoderException("Invalid percent decoding: ", e);<a name="line.205"></a> +<span class="sourceLineNo">206</span> }<a name="line.206"></a> +<span class="sourceLineNo">207</span> } else {<a name="line.207"></a> +<span class="sourceLineNo">208</span> if (plusForSpace && b == '+') {<a name="line.208"></a> +<span class="sourceLineNo">209</span> buffer.put((byte) ' ');<a name="line.209"></a> +<span class="sourceLineNo">210</span> } else {<a name="line.210"></a> +<span class="sourceLineNo">211</span> buffer.put(b);<a name="line.211"></a> +<span class="sourceLineNo">212</span> }<a name="line.212"></a> +<span class="sourceLineNo">213</span> }<a name="line.213"></a> +<span class="sourceLineNo">214</span> }<a name="line.214"></a> +<span class="sourceLineNo">215</span> return buffer.array();<a name="line.215"></a> +<span class="sourceLineNo">216</span> }<a name="line.216"></a> +<span class="sourceLineNo">217</span><a name="line.217"></a> +<span class="sourceLineNo">218</span> private int expectedDecodingBytes(final byte[] bytes) {<a name="line.218"></a> +<span class="sourceLineNo">219</span> int byteCount = 0;<a name="line.219"></a> +<span class="sourceLineNo">220</span> for (int i = 0; i < bytes.length; ) {<a name="line.220"></a> +<span class="sourceLineNo">221</span> final byte b = bytes[i];<a name="line.221"></a> +<span class="sourceLineNo">222</span> i += b == ESCAPE_CHAR ? 3: 1;<a name="line.222"></a> +<span class="sourceLineNo">223</span> byteCount++;<a name="line.223"></a> +<span class="sourceLineNo">224</span> }<a name="line.224"></a> +<span class="sourceLineNo">225</span> return byteCount;<a name="line.225"></a> +<span class="sourceLineNo">226</span> }<a name="line.226"></a> +<span class="sourceLineNo">227</span><a name="line.227"></a> +<span class="sourceLineNo">228</span> /**<a name="line.228"></a> +<span class="sourceLineNo">229</span> * Encodes an object into using the Percent-Encoding. Only byte[] objects are accepted.<a name="line.229"></a> +<span class="sourceLineNo">230</span> *<a name="line.230"></a> +<span class="sourceLineNo">231</span> * @param obj the object to encode<a name="line.231"></a> +<span class="sourceLineNo">232</span> * @return the encoding result byte[] as Object<a name="line.232"></a> +<span class="sourceLineNo">233</span> * @throws EncoderException if the object is not a byte array<a name="line.233"></a> +<span class="sourceLineNo">234</span> */<a name="line.234"></a> +<span class="sourceLineNo">235</span> @Override<a name="line.235"></a> +<span class="sourceLineNo">236</span> public Object encode(final Object obj) throws EncoderException {<a name="line.236"></a> +<span class="sourceLineNo">237</span> if (obj == null) {<a name="line.237"></a> +<span class="sourceLineNo">238</span> return null;<a name="line.238"></a> +<span class="sourceLineNo">239</span> } else if (obj instanceof byte[]) {<a name="line.239"></a> +<span class="sourceLineNo">240</span> return encode((byte[]) obj);<a name="line.240"></a> +<span class="sourceLineNo">241</span> } else {<a name="line.241"></a> +<span class="sourceLineNo">242</span> throw new EncoderException("Objects of type " + obj.getClass().getName() + " cannot be Percent encoded");<a name="line.242"></a> +<span class="sourceLineNo">243</span> }<a name="line.243"></a> +<span class="sourceLineNo">244</span> }<a name="line.244"></a> +<span class="sourceLineNo">245</span><a name="line.245"></a> +<span class="sourceLineNo">246</span> /**<a name="line.246"></a> +<span class="sourceLineNo">247</span> * Decodes a byte[] Object, whose bytes are encoded with Percent-Encoding.<a name="line.247"></a> +<span class="sourceLineNo">248</span> *<a name="line.248"></a> +<span class="sourceLineNo">249</span> * @param obj the object to decode<a name="line.249"></a> +<span class="sourceLineNo">250</span> * @return the decoding result byte[] as Object<a name="line.250"></a> +<span class="sourceLineNo">251</span> * @throws DecoderException if the object is not a byte array<a name="line.251"></a> +<span class="sourceLineNo">252</span> */<a name="line.252"></a> +<span class="sourceLineNo">253</span> @Override<a name="line.253"></a> +<span class="sourceLineNo">254</span> public Object decode(final Object obj) throws DecoderException {<a name="line.254"></a> +<span class="sourceLineNo">255</span> if (obj == null) {<a name="line.255"></a> +<span class="sourceLineNo">256</span> return null;<a name="line.256"></a> +<span class="sourceLineNo">257</span> } else if (obj instanceof byte[]) {<a name="line.257"></a> +<span class="sourceLineNo">258</span> return decode((byte[]) obj);<a name="line.258"></a> +<span class="sourceLineNo">259</span> } else {<a name="line.259"></a> +<span class="sourceLineNo">260</span> throw new DecoderException("Objects of type " + obj.getClass().getName() + " cannot be Percent decoded");<a name="line.260"></a> +<span class="sourceLineNo">261</span> }<a name="line.261"></a> +<span class="sourceLineNo">262</span> }<a name="line.262"></a> +<span class="sourceLineNo">263</span>}<a name="line.263"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/QCodec.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/QCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..d10cf02c88253837cf6d7e905da157a68070b830 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/QCodec.html @@ -0,0 +1,431 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.net;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.UnsupportedEncodingException;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.nio.charset.Charset;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.nio.charset.StandardCharsets;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.util.BitSet;<a name="line.23"></a> +<span class="sourceLineNo">024</span><a name="line.24"></a> +<span class="sourceLineNo">025</span>import org.apache.commons.codec.DecoderException;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import org.apache.commons.codec.EncoderException;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import org.apache.commons.codec.StringDecoder;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import org.apache.commons.codec.StringEncoder;<a name="line.28"></a> +<span class="sourceLineNo">029</span><a name="line.29"></a> +<span class="sourceLineNo">030</span>/**<a name="line.30"></a> +<span class="sourceLineNo">031</span> * Similar to the Quoted-Printable content-transfer-encoding defined in<a name="line.31"></a> +<span class="sourceLineNo">032</span> * <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> and designed to allow text containing mostly ASCII<a name="line.32"></a> +<span class="sourceLineNo">033</span> * characters to be decipherable on an ASCII terminal without decoding.<a name="line.33"></a> +<span class="sourceLineNo">034</span> * <p><a name="line.34"></a> +<span class="sourceLineNo">035</span> * <a href="http://www.ietf.org/rfc/rfc1522.txt">RFC 1522</a> describes techniques to allow the encoding of non-ASCII<a name="line.35"></a> +<span class="sourceLineNo">036</span> * text in various portions of a RFC 822 [2] message header, in a manner which is unlikely to confuse existing message<a name="line.36"></a> +<span class="sourceLineNo">037</span> * handling software.<a name="line.37"></a> +<span class="sourceLineNo">038</span> * </p><a name="line.38"></a> +<span class="sourceLineNo">039</span> * <p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * This class is conditionally thread-safe.<a name="line.40"></a> +<span class="sourceLineNo">041</span> * The instance field for encoding blanks is mutable {@link #setEncodeBlanks(boolean)}<a name="line.41"></a> +<span class="sourceLineNo">042</span> * but is not volatile, and accesses are not synchronised.<a name="line.42"></a> +<span class="sourceLineNo">043</span> * If an instance of the class is shared between threads, the caller needs to ensure that suitable synchronisation<a name="line.43"></a> +<span class="sourceLineNo">044</span> * is used to ensure safe publication of the value between threads, and must not invoke<a name="line.44"></a> +<span class="sourceLineNo">045</span> * {@link #setEncodeBlanks(boolean)} after initial setup.<a name="line.45"></a> +<span class="sourceLineNo">046</span> * </p><a name="line.46"></a> +<span class="sourceLineNo">047</span> *<a name="line.47"></a> +<span class="sourceLineNo">048</span> * @see <a href="http://www.ietf.org/rfc/rfc1522.txt">MIME (Multipurpose Internet Mail Extensions) Part Two: Message<a name="line.48"></a> +<span class="sourceLineNo">049</span> * Header Extensions for Non-ASCII Text</a><a name="line.49"></a> +<span class="sourceLineNo">050</span> *<a name="line.50"></a> +<span class="sourceLineNo">051</span> * @since 1.3<a name="line.51"></a> +<span class="sourceLineNo">052</span> */<a name="line.52"></a> +<span class="sourceLineNo">053</span>public class QCodec extends RFC1522Codec implements StringEncoder, StringDecoder {<a name="line.53"></a> +<span class="sourceLineNo">054</span> /**<a name="line.54"></a> +<span class="sourceLineNo">055</span> * The default Charset used for string decoding and encoding.<a name="line.55"></a> +<span class="sourceLineNo">056</span> */<a name="line.56"></a> +<span class="sourceLineNo">057</span> private final Charset charset;<a name="line.57"></a> +<span class="sourceLineNo">058</span><a name="line.58"></a> +<span class="sourceLineNo">059</span> /**<a name="line.59"></a> +<span class="sourceLineNo">060</span> * BitSet of printable characters as defined in RFC 1522.<a name="line.60"></a> +<span class="sourceLineNo">061</span> */<a name="line.61"></a> +<span class="sourceLineNo">062</span> private static final BitSet PRINTABLE_CHARS = new BitSet(256);<a name="line.62"></a> +<span class="sourceLineNo">063</span> // Static initializer for printable chars collection<a name="line.63"></a> +<span class="sourceLineNo">064</span> static {<a name="line.64"></a> +<span class="sourceLineNo">065</span> // alpha characters<a name="line.65"></a> +<span class="sourceLineNo">066</span> PRINTABLE_CHARS.set(' ');<a name="line.66"></a> +<span class="sourceLineNo">067</span> PRINTABLE_CHARS.set('!');<a name="line.67"></a> +<span class="sourceLineNo">068</span> PRINTABLE_CHARS.set('"');<a name="line.68"></a> +<span class="sourceLineNo">069</span> PRINTABLE_CHARS.set('#');<a name="line.69"></a> +<span class="sourceLineNo">070</span> PRINTABLE_CHARS.set('$');<a name="line.70"></a> +<span class="sourceLineNo">071</span> PRINTABLE_CHARS.set('%');<a name="line.71"></a> +<span class="sourceLineNo">072</span> PRINTABLE_CHARS.set('&');<a name="line.72"></a> +<span class="sourceLineNo">073</span> PRINTABLE_CHARS.set('\'');<a name="line.73"></a> +<span class="sourceLineNo">074</span> PRINTABLE_CHARS.set('(');<a name="line.74"></a> +<span class="sourceLineNo">075</span> PRINTABLE_CHARS.set(')');<a name="line.75"></a> +<span class="sourceLineNo">076</span> PRINTABLE_CHARS.set('*');<a name="line.76"></a> +<span class="sourceLineNo">077</span> PRINTABLE_CHARS.set('+');<a name="line.77"></a> +<span class="sourceLineNo">078</span> PRINTABLE_CHARS.set(',');<a name="line.78"></a> +<span class="sourceLineNo">079</span> PRINTABLE_CHARS.set('-');<a name="line.79"></a> +<span class="sourceLineNo">080</span> PRINTABLE_CHARS.set('.');<a name="line.80"></a> +<span class="sourceLineNo">081</span> PRINTABLE_CHARS.set('/');<a name="line.81"></a> +<span class="sourceLineNo">082</span> for (int i = '0'; i <= '9'; i++) {<a name="line.82"></a> +<span class="sourceLineNo">083</span> PRINTABLE_CHARS.set(i);<a name="line.83"></a> +<span class="sourceLineNo">084</span> }<a name="line.84"></a> +<span class="sourceLineNo">085</span> PRINTABLE_CHARS.set(':');<a name="line.85"></a> +<span class="sourceLineNo">086</span> PRINTABLE_CHARS.set(';');<a name="line.86"></a> +<span class="sourceLineNo">087</span> PRINTABLE_CHARS.set('<');<a name="line.87"></a> +<span class="sourceLineNo">088</span> PRINTABLE_CHARS.set('>');<a name="line.88"></a> +<span class="sourceLineNo">089</span> PRINTABLE_CHARS.set('@');<a name="line.89"></a> +<span class="sourceLineNo">090</span> for (int i = 'A'; i <= 'Z'; i++) {<a name="line.90"></a> +<span class="sourceLineNo">091</span> PRINTABLE_CHARS.set(i);<a name="line.91"></a> +<span class="sourceLineNo">092</span> }<a name="line.92"></a> +<span class="sourceLineNo">093</span> PRINTABLE_CHARS.set('[');<a name="line.93"></a> +<span class="sourceLineNo">094</span> PRINTABLE_CHARS.set('\\');<a name="line.94"></a> +<span class="sourceLineNo">095</span> PRINTABLE_CHARS.set(']');<a name="line.95"></a> +<span class="sourceLineNo">096</span> PRINTABLE_CHARS.set('^');<a name="line.96"></a> +<span class="sourceLineNo">097</span> PRINTABLE_CHARS.set('`');<a name="line.97"></a> +<span class="sourceLineNo">098</span> for (int i = 'a'; i <= 'z'; i++) {<a name="line.98"></a> +<span class="sourceLineNo">099</span> PRINTABLE_CHARS.set(i);<a name="line.99"></a> +<span class="sourceLineNo">100</span> }<a name="line.100"></a> +<span class="sourceLineNo">101</span> PRINTABLE_CHARS.set('{');<a name="line.101"></a> +<span class="sourceLineNo">102</span> PRINTABLE_CHARS.set('|');<a name="line.102"></a> +<span class="sourceLineNo">103</span> PRINTABLE_CHARS.set('}');<a name="line.103"></a> +<span class="sourceLineNo">104</span> PRINTABLE_CHARS.set('~');<a name="line.104"></a> +<span class="sourceLineNo">105</span> }<a name="line.105"></a> +<span class="sourceLineNo">106</span><a name="line.106"></a> +<span class="sourceLineNo">107</span> private static final byte SPACE = 32;<a name="line.107"></a> +<span class="sourceLineNo">108</span><a name="line.108"></a> +<span class="sourceLineNo">109</span> private static final byte UNDERSCORE = 95;<a name="line.109"></a> +<span class="sourceLineNo">110</span><a name="line.110"></a> +<span class="sourceLineNo">111</span> private boolean encodeBlanks = false;<a name="line.111"></a> +<span class="sourceLineNo">112</span><a name="line.112"></a> +<span class="sourceLineNo">113</span> /**<a name="line.113"></a> +<span class="sourceLineNo">114</span> * Default constructor.<a name="line.114"></a> +<span class="sourceLineNo">115</span> */<a name="line.115"></a> +<span class="sourceLineNo">116</span> public QCodec() {<a name="line.116"></a> +<span class="sourceLineNo">117</span> this(StandardCharsets.UTF_8);<a name="line.117"></a> +<span class="sourceLineNo">118</span> }<a name="line.118"></a> +<span class="sourceLineNo">119</span><a name="line.119"></a> +<span class="sourceLineNo">120</span> /**<a name="line.120"></a> +<span class="sourceLineNo">121</span> * Constructor which allows for the selection of a default Charset.<a name="line.121"></a> +<span class="sourceLineNo">122</span> *<a name="line.122"></a> +<span class="sourceLineNo">123</span> * @param charset<a name="line.123"></a> +<span class="sourceLineNo">124</span> * the default string Charset to use.<a name="line.124"></a> +<span class="sourceLineNo">125</span> *<a name="line.125"></a> +<span class="sourceLineNo">126</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.126"></a> +<span class="sourceLineNo">127</span> * @since 1.7<a name="line.127"></a> +<span class="sourceLineNo">128</span> */<a name="line.128"></a> +<span class="sourceLineNo">129</span> public QCodec(final Charset charset) {<a name="line.129"></a> +<span class="sourceLineNo">130</span> super();<a name="line.130"></a> +<span class="sourceLineNo">131</span> this.charset = charset;<a name="line.131"></a> +<span class="sourceLineNo">132</span> }<a name="line.132"></a> +<span class="sourceLineNo">133</span><a name="line.133"></a> +<span class="sourceLineNo">134</span> /**<a name="line.134"></a> +<span class="sourceLineNo">135</span> * Constructor which allows for the selection of a default Charset.<a name="line.135"></a> +<span class="sourceLineNo">136</span> *<a name="line.136"></a> +<span class="sourceLineNo">137</span> * @param charsetName<a name="line.137"></a> +<span class="sourceLineNo">138</span> * the Charset to use.<a name="line.138"></a> +<span class="sourceLineNo">139</span> * @throws java.nio.charset.UnsupportedCharsetException<a name="line.139"></a> +<span class="sourceLineNo">140</span> * If the named Charset is unavailable<a name="line.140"></a> +<span class="sourceLineNo">141</span> * @since 1.7 throws UnsupportedCharsetException if the named Charset is unavailable<a name="line.141"></a> +<span class="sourceLineNo">142</span> * @see <a href="http://download.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">Standard charsets</a><a name="line.142"></a> +<span class="sourceLineNo">143</span> */<a name="line.143"></a> +<span class="sourceLineNo">144</span> public QCodec(final String charsetName) {<a name="line.144"></a> +<span class="sourceLineNo">145</span> this(Charset.forName(charsetName));<a name="line.145"></a> +<span class="sourceLineNo">146</span> }<a name="line.146"></a> +<span class="sourceLineNo">147</span><a name="line.147"></a> +<span class="sourceLineNo">148</span> @Override<a name="line.148"></a> +<span class="sourceLineNo">149</span> protected String getEncoding() {<a name="line.149"></a> +<span class="sourceLineNo">150</span> return "Q";<a name="line.150"></a> +<span class="sourceLineNo">151</span> }<a name="line.151"></a> +<span class="sourceLineNo">152</span><a name="line.152"></a> +<span class="sourceLineNo">153</span> @Override<a name="line.153"></a> +<span class="sourceLineNo">154</span> protected byte[] doEncoding(final byte[] bytes) {<a name="line.154"></a> +<span class="sourceLineNo">155</span> if (bytes == null) {<a name="line.155"></a> +<span class="sourceLineNo">156</span> return null;<a name="line.156"></a> +<span class="sourceLineNo">157</span> }<a name="line.157"></a> +<span class="sourceLineNo">158</span> final byte[] data = QuotedPrintableCodec.encodeQuotedPrintable(PRINTABLE_CHARS, bytes);<a name="line.158"></a> +<span class="sourceLineNo">159</span> if (this.encodeBlanks) {<a name="line.159"></a> +<span class="sourceLineNo">160</span> for (int i = 0; i < data.length; i++) {<a name="line.160"></a> +<span class="sourceLineNo">161</span> if (data[i] == SPACE) {<a name="line.161"></a> +<span class="sourceLineNo">162</span> data[i] = UNDERSCORE;<a name="line.162"></a> +<span class="sourceLineNo">163</span> }<a name="line.163"></a> +<span class="sourceLineNo">164</span> }<a name="line.164"></a> +<span class="sourceLineNo">165</span> }<a name="line.165"></a> +<span class="sourceLineNo">166</span> return data;<a name="line.166"></a> +<span class="sourceLineNo">167</span> }<a name="line.167"></a> +<span class="sourceLineNo">168</span><a name="line.168"></a> +<span class="sourceLineNo">169</span> @Override<a name="line.169"></a> +<span class="sourceLineNo">170</span> protected byte[] doDecoding(final byte[] bytes) throws DecoderException {<a name="line.170"></a> +<span class="sourceLineNo">171</span> if (bytes == null) {<a name="line.171"></a> +<span class="sourceLineNo">172</span> return null;<a name="line.172"></a> +<span class="sourceLineNo">173</span> }<a name="line.173"></a> +<span class="sourceLineNo">174</span> boolean hasUnderscores = false;<a name="line.174"></a> +<span class="sourceLineNo">175</span> for (final byte b : bytes) {<a name="line.175"></a> +<span class="sourceLineNo">176</span> if (b == UNDERSCORE) {<a name="line.176"></a> +<span class="sourceLineNo">177</span> hasUnderscores = true;<a name="line.177"></a> +<span class="sourceLineNo">178</span> break;<a name="line.178"></a> +<span class="sourceLineNo">179</span> }<a name="line.179"></a> +<span class="sourceLineNo">180</span> }<a name="line.180"></a> +<span class="sourceLineNo">181</span> if (hasUnderscores) {<a name="line.181"></a> +<span class="sourceLineNo">182</span> final byte[] tmp = new byte[bytes.length];<a name="line.182"></a> +<span class="sourceLineNo">183</span> for (int i = 0; i < bytes.length; i++) {<a name="line.183"></a> +<span class="sourceLineNo">184</span> final byte b = bytes[i];<a name="line.184"></a> +<span class="sourceLineNo">185</span> if (b != UNDERSCORE) {<a name="line.185"></a> +<span class="sourceLineNo">186</span> tmp[i] = b;<a name="line.186"></a> +<span class="sourceLineNo">187</span> } else {<a name="line.187"></a> +<span class="sourceLineNo">188</span> tmp[i] = SPACE;<a name="line.188"></a> +<span class="sourceLineNo">189</span> }<a name="line.189"></a> +<span class="sourceLineNo">190</span> }<a name="line.190"></a> +<span class="sourceLineNo">191</span> return QuotedPrintableCodec.decodeQuotedPrintable(tmp);<a name="line.191"></a> +<span class="sourceLineNo">192</span> }<a name="line.192"></a> +<span class="sourceLineNo">193</span> return QuotedPrintableCodec.decodeQuotedPrintable(bytes);<a name="line.193"></a> +<span class="sourceLineNo">194</span> }<a name="line.194"></a> +<span class="sourceLineNo">195</span><a name="line.195"></a> +<span class="sourceLineNo">196</span> /**<a name="line.196"></a> +<span class="sourceLineNo">197</span> * Encodes a string into its quoted-printable form using the specified Charset. Unsafe characters are escaped.<a name="line.197"></a> +<span class="sourceLineNo">198</span> *<a name="line.198"></a> +<span class="sourceLineNo">199</span> * @param sourceStr<a name="line.199"></a> +<span class="sourceLineNo">200</span> * string to convert to quoted-printable form<a name="line.200"></a> +<span class="sourceLineNo">201</span> * @param sourceCharset<a name="line.201"></a> +<span class="sourceLineNo">202</span> * the Charset for sourceStr<a name="line.202"></a> +<span class="sourceLineNo">203</span> * @return quoted-printable string<a name="line.203"></a> +<span class="sourceLineNo">204</span> * @throws EncoderException<a name="line.204"></a> +<span class="sourceLineNo">205</span> * thrown if a failure condition is encountered during the encoding process.<a name="line.205"></a> +<span class="sourceLineNo">206</span> * @since 1.7<a name="line.206"></a> +<span class="sourceLineNo">207</span> */<a name="line.207"></a> +<span class="sourceLineNo">208</span> public String encode(final String sourceStr, final Charset sourceCharset) throws EncoderException {<a name="line.208"></a> +<span class="sourceLineNo">209</span> if (sourceStr == null) {<a name="line.209"></a> +<span class="sourceLineNo">210</span> return null;<a name="line.210"></a> +<span class="sourceLineNo">211</span> }<a name="line.211"></a> +<span class="sourceLineNo">212</span> return encodeText(sourceStr, sourceCharset);<a name="line.212"></a> +<span class="sourceLineNo">213</span> }<a name="line.213"></a> +<span class="sourceLineNo">214</span><a name="line.214"></a> +<span class="sourceLineNo">215</span> /**<a name="line.215"></a> +<span class="sourceLineNo">216</span> * Encodes a string into its quoted-printable form using the specified Charset. Unsafe characters are escaped.<a name="line.216"></a> +<span class="sourceLineNo">217</span> *<a name="line.217"></a> +<span class="sourceLineNo">218</span> * @param sourceStr<a name="line.218"></a> +<span class="sourceLineNo">219</span> * string to convert to quoted-printable form<a name="line.219"></a> +<span class="sourceLineNo">220</span> * @param sourceCharset<a name="line.220"></a> +<span class="sourceLineNo">221</span> * the Charset for sourceStr<a name="line.221"></a> +<span class="sourceLineNo">222</span> * @return quoted-printable string<a name="line.222"></a> +<span class="sourceLineNo">223</span> * @throws EncoderException<a name="line.223"></a> +<span class="sourceLineNo">224</span> * thrown if a failure condition is encountered during the encoding process.<a name="line.224"></a> +<span class="sourceLineNo">225</span> */<a name="line.225"></a> +<span class="sourceLineNo">226</span> public String encode(final String sourceStr, final String sourceCharset) throws EncoderException {<a name="line.226"></a> +<span class="sourceLineNo">227</span> if (sourceStr == null) {<a name="line.227"></a> +<span class="sourceLineNo">228</span> return null;<a name="line.228"></a> +<span class="sourceLineNo">229</span> }<a name="line.229"></a> +<span class="sourceLineNo">230</span> try {<a name="line.230"></a> +<span class="sourceLineNo">231</span> return encodeText(sourceStr, sourceCharset);<a name="line.231"></a> +<span class="sourceLineNo">232</span> } catch (final UnsupportedEncodingException e) {<a name="line.232"></a> +<span class="sourceLineNo">233</span> throw new EncoderException(e.getMessage(), e);<a name="line.233"></a> +<span class="sourceLineNo">234</span> }<a name="line.234"></a> +<span class="sourceLineNo">235</span> }<a name="line.235"></a> +<span class="sourceLineNo">236</span><a name="line.236"></a> +<span class="sourceLineNo">237</span> /**<a name="line.237"></a> +<span class="sourceLineNo">238</span> * Encodes a string into its quoted-printable form using the default Charset. Unsafe characters are escaped.<a name="line.238"></a> +<span class="sourceLineNo">239</span> *<a name="line.239"></a> +<span class="sourceLineNo">240</span> * @param sourceStr<a name="line.240"></a> +<span class="sourceLineNo">241</span> * string to convert to quoted-printable form<a name="line.241"></a> +<span class="sourceLineNo">242</span> * @return quoted-printable string<a name="line.242"></a> +<span class="sourceLineNo">243</span> * @throws EncoderException<a name="line.243"></a> +<span class="sourceLineNo">244</span> * thrown if a failure condition is encountered during the encoding process.<a name="line.244"></a> +<span class="sourceLineNo">245</span> */<a name="line.245"></a> +<span class="sourceLineNo">246</span> @Override<a name="line.246"></a> +<span class="sourceLineNo">247</span> public String encode(final String sourceStr) throws EncoderException {<a name="line.247"></a> +<span class="sourceLineNo">248</span> if (sourceStr == null) {<a name="line.248"></a> +<span class="sourceLineNo">249</span> return null;<a name="line.249"></a> +<span class="sourceLineNo">250</span> }<a name="line.250"></a> +<span class="sourceLineNo">251</span> return encode(sourceStr, getCharset());<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span><a name="line.253"></a> +<span class="sourceLineNo">254</span> /**<a name="line.254"></a> +<span class="sourceLineNo">255</span> * Decodes a quoted-printable string into its original form. Escaped characters are converted back to their original<a name="line.255"></a> +<span class="sourceLineNo">256</span> * representation.<a name="line.256"></a> +<span class="sourceLineNo">257</span> *<a name="line.257"></a> +<span class="sourceLineNo">258</span> * @param str<a name="line.258"></a> +<span class="sourceLineNo">259</span> * quoted-printable string to convert into its original form<a name="line.259"></a> +<span class="sourceLineNo">260</span> * @return original string<a name="line.260"></a> +<span class="sourceLineNo">261</span> * @throws DecoderException<a name="line.261"></a> +<span class="sourceLineNo">262</span> * A decoder exception is thrown if a failure condition is encountered during the decode process.<a name="line.262"></a> +<span class="sourceLineNo">263</span> */<a name="line.263"></a> +<span class="sourceLineNo">264</span> @Override<a name="line.264"></a> +<span class="sourceLineNo">265</span> public String decode(final String str) throws DecoderException {<a name="line.265"></a> +<span class="sourceLineNo">266</span> if (str == null) {<a name="line.266"></a> +<span class="sourceLineNo">267</span> return null;<a name="line.267"></a> +<span class="sourceLineNo">268</span> }<a name="line.268"></a> +<span class="sourceLineNo">269</span> try {<a name="line.269"></a> +<span class="sourceLineNo">270</span> return decodeText(str);<a name="line.270"></a> +<span class="sourceLineNo">271</span> } catch (final UnsupportedEncodingException e) {<a name="line.271"></a> +<span class="sourceLineNo">272</span> throw new DecoderException(e.getMessage(), e);<a name="line.272"></a> +<span class="sourceLineNo">273</span> }<a name="line.273"></a> +<span class="sourceLineNo">274</span> }<a name="line.274"></a> +<span class="sourceLineNo">275</span><a name="line.275"></a> +<span class="sourceLineNo">276</span> /**<a name="line.276"></a> +<span class="sourceLineNo">277</span> * Encodes an object into its quoted-printable form using the default Charset. Unsafe characters are escaped.<a name="line.277"></a> +<span class="sourceLineNo">278</span> *<a name="line.278"></a> +<span class="sourceLineNo">279</span> * @param obj<a name="line.279"></a> +<span class="sourceLineNo">280</span> * object to convert to quoted-printable form<a name="line.280"></a> +<span class="sourceLineNo">281</span> * @return quoted-printable object<a name="line.281"></a> +<span class="sourceLineNo">282</span> * @throws EncoderException<a name="line.282"></a> +<span class="sourceLineNo">283</span> * thrown if a failure condition is encountered during the encoding process.<a name="line.283"></a> +<span class="sourceLineNo">284</span> */<a name="line.284"></a> +<span class="sourceLineNo">285</span> @Override<a name="line.285"></a> +<span class="sourceLineNo">286</span> public Object encode(final Object obj) throws EncoderException {<a name="line.286"></a> +<span class="sourceLineNo">287</span> if (obj == null) {<a name="line.287"></a> +<span class="sourceLineNo">288</span> return null;<a name="line.288"></a> +<span class="sourceLineNo">289</span> } else if (obj instanceof String) {<a name="line.289"></a> +<span class="sourceLineNo">290</span> return encode((String) obj);<a name="line.290"></a> +<span class="sourceLineNo">291</span> } else {<a name="line.291"></a> +<span class="sourceLineNo">292</span> throw new EncoderException("Objects of type " +<a name="line.292"></a> +<span class="sourceLineNo">293</span> obj.getClass().getName() +<a name="line.293"></a> +<span class="sourceLineNo">294</span> " cannot be encoded using Q codec");<a name="line.294"></a> +<span class="sourceLineNo">295</span> }<a name="line.295"></a> +<span class="sourceLineNo">296</span> }<a name="line.296"></a> +<span class="sourceLineNo">297</span><a name="line.297"></a> +<span class="sourceLineNo">298</span> /**<a name="line.298"></a> +<span class="sourceLineNo">299</span> * Decodes a quoted-printable object into its original form. Escaped characters are converted back to their original<a name="line.299"></a> +<span class="sourceLineNo">300</span> * representation.<a name="line.300"></a> +<span class="sourceLineNo">301</span> *<a name="line.301"></a> +<span class="sourceLineNo">302</span> * @param obj<a name="line.302"></a> +<span class="sourceLineNo">303</span> * quoted-printable object to convert into its original form<a name="line.303"></a> +<span class="sourceLineNo">304</span> * @return original object<a name="line.304"></a> +<span class="sourceLineNo">305</span> * @throws DecoderException<a name="line.305"></a> +<span class="sourceLineNo">306</span> * Thrown if the argument is not a {@code String}. Thrown if a failure condition is encountered<a name="line.306"></a> +<span class="sourceLineNo">307</span> * during the decode process.<a name="line.307"></a> +<span class="sourceLineNo">308</span> */<a name="line.308"></a> +<span class="sourceLineNo">309</span> @Override<a name="line.309"></a> +<span class="sourceLineNo">310</span> public Object decode(final Object obj) throws DecoderException {<a name="line.310"></a> +<span class="sourceLineNo">311</span> if (obj == null) {<a name="line.311"></a> +<span class="sourceLineNo">312</span> return null;<a name="line.312"></a> +<span class="sourceLineNo">313</span> } else if (obj instanceof String) {<a name="line.313"></a> +<span class="sourceLineNo">314</span> return decode((String) obj);<a name="line.314"></a> +<span class="sourceLineNo">315</span> } else {<a name="line.315"></a> +<span class="sourceLineNo">316</span> throw new DecoderException("Objects of type " +<a name="line.316"></a> +<span class="sourceLineNo">317</span> obj.getClass().getName() +<a name="line.317"></a> +<span class="sourceLineNo">318</span> " cannot be decoded using Q codec");<a name="line.318"></a> +<span class="sourceLineNo">319</span> }<a name="line.319"></a> +<span class="sourceLineNo">320</span> }<a name="line.320"></a> +<span class="sourceLineNo">321</span><a name="line.321"></a> +<span class="sourceLineNo">322</span> /**<a name="line.322"></a> +<span class="sourceLineNo">323</span> * Gets the default Charset name used for string decoding and encoding.<a name="line.323"></a> +<span class="sourceLineNo">324</span> *<a name="line.324"></a> +<span class="sourceLineNo">325</span> * @return the default Charset name<a name="line.325"></a> +<span class="sourceLineNo">326</span> * @since 1.7<a name="line.326"></a> +<span class="sourceLineNo">327</span> */<a name="line.327"></a> +<span class="sourceLineNo">328</span> public Charset getCharset() {<a name="line.328"></a> +<span class="sourceLineNo">329</span> return this.charset;<a name="line.329"></a> +<span class="sourceLineNo">330</span> }<a name="line.330"></a> +<span class="sourceLineNo">331</span><a name="line.331"></a> +<span class="sourceLineNo">332</span> /**<a name="line.332"></a> +<span class="sourceLineNo">333</span> * Gets the default Charset name used for string decoding and encoding.<a name="line.333"></a> +<span class="sourceLineNo">334</span> *<a name="line.334"></a> +<span class="sourceLineNo">335</span> * @return the default Charset name<a name="line.335"></a> +<span class="sourceLineNo">336</span> */<a name="line.336"></a> +<span class="sourceLineNo">337</span> public String getDefaultCharset() {<a name="line.337"></a> +<span class="sourceLineNo">338</span> return this.charset.name();<a name="line.338"></a> +<span class="sourceLineNo">339</span> }<a name="line.339"></a> +<span class="sourceLineNo">340</span><a name="line.340"></a> +<span class="sourceLineNo">341</span> /**<a name="line.341"></a> +<span class="sourceLineNo">342</span> * Tests if optional transformation of SPACE characters is to be used<a name="line.342"></a> +<span class="sourceLineNo">343</span> *<a name="line.343"></a> +<span class="sourceLineNo">344</span> * @return {@code true} if SPACE characters are to be transformed, {@code false} otherwise<a name="line.344"></a> +<span class="sourceLineNo">345</span> */<a name="line.345"></a> +<span class="sourceLineNo">346</span> public boolean isEncodeBlanks() {<a name="line.346"></a> +<span class="sourceLineNo">347</span> return this.encodeBlanks;<a name="line.347"></a> +<span class="sourceLineNo">348</span> }<a name="line.348"></a> +<span class="sourceLineNo">349</span><a name="line.349"></a> +<span class="sourceLineNo">350</span> /**<a name="line.350"></a> +<span class="sourceLineNo">351</span> * Defines whether optional transformation of SPACE characters is to be used<a name="line.351"></a> +<span class="sourceLineNo">352</span> *<a name="line.352"></a> +<span class="sourceLineNo">353</span> * @param b<a name="line.353"></a> +<span class="sourceLineNo">354</span> * {@code true} if SPACE characters are to be transformed, {@code false} otherwise<a name="line.354"></a> +<span class="sourceLineNo">355</span> */<a name="line.355"></a> +<span class="sourceLineNo">356</span> public void setEncodeBlanks(final boolean b) {<a name="line.356"></a> +<span class="sourceLineNo">357</span> this.encodeBlanks = b;<a name="line.357"></a> +<span class="sourceLineNo">358</span> }<a name="line.358"></a> +<span class="sourceLineNo">359</span>}<a name="line.359"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/QuotedPrintableCodec.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/QuotedPrintableCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..c5ea49e39d05015a3afeed44076b237681145679 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/QuotedPrintableCodec.html @@ -0,0 +1,679 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.net;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.ByteArrayOutputStream;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.io.UnsupportedEncodingException;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.nio.charset.Charset;<a name="line.22"></a> +<span class="sourceLineNo">023</span>import java.nio.charset.IllegalCharsetNameException;<a name="line.23"></a> +<span class="sourceLineNo">024</span>import java.nio.charset.StandardCharsets;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import java.nio.charset.UnsupportedCharsetException;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import java.util.BitSet;<a name="line.26"></a> +<span class="sourceLineNo">027</span><a name="line.27"></a> +<span class="sourceLineNo">028</span>import org.apache.commons.codec.BinaryDecoder;<a name="line.28"></a> +<span class="sourceLineNo">029</span>import org.apache.commons.codec.BinaryEncoder;<a name="line.29"></a> +<span class="sourceLineNo">030</span>import org.apache.commons.codec.DecoderException;<a name="line.30"></a> +<span class="sourceLineNo">031</span>import org.apache.commons.codec.EncoderException;<a name="line.31"></a> +<span class="sourceLineNo">032</span>import org.apache.commons.codec.StringDecoder;<a name="line.32"></a> +<span class="sourceLineNo">033</span>import org.apache.commons.codec.StringEncoder;<a name="line.33"></a> +<span class="sourceLineNo">034</span>import org.apache.commons.codec.binary.StringUtils;<a name="line.34"></a> +<span class="sourceLineNo">035</span><a name="line.35"></a> +<span class="sourceLineNo">036</span>/**<a name="line.36"></a> +<span class="sourceLineNo">037</span> * Codec for the Quoted-Printable section of <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>.<a name="line.37"></a> +<span class="sourceLineNo">038</span> * <p><a name="line.38"></a> +<span class="sourceLineNo">039</span> * The Quoted-Printable encoding is intended to represent data that largely consists of octets that correspond to<a name="line.39"></a> +<span class="sourceLineNo">040</span> * printable characters in the ASCII character set. It encodes the data in such a way that the resulting octets are<a name="line.40"></a> +<span class="sourceLineNo">041</span> * unlikely to be modified by mail transport. If the data being encoded are mostly ASCII text, the encoded form of the<a name="line.41"></a> +<span class="sourceLineNo">042</span> * data remains largely recognizable by humans. A body which is entirely ASCII may also be encoded in Quoted-Printable<a name="line.42"></a> +<span class="sourceLineNo">043</span> * to ensure the integrity of the data should the message pass through a character- translating, and/or line-wrapping<a name="line.43"></a> +<span class="sourceLineNo">044</span> * gateway.<a name="line.44"></a> +<span class="sourceLineNo">045</span> * </p><a name="line.45"></a> +<span class="sourceLineNo">046</span> * <p><a name="line.46"></a> +<span class="sourceLineNo">047</span> * Note:<a name="line.47"></a> +<span class="sourceLineNo">048</span> * </p><a name="line.48"></a> +<span class="sourceLineNo">049</span> * <p><a name="line.49"></a> +<span class="sourceLineNo">050</span> * Depending on the selected {@code strict} parameter, this class will implement a different set of rules of the<a name="line.50"></a> +<span class="sourceLineNo">051</span> * quoted-printable spec:<a name="line.51"></a> +<span class="sourceLineNo">052</span> * </p><a name="line.52"></a> +<span class="sourceLineNo">053</span> * <ul><a name="line.53"></a> +<span class="sourceLineNo">054</span> * <li>{@code strict=false}: only rules #1 and #2 are implemented</li><a name="line.54"></a> +<span class="sourceLineNo">055</span> * <li>{@code strict=true}: all rules #1 through #5 are implemented</li><a name="line.55"></a> +<span class="sourceLineNo">056</span> * </ul><a name="line.56"></a> +<span class="sourceLineNo">057</span> * <p><a name="line.57"></a> +<span class="sourceLineNo">058</span> * Originally, this class only supported the non-strict mode, but the codec in this partial form could already be used<a name="line.58"></a> +<span class="sourceLineNo">059</span> * for certain applications that do not require quoted-printable line formatting (rules #3, #4, #5), for instance<a name="line.59"></a> +<span class="sourceLineNo">060</span> * Q codec. The strict mode has been added in 1.10.<a name="line.60"></a> +<span class="sourceLineNo">061</span> * </p><a name="line.61"></a> +<span class="sourceLineNo">062</span> * <p><a name="line.62"></a> +<span class="sourceLineNo">063</span> * This class is immutable and thread-safe.<a name="line.63"></a> +<span class="sourceLineNo">064</span> * </p><a name="line.64"></a> +<span class="sourceLineNo">065</span> *<a name="line.65"></a> +<span class="sourceLineNo">066</span> * @see <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521 MIME (Multipurpose Internet Mail Extensions) Part One:<a name="line.66"></a> +<span class="sourceLineNo">067</span> * Mechanisms for Specifying and Describing the Format of Internet Message Bodies </a><a name="line.67"></a> +<span class="sourceLineNo">068</span> *<a name="line.68"></a> +<span class="sourceLineNo">069</span> * @since 1.3<a name="line.69"></a> +<span class="sourceLineNo">070</span> */<a name="line.70"></a> +<span class="sourceLineNo">071</span>public class QuotedPrintableCodec implements BinaryEncoder, BinaryDecoder, StringEncoder, StringDecoder {<a name="line.71"></a> +<span class="sourceLineNo">072</span> /**<a name="line.72"></a> +<span class="sourceLineNo">073</span> * The default Charset used for string decoding and encoding.<a name="line.73"></a> +<span class="sourceLineNo">074</span> */<a name="line.74"></a> +<span class="sourceLineNo">075</span> private final Charset charset;<a name="line.75"></a> +<span class="sourceLineNo">076</span><a name="line.76"></a> +<span class="sourceLineNo">077</span> /**<a name="line.77"></a> +<span class="sourceLineNo">078</span> * Indicates whether soft line breaks shall be used during encoding (rule #3-5).<a name="line.78"></a> +<span class="sourceLineNo">079</span> */<a name="line.79"></a> +<span class="sourceLineNo">080</span> private final boolean strict;<a name="line.80"></a> +<span class="sourceLineNo">081</span><a name="line.81"></a> +<span class="sourceLineNo">082</span> /**<a name="line.82"></a> +<span class="sourceLineNo">083</span> * BitSet of printable characters as defined in RFC 1521.<a name="line.83"></a> +<span class="sourceLineNo">084</span> */<a name="line.84"></a> +<span class="sourceLineNo">085</span> private static final BitSet PRINTABLE_CHARS = new BitSet(256);<a name="line.85"></a> +<span class="sourceLineNo">086</span><a name="line.86"></a> +<span class="sourceLineNo">087</span> private static final byte ESCAPE_CHAR = '=';<a name="line.87"></a> +<span class="sourceLineNo">088</span><a name="line.88"></a> +<span class="sourceLineNo">089</span> private static final byte TAB = 9;<a name="line.89"></a> +<span class="sourceLineNo">090</span><a name="line.90"></a> +<span class="sourceLineNo">091</span> private static final byte SPACE = 32;<a name="line.91"></a> +<span class="sourceLineNo">092</span><a name="line.92"></a> +<span class="sourceLineNo">093</span> private static final byte CR = 13;<a name="line.93"></a> +<span class="sourceLineNo">094</span><a name="line.94"></a> +<span class="sourceLineNo">095</span> private static final byte LF = 10;<a name="line.95"></a> +<span class="sourceLineNo">096</span><a name="line.96"></a> +<span class="sourceLineNo">097</span> /**<a name="line.97"></a> +<span class="sourceLineNo">098</span> * Safe line length for quoted printable encoded text.<a name="line.98"></a> +<span class="sourceLineNo">099</span> */<a name="line.99"></a> +<span class="sourceLineNo">100</span> private static final int SAFE_LENGTH = 73;<a name="line.100"></a> +<span class="sourceLineNo">101</span><a name="line.101"></a> +<span class="sourceLineNo">102</span> // Static initializer for printable chars collection<a name="line.102"></a> +<span class="sourceLineNo">103</span> static {<a name="line.103"></a> +<span class="sourceLineNo">104</span> // alpha characters<a name="line.104"></a> +<span class="sourceLineNo">105</span> for (int i = 33; i <= 60; i++) {<a name="line.105"></a> +<span class="sourceLineNo">106</span> PRINTABLE_CHARS.set(i);<a name="line.106"></a> +<span class="sourceLineNo">107</span> }<a name="line.107"></a> +<span class="sourceLineNo">108</span> for (int i = 62; i <= 126; i++) {<a name="line.108"></a> +<span class="sourceLineNo">109</span> PRINTABLE_CHARS.set(i);<a name="line.109"></a> +<span class="sourceLineNo">110</span> }<a name="line.110"></a> +<span class="sourceLineNo">111</span> PRINTABLE_CHARS.set(TAB);<a name="line.111"></a> +<span class="sourceLineNo">112</span> PRINTABLE_CHARS.set(SPACE);<a name="line.112"></a> +<span class="sourceLineNo">113</span> }<a name="line.113"></a> +<span class="sourceLineNo">114</span><a name="line.114"></a> +<span class="sourceLineNo">115</span> /**<a name="line.115"></a> +<span class="sourceLineNo">116</span> * Default constructor, assumes default Charset of {@link StandardCharsets#UTF_8}<a name="line.116"></a> +<span class="sourceLineNo">117</span> */<a name="line.117"></a> +<span class="sourceLineNo">118</span> public QuotedPrintableCodec() {<a name="line.118"></a> +<span class="sourceLineNo">119</span> this(StandardCharsets.UTF_8, false);<a name="line.119"></a> +<span class="sourceLineNo">120</span> }<a name="line.120"></a> +<span class="sourceLineNo">121</span><a name="line.121"></a> +<span class="sourceLineNo">122</span> /**<a name="line.122"></a> +<span class="sourceLineNo">123</span> * Constructor which allows for the selection of the strict mode.<a name="line.123"></a> +<span class="sourceLineNo">124</span> *<a name="line.124"></a> +<span class="sourceLineNo">125</span> * @param strict<a name="line.125"></a> +<span class="sourceLineNo">126</span> * if {@code true}, soft line breaks will be used<a name="line.126"></a> +<span class="sourceLineNo">127</span> * @since 1.10<a name="line.127"></a> +<span class="sourceLineNo">128</span> */<a name="line.128"></a> +<span class="sourceLineNo">129</span> public QuotedPrintableCodec(final boolean strict) {<a name="line.129"></a> +<span class="sourceLineNo">130</span> this(StandardCharsets.UTF_8, strict);<a name="line.130"></a> +<span class="sourceLineNo">131</span> }<a name="line.131"></a> +<span class="sourceLineNo">132</span><a name="line.132"></a> +<span class="sourceLineNo">133</span> /**<a name="line.133"></a> +<span class="sourceLineNo">134</span> * Constructor which allows for the selection of a default Charset.<a name="line.134"></a> +<span class="sourceLineNo">135</span> *<a name="line.135"></a> +<span class="sourceLineNo">136</span> * @param charset<a name="line.136"></a> +<span class="sourceLineNo">137</span> * the default string Charset to use.<a name="line.137"></a> +<span class="sourceLineNo">138</span> * @since 1.7<a name="line.138"></a> +<span class="sourceLineNo">139</span> */<a name="line.139"></a> +<span class="sourceLineNo">140</span> public QuotedPrintableCodec(final Charset charset) {<a name="line.140"></a> +<span class="sourceLineNo">141</span> this(charset, false);<a name="line.141"></a> +<span class="sourceLineNo">142</span> }<a name="line.142"></a> +<span class="sourceLineNo">143</span><a name="line.143"></a> +<span class="sourceLineNo">144</span> /**<a name="line.144"></a> +<span class="sourceLineNo">145</span> * Constructor which allows for the selection of a default Charset and strict mode.<a name="line.145"></a> +<span class="sourceLineNo">146</span> *<a name="line.146"></a> +<span class="sourceLineNo">147</span> * @param charset<a name="line.147"></a> +<span class="sourceLineNo">148</span> * the default string Charset to use.<a name="line.148"></a> +<span class="sourceLineNo">149</span> * @param strict<a name="line.149"></a> +<span class="sourceLineNo">150</span> * if {@code true}, soft line breaks will be used<a name="line.150"></a> +<span class="sourceLineNo">151</span> * @since 1.10<a name="line.151"></a> +<span class="sourceLineNo">152</span> */<a name="line.152"></a> +<span class="sourceLineNo">153</span> public QuotedPrintableCodec(final Charset charset, final boolean strict) {<a name="line.153"></a> +<span class="sourceLineNo">154</span> this.charset = charset;<a name="line.154"></a> +<span class="sourceLineNo">155</span> this.strict = strict;<a name="line.155"></a> +<span class="sourceLineNo">156</span> }<a name="line.156"></a> +<span class="sourceLineNo">157</span><a name="line.157"></a> +<span class="sourceLineNo">158</span> /**<a name="line.158"></a> +<span class="sourceLineNo">159</span> * Constructor which allows for the selection of a default Charset.<a name="line.159"></a> +<span class="sourceLineNo">160</span> *<a name="line.160"></a> +<span class="sourceLineNo">161</span> * @param charsetName<a name="line.161"></a> +<span class="sourceLineNo">162</span> * the default string Charset to use.<a name="line.162"></a> +<span class="sourceLineNo">163</span> * @throws UnsupportedCharsetException<a name="line.163"></a> +<span class="sourceLineNo">164</span> * If no support for the named Charset is available<a name="line.164"></a> +<span class="sourceLineNo">165</span> * in this instance of the Java virtual machine<a name="line.165"></a> +<span class="sourceLineNo">166</span> * @throws IllegalArgumentException<a name="line.166"></a> +<span class="sourceLineNo">167</span> * If the given charsetName is null<a name="line.167"></a> +<span class="sourceLineNo">168</span> * @throws IllegalCharsetNameException<a name="line.168"></a> +<span class="sourceLineNo">169</span> * If the given Charset name is illegal<a name="line.169"></a> +<span class="sourceLineNo">170</span> *<a name="line.170"></a> +<span class="sourceLineNo">171</span> * @since 1.7 throws UnsupportedCharsetException if the named Charset is unavailable<a name="line.171"></a> +<span class="sourceLineNo">172</span> */<a name="line.172"></a> +<span class="sourceLineNo">173</span> public QuotedPrintableCodec(final String charsetName)<a name="line.173"></a> +<span class="sourceLineNo">174</span> throws IllegalCharsetNameException, IllegalArgumentException, UnsupportedCharsetException {<a name="line.174"></a> +<span class="sourceLineNo">175</span> this(Charset.forName(charsetName), false);<a name="line.175"></a> +<span class="sourceLineNo">176</span> }<a name="line.176"></a> +<span class="sourceLineNo">177</span><a name="line.177"></a> +<span class="sourceLineNo">178</span> /**<a name="line.178"></a> +<span class="sourceLineNo">179</span> * Encodes byte into its quoted-printable representation.<a name="line.179"></a> +<span class="sourceLineNo">180</span> *<a name="line.180"></a> +<span class="sourceLineNo">181</span> * @param b<a name="line.181"></a> +<span class="sourceLineNo">182</span> * byte to encode<a name="line.182"></a> +<span class="sourceLineNo">183</span> * @param buffer<a name="line.183"></a> +<span class="sourceLineNo">184</span> * the buffer to write to<a name="line.184"></a> +<span class="sourceLineNo">185</span> * @return The number of bytes written to the {@code buffer}<a name="line.185"></a> +<span class="sourceLineNo">186</span> */<a name="line.186"></a> +<span class="sourceLineNo">187</span> private static final int encodeQuotedPrintable(final int b, final ByteArrayOutputStream buffer) {<a name="line.187"></a> +<span class="sourceLineNo">188</span> buffer.write(ESCAPE_CHAR);<a name="line.188"></a> +<span class="sourceLineNo">189</span> final char hex1 = Utils.hexDigit(b >> 4);<a name="line.189"></a> +<span class="sourceLineNo">190</span> final char hex2 = Utils.hexDigit(b);<a name="line.190"></a> +<span class="sourceLineNo">191</span> buffer.write(hex1);<a name="line.191"></a> +<span class="sourceLineNo">192</span> buffer.write(hex2);<a name="line.192"></a> +<span class="sourceLineNo">193</span> return 3;<a name="line.193"></a> +<span class="sourceLineNo">194</span> }<a name="line.194"></a> +<span class="sourceLineNo">195</span><a name="line.195"></a> +<span class="sourceLineNo">196</span> /**<a name="line.196"></a> +<span class="sourceLineNo">197</span> * Return the byte at position {@code index} of the byte array and<a name="line.197"></a> +<span class="sourceLineNo">198</span> * make sure it is unsigned.<a name="line.198"></a> +<span class="sourceLineNo">199</span> *<a name="line.199"></a> +<span class="sourceLineNo">200</span> * @param index<a name="line.200"></a> +<span class="sourceLineNo">201</span> * position in the array<a name="line.201"></a> +<span class="sourceLineNo">202</span> * @param bytes<a name="line.202"></a> +<span class="sourceLineNo">203</span> * the byte array<a name="line.203"></a> +<span class="sourceLineNo">204</span> * @return the unsigned octet at position {@code index} from the array<a name="line.204"></a> +<span class="sourceLineNo">205</span> */<a name="line.205"></a> +<span class="sourceLineNo">206</span> private static int getUnsignedOctet(final int index, final byte[] bytes) {<a name="line.206"></a> +<span class="sourceLineNo">207</span> int b = bytes[index];<a name="line.207"></a> +<span class="sourceLineNo">208</span> if (b < 0) {<a name="line.208"></a> +<span class="sourceLineNo">209</span> b = 256 + b;<a name="line.209"></a> +<span class="sourceLineNo">210</span> }<a name="line.210"></a> +<span class="sourceLineNo">211</span> return b;<a name="line.211"></a> +<span class="sourceLineNo">212</span> }<a name="line.212"></a> +<span class="sourceLineNo">213</span><a name="line.213"></a> +<span class="sourceLineNo">214</span> /**<a name="line.214"></a> +<span class="sourceLineNo">215</span> * Write a byte to the buffer.<a name="line.215"></a> +<span class="sourceLineNo">216</span> *<a name="line.216"></a> +<span class="sourceLineNo">217</span> * @param b<a name="line.217"></a> +<span class="sourceLineNo">218</span> * byte to write<a name="line.218"></a> +<span class="sourceLineNo">219</span> * @param encode<a name="line.219"></a> +<span class="sourceLineNo">220</span> * indicates whether the octet shall be encoded<a name="line.220"></a> +<span class="sourceLineNo">221</span> * @param buffer<a name="line.221"></a> +<span class="sourceLineNo">222</span> * the buffer to write to<a name="line.222"></a> +<span class="sourceLineNo">223</span> * @return the number of bytes that have been written to the buffer<a name="line.223"></a> +<span class="sourceLineNo">224</span> */<a name="line.224"></a> +<span class="sourceLineNo">225</span> private static int encodeByte(final int b, final boolean encode,<a name="line.225"></a> +<span class="sourceLineNo">226</span> final ByteArrayOutputStream buffer) {<a name="line.226"></a> +<span class="sourceLineNo">227</span> if (encode) {<a name="line.227"></a> +<span class="sourceLineNo">228</span> return encodeQuotedPrintable(b, buffer);<a name="line.228"></a> +<span class="sourceLineNo">229</span> }<a name="line.229"></a> +<span class="sourceLineNo">230</span> buffer.write(b);<a name="line.230"></a> +<span class="sourceLineNo">231</span> return 1;<a name="line.231"></a> +<span class="sourceLineNo">232</span> }<a name="line.232"></a> +<span class="sourceLineNo">233</span><a name="line.233"></a> +<span class="sourceLineNo">234</span> /**<a name="line.234"></a> +<span class="sourceLineNo">235</span> * Checks whether the given byte is whitespace.<a name="line.235"></a> +<span class="sourceLineNo">236</span> *<a name="line.236"></a> +<span class="sourceLineNo">237</span> * @param b<a name="line.237"></a> +<span class="sourceLineNo">238</span> * byte to be checked<a name="line.238"></a> +<span class="sourceLineNo">239</span> * @return {@code true} if the byte is either a space or tab character<a name="line.239"></a> +<span class="sourceLineNo">240</span> */<a name="line.240"></a> +<span class="sourceLineNo">241</span> private static boolean isWhitespace(final int b) {<a name="line.241"></a> +<span class="sourceLineNo">242</span> return b == SPACE || b == TAB;<a name="line.242"></a> +<span class="sourceLineNo">243</span> }<a name="line.243"></a> +<span class="sourceLineNo">244</span><a name="line.244"></a> +<span class="sourceLineNo">245</span> /**<a name="line.245"></a> +<span class="sourceLineNo">246</span> * Encodes an array of bytes into an array of quoted-printable 7-bit characters. Unsafe characters are escaped.<a name="line.246"></a> +<span class="sourceLineNo">247</span> * <p><a name="line.247"></a> +<span class="sourceLineNo">248</span> * This function implements a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in<a name="line.248"></a> +<span class="sourceLineNo">249</span> * RFC 1521 and is suitable for encoding binary data and unformatted text.<a name="line.249"></a> +<span class="sourceLineNo">250</span> *<a name="line.250"></a> +<span class="sourceLineNo">251</span> * @param printable<a name="line.251"></a> +<span class="sourceLineNo">252</span> * bitset of characters deemed quoted-printable<a name="line.252"></a> +<span class="sourceLineNo">253</span> * @param bytes<a name="line.253"></a> +<span class="sourceLineNo">254</span> * array of bytes to be encoded<a name="line.254"></a> +<span class="sourceLineNo">255</span> * @return array of bytes containing quoted-printable data<a name="line.255"></a> +<span class="sourceLineNo">256</span> */<a name="line.256"></a> +<span class="sourceLineNo">257</span> public static final byte[] encodeQuotedPrintable(final BitSet printable, final byte[] bytes) {<a name="line.257"></a> +<span class="sourceLineNo">258</span> return encodeQuotedPrintable(printable, bytes, false);<a name="line.258"></a> +<span class="sourceLineNo">259</span> }<a name="line.259"></a> +<span class="sourceLineNo">260</span><a name="line.260"></a> +<span class="sourceLineNo">261</span> /**<a name="line.261"></a> +<span class="sourceLineNo">262</span> * Encodes an array of bytes into an array of quoted-printable 7-bit characters. Unsafe characters are escaped.<a name="line.262"></a> +<span class="sourceLineNo">263</span> * <p><a name="line.263"></a> +<span class="sourceLineNo">264</span> * Depending on the selection of the {@code strict} parameter, this function either implements the full ruleset<a name="line.264"></a> +<span class="sourceLineNo">265</span> * or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in<a name="line.265"></a> +<span class="sourceLineNo">266</span> * RFC 1521 and is suitable for encoding binary data and unformatted text.<a name="line.266"></a> +<span class="sourceLineNo">267</span> *<a name="line.267"></a> +<span class="sourceLineNo">268</span> * @param printable<a name="line.268"></a> +<span class="sourceLineNo">269</span> * bitset of characters deemed quoted-printable<a name="line.269"></a> +<span class="sourceLineNo">270</span> * @param bytes<a name="line.270"></a> +<span class="sourceLineNo">271</span> * array of bytes to be encoded<a name="line.271"></a> +<span class="sourceLineNo">272</span> * @param strict<a name="line.272"></a> +<span class="sourceLineNo">273</span> * if {@code true} the full ruleset is used, otherwise only rule #1 and rule #2<a name="line.273"></a> +<span class="sourceLineNo">274</span> * @return array of bytes containing quoted-printable data<a name="line.274"></a> +<span class="sourceLineNo">275</span> * @since 1.10<a name="line.275"></a> +<span class="sourceLineNo">276</span> */<a name="line.276"></a> +<span class="sourceLineNo">277</span> public static final byte[] encodeQuotedPrintable(BitSet printable, final byte[] bytes, final boolean strict) {<a name="line.277"></a> +<span class="sourceLineNo">278</span> if (bytes == null) {<a name="line.278"></a> +<span class="sourceLineNo">279</span> return null;<a name="line.279"></a> +<span class="sourceLineNo">280</span> }<a name="line.280"></a> +<span class="sourceLineNo">281</span> if (printable == null) {<a name="line.281"></a> +<span class="sourceLineNo">282</span> printable = PRINTABLE_CHARS;<a name="line.282"></a> +<span class="sourceLineNo">283</span> }<a name="line.283"></a> +<span class="sourceLineNo">284</span> final ByteArrayOutputStream buffer = new ByteArrayOutputStream();<a name="line.284"></a> +<span class="sourceLineNo">285</span><a name="line.285"></a> +<span class="sourceLineNo">286</span> if (strict) {<a name="line.286"></a> +<span class="sourceLineNo">287</span> int pos = 1;<a name="line.287"></a> +<span class="sourceLineNo">288</span> // encode up to buffer.length - 3, the last three octets will be treated<a name="line.288"></a> +<span class="sourceLineNo">289</span> // separately for simplification of note #3<a name="line.289"></a> +<span class="sourceLineNo">290</span> for (int i = 0; i < bytes.length - 3; i++) {<a name="line.290"></a> +<span class="sourceLineNo">291</span> final int b = getUnsignedOctet(i, bytes);<a name="line.291"></a> +<span class="sourceLineNo">292</span> if (pos < SAFE_LENGTH) {<a name="line.292"></a> +<span class="sourceLineNo">293</span> // up to this length it is safe to add any byte, encoded or not<a name="line.293"></a> +<span class="sourceLineNo">294</span> pos += encodeByte(b, !printable.get(b), buffer);<a name="line.294"></a> +<span class="sourceLineNo">295</span> } else {<a name="line.295"></a> +<span class="sourceLineNo">296</span> // rule #3: whitespace at the end of a line *must* be encoded<a name="line.296"></a> +<span class="sourceLineNo">297</span> encodeByte(b, !printable.get(b) || isWhitespace(b), buffer);<a name="line.297"></a> +<span class="sourceLineNo">298</span><a name="line.298"></a> +<span class="sourceLineNo">299</span> // rule #5: soft line break<a name="line.299"></a> +<span class="sourceLineNo">300</span> buffer.write(ESCAPE_CHAR);<a name="line.300"></a> +<span class="sourceLineNo">301</span> buffer.write(CR);<a name="line.301"></a> +<span class="sourceLineNo">302</span> buffer.write(LF);<a name="line.302"></a> +<span class="sourceLineNo">303</span> pos = 1;<a name="line.303"></a> +<span class="sourceLineNo">304</span> }<a name="line.304"></a> +<span class="sourceLineNo">305</span> }<a name="line.305"></a> +<span class="sourceLineNo">306</span><a name="line.306"></a> +<span class="sourceLineNo">307</span> // rule #3: whitespace at the end of a line *must* be encoded<a name="line.307"></a> +<span class="sourceLineNo">308</span> // if we would do a soft break line after this octet, encode whitespace<a name="line.308"></a> +<span class="sourceLineNo">309</span> int b = getUnsignedOctet(bytes.length - 3, bytes);<a name="line.309"></a> +<span class="sourceLineNo">310</span> boolean encode = !printable.get(b) || (isWhitespace(b) && pos > SAFE_LENGTH - 5);<a name="line.310"></a> +<span class="sourceLineNo">311</span> pos += encodeByte(b, encode, buffer);<a name="line.311"></a> +<span class="sourceLineNo">312</span><a name="line.312"></a> +<span class="sourceLineNo">313</span> // note #3: '=' *must not* be the ultimate or penultimate character<a name="line.313"></a> +<span class="sourceLineNo">314</span> // simplification: if < 6 bytes left, do a soft line break as we may need<a name="line.314"></a> +<span class="sourceLineNo">315</span> // exactly 6 bytes space for the last 2 bytes<a name="line.315"></a> +<span class="sourceLineNo">316</span> if (pos > SAFE_LENGTH - 2) {<a name="line.316"></a> +<span class="sourceLineNo">317</span> buffer.write(ESCAPE_CHAR);<a name="line.317"></a> +<span class="sourceLineNo">318</span> buffer.write(CR);<a name="line.318"></a> +<span class="sourceLineNo">319</span> buffer.write(LF);<a name="line.319"></a> +<span class="sourceLineNo">320</span> }<a name="line.320"></a> +<span class="sourceLineNo">321</span> for (int i = bytes.length - 2; i < bytes.length; i++) {<a name="line.321"></a> +<span class="sourceLineNo">322</span> b = getUnsignedOctet(i, bytes);<a name="line.322"></a> +<span class="sourceLineNo">323</span> // rule #3: trailing whitespace shall be encoded<a name="line.323"></a> +<span class="sourceLineNo">324</span> encode = !printable.get(b) || (i > bytes.length - 2 && isWhitespace(b));<a name="line.324"></a> +<span class="sourceLineNo">325</span> encodeByte(b, encode, buffer);<a name="line.325"></a> +<span class="sourceLineNo">326</span> }<a name="line.326"></a> +<span class="sourceLineNo">327</span> } else {<a name="line.327"></a> +<span class="sourceLineNo">328</span> for (final byte c : bytes) {<a name="line.328"></a> +<span class="sourceLineNo">329</span> int b = c;<a name="line.329"></a> +<span class="sourceLineNo">330</span> if (b < 0) {<a name="line.330"></a> +<span class="sourceLineNo">331</span> b = 256 + b;<a name="line.331"></a> +<span class="sourceLineNo">332</span> }<a name="line.332"></a> +<span class="sourceLineNo">333</span> if (printable.get(b)) {<a name="line.333"></a> +<span class="sourceLineNo">334</span> buffer.write(b);<a name="line.334"></a> +<span class="sourceLineNo">335</span> } else {<a name="line.335"></a> +<span class="sourceLineNo">336</span> encodeQuotedPrintable(b, buffer);<a name="line.336"></a> +<span class="sourceLineNo">337</span> }<a name="line.337"></a> +<span class="sourceLineNo">338</span> }<a name="line.338"></a> +<span class="sourceLineNo">339</span> }<a name="line.339"></a> +<span class="sourceLineNo">340</span> return buffer.toByteArray();<a name="line.340"></a> +<span class="sourceLineNo">341</span> }<a name="line.341"></a> +<span class="sourceLineNo">342</span><a name="line.342"></a> +<span class="sourceLineNo">343</span> /**<a name="line.343"></a> +<span class="sourceLineNo">344</span> * Decodes an array quoted-printable characters into an array of original bytes. Escaped characters are converted<a name="line.344"></a> +<span class="sourceLineNo">345</span> * back to their original representation.<a name="line.345"></a> +<span class="sourceLineNo">346</span> * <p><a name="line.346"></a> +<span class="sourceLineNo">347</span> * This function fully implements the quoted-printable encoding specification (rule #1 through rule #5) as<a name="line.347"></a> +<span class="sourceLineNo">348</span> * defined in RFC 1521.<a name="line.348"></a> +<span class="sourceLineNo">349</span> *<a name="line.349"></a> +<span class="sourceLineNo">350</span> * @param bytes<a name="line.350"></a> +<span class="sourceLineNo">351</span> * array of quoted-printable characters<a name="line.351"></a> +<span class="sourceLineNo">352</span> * @return array of original bytes<a name="line.352"></a> +<span class="sourceLineNo">353</span> * @throws DecoderException<a name="line.353"></a> +<span class="sourceLineNo">354</span> * Thrown if quoted-printable decoding is unsuccessful<a name="line.354"></a> +<span class="sourceLineNo">355</span> */<a name="line.355"></a> +<span class="sourceLineNo">356</span> public static final byte[] decodeQuotedPrintable(final byte[] bytes) throws DecoderException {<a name="line.356"></a> +<span class="sourceLineNo">357</span> if (bytes == null) {<a name="line.357"></a> +<span class="sourceLineNo">358</span> return null;<a name="line.358"></a> +<span class="sourceLineNo">359</span> }<a name="line.359"></a> +<span class="sourceLineNo">360</span> final ByteArrayOutputStream buffer = new ByteArrayOutputStream();<a name="line.360"></a> +<span class="sourceLineNo">361</span> for (int i = 0; i < bytes.length; i++) {<a name="line.361"></a> +<span class="sourceLineNo">362</span> final int b = bytes[i];<a name="line.362"></a> +<span class="sourceLineNo">363</span> if (b == ESCAPE_CHAR) {<a name="line.363"></a> +<span class="sourceLineNo">364</span> try {<a name="line.364"></a> +<span class="sourceLineNo">365</span> // if the next octet is a CR we have found a soft line break<a name="line.365"></a> +<span class="sourceLineNo">366</span> if (bytes[++i] == CR) {<a name="line.366"></a> +<span class="sourceLineNo">367</span> continue;<a name="line.367"></a> +<span class="sourceLineNo">368</span> }<a name="line.368"></a> +<span class="sourceLineNo">369</span> final int u = Utils.digit16(bytes[i]);<a name="line.369"></a> +<span class="sourceLineNo">370</span> final int l = Utils.digit16(bytes[++i]);<a name="line.370"></a> +<span class="sourceLineNo">371</span> buffer.write((char) ((u << 4) + l));<a name="line.371"></a> +<span class="sourceLineNo">372</span> } catch (final ArrayIndexOutOfBoundsException e) {<a name="line.372"></a> +<span class="sourceLineNo">373</span> throw new DecoderException("Invalid quoted-printable encoding", e);<a name="line.373"></a> +<span class="sourceLineNo">374</span> }<a name="line.374"></a> +<span class="sourceLineNo">375</span> } else if (b != CR && b != LF) {<a name="line.375"></a> +<span class="sourceLineNo">376</span> // every other octet is appended except for CR & LF<a name="line.376"></a> +<span class="sourceLineNo">377</span> buffer.write(b);<a name="line.377"></a> +<span class="sourceLineNo">378</span> }<a name="line.378"></a> +<span class="sourceLineNo">379</span> }<a name="line.379"></a> +<span class="sourceLineNo">380</span> return buffer.toByteArray();<a name="line.380"></a> +<span class="sourceLineNo">381</span> }<a name="line.381"></a> +<span class="sourceLineNo">382</span><a name="line.382"></a> +<span class="sourceLineNo">383</span> /**<a name="line.383"></a> +<span class="sourceLineNo">384</span> * Encodes an array of bytes into an array of quoted-printable 7-bit characters. Unsafe characters are escaped.<a name="line.384"></a> +<span class="sourceLineNo">385</span> * <p><a name="line.385"></a> +<span class="sourceLineNo">386</span> * Depending on the selection of the {@code strict} parameter, this function either implements the full ruleset<a name="line.386"></a> +<span class="sourceLineNo">387</span> * or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in<a name="line.387"></a> +<span class="sourceLineNo">388</span> * RFC 1521 and is suitable for encoding binary data and unformatted text.<a name="line.388"></a> +<span class="sourceLineNo">389</span> *<a name="line.389"></a> +<span class="sourceLineNo">390</span> * @param bytes<a name="line.390"></a> +<span class="sourceLineNo">391</span> * array of bytes to be encoded<a name="line.391"></a> +<span class="sourceLineNo">392</span> * @return array of bytes containing quoted-printable data<a name="line.392"></a> +<span class="sourceLineNo">393</span> */<a name="line.393"></a> +<span class="sourceLineNo">394</span> @Override<a name="line.394"></a> +<span class="sourceLineNo">395</span> public byte[] encode(final byte[] bytes) {<a name="line.395"></a> +<span class="sourceLineNo">396</span> return encodeQuotedPrintable(PRINTABLE_CHARS, bytes, strict);<a name="line.396"></a> +<span class="sourceLineNo">397</span> }<a name="line.397"></a> +<span class="sourceLineNo">398</span><a name="line.398"></a> +<span class="sourceLineNo">399</span> /**<a name="line.399"></a> +<span class="sourceLineNo">400</span> * Decodes an array of quoted-printable characters into an array of original bytes. Escaped characters are converted<a name="line.400"></a> +<span class="sourceLineNo">401</span> * back to their original representation.<a name="line.401"></a> +<span class="sourceLineNo">402</span> * <p><a name="line.402"></a> +<span class="sourceLineNo">403</span> * This function fully implements the quoted-printable encoding specification (rule #1 through rule #5) as<a name="line.403"></a> +<span class="sourceLineNo">404</span> * defined in RFC 1521.<a name="line.404"></a> +<span class="sourceLineNo">405</span> *<a name="line.405"></a> +<span class="sourceLineNo">406</span> * @param bytes<a name="line.406"></a> +<span class="sourceLineNo">407</span> * array of quoted-printable characters<a name="line.407"></a> +<span class="sourceLineNo">408</span> * @return array of original bytes<a name="line.408"></a> +<span class="sourceLineNo">409</span> * @throws DecoderException<a name="line.409"></a> +<span class="sourceLineNo">410</span> * Thrown if quoted-printable decoding is unsuccessful<a name="line.410"></a> +<span class="sourceLineNo">411</span> */<a name="line.411"></a> +<span class="sourceLineNo">412</span> @Override<a name="line.412"></a> +<span class="sourceLineNo">413</span> public byte[] decode(final byte[] bytes) throws DecoderException {<a name="line.413"></a> +<span class="sourceLineNo">414</span> return decodeQuotedPrintable(bytes);<a name="line.414"></a> +<span class="sourceLineNo">415</span> }<a name="line.415"></a> +<span class="sourceLineNo">416</span><a name="line.416"></a> +<span class="sourceLineNo">417</span> /**<a name="line.417"></a> +<span class="sourceLineNo">418</span> * Encodes a string into its quoted-printable form using the default string Charset. Unsafe characters are escaped.<a name="line.418"></a> +<span class="sourceLineNo">419</span> * <p><a name="line.419"></a> +<span class="sourceLineNo">420</span> * Depending on the selection of the {@code strict} parameter, this function either implements the full ruleset<a name="line.420"></a> +<span class="sourceLineNo">421</span> * or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in<a name="line.421"></a> +<span class="sourceLineNo">422</span> * RFC 1521 and is suitable for encoding binary data and unformatted text.<a name="line.422"></a> +<span class="sourceLineNo">423</span> *<a name="line.423"></a> +<span class="sourceLineNo">424</span> * @param sourceStr<a name="line.424"></a> +<span class="sourceLineNo">425</span> * string to convert to quoted-printable form<a name="line.425"></a> +<span class="sourceLineNo">426</span> * @return quoted-printable string<a name="line.426"></a> +<span class="sourceLineNo">427</span> * @throws EncoderException<a name="line.427"></a> +<span class="sourceLineNo">428</span> * Thrown if quoted-printable encoding is unsuccessful<a name="line.428"></a> +<span class="sourceLineNo">429</span> *<a name="line.429"></a> +<span class="sourceLineNo">430</span> * @see #getCharset()<a name="line.430"></a> +<span class="sourceLineNo">431</span> */<a name="line.431"></a> +<span class="sourceLineNo">432</span> @Override<a name="line.432"></a> +<span class="sourceLineNo">433</span> public String encode(final String sourceStr) throws EncoderException {<a name="line.433"></a> +<span class="sourceLineNo">434</span> return this.encode(sourceStr, getCharset());<a name="line.434"></a> +<span class="sourceLineNo">435</span> }<a name="line.435"></a> +<span class="sourceLineNo">436</span><a name="line.436"></a> +<span class="sourceLineNo">437</span> /**<a name="line.437"></a> +<span class="sourceLineNo">438</span> * Decodes a quoted-printable string into its original form using the specified string Charset. Escaped characters<a name="line.438"></a> +<span class="sourceLineNo">439</span> * are converted back to their original representation.<a name="line.439"></a> +<span class="sourceLineNo">440</span> *<a name="line.440"></a> +<span class="sourceLineNo">441</span> * @param sourceStr<a name="line.441"></a> +<span class="sourceLineNo">442</span> * quoted-printable string to convert into its original form<a name="line.442"></a> +<span class="sourceLineNo">443</span> * @param sourceCharset<a name="line.443"></a> +<span class="sourceLineNo">444</span> * the original string Charset<a name="line.444"></a> +<span class="sourceLineNo">445</span> * @return original string<a name="line.445"></a> +<span class="sourceLineNo">446</span> * @throws DecoderException<a name="line.446"></a> +<span class="sourceLineNo">447</span> * Thrown if quoted-printable decoding is unsuccessful<a name="line.447"></a> +<span class="sourceLineNo">448</span> * @since 1.7<a name="line.448"></a> +<span class="sourceLineNo">449</span> */<a name="line.449"></a> +<span class="sourceLineNo">450</span> public String decode(final String sourceStr, final Charset sourceCharset) throws DecoderException {<a name="line.450"></a> +<span class="sourceLineNo">451</span> if (sourceStr == null) {<a name="line.451"></a> +<span class="sourceLineNo">452</span> return null;<a name="line.452"></a> +<span class="sourceLineNo">453</span> }<a name="line.453"></a> +<span class="sourceLineNo">454</span> return new String(this.decode(StringUtils.getBytesUsAscii(sourceStr)), sourceCharset);<a name="line.454"></a> +<span class="sourceLineNo">455</span> }<a name="line.455"></a> +<span class="sourceLineNo">456</span><a name="line.456"></a> +<span class="sourceLineNo">457</span> /**<a name="line.457"></a> +<span class="sourceLineNo">458</span> * Decodes a quoted-printable string into its original form using the specified string Charset. Escaped characters<a name="line.458"></a> +<span class="sourceLineNo">459</span> * are converted back to their original representation.<a name="line.459"></a> +<span class="sourceLineNo">460</span> *<a name="line.460"></a> +<span class="sourceLineNo">461</span> * @param sourceStr<a name="line.461"></a> +<span class="sourceLineNo">462</span> * quoted-printable string to convert into its original form<a name="line.462"></a> +<span class="sourceLineNo">463</span> * @param sourceCharset<a name="line.463"></a> +<span class="sourceLineNo">464</span> * the original string Charset<a name="line.464"></a> +<span class="sourceLineNo">465</span> * @return original string<a name="line.465"></a> +<span class="sourceLineNo">466</span> * @throws DecoderException<a name="line.466"></a> +<span class="sourceLineNo">467</span> * Thrown if quoted-printable decoding is unsuccessful<a name="line.467"></a> +<span class="sourceLineNo">468</span> * @throws UnsupportedEncodingException<a name="line.468"></a> +<span class="sourceLineNo">469</span> * Thrown if Charset is not supported<a name="line.469"></a> +<span class="sourceLineNo">470</span> */<a name="line.470"></a> +<span class="sourceLineNo">471</span> public String decode(final String sourceStr, final String sourceCharset)<a name="line.471"></a> +<span class="sourceLineNo">472</span> throws DecoderException, UnsupportedEncodingException {<a name="line.472"></a> +<span class="sourceLineNo">473</span> if (sourceStr == null) {<a name="line.473"></a> +<span class="sourceLineNo">474</span> return null;<a name="line.474"></a> +<span class="sourceLineNo">475</span> }<a name="line.475"></a> +<span class="sourceLineNo">476</span> return new String(decode(StringUtils.getBytesUsAscii(sourceStr)), sourceCharset);<a name="line.476"></a> +<span class="sourceLineNo">477</span> }<a name="line.477"></a> +<span class="sourceLineNo">478</span><a name="line.478"></a> +<span class="sourceLineNo">479</span> /**<a name="line.479"></a> +<span class="sourceLineNo">480</span> * Decodes a quoted-printable string into its original form using the default string Charset. Escaped characters are<a name="line.480"></a> +<span class="sourceLineNo">481</span> * converted back to their original representation.<a name="line.481"></a> +<span class="sourceLineNo">482</span> *<a name="line.482"></a> +<span class="sourceLineNo">483</span> * @param sourceStr<a name="line.483"></a> +<span class="sourceLineNo">484</span> * quoted-printable string to convert into its original form<a name="line.484"></a> +<span class="sourceLineNo">485</span> * @return original string<a name="line.485"></a> +<span class="sourceLineNo">486</span> * @throws DecoderException<a name="line.486"></a> +<span class="sourceLineNo">487</span> * Thrown if quoted-printable decoding is unsuccessful. Thrown if Charset is not supported.<a name="line.487"></a> +<span class="sourceLineNo">488</span> * @see #getCharset()<a name="line.488"></a> +<span class="sourceLineNo">489</span> */<a name="line.489"></a> +<span class="sourceLineNo">490</span> @Override<a name="line.490"></a> +<span class="sourceLineNo">491</span> public String decode(final String sourceStr) throws DecoderException {<a name="line.491"></a> +<span class="sourceLineNo">492</span> return this.decode(sourceStr, this.getCharset());<a name="line.492"></a> +<span class="sourceLineNo">493</span> }<a name="line.493"></a> +<span class="sourceLineNo">494</span><a name="line.494"></a> +<span class="sourceLineNo">495</span> /**<a name="line.495"></a> +<span class="sourceLineNo">496</span> * Encodes an object into its quoted-printable safe form. Unsafe characters are escaped.<a name="line.496"></a> +<span class="sourceLineNo">497</span> *<a name="line.497"></a> +<span class="sourceLineNo">498</span> * @param obj<a name="line.498"></a> +<span class="sourceLineNo">499</span> * string to convert to a quoted-printable form<a name="line.499"></a> +<span class="sourceLineNo">500</span> * @return quoted-printable object<a name="line.500"></a> +<span class="sourceLineNo">501</span> * @throws EncoderException<a name="line.501"></a> +<span class="sourceLineNo">502</span> * Thrown if quoted-printable encoding is not applicable to objects of this type or if encoding is<a name="line.502"></a> +<span class="sourceLineNo">503</span> * unsuccessful<a name="line.503"></a> +<span class="sourceLineNo">504</span> */<a name="line.504"></a> +<span class="sourceLineNo">505</span> @Override<a name="line.505"></a> +<span class="sourceLineNo">506</span> public Object encode(final Object obj) throws EncoderException {<a name="line.506"></a> +<span class="sourceLineNo">507</span> if (obj == null) {<a name="line.507"></a> +<span class="sourceLineNo">508</span> return null;<a name="line.508"></a> +<span class="sourceLineNo">509</span> } else if (obj instanceof byte[]) {<a name="line.509"></a> +<span class="sourceLineNo">510</span> return encode((byte[]) obj);<a name="line.510"></a> +<span class="sourceLineNo">511</span> } else if (obj instanceof String) {<a name="line.511"></a> +<span class="sourceLineNo">512</span> return encode((String) obj);<a name="line.512"></a> +<span class="sourceLineNo">513</span> } else {<a name="line.513"></a> +<span class="sourceLineNo">514</span> throw new EncoderException("Objects of type " +<a name="line.514"></a> +<span class="sourceLineNo">515</span> obj.getClass().getName() +<a name="line.515"></a> +<span class="sourceLineNo">516</span> " cannot be quoted-printable encoded");<a name="line.516"></a> +<span class="sourceLineNo">517</span> }<a name="line.517"></a> +<span class="sourceLineNo">518</span> }<a name="line.518"></a> +<span class="sourceLineNo">519</span><a name="line.519"></a> +<span class="sourceLineNo">520</span> /**<a name="line.520"></a> +<span class="sourceLineNo">521</span> * Decodes a quoted-printable object into its original form. Escaped characters are converted back to their original<a name="line.521"></a> +<span class="sourceLineNo">522</span> * representation.<a name="line.522"></a> +<span class="sourceLineNo">523</span> *<a name="line.523"></a> +<span class="sourceLineNo">524</span> * @param obj<a name="line.524"></a> +<span class="sourceLineNo">525</span> * quoted-printable object to convert into its original form<a name="line.525"></a> +<span class="sourceLineNo">526</span> * @return original object<a name="line.526"></a> +<span class="sourceLineNo">527</span> * @throws DecoderException<a name="line.527"></a> +<span class="sourceLineNo">528</span> * Thrown if the argument is not a {@code String} or {@code byte[]}. Thrown if a failure<a name="line.528"></a> +<span class="sourceLineNo">529</span> * condition is encountered during the decode process.<a name="line.529"></a> +<span class="sourceLineNo">530</span> */<a name="line.530"></a> +<span class="sourceLineNo">531</span> @Override<a name="line.531"></a> +<span class="sourceLineNo">532</span> public Object decode(final Object obj) throws DecoderException {<a name="line.532"></a> +<span class="sourceLineNo">533</span> if (obj == null) {<a name="line.533"></a> +<span class="sourceLineNo">534</span> return null;<a name="line.534"></a> +<span class="sourceLineNo">535</span> } else if (obj instanceof byte[]) {<a name="line.535"></a> +<span class="sourceLineNo">536</span> return decode((byte[]) obj);<a name="line.536"></a> +<span class="sourceLineNo">537</span> } else if (obj instanceof String) {<a name="line.537"></a> +<span class="sourceLineNo">538</span> return decode((String) obj);<a name="line.538"></a> +<span class="sourceLineNo">539</span> } else {<a name="line.539"></a> +<span class="sourceLineNo">540</span> throw new DecoderException("Objects of type " +<a name="line.540"></a> +<span class="sourceLineNo">541</span> obj.getClass().getName() +<a name="line.541"></a> +<span class="sourceLineNo">542</span> " cannot be quoted-printable decoded");<a name="line.542"></a> +<span class="sourceLineNo">543</span> }<a name="line.543"></a> +<span class="sourceLineNo">544</span> }<a name="line.544"></a> +<span class="sourceLineNo">545</span><a name="line.545"></a> +<span class="sourceLineNo">546</span> /**<a name="line.546"></a> +<span class="sourceLineNo">547</span> * Gets the default Charset name used for string decoding and encoding.<a name="line.547"></a> +<span class="sourceLineNo">548</span> *<a name="line.548"></a> +<span class="sourceLineNo">549</span> * @return the default Charset name<a name="line.549"></a> +<span class="sourceLineNo">550</span> * @since 1.7<a name="line.550"></a> +<span class="sourceLineNo">551</span> */<a name="line.551"></a> +<span class="sourceLineNo">552</span> public Charset getCharset() {<a name="line.552"></a> +<span class="sourceLineNo">553</span> return this.charset;<a name="line.553"></a> +<span class="sourceLineNo">554</span> }<a name="line.554"></a> +<span class="sourceLineNo">555</span><a name="line.555"></a> +<span class="sourceLineNo">556</span> /**<a name="line.556"></a> +<span class="sourceLineNo">557</span> * Gets the default Charset name used for string decoding and encoding.<a name="line.557"></a> +<span class="sourceLineNo">558</span> *<a name="line.558"></a> +<span class="sourceLineNo">559</span> * @return the default Charset name<a name="line.559"></a> +<span class="sourceLineNo">560</span> */<a name="line.560"></a> +<span class="sourceLineNo">561</span> public String getDefaultCharset() {<a name="line.561"></a> +<span class="sourceLineNo">562</span> return this.charset.name();<a name="line.562"></a> +<span class="sourceLineNo">563</span> }<a name="line.563"></a> +<span class="sourceLineNo">564</span><a name="line.564"></a> +<span class="sourceLineNo">565</span> /**<a name="line.565"></a> +<span class="sourceLineNo">566</span> * Encodes a string into its quoted-printable form using the specified Charset. Unsafe characters are escaped.<a name="line.566"></a> +<span class="sourceLineNo">567</span> * <p><a name="line.567"></a> +<span class="sourceLineNo">568</span> * Depending on the selection of the {@code strict} parameter, this function either implements the full ruleset<a name="line.568"></a> +<span class="sourceLineNo">569</span> * or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in<a name="line.569"></a> +<span class="sourceLineNo">570</span> * RFC 1521 and is suitable for encoding binary data and unformatted text.<a name="line.570"></a> +<span class="sourceLineNo">571</span> *<a name="line.571"></a> +<span class="sourceLineNo">572</span> * @param sourceStr<a name="line.572"></a> +<span class="sourceLineNo">573</span> * string to convert to quoted-printable form<a name="line.573"></a> +<span class="sourceLineNo">574</span> * @param sourceCharset<a name="line.574"></a> +<span class="sourceLineNo">575</span> * the Charset for sourceStr<a name="line.575"></a> +<span class="sourceLineNo">576</span> * @return quoted-printable string<a name="line.576"></a> +<span class="sourceLineNo">577</span> * @since 1.7<a name="line.577"></a> +<span class="sourceLineNo">578</span> */<a name="line.578"></a> +<span class="sourceLineNo">579</span> public String encode(final String sourceStr, final Charset sourceCharset) {<a name="line.579"></a> +<span class="sourceLineNo">580</span> if (sourceStr == null) {<a name="line.580"></a> +<span class="sourceLineNo">581</span> return null;<a name="line.581"></a> +<span class="sourceLineNo">582</span> }<a name="line.582"></a> +<span class="sourceLineNo">583</span> return StringUtils.newStringUsAscii(this.encode(sourceStr.getBytes(sourceCharset)));<a name="line.583"></a> +<span class="sourceLineNo">584</span> }<a name="line.584"></a> +<span class="sourceLineNo">585</span><a name="line.585"></a> +<span class="sourceLineNo">586</span> /**<a name="line.586"></a> +<span class="sourceLineNo">587</span> * Encodes a string into its quoted-printable form using the specified Charset. Unsafe characters are escaped.<a name="line.587"></a> +<span class="sourceLineNo">588</span> * <p><a name="line.588"></a> +<span class="sourceLineNo">589</span> * Depending on the selection of the {@code strict} parameter, this function either implements the full ruleset<a name="line.589"></a> +<span class="sourceLineNo">590</span> * or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in<a name="line.590"></a> +<span class="sourceLineNo">591</span> * RFC 1521 and is suitable for encoding binary data and unformatted text.<a name="line.591"></a> +<span class="sourceLineNo">592</span> *<a name="line.592"></a> +<span class="sourceLineNo">593</span> * @param sourceStr<a name="line.593"></a> +<span class="sourceLineNo">594</span> * string to convert to quoted-printable form<a name="line.594"></a> +<span class="sourceLineNo">595</span> * @param sourceCharset<a name="line.595"></a> +<span class="sourceLineNo">596</span> * the Charset for sourceStr<a name="line.596"></a> +<span class="sourceLineNo">597</span> * @return quoted-printable string<a name="line.597"></a> +<span class="sourceLineNo">598</span> * @throws UnsupportedEncodingException<a name="line.598"></a> +<span class="sourceLineNo">599</span> * Thrown if the Charset is not supported<a name="line.599"></a> +<span class="sourceLineNo">600</span> */<a name="line.600"></a> +<span class="sourceLineNo">601</span> public String encode(final String sourceStr, final String sourceCharset) throws UnsupportedEncodingException {<a name="line.601"></a> +<span class="sourceLineNo">602</span> if (sourceStr == null) {<a name="line.602"></a> +<span class="sourceLineNo">603</span> return null;<a name="line.603"></a> +<span class="sourceLineNo">604</span> }<a name="line.604"></a> +<span class="sourceLineNo">605</span> return StringUtils.newStringUsAscii(encode(sourceStr.getBytes(sourceCharset)));<a name="line.605"></a> +<span class="sourceLineNo">606</span> }<a name="line.606"></a> +<span class="sourceLineNo">607</span>}<a name="line.607"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/URLCodec.html b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/URLCodec.html new file mode 100644 index 0000000000000000000000000000000000000000..31d69c87e97db294969960588de207ec569d42fa --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/src-html/org/apache/commons/codec/net/URLCodec.html @@ -0,0 +1,447 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span><a name="line.17"></a> +<span class="sourceLineNo">018</span>package org.apache.commons.codec.net;<a name="line.18"></a> +<span class="sourceLineNo">019</span><a name="line.19"></a> +<span class="sourceLineNo">020</span>import java.io.ByteArrayOutputStream;<a name="line.20"></a> +<span class="sourceLineNo">021</span>import java.io.UnsupportedEncodingException;<a name="line.21"></a> +<span class="sourceLineNo">022</span>import java.util.BitSet;<a name="line.22"></a> +<span class="sourceLineNo">023</span><a name="line.23"></a> +<span class="sourceLineNo">024</span>import org.apache.commons.codec.BinaryDecoder;<a name="line.24"></a> +<span class="sourceLineNo">025</span>import org.apache.commons.codec.BinaryEncoder;<a name="line.25"></a> +<span class="sourceLineNo">026</span>import org.apache.commons.codec.CharEncoding;<a name="line.26"></a> +<span class="sourceLineNo">027</span>import org.apache.commons.codec.DecoderException;<a name="line.27"></a> +<span class="sourceLineNo">028</span>import org.apache.commons.codec.EncoderException;<a name="line.28"></a> +<span class="sourceLineNo">029</span>import org.apache.commons.codec.StringDecoder;<a name="line.29"></a> +<span class="sourceLineNo">030</span>import org.apache.commons.codec.StringEncoder;<a name="line.30"></a> +<span class="sourceLineNo">031</span>import org.apache.commons.codec.binary.StringUtils;<a name="line.31"></a> +<span class="sourceLineNo">032</span><a name="line.32"></a> +<span class="sourceLineNo">033</span>/**<a name="line.33"></a> +<span class="sourceLineNo">034</span> * Implements the 'www-form-urlencoded' encoding scheme, also misleadingly known as URL encoding.<a name="line.34"></a> +<span class="sourceLineNo">035</span> * <p><a name="line.35"></a> +<span class="sourceLineNo">036</span> * This codec is meant to be a replacement for standard Java classes {@link java.net.URLEncoder} and<a name="line.36"></a> +<span class="sourceLineNo">037</span> * {@link java.net.URLDecoder} on older Java platforms, as these classes in Java versions below<a name="line.37"></a> +<span class="sourceLineNo">038</span> * 1.4 rely on the platform's default charset encoding.<a name="line.38"></a> +<span class="sourceLineNo">039</span> * </p><a name="line.39"></a> +<span class="sourceLineNo">040</span> * <p><a name="line.40"></a> +<span class="sourceLineNo">041</span> * This class is thread-safe as of 1.11<a name="line.41"></a> +<span class="sourceLineNo">042</span> * </p><a name="line.42"></a> +<span class="sourceLineNo">043</span> *<a name="line.43"></a> +<span class="sourceLineNo">044</span> * @see <a href="http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1">Chapter 17.13.4 Form content types</a><a name="line.44"></a> +<span class="sourceLineNo">045</span> * of the <a href="http://www.w3.org/TR/html4/">HTML 4.01 Specification</a><a name="line.45"></a> +<span class="sourceLineNo">046</span> *<a name="line.46"></a> +<span class="sourceLineNo">047</span> * @since 1.2<a name="line.47"></a> +<span class="sourceLineNo">048</span> */<a name="line.48"></a> +<span class="sourceLineNo">049</span>public class URLCodec implements BinaryEncoder, BinaryDecoder, StringEncoder, StringDecoder {<a name="line.49"></a> +<span class="sourceLineNo">050</span><a name="line.50"></a> +<span class="sourceLineNo">051</span> /**<a name="line.51"></a> +<span class="sourceLineNo">052</span> * The default charset used for string decoding and encoding.<a name="line.52"></a> +<span class="sourceLineNo">053</span> *<a name="line.53"></a> +<span class="sourceLineNo">054</span> * @deprecated TODO: This field will be changed to a private final Charset in 2.0. (CODEC-126)<a name="line.54"></a> +<span class="sourceLineNo">055</span> */<a name="line.55"></a> +<span class="sourceLineNo">056</span> @Deprecated<a name="line.56"></a> +<span class="sourceLineNo">057</span> protected volatile String charset; // added volatile: see CODEC-232<a name="line.57"></a> +<span class="sourceLineNo">058</span><a name="line.58"></a> +<span class="sourceLineNo">059</span> /**<a name="line.59"></a> +<span class="sourceLineNo">060</span> * Release 1.5 made this field final.<a name="line.60"></a> +<span class="sourceLineNo">061</span> */<a name="line.61"></a> +<span class="sourceLineNo">062</span> protected static final byte ESCAPE_CHAR = '%';<a name="line.62"></a> +<span class="sourceLineNo">063</span><a name="line.63"></a> +<span class="sourceLineNo">064</span> /**<a name="line.64"></a> +<span class="sourceLineNo">065</span> * BitSet of www-form-url safe characters.<a name="line.65"></a> +<span class="sourceLineNo">066</span> * This is a copy of the internal BitSet which is now used for the conversion.<a name="line.66"></a> +<span class="sourceLineNo">067</span> * Changes to this field are ignored.<a name="line.67"></a> +<span class="sourceLineNo">068</span> * @deprecated 1.11 Will be removed in 2.0 (CODEC-230)<a name="line.68"></a> +<span class="sourceLineNo">069</span> */<a name="line.69"></a> +<span class="sourceLineNo">070</span> @Deprecated<a name="line.70"></a> +<span class="sourceLineNo">071</span> protected static final BitSet WWW_FORM_URL;<a name="line.71"></a> +<span class="sourceLineNo">072</span><a name="line.72"></a> +<span class="sourceLineNo">073</span> private static final BitSet WWW_FORM_URL_SAFE = new BitSet(256);<a name="line.73"></a> +<span class="sourceLineNo">074</span><a name="line.74"></a> +<span class="sourceLineNo">075</span> // Static initializer for www_form_url<a name="line.75"></a> +<span class="sourceLineNo">076</span> static {<a name="line.76"></a> +<span class="sourceLineNo">077</span> // alpha characters<a name="line.77"></a> +<span class="sourceLineNo">078</span> for (int i = 'a'; i <= 'z'; i++) {<a name="line.78"></a> +<span class="sourceLineNo">079</span> WWW_FORM_URL_SAFE.set(i);<a name="line.79"></a> +<span class="sourceLineNo">080</span> }<a name="line.80"></a> +<span class="sourceLineNo">081</span> for (int i = 'A'; i <= 'Z'; i++) {<a name="line.81"></a> +<span class="sourceLineNo">082</span> WWW_FORM_URL_SAFE.set(i);<a name="line.82"></a> +<span class="sourceLineNo">083</span> }<a name="line.83"></a> +<span class="sourceLineNo">084</span> // numeric characters<a name="line.84"></a> +<span class="sourceLineNo">085</span> for (int i = '0'; i <= '9'; i++) {<a name="line.85"></a> +<span class="sourceLineNo">086</span> WWW_FORM_URL_SAFE.set(i);<a name="line.86"></a> +<span class="sourceLineNo">087</span> }<a name="line.87"></a> +<span class="sourceLineNo">088</span> // special chars<a name="line.88"></a> +<span class="sourceLineNo">089</span> WWW_FORM_URL_SAFE.set('-');<a name="line.89"></a> +<span class="sourceLineNo">090</span> WWW_FORM_URL_SAFE.set('_');<a name="line.90"></a> +<span class="sourceLineNo">091</span> WWW_FORM_URL_SAFE.set('.');<a name="line.91"></a> +<span class="sourceLineNo">092</span> WWW_FORM_URL_SAFE.set('*');<a name="line.92"></a> +<span class="sourceLineNo">093</span> // blank to be replaced with +<a name="line.93"></a> +<span class="sourceLineNo">094</span> WWW_FORM_URL_SAFE.set(' ');<a name="line.94"></a> +<span class="sourceLineNo">095</span><a name="line.95"></a> +<span class="sourceLineNo">096</span> // Create a copy in case anyone (ab)uses it<a name="line.96"></a> +<span class="sourceLineNo">097</span> WWW_FORM_URL = (BitSet) WWW_FORM_URL_SAFE.clone();<a name="line.97"></a> +<span class="sourceLineNo">098</span> }<a name="line.98"></a> +<span class="sourceLineNo">099</span><a name="line.99"></a> +<span class="sourceLineNo">100</span><a name="line.100"></a> +<span class="sourceLineNo">101</span> /**<a name="line.101"></a> +<span class="sourceLineNo">102</span> * Default constructor.<a name="line.102"></a> +<span class="sourceLineNo">103</span> */<a name="line.103"></a> +<span class="sourceLineNo">104</span> public URLCodec() {<a name="line.104"></a> +<span class="sourceLineNo">105</span> this(CharEncoding.UTF_8);<a name="line.105"></a> +<span class="sourceLineNo">106</span> }<a name="line.106"></a> +<span class="sourceLineNo">107</span><a name="line.107"></a> +<span class="sourceLineNo">108</span> /**<a name="line.108"></a> +<span class="sourceLineNo">109</span> * Constructor which allows for the selection of a default charset.<a name="line.109"></a> +<span class="sourceLineNo">110</span> *<a name="line.110"></a> +<span class="sourceLineNo">111</span> * @param charset the default string charset to use.<a name="line.111"></a> +<span class="sourceLineNo">112</span> */<a name="line.112"></a> +<span class="sourceLineNo">113</span> public URLCodec(final String charset) {<a name="line.113"></a> +<span class="sourceLineNo">114</span> super();<a name="line.114"></a> +<span class="sourceLineNo">115</span> this.charset = charset;<a name="line.115"></a> +<span class="sourceLineNo">116</span> }<a name="line.116"></a> +<span class="sourceLineNo">117</span><a name="line.117"></a> +<span class="sourceLineNo">118</span> /**<a name="line.118"></a> +<span class="sourceLineNo">119</span> * Encodes an array of bytes into an array of URL safe 7-bit characters. Unsafe characters are escaped.<a name="line.119"></a> +<span class="sourceLineNo">120</span> *<a name="line.120"></a> +<span class="sourceLineNo">121</span> * @param urlsafe<a name="line.121"></a> +<span class="sourceLineNo">122</span> * bitset of characters deemed URL safe<a name="line.122"></a> +<span class="sourceLineNo">123</span> * @param bytes<a name="line.123"></a> +<span class="sourceLineNo">124</span> * array of bytes to convert to URL safe characters<a name="line.124"></a> +<span class="sourceLineNo">125</span> * @return array of bytes containing URL safe characters<a name="line.125"></a> +<span class="sourceLineNo">126</span> */<a name="line.126"></a> +<span class="sourceLineNo">127</span> public static final byte[] encodeUrl(BitSet urlsafe, final byte[] bytes) {<a name="line.127"></a> +<span class="sourceLineNo">128</span> if (bytes == null) {<a name="line.128"></a> +<span class="sourceLineNo">129</span> return null;<a name="line.129"></a> +<span class="sourceLineNo">130</span> }<a name="line.130"></a> +<span class="sourceLineNo">131</span> if (urlsafe == null) {<a name="line.131"></a> +<span class="sourceLineNo">132</span> urlsafe = WWW_FORM_URL_SAFE;<a name="line.132"></a> +<span class="sourceLineNo">133</span> }<a name="line.133"></a> +<span class="sourceLineNo">134</span><a name="line.134"></a> +<span class="sourceLineNo">135</span> final ByteArrayOutputStream buffer = new ByteArrayOutputStream();<a name="line.135"></a> +<span class="sourceLineNo">136</span> for (final byte c : bytes) {<a name="line.136"></a> +<span class="sourceLineNo">137</span> int b = c;<a name="line.137"></a> +<span class="sourceLineNo">138</span> if (b < 0) {<a name="line.138"></a> +<span class="sourceLineNo">139</span> b = 256 + b;<a name="line.139"></a> +<span class="sourceLineNo">140</span> }<a name="line.140"></a> +<span class="sourceLineNo">141</span> if (urlsafe.get(b)) {<a name="line.141"></a> +<span class="sourceLineNo">142</span> if (b == ' ') {<a name="line.142"></a> +<span class="sourceLineNo">143</span> b = '+';<a name="line.143"></a> +<span class="sourceLineNo">144</span> }<a name="line.144"></a> +<span class="sourceLineNo">145</span> buffer.write(b);<a name="line.145"></a> +<span class="sourceLineNo">146</span> } else {<a name="line.146"></a> +<span class="sourceLineNo">147</span> buffer.write(ESCAPE_CHAR);<a name="line.147"></a> +<span class="sourceLineNo">148</span> final char hex1 = Utils.hexDigit(b >> 4);<a name="line.148"></a> +<span class="sourceLineNo">149</span> final char hex2 = Utils.hexDigit(b);<a name="line.149"></a> +<span class="sourceLineNo">150</span> buffer.write(hex1);<a name="line.150"></a> +<span class="sourceLineNo">151</span> buffer.write(hex2);<a name="line.151"></a> +<span class="sourceLineNo">152</span> }<a name="line.152"></a> +<span class="sourceLineNo">153</span> }<a name="line.153"></a> +<span class="sourceLineNo">154</span> return buffer.toByteArray();<a name="line.154"></a> +<span class="sourceLineNo">155</span> }<a name="line.155"></a> +<span class="sourceLineNo">156</span><a name="line.156"></a> +<span class="sourceLineNo">157</span> /**<a name="line.157"></a> +<span class="sourceLineNo">158</span> * Decodes an array of URL safe 7-bit characters into an array of original bytes. Escaped characters are converted<a name="line.158"></a> +<span class="sourceLineNo">159</span> * back to their original representation.<a name="line.159"></a> +<span class="sourceLineNo">160</span> *<a name="line.160"></a> +<span class="sourceLineNo">161</span> * @param bytes<a name="line.161"></a> +<span class="sourceLineNo">162</span> * array of URL safe characters<a name="line.162"></a> +<span class="sourceLineNo">163</span> * @return array of original bytes<a name="line.163"></a> +<span class="sourceLineNo">164</span> * @throws DecoderException<a name="line.164"></a> +<span class="sourceLineNo">165</span> * Thrown if URL decoding is unsuccessful<a name="line.165"></a> +<span class="sourceLineNo">166</span> */<a name="line.166"></a> +<span class="sourceLineNo">167</span> public static final byte[] decodeUrl(final byte[] bytes) throws DecoderException {<a name="line.167"></a> +<span class="sourceLineNo">168</span> if (bytes == null) {<a name="line.168"></a> +<span class="sourceLineNo">169</span> return null;<a name="line.169"></a> +<span class="sourceLineNo">170</span> }<a name="line.170"></a> +<span class="sourceLineNo">171</span> final ByteArrayOutputStream buffer = new ByteArrayOutputStream();<a name="line.171"></a> +<span class="sourceLineNo">172</span> for (int i = 0; i < bytes.length; i++) {<a name="line.172"></a> +<span class="sourceLineNo">173</span> final int b = bytes[i];<a name="line.173"></a> +<span class="sourceLineNo">174</span> if (b == '+') {<a name="line.174"></a> +<span class="sourceLineNo">175</span> buffer.write(' ');<a name="line.175"></a> +<span class="sourceLineNo">176</span> } else if (b == ESCAPE_CHAR) {<a name="line.176"></a> +<span class="sourceLineNo">177</span> try {<a name="line.177"></a> +<span class="sourceLineNo">178</span> final int u = Utils.digit16(bytes[++i]);<a name="line.178"></a> +<span class="sourceLineNo">179</span> final int l = Utils.digit16(bytes[++i]);<a name="line.179"></a> +<span class="sourceLineNo">180</span> buffer.write((char) ((u << 4) + l));<a name="line.180"></a> +<span class="sourceLineNo">181</span> } catch (final ArrayIndexOutOfBoundsException e) {<a name="line.181"></a> +<span class="sourceLineNo">182</span> throw new DecoderException("Invalid URL encoding: ", e);<a name="line.182"></a> +<span class="sourceLineNo">183</span> }<a name="line.183"></a> +<span class="sourceLineNo">184</span> } else {<a name="line.184"></a> +<span class="sourceLineNo">185</span> buffer.write(b);<a name="line.185"></a> +<span class="sourceLineNo">186</span> }<a name="line.186"></a> +<span class="sourceLineNo">187</span> }<a name="line.187"></a> +<span class="sourceLineNo">188</span> return buffer.toByteArray();<a name="line.188"></a> +<span class="sourceLineNo">189</span> }<a name="line.189"></a> +<span class="sourceLineNo">190</span><a name="line.190"></a> +<span class="sourceLineNo">191</span> /**<a name="line.191"></a> +<span class="sourceLineNo">192</span> * Encodes an array of bytes into an array of URL safe 7-bit characters. Unsafe characters are escaped.<a name="line.192"></a> +<span class="sourceLineNo">193</span> *<a name="line.193"></a> +<span class="sourceLineNo">194</span> * @param bytes<a name="line.194"></a> +<span class="sourceLineNo">195</span> * array of bytes to convert to URL safe characters<a name="line.195"></a> +<span class="sourceLineNo">196</span> * @return array of bytes containing URL safe characters<a name="line.196"></a> +<span class="sourceLineNo">197</span> */<a name="line.197"></a> +<span class="sourceLineNo">198</span> @Override<a name="line.198"></a> +<span class="sourceLineNo">199</span> public byte[] encode(final byte[] bytes) {<a name="line.199"></a> +<span class="sourceLineNo">200</span> return encodeUrl(WWW_FORM_URL_SAFE, bytes);<a name="line.200"></a> +<span class="sourceLineNo">201</span> }<a name="line.201"></a> +<span class="sourceLineNo">202</span><a name="line.202"></a> +<span class="sourceLineNo">203</span><a name="line.203"></a> +<span class="sourceLineNo">204</span> /**<a name="line.204"></a> +<span class="sourceLineNo">205</span> * Decodes an array of URL safe 7-bit characters into an array of original bytes. Escaped characters are converted<a name="line.205"></a> +<span class="sourceLineNo">206</span> * back to their original representation.<a name="line.206"></a> +<span class="sourceLineNo">207</span> *<a name="line.207"></a> +<span class="sourceLineNo">208</span> * @param bytes<a name="line.208"></a> +<span class="sourceLineNo">209</span> * array of URL safe characters<a name="line.209"></a> +<span class="sourceLineNo">210</span> * @return array of original bytes<a name="line.210"></a> +<span class="sourceLineNo">211</span> * @throws DecoderException<a name="line.211"></a> +<span class="sourceLineNo">212</span> * Thrown if URL decoding is unsuccessful<a name="line.212"></a> +<span class="sourceLineNo">213</span> */<a name="line.213"></a> +<span class="sourceLineNo">214</span> @Override<a name="line.214"></a> +<span class="sourceLineNo">215</span> public byte[] decode(final byte[] bytes) throws DecoderException {<a name="line.215"></a> +<span class="sourceLineNo">216</span> return decodeUrl(bytes);<a name="line.216"></a> +<span class="sourceLineNo">217</span> }<a name="line.217"></a> +<span class="sourceLineNo">218</span><a name="line.218"></a> +<span class="sourceLineNo">219</span> /**<a name="line.219"></a> +<span class="sourceLineNo">220</span> * Encodes a string into its URL safe form using the specified string charset. Unsafe characters are escaped.<a name="line.220"></a> +<span class="sourceLineNo">221</span> *<a name="line.221"></a> +<span class="sourceLineNo">222</span> * @param str<a name="line.222"></a> +<span class="sourceLineNo">223</span> * string to convert to a URL safe form<a name="line.223"></a> +<span class="sourceLineNo">224</span> * @param charsetName<a name="line.224"></a> +<span class="sourceLineNo">225</span> * the charset for str<a name="line.225"></a> +<span class="sourceLineNo">226</span> * @return URL safe string<a name="line.226"></a> +<span class="sourceLineNo">227</span> * @throws UnsupportedEncodingException<a name="line.227"></a> +<span class="sourceLineNo">228</span> * Thrown if charset is not supported<a name="line.228"></a> +<span class="sourceLineNo">229</span> */<a name="line.229"></a> +<span class="sourceLineNo">230</span> public String encode(final String str, final String charsetName) throws UnsupportedEncodingException {<a name="line.230"></a> +<span class="sourceLineNo">231</span> if (str == null) {<a name="line.231"></a> +<span class="sourceLineNo">232</span> return null;<a name="line.232"></a> +<span class="sourceLineNo">233</span> }<a name="line.233"></a> +<span class="sourceLineNo">234</span> return StringUtils.newStringUsAscii(encode(str.getBytes(charsetName)));<a name="line.234"></a> +<span class="sourceLineNo">235</span> }<a name="line.235"></a> +<span class="sourceLineNo">236</span><a name="line.236"></a> +<span class="sourceLineNo">237</span> /**<a name="line.237"></a> +<span class="sourceLineNo">238</span> * Encodes a string into its URL safe form using the default string charset. Unsafe characters are escaped.<a name="line.238"></a> +<span class="sourceLineNo">239</span> *<a name="line.239"></a> +<span class="sourceLineNo">240</span> * @param str<a name="line.240"></a> +<span class="sourceLineNo">241</span> * string to convert to a URL safe form<a name="line.241"></a> +<span class="sourceLineNo">242</span> * @return URL safe string<a name="line.242"></a> +<span class="sourceLineNo">243</span> * @throws EncoderException<a name="line.243"></a> +<span class="sourceLineNo">244</span> * Thrown if URL encoding is unsuccessful<a name="line.244"></a> +<span class="sourceLineNo">245</span> *<a name="line.245"></a> +<span class="sourceLineNo">246</span> * @see #getDefaultCharset()<a name="line.246"></a> +<span class="sourceLineNo">247</span> */<a name="line.247"></a> +<span class="sourceLineNo">248</span> @Override<a name="line.248"></a> +<span class="sourceLineNo">249</span> public String encode(final String str) throws EncoderException {<a name="line.249"></a> +<span class="sourceLineNo">250</span> if (str == null) {<a name="line.250"></a> +<span class="sourceLineNo">251</span> return null;<a name="line.251"></a> +<span class="sourceLineNo">252</span> }<a name="line.252"></a> +<span class="sourceLineNo">253</span> try {<a name="line.253"></a> +<span class="sourceLineNo">254</span> return encode(str, getDefaultCharset());<a name="line.254"></a> +<span class="sourceLineNo">255</span> } catch (final UnsupportedEncodingException e) {<a name="line.255"></a> +<span class="sourceLineNo">256</span> throw new EncoderException(e.getMessage(), e);<a name="line.256"></a> +<span class="sourceLineNo">257</span> }<a name="line.257"></a> +<span class="sourceLineNo">258</span> }<a name="line.258"></a> +<span class="sourceLineNo">259</span><a name="line.259"></a> +<span class="sourceLineNo">260</span><a name="line.260"></a> +<span class="sourceLineNo">261</span> /**<a name="line.261"></a> +<span class="sourceLineNo">262</span> * Decodes a URL safe string into its original form using the specified encoding. Escaped characters are converted<a name="line.262"></a> +<span class="sourceLineNo">263</span> * back to their original representation.<a name="line.263"></a> +<span class="sourceLineNo">264</span> *<a name="line.264"></a> +<span class="sourceLineNo">265</span> * @param str<a name="line.265"></a> +<span class="sourceLineNo">266</span> * URL safe string to convert into its original form<a name="line.266"></a> +<span class="sourceLineNo">267</span> * @param charsetName<a name="line.267"></a> +<span class="sourceLineNo">268</span> * the original string charset<a name="line.268"></a> +<span class="sourceLineNo">269</span> * @return original string<a name="line.269"></a> +<span class="sourceLineNo">270</span> * @throws DecoderException<a name="line.270"></a> +<span class="sourceLineNo">271</span> * Thrown if URL decoding is unsuccessful<a name="line.271"></a> +<span class="sourceLineNo">272</span> * @throws UnsupportedEncodingException<a name="line.272"></a> +<span class="sourceLineNo">273</span> * Thrown if charset is not supported<a name="line.273"></a> +<span class="sourceLineNo">274</span> */<a name="line.274"></a> +<span class="sourceLineNo">275</span> public String decode(final String str, final String charsetName)<a name="line.275"></a> +<span class="sourceLineNo">276</span> throws DecoderException, UnsupportedEncodingException {<a name="line.276"></a> +<span class="sourceLineNo">277</span> if (str == null) {<a name="line.277"></a> +<span class="sourceLineNo">278</span> return null;<a name="line.278"></a> +<span class="sourceLineNo">279</span> }<a name="line.279"></a> +<span class="sourceLineNo">280</span> return new String(decode(StringUtils.getBytesUsAscii(str)), charsetName);<a name="line.280"></a> +<span class="sourceLineNo">281</span> }<a name="line.281"></a> +<span class="sourceLineNo">282</span><a name="line.282"></a> +<span class="sourceLineNo">283</span> /**<a name="line.283"></a> +<span class="sourceLineNo">284</span> * Decodes a URL safe string into its original form using the default string charset. Escaped characters are<a name="line.284"></a> +<span class="sourceLineNo">285</span> * converted back to their original representation.<a name="line.285"></a> +<span class="sourceLineNo">286</span> *<a name="line.286"></a> +<span class="sourceLineNo">287</span> * @param str<a name="line.287"></a> +<span class="sourceLineNo">288</span> * URL safe string to convert into its original form<a name="line.288"></a> +<span class="sourceLineNo">289</span> * @return original string<a name="line.289"></a> +<span class="sourceLineNo">290</span> * @throws DecoderException<a name="line.290"></a> +<span class="sourceLineNo">291</span> * Thrown if URL decoding is unsuccessful<a name="line.291"></a> +<span class="sourceLineNo">292</span> * @see #getDefaultCharset()<a name="line.292"></a> +<span class="sourceLineNo">293</span> */<a name="line.293"></a> +<span class="sourceLineNo">294</span> @Override<a name="line.294"></a> +<span class="sourceLineNo">295</span> public String decode(final String str) throws DecoderException {<a name="line.295"></a> +<span class="sourceLineNo">296</span> if (str == null) {<a name="line.296"></a> +<span class="sourceLineNo">297</span> return null;<a name="line.297"></a> +<span class="sourceLineNo">298</span> }<a name="line.298"></a> +<span class="sourceLineNo">299</span> try {<a name="line.299"></a> +<span class="sourceLineNo">300</span> return decode(str, getDefaultCharset());<a name="line.300"></a> +<span class="sourceLineNo">301</span> } catch (final UnsupportedEncodingException e) {<a name="line.301"></a> +<span class="sourceLineNo">302</span> throw new DecoderException(e.getMessage(), e);<a name="line.302"></a> +<span class="sourceLineNo">303</span> }<a name="line.303"></a> +<span class="sourceLineNo">304</span> }<a name="line.304"></a> +<span class="sourceLineNo">305</span><a name="line.305"></a> +<span class="sourceLineNo">306</span> /**<a name="line.306"></a> +<span class="sourceLineNo">307</span> * Encodes an object into its URL safe form. Unsafe characters are escaped.<a name="line.307"></a> +<span class="sourceLineNo">308</span> *<a name="line.308"></a> +<span class="sourceLineNo">309</span> * @param obj<a name="line.309"></a> +<span class="sourceLineNo">310</span> * string to convert to a URL safe form<a name="line.310"></a> +<span class="sourceLineNo">311</span> * @return URL safe object<a name="line.311"></a> +<span class="sourceLineNo">312</span> * @throws EncoderException<a name="line.312"></a> +<span class="sourceLineNo">313</span> * Thrown if URL encoding is not applicable to objects of this type or if encoding is unsuccessful<a name="line.313"></a> +<span class="sourceLineNo">314</span> */<a name="line.314"></a> +<span class="sourceLineNo">315</span> @Override<a name="line.315"></a> +<span class="sourceLineNo">316</span> public Object encode(final Object obj) throws EncoderException {<a name="line.316"></a> +<span class="sourceLineNo">317</span> if (obj == null) {<a name="line.317"></a> +<span class="sourceLineNo">318</span> return null;<a name="line.318"></a> +<span class="sourceLineNo">319</span> } else if (obj instanceof byte[]) {<a name="line.319"></a> +<span class="sourceLineNo">320</span> return encode((byte[])obj);<a name="line.320"></a> +<span class="sourceLineNo">321</span> } else if (obj instanceof String) {<a name="line.321"></a> +<span class="sourceLineNo">322</span> return encode((String)obj);<a name="line.322"></a> +<span class="sourceLineNo">323</span> } else {<a name="line.323"></a> +<span class="sourceLineNo">324</span> throw new EncoderException("Objects of type " + obj.getClass().getName() + " cannot be URL encoded");<a name="line.324"></a> +<span class="sourceLineNo">325</span><a name="line.325"></a> +<span class="sourceLineNo">326</span> }<a name="line.326"></a> +<span class="sourceLineNo">327</span> }<a name="line.327"></a> +<span class="sourceLineNo">328</span><a name="line.328"></a> +<span class="sourceLineNo">329</span> /**<a name="line.329"></a> +<span class="sourceLineNo">330</span> * Decodes a URL safe object into its original form. Escaped characters are converted back to their original<a name="line.330"></a> +<span class="sourceLineNo">331</span> * representation.<a name="line.331"></a> +<span class="sourceLineNo">332</span> *<a name="line.332"></a> +<span class="sourceLineNo">333</span> * @param obj<a name="line.333"></a> +<span class="sourceLineNo">334</span> * URL safe object to convert into its original form<a name="line.334"></a> +<span class="sourceLineNo">335</span> * @return original object<a name="line.335"></a> +<span class="sourceLineNo">336</span> * @throws DecoderException<a name="line.336"></a> +<span class="sourceLineNo">337</span> * Thrown if the argument is not a {@code String} or {@code byte[]}. Thrown if a failure<a name="line.337"></a> +<span class="sourceLineNo">338</span> * condition is encountered during the decode process.<a name="line.338"></a> +<span class="sourceLineNo">339</span> */<a name="line.339"></a> +<span class="sourceLineNo">340</span> @Override<a name="line.340"></a> +<span class="sourceLineNo">341</span> public Object decode(final Object obj) throws DecoderException {<a name="line.341"></a> +<span class="sourceLineNo">342</span> if (obj == null) {<a name="line.342"></a> +<span class="sourceLineNo">343</span> return null;<a name="line.343"></a> +<span class="sourceLineNo">344</span> } else if (obj instanceof byte[]) {<a name="line.344"></a> +<span class="sourceLineNo">345</span> return decode((byte[]) obj);<a name="line.345"></a> +<span class="sourceLineNo">346</span> } else if (obj instanceof String) {<a name="line.346"></a> +<span class="sourceLineNo">347</span> return decode((String) obj);<a name="line.347"></a> +<span class="sourceLineNo">348</span> } else {<a name="line.348"></a> +<span class="sourceLineNo">349</span> throw new DecoderException("Objects of type " + obj.getClass().getName() + " cannot be URL decoded");<a name="line.349"></a> +<span class="sourceLineNo">350</span><a name="line.350"></a> +<span class="sourceLineNo">351</span> }<a name="line.351"></a> +<span class="sourceLineNo">352</span> }<a name="line.352"></a> +<span class="sourceLineNo">353</span><a name="line.353"></a> +<span class="sourceLineNo">354</span> /**<a name="line.354"></a> +<span class="sourceLineNo">355</span> * The default charset used for string decoding and encoding.<a name="line.355"></a> +<span class="sourceLineNo">356</span> *<a name="line.356"></a> +<span class="sourceLineNo">357</span> * @return the default string charset.<a name="line.357"></a> +<span class="sourceLineNo">358</span> */<a name="line.358"></a> +<span class="sourceLineNo">359</span> public String getDefaultCharset() {<a name="line.359"></a> +<span class="sourceLineNo">360</span> return this.charset;<a name="line.360"></a> +<span class="sourceLineNo">361</span> }<a name="line.361"></a> +<span class="sourceLineNo">362</span><a name="line.362"></a> +<span class="sourceLineNo">363</span> /**<a name="line.363"></a> +<span class="sourceLineNo">364</span> * The {@code String} encoding used for decoding and encoding.<a name="line.364"></a> +<span class="sourceLineNo">365</span> *<a name="line.365"></a> +<span class="sourceLineNo">366</span> * @return Returns the encoding.<a name="line.366"></a> +<span class="sourceLineNo">367</span> *<a name="line.367"></a> +<span class="sourceLineNo">368</span> * @deprecated Use {@link #getDefaultCharset()}, will be removed in 2.0.<a name="line.368"></a> +<span class="sourceLineNo">369</span> */<a name="line.369"></a> +<span class="sourceLineNo">370</span> @Deprecated<a name="line.370"></a> +<span class="sourceLineNo">371</span> public String getEncoding() {<a name="line.371"></a> +<span class="sourceLineNo">372</span> return this.charset;<a name="line.372"></a> +<span class="sourceLineNo">373</span> }<a name="line.373"></a> +<span class="sourceLineNo">374</span><a name="line.374"></a> +<span class="sourceLineNo">375</span>}<a name="line.375"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> diff --git a/WebServer/commons-codec-1.15/apidocs/stylesheet.css b/WebServer/commons-codec-1.15/apidocs/stylesheet.css new file mode 100644 index 0000000000000000000000000000000000000000..98055b22d6d5bed7792d6857aa760cf914c62653 --- /dev/null +++ b/WebServer/commons-codec-1.15/apidocs/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/WebServer/commons-codec-1.15/commons-codec-1.15-javadoc.jar b/WebServer/commons-codec-1.15/commons-codec-1.15-javadoc.jar new file mode 100644 index 0000000000000000000000000000000000000000..3fee18e3536ec6995ee553b56c96266ae739ee2c Binary files /dev/null and b/WebServer/commons-codec-1.15/commons-codec-1.15-javadoc.jar differ diff --git a/WebServer/commons-codec-1.15/commons-codec-1.15-sources.jar b/WebServer/commons-codec-1.15/commons-codec-1.15-sources.jar new file mode 100644 index 0000000000000000000000000000000000000000..5291685e6c12634ca9267867298055eb022650b0 Binary files /dev/null and b/WebServer/commons-codec-1.15/commons-codec-1.15-sources.jar differ diff --git a/WebServer/commons-codec-1.15/commons-codec-1.15-test-sources.jar b/WebServer/commons-codec-1.15/commons-codec-1.15-test-sources.jar new file mode 100644 index 0000000000000000000000000000000000000000..0505d41347eab825a9fdd2ea4b002ae2036a1f9e Binary files /dev/null and b/WebServer/commons-codec-1.15/commons-codec-1.15-test-sources.jar differ diff --git a/WebServer/commons-codec-1.15/commons-codec-1.15-tests.jar b/WebServer/commons-codec-1.15/commons-codec-1.15-tests.jar new file mode 100644 index 0000000000000000000000000000000000000000..499c3b6f4b1591dedbaf9ef5c42e331b44c4bdd3 Binary files /dev/null and b/WebServer/commons-codec-1.15/commons-codec-1.15-tests.jar differ diff --git a/WebServer/commons-codec-1.15/commons-codec-1.15.jar b/WebServer/commons-codec-1.15/commons-codec-1.15.jar new file mode 100644 index 0000000000000000000000000000000000000000..f14985ac9214db96dadcba46c0578baf55c5b347 Binary files /dev/null and b/WebServer/commons-codec-1.15/commons-codec-1.15.jar differ diff --git a/WebServer/gson-2.8.2.jar b/WebServer/gson-2.8.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..d0d030c6371cb44e7caee238f7bf148c7732ce28 Binary files /dev/null and b/WebServer/gson-2.8.2.jar differ diff --git a/WebServer/org.apache.commons.io.jar b/WebServer/org.apache.commons.io.jar new file mode 100644 index 0000000000000000000000000000000000000000..7affdefcd2747f924d078dbe5e85bb1503532a4f Binary files /dev/null and b/WebServer/org.apache.commons.io.jar differ diff --git a/WebServer/server.bash b/WebServer/server.bash index 62b8300a700d6e60764ef37751a8b7ee05c82bec..b5c63cd18da97c1acf7eba7a953db72b932602bd 100755 --- a/WebServer/server.bash +++ b/WebServer/server.bash @@ -1,5 +1,5 @@ #!/bin/bash -javac -cp .:./org.json-1.0.0.v201011060100.jar -d bin src/code/* +javac -cp .:./org.json-1.0.0.v201011060100.jar:./org.apache.commons.io.jar:./gson-2.8.2.jar:./commons-codec-1.15/commons-codec-1.15.jar -d bin src/code/* echo 'server compiled' cd bin -java -classpath .:../org.json-1.0.0.v201011060100.jar code.Server $1 +java -classpath .:../org.json-1.0.0.v201011060100.jar:../org.apache.commons.io.jar:../gson-2.8.2.jar:../commons-codec-1.15/commons-codec-1.15.jar code.Server $1 diff --git a/WebServer/src/code/Home.java b/WebServer/src/code/Home.java index e7ad3fa7077b9932ddc954e030a6861b895290e5..aba69c7038d7e7b667c0feb6436af97533131349 100644 --- a/WebServer/src/code/Home.java +++ b/WebServer/src/code/Home.java @@ -19,29 +19,12 @@ public class Home implements HttpHandler { @Override public void handle(HttpExchange exchange) throws IOException { - URI requestURI = exchange.getRequestURI(); - boolean wantsHome = Helper.compareText(requestURI.toString(),URI.create("/").toString()); - boolean wantsKeycloak = Helper.compareText(requestURI.toString(),URI.create("/keycloak.json").toString()); - if(!wantsHome && !wantsKeycloak) { - String error = "Invalid URI"; - OutputStream os = exchange.getResponseBody(); - exchange.sendResponseHeaders(400, error.getBytes().length); - os.write(error.getBytes()); - os.close(); - return; - } - String requestMethod = exchange.getRequestMethod(); if (Helper.compareText(requestMethod, "GET")) { List<String> strlist = new ArrayList<>(); String response = null; - if(wantsHome){ - response = getHomePage(); - strlist.add("text/html"); - } else if (wantsKeycloak){ - response = getKeycloak(); - strlist.add("text/json"); - } + response = getHomePage(); + strlist.add("text/html"); if(response != null && !Helper.compareText(response, "fail")){ exchange.getResponseHeaders().put("content-type", strlist); exchange.sendResponseHeaders(200, response.getBytes().length); diff --git a/WebServer/src/code/ImageRes.java b/WebServer/src/code/ImageRes.java index 87b766aed14e7d52f905aee13caa74a39d4d724f..31a7ed29e1b16be587673bdbaea8266e382993ff 100644 --- a/WebServer/src/code/ImageRes.java +++ b/WebServer/src/code/ImageRes.java @@ -18,11 +18,11 @@ public class ImageRes implements HttpHandler { @Override public void handle(HttpExchange exchange) throws IOException { - URI requestURI = exchange.getRequestURI(); + String requestURI = exchange.getRequestURI().toASCIIString().replace("/secured/home/", "/"); String requestMethod = exchange.getRequestMethod(); if (Helper.compareText(requestMethod, "GET")) { - BufferedImage image = getLocalImage(requestURI.toASCIIString()); + BufferedImage image = getLocalImage(requestURI); if (image == null) Helper.pageNotFound(exchange); List<String> strlist = new ArrayList<>(); diff --git a/WebServer/src/code/KeyCloak.java b/WebServer/src/code/KeyCloak.java new file mode 100644 index 0000000000000000000000000000000000000000..47d25081fef69823ea5f6a7fbca039d21b3c2701 --- /dev/null +++ b/WebServer/src/code/KeyCloak.java @@ -0,0 +1,88 @@ +package code; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.io.*; +import java.util.HashMap; +import java.util.Arrays; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; + +public class KeyCloak extends HashMap<String,String> { + + public String extraBody() { + return get("extrabodyTemplate").replace("$CLIENTID",get("client-id")); + } + + public String authServer() { + String val = get("auth-server-url"); + int i = val.length()-2; + while(i>0 && val.charAt(i)!='/') i--; + return val.substring(i+1,val.length()-1); + } + + public String codeRQ () { + String val = get("coderq").replace("$CLIENTID",get("client-id")); + return val.replace("$REALM", get("realm")); + } + + + public String tokenRQ () { + String val = get("tokenrq").replace("$CLIENTID",get("client-id")); + return val.replace("$REALM", get("realm")); + } + + public String realm() { + return get("realm"); + } + +// public String clientId() { +// return get("client-id"); +// } + + public String redirectUri() { + return get("redirect-uri"); + } + + public void print() { + System.out.println(Arrays.asList(this)); + } + + public KeyCloak(String keycloakpath, String params) throws MalformedURLException, IOException { + BufferedReader data; + String json = ""; + String line; + data = new BufferedReader(new FileReader(keycloakpath)); + while((line = data.readLine())!=null) json += line; + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(json); + if (element.isJsonObject()) { + JsonObject keycloak = element.getAsJsonObject(); + put("realm", keycloak.get("realm").getAsString()); + put("auth-server-url", keycloak.get("auth-server-url").getAsString()); + put("ssl-required", keycloak.get("ssl-required").getAsString()); + put("resouce", keycloak.get("resource").getAsString()); + put("client-id", keycloak.get("resource").getAsString()); + put("public-client", keycloak.get("public-client").getAsString()); + put("confidential-port", keycloak.get("confidential-port").getAsString()); + } + data.close(); + BufferedReader data2 = new BufferedReader(new FileReader(params)); + json = ""; + while((line = data2.readLine())!=null) json += line; + element = parser.parse(json); + if (element.isJsonObject()) { + JsonObject parameters = element.getAsJsonObject(); + put("coderq", parameters.get("coderq").getAsString()); + put("tokenrq", parameters.get("tokenrq").getAsString()); + put("extrabodyTemplate", parameters.get("extrabody").getAsString()); + put("redirect-uri", parameters.get("redirect_uri").getAsString()); + } + data2.close(); + + } +} + + diff --git a/WebServer/src/code/ObtainToken.java b/WebServer/src/code/ObtainToken.java new file mode 100644 index 0000000000000000000000000000000000000000..1cabd4aa6affef21bd0ac169b25afce82b12a312 --- /dev/null +++ b/WebServer/src/code/ObtainToken.java @@ -0,0 +1,218 @@ +package code; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.net.URL; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.util.ArrayList; + +import java.util.List; + +import javax.net.ssl.HttpsURLConnection; + +import org.apache.commons.codec.binary.Base64; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class ObtainToken implements HttpHandler{ + + private KeyCloak kcs; + + public ObtainToken(KeyCloak kcs) { + this.kcs = kcs; + } + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + String stringURI = requestURI.toString(); + boolean wantsRedirectPage = Helper.compareText(stringURI,URI.create("/").toString()); + boolean wantsToken = Helper.compareText(stringURI,URI.create("/secured").toString()); + + if(!wantsRedirectPage && !wantsToken) { + String error = "Invalid URI"; + OutputStream os = exchange.getResponseBody(); + exchange.sendResponseHeaders(400, error.getBytes().length); + os.write(error.getBytes()); + os.close(); + return; + } + + String requestMethod = exchange.getRequestMethod(); + if (Helper.compareText(requestMethod, "GET")) { + // get the html page + List<String> strlist = new ArrayList<>(); + String response = null; + if(wantsRedirectPage) + response = getRedirectPage("/redirect.html"); + if(wantsToken) + response = getRedirectPage("/domains.html"); + strlist.add("text/html"); + + if(response != null && !Helper.compareText(response, "fail")){ + response = response.replace("$DOMAIN", kcs.authServer()) + .replace("$REALM", kcs.realm()) + .replace("$MY_REDIRECT_URI", kcs.redirectUri()); + + exchange.getResponseHeaders().put("content-type", strlist); + exchange.sendResponseHeaders(200, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } else { + exchange.sendResponseHeaders(500, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + +// if(wantsToken) { + // NON FUNZIONA PERCHE' LA +// String[] arr = stringURI.split("/secured"); +// for(int i=0; i<arr.length; i++) +// System.out.println(arr[i]); +// System.out.println("lunghezza = "+arr.length); +// +// String allParamsString = stringURI.split("/secured")[1]; +// System.out.println("allParamsString = "+allParamsString); +// String[] allParamsArray = allParamsString.split("&"); +// String state = allParamsArray[0]; +// if(!this.state.equals(state)) { +// Helper.badRequest(exchange); +// return; +// } +// String authCode = allParamsArray[2]; +// +// // request token +// String httpsURL = "http://"+kcs.authServer()+"/realms/"+kcs.realm()+"/protocol/openid-connect/token"; +// URL myUrl = new URL(httpsURL); +//// SSLUtilities.trustAllHttpsCertificates(); +//// SSLUtilities.trustAllHostnames(); +// HttpsURLConnection conn = (HttpsURLConnection)myUrl.openConnection(); +// +// conn.setReadTimeout(7000); +// conn.setConnectTimeout(7000); +// conn.setRequestMethod("POST"); +// conn.setDoOutput(true); +// conn.setDoInput(true); +// +// conn.setRequestProperty("content-type", "application/x-www-form-urlencoded"); +// +// String body = "grant_type=authorization_code" +// + "&client_id="+kcs.clientId() +// + "&code_verifier="+codeVerifier +// + "&code="+authCode +// + "&redirect_uri=https://localhost:3000/secured"; +// OutputStream outputStream = conn.getOutputStream(); +// outputStream.write(body.getBytes("UTF-8")); +// outputStream.close(); +// +// String inputLine; +// InputStream is = conn.getInputStream(); +// InputStreamReader isr = new InputStreamReader(is); +// BufferedReader br = new BufferedReader(isr); +// String response = ""; +// while ((inputLine = br.readLine()) != null) { +// response += inputLine; +// } +// +// br.close(); +// System.out.println(response); +// String answer = response.replace(remoteHOST,localHOST); + +// } + } else { + Helper.methodNotAllowed(exchange); + } + } + + + + private static String getRedirectPage(String fileName) { + String line; + String page = Server.CLIENT_PATH+fileName; + + StringBuilder answer = new StringBuilder(); + if (getExtension(page).length() == 0) + page += ".html"; + + BufferedReader bufferedReader = null; + try { + FileReader fileReader = new FileReader(page); + + bufferedReader = new BufferedReader(fileReader); + boolean isComment = false; + while ((line = bufferedReader.readLine()) != null) { + line = line.trim(); + + if(line.startsWith("<!--") && line.endsWith("-->")) { + continue; + } + if(line.startsWith("<!--")) { + isComment = true; + continue; + } + if(line.endsWith("-->")) { + isComment = false; + continue; + } + + if(!isComment && line.length()>0) + answer.append(line).append("\n"); + } + } catch (FileNotFoundException ex) { + System.out.println("Unable to open file '" + page + "'"); + return "fail"; + } catch (IOException ex) { + System.out.println("Error reading file '" + page + "'"); + return "fail"; + } finally { + try{ + if(bufferedReader != null) + bufferedReader.close(); + } catch (IOException ex){ + System.out.println("Error closing bufferedReader"); + } + } + return answer.toString(); + } + + + private static String getExtension(String file) { + int i = file.length() - 1; + while (i > 0 && file.charAt(i) != '.' && file.charAt(i) != '/') + i--; + if (file.charAt(i) == '.') + return file.substring(i + 1); + else + return ""; + } + +// +// private String createRandomString() { +// SecureRandom sr = new SecureRandom(); +// byte[] code = new byte[32]; +// sr.nextBytes(code); +// return java.util.Base64.getUrlEncoder().withoutPadding().encodeToString(code); +// } +// +// +// private String createCodeChallenge(String verifier) throws UnsupportedEncodingException, NoSuchAlgorithmException { +// byte[] bytes = verifier.getBytes("US-ASCII"); +// MessageDigest md = MessageDigest.getInstance("SHA-256"); +// md.update(bytes, 0, bytes.length); +// byte[] digest = md.digest(); +// return Base64.encodeBase64URLSafeString(digest); +// } + +} \ No newline at end of file diff --git a/WebServer/src/code/Resources.java b/WebServer/src/code/Resources.java index 4792161b8834f5de4d56ae39722ae2ee1a163826..a05616752b69fec5f88a0c3a9e241b673becb5b8 100644 --- a/WebServer/src/code/Resources.java +++ b/WebServer/src/code/Resources.java @@ -17,14 +17,14 @@ public class Resources implements HttpHandler { @Override public void handle(HttpExchange exchange) throws IOException { - URI requestURI = exchange.getRequestURI(); + String requestURI = exchange.getRequestURI().toASCIIString().replace("/secured/home/","/"); String requestMethod = exchange.getRequestMethod(); if (Helper.compareText(requestMethod, "GET")) { - String response = getLocalPage(requestURI.toASCIIString()); + String response = getLocalPage(requestURI); if(response.equals("fail")){ //nel caso in cui non ci sia il file (perche non stato scaricato), allora creo un file fittizzio per non far crashare tutto il resto - String[] requestedPath = requestURI.toASCIIString().split("/"); + String[] requestedPath = requestURI.split("/"); // get the last element of requestedPath and remove .js String[] requestedPage = requestedPath[requestedPath.length-1].split("\\."); String className = requestedPage[0]; @@ -33,7 +33,7 @@ public class Resources implements HttpHandler { response = "class "+className+"{}\nexport default " +className; } List<String> strlist = new ArrayList<>(); - switch (requestURI.toASCIIString().substring(1, 4)) { + switch (requestURI.substring(1, 4)) { case "js/" : strlist.add("text/javascript"); break; case "css" : strlist.add("text/css"); break; default : strlist.add("text"); break; diff --git a/WebServer/src/code/Server.java b/WebServer/src/code/Server.java index 8df0ca64d4d414f26597163cf764ed871b548bc4..81806bf66b3ea004293b4758b989f9058cf4be02 100644 --- a/WebServer/src/code/Server.java +++ b/WebServer/src/code/Server.java @@ -21,7 +21,7 @@ public class Server { // private static int port = 443; private static int port = 3000; - public static String CLIENT_PATH = "./../../webapp/public"; + public final static String CLIENT_PATH = "./../../webapp/public"; public static void main(String[] args) throws IOException { if (args.length > 1 && args[0].equals("-port")) @@ -30,6 +30,7 @@ public class Server { } catch (Exception e) { e.printStackTrace(); } + KeyCloak kcs = new KeyCloak(CLIENT_PATH + "/keycloak.json", CLIENT_PATH + "/params.json"); // HttpsServer server = HttpsServer.create(new InetSocketAddress(port), 0); HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); @@ -100,10 +101,17 @@ public class Server { // server.createContext("/api/antifurto/allarme/",new Antifurto());//get, put {se l'allarme sta suonando + aggiornamento} // server.createContext("/api/antifurto/attenzione/",new Antifurto());//put {valore della progress bar} // server.createContext("/api/antifurto/soglia/",new Antifurto());//put {valore scelto dall'utente per la soglia} - server.createContext("/js/",new Resources()); + server.createContext("/js/authentication/",new Resources()); + server.createContext("/js/templates/",new Resources()); server.createContext("/css/",new Resources()); server.createContext("/res/",new ImageRes()); - server.createContext("/",new Home()); + server.createContext("/secured/home/js/",new Resources()); + server.createContext("/secured/home/css/",new Resources()); + server.createContext("/secured/home/res/",new ImageRes()); + server.createContext("/secured/home/",new Home()); + server.createContext("/secured",new ObtainToken(kcs)); + server.createContext("/",new ObtainToken(kcs)); + server.setExecutor(Executors.newCachedThreadPool()); server.start(); System.out.println("webserver running on localhost:"+port); diff --git a/WebServer_con_KeycloakInstalled/.classpath b/WebServer_con_KeycloakInstalled/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..ffd7b59a2fc7564485ec21bf5563f002b2e9950d --- /dev/null +++ b/WebServer_con_KeycloakInstalled/.classpath @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> + <attributes> + <attribute name="module" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="lib" path="org.json-1.0.0.v201011060100.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/asm-9.1.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/asyncutil-0.1.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/bcpkix-jdk15on-1.68.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/bcprov-jdk15on-1.68.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/commons-codec-1.11.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/commons-io-2.9.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/commons-logging-1.2.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/httpclient-4.5.13.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/httpcore-4.4.13.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/jackson-annotations-2.13.2.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/jackson-core-2.13.2.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/jackson-databind-2.13.2.2.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/jakarta.activation-1.2.2.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/jakarta.activation-api-1.2.1.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/jakarta.validation-api-2.0.2.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/jboss-annotations-api_1.3_spec-2.0.1.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/jboss-jaxb-api_2.3_spec-2.0.0.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/jboss-jaxrs-api_2.1_spec-2.0.1.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/jboss-logging-3.4.1.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/jboss-threads-3.1.0.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/keycloak-adapter-core-19.0.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/keycloak-adapter-spi-19.0.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/keycloak-common-19.0.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/keycloak-core-19.0.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/keycloak-crypto-default-19.0.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/keycloak-installed-adapter-19.0.0.jar"> + <attributes> + <attribute name="javadoc_location" value="jar:file:/home/elisa/Documenti/Reti%202/GitLab/pissirsmarthome/WebServer/keycloak-installed-adapter-19.0.0-javadoc.jar!/"/> + </attributes> + </classpathentry> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/microprofile-config-api-2.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/reactive-streams-1.0.3.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/resteasy-client-4.7.4.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/resteasy-client-api-4.7.4.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/resteasy-core-4.7.4.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/resteasy-core-spi-4.7.4.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/smallrye-common-annotation-1.6.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/smallrye-common-classloader-1.6.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/smallrye-common-constraint-1.6.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/smallrye-common-expression-1.6.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/smallrye-common-function-1.6.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/smallrye-config-2.3.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/smallrye-config-common-2.3.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/smallrye-config-core-2.3.0.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/undertow-core-2.2.14.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/wildfly-client-config-1.0.1.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/wildfly-common-1.5.2.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/xnio-api-3.8.4.Final.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/jar_files_for_KeyCloak/xnio-nio-3.8.4.Final.jar"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/WebServer_con_KeycloakInstalled/.project b/WebServer_con_KeycloakInstalled/.project new file mode 100644 index 0000000000000000000000000000000000000000..193e0c6a21bba6ecbe4478b901b61bc5673ac40f --- /dev/null +++ b/WebServer_con_KeycloakInstalled/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>pissirsmarthome_WebServer</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> + <filteredResources> + <filter> + <id>1658153304390</id> + <name></name> + <type>30</type> + <matcher> + <id>org.eclipse.core.resources.regexFilterMatcher</id> + <arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> + </matcher> + </filter> + </filteredResources> +</projectDescription> diff --git a/WebServer_con_KeycloakInstalled/bin/code/Antifurto.class b/WebServer_con_KeycloakInstalled/bin/code/Antifurto.class new file mode 100644 index 0000000000000000000000000000000000000000..f871b0867c473ce9730206f1a112d9068e1b7959 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/bin/code/Antifurto.class differ diff --git a/WebServer_con_KeycloakInstalled/bin/code/Helper.class b/WebServer_con_KeycloakInstalled/bin/code/Helper.class new file mode 100644 index 0000000000000000000000000000000000000000..bb0f1d6d7685bd3bb13df1db55da9a7b001bf1c3 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/bin/code/Helper.class differ diff --git a/WebServer_con_KeycloakInstalled/bin/code/Home.class b/WebServer_con_KeycloakInstalled/bin/code/Home.class new file mode 100644 index 0000000000000000000000000000000000000000..db01145f8296e54e8c70c9c487a292c37e9c2fa9 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/bin/code/Home.class differ diff --git a/WebServer_con_KeycloakInstalled/bin/code/ImageRes.class b/WebServer_con_KeycloakInstalled/bin/code/ImageRes.class new file mode 100644 index 0000000000000000000000000000000000000000..acc095a51658baea141ce0f88df0e85d4b514735 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/bin/code/ImageRes.class differ diff --git a/WebServer_con_KeycloakInstalled/bin/code/Luci.class b/WebServer_con_KeycloakInstalled/bin/code/Luci.class new file mode 100644 index 0000000000000000000000000000000000000000..66ed0d2ba7c80cf7a72091952eb6039a0ffbd35a Binary files /dev/null and b/WebServer_con_KeycloakInstalled/bin/code/Luci.class differ diff --git a/WebServer_con_KeycloakInstalled/bin/code/MissingPage.class b/WebServer_con_KeycloakInstalled/bin/code/MissingPage.class new file mode 100644 index 0000000000000000000000000000000000000000..22370e28580b139b3ff860fe5f3a479108e7f23d Binary files /dev/null and b/WebServer_con_KeycloakInstalled/bin/code/MissingPage.class differ diff --git a/WebServer_con_KeycloakInstalled/bin/code/Resources.class b/WebServer_con_KeycloakInstalled/bin/code/Resources.class new file mode 100644 index 0000000000000000000000000000000000000000..91d92f9127731a65dbbd38f1c1b080a612eba74e Binary files /dev/null and b/WebServer_con_KeycloakInstalled/bin/code/Resources.class differ diff --git a/WebServer_con_KeycloakInstalled/bin/code/Server.class b/WebServer_con_KeycloakInstalled/bin/code/Server.class new file mode 100644 index 0000000000000000000000000000000000000000..b427dbc3fc2f8786545a9918ccfde70e080a2c6b Binary files /dev/null and b/WebServer_con_KeycloakInstalled/bin/code/Server.class differ diff --git a/WebServer_con_KeycloakInstalled/cert.pem b/WebServer_con_KeycloakInstalled/cert.pem new file mode 100644 index 0000000000000000000000000000000000000000..c2b2907814c0b83892535fe2e9802b2066f6c715 --- /dev/null +++ b/WebServer_con_KeycloakInstalled/cert.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx +EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT +EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp +ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIz +NTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH +EwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8GA1UE +AxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD +E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH +/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD+qK+ihVqf94Lw7YZFAXK6sOoBJQ7Rnwy +DfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutdfMh8+7ArU6SSYmlRJQVh +GkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMlNAJWJwGR +tDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEA +AaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE +FDqahQcQZyi27/a9BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmX +WWcDYfF+OwYxdS2hII5PZYe096acvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu +9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr +gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo +2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO +LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI +4uJEvlz36hz1 +-----END CERTIFICATE----- diff --git a/WebServer_con_KeycloakInstalled/curlCalls.txt b/WebServer_con_KeycloakInstalled/curlCalls.txt new file mode 100644 index 0000000000000000000000000000000000000000..f404ea34bbc2c1801a9c2dc29e2d4c393aa0d074 --- /dev/null +++ b/WebServer_con_KeycloakInstalled/curlCalls.txt @@ -0,0 +1,33 @@ +GET + +curl localhost:3000 + +POST + +curl -X POST -H "Content-Type: application/json" -d "{JSON}" localhost:3000 + +curl -X POST "YOUR_URI" -F 'file=@/file-path.csv' + + +PUT + +curl -X PUT -H "Content-Type: application/json" -d "{JSON}" -d "{newJSON}" localhost:3000 + +curl -X PUT -H "Content-Type: multipart/form-data;" -F "key1=val1" localhost:3000 + +curl -X PUT -H "Content-Type: application/json" -d "{'email': 'text@mail.com'}" localhost:3000/bulloni?email=linuxize@example.com + + +DELETE + + +curl -X DELETE -d "{JSON}" localhost:3000 + +curl -X DELETE localhost:3000/bulloni?email=linuxize@example.com + zsh: no matches found: localhost:3000/bulloni?email=linuxize@example.com + + + +HTTPS + +curl --cacert cert.pem -k -H "version: 1.0" https://localhost/ \ No newline at end of file diff --git a/WebServer_con_KeycloakInstalled/gencert.bash b/WebServer_con_KeycloakInstalled/gencert.bash new file mode 100644 index 0000000000000000000000000000000000000000..04edfc14bf0f2ae308545ba85781d5307aeda4aa --- /dev/null +++ b/WebServer_con_KeycloakInstalled/gencert.bash @@ -0,0 +1 @@ +keytool -genkeypair -keyalg RSA -alias self_signed -keypass miapasswd -keystore lig.keystore -storepass miapasswd diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/asm-9.1.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/asm-9.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..823801988835759bceb16035e2214e2d0f89d970 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/asm-9.1.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/asyncutil-0.1.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/asyncutil-0.1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..29c267e669a239c18fb840b97cd4cb1c82dad971 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/asyncutil-0.1.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/bcpkix-jdk15on-1.68.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/bcpkix-jdk15on-1.68.jar new file mode 100644 index 0000000000000000000000000000000000000000..1b6385d894b21701b7e8704cca66c6904f33c2ab Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/bcpkix-jdk15on-1.68.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/bcprov-jdk15on-1.68.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/bcprov-jdk15on-1.68.jar new file mode 100644 index 0000000000000000000000000000000000000000..84ae48522ee97388cda33aee39de434f984276a5 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/bcprov-jdk15on-1.68.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/commons-codec-1.11.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/commons-codec-1.11.jar new file mode 100644 index 0000000000000000000000000000000000000000..22451206dd591944cca1f25a4be90fa47f67c585 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/commons-codec-1.11.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/commons-io-2.9.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/commons-io-2.9.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..09fe0345cd4a915d7483e8cd133facbf5cba6572 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/commons-io-2.9.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/commons-logging-1.2.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/commons-logging-1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..93a3b9f6db406c84e270e19b9a5e70f2e27ca513 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/commons-logging-1.2.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/httpclient-4.5.13.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/httpclient-4.5.13.jar new file mode 100644 index 0000000000000000000000000000000000000000..218ee25f2b11b65c83c16dbea9d47f652c4993b0 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/httpclient-4.5.13.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/httpcore-4.4.13.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/httpcore-4.4.13.jar new file mode 100644 index 0000000000000000000000000000000000000000..163dc438cbb4ff9302855d40976ba8d02bf7450c Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/httpcore-4.4.13.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jackson-annotations-2.13.2.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jackson-annotations-2.13.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..979c525594d4da8a21f26ec8c44d0884fbe45e4d Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jackson-annotations-2.13.2.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jackson-core-2.13.2.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jackson-core-2.13.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..20122306e1155aac59fa7bd2b64a48a1cf282e37 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jackson-core-2.13.2.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jackson-databind-2.13.2.2.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jackson-databind-2.13.2.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..62279562db81e421340ea1eb45ad7fac80aca51f Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jackson-databind-2.13.2.2.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jakarta.activation-1.2.2.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jakarta.activation-1.2.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..bddea4956de6bd5cd11cd82d5a4f36298cdfbc00 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jakarta.activation-1.2.2.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jakarta.activation-api-1.2.1.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jakarta.activation-api-1.2.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..bbfb52ff01e082afd65ee6444f2645e999f98ee0 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jakarta.activation-api-1.2.1.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jakarta.validation-api-2.0.2.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jakarta.validation-api-2.0.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..d68c9f7f36d2cfda66f0b89e0719b73b034143b5 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jakarta.validation-api-2.0.2.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-annotations-api_1.3_spec-2.0.1.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-annotations-api_1.3_spec-2.0.1.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..5effa7ee5f3f5b9b7a992677f4358c73353ce1eb Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-annotations-api_1.3_spec-2.0.1.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-jaxb-api_2.3_spec-2.0.0.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-jaxb-api_2.3_spec-2.0.0.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..e00aea15d55db6356061bd5d795b50e4001c51d6 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-jaxb-api_2.3_spec-2.0.0.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-jaxrs-api_2.1_spec-2.0.1.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-jaxrs-api_2.1_spec-2.0.1.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a8ffeb31437ecadb1fc5ed64f47823a00d964a6f Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-jaxrs-api_2.1_spec-2.0.1.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-logging-3.4.1.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-logging-3.4.1.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..42cd1e0a86e7bd42b47495e3c0936c599da8e39e Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-logging-3.4.1.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-threads-3.1.0.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-threads-3.1.0.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b23b4583238617919f3e970c2e2a3f44afddf966 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/jboss-threads-3.1.0.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-adapter-core-19.0.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-adapter-core-19.0.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..8920e77d0f4ef1132f259b7e73211bc0ca4dcf5b Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-adapter-core-19.0.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-adapter-spi-19.0.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-adapter-spi-19.0.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..ba6c4ab7353ef210f2edf4684dbce379a18004d0 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-adapter-spi-19.0.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-common-19.0.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-common-19.0.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..2ce0006bf38b922fe7a4458ed0518ab4437636ed Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-common-19.0.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-core-19.0.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-core-19.0.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..906d6302368504b6da7c2a9247780913bfc557e6 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-core-19.0.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-crypto-default-19.0.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-crypto-default-19.0.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..e8320b43bc06a56365ac5cee2938653dd05cdefa Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-crypto-default-19.0.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-installed-adapter-19.0.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-installed-adapter-19.0.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..cb8198c5993f0a45fa68244a6a8d3cf94716545f Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/keycloak-installed-adapter-19.0.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/microprofile-config-api-2.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/microprofile-config-api-2.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..23d47d48b9b9567e23745e8cb836278698a5ed03 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/microprofile-config-api-2.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/reactive-streams-1.0.3.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/reactive-streams-1.0.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..b9b487caa3af3a32860dc1e0d68b84da62361b68 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/reactive-streams-1.0.3.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-client-4.7.4.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-client-4.7.4.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..1624ac9f8e01751f2222cfb85839ec86f8d6193d Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-client-4.7.4.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-client-api-4.7.4.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-client-api-4.7.4.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..bf371af1d8e9e3aba76de94b102b86dad6a48004 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-client-api-4.7.4.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-core-4.7.4.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-core-4.7.4.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..12d27e06ab8362b7d50b140853c5f03b708eb1a0 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-core-4.7.4.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-core-spi-4.7.4.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-core-spi-4.7.4.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..1adc7a81bca46ae6b56c76666b0b9a0c6da725e8 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/resteasy-core-spi-4.7.4.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-annotation-1.6.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-annotation-1.6.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..fd914e85a9b43599940fdd8d99754de29bac9738 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-annotation-1.6.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-classloader-1.6.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-classloader-1.6.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..effff4d1d415440aada650f33203aea6239d62ce Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-classloader-1.6.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-constraint-1.6.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-constraint-1.6.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..169dcd203c109821ca37786c9d05da736f37addc Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-constraint-1.6.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-expression-1.6.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-expression-1.6.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..69bffd4f644960887b58974f2e49a7a54de2b48b Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-expression-1.6.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-function-1.6.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-function-1.6.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..c9b31302941282eba0cd76e9879bb7bcc141df98 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-common-function-1.6.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-config-2.3.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-config-2.3.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..eab64266fddab9bad12ae5155e159970df91fb01 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-config-2.3.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-config-common-2.3.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-config-common-2.3.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..a4ae49aea7517c4afdf9120d5f1d9cbd6540b1ce Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-config-common-2.3.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-config-core-2.3.0.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-config-core-2.3.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..ab07502817f9a245fdd31c2740c88c585d5ce4ee Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/smallrye-config-core-2.3.0.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/undertow-core-2.2.14.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/undertow-core-2.2.14.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..4bea6485d0752445e9503dc8e849c51a692d663c Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/undertow-core-2.2.14.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/wildfly-client-config-1.0.1.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/wildfly-client-config-1.0.1.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..370e8c7f3064412393b13b2a6acfaab39f68b1d8 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/wildfly-client-config-1.0.1.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/wildfly-common-1.5.2.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/wildfly-common-1.5.2.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..ee20409f0f701c26c86c14847ac92477edb9e8ec Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/wildfly-common-1.5.2.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/xnio-api-3.8.4.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/xnio-api-3.8.4.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b27e13e75e2a0c144f0e1007778f8eed171bd08d Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/xnio-api-3.8.4.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/xnio-nio-3.8.4.Final.jar b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/xnio-nio-3.8.4.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..3e6a51043a08ab4181daa4a49e1e46f740d26d11 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/jar_files_for_KeyCloak/xnio-nio-3.8.4.Final.jar differ diff --git a/WebServer_con_KeycloakInstalled/keycloak-core-19.0.0-javadoc.jar b/WebServer_con_KeycloakInstalled/keycloak-core-19.0.0-javadoc.jar new file mode 100644 index 0000000000000000000000000000000000000000..cda17c8bdba986a6585da4635f29789f6e1b4d80 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/keycloak-core-19.0.0-javadoc.jar differ diff --git a/WebServer_con_KeycloakInstalled/keycloak-installed-adapter-19.0.0-javadoc.jar b/WebServer_con_KeycloakInstalled/keycloak-installed-adapter-19.0.0-javadoc.jar new file mode 100644 index 0000000000000000000000000000000000000000..f0ef1c9161d86ee7ee682685b526c184d16e0d5f Binary files /dev/null and b/WebServer_con_KeycloakInstalled/keycloak-installed-adapter-19.0.0-javadoc.jar differ diff --git a/WebServer_con_KeycloakInstalled/org.json-1.0.0.v201011060100.jar b/WebServer_con_KeycloakInstalled/org.json-1.0.0.v201011060100.jar new file mode 100644 index 0000000000000000000000000000000000000000..2aa70fdf80f4cc14a2063a8f118c847506c6c579 Binary files /dev/null and b/WebServer_con_KeycloakInstalled/org.json-1.0.0.v201011060100.jar differ diff --git a/WebServer_con_KeycloakInstalled/server.bash b/WebServer_con_KeycloakInstalled/server.bash new file mode 100755 index 0000000000000000000000000000000000000000..54212caa63c39151de0142e889c42d5e73473d14 --- /dev/null +++ b/WebServer_con_KeycloakInstalled/server.bash @@ -0,0 +1,5 @@ +#!/bin/bash +javac -cp .:./org.json-1.0.0.v201011060100.jar:./jar_files_for_KeyCloak/* -d bin src/code/* +echo 'server compiled' +cd bin +java -classpath .:../org.json-1.0.0.v201011060100.jar:../jar_files_for_KeyCloak/* code.Server $1 diff --git a/WebServer_con_KeycloakInstalled/src/code/Antifurto.java b/WebServer_con_KeycloakInstalled/src/code/Antifurto.java new file mode 100644 index 0000000000000000000000000000000000000000..285f85061617e451116d6f3757f58c372bfe66ea --- /dev/null +++ b/WebServer_con_KeycloakInstalled/src/code/Antifurto.java @@ -0,0 +1,146 @@ +package code; + +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class Antifurto implements HttpHandler { + + private boolean statoAntifurto = true; + private boolean statoAllarme = false; + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + String path[] = requestURI.toString().split("/"); + String lastfile = path[path.length - 1]; + + String requestMethod = exchange.getRequestMethod(); + List<String> strlist = new ArrayList<>(); //serve List<String> a causa di .put("content-type", strlist); + strlist.add("text/json"); + exchange.getResponseHeaders().put("content-type", strlist);//opzionale, per dire cosa c'e' nel body + + if(Helper.compareText(lastfile,"antifurto")) {//get {stato, allarme, attenzione, soglia, sensori} + if(Helper.compareText(requestMethod,"GET")) { + String response = "{\"stato\":true,\"soglia\":43,\"attenzione\":21,\"allarme\":false,\"sensori\":[{\"in0\":8},{\"in2\":3}]}"; + statoAntifurto = true; + statoAllarme = false; + Helper.sendResponse(response,exchange); + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + if(Helper.compareText(lastfile,"stato")) {//get, put {se l'antifurto e' attivo + aggiornamento} + if(Helper.compareText(requestMethod,"GET")) { + String response = "{\"stato\":true}"; + Helper.sendResponse(response,exchange); + } else if(Helper.compareText(requestMethod,"PUT")) { + String body = Helper.readBody(exchange.getRequestBody()); + if(!Helper.checkJSON(body) || !body.contains("\"stato\"")) { + Helper.badRequest(exchange); + return; + } + String stato = body.split("\"stato\"",2)[1].split(":",2)[1].split(",",2)[0].split("}",2)[0].trim(); + + try { + boolean exStato = statoAntifurto; + statoAntifurto = Boolean.parseBoolean(stato); + if(exStato == statoAntifurto) + System.out.println("\tRicevuto stato antifurto gia' assegnato"); + if(statoAllarme && !statoAntifurto) { + Helper.badRequest(exchange); + return; + } + + String response = "{\"antifurto\":\"ok\",\"stato\":"+statoAntifurto+"}"; + Helper.sendResponse(response,exchange); + } catch (Exception e) { + System.out.println("Conversion error.\t"+stato); + e.printStackTrace(); + Helper.badRequest(exchange); + } + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + if(Helper.compareText(lastfile,"allarme")) {//get, put {se l'allarme sta suonando + aggiornamento} + if(Helper.compareText(requestMethod,"GET")) { + String response = "{\"dati\":\"ecco l'allarme\"}"; + Helper.sendResponse(response,exchange); + } else if(Helper.compareText(requestMethod,"PUT")) { + String body = Helper.readBody(exchange.getRequestBody()); + if(!Helper.checkJSON(body) || !body.contains("\"stato\"")) { + Helper.badRequest(exchange); + return; + } + String stato = body.split("\"stato\"",2)[1].split(":",2)[1].split(",",2)[0].split("}",2)[0].trim(); + + try { + boolean exStato = statoAllarme; + statoAllarme = Boolean.parseBoolean(stato); + if(exStato == statoAllarme) + System.out.println("\tRicevuto stato allarme gia' assegnato"); + if(statoAllarme && !statoAntifurto) { + Helper.badRequest(exchange); + return; + } + String response = "{\"allarme\":\"ok\",\"stato\":"+statoAllarme+"}"; + Helper.sendResponse(response,exchange); + } catch (Exception e) { + System.out.println("Conversion error.\t"+stato); + e.printStackTrace(); + Helper.badRequest(exchange); + } + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + if(Helper.compareText(lastfile,"attenzione")) {//put {valore della progress bar} + if(Helper.compareText(requestMethod,"PUT")) { + String body = Helper.readBody(exchange.getRequestBody()); + if(!Helper.checkJSON(body) || !body.contains("\"attenzione\"")) { + Helper.badRequest(exchange); + return; + } + String valore = body.split("\"attenzione\"",2)[1].split(":",2)[1].split(",",2)[0].split("}",2)[0].trim(); + try { + int val = Integer.parseInt(valore); + + String response = "{\"attenzione\":"+val+"}"; + Helper.sendResponse(response,exchange); + } catch (Exception e) { + System.out.println("Conversion error.\t"+valore); + e.printStackTrace(); + Helper.badRequest(exchange); + } + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + if(Helper.compareText(lastfile,"soglia")) {//put {valore scelto dall'utente per la soglia} + if(Helper.compareText(requestMethod,"PUT")) { + System.out.println(Helper.readBody(exchange.getRequestBody())); + String response = "{\"dati\":\"soglia aggiornata\"}"; + Helper.sendResponse(response,exchange); + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + Helper.pageNotFound(exchange); + } + +} diff --git a/WebServer_con_KeycloakInstalled/src/code/Helper.java b/WebServer_con_KeycloakInstalled/src/code/Helper.java new file mode 100644 index 0000000000000000000000000000000000000000..85699ce101f361a52056d6f9b37f8ba76f50e7db --- /dev/null +++ b/WebServer_con_KeycloakInstalled/src/code/Helper.java @@ -0,0 +1,76 @@ +package code; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.json.JSONException; +import org.json.JSONObject; + +import com.sun.net.httpserver.HttpExchange; + +public class Helper { + + public static void sendResponse(String response, HttpExchange exchange) throws IOException { + System.out.println(response); + exchange.sendResponseHeaders(200, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static void badRequest(HttpExchange exchange) throws IOException { + System.out.println("Errors in the request!"); +// exchange.getResponseHeaders().remove("content-type"); + String response = "{\"message\":\"Errors in the request!\"}"; + exchange.sendResponseHeaders(400, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static void pageNotFound(HttpExchange exchange) throws IOException { + System.out.println("Page not found!"); +// exchange.getResponseHeaders().remove("content-type"); + String response = "{\"message\":\"Page not found!\"}"; + exchange.sendResponseHeaders(404, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static void methodNotAllowed(HttpExchange exchange) throws IOException { + System.out.println("Method not allowed!"); +// exchange.getResponseHeaders().remove("content-type"); + String response = "{\"message\":\"Method not allowed!\"}"; + exchange.sendResponseHeaders(405, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static boolean compareText(String a, String b){ + return a.compareToIgnoreCase(b) == 0; + } + + public static String readBody(InputStream requestBody) { + int req; + StringBuffer sb = new StringBuffer(); + try { + while((req = requestBody.read()) != -1) + sb.append(Character.toString((char)req)); + } catch (IOException e) { + e.printStackTrace(); + } + return sb.toString(); + } + + public static boolean checkJSON(String body) { + try { + new JSONObject(body); + return true; + } catch (JSONException e) { + return false; + } + } +} diff --git a/WebServer_con_KeycloakInstalled/src/code/Home.java b/WebServer_con_KeycloakInstalled/src/code/Home.java new file mode 100644 index 0000000000000000000000000000000000000000..9e592f82ea67f1a704f0106af449ea61c8f768f5 --- /dev/null +++ b/WebServer_con_KeycloakInstalled/src/code/Home.java @@ -0,0 +1,230 @@ +package code; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +import org.json.JSONException; +import org.json.JSONObject; +import org.keycloak.representations.AccessToken; +import org.keycloak.OAuthErrorException; +import org.keycloak.adapters.ServerRequest.HttpFailure; +import org.keycloak.adapters.installed.KeycloakInstalled; +import org.keycloak.common.VerificationException; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class Home implements HttpHandler { + + private KeycloakInstalled kcs; + private AccessToken token; + + public Home() { + kcs = null; + token = null; + } + +// public Home() { +// String path = "../../webapp/public/keycloak.json"; +// try { +// File f = new File(path); +// InputStream is = new FileInputStream(f); +// kcs = new KeycloakInstalled(is); // reads the configuration from InputStream +// kcs.loginDesktop(); // opens desktop browser +// token = kcs.getToken(); +// } catch (FileNotFoundException e1) { +// // TODO Auto-generated catch block +// System.out.println("Unable to open file '" + path + "'"); +// e1.printStackTrace(); +// } +// catch (IOException | VerificationException | OAuthErrorException | URISyntaxException | HttpFailure +// | InterruptedException e) { +// e.printStackTrace(); +// } +// } + + @Override + public void handle(HttpExchange exchange) throws IOException { +// if(kcs==null && token==null) { +// kcs = new KeycloakInstalled(); // reads the configuration from classpath: META-INF/keycloak.json +// // keycloak.setLocale(Locale.ENGLISH); +// try { +// kcs.loginDesktop(); // opens desktop browser +// } catch (IOException | VerificationException | OAuthErrorException | URISyntaxException | HttpFailure +// | InterruptedException e) { +// e.printStackTrace(); +// } +// +// token = kcs.getToken(); +// } + + + if(token==null) { + String path = "../../webapp/public/keycloak.json"; + try { + File f = new File(path); + InputStream is = new FileInputStream(f); + kcs = new KeycloakInstalled(is); // reads the configuration from InputStream +// kcs.setListenPort(3000); + System.out.println("listen port = "+kcs.getListenPort()); + System.out.println("listen hostname = "+kcs.getListenHostname()); + kcs.loginDesktop(); // opens desktop browser + token = kcs.getToken(); + } catch (FileNotFoundException e1) { + System.out.println("Unable to open file '" + path + "'"); + } + catch (IOException | VerificationException | OAuthErrorException | URISyntaxException | HttpFailure + | InterruptedException e) { + System.out.println("Error: "+ e.getMessage()); +// e.printStackTrace(); + } + } + System.out.println("keycloak object = "+ kcs); + System.out.println("Token = "+ kcs.getTokenString()); + URI requestURI = exchange.getRequestURI(); + boolean wantsHome = Helper.compareText(requestURI.toString(),URI.create("/").toString()); + boolean wantsKeycloak = Helper.compareText(requestURI.toString(),URI.create("/keycloak.json").toString()); + if(!wantsHome && !wantsKeycloak) { + String error = "Invalid URI"; + OutputStream os = exchange.getResponseBody(); + exchange.sendResponseHeaders(400, error.getBytes().length); + os.write(error.getBytes()); + os.close(); + return; + } + + String requestMethod = exchange.getRequestMethod(); + if (Helper.compareText(requestMethod, "GET")) { + List<String> strlist = new ArrayList<>(); + String response = null; + if(wantsHome){ + response = getHomePage(); + strlist.add("text/html"); + } else if (wantsKeycloak){ + response = getKeycloak(); + strlist.add("text/json"); + } + if(response != null && !Helper.compareText(response, "fail")){ + exchange.getResponseHeaders().put("content-type", strlist); + exchange.sendResponseHeaders(200, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } else { + exchange.sendResponseHeaders(500, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + } else { + Helper.methodNotAllowed(exchange); + } + } + + private static String getHomePage() { + String line; +// String pageIDString = pageid.toString(); + String page = Server.CLIENT_PATH+"/index.html";// + pageIDString.substring(0, pageIDString.length() - 1) + ".txt";// entro nella cartella + // html e leggo il file + // txt + + StringBuilder answer = new StringBuilder(); + if (getExtension(page).length() == 0) + page += ".html"; + + BufferedReader bufferedReader = null; + try { + FileReader fileReader = new FileReader(page); + + bufferedReader = new BufferedReader(fileReader); + boolean isComment = false; + while ((line = bufferedReader.readLine()) != null) { + line = line.trim(); + + if(line.startsWith("<!--") && line.endsWith("-->")) { + continue; + } + if(line.startsWith("<!--")) { + isComment = true; + continue; + } + if(line.endsWith("-->")) { + isComment = false; + continue; + } + + if(!isComment && line.length()>0) + answer.append(line).append("\n"); + } + } catch (FileNotFoundException ex) { + System.out.println("Unable to open file '" + page + "'"); + return "fail"; + } catch (IOException ex) { + System.out.println("Error reading file '" + page + "'"); + return "fail"; + } finally { + try{ + if(bufferedReader != null) + bufferedReader.close(); + } catch (IOException ex){ + System.out.println("Error closing bufferedReader"); + } + } + return answer.toString(); + } + + private static String getKeycloak(){ + String page = Server.CLIENT_PATH+"/keycloak.json"; + BufferedReader bufferedReader = null; + StringBuilder answer = new StringBuilder(); + try { + FileReader fileReader = new FileReader(page); + bufferedReader = new BufferedReader(fileReader); + String line; + while ((line = bufferedReader.readLine()) != null) { + answer.append(line.trim()); + } + + JSONObject js = new JSONObject(answer.toString()); + return js.toString(); + } catch (FileNotFoundException ex) { + System.out.println("Unable to open file '" + page + "'"); + return "fail"; + } catch (IOException ex) { + System.out.println("Error reading file '" + page + "'"); + return "fail"; + } catch (JSONException e) { + System.out.println("The file doesn't contain a JSON '" + page + "'"); + return "fail"; + } finally { + try{ + if(bufferedReader != null) + bufferedReader.close(); + } catch (IOException ex){ + System.out.println("Error closing bufferedReader"); + } + } + } + + private static String getExtension(String file) { + int i = file.length() - 1; + while (i > 0 && file.charAt(i) != '.' && file.charAt(i) != '/') + i--; + if (file.charAt(i) == '.') + return file.substring(i + 1); + else + return ""; + } + +} \ No newline at end of file diff --git a/WebServer_con_KeycloakInstalled/src/code/ImageRes.java b/WebServer_con_KeycloakInstalled/src/code/ImageRes.java new file mode 100644 index 0000000000000000000000000000000000000000..87b766aed14e7d52f905aee13caa74a39d4d724f --- /dev/null +++ b/WebServer_con_KeycloakInstalled/src/code/ImageRes.java @@ -0,0 +1,56 @@ +package code; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import javax.imageio.ImageIO; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class ImageRes implements HttpHandler { + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + + String requestMethod = exchange.getRequestMethod(); + if (Helper.compareText(requestMethod, "GET")) { + BufferedImage image = getLocalImage(requestURI.toASCIIString()); + if (image == null) + Helper.pageNotFound(exchange); + List<String> strlist = new ArrayList<>(); + strlist.add("image/png"); + OutputStream os = exchange.getResponseBody(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageIO.write(image, "png", baos); + baos.flush(); + byte[] imageInByte = baos.toByteArray(); + exchange.getResponseHeaders().put("content-type", strlist); + exchange.sendResponseHeaders(200, imageInByte.length); + os.write(imageInByte); + os.close(); + } else { + Helper.methodNotAllowed(exchange); + } + } + + private BufferedImage getLocalImage(String uri) { + String page = Server.CLIENT_PATH + uri; + try { + File f = new File(page); + BufferedImage image = ImageIO.read(f); + return image; + } catch (IOException e) { + System.out.println("Error reading file '" + page + "'"); + return null; + } + } + +} diff --git a/WebServer_con_KeycloakInstalled/src/code/Luci.java b/WebServer_con_KeycloakInstalled/src/code/Luci.java new file mode 100644 index 0000000000000000000000000000000000000000..b3844908021496b5b91254b729805788fc900099 --- /dev/null +++ b/WebServer_con_KeycloakInstalled/src/code/Luci.java @@ -0,0 +1,78 @@ +package code; + +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class Luci implements HttpHandler { + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + String path[] = requestURI.getPath().split("/"); + String lastfile = path[path.length - 1]; + + String requestMethod = exchange.getRequestMethod(); + List<String> strlist = new ArrayList<>(); //serve List<String> a causa di .put("content-type", strlist); + strlist.add("text/json"); + exchange.getResponseHeaders().put("content-type", strlist);//opzionale, per dire cosa c'e' nel body + + if(Helper.compareText(lastfile,"luci")) {//post, get [put, delete] {luogo e stato di tutte luci} + if(Helper.compareText(requestMethod,"GET")) { + String response = "[{\"luogo\":\"ingresso\",\"stato\":true,\"in\":\"in2\",\"out\":\"out2\"},{\"luogo\":\"cucina\",\"stato\":false,\"in\":\"in3\",\"out\":\"out3\"}]"; + Helper.sendResponse(response,exchange); +// Helper.methodNotAllowed(exchange); + } else if(Helper.compareText(requestMethod,"POST")) { + String body = Helper.readBody(exchange.getRequestBody()); + //check body is json or xml + if(!Helper.checkJSON(body) || !body.contains("\"luogo\"")) { + Helper.badRequest(exchange); + return; + } + String luogo = body.split("\"luogo\"",2)[1].split("\"",3)[1].trim(); + + String response = "{\"luogo\":\""+luogo+"\"}"; + Helper.sendResponse(response,exchange); + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + if(Helper.compareText(lastfile,"stato")) {//put {aggiorna lo stato di una luce} + if(Helper.compareText(requestMethod,"PUT")) { + String body = Helper.readBody(exchange.getRequestBody()); + //check body is json or xml + if(!Helper.checkJSON(body) || !body.contains("\"luogo\"")) { + Helper.badRequest(exchange); + return; + } + String stato = body.split("\"stato\"",2)[1].split(":",3)[1].split(",",2)[0].split("}",2)[0].trim(); + try { + boolean st = Boolean.parseBoolean(stato); + + String response = "{\"luce\":\"ok\",\"stato\":"+st+"}"; + Helper.sendResponse(response,exchange); + } catch (Exception e) { + System.out.println("Conversion error.\t"+stato); + e.printStackTrace(); + Helper.badRequest(exchange); + } + } else { + Helper.methodNotAllowed(exchange); + } + return; + } + + Helper.pageNotFound(exchange); + } + + + + + +} diff --git a/WebServer_con_KeycloakInstalled/src/code/MissingPage.java b/WebServer_con_KeycloakInstalled/src/code/MissingPage.java new file mode 100644 index 0000000000000000000000000000000000000000..854ed4f771c59758f4163bae8d7f549b463f4f50 --- /dev/null +++ b/WebServer_con_KeycloakInstalled/src/code/MissingPage.java @@ -0,0 +1,15 @@ +package code; + +import java.io.IOException; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class MissingPage implements HttpHandler { + + @Override + public void handle(HttpExchange exchange) throws IOException { + Helper.pageNotFound(exchange); + } + +} diff --git a/WebServer_con_KeycloakInstalled/src/code/Resources.java b/WebServer_con_KeycloakInstalled/src/code/Resources.java new file mode 100644 index 0000000000000000000000000000000000000000..4792161b8834f5de4d56ae39722ae2ee1a163826 --- /dev/null +++ b/WebServer_con_KeycloakInstalled/src/code/Resources.java @@ -0,0 +1,97 @@ +package code; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class Resources implements HttpHandler { + + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + + String requestMethod = exchange.getRequestMethod(); + if (Helper.compareText(requestMethod, "GET")) { + String response = getLocalPage(requestURI.toASCIIString()); + if(response.equals("fail")){ + //nel caso in cui non ci sia il file (perche non stato scaricato), allora creo un file fittizzio per non far crashare tutto il resto + String[] requestedPath = requestURI.toASCIIString().split("/"); + // get the last element of requestedPath and remove .js + String[] requestedPage = requestedPath[requestedPath.length-1].split("\\."); + String className = requestedPage[0]; + // make requested page with the first letter capitalized + className = className.substring(0, 1).toUpperCase() + className.substring(1); + response = "class "+className+"{}\nexport default " +className; + } + List<String> strlist = new ArrayList<>(); + switch (requestURI.toASCIIString().substring(1, 4)) { + case "js/" : strlist.add("text/javascript"); break; + case "css" : strlist.add("text/css"); break; + default : strlist.add("text"); break; + } + exchange.getResponseHeaders().put("content-type", strlist); + exchange.sendResponseHeaders(200, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } else { + Helper.methodNotAllowed(exchange); + } + } + + private static String getLocalPage(String uri) { + String page = Server.CLIENT_PATH+uri; + StringBuilder answer = new StringBuilder(); + BufferedReader bufferedReader = null; + + try { + FileReader fileReader = new FileReader(page); + + bufferedReader = new BufferedReader(fileReader); + boolean isComment = false; + String line; + while ((line = bufferedReader.readLine()) != null) { + line = line.trim(); + if((line.startsWith("/*") && line.endsWith("*/")) || line.startsWith("//")) { + continue; + } + if(line.startsWith("/*")) { + isComment = true; + continue; + } + if(line.endsWith("*/")) { + isComment = false; + continue; + } + if(!isComment && line.length()>0) + answer.append(line).append("\n"); + } + } catch (FileNotFoundException ex) { + System.out.println("Unable to open file '" + page + "'"); + return "fail"; + } catch (IOException ex) { + System.out.println("Error reading file '" + page + "'"); + return "fail"; + } finally { + try{ + if(bufferedReader != null) + bufferedReader.close(); + } catch (IOException ex){ + System.out.println("Error closing bufferedReader"); + } + } + return answer.substring(0,answer.length()-1); + } + + + +} diff --git a/WebServer_con_KeycloakInstalled/src/code/Server.java b/WebServer_con_KeycloakInstalled/src/code/Server.java new file mode 100644 index 0000000000000000000000000000000000000000..d0f17830182a67e71540967c13f5d12ba5eff8a1 --- /dev/null +++ b/WebServer_con_KeycloakInstalled/src/code/Server.java @@ -0,0 +1,113 @@ +package code; + +/*import java.io.FileInputStream; +import java.security.KeyStore; + +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLParameters; +import javax.net.ssl.TrustManagerFactory; + +import com.sun.net.httpserver.HttpsConfigurator; +import com.sun.net.httpserver.HttpsParameters; +import com.sun.net.httpserver.HttpsServer;*/ +import java.io.IOException; +import java.net.InetSocketAddress; +import java.util.concurrent.Executors; +import com.sun.net.httpserver.HttpServer; + +public class Server { + +// private static int port = 443; + private static int port = 3000; + public static String CLIENT_PATH = "./../../webapp/public"; + + public static void main(String[] args) throws IOException { + if (args.length > 1 && args[0].equals("-port")) + try { + port = Integer.parseInt(args[1]); + } catch (Exception e) { + e.printStackTrace(); + } +// HttpsServer server = HttpsServer.create(new InetSocketAddress(port), 0); + HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); + + // initialise the HTTPS server + /*try { + SSLContext sslContext = SSLContext.getInstance("TLS"); + + // initialise the keystore + char[] password = "simulator".toCharArray(); + KeyStore ks = KeyStore.getInstance("JKS"); + FileInputStream fis = new FileInputStream("testkey.jks"); + ks.load(fis, password); + + // setup the key manager factory + KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); + kmf.init(ks, password); + + // setup the trust manager factory + TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); + tmf.init(ks); + + // setup the HTTPS context and parameters + sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); + server.setHttpsConfigurator(new HttpsConfigurator(sslContext) { + @Override + public void configure(HttpsParameters params) { + try { + // initialise the SSL context + SSLContext context = getSSLContext(); + SSLEngine engine = context.createSSLEngine(); + params.setNeedClientAuth(false); + params.setCipherSuites(engine.getEnabledCipherSuites()); + params.setProtocols(engine.getEnabledProtocols()); + + // Set the SSL parameters + SSLParameters sslParameters = context.getSupportedSSLParameters(); + params.setSSLParameters(sslParameters); + + } catch (Exception ex) { + System.out.println("Failed to create HTTPS port"); + } + } + }); + + //API del server + server.createContext("/js/",new Resources()); + server.createContext("/css/",new Resources()); + server.createContext("/res/",new ImageRes()); + server.createContext("/",new Home()); + +// server.setExecutor(Executors.newFixedThreadPool(11)); + server.setExecutor(Executors.newCachedThreadPool()); + server.start(); + System.out.println("webserver running on localhost:"+port); + } catch (Exception e) { + System.out.println("Failed to create HTTPS server on port " + port + " of localhost"); + e.printStackTrace(); + }*/ + //API del server +// server.createContext("/api/luci/",new Luci());//post, get [put, delete] {luogo e stato di tutte luci} +// server.createContext("/api/luci/stato/",new Luci());//put {aggiorna lo stato di una luce} +// server.createContext("/api/scenari/",new Scenari());//get {nome e data di tutti gli scenari} +// server.createContext("/api/scenari/attiva/",new Scenari());//put {attiva/disattiva} +// server.createContext("/api/scenari/registra/",new Scenari());//put {registra/termina} +// server.createContext("/api/scenari/salva/",new Scenari());//post {conferma salvataggio, altrimenti cancella dopo timer; ritorna i valori dello scenario} +// server.createContext("/api/antifurto/",new Antifurto());//get {stato, allarme, attenzione, soglia, sensori} +// server.createContext("/api/antifurto/stato/",new Antifurto());//get, put {se l'antifurto e' attivo + aggiornamento} +// server.createContext("/api/antifurto/allarme/",new Antifurto());//get, put {se l'allarme sta suonando + aggiornamento} +// server.createContext("/api/antifurto/attenzione/",new Antifurto());//put {valore della progress bar} +// server.createContext("/api/antifurto/soglia/",new Antifurto());//put {valore scelto dall'utente per la soglia} + server.createContext("/js/",new Resources()); + server.createContext("/css/",new Resources()); + server.createContext("/res/",new ImageRes()); + server.createContext("/",new Home()); +// server.createContext("/home",new Home()); + server.setExecutor(Executors.newCachedThreadPool()); + server.start(); + System.out.println("webserver running on localhost:"+port); + } + +} diff --git a/WebServer_con_KeycloakInstalled/testkey.jks b/WebServer_con_KeycloakInstalled/testkey.jks new file mode 100644 index 0000000000000000000000000000000000000000..a709bb78edd1ec288e9fcd7373a38346f27d2cbc Binary files /dev/null and b/WebServer_con_KeycloakInstalled/testkey.jks differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/.classpath b/WebServer_provaKeycloakSimileAWebAppDelProf/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..7b58445cef93eb55108728dd0729cdf25fb4e18e --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/.classpath @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> + <attributes> + <attribute name="module" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="lib" path="org.json-1.0.0.v201011060100.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/gson-2.8.2.jar"/> + <classpathentry kind="lib" path="/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/WebServer/org.apache.commons.io.jar"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/.project b/WebServer_provaKeycloakSimileAWebAppDelProf/.project new file mode 100644 index 0000000000000000000000000000000000000000..193e0c6a21bba6ecbe4478b901b61bc5673ac40f --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>pissirsmarthome_WebServer</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> + <filteredResources> + <filter> + <id>1658153304390</id> + <name></name> + <type>30</type> + <matcher> + <id>org.eclipse.core.resources.regexFilterMatcher</id> + <arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> + </matcher> + </filter> + </filteredResources> +</projectDescription> diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Authentication.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Authentication.class new file mode 100644 index 0000000000000000000000000000000000000000..6b1bda54ea8eb8def2e43b5cbb040005791d4ac2 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Authentication.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Helper.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Helper.class new file mode 100644 index 0000000000000000000000000000000000000000..a8d172b0075d6b154bbe9599e85ccec4ede9c32b Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Helper.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Home.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Home.class new file mode 100644 index 0000000000000000000000000000000000000000..c05009e2a71e8415f64142e4e82dd043a61e7c38 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Home.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/ImageRes.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/ImageRes.class new file mode 100644 index 0000000000000000000000000000000000000000..67936e0a6cec2b43b71ec5c50407bcfbb1c7c0f5 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/ImageRes.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/InitLogin.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/InitLogin.class new file mode 100644 index 0000000000000000000000000000000000000000..245495823c935951ef7478edc11c6fa6a292fbe6 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/InitLogin.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/KeyCloak.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/KeyCloak.class new file mode 100644 index 0000000000000000000000000000000000000000..d9490aaa337aa277cdfcbf6258ae358dc0d4d520 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/KeyCloak.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/MissingPage.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/MissingPage.class new file mode 100644 index 0000000000000000000000000000000000000000..9688a26b4792255b99ed9d4220a23af05c604b0b Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/MissingPage.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Resources.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Resources.class new file mode 100644 index 0000000000000000000000000000000000000000..15fe2c29c8c9ffbd72294f5f7fd298064b704370 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Resources.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$FakeHostnameVerifier.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$FakeHostnameVerifier.class new file mode 100644 index 0000000000000000000000000000000000000000..29849feb25b079276fde2d0ad67e5297afcc8f3d Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$FakeHostnameVerifier.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$FakeX509TrustManager.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$FakeX509TrustManager.class new file mode 100644 index 0000000000000000000000000000000000000000..524f75e1cf73a3251e9ad89e6bdbab3584302279 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$FakeX509TrustManager.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$_FakeHostnameVerifier.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$_FakeHostnameVerifier.class new file mode 100644 index 0000000000000000000000000000000000000000..1463990fb3ab58ac023ef2d4477f97ae3881d311 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$_FakeHostnameVerifier.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$_FakeX509TrustManager.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$_FakeX509TrustManager.class new file mode 100644 index 0000000000000000000000000000000000000000..286a845984d02114bf2774b968e3dfdde68f6d95 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities$_FakeX509TrustManager.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities.class new file mode 100644 index 0000000000000000000000000000000000000000..0f1a84853cdad731b52958cd839a4b68c6e2a557 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/SSLUtilities.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Server.class b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Server.class new file mode 100644 index 0000000000000000000000000000000000000000..82efb67d572977028fbaa913ae02bd6e8ab93187 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/bin/code/Server.class differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/cert.pem b/WebServer_provaKeycloakSimileAWebAppDelProf/cert.pem new file mode 100644 index 0000000000000000000000000000000000000000..c2b2907814c0b83892535fe2e9802b2066f6c715 --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/cert.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx +EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT +EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp +ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIz +NTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH +EwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8GA1UE +AxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD +E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH +/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD+qK+ihVqf94Lw7YZFAXK6sOoBJQ7Rnwy +DfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutdfMh8+7ArU6SSYmlRJQVh +GkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMlNAJWJwGR +tDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEA +AaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE +FDqahQcQZyi27/a9BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmX +WWcDYfF+OwYxdS2hII5PZYe096acvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu +9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr +gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo +2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO +LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI +4uJEvlz36hz1 +-----END CERTIFICATE----- diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/curlCalls.txt b/WebServer_provaKeycloakSimileAWebAppDelProf/curlCalls.txt new file mode 100644 index 0000000000000000000000000000000000000000..f404ea34bbc2c1801a9c2dc29e2d4c393aa0d074 --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/curlCalls.txt @@ -0,0 +1,33 @@ +GET + +curl localhost:3000 + +POST + +curl -X POST -H "Content-Type: application/json" -d "{JSON}" localhost:3000 + +curl -X POST "YOUR_URI" -F 'file=@/file-path.csv' + + +PUT + +curl -X PUT -H "Content-Type: application/json" -d "{JSON}" -d "{newJSON}" localhost:3000 + +curl -X PUT -H "Content-Type: multipart/form-data;" -F "key1=val1" localhost:3000 + +curl -X PUT -H "Content-Type: application/json" -d "{'email': 'text@mail.com'}" localhost:3000/bulloni?email=linuxize@example.com + + +DELETE + + +curl -X DELETE -d "{JSON}" localhost:3000 + +curl -X DELETE localhost:3000/bulloni?email=linuxize@example.com + zsh: no matches found: localhost:3000/bulloni?email=linuxize@example.com + + + +HTTPS + +curl --cacert cert.pem -k -H "version: 1.0" https://localhost/ \ No newline at end of file diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/gencert.bash b/WebServer_provaKeycloakSimileAWebAppDelProf/gencert.bash new file mode 100644 index 0000000000000000000000000000000000000000..04edfc14bf0f2ae308545ba85781d5307aeda4aa --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/gencert.bash @@ -0,0 +1 @@ +keytool -genkeypair -keyalg RSA -alias self_signed -keypass miapasswd -keystore lig.keystore -storepass miapasswd diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/gson-2.8.2.jar b/WebServer_provaKeycloakSimileAWebAppDelProf/gson-2.8.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..d0d030c6371cb44e7caee238f7bf148c7732ce28 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/gson-2.8.2.jar differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/org.apache.commons.io.jar b/WebServer_provaKeycloakSimileAWebAppDelProf/org.apache.commons.io.jar new file mode 100644 index 0000000000000000000000000000000000000000..7affdefcd2747f924d078dbe5e85bb1503532a4f Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/org.apache.commons.io.jar differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/org.json-1.0.0.v201011060100.jar b/WebServer_provaKeycloakSimileAWebAppDelProf/org.json-1.0.0.v201011060100.jar new file mode 100644 index 0000000000000000000000000000000000000000..2aa70fdf80f4cc14a2063a8f118c847506c6c579 Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/org.json-1.0.0.v201011060100.jar differ diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/server.bash b/WebServer_provaKeycloakSimileAWebAppDelProf/server.bash new file mode 100755 index 0000000000000000000000000000000000000000..62b8300a700d6e60764ef37751a8b7ee05c82bec --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/server.bash @@ -0,0 +1,5 @@ +#!/bin/bash +javac -cp .:./org.json-1.0.0.v201011060100.jar -d bin src/code/* +echo 'server compiled' +cd bin +java -classpath .:../org.json-1.0.0.v201011060100.jar code.Server $1 diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Authentication.java b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Authentication.java new file mode 100644 index 0000000000000000000000000000000000000000..3de0dcd846898b1fd15d45a9f908a1dcfe0feef7 --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Authentication.java @@ -0,0 +1,97 @@ +package code; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URL; + +import javax.net.ssl.HttpsURLConnection; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class Authentication implements HttpHandler { + + private static KeyCloak kcs; + private static String remoteHost; + private static String localHost; + private static String token; + + + public Authentication() throws MalformedURLException, IOException { + String path = "../webapp/public/"; + kcs = new KeyCloak(path+"keycloak.json", path+"params.json"); + remoteHost = kcs.authServer(); + localHost = "http://localhost:3000"; + token = ""; + } + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestUri = exchange.getRequestURI(); + String response; + String requestMethod = exchange.getRequestMethod(); + + if(requestMethod.compareTo("POST")==0 || requestMethod.compareTo("post")==0) { + URI tokenrq = URI.create(kcs.tokenRQ()); + response = postRemote(tokenrq, exchange.getRequestBody(), kcs.extraBody()); + token = response; + exchange.sendResponseHeaders(200, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + else { + Helper.methodNotAllowed(exchange); + } + + } + + private String postRemote(URI pageUri, InputStream httpBody, String extraBody) throws IOException { + String url = remoteHost + pageUri.toString(); + InputStream is; + InputStreamReader isr; + BufferedReader br; + String body = extraBody; + String response = ""; + int i; + char c; + while((i=httpBody.read()) != -1) { + c = (char)i; + body += c; + } + httpBody.close(); + URL myUrl = new URL(url); + SSLUtilities.trustAllHttpsCertificates(); + SSLUtilities.trustAllHostnames(); + HttpsURLConnection conn = (HttpsURLConnection)myUrl.openConnection(); + + conn.setReadTimeout(7000); + conn.setConnectTimeout(7000); + conn.setRequestMethod("POST"); + conn.setDoOutput(true); + conn.setDoInput(true); + + OutputStream outputStream = conn.getOutputStream(); + outputStream.write(body.getBytes("UTF-8")); + outputStream.close(); + + String inputLine; + is = conn.getInputStream(); + isr = new InputStreamReader(is); + br = new BufferedReader(isr); + while ((inputLine = br.readLine()) != null) { + response += inputLine; + } + + br.close(); + String answer = response.replace(remoteHost,localHost); + return answer; + + } + +} diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Helper.java b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Helper.java new file mode 100644 index 0000000000000000000000000000000000000000..85699ce101f361a52056d6f9b37f8ba76f50e7db --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Helper.java @@ -0,0 +1,76 @@ +package code; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.json.JSONException; +import org.json.JSONObject; + +import com.sun.net.httpserver.HttpExchange; + +public class Helper { + + public static void sendResponse(String response, HttpExchange exchange) throws IOException { + System.out.println(response); + exchange.sendResponseHeaders(200, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static void badRequest(HttpExchange exchange) throws IOException { + System.out.println("Errors in the request!"); +// exchange.getResponseHeaders().remove("content-type"); + String response = "{\"message\":\"Errors in the request!\"}"; + exchange.sendResponseHeaders(400, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static void pageNotFound(HttpExchange exchange) throws IOException { + System.out.println("Page not found!"); +// exchange.getResponseHeaders().remove("content-type"); + String response = "{\"message\":\"Page not found!\"}"; + exchange.sendResponseHeaders(404, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static void methodNotAllowed(HttpExchange exchange) throws IOException { + System.out.println("Method not allowed!"); +// exchange.getResponseHeaders().remove("content-type"); + String response = "{\"message\":\"Method not allowed!\"}"; + exchange.sendResponseHeaders(405, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + + public static boolean compareText(String a, String b){ + return a.compareToIgnoreCase(b) == 0; + } + + public static String readBody(InputStream requestBody) { + int req; + StringBuffer sb = new StringBuffer(); + try { + while((req = requestBody.read()) != -1) + sb.append(Character.toString((char)req)); + } catch (IOException e) { + e.printStackTrace(); + } + return sb.toString(); + } + + public static boolean checkJSON(String body) { + try { + new JSONObject(body); + return true; + } catch (JSONException e) { + return false; + } + } +} diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Home.java b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Home.java new file mode 100644 index 0000000000000000000000000000000000000000..b6abb6df6e7b651d9f84931f6be92aff4628d777 --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Home.java @@ -0,0 +1,157 @@ +package code; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONException; +import org.json.JSONObject; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class Home implements HttpHandler { + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + boolean wantsHome = Helper.compareText(requestURI.toString(),URI.create("/home").toString()); + boolean wantsKeycloak = Helper.compareText(requestURI.toString(),URI.create("/keycloak.json").toString()); + if(!wantsHome && !wantsKeycloak) { + String error = "Invalid URI"; + OutputStream os = exchange.getResponseBody(); + exchange.sendResponseHeaders(400, error.getBytes().length); + os.write(error.getBytes()); + os.close(); + return; + } + + String requestMethod = exchange.getRequestMethod(); + if (Helper.compareText(requestMethod, "GET")) { + List<String> strlist = new ArrayList<>(); + String response = null; + if(wantsHome){ + response = getHomePage(); + strlist.add("text/html"); + } else if (wantsKeycloak){ + response = getKeycloak(); + strlist.add("text/json"); + } + if(response != null && !Helper.compareText(response, "fail")){ + exchange.getResponseHeaders().put("content-type", strlist); + exchange.sendResponseHeaders(200, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } else { + exchange.sendResponseHeaders(500, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } + } else { + Helper.methodNotAllowed(exchange); + } + } + + private static String getHomePage() { + String line; +// String pageIDString = pageid.toString(); + String page = Server.CLIENT_PATH+"/index.html";// + pageIDString.substring(0, pageIDString.length() - 1) + ".txt";// entro nella cartella + // html e leggo il file + // txt + + StringBuilder answer = new StringBuilder(); + if (getExtension(page).length() == 0) + page += ".html"; + + BufferedReader bufferedReader = null; + try { + FileReader fileReader = new FileReader(page); + + bufferedReader = new BufferedReader(fileReader); + boolean isComment = false; + while ((line = bufferedReader.readLine()) != null) { + line = line.trim(); + + if(line.startsWith("<!--") && line.endsWith("-->")) { + continue; + } + if(line.startsWith("<!--")) { + isComment = true; + continue; + } + if(line.endsWith("-->")) { + isComment = false; + continue; + } + + if(!isComment && line.length()>0) + answer.append(line).append("\n"); + } + } catch (FileNotFoundException ex) { + System.out.println("Unable to open file '" + page + "'"); + return "fail"; + } catch (IOException ex) { + System.out.println("Error reading file '" + page + "'"); + return "fail"; + } finally { + try{ + if(bufferedReader != null) + bufferedReader.close(); + } catch (IOException ex){ + System.out.println("Error closing bufferedReader"); + } + } + return answer.toString(); + } + + private static String getKeycloak(){ + String page = Server.CLIENT_PATH+"/keycloak.json"; + BufferedReader bufferedReader = null; + StringBuilder answer = new StringBuilder(); + try { + FileReader fileReader = new FileReader(page); + bufferedReader = new BufferedReader(fileReader); + String line; + while ((line = bufferedReader.readLine()) != null) { + answer.append(line.trim()); + } + + JSONObject js = new JSONObject(answer.toString()); + return js.toString(); + } catch (FileNotFoundException ex) { + System.out.println("Unable to open file '" + page + "'"); + return "fail"; + } catch (IOException ex) { + System.out.println("Error reading file '" + page + "'"); + return "fail"; + } catch (JSONException e) { + System.out.println("The file doesn't contain a JSON '" + page + "'"); + return "fail"; + } finally { + try{ + if(bufferedReader != null) + bufferedReader.close(); + } catch (IOException ex){ + System.out.println("Error closing bufferedReader"); + } + } + } + + private static String getExtension(String file) { + int i = file.length() - 1; + while (i > 0 && file.charAt(i) != '.' && file.charAt(i) != '/') + i--; + if (file.charAt(i) == '.') + return file.substring(i + 1); + else + return ""; + } + +} \ No newline at end of file diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/ImageRes.java b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/ImageRes.java new file mode 100644 index 0000000000000000000000000000000000000000..87b766aed14e7d52f905aee13caa74a39d4d724f --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/ImageRes.java @@ -0,0 +1,56 @@ +package code; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import javax.imageio.ImageIO; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class ImageRes implements HttpHandler { + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + + String requestMethod = exchange.getRequestMethod(); + if (Helper.compareText(requestMethod, "GET")) { + BufferedImage image = getLocalImage(requestURI.toASCIIString()); + if (image == null) + Helper.pageNotFound(exchange); + List<String> strlist = new ArrayList<>(); + strlist.add("image/png"); + OutputStream os = exchange.getResponseBody(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ImageIO.write(image, "png", baos); + baos.flush(); + byte[] imageInByte = baos.toByteArray(); + exchange.getResponseHeaders().put("content-type", strlist); + exchange.sendResponseHeaders(200, imageInByte.length); + os.write(imageInByte); + os.close(); + } else { + Helper.methodNotAllowed(exchange); + } + } + + private BufferedImage getLocalImage(String uri) { + String page = Server.CLIENT_PATH + uri; + try { + File f = new File(page); + BufferedImage image = ImageIO.read(f); + return image; + } catch (IOException e) { + System.out.println("Error reading file '" + page + "'"); + return null; + } + } + +} diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/InitLogin.java b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/InitLogin.java new file mode 100644 index 0000000000000000000000000000000000000000..204d2cc9d0fc532ea25f3c6312f3600378784af6 --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/InitLogin.java @@ -0,0 +1,24 @@ +package code; + +import java.io.IOException; +import java.net.URI; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class InitLogin implements HttpHandler{ + + + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + String response; + String requestMethod = exchange.getRequestMethod(); + if(requestMethod.compareTo("GET")==0 || requestMethod.compareTo("get")==0) { + // QUI DEVO RITORNARE IL PROGRAMMA DA ESEGUIRE CHE CONTIENE L'URI PER L'AUTENTICAZIONE + } + + } + +} diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/KeyCloak.java b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/KeyCloak.java new file mode 100644 index 0000000000000000000000000000000000000000..cc2d4c83688e209cb23bec29bf7033f67e310090 --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/KeyCloak.java @@ -0,0 +1,75 @@ +package code; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.io.*; +import java.util.HashMap; +import java.util.Arrays; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; + +public class KeyCloak extends HashMap<String,String> { + + public String extraBody() { + return get("extrabodyTemplate").replace("$CLIENTID",get("client-id")); + } + + public String authServer() { + String val = get("auth-server-url"); + int i = val.length()-2; + while(i>0 && val.charAt(i)!='/') i--; + return val.substring(0,i); + } + + public String codeRQ () { + String val = get("coderq").replace("$CLIENTID",get("client-id")); + return val.replace("$REALM", get("realm")); + } + + + public String tokenRQ () { + String val = get("tokenrq").replace("$CLIENTID",get("client-id")); + return val.replace("$REALM", get("realm")); + } + + public void print() { + System.out.println(Arrays.asList(this)); + } + + public KeyCloak(String keycloakpath, String params) throws MalformedURLException, IOException { + BufferedReader data; + String json = ""; + String line; + data = new BufferedReader(new FileReader(keycloakpath)); + while((line = data.readLine())!=null) json += line; + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(json); + if (element.isJsonObject()) { + JsonObject keycloak = element.getAsJsonObject(); + put("realm", keycloak.get("realm").getAsString()); + put("auth-server-url", keycloak.get("auth-server-url").getAsString()); + put("ssl-required", keycloak.get("ssl-required").getAsString()); + put("resouce", keycloak.get("resource").getAsString()); + put("client-id", keycloak.get("resource").getAsString()); + put("public-client", keycloak.get("public-client").getAsString()); + put("confidential-port", keycloak.get("confidential-port").getAsString()); + } + data.close(); + BufferedReader data2 = new BufferedReader(new FileReader(params)); + json = ""; + while((line = data2.readLine())!=null) json += line; + element = parser.parse(json); + if (element.isJsonObject()) { + JsonObject parameters = element.getAsJsonObject(); + put("coderq", parameters.get("coderq").getAsString()); + put("tokenrq", parameters.get("tokenrq").getAsString()); + put("extrabodyTemplate", parameters.get("extrabody").getAsString()); + } + data2.close(); + + } +} + + diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/MissingPage.java b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/MissingPage.java new file mode 100644 index 0000000000000000000000000000000000000000..854ed4f771c59758f4163bae8d7f549b463f4f50 --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/MissingPage.java @@ -0,0 +1,15 @@ +package code; + +import java.io.IOException; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class MissingPage implements HttpHandler { + + @Override + public void handle(HttpExchange exchange) throws IOException { + Helper.pageNotFound(exchange); + } + +} diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Resources.java b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Resources.java new file mode 100644 index 0000000000000000000000000000000000000000..4792161b8834f5de4d56ae39722ae2ee1a163826 --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Resources.java @@ -0,0 +1,97 @@ +package code; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; + +public class Resources implements HttpHandler { + + + @Override + public void handle(HttpExchange exchange) throws IOException { + URI requestURI = exchange.getRequestURI(); + + String requestMethod = exchange.getRequestMethod(); + if (Helper.compareText(requestMethod, "GET")) { + String response = getLocalPage(requestURI.toASCIIString()); + if(response.equals("fail")){ + //nel caso in cui non ci sia il file (perche non stato scaricato), allora creo un file fittizzio per non far crashare tutto il resto + String[] requestedPath = requestURI.toASCIIString().split("/"); + // get the last element of requestedPath and remove .js + String[] requestedPage = requestedPath[requestedPath.length-1].split("\\."); + String className = requestedPage[0]; + // make requested page with the first letter capitalized + className = className.substring(0, 1).toUpperCase() + className.substring(1); + response = "class "+className+"{}\nexport default " +className; + } + List<String> strlist = new ArrayList<>(); + switch (requestURI.toASCIIString().substring(1, 4)) { + case "js/" : strlist.add("text/javascript"); break; + case "css" : strlist.add("text/css"); break; + default : strlist.add("text"); break; + } + exchange.getResponseHeaders().put("content-type", strlist); + exchange.sendResponseHeaders(200, response.getBytes().length); + OutputStream os = exchange.getResponseBody(); + os.write(response.getBytes()); + os.close(); + } else { + Helper.methodNotAllowed(exchange); + } + } + + private static String getLocalPage(String uri) { + String page = Server.CLIENT_PATH+uri; + StringBuilder answer = new StringBuilder(); + BufferedReader bufferedReader = null; + + try { + FileReader fileReader = new FileReader(page); + + bufferedReader = new BufferedReader(fileReader); + boolean isComment = false; + String line; + while ((line = bufferedReader.readLine()) != null) { + line = line.trim(); + if((line.startsWith("/*") && line.endsWith("*/")) || line.startsWith("//")) { + continue; + } + if(line.startsWith("/*")) { + isComment = true; + continue; + } + if(line.endsWith("*/")) { + isComment = false; + continue; + } + if(!isComment && line.length()>0) + answer.append(line).append("\n"); + } + } catch (FileNotFoundException ex) { + System.out.println("Unable to open file '" + page + "'"); + return "fail"; + } catch (IOException ex) { + System.out.println("Error reading file '" + page + "'"); + return "fail"; + } finally { + try{ + if(bufferedReader != null) + bufferedReader.close(); + } catch (IOException ex){ + System.out.println("Error closing bufferedReader"); + } + } + return answer.substring(0,answer.length()-1); + } + + + +} diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/SSLUtilities.java b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/SSLUtilities.java new file mode 100755 index 0000000000000000000000000000000000000000..71f15f4ee3ee7af64cc7095f025d88a7c1248177 --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/SSLUtilities.java @@ -0,0 +1,318 @@ + +import java.security.GeneralSecurityException; +import java.security.SecureRandom; +import java.security.cert.X509Certificate; +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; + +/** + * This class provide various static methods that relax X509 certificate and + * hostname verification while using the SSL over the HTTP protocol. + * + * @author Francis Labrie + */ +public final class SSLUtilities { + + /** + * Hostname verifier for the Sun's deprecated API. + * + * @deprecated see {@link #_hostnameVerifier}. + */ + private static com.sun.net.ssl.HostnameVerifier __hostnameVerifier; + /** + * Thrust managers for the Sun's deprecated API. + * + * @deprecated see {@link #_trustManagers}. + */ + private static com.sun.net.ssl.TrustManager[] __trustManagers; + /** + * Hostname verifier. + */ + private static HostnameVerifier _hostnameVerifier; + /** + * Thrust managers. + */ + private static TrustManager[] _trustManagers; + + + /** + * Set the default Hostname Verifier to an instance of a fake class that + * trust all hostnames. This method uses the old deprecated API from the + * com.sun.ssl package. + * + * @deprecated see {@link #_trustAllHostnames()}. + */ + private static void __trustAllHostnames() { + // Create a trust manager that does not validate certificate chains + if(__hostnameVerifier == null) { + __hostnameVerifier = new _FakeHostnameVerifier(); + } // if + // Install the all-trusting host name verifier + com.sun.net.ssl.HttpsURLConnection. + setDefaultHostnameVerifier(__hostnameVerifier); + } // __trustAllHttpsCertificates + + /** + * Set the default X509 Trust Manager to an instance of a fake class that + * trust all certificates, even the self-signed ones. This method uses the + * old deprecated API from the com.sun.ssl package. + * + * @deprecated see {@link #_trustAllHttpsCertificates()}. + */ + private static void __trustAllHttpsCertificates() { + com.sun.net.ssl.SSLContext context; + + // Create a trust manager that does not validate certificate chains + if(__trustManagers == null) { + __trustManagers = new com.sun.net.ssl.TrustManager[] + {new _FakeX509TrustManager()}; + } // if + // Install the all-trusting trust manager + try { + context = com.sun.net.ssl.SSLContext.getInstance("SSL"); + context.init(null, __trustManagers, new SecureRandom()); + } catch(GeneralSecurityException gse) { + throw new IllegalStateException(gse.getMessage()); + } // catch + com.sun.net.ssl.HttpsURLConnection. + setDefaultSSLSocketFactory(context.getSocketFactory()); + } // __trustAllHttpsCertificates + + /** + * Return true if the protocol handler property java. + * protocol.handler.pkgs is set to the Sun's com.sun.net.ssl. + * internal.www.protocol deprecated one, false + * otherwise. + * + * @return true if the protocol handler + * property is set to the Sun's deprecated one, false + * otherwise. + */ + private static boolean isDeprecatedSSLProtocol() { + return("com.sun.net.ssl.internal.www.protocol".equals(System. + getProperty("java.protocol.handler.pkgs"))); + } // isDeprecatedSSLProtocol + + /** + * Set the default Hostname Verifier to an instance of a fake class that + * trust all hostnames. + */ + private static void _trustAllHostnames() { + // Create a trust manager that does not validate certificate chains + if(_hostnameVerifier == null) { + _hostnameVerifier = new FakeHostnameVerifier(); + } // if + // Install the all-trusting host name verifier: + HttpsURLConnection.setDefaultHostnameVerifier(_hostnameVerifier); + } // _trustAllHttpsCertificates + + /** + * Set the default X509 Trust Manager to an instance of a fake class that + * trust all certificates, even the self-signed ones. + */ + private static void _trustAllHttpsCertificates() { + SSLContext context; + + // Create a trust manager that does not validate certificate chains + if(_trustManagers == null) { + _trustManagers = new TrustManager[] {new FakeX509TrustManager()}; + } // if + // Install the all-trusting trust manager: + try { + context = SSLContext.getInstance("SSL"); + context.init(null, _trustManagers, new SecureRandom()); + } catch(GeneralSecurityException gse) { + throw new IllegalStateException(gse.getMessage()); + } // catch + HttpsURLConnection.setDefaultSSLSocketFactory(context. + getSocketFactory()); + } // _trustAllHttpsCertificates + + /** + * Set the default Hostname Verifier to an instance of a fake class that + * trust all hostnames. + */ + public static void trustAllHostnames() { + // Is the deprecated protocol setted? + if(isDeprecatedSSLProtocol()) { + __trustAllHostnames(); + } else { + _trustAllHostnames(); + } // else + } // trustAllHostnames + + /** + * Set the default X509 Trust Manager to an instance of a fake class that + * trust all certificates, even the self-signed ones. + */ + public static void trustAllHttpsCertificates() { + // Is the deprecated protocol setted? + if(isDeprecatedSSLProtocol()) { + __trustAllHttpsCertificates(); + } else { + _trustAllHttpsCertificates(); + } // else + } // trustAllHttpsCertificates + + /** + * This class implements a fake hostname verificator, trusting any host + * name. This class uses the old deprecated API from the com.sun. + * ssl package. + * + * @author Francis Labrie + * + * @deprecated see {@link SSLUtilities.FakeHostnameVerifier}. + */ + public static class _FakeHostnameVerifier + implements com.sun.net.ssl.HostnameVerifier { + + /** + * Always return true, indicating that the host name is an + * acceptable match with the server's authentication scheme. + * + * @param hostname the host name. + * @param session the SSL session used on the connection to + * host. + * @return the true boolean value + * indicating the host name is trusted. + */ + public boolean verify(String hostname, String session) { + return(true); + } // verify + } // _FakeHostnameVerifier + + + /** + * This class allow any X509 certificates to be used to authenticate the + * remote side of a secure socket, including self-signed certificates. This + * class uses the old deprecated API from the com.sun.ssl + * package. + * + * @author Francis Labrie + * + * @deprecated see {@link SSLUtilities.FakeX509TrustManager}. + */ + public static class _FakeX509TrustManager + implements com.sun.net.ssl.X509TrustManager { + + /** + * Empty array of certificate authority certificates. + */ + private static final X509Certificate[] _AcceptedIssuers = + new X509Certificate[] {}; + + + /** + * Always return true, trusting for client SSL + * chain peer certificate chain. + * + * @param chain the peer certificate chain. + * @return the true boolean value + * indicating the chain is trusted. + */ + public boolean isClientTrusted(X509Certificate[] chain) { + return(true); + } // checkClientTrusted + + /** + * Always return true, trusting for server SSL + * chain peer certificate chain. + * + * @param chain the peer certificate chain. + * @return the true boolean value + * indicating the chain is trusted. + */ + public boolean isServerTrusted(X509Certificate[] chain) { + return(true); + } // checkServerTrusted + + /** + * Return an empty array of certificate authority certificates which + * are trusted for authenticating peers. + * + * @return a empty array of issuer certificates. + */ + public X509Certificate[] getAcceptedIssuers() { + return(_AcceptedIssuers); + } // getAcceptedIssuers + } // _FakeX509TrustManager + + + /** + * This class implements a fake hostname verificator, trusting any host + * name. + * + * @author Francis Labrie + */ + public static class FakeHostnameVerifier implements HostnameVerifier { + + /** + * Always return true, indicating that the host name is + * an acceptable match with the server's authentication scheme. + * + * @param hostname the host name. + * @param session the SSL session used on the connection to + * host. + * @return the true boolean value + * indicating the host name is trusted. + */ + public boolean verify(String hostname, + javax.net.ssl.SSLSession session) { + return(true); + } // verify + } // FakeHostnameVerifier + + + /** + * This class allow any X509 certificates to be used to authenticate the + * remote side of a secure socket, including self-signed certificates. + * + * @author Francis Labrie + */ + public static class FakeX509TrustManager implements X509TrustManager { + + /** + * Empty array of certificate authority certificates. + */ + private static final X509Certificate[] _AcceptedIssuers = + new X509Certificate[] {}; + + + /** + * Always trust for client SSL chain peer certificate + * chain with any authType authentication types. + * + * @param chain the peer certificate chain. + * @param authType the authentication type based on the client + * certificate. + */ + public void checkClientTrusted(X509Certificate[] chain, + String authType) { + } // checkClientTrusted + + /** + * Always trust for server SSL chain peer certificate + * chain with any authType exchange algorithm types. + * + * @param chain the peer certificate chain. + * @param authType the key exchange algorithm used. + */ + public void checkServerTrusted(X509Certificate[] chain, + String authType) { + } // checkServerTrusted + + /** + * Return an empty array of certificate authority certificates which + * are trusted for authenticating peers. + * + * @return a empty array of issuer certificates. + */ + public X509Certificate[] getAcceptedIssuers() { + return(_AcceptedIssuers); + } // getAcceptedIssuers + } // FakeX509TrustManager +} // SSLUtilities + diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Server.java b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Server.java new file mode 100644 index 0000000000000000000000000000000000000000..531d9739fe3bed9a903044d9263547c2de65bdd5 --- /dev/null +++ b/WebServer_provaKeycloakSimileAWebAppDelProf/src/code/Server.java @@ -0,0 +1,116 @@ +package code; + +/*import java.io.FileInputStream; +import java.security.KeyStore; + +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLParameters; +import javax.net.ssl.TrustManagerFactory; + +import com.sun.net.httpserver.HttpsConfigurator; +import com.sun.net.httpserver.HttpsParameters; +import com.sun.net.httpserver.HttpsServer;*/ +import java.io.IOException; +import java.net.InetSocketAddress; +import java.util.concurrent.Executors; +import com.sun.net.httpserver.HttpServer; + +public class Server { + +// private static int port = 443; + private static int port = 3000; + public static String CLIENT_PATH = "./../../webapp/public"; + + public static void main(String[] args) throws IOException { + if (args.length > 1 && args[0].equals("-port")) + try { + port = Integer.parseInt(args[1]); + } catch (Exception e) { + e.printStackTrace(); + } +// HttpsServer server = HttpsServer.create(new InetSocketAddress(port), 0); + HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); + + // initialise the HTTPS server + /*try { + SSLContext sslContext = SSLContext.getInstance("TLS"); + + // initialise the keystore + char[] password = "simulator".toCharArray(); + KeyStore ks = KeyStore.getInstance("JKS"); + FileInputStream fis = new FileInputStream("testkey.jks"); + ks.load(fis, password); + + // setup the key manager factory + KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); + kmf.init(ks, password); + + // setup the trust manager factory + TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); + tmf.init(ks); + + // setup the HTTPS context and parameters + sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); + server.setHttpsConfigurator(new HttpsConfigurator(sslContext) { + @Override + public void configure(HttpsParameters params) { + try { + // initialise the SSL context + SSLContext context = getSSLContext(); + SSLEngine engine = context.createSSLEngine(); + params.setNeedClientAuth(false); + params.setCipherSuites(engine.getEnabledCipherSuites()); + params.setProtocols(engine.getEnabledProtocols()); + + // Set the SSL parameters + SSLParameters sslParameters = context.getSupportedSSLParameters(); + params.setSSLParameters(sslParameters); + + } catch (Exception ex) { + System.out.println("Failed to create HTTPS port"); + } + } + }); + + //API del server + server.createContext("/js/",new Resources()); + server.createContext("/css/",new Resources()); + server.createContext("/res/",new ImageRes()); + server.createContext("/",new Home()); + +// server.setExecutor(Executors.newFixedThreadPool(11)); + server.setExecutor(Executors.newCachedThreadPool()); + server.start(); + System.out.println("webserver running on localhost:"+port); + } catch (Exception e) { + System.out.println("Failed to create HTTPS server on port " + port + " of localhost"); + e.printStackTrace(); + }*/ + //API del server +// server.createContext("/api/luci/",new Luci());//post, get [put, delete] {luogo e stato di tutte luci} +// server.createContext("/api/luci/stato/",new Luci());//put {aggiorna lo stato di una luce} +// server.createContext("/api/scenari/",new Scenari());//get {nome e data di tutti gli scenari} +// server.createContext("/api/scenari/attiva/",new Scenari());//put {attiva/disattiva} +// server.createContext("/api/scenari/registra/",new Scenari());//put {registra/termina} +// server.createContext("/api/scenari/salva/",new Scenari());//post {conferma salvataggio, altrimenti cancella dopo timer; ritorna i valori dello scenario} +// server.createContext("/api/antifurto/",new Antifurto());//get {stato, allarme, attenzione, soglia, sensori} +// server.createContext("/api/antifurto/stato/",new Antifurto());//get, put {se l'antifurto e' attivo + aggiornamento} +// server.createContext("/api/antifurto/allarme/",new Antifurto());//get, put {se l'allarme sta suonando + aggiornamento} +// server.createContext("/api/antifurto/attenzione/",new Antifurto());//put {valore della progress bar} +// server.createContext("/api/antifurto/soglia/",new Antifurto());//put {valore scelto dall'utente per la soglia} + server.createContext("/js/",new Resources()); + server.createContext("/css/",new Resources()); + server.createContext("/res/",new ImageRes()); + server.createContext("/",new InitLogin()); + server.createContext("/secured", new Authentication()); + + server.createContext("/home",new Home()); + + server.setExecutor(Executors.newCachedThreadPool()); + server.start(); + System.out.println("webserver running on localhost:"+port); + } + +} diff --git a/WebServer_provaKeycloakSimileAWebAppDelProf/testkey.jks b/WebServer_provaKeycloakSimileAWebAppDelProf/testkey.jks new file mode 100644 index 0000000000000000000000000000000000000000..a709bb78edd1ec288e9fcd7373a38346f27d2cbc Binary files /dev/null and b/WebServer_provaKeycloakSimileAWebAppDelProf/testkey.jks differ diff --git a/antifurto/res/stato.json b/antifurto/res/stato.json index 7dea01c368775c1d1aeb0b9330ed4cd6e2ead8c1..3e69bdbc9a1e8b68026188edc8441e5a7e907781 100644 --- a/antifurto/res/stato.json +++ b/antifurto/res/stato.json @@ -1 +1 @@ -{"soglia":50,"stato":0,"valore":0,"tempoAllarme":"2022-08-23T10:38:17.921617"} \ No newline at end of file +{"soglia":50,"stato":0,"valore":0,"tempoAllarme":"2022-08-20T11:10:43.935981"} diff --git a/esempioTokenRestituitoDaKeycloakAllaPrimaAutenticazione.txt b/esempioTokenRestituitoDaKeycloakAllaPrimaAutenticazione.txt new file mode 100644 index 0000000000000000000000000000000000000000..71c0f5ab2f0544e1740716eb32a5db3d6fec0605 --- /dev/null +++ b/esempioTokenRestituitoDaKeycloakAllaPrimaAutenticazione.txt @@ -0,0 +1,3 @@ +{access_token: "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJXZ2FCRjhidS05dVhhR0pNRzIxQWQtQTV3aW0xZ29oRnhNNXVvNTJrLWhJIn0.eyJleHAiOjE2NjE2NzI3MTAsImlhdCI6MTY2MTY3MjQxMCwiYXV0aF90aW1lIjoxNjYxNjcyNDA5LCJqdGkiOiJkYjQ5NmI3ZS05OThmLTRiZjYtYjg5Ny02ZWMzMzE4YTYwODQiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvcmVhbG1zL3Rlc3QwMCIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiI2MGE4MjdjMS0zZDM3LTQ4ODEtYjU3Ny0zODNlZDUxNjE3MjgiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJteWNsaWVudCIsIm5vbmNlIjoiYTgxZTFhODQtODg4NS00NzAyLWI4ZDEtZjZjNWEwZDFmYzRkIiwic2Vzc2lvbl9zdGF0ZSI6IjRiYzdhYjhiLTA5YzAtNGE1My1iNjg0LTU1ZmEzM2E0NmJkNyIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDozMDAwIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsImRlZmF1bHQtcm9sZXMtdGVzdDAwIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIiwic2lkIjoiNGJjN2FiOGItMDljMC00YTUzLWI2ODQtNTVmYTMzYTQ2YmQ3IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJuYW1lIjoiTWFyaW8gUm9zc2kiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJqb2huIiwiZ2l2ZW5fbmFtZSI6Ik1hcmlvIiwiZmFtaWx5X25hbWUiOiJSb3NzaSIsImVtYWlsIjoibWFyaW9AZ21haWwuY29tIn0.V5xuELDHwj23liyGIbNk-WpRoJ_QU20y5goA75weYTicdSxj2G5J9b5UdRXwj9vxngCBgze4xAgmWj3wm0pTOdjuehocvw0Yg2_mxUGjU5V_2teBKB_JUJZfAfz4KqVccNBNLG5oXF5cJ5BfPAeJ5C3xq8_H-Bl-z1jqOlpNgQ-NKuGF24yD47a7aPNqTGboA2xFNliYgDXBmW1AvYMPn_Y0HiRUSy6WWPcQNiIXpOfZkc7uqroSpzUDncJMQeslWVOFSWNGeF-aw1sgr0EeEj6jbbqohk55vs4EESj9-xGaL0NaRQqeUegsQ01ej0ISZYHYA7NckMpKVvQX99CPXA", expires_in: 300, refresh_expires_in: 1799, refresh_token: "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJkZDIyM2U5NC1mMjUxLTQ4MDAtYTI3Zi1jYzQzZjZhZTQzODEifQ.eyJleHAiOjE2NjE2NzQyMTAsImlhdCI6MTY2MTY3MjQxMCwianRpIjoiM2FlZjJiMjYtZWVhMy00MzY4LTg2NDAtZTk1YmEyZDc0MDU4IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3JlYWxtcy90ZXN0MDAiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvcmVhbG1zL3Rlc3QwMCIsInN1YiI6IjYwYTgyN2MxLTNkMzctNDg4MS1iNTc3LTM4M2VkNTE2MTcyOCIsInR5cCI6IlJlZnJlc2giLCJhenAiOiJteWNsaWVudCIsIm5vbmNlIjoiYTgxZTFhODQtODg4NS00NzAyLWI4ZDEtZjZjNWEwZDFmYzRkIiwic2Vzc2lvbl9zdGF0ZSI6IjRiYzdhYjhiLTA5YzAtNGE1My1iNjg0LTU1ZmEzM2E0NmJkNyIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwiLCJzaWQiOiI0YmM3YWI4Yi0wOWMwLTRhNTMtYjY4NC01NWZhMzNhNDZiZDcifQ.HLqRJfWX6iOKdpW2KCXWyPEuMN34bfmPsjWe5EnEoR4", token_type: "Bearer", id_token: "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJXZ2FCRjhidS05dVhhR0pNRzIxQWQtQTV3aW0xZ29oRnhNNXVvNTJrLWhJIn0.eyJleHAiOjE2NjE2NzI3MTAsImlhdCI6MTY2MTY3MjQxMCwiYXV0aF90aW1lIjoxNjYxNjcyNDA5LCJqdGkiOiI3ODlkOWJmNC0xODljLTQyOGMtYjQ4Yy1mNzc2MjE2MWM2YWYiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvcmVhbG1zL3Rlc3QwMCIsImF1ZCI6Im15Y2xpZW50Iiwic3ViIjoiNjBhODI3YzEtM2QzNy00ODgxLWI1NzctMzgzZWQ1MTYxNzI4IiwidHlwIjoiSUQiLCJhenAiOiJteWNsaWVudCIsIm5vbmNlIjoiYTgxZTFhODQtODg4NS00NzAyLWI4ZDEtZjZjNWEwZDFmYzRkIiwic2Vzc2lvbl9zdGF0ZSI6IjRiYzdhYjhiLTA5YzAtNGE1My1iNjg0LTU1ZmEzM2E0NmJkNyIsImF0X2hhc2giOiJLdnp3akk1ZFZ5cUthZTM0V3EwTjhnIiwiYWNyIjoiMSIsInNpZCI6IjRiYzdhYjhiLTA5YzAtNGE1My1iNjg0LTU1ZmEzM2E0NmJkNyIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwibmFtZSI6Ik1hcmlvIFJvc3NpIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiam9obiIsImdpdmVuX25hbWUiOiJNYXJpbyIsImZhbWlseV9uYW1lIjoiUm9zc2kiLCJlbWFpbCI6Im1hcmlvQGdtYWlsLmNvbSJ9.mG--EaTJ1I_s_NwbOQJin7xOlVph-sT5R0Kkow8oRPo5Cume44OvPihUM9ufa1V91H5CPlUlfGvPtB1ewywninSA0BySlZvgyS1AP3smfgYS-LKTVUJ7bMMYvkjBzq1Az8W0-bouHjV4zFGr7UZbrrGGZ-DSI8fZaW2SjLDVCscqglRo2Z1wVA21fiYM7OyKcw_pj1G8gJdrVA_W0RWPTqq4ProxgZbShLG6JDKorBxOLyUGI33pAuk6E0QqR38XA3im3w9BGy5Y-B-3rS6B_6u6vlqg3lee-SyY0tbTR7efSjh46iREauh2ugEgwsv9JkiUkKegO_awedKWcy7_Vw", "not-before-policy": 0, session_state: "4bc7ab8b-09c0-4a53-b684-55fa33a46bd7", scope: "openid profile email"} + + diff --git a/keycloak-19.0.1/LICENSE.txt b/keycloak-19.0.1/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7 --- /dev/null +++ b/keycloak-19.0.1/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/keycloak-19.0.1/README.md b/keycloak-19.0.1/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a13d3f53d658912b08ff310873f4f50e767fa862 --- /dev/null +++ b/keycloak-19.0.1/README.md @@ -0,0 +1,26 @@ +Keycloak +======== + +To get help configuring Keycloak via the CLI, run: + +on Linux/Unix: + + $ bin/kc.sh + +on Windows: + + $ bin\kc.bat + +To try Keycloak out in development mode, run: + +on Linux/Unix: + + $ bin/kc.sh start-dev + +on Windows: + + $ bin\kc.bat start-dev + +After the server boots, open http://localhost:8080 in your web browser. The welcome page will indicate that the server is running. + +To get started, check out the [configuration guides](https://www.keycloak.org/guides#server). \ No newline at end of file diff --git a/keycloak-19.0.1/bin/client/keycloak-admin-cli-19.0.1.jar b/keycloak-19.0.1/bin/client/keycloak-admin-cli-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..b837f52c0f219899791ec295042191aabea7a53f Binary files /dev/null and b/keycloak-19.0.1/bin/client/keycloak-admin-cli-19.0.1.jar differ diff --git a/keycloak-19.0.1/bin/client/keycloak-client-registration-cli-19.0.1.jar b/keycloak-19.0.1/bin/client/keycloak-client-registration-cli-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..b466cdd38d04f6e540910fcc349dbd69d2cb0434 Binary files /dev/null and b/keycloak-19.0.1/bin/client/keycloak-client-registration-cli-19.0.1.jar differ diff --git a/keycloak-19.0.1/bin/kc.bat b/keycloak-19.0.1/bin/kc.bat new file mode 100755 index 0000000000000000000000000000000000000000..72ce7463d8c1fc0327a2e6ace947ca4620da4114 --- /dev/null +++ b/keycloak-19.0.1/bin/kc.bat @@ -0,0 +1,142 @@ +@echo off +rem ------------------------------------------------------------------------- +rem Keycloak Startup Script +rem ------------------------------------------------------------------------- + +@if not "%ECHO%" == "" echo %ECHO% +setlocal + +rem Get the program name before using shift as the command modify the variable ~nx0 +if "%OS%" == "Windows_NT" ( + set "PROGNAME=%~nx0%" +) else ( + set "PROGNAME=kc.bat" +) + +if "%OS%" == "Windows_NT" ( + set "DIRNAME=%~dp0%" +) else ( + set DIRNAME=.\ +) + +set "SERVER_OPTS=-Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dquarkus-log-max-startup-records=10000" + +set DEBUG_MODE=false +set DEBUG_PORT_VAR=8787 +set DEBUG_SUSPEND_VAR=n +set CONFIG_ARGS= + +rem Read command-line args, the ~ removes the quotes from the parameter +:READ-ARGS +set "KEY=%~1" +if "%KEY%" == "" ( + goto MAIN +) +if "%KEY%" == "--debug" ( + set "DEBUG_MODE=true" + set "DEBUG_PORT_VAR=%~2" + if "%DEBUG_PORT_VAR%" == "" ( + set DEBUG_PORT_VAR=8787 + ) + if "%DEBUG_SUSPEND_VAR%" == "" ( + set DEBUG_SUSPEND_VAR=n + ) + shift + shift + goto READ-ARGS +) +if "%KEY%" == "start-dev" ( + set "CONFIG_ARGS=%CONFIG_ARGS% --profile=dev %KEY% " + shift + goto READ-ARGS +) +if not "%KEY:~0,2%"=="--" if "%KEY:~0,2%"=="-D" ( + set "SERVER_OPTS=%SERVER_OPTS% %KEY%=%~2" + shift +) +if not "%KEY:~0,2%"=="--" if not "%KEY:~0,1%"=="-" ( + set "CONFIG_ARGS=%CONFIG_ARGS% %KEY%" +) +if "%KEY:~0,2%"=="--" if not "%KEY:~0,2%"=="-D" if "%KEY:~0,1%"=="-" ( + if "%~2"=="" ( + set "CONFIG_ARGS=%CONFIG_ARGS% %KEY%" + ) else ( + set "CONFIG_ARGS=%CONFIG_ARGS% %KEY% %~2%" + ) + + shift +) +shift +goto READ-ARGS + +:MAIN +if not "x%JAVA_OPTS%" == "x" ( + echo "JAVA_OPTS already set in environment; overriding default settings with values: %JAVA_OPTS%" +) else ( + set "JAVA_OPTS=-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8" +) + +if not "x%JAVA_OPTS_APPEND%" == "x" ( + echo "Appending additional Java properties to JAVA_OPTS: %JAVA_OPTS_APPEND%" + set "JAVA_OPTS=%JAVA_OPTS% %JAVA_OPTS_APPEND%" +) + +if NOT "x%DEBUG%" == "x" ( + set "DEBUG_MODE=%DEBUG% +) + +if NOT "x%DEBUG_PORT%" == "x" ( + set DEBUG_PORT_VAR=%DEBUG_PORT% +) + +if NOT "x%DEBUG_SUSPEND%" == "x" ( + set DEBUG_SUSPEND_VAR=%DEBUG_SUSPEND% +) + +rem Set debug settings if not already set +if "%DEBUG_MODE%" == "true" ( + echo "%JAVA_OPTS%" | findstr /I "\-agentlib:jdwp" > nul + if errorlevel == 1 ( + set "JAVA_OPTS=%JAVA_OPTS% -agentlib:jdwp=transport=dt_socket,address=%DEBUG_PORT_VAR%,server=y,suspend=%DEBUG_SUSPEND_VAR%" + ) else ( + echo Debug already enabled in JAVA_OPTS, ignoring --debug argument + ) +) + +rem Setup Keycloak specific properties +set "JAVA_OPTS=-Dprogram.name=%PROGNAME% %JAVA_OPTS%" + +if "x%JAVA_HOME%" == "x" ( + set JAVA=java + echo JAVA_HOME is not set. Unexpected results may occur. + echo Set JAVA_HOME to the directory of your local JDK to avoid this message. +) else ( + if not exist "%JAVA_HOME%" ( + echo JAVA_HOME "%JAVA_HOME%" path doesn't exist + goto END + ) else ( + if not exist "%JAVA_HOME%\bin\java.exe" ( + echo "%JAVA_HOME%\bin\java.exe" does not exist + goto END + ) + set "JAVA=%JAVA_HOME%\bin\java" + ) +) + +set "CLASSPATH_OPTS=%DIRNAME%..\lib\quarkus-run.jar" + +set "JAVA_RUN_OPTS=%JAVA_OPTS% -Dkc.home.dir="%DIRNAME%.." -Djboss.server.config.dir="%DIRNAME%..\conf" -Dkeycloak.theme.dir="%DIRNAME%..\themes" %SERVER_OPTS% -cp "%CLASSPATH_OPTS%" io.quarkus.bootstrap.runner.QuarkusEntryPoint %CONFIG_ARGS%" + +SetLocal EnableDelayedExpansion + +set "ONLY_BUILD_OPTION= build" +set "NO_AUTO_BUILD_OPTION=optimized" + +if "!CONFIG_ARGS:%NO_AUTO_BUILD_OPTION%=!"=="!CONFIG_ARGS!" if "!CONFIG_ARGS:%ONLY_BUILD_OPTION%=!"=="!CONFIG_ARGS!" ( + "%JAVA%" -Dkc.config.build-and-exit=true %JAVA_RUN_OPTS% + set "JAVA_RUN_OPTS=-Dkc.config.built=true %JAVA_RUN_OPTS%" +) + +"%JAVA%" %JAVA_RUN_OPTS% + +:END diff --git a/keycloak-19.0.1/bin/kc.sh b/keycloak-19.0.1/bin/kc.sh new file mode 100755 index 0000000000000000000000000000000000000000..e33f445b90275e24b18bcd0a4d96c82b46b20ccc --- /dev/null +++ b/keycloak-19.0.1/bin/kc.sh @@ -0,0 +1,108 @@ +#!/bin/bash + +case "`uname`" in + CYGWIN*) + CFILE = `cygpath "$0"` + RESOLVED_NAME=`readlink -f "$CFILE"` + ;; + Darwin*) + RESOLVED_NAME=`readlink "$0"` + ;; + FreeBSD) + RESOLVED_NAME=`readlink -f "$0"` + ;; + Linux) + RESOLVED_NAME=`readlink -f "$0"` + ;; +esac + +if [ "x$RESOLVED_NAME" = "x" ]; then + RESOLVED_NAME="$0" +fi + +GREP="grep" +DIRNAME=`dirname "$RESOLVED_NAME"` + +SERVER_OPTS="-Dkc.home.dir='$DIRNAME'/../ -Djboss.server.config.dir='$DIRNAME'/../conf -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dquarkus-log-max-startup-records=10000" + +DEBUG_MODE="${DEBUG:-false}" +DEBUG_PORT="${DEBUG_PORT:-8787}" +DEBUG_SUSPEND="${DEBUG_SUSPEND:-n}" + +CONFIG_ARGS=${CONFIG_ARGS:-""} + +while [ "$#" -gt 0 ] +do + case "$1" in + --debug) + DEBUG_MODE=true + if [ -n "$2" ] && [[ "$2" =~ ^[0-9]+$ ]]; then + DEBUG_PORT=$2 + shift + fi + ;; + --) + shift + break + ;; + *) + if [[ $1 = --* || ! $1 =~ ^-D.* ]]; then + if [[ "$1" = "start-dev" ]]; then + CONFIG_ARGS="$CONFIG_ARGS --profile=dev $1" + else + CONFIG_ARGS="$CONFIG_ARGS $1" + fi + else + SERVER_OPTS="$SERVER_OPTS $1" + fi + ;; + esac + shift +done + +if [ "x$JAVA" = "x" ]; then + if [ "x$JAVA_HOME" != "x" ]; then + JAVA="$JAVA_HOME/bin/java" + else + JAVA="java" + fi +fi + +# +# Specify options to pass to the Java VM. +# +if [ "x$JAVA_OPTS" = "x" ]; then + JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8" +else + echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS" +fi + +if [ "x$JAVA_OPTS_APPEND" != "x" ]; then + echo "Appending additional Java properties to JAVA_OPTS: $JAVA_OPTS_APPEND" + JAVA_OPTS="$JAVA_OPTS $JAVA_OPTS_APPEND" +fi + +# Set debug settings if not already set +if [ "$DEBUG_MODE" = "true" ]; then + DEBUG_OPT=`echo $JAVA_OPTS | $GREP "\-agentlib:jdwp"` + if [ "x$DEBUG_OPT" = "x" ]; then + JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=$DEBUG_PORT,server=y,suspend=$DEBUG_SUSPEND" + else + echo "Debug already enabled in JAVA_OPTS, ignoring --debug argument" + fi +fi + +CLASSPATH_OPTS="'$DIRNAME'/../lib/quarkus-run.jar" + +JAVA_RUN_OPTS="$JAVA_OPTS $SERVER_OPTS -cp $CLASSPATH_OPTS io.quarkus.bootstrap.runner.QuarkusEntryPoint ${CONFIG_ARGS#?}" + +if [[ (! $CONFIG_ARGS = *"--optimized"*) ]] && [[ ! "$CONFIG_ARGS" == " build"* ]] && [[ ! "$CONFIG_ARGS" == *"-h" ]] && [[ ! "$CONFIG_ARGS" == *"--help"* ]]; then + eval "$JAVA" -Dkc.config.build-and-exit=true $JAVA_RUN_OPTS + EXIT_CODE=$? + JAVA_RUN_OPTS="-Dkc.config.built=true $JAVA_RUN_OPTS" + if [ $EXIT_CODE != 0 ]; then + exit $EXIT_CODE + fi +fi + +eval exec "${JAVA}" ${JAVA_RUN_OPTS} diff --git a/keycloak-19.0.1/bin/kcadm.bat b/keycloak-19.0.1/bin/kcadm.bat new file mode 100644 index 0000000000000000000000000000000000000000..6f1c45f64860ae00d64fa7edc4b6acf2fb9a6503 --- /dev/null +++ b/keycloak-19.0.1/bin/kcadm.bat @@ -0,0 +1,8 @@ +@echo off + +if "%OS%" == "Windows_NT" ( + set "DIRNAME=%~dp0%" +) else ( + set DIRNAME=.\ +) +java %KC_OPTS% -cp "%DIRNAME%\client\keycloak-admin-cli-19.0.1.jar" org.keycloak.client.admin.cli.KcAdmMain %* diff --git a/keycloak-19.0.1/bin/kcadm.sh b/keycloak-19.0.1/bin/kcadm.sh new file mode 100755 index 0000000000000000000000000000000000000000..b54cb66d5d633fb795ca7ae6112125583360530e --- /dev/null +++ b/keycloak-19.0.1/bin/kcadm.sh @@ -0,0 +1,32 @@ +#!/bin/sh +case "`uname`" in + CYGWIN*) + CFILE = `cygpath "$0"` + RESOLVED_NAME=`readlink -f "$CFILE"` + ;; + Darwin*) + RESOLVED_NAME=`readlink "$0"` + ;; + FreeBSD) + RESOLVED_NAME=`readlink -f "$0"` + ;; + Linux) + RESOLVED_NAME=`readlink -f "$0"` + ;; +esac + +if [ "x$RESOLVED_NAME" = "x" ]; then + RESOLVED_NAME="$0" +fi + +DIRNAME=`dirname "$RESOLVED_NAME"` + +if [ "x$JAVA" = "x" ]; then + if [ "x$JAVA_HOME" != "x" ]; then + JAVA="$JAVA_HOME/bin/java" + else + JAVA="java" + fi +fi + +"$JAVA" $KC_OPTS -cp $DIRNAME/client/keycloak-admin-cli-19.0.1.jar org.keycloak.client.admin.cli.KcAdmMain "$@" diff --git a/keycloak-19.0.1/bin/kcreg.bat b/keycloak-19.0.1/bin/kcreg.bat new file mode 100644 index 0000000000000000000000000000000000000000..e42a22d8f0a1f0781d70c9bc92234e1f379b0d5e --- /dev/null +++ b/keycloak-19.0.1/bin/kcreg.bat @@ -0,0 +1,8 @@ +@echo off + +if "%OS%" == "Windows_NT" ( + set "DIRNAME=%~dp0%" +) else ( + set DIRNAME=.\ +) +java %KC_OPTS% -cp "%DIRNAME%\client\keycloak-client-registration-cli-19.0.1.jar" org.keycloak.client.registration.cli.KcRegMain %* diff --git a/keycloak-19.0.1/bin/kcreg.sh b/keycloak-19.0.1/bin/kcreg.sh new file mode 100755 index 0000000000000000000000000000000000000000..e77fda7c4bc28caf3031df94c0cf2481b7e1dcee --- /dev/null +++ b/keycloak-19.0.1/bin/kcreg.sh @@ -0,0 +1,31 @@ +#!/bin/sh +case "`uname`" in + CYGWIN*) + CFILE = `cygpath "$0"` + RESOLVED_NAME=`readlink -f "$CFILE"` + ;; + Darwin*) + RESOLVED_NAME=`readlink "$0"` + ;; + FreeBSD) + RESOLVED_NAME=`readlink -f "$0"` + ;; + Linux) + RESOLVED_NAME=`readlink -f "$0"` + ;; +esac + +if [ "x$RESOLVED_NAME" = "x" ]; then + RESOLVED_NAME="$0" +fi + +if [ "x$JAVA" = "x" ]; then + if [ "x$JAVA_HOME" != "x" ]; then + JAVA="$JAVA_HOME/bin/java" + else + JAVA="java" + fi +fi + +DIRNAME=`dirname "$RESOLVED_NAME"` +"$JAVA" $KC_OPTS -cp $DIRNAME/client/keycloak-client-registration-cli-19.0.1.jar org.keycloak.client.registration.cli.KcRegMain "$@" diff --git a/keycloak-19.0.1/conf/README.md b/keycloak-19.0.1/conf/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9d25889308c1c0c7deb87cca18ce7e6a98db4524 --- /dev/null +++ b/keycloak-19.0.1/conf/README.md @@ -0,0 +1,4 @@ +Configure the server +==================== + +Files in this directory are used to configure the server. Please consult the [configuration guides](https://www.keycloak.org/guides#server) for more information. \ No newline at end of file diff --git a/keycloak-19.0.1/conf/cache-ispn.xml b/keycloak-19.0.1/conf/cache-ispn.xml new file mode 100644 index 0000000000000000000000000000000000000000..0c21e3c1e7194aa505275a18468aa3a2c9635555 --- /dev/null +++ b/keycloak-19.0.1/conf/cache-ispn.xml @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Copyright 2019 Red Hat, Inc. and/or its affiliates + ~ and other contributors as indicated by the @author tags. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<infinispan + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="urn:infinispan:config:11.0 http://www.infinispan.org/schemas/infinispan-config-11.0.xsd" + xmlns="urn:infinispan:config:11.0"> + + <cache-container name="keycloak"> + <transport lock-timeout="60000"/> + <local-cache name="realms"> + <encoding> + <key media-type="application/x-java-object"/> + <value media-type="application/x-java-object"/> + </encoding> + <memory max-count="10000"/> + </local-cache> + <local-cache name="users"> + <encoding> + <key media-type="application/x-java-object"/> + <value media-type="application/x-java-object"/> + </encoding> + <memory max-count="10000"/> + </local-cache> + <distributed-cache name="sessions" owners="2"> + <expiration lifespan="-1"/> + </distributed-cache> + <distributed-cache name="authenticationSessions" owners="2"> + <expiration lifespan="-1"/> + </distributed-cache> + <distributed-cache name="offlineSessions" owners="2"> + <expiration lifespan="-1"/> + </distributed-cache> + <distributed-cache name="clientSessions" owners="2"> + <expiration lifespan="-1"/> + </distributed-cache> + <distributed-cache name="offlineClientSessions" owners="2"> + <expiration lifespan="-1"/> + </distributed-cache> + <distributed-cache name="loginFailures" owners="2"> + <expiration lifespan="-1"/> + </distributed-cache> + <local-cache name="authorization"> + <encoding> + <key media-type="application/x-java-object"/> + <value media-type="application/x-java-object"/> + </encoding> + <memory max-count="10000"/> + </local-cache> + <replicated-cache name="work"> + <expiration lifespan="-1"/> + </replicated-cache> + <local-cache name="keys"> + <encoding> + <key media-type="application/x-java-object"/> + <value media-type="application/x-java-object"/> + </encoding> + <expiration max-idle="3600000"/> + <memory max-count="1000"/> + </local-cache> + <distributed-cache name="actionTokens" owners="2"> + <encoding> + <key media-type="application/x-java-object"/> + <value media-type="application/x-java-object"/> + </encoding> + <expiration max-idle="-1" lifespan="-1" interval="300000"/> + <memory max-count="-1"/> + </distributed-cache> + </cache-container> +</infinispan> diff --git a/keycloak-19.0.1/conf/keycloak.conf b/keycloak-19.0.1/conf/keycloak.conf new file mode 100644 index 0000000000000000000000000000000000000000..48efbb0bfa4209185bf63829bdbd736b49f95d69 --- /dev/null +++ b/keycloak-19.0.1/conf/keycloak.conf @@ -0,0 +1,40 @@ +# Basic settings for running in production. Change accordingly before deploying the server. + +# Database + +# The database vendor. +#db=postgres + +# The username of the database user. +#db-username=keycloak + +# The password of the database user. +#db-password=password + +# The full database JDBC URL. If not provided, a default URL is set based on the selected database vendor. +#db-url=jdbc:postgresql://localhost/keycloak + +# Observability + +# If the server should expose healthcheck endpoints. +#health-enabled=true + +# If the server should expose metrics endpoints. +#metrics-enabled=true + +# HTTP + +# The file path to a server certificate or certificate chain in PEM format. +#https-certificate-file=${kc.home.dir}conf/server.crt.pem + +# The file path to a private key in PEM format. +#https-certificate-key-file=${kc.home.dir}conf/server.key.pem + +# The proxy address forwarding mode if the server is behind a reverse proxy. +#proxy=reencrypt + +# Do not attach route to cookies and rely on the session affinity capabilities from reverse proxy +#spi-sticky-session-encoder-infinispan-should-attach-route=false + +# Hostname for the Keycloak server. +#hostname=myhostname diff --git a/keycloak-19.0.1/data/h2/keycloakdb.mv.db b/keycloak-19.0.1/data/h2/keycloakdb.mv.db new file mode 100644 index 0000000000000000000000000000000000000000..62a9bd6ad0ef584664a9d8001fd86614ad32aaff Binary files /dev/null and b/keycloak-19.0.1/data/h2/keycloakdb.mv.db differ diff --git a/keycloak-19.0.1/data/h2/keycloakdb.trace.db b/keycloak-19.0.1/data/h2/keycloakdb.trace.db new file mode 100644 index 0000000000000000000000000000000000000000..255eb04e6aff04b175da1ab622373e85517d8ee0 --- /dev/null +++ b/keycloak-19.0.1/data/h2/keycloakdb.trace.db @@ -0,0 +1,892 @@ +2022-08-12 16:49:43 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Table "MIGRATION_MODEL" not found; SQL statement: +SELECT ID, VERSION FROM MIGRATION_MODEL ORDER BY UPDATE_TIME DESC [42102-197] +2022-08-12 16:49:45 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Table "DATABASECHANGELOG" not found; SQL statement: +SELECT COUNT(*) FROM PUBLIC.DATABASECHANGELOG [42102-197] +2022-08-12 16:49:46 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Table "DATABASECHANGELOGLOCK" not found; SQL statement: +SELECT COUNT(*) FROM PUBLIC.DATABASECHANGELOGLOCK [42102-197] +2022-08-12 16:49:46 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Table "DATABASECHANGELOG" not found; SQL statement: +SELECT COUNT(*) FROM PUBLIC.DATABASECHANGELOG [42102-197] +2022-08-12 20:47:09 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-14 10:03:54 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-14 10:03:54 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-14 18:48:33 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:215) + at io.quarkus.runtime.Quarkus.run(Quarkus.java:67) + at org.keycloak.quarkus.runtime.KeycloakMain.start(KeycloakMain.java:103) + at org.keycloak.quarkus.runtime.cli.command.AbstractStartCommand.run(AbstractStartCommand.java:37) + at picocli.CommandLine.executeUserObject(CommandLine.java:1939) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2314) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine$RunLast.execute(CommandLine.java:2316) + at picocli.CommandLine.execute(CommandLine.java:2078) + at org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun(Picocli.java:91) + at org.keycloak.quarkus.runtime.KeycloakMain.main(KeycloakMain.java:89) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:566) + at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:60) + at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:31) +2022-08-14 18:48:33 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:215) + at io.quarkus.runtime.Quarkus.run(Quarkus.java:67) + at org.keycloak.quarkus.runtime.KeycloakMain.start(KeycloakMain.java:103) + at org.keycloak.quarkus.runtime.cli.command.AbstractStartCommand.run(AbstractStartCommand.java:37) + at picocli.CommandLine.executeUserObject(CommandLine.java:1939) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2314) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine$RunLast.execute(CommandLine.java:2316) + at picocli.CommandLine.execute(CommandLine.java:2078) + at org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun(Picocli.java:91) + at org.keycloak.quarkus.runtime.KeycloakMain.main(KeycloakMain.java:89) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:566) + at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:60) + at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:31) +2022-08-14 19:20:21 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-15 08:33:47 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-16 19:49:59 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-17 16:38:05 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-18 11:23:50 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-21 08:44:59 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:215) + at io.quarkus.runtime.Quarkus.run(Quarkus.java:67) + at org.keycloak.quarkus.runtime.KeycloakMain.start(KeycloakMain.java:103) + at org.keycloak.quarkus.runtime.cli.command.AbstractStartCommand.run(AbstractStartCommand.java:37) + at picocli.CommandLine.executeUserObject(CommandLine.java:1939) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2314) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine$RunLast.execute(CommandLine.java:2316) + at picocli.CommandLine.execute(CommandLine.java:2078) + at org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun(Picocli.java:91) + at org.keycloak.quarkus.runtime.KeycloakMain.main(KeycloakMain.java:89) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.base/java.lang.reflect.Method.invoke(Method.java:566) + at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:60) + at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:31) +2022-08-21 08:49:45 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-21 08:49:45 jdbc[4]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-28 22:06:16 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-28 22:11:50 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-28 22:15:23 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-28 22:19:29 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-29 15:59:41 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-29 18:55:40 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-29 18:56:34 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-29 19:02:00 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-29 19:04:04 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-29 19:05:16 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:215) + at io.quarkus.runtime.Quarkus.run(Quarkus.java:67) + at org.keycloak.quarkus.runtime.KeycloakMain.start(KeycloakMain.java:103) + at org.keycloak.quarkus.runtime.cli.command.AbstractStartCommand.run(AbstractStartCommand.java:37) + at picocli.CommandLine.executeUserObject(CommandLine.java:1939) + at picocli.CommandLine.access$1300(CommandLine.java:145) + at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2352) + at picocli.CommandLine$RunLast.handle(CommandLine.java:2314) + at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) + at picocli.CommandLine$RunLast.execute(CommandLine.java:2316) + at picocli.CommandLine.execute(CommandLine.java:2078) + at org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun(Picocli.java:91) + at org.keycloak.quarkus.runtime.KeycloakMain.main(KeycloakMain.java:89) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) + at java.base/java.lang.reflect.Method.invoke(Method.java:577) + at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:60) + at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:31) +2022-08-29 19:17:55 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-08-29 19:18:48 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) +2022-09-01 11:16:24 jdbc[3]: exception +org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197] + at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) + at org.h2.message.DbException.get(DbException.java:179) + at org.h2.message.DbException.get(DbException.java:155) + at org.h2.message.DbException.get(DbException.java:144) + at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1526) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:470) + at org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1512) + at org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:516) + at org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:450) + at org.h2.jdbcx.JdbcXAConnection.close(JdbcXAConnection.java:78) + at io.agroal.pool.ConnectionHandler.closeConnection(ConnectionHandler.java:185) + at io.agroal.pool.ConnectionPool$DestroyConnectionTask.run(ConnectionPool.java:768) + at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:189) + at io.agroal.pool.DataSource.close(DataSource.java:79) + at io.quarkus.agroal.runtime.DataSources.stop(DataSources.java:381) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.agroal.runtime.DataSources_Bean.destroy(Unknown Source) + at io.quarkus.arc.impl.AbstractInstanceHandle.destroyInternal(AbstractInstanceHandle.java:80) + at io.quarkus.arc.impl.ContextInstanceHandleImpl.destroy(ContextInstanceHandleImpl.java:20) + at io.quarkus.arc.impl.AbstractSharedContext.destroy(AbstractSharedContext.java:94) + at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:369) + at io.quarkus.arc.Arc.shutdown(Arc.java:52) + at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44) + at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84) + at io.quarkus.runtime.StartupContext.close(StartupContext.java:73) + at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source) + at io.quarkus.runtime.Application.stop(Application.java:203) + at io.quarkus.runtime.Application.stop(Application.java:155) + at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:420) diff --git a/keycloak-19.0.1/data/tmp/kc-gzip-cache/u3cy0/js/keycloak.js.gz b/keycloak-19.0.1/data/tmp/kc-gzip-cache/u3cy0/js/keycloak.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..a907a11d6cdafbf35c468792643252d5187970f2 Binary files /dev/null and b/keycloak-19.0.1/data/tmp/kc-gzip-cache/u3cy0/js/keycloak.js.gz differ diff --git a/keycloak-19.0.1/lib/app/keycloak.jar b/keycloak-19.0.1/lib/app/keycloak.jar new file mode 100644 index 0000000000000000000000000000000000000000..1b97a4403f006c1ee1c3ca067348c5ae3afa9688 Binary files /dev/null and b/keycloak-19.0.1/lib/app/keycloak.jar differ diff --git a/keycloak-19.0.1/lib/lib/boot/io.quarkus.quarkus-bootstrap-runner-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/boot/io.quarkus.quarkus-bootstrap-runner-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..e7b8e6a27e50e619d56128ab84ed9865ece48f97 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/boot/io.quarkus.quarkus-bootstrap-runner-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/boot/io.quarkus.quarkus-development-mode-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/boot/io.quarkus.quarkus-development-mode-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..65c0a07d320e1dc00f896f0a9ab3706b594a33a8 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/boot/io.quarkus.quarkus-development-mode-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/boot/io.smallrye.common.smallrye-common-io-1.10.0.jar b/keycloak-19.0.1/lib/lib/boot/io.smallrye.common.smallrye-common-io-1.10.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..d9d24714497dff2b4b89d87e1f8244362f68a7da Binary files /dev/null and b/keycloak-19.0.1/lib/lib/boot/io.smallrye.common.smallrye-common-io-1.10.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/boot/org.glassfish.jakarta.json-1.1.6.jar b/keycloak-19.0.1/lib/lib/boot/org.glassfish.jakarta.json-1.1.6.jar new file mode 100644 index 0000000000000000000000000000000000000000..1f33076558383f65899c9db0932de0c23814a10e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/boot/org.glassfish.jakarta.json-1.1.6.jar differ diff --git a/keycloak-19.0.1/lib/lib/boot/org.graalvm.sdk.graal-sdk-21.3.2.jar b/keycloak-19.0.1/lib/lib/boot/org.graalvm.sdk.graal-sdk-21.3.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..a502d11d097a1b4e6861671ce744a9cf0649af71 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/boot/org.graalvm.sdk.graal-sdk-21.3.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/boot/org.jboss.logging.jboss-logging-3.4.1.Final.jar b/keycloak-19.0.1/lib/lib/boot/org.jboss.logging.jboss-logging-3.4.1.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..42cd1e0a86e7bd42b47495e3c0936c599da8e39e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/boot/org.jboss.logging.jboss-logging-3.4.1.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/boot/org.jboss.logmanager.jboss-logmanager-embedded-1.0.9.jar b/keycloak-19.0.1/lib/lib/boot/org.jboss.logmanager.jboss-logmanager-embedded-1.0.9.jar new file mode 100644 index 0000000000000000000000000000000000000000..0a3cd4b866f0a05926d8984ecc47ff3611f22bbc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/boot/org.jboss.logmanager.jboss-logmanager-embedded-1.0.9.jar differ diff --git a/keycloak-19.0.1/lib/lib/boot/org.wildfly.common.wildfly-common-1.5.4.Final-format-001.jar b/keycloak-19.0.1/lib/lib/boot/org.wildfly.common.wildfly-common-1.5.4.Final-format-001.jar new file mode 100644 index 0000000000000000000000000000000000000000..5a1c49818408c5cfd5f10c635edd40c67cd2d8e6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/boot/org.wildfly.common.wildfly-common-1.5.4.Final-format-001.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/appmodel.dat b/keycloak-19.0.1/lib/lib/deployment/appmodel.dat new file mode 100644 index 0000000000000000000000000000000000000000..945aa61bca9c4c07fa3b9143f371a5a81c84ea2c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/appmodel.dat differ diff --git a/keycloak-19.0.1/lib/lib/deployment/com.fasterxml.jackson.dataformat.jackson-dataformat-yaml-2.13.3.jar b/keycloak-19.0.1/lib/lib/deployment/com.fasterxml.jackson.dataformat.jackson-dataformat-yaml-2.13.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..97980a272809739a31f59ba27a1222d2240f5c37 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/com.fasterxml.jackson.dataformat.jackson-dataformat-yaml-2.13.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/com.github.docker-java.docker-java-api-3.2.12.jar b/keycloak-19.0.1/lib/lib/deployment/com.github.docker-java.docker-java-api-3.2.12.jar new file mode 100644 index 0000000000000000000000000000000000000000..afa3ac1c6f25ec0aa3c3f59e2ab4a0e9fac12e09 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/com.github.docker-java.docker-java-api-3.2.12.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/com.github.docker-java.docker-java-transport-3.2.12.jar b/keycloak-19.0.1/lib/lib/deployment/com.github.docker-java.docker-java-transport-3.2.12.jar new file mode 100644 index 0000000000000000000000000000000000000000..710e1dc6d925f9c7844166b78c3bf96eeafc2512 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/com.github.docker-java.docker-java-transport-3.2.12.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/com.github.docker-java.docker-java-transport-zerodep-3.2.12.jar b/keycloak-19.0.1/lib/lib/deployment/com.github.docker-java.docker-java-transport-zerodep-3.2.12.jar new file mode 100644 index 0000000000000000000000000000000000000000..da37a2e5bc5b7b305ebc2e77d9fe1bb6b9785e13 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/com.github.docker-java.docker-java-transport-zerodep-3.2.12.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/com.google.inject.guice-4.2.2-no_aop.jar b/keycloak-19.0.1/lib/lib/deployment/com.google.inject.guice-4.2.2-no_aop.jar new file mode 100644 index 0000000000000000000000000000000000000000..c558b59b140868c38e7963a65b6204f117d3b579 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/com.google.inject.guice-4.2.2-no_aop.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/commons-cli.commons-cli-1.4.jar b/keycloak-19.0.1/lib/lib/deployment/commons-cli.commons-cli-1.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..22deb3089e2f79a983406bd13a75a3e6238afdcf Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/commons-cli.commons-cli-1.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/deployment-class-path.dat b/keycloak-19.0.1/lib/lib/deployment/deployment-class-path.dat new file mode 100644 index 0000000000000000000000000000000000000000..5c52795e7119e918cec10af3519e714c410eac81 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/deployment-class-path.dat differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkiverse.vault.quarkus-vault-deployment-1.1.0.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkiverse.vault.quarkus-vault-deployment-1.1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..7f38c2e5ea2fd11cd712b51edd0a03f8447c3a6b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkiverse.vault.quarkus-vault-deployment-1.1.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.arc.arc-processor-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.arc.arc-processor-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..942f6b132a5c1db5db983988e9e9a9f24ae83c44 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.arc.arc-processor-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.gizmo.gizmo-1.0.10.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.gizmo.gizmo-1.0.10.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..4e637166a5019d2b03b6e145b5b2636ac050d1b7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.gizmo.gizmo-1.0.10.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.http.quarkus-http-core-4.1.7.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.http.quarkus-http-core-4.1.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..7525ec9ef811cf971de4546518a69444a96b1dd1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.http.quarkus-http-core-4.1.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.http.quarkus-http-http-core-4.1.7.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.http.quarkus-http-http-core-4.1.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..191cf943b74b7b0a2f0278a78c355c30181b8bb1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.http.quarkus-http-http-core-4.1.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.http.quarkus-http-servlet-4.1.7.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.http.quarkus-http-servlet-4.1.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..1e81693d7876afefcaed78ed133bc592bf37aa7e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.http.quarkus-http-servlet-4.1.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-agroal-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-agroal-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..82cc95a0aa96081cd4e849bcd73b2563147c2909 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-agroal-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-agroal-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-agroal-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..c57444f744bb800f44955e07c431980414c359bc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-agroal-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-arc-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-arc-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..7316564aa8ec374afaf50b47244e522b89cc93ef Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-arc-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-app-model-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-app-model-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..90f114e6e6c876a5db4e7d8f5f087446deeab22c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-app-model-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-core-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-core-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..f55dd907bcaf0da0d2115a6ca7a87526328cc288 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-core-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-gradle-resolver-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-gradle-resolver-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..694b9b6dcddb5f2f2a66184aac180861db652833 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-gradle-resolver-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-maven-resolver-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-maven-resolver-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..4791b7193b73c29326a951f74ee8057b20433598 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-bootstrap-maven-resolver-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-builder-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-builder-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..1286859b8f9fed82f3ea4098fc5649e1b490787f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-builder-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-caffeine-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-caffeine-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..491a1eaa2864c08cdf8263f519c67a605446702b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-caffeine-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-class-change-agent-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-class-change-agent-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..567b966d77726c707ca042dc73b1d6c120bcb25a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-class-change-agent-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-core-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-core-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..33a667f572001df84c39fe9a9129320beacb84ba Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-core-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-credentials-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-credentials-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..49d0a915aaaca30fca1bb618c697872df4908a08 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-credentials-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-datasource-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-datasource-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..be6b6b64716a7b61f90616cd75df231207c9a2d2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-datasource-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-datasource-deployment-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-datasource-deployment-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..ebce507cdc25ae314ec77474a51bd2f9f384788b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-datasource-deployment-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-common-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-common-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..54ef498ae8eb3d68130bc95ac70469957af49f4a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-common-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-h2-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-h2-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b93ec93103fa24a9b06bc43bf37c149f81b39341 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-h2-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-mariadb-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-mariadb-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..05fa3886d96e606e773835dac805165ba434a51a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-mariadb-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-mssql-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-mssql-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..737a72413d7f3bc9e2232a0c8fc49699248a60d8 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-mssql-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-mysql-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-mysql-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..464e8d78f884ad8aa4e35fb397f8d64531ec2031 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-mysql-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-oracle-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-oracle-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b413f2e7a18c6fbfa195929b02a5f6023a1ed469 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-oracle-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-postgresql-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-postgresql-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..318d50de98acf6c690231bbdac0c6d849a27718e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devservices-postgresql-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devtools-utilities-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devtools-utilities-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a5d6d00a0d0878618332b18bb357649d8e708bf2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-devtools-utilities-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-hibernate-orm-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-hibernate-orm-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..f8f127be0a674f2392a2ee0c3bc1edca0a67f3c2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-hibernate-orm-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-hibernate-validator-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-hibernate-validator-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..21bf21178b58319c1aa040229e8ce8af26124bcd Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-hibernate-validator-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jackson-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jackson-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..0880674812cd57edf84053b4892c8b4ee06d76b1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jackson-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jackson-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jackson-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..8df2982409b7c5a334f4400110e460ee4033cf3c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jackson-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jaxrs-spi-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jaxrs-spi-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..062dc96fea856c4460814c20c28a420da402f0ea Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jaxrs-spi-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-h2-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-h2-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b6a16450a534e3f07c1b1d13753d42d71e3ead48 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-h2-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-mariadb-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-mariadb-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..ae3b1544810396bc586d1118b23c13ee6a36074a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-mariadb-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-mssql-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-mssql-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a293fa6d1bd63644b530c45c8ccfbb44c8c66eab Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-mssql-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-mysql-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-mysql-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..90ba58588def3cf31f056cfff184a1c04348da31 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-mysql-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-oracle-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-oracle-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..6960e19dbc6d3bbb92505b5f3143aca04d395047 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-oracle-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-postgresql-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-postgresql-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..8b17bec5530a5a2cab6def5875e299e3675a4f75 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jdbc-postgresql-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jsonp-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jsonp-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..323ab76308dcb483e58ff20f70c42840e2db0695 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-jsonp-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-junit4-mock-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-junit4-mock-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..3be5a11c1f4d10b47574a7e8eefcc87240a3ad32 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-junit4-mock-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-kubernetes-service-binding-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-kubernetes-service-binding-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..548ede85d84f30badba155ce0b8c8e18337cbbe0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-kubernetes-service-binding-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-kubernetes-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-kubernetes-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..574ebe0f9334e98d974a0b46c1dcc79998822111 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-kubernetes-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-logging-gelf-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-logging-gelf-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..85f8ddf05f0968116520595f82d74d4fa3ca6e1d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-logging-gelf-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-logging-json-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-logging-json-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b633625aa9fe28bd8adee1346f313adbb38b2d9c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-logging-json-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-mutiny-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-mutiny-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..4035e436a700092aa645e7267ee00d689011e42c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-mutiny-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-narayana-jta-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-narayana-jta-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..aa0349befd1aa53aba2b22b326aaf68fb240fbda Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-narayana-jta-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-netty-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-netty-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b3b92bcd8a8b921206d9273cfcca463350f42909 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-netty-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-common-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-common-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b39ec333008b24d63ec5a878603e9b11270bbf0c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-common-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-common-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-common-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..f06c60ce150d0e3aff33ce3873586481c355c145 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-common-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-hibernate-common-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-hibernate-common-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..345b465383782ce1498832831188bb7d493cc36b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-hibernate-common-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-hibernate-common-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-hibernate-common-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..2a8dcf877d3732054bb888ba79be6ec3266c9374 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-panache-hibernate-common-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-reactive-routes-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-reactive-routes-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..c5d7439eb7aa70bb32eaea3f873a7c69dcc49afc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-reactive-routes-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-common-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-common-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..4aad61793ae3466d8d8987835e7f5bb9905c6ecb Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-common-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-common-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-common-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..83cb7d360b0eb351a29c9e354f8952d3ea8758b2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-common-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..f01e2de68554e28cde5d80c393088aae5b6863d5 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-jackson-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-jackson-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..c13288976f4a0157279fd382f4bc9249e0796f82 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-jackson-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-reactive-server-spi-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-reactive-server-spi-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..4364a90e968e8fa95d6f3644780f11c8d5006173 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-reactive-server-spi-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-reactive-spi-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-reactive-spi-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..33181cd1d7532ad4e2663a9e6e6b196174cc9a4c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-reactive-spi-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-server-common-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-server-common-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..65bb9a1cdda7f82e2edf85b713d3981432b5403f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-server-common-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-server-common-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-server-common-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a59e6882ff0bb0e2b8761a0edfa1c6207d55a9b5 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-resteasy-server-common-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-security-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-security-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..c87c261f6ca720d5e143b82c12f4752df25ef21d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-security-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-context-propagation-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-context-propagation-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..5b8fc0fe67c975dae9f4ccd21adc8b73c89c27b7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-context-propagation-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-health-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-health-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..6041dab2d51c6c994ebe0b8590594e8b6a83dd0b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-health-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-health-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-health-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..63780f30358e0d8fb3277926fe67b1c545e7e619 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-health-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-metrics-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-metrics-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..7ae94aa2d61e52e4e105a1ab430b3945fa2018bb Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-metrics-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-metrics-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-metrics-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..868e3315fbf764b7193178fce668607575e21494 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-metrics-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-openapi-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-openapi-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..8220b52db9269642d48f1c01013735f9e3ca3caf Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-smallrye-openapi-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-undertow-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-undertow-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..51d34649dcc1721287fc91fa29185a3ff5188e43 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-undertow-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..6dbae0bb08a7c0410499ecdbacaa8937cbe06304 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-http-deployment-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-http-deployment-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..5b27170f1664c107b7c2551b7d3d6243958a2e5d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-http-deployment-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-http-deployment-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-http-deployment-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b2918867a22e72f4a68c6a15c1da3c6a2eddb577 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-http-deployment-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-http-dev-console-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-http-dev-console-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..fcee59e6fc8f15eea0d0e56d9f8b9e2e47ac2693 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.quarkus-vertx-http-dev-console-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.qute.qute-core-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.qute.qute-core-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..ffd1925b84dc7cf2a6b7ec77066619cf10df0b68 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.qute.qute-core-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..91970367276fd360ab67e76f2d71b60c5b615753 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-common-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-common-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..f7a09d1cc79273579c2a5219ec82701f631b0fc0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-common-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-common-processor-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-common-processor-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..526dca8b1868eefd32c9ce63afa0413cfc7e5c57 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-common-processor-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-processor-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-processor-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..02e7c84bbee1fa2f885b4db9a289941398c30d4d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.quarkus.resteasy.reactive.resteasy-reactive-processor-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.smallrye.smallrye-health-ui-3.1.2.jar b/keycloak-19.0.1/lib/lib/deployment/io.smallrye.smallrye-health-ui-3.1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..f41f19532244a4c4ec066a7aeed0c2cded916f92 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.smallrye.smallrye-health-ui-3.1.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/io.smallrye.smallrye-open-api-core-2.1.22.jar b/keycloak-19.0.1/lib/lib/deployment/io.smallrye.smallrye-open-api-core-2.1.22.jar new file mode 100644 index 0000000000000000000000000000000000000000..fe732780494e78b4cd6c7a6c56e4fafb6dbd2017 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/io.smallrye.smallrye-open-api-core-2.1.22.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/jakarta.servlet.jakarta.servlet-api-4.0.3.jar b/keycloak-19.0.1/lib/lib/deployment/jakarta.servlet.jakarta.servlet-api-4.0.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..6f3b3f3e6b2891821727c5cc1012666568d3b27b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/jakarta.servlet.jakarta.servlet-api-4.0.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/net.java.dev.jna.jna-4.1.0.jar b/keycloak-19.0.1/lib/lib/deployment/net.java.dev.jna.jna-4.1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..b1a3922fec1aa6124b3a307c3a9154e73aac4d75 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/net.java.dev.jna.jna-4.1.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.aesh.aesh-2.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.aesh.aesh-2.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..a5b0d141873e2b56abdc302bbab346dc6f5e98d0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.aesh.aesh-2.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.aesh.readline-2.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.aesh.readline-2.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..114e01f1f621112a1c9e10d089f9662eee2f0f47 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.aesh.readline-2.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-artifact-3.8.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-artifact-3.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..d59793e4da01c4efa9c564cec0aff8cf78340d88 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-artifact-3.8.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-builder-support-3.8.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-builder-support-3.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..3d78c833c5a6dce36550f822803898b4a510f071 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-builder-support-3.8.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-core-3.8.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-core-3.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..2a1c4c3382f4cbdbac8b3bc13227ee53a176d234 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-core-3.8.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-embedder-3.8.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-embedder-3.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..805429b061e46a3e1dcd757028973b7d7d0a6af6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-embedder-3.8.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-model-3.8.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-model-3.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..11c05e1157c97fac757ba01c8641a52c9340bba7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-model-3.8.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-model-builder-3.8.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-model-builder-3.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..ca59bb7b72b43ea07b579beab2bbdd0b40bb7ccd Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-model-builder-3.8.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-plugin-api-3.8.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-plugin-api-3.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..b8e601dd4ea8c12f596c7f7af09a973b1133d3c9 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-plugin-api-3.8.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-repository-metadata-3.8.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-repository-metadata-3.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..b5a6ac918f16648c81fa1d22e9ff28ccea46dba1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-repository-metadata-3.8.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-resolver-provider-3.8.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-resolver-provider-3.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..61e0facc900b2f9494671c4bbaac6a66a876ba96 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-resolver-provider-3.8.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-settings-3.8.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-settings-3.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..ebd285e8b1a2cd1966eda2846b8158573a622d0e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-settings-3.8.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-settings-builder-3.8.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-settings-builder-3.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..5fa41ff16b11cd3abe62f70f571224064e6ccf96 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.maven-settings-builder-3.8.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-api-1.6.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-api-1.6.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..7607619a982e026e46988adf97452a18bd019dfd Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-api-1.6.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-connector-basic-1.6.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-connector-basic-1.6.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..ba5b7e5725128b2015ee9b042ef35e07ee2c9ce9 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-connector-basic-1.6.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-impl-1.6.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-impl-1.6.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..8ca808140413d14f69a4d90a450f57e1ff8fd746 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-impl-1.6.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-spi-1.6.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-spi-1.6.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..0fd853e8a2db4951840572e760b1d6b8da258015 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-spi-1.6.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-transport-wagon-1.6.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-transport-wagon-1.6.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..45bb40638904436a178857abb50d814b8ab6886f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-transport-wagon-1.6.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-util-1.6.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-util-1.6.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..a8010cba09a2b365774b362ff36cc215bac64aa0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.resolver.maven-resolver-util-1.6.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.shared.maven-shared-utils-3.3.4.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.shared.maven-shared-utils-3.3.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..9b99c5af9291d0aa96d019cfa45491d7b11d5e62 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.shared.maven-shared-utils-3.3.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-file-3.4.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-file-3.4.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..9872f60bdce7b7222972cb2cae74a55076218378 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-file-3.4.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-http-3.4.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-http-3.4.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..da56ae1d6a0e2602f2424c9302803610d47ced78 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-http-3.4.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-http-shared-3.4.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-http-shared-3.4.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..0f48bf3ae7afdf6d9e97af48e02b613c8aef5fee Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-http-shared-3.4.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-provider-api-3.4.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-provider-api-3.4.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..af6db2ea7605d6b5ea044413ec8aca97b93bb779 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apache.maven.wagon.wagon-provider-api-3.4.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.apiguardian.apiguardian-api-1.1.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.apiguardian.apiguardian-api-1.1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..2b678e154dc72413f3ca9030034ce95db837c052 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.apiguardian.apiguardian-api-1.1.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-cipher-2.0.jar b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-cipher-2.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..e73475d11b06c3d978597e99917437b805b4664c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-cipher-2.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-classworlds-2.6.0.jar b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-classworlds-2.6.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..80201472bb8aa4de17b7292090135271fd4d61d5 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-classworlds-2.6.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-component-annotations-2.1.0.jar b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-component-annotations-2.1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..e3793a2f65c859d4b126e0a439d02dbc7252e33a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-component-annotations-2.1.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-interpolation-1.26.jar b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-interpolation-1.26.jar new file mode 100644 index 0000000000000000000000000000000000000000..cfcf1620734846f3bde514c492f50588c7838728 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-interpolation-1.26.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-sec-dispatcher-2.0.jar b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-sec-dispatcher-2.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..623cc21e5d88748387a8f4d56cb51b81d5b3597a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-sec-dispatcher-2.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-utils-3.3.0.jar b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-utils-3.3.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..81053c226e6c39b6f1d9d6d9ba2f9a8931605850 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.codehaus.plexus.plexus-utils-3.3.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.eclipse.microprofile.openapi.microprofile-openapi-api-2.0.1.jar b/keycloak-19.0.1/lib/lib/deployment/org.eclipse.microprofile.openapi.microprofile-openapi-api-2.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..f5f53755cefee6f990243837beaaf2b14ffe2543 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.eclipse.microprofile.openapi.microprofile-openapi-api-2.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.eclipse.sisu.org.eclipse.sisu.inject-0.3.5.jar b/keycloak-19.0.1/lib/lib/deployment/org.eclipse.sisu.org.eclipse.sisu.inject-0.3.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..3cbed69dd74bbbc11111e78bb53c1080a6f178c0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.eclipse.sisu.org.eclipse.sisu.inject-0.3.5.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.eclipse.sisu.org.eclipse.sisu.plexus-0.3.5.jar b/keycloak-19.0.1/lib/lib/deployment/org.eclipse.sisu.org.eclipse.sisu.plexus-0.3.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..800d3b0a3d15c6960a808ff9cf161eafdc301873 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.eclipse.sisu.org.eclipse.sisu.plexus-0.3.5.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.fusesource.jansi.jansi-1.18.jar b/keycloak-19.0.1/lib/lib/deployment/org.fusesource.jansi.jansi-1.18.jar new file mode 100644 index 0000000000000000000000000000000000000000..a7be6dbd80bc5975580ea6a9aee84387c11d0b49 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.fusesource.jansi.jansi-1.18.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.jboss.jandex-2.4.2.Final.jar b/keycloak-19.0.1/lib/lib/deployment/org.jboss.jandex-2.4.2.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..8e17960e7f7164b1a6b0a98c968120027a50af62 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.jboss.jandex-2.4.2.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.jboss.metadata.jboss-metadata-common-14.0.0.Final.jar b/keycloak-19.0.1/lib/lib/deployment/org.jboss.metadata.jboss-metadata-common-14.0.0.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..841af85fa559b096bdb79e4ab69bb807ca09a021 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.jboss.metadata.jboss-metadata-common-14.0.0.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.jboss.metadata.jboss-metadata-web-14.0.0.Final.jar b/keycloak-19.0.1/lib/lib/deployment/org.jboss.metadata.jboss-metadata-web-14.0.0.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b12701eee2aa1fff9facf50ecfe51d1536f434fc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.jboss.metadata.jboss-metadata-web-14.0.0.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.jetbrains.annotations-17.0.0.jar b/keycloak-19.0.1/lib/lib/deployment/org.jetbrains.annotations-17.0.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..477f7d02c277d355e75d611d39dba96c16e16e56 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.jetbrains.annotations-17.0.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.jsoup.jsoup-1.14.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.jsoup.jsoup-1.14.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..766c2963e9087fa3b14cda79ae2b0a705895a75d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.jsoup.jsoup-1.14.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-5.8.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-5.8.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..7f2b1f0ba033006d085e7fdef06d5da37e0aa683 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-5.8.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-api-5.8.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-api-5.8.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..b8e3f686132fc11ab820e59ca05a72f318538da0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-api-5.8.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-engine-5.8.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-engine-5.8.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..06b22126c351a0db39668566370c2481a2387468 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-engine-5.8.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-params-5.8.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-params-5.8.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..78a12de4ebcd8e6eb8bc63ef10637c246e172ebf Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.junit.jupiter.junit-jupiter-params-5.8.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.junit.platform.junit-platform-commons-1.8.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.junit.platform.junit-platform-commons-1.8.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..e0cf08744d12ae6e2a60d1af53084891596cdf8b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.junit.platform.junit-platform-commons-1.8.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.junit.platform.junit-platform-engine-1.8.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.junit.platform.junit-platform-engine-1.8.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..85bac8a6363ccaba9f751744c70c7de4aa5cb2fd Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.junit.platform.junit-platform-engine-1.8.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.junit.platform.junit-platform-launcher-1.8.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.junit.platform.junit-platform-launcher-1.8.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..0f2cc4054104aac5639e4cf3d328d279480edf06 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.junit.platform.junit-platform-launcher-1.8.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.keycloak.keycloak-quarkus-server-deployment-19.0.1.jar b/keycloak-19.0.1/lib/lib/deployment/org.keycloak.keycloak-quarkus-server-deployment-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..e6824dfd093fe758dcf28d29ff6151b6fecfe501 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.keycloak.keycloak-quarkus-server-deployment-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.opentest4j.opentest4j-1.2.0.jar b/keycloak-19.0.1/lib/lib/deployment/org.opentest4j.opentest4j-1.2.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..d5006361a412f458525afc317aecb067dd093d0a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.opentest4j.opentest4j-1.2.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-9.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-9.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..3557ae4140ab53e3fcc76d9129674e4655c09f3d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-9.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-analysis-9.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-analysis-9.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..9d575ca1cc2492609ef6b7a49e38608191a3b597 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-analysis-9.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-commons-9.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-commons-9.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..01028a00356707d5e3bf35a7530270fcc4f8b6cc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-commons-9.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-tree-9.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-tree-9.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..0a6833a68865106b5d4a334de8b6b18bab9e2437 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-tree-9.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-util-9.2.jar b/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-util-9.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..3afe6e6992341856acb86100a0e5ede48d738726 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.ow2.asm.asm-util-9.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.rnorth.duct-tape.duct-tape-1.0.8.jar b/keycloak-19.0.1/lib/lib/deployment/org.rnorth.duct-tape.duct-tape-1.0.8.jar new file mode 100644 index 0000000000000000000000000000000000000000..09cac032d738cd062b4286a8d5f0226c1e421ea2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.rnorth.duct-tape.duct-tape-1.0.8.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.database-commons-1.16.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.database-commons-1.16.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..48ea960ad4f32a01cab10d5f1c70402616c6b451 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.database-commons-1.16.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.jdbc-1.16.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.jdbc-1.16.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..247b1df832bb36dfb4168dfa795276056f5cdae4 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.jdbc-1.16.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.mariadb-1.16.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.mariadb-1.16.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..a9a0e8ae6528a912d4c9d6b996fdc0b24933e6c6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.mariadb-1.16.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.mssqlserver-1.16.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.mssqlserver-1.16.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..387598a5c55bdffcbb3e7c51c9bf017ac9f155aa Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.mssqlserver-1.16.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.mysql-1.16.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.mysql-1.16.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..4bb9d7e75e9625e3552190cca7343c46d4ac9612 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.mysql-1.16.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.oracle-xe-1.16.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.oracle-xe-1.16.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..8f207d86edd026dd3a344a37b5cf6b208be6e5a3 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.oracle-xe-1.16.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.postgresql-1.16.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.postgresql-1.16.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..169521822a6f658d0b2a366f396fa64000a439e5 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.postgresql-1.16.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.testcontainers-1.16.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.testcontainers-1.16.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..534ad291a17c3249547e2d7d936eadd157133887 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.testcontainers-1.16.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.vault-1.16.3.jar b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.vault-1.16.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..1903fdc7c551a904636810eb9eac9683fd3dd56a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/deployment/org.testcontainers.vault-1.16.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/antlr.antlr-2.7.7.jar b/keycloak-19.0.1/lib/lib/main/antlr.antlr-2.7.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..5e5f14b35584eac2a9f0f888769f0ab93ca6d849 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/antlr.antlr-2.7.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/biz.paluch.logging.logstash-gelf-1.14.1.jar b/keycloak-19.0.1/lib/lib/main/biz.paluch.logging.logstash-gelf-1.14.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..2c24bf19a3c8c7b1eafc3f3630c17d376c4d88c4 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/biz.paluch.logging.logstash-gelf-1.14.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.fasterxml.classmate-1.5.1.jar b/keycloak-19.0.1/lib/lib/main/com.fasterxml.classmate-1.5.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..819f5eaf09b7ef229338cf16d2d5432159b1316a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.fasterxml.classmate-1.5.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.core.jackson-annotations-2.13.3.jar b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.core.jackson-annotations-2.13.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..60a3ddba037a4c833c7e46fc4d59bd6bd4f45bf9 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.core.jackson-annotations-2.13.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.core.jackson-core-2.13.3.jar b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.core.jackson-core-2.13.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..7e2086d39c8010e751eec7dfb4bddafe1568d76e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.core.jackson-core-2.13.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.core.jackson-databind-2.13.3.jar b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.core.jackson-databind-2.13.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..a27e9d7055f40269e0957ced089aba5f0660a726 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.core.jackson-databind-2.13.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.dataformat.jackson-dataformat-cbor-2.13.3.jar b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.dataformat.jackson-dataformat-cbor-2.13.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..f2475273cf4887466bb523e57ad97cc28523d69d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.dataformat.jackson-dataformat-cbor-2.13.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.13.3.jar b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.13.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..6e6a5a9c9cee97a58924e471fc31cc79a59cc734 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.13.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.13.3.jar b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.13.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..a0ea06bbe861e9c3a48c41cc03d5b7140c14c884 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.13.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.jaxrs.jackson-jaxrs-base-2.13.3.jar b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.jaxrs.jackson-jaxrs-base-2.13.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..9cf40b88b2790a75b433ec323fd07df10369cd9a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.jaxrs.jackson-jaxrs-base-2.13.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider-2.13.3.jar b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider-2.13.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..a243cfd4832f5508544551ad0d3ae4e0c5222d2a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider-2.13.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.module.jackson-module-jaxb-annotations-2.13.3.jar b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.module.jackson-module-jaxb-annotations-2.13.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..f1babb37f8cdc3d268671dacc17f9282159d9afd Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.module.jackson-module-jaxb-annotations-2.13.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.module.jackson-module-parameter-names-2.13.3.jar b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.module.jackson-module-parameter-names-2.13.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..da15bb257c4720fb5960f8721cad6bc0488c9bcd Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.fasterxml.jackson.module.jackson-module-parameter-names-2.13.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.github.ben-manes.caffeine.caffeine-2.9.3.jar b/keycloak-19.0.1/lib/lib/main/com.github.ben-manes.caffeine.caffeine-2.9.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..2c85a0d85935d34fdfd6ebc17f01acfc457dfacd Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.github.ben-manes.caffeine.caffeine-2.9.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.btf-1.3.jar b/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.btf-1.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..523c40d2802d9963d201128115aecc53fea85eb6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.btf-1.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.jackson-coreutils-2.0.jar b/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.jackson-coreutils-2.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..cc22bd3dabe4269ca634254fc785583ff0d0f4f1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.jackson-coreutils-2.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.json-patch-1.13.jar b/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.json-patch-1.13.jar new file mode 100644 index 0000000000000000000000000000000000000000..93a8c95f761b8962cb7136fbdf56a97294a68c26 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.json-patch-1.13.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.msg-simple-1.2.jar b/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.msg-simple-1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..0e293d5aa0ee576ca227ebc797535e4713299d8a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.github.java-json-tools.msg-simple-1.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.github.ua-parser.uap-java-1.5.2.jar b/keycloak-19.0.1/lib/lib/main/com.github.ua-parser.uap-java-1.5.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..eeacb856b1b252aa8fb2b2389bf639334e6deec7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.github.ua-parser.uap-java-1.5.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.google.guava.guava-30.1-jre.jar b/keycloak-19.0.1/lib/lib/main/com.google.guava.guava-30.1-jre.jar new file mode 100644 index 0000000000000000000000000000000000000000..4244e8a270dc92022f9c6f97791fdce2284a15b3 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.google.guava.guava-30.1-jre.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.google.zxing.core-3.4.0.jar b/keycloak-19.0.1/lib/lib/main/com.google.zxing.core-3.4.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..1fb5037126dfee59aa0fd073fd90299589f25cb3 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.google.zxing.core-3.4.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.google.zxing.javase-3.4.0.jar b/keycloak-19.0.1/lib/lib/main/com.google.zxing.javase-3.4.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..9070e6e098aaccd32fc4fcd944746130b557fa66 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.google.zxing.javase-3.4.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.googlecode.owasp-java-html-sanitizer.owasp-java-html-sanitizer-20211018.2.jar b/keycloak-19.0.1/lib/lib/main/com.googlecode.owasp-java-html-sanitizer.owasp-java-html-sanitizer-20211018.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..55fcd549fa1b8c5075381847a9ab4be6838f93dc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.googlecode.owasp-java-html-sanitizer.owasp-java-html-sanitizer-20211018.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.h2database.h2-1.4.197.jar b/keycloak-19.0.1/lib/lib/main/com.h2database.h2-1.4.197.jar new file mode 100644 index 0000000000000000000000000000000000000000..5f311db5b33942e64a9a498a20352ba6f9512737 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.h2database.h2-1.4.197.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.ibm.async.asyncutil-0.1.0.jar b/keycloak-19.0.1/lib/lib/main/com.ibm.async.asyncutil-0.1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..29c267e669a239c18fb840b97cd4cb1c82dad971 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.ibm.async.asyncutil-0.1.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.microsoft.azure.adal4j-1.6.7.jar b/keycloak-19.0.1/lib/lib/main/com.microsoft.azure.adal4j-1.6.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..a6c318f31e45b371c2aee207690701c4af30fb42 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.microsoft.azure.adal4j-1.6.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.microsoft.sqlserver.mssql-jdbc-7.2.2.jre8.jar b/keycloak-19.0.1/lib/lib/main/com.microsoft.sqlserver.mssql-jdbc-7.2.2.jre8.jar new file mode 100644 index 0000000000000000000000000000000000000000..8bbbce69495f1d792a6581c88fcd3bf11108bedc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.microsoft.sqlserver.mssql-jdbc-7.2.2.jre8.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.nimbusds.content-type-2.1.jar b/keycloak-19.0.1/lib/lib/main/com.nimbusds.content-type-2.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..4920891b9ddbe151c0ba1daf1c197bcdabfdd95b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.nimbusds.content-type-2.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.nimbusds.oauth2-oidc-sdk-9.4.jar b/keycloak-19.0.1/lib/lib/main/com.nimbusds.oauth2-oidc-sdk-9.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..58e7f684955406272e5a2e2bc2cbabc321ff5ef8 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.nimbusds.oauth2-oidc-sdk-9.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.openshift.openshift-restclient-java-8.0.0.Final.jar b/keycloak-19.0.1/lib/lib/main/com.openshift.openshift-restclient-java-8.0.0.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..bde6fb46819c73224f260eb5230072e83f2d3b3d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.openshift.openshift-restclient-java-8.0.0.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.oracle.database.jdbc.ojdbc11-21.4.0.0.jar b/keycloak-19.0.1/lib/lib/main/com.oracle.database.jdbc.ojdbc11-21.4.0.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..06ce992e1dc936fc72ca0c1edb8bb6388209e1e0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.oracle.database.jdbc.ojdbc11-21.4.0.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.squareup.okhttp3.okhttp-3.14.9.jar b/keycloak-19.0.1/lib/lib/main/com.squareup.okhttp3.okhttp-3.14.9.jar new file mode 100644 index 0000000000000000000000000000000000000000..52c046c823bc73855ac1126ed05e6497da53c99a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.squareup.okhttp3.okhttp-3.14.9.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.squareup.okio.okio-1.17.2.jar b/keycloak-19.0.1/lib/lib/main/com.squareup.okio.okio-1.17.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..121274c70a2c72c73f56023aba5911ad618060c9 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.squareup.okio.okio-1.17.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.sun.activation.jakarta.activation-1.2.2.jar b/keycloak-19.0.1/lib/lib/main/com.sun.activation.jakarta.activation-1.2.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..bddea4956de6bd5cd11cd82d5a4f36298cdfbc00 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.sun.activation.jakarta.activation-1.2.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.sun.istack.istack-commons-runtime-3.0.10.jar b/keycloak-19.0.1/lib/lib/main/com.sun.istack.istack-commons-runtime-3.0.10.jar new file mode 100644 index 0000000000000000000000000000000000000000..bd8544e2c8f104ec38fae0f611f41eb3ebfda848 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.sun.istack.istack-commons-runtime-3.0.10.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.sun.mail.jakarta.mail-1.6.5.jar b/keycloak-19.0.1/lib/lib/main/com.sun.mail.jakarta.mail-1.6.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..5dcc851493f007bbf6845b7f5e4defb27ea9aded Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.sun.mail.jakarta.mail-1.6.5.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.sun.xml.messaging.saaj.saaj-impl-1.4.1.SP1.jar b/keycloak-19.0.1/lib/lib/main/com.sun.xml.messaging.saaj.saaj-impl-1.4.1.SP1.jar new file mode 100644 index 0000000000000000000000000000000000000000..4f272a12b63f950ad95d1c3e85b3b7334f2f26ca Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.sun.xml.messaging.saaj.saaj-impl-1.4.1.SP1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.thoughtworks.xstream.xstream-1.4.19.jar b/keycloak-19.0.1/lib/lib/main/com.thoughtworks.xstream.xstream-1.4.19.jar new file mode 100644 index 0000000000000000000000000000000000000000..95d1c6a6441245d7aa1152530289d5f925df60ca Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.thoughtworks.xstream.xstream-1.4.19.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.webauthn4j.webauthn4j-core-0.20.0.RELEASE.jar b/keycloak-19.0.1/lib/lib/main/com.webauthn4j.webauthn4j-core-0.20.0.RELEASE.jar new file mode 100644 index 0000000000000000000000000000000000000000..d613a412524e454ab7d583bc04a9c6e219f9df29 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.webauthn4j.webauthn4j-core-0.20.0.RELEASE.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/com.webauthn4j.webauthn4j-util-0.20.0.RELEASE.jar b/keycloak-19.0.1/lib/lib/main/com.webauthn4j.webauthn4j-util-0.20.0.RELEASE.jar new file mode 100644 index 0000000000000000000000000000000000000000..425750958eff0d0248c13fcc3a30fe944efb120a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/com.webauthn4j.webauthn4j-util-0.20.0.RELEASE.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/commons-codec.commons-codec-1.15.jar b/keycloak-19.0.1/lib/lib/main/commons-codec.commons-codec-1.15.jar new file mode 100644 index 0000000000000000000000000000000000000000..f14985ac9214db96dadcba46c0578baf55c5b347 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/commons-codec.commons-codec-1.15.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/commons-io.commons-io-2.7.jar b/keycloak-19.0.1/lib/lib/main/commons-io.commons-io-2.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..58894589299dc569abde1d4060b4e77b7c874957 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/commons-io.commons-io-2.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/commons-lang.commons-lang-2.6.jar b/keycloak-19.0.1/lib/lib/main/commons-lang.commons-lang-2.6.jar new file mode 100644 index 0000000000000000000000000000000000000000..98467d3a653ebad776ffa3542efeb9732fe0b482 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/commons-lang.commons-lang-2.6.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/info.picocli.picocli-4.6.3.jar b/keycloak-19.0.1/lib/lib/main/info.picocli.picocli-4.6.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..9e390ec69317073e7315854c5d0751acc2950ce4 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/info.picocli.picocli-4.6.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.agroal.agroal-api-1.15.jar b/keycloak-19.0.1/lib/lib/main/io.agroal.agroal-api-1.15.jar new file mode 100644 index 0000000000000000000000000000000000000000..9ab80d25361c2d8532bfef363fccfca68df160d1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.agroal.agroal-api-1.15.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.agroal.agroal-narayana-1.15.jar b/keycloak-19.0.1/lib/lib/main/io.agroal.agroal-narayana-1.15.jar new file mode 100644 index 0000000000000000000000000000000000000000..835c0db42721608c80867d7048b6bde3e8cf039f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.agroal.agroal-narayana-1.15.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.agroal.agroal-pool-1.15.jar b/keycloak-19.0.1/lib/lib/main/io.agroal.agroal-pool-1.15.jar new file mode 100644 index 0000000000000000000000000000000000000000..e6f063a37d81c65d6a875d86ce3caa88ea50f3c2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.agroal.agroal-pool-1.15.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-buffer-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-buffer-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..51bb729e657fe566409d7250fbbe93ef82023e75 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-buffer-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..3a3b3066f837059e1c4aba29944154e7edbeb7fa Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-dns-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-dns-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..1c6478c78bc667bb8efd19671c5d4e94975d4cf0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-dns-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-haproxy-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-haproxy-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..6d0557564bc3a23420928cf2f352d4cd38d169df Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-haproxy-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-http-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-http-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..9b384e9dbc84516e53fed3556b80f643038deffc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-http-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-http2-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-http2-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..2b984dc25583e594fb44dc8b4b13a1d6319ea65d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-http2-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-socks-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-socks-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..50fc686a7a34307521958e8c530af3a24a6c9795 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-codec-socks-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-common-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-common-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..cbea50b5da57bdb8ed67bf7b8a4dbcf674fb5f4d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-common-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-handler-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-handler-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..df41a70fd612e0f07de206f96ebc29b344758aec Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-handler-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-handler-proxy-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-handler-proxy-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..5c0ce2e3915c40231fa0c028f53630a5d1642a9b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-handler-proxy-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-resolver-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-resolver-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..d0defba9324667a628490ce41ab7a4d773d8a4b3 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-resolver-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-resolver-dns-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-resolver-dns-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..329f62ab813d5898a4766c8a03958fe6d09d549c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-resolver-dns-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-tcnative-classes-2.0.48.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-tcnative-classes-2.0.48.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..82d392a16434e4cfa9370c7237735e85fda4fad3 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-tcnative-classes-2.0.48.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..befefa71e9451a782178a057df85f118d5ffcd6f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-classes-epoll-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-classes-epoll-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..1379278bcf5542d536fdb7fba754cc7f7002c690 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-classes-epoll-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-native-epoll-4.1.74.Final-linux-x86_64.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-native-epoll-4.1.74.Final-linux-x86_64.jar new file mode 100644 index 0000000000000000000000000000000000000000..1ba04d663ba60a63766c7cab4c091bc0fca84cf0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-native-epoll-4.1.74.Final-linux-x86_64.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-native-epoll-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-native-epoll-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..d6c97bbbe0b3314c2d215e08ade84e596897dca0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-native-epoll-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-native-unix-common-4.1.74.Final.jar b/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-native-unix-common-4.1.74.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..d62f19111d15febde4d01a9b465d5cb50d7940b4 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.netty.netty-transport-native-unix-common-4.1.74.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.opentracing.opentracing-api-0.33.0.jar b/keycloak-19.0.1/lib/lib/main/io.opentracing.opentracing-api-0.33.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..e3d65567d775447e1f426d31eab804f68f784d08 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.opentracing.opentracing-api-0.33.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkiverse.vault.quarkus-vault-1.1.0.jar b/keycloak-19.0.1/lib/lib/main/io.quarkiverse.vault.quarkus-vault-1.1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..2152adbde88c2d0053d15459d00524df23e84d18 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkiverse.vault.quarkus-vault-1.1.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkiverse.vault.quarkus-vault-model-1.1.0.jar b/keycloak-19.0.1/lib/lib/main/io.quarkiverse.vault.quarkus-vault-model-1.1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..4eb74873ed1ee04a53b2e738fed27df1a691bdd6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkiverse.vault.quarkus-vault-model-1.1.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.arc.arc-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.arc.arc-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a8c0f61c75beed1aa1a688f6c4d22a9164d58c9b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.arc.arc-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-agroal-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-agroal-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..4c6644d64f41583c603a93112beeda0e7f20ba5b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-agroal-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-arc-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-arc-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a8bc0088d0aa1da3d87a581884965b5ba31ebba9 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-arc-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-caffeine-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-caffeine-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..bde359a073aac2a47d0d301632153125b0d05019 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-caffeine-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-core-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-core-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..42d1d1d207061d0502c9e6d8d18dafa705821d73 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-core-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-credentials-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-credentials-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..35ce5569e3ce6f90c1d47ebc4143b2a8f5a2c762 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-credentials-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-datasource-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-datasource-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..52e06045b86a1bc1f7e6928c374e49d74e4ddeb7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-datasource-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-datasource-common-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-datasource-common-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..0b0dad5e58e03a0bec255db4b5d145e659e62589 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-datasource-common-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-fs-util-0.0.9.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-fs-util-0.0.9.jar new file mode 100644 index 0000000000000000000000000000000000000000..336f49e4ebebca6383ee6c67d4b4b7ac100f8f73 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-fs-util-0.0.9.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-hibernate-orm-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-hibernate-orm-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..4a85e871c92cd2939e6ae6940dfba2bebf84d0d6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-hibernate-orm-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jackson-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jackson-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..fa979ab7ae7ae97696c1d9a411d0c00eb9e37e0b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jackson-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-h2-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-h2-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b1d517d4e073f86c365e82c329d11df91bf3a272 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-h2-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-mariadb-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-mariadb-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..cdf1b4a3a3b0ed7a759db312cbfdd060a00fe244 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-mariadb-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-mssql-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-mssql-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a3c39f6157163f182c477daa10da3129d87a144e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-mssql-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-mysql-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-mysql-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..54316f099d6a951ebbcc2d84250056aaf791334d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-mysql-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-oracle-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-oracle-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..db5b229193f28df00064c26f17234ad25a860fc0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-oracle-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-postgresql-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-postgresql-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..7f2c7d99eede97e1bcc1c36d3bdeb8a52f873325 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jdbc-postgresql-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jsonp-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jsonp-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..ba63d5b26f14fa730d504535a919b5bbaaf75da8 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-jsonp-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-logging-gelf-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-logging-gelf-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..6db035364a397fb560922c60170753752c73375f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-logging-gelf-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-logging-json-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-logging-json-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..86d486b0dce1f131fe23fabd258a62d9b8edcbb4 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-logging-json-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-mutiny-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-mutiny-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a56fa3c525791d37d60b29ccb6741a4b2bee0614 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-mutiny-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-narayana-jta-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-narayana-jta-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..d6c5d464f3a4cc9dab2ffae31ae6a8683f2d2d97 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-narayana-jta-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-netty-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-netty-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..ae06d61b6b9612995e133ae1b6c40964e31a2c11 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-netty-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-reactive-routes-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-reactive-routes-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..68a0529f78cd6cee581d4c379baff0f44fb95f74 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-reactive-routes-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..2c0a22eb79e916bc4ef859640b810973293e038c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-common-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-common-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..daefee3a78b4c2d7fb69d00605dd4152a3f362e6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-common-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-jackson-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-jackson-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..59a16fbfc8a137959ca51b9e6cd59e7751428f36 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-jackson-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-server-common-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-server-common-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..f9f0050a8032789ee04c8a3172ba8f8251a663d2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-resteasy-server-common-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-security-runtime-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-security-runtime-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..32b1e56877b6b16ebad895b5991ba350fc6ed033 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-security-runtime-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-smallrye-context-propagation-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-smallrye-context-propagation-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..06ef0f3ef47f16cc7cf54200decb4d8ae764585d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-smallrye-context-propagation-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-smallrye-health-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-smallrye-health-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..34e4cd3643a613336f7df017d8801090631c51fe Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-smallrye-health-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-smallrye-metrics-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-smallrye-metrics-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..9ad78e4d2ce62e29e1da838fb93de528a43a09b0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-smallrye-metrics-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-vertx-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-vertx-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..5441f73dc68aa9b1a4df2561a67bbf914367c27e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-vertx-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-vertx-http-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-vertx-http-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..7734a58207c785de5126da83e1017f4b422d8dec Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-vertx-http-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-vertx-http-dev-console-runtime-spi-2.7.6.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-vertx-http-dev-console-runtime-spi-2.7.6.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..871ef12a51751a13cf1f55bb85d214143f21267c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.quarkus-vertx-http-dev-console-runtime-spi-2.7.6.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.quarkus.security.quarkus-security-1.1.4.Final.jar b/keycloak-19.0.1/lib/lib/main/io.quarkus.security.quarkus-security-1.1.4.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..7ab79831961c121b1e82420510a72a85221c68c5 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.quarkus.security.quarkus-security-1.1.4.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.reactivex.rxjava3.rxjava-3.0.4.jar b/keycloak-19.0.1/lib/lib/main/io.reactivex.rxjava3.rxjava-3.0.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..4b511762b406283140ddd232c25cc51a2980bfa7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.reactivex.rxjava3.rxjava-3.0.4.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-annotation-1.10.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-annotation-1.10.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..7ad2aaf49ee4be5e3a2ce3f611cda2b199a21344 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-annotation-1.10.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-classloader-1.10.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-classloader-1.10.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..db1bdcaf27d2ecdf43d60863531f5095a3d73327 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-classloader-1.10.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-constraint-1.10.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-constraint-1.10.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..f9eab2635fc4c93156d343f6d0cb16f64be5cc05 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-constraint-1.10.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-expression-1.10.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-expression-1.10.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..2e90381be5cb70450a97a221aba41b46a0f3cfe1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-expression-1.10.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-function-1.10.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-function-1.10.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..af9b8a49f941c73e9d34bb16c14f7c434dc83bb5 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-function-1.10.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-vertx-context-1.10.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-vertx-context-1.10.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..f4dd2282ffc6ffdcd3d5991d3a7172d2e82c628c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.common.smallrye-common-vertx-context-1.10.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.config.smallrye-config-2.9.2.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.config.smallrye-config-2.9.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..35ce25cfd6f07b7ddf6f040b660327a0c06c7b0c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.config.smallrye-config-2.9.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.config.smallrye-config-common-2.9.2.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.config.smallrye-config-common-2.9.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..979b3266131dcccf1fdec28941012c3d54777b07 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.config.smallrye-config-common-2.9.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.config.smallrye-config-core-2.9.2.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.config.smallrye-config-core-2.9.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..df7395c02891ff18ff12a5dcde6805599cc88041 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.config.smallrye-config-core-2.9.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.mutiny-1.4.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.mutiny-1.4.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..54fe180ca7db213119fbb48d8144f6bb31cc4c02 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.mutiny-1.4.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.mutiny-smallrye-context-propagation-1.4.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.mutiny-smallrye-context-propagation-1.4.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..4b78e6aea00e42e812089e24cf7160a70bc12892 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.mutiny-smallrye-context-propagation-1.4.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-auth-common-2.21.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-auth-common-2.21.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..015612fd0f8c770c0f0ede37565a9519055f4b91 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-auth-common-2.21.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-bridge-common-2.21.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-bridge-common-2.21.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..647146078efd22973525c9cd763416d8f57473de Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-bridge-common-2.21.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-core-2.21.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-core-2.21.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..7080fe3d9212e725100d8a5289e266ed4c28352b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-core-2.21.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-runtime-2.21.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-runtime-2.21.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..62ba14c9af64a5ad2aa2c59800e17f3200ccc0b7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-runtime-2.21.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-2.21.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-2.21.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..22bfd8602bb61cc0397426254e15499c9253900d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-2.21.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-client-2.21.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-client-2.21.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..5a08baedc870ba76576af920548650ad733c543b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-client-2.21.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-common-2.21.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-common-2.21.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..d97a862534e8e7bb6a5ef386a82a707747f96ab5 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-common-2.21.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-reactive-converter-api-2.7.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-reactive-converter-api-2.7.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..9a9814921d746f47743a4a822b0e0648c6148d3d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-reactive-converter-api-2.7.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-reactive-converter-mutiny-2.7.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-reactive-converter-mutiny-2.7.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..a61c4597341e64a7eefcfe19e885f575486f99a4 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.smallrye-reactive-converter-mutiny-2.7.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.vertx-mutiny-generator-2.21.0.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.vertx-mutiny-generator-2.21.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..db1e10c0df8f1bc05f7a4dd9dc01ac3ab3696ef6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.reactive.vertx-mutiny-generator-2.21.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-1.2.2.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-1.2.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..901c8d3b449576589aa7acc2a7485073108ea375 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-1.2.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-api-1.2.2.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-api-1.2.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..3a54cde68ac6497e5f5898ca5d1cc0e710ae9f64 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-api-1.2.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-jta-1.2.2.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-jta-1.2.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..b83eb48bb7d921aa1a92f564e9909b43ebdb4595 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-jta-1.2.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-storage-1.2.2.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-storage-1.2.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..e9aa629b0ca9b7e1dda2bd63fca7d930cb884fec Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-context-propagation-storage-1.2.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-fault-tolerance-vertx-5.2.1.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-fault-tolerance-vertx-5.2.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..b328047ba1c1da52de83c9c67835b42153ffd380 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-fault-tolerance-vertx-5.2.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-health-3.1.2.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-health-3.1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..e0437899346888228df88c396704279b0f12b90d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-health-3.1.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-health-api-3.1.2.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-health-api-3.1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..fe6de0a6505374066aefca25dea5cf3e12f7f557 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-health-api-3.1.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-health-provided-checks-3.1.2.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-health-provided-checks-3.1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..2488ae12a6403dc8f612c9f22d264f498e69b39b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-health-provided-checks-3.1.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-metrics-3.0.5.jar b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-metrics-3.0.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..b23d7b977613b7ddd79a0110f662b87e9a1f5f58 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.smallrye.smallrye-metrics-3.0.5.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-auth-common-4.2.7.jar b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-auth-common-4.2.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..2d8066946a90552b7a7db491bab2903f150ebac0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-auth-common-4.2.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-bridge-common-4.2.7.jar b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-bridge-common-4.2.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..c07eb27d262e9030d59714fb1cfa49121ec31be2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-bridge-common-4.2.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-codegen-4.2.7.jar b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-codegen-4.2.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..86e479985be3f3bfa59f016b3ad622ed5f790740 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-codegen-4.2.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-core-4.2.7.jar b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-core-4.2.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..851cbf30b7b026b0a71b25cce4e52dfbde653c36 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-core-4.2.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-web-4.2.7.jar b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-web-4.2.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..687475ec78e0bf0d5988c90f3e2553141e93f83d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-web-4.2.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-web-client-4.2.7.jar b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-web-client-4.2.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..e4ff527a08189a1bea6cbb238b63ed2e6d48c3c0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-web-client-4.2.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-web-common-4.2.7.jar b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-web-common-4.2.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..9aaf732cdf718526273900a8366fb6352ab32c59 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/io.vertx.vertx-web-common-4.2.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/jakarta.activation.jakarta.activation-api-1.2.1.jar b/keycloak-19.0.1/lib/lib/main/jakarta.activation.jakarta.activation-api-1.2.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..bbfb52ff01e082afd65ee6444f2645e999f98ee0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/jakarta.activation.jakarta.activation-api-1.2.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/jakarta.annotation.jakarta.annotation-api-1.3.5.jar b/keycloak-19.0.1/lib/lib/main/jakarta.annotation.jakarta.annotation-api-1.3.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..606d992eb235afffc3284caf6a2f97939e8a1682 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/jakarta.annotation.jakarta.annotation-api-1.3.5.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/jakarta.el.jakarta.el-api-3.0.3.jar b/keycloak-19.0.1/lib/lib/main/jakarta.el.jakarta.el-api-3.0.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..1f5e506c973190088f5a37856379e2692192483f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/jakarta.el.jakarta.el-api-3.0.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/jakarta.enterprise.jakarta.enterprise.cdi-api-2.0.2.jar b/keycloak-19.0.1/lib/lib/main/jakarta.enterprise.jakarta.enterprise.cdi-api-2.0.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..195d7c3ddfac3ef75d82b96638d769c5c52d45af Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/jakarta.enterprise.jakarta.enterprise.cdi-api-2.0.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/jakarta.inject.jakarta.inject-api-1.0.jar b/keycloak-19.0.1/lib/lib/main/jakarta.inject.jakarta.inject-api-1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..77ca714ab12049c4dd54d03ff358349ffb136b48 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/jakarta.inject.jakarta.inject-api-1.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/jakarta.interceptor.jakarta.interceptor-api-1.2.5.jar b/keycloak-19.0.1/lib/lib/main/jakarta.interceptor.jakarta.interceptor-api-1.2.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..e46e3d034e0cdcca7e89b1309d3747266c1cc0c9 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/jakarta.interceptor.jakarta.interceptor-api-1.2.5.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/jakarta.persistence.jakarta.persistence-api-2.2.3.jar b/keycloak-19.0.1/lib/lib/main/jakarta.persistence.jakarta.persistence-api-2.2.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..9c758cf5c95e53940ecafc92728bd969d4461762 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/jakarta.persistence.jakarta.persistence-api-2.2.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/jakarta.transaction.jakarta.transaction-api-1.3.3.jar b/keycloak-19.0.1/lib/lib/main/jakarta.transaction.jakarta.transaction-api-1.3.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..643303f039076878a52d041e3c3b85c8da21632b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/jakarta.transaction.jakarta.transaction-api-1.3.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/jakarta.validation.jakarta.validation-api-2.0.2.jar b/keycloak-19.0.1/lib/lib/main/jakarta.validation.jakarta.validation-api-2.0.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..d68c9f7f36d2cfda66f0b89e0719b73b034143b5 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/jakarta.validation.jakarta.validation-api-2.0.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/jakarta.xml.bind.jakarta.xml.bind-api-2.3.3.jar b/keycloak-19.0.1/lib/lib/main/jakarta.xml.bind.jakarta.xml.bind-api-2.3.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..b8c7dc1ec856c2d34a77ed43248ed82b9eec8e9c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/jakarta.xml.bind.jakarta.xml.bind-api-2.3.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/javax.xml.bind.jaxb-api-2.4.0-b180830.0359.jar b/keycloak-19.0.1/lib/lib/main/javax.xml.bind.jaxb-api-2.4.0-b180830.0359.jar new file mode 100644 index 0000000000000000000000000000000000000000..dcd345cf53c3530b396cd801e4d889e50852985d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/javax.xml.bind.jaxb-api-2.4.0-b180830.0359.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/javax.xml.soap.javax.xml.soap-api-1.4.0.jar b/keycloak-19.0.1/lib/lib/main/javax.xml.soap.javax.xml.soap-api-1.4.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..c47a3b0c43d4b5a13130eccd783fe5050e8e870e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/javax.xml.soap.javax.xml.soap-api-1.4.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/mysql.mysql-connector-java-8.0.28.jar b/keycloak-19.0.1/lib/lib/main/mysql.mysql-connector-java-8.0.28.jar new file mode 100644 index 0000000000000000000000000000000000000000..ac8904ee7d43b534f7ae274ceccbf1c5afc5f76d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/mysql.mysql-connector-java-8.0.28.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/net.bytebuddy.byte-buddy-1.12.9.jar b/keycloak-19.0.1/lib/lib/main/net.bytebuddy.byte-buddy-1.12.9.jar new file mode 100644 index 0000000000000000000000000000000000000000..02635b8a6b79f57effd994fad3de37c9e5ba7a2a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/net.bytebuddy.byte-buddy-1.12.9.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.apache.commons.commons-compress-1.21.jar b/keycloak-19.0.1/lib/lib/main/org.apache.commons.commons-compress-1.21.jar new file mode 100644 index 0000000000000000000000000000000000000000..4892334d003304329a99568fd9856ae22acfe03e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.apache.commons.commons-compress-1.21.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.apache.commons.commons-lang3-3.11.jar b/keycloak-19.0.1/lib/lib/main/org.apache.commons.commons-lang3-3.11.jar new file mode 100644 index 0000000000000000000000000000000000000000..bbaa8a61c8dcd7015c6711c8e695bc6b5ed4b3a6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.apache.commons.commons-lang3-3.11.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.apache.httpcomponents.httpclient-4.5.13.jar b/keycloak-19.0.1/lib/lib/main/org.apache.httpcomponents.httpclient-4.5.13.jar new file mode 100644 index 0000000000000000000000000000000000000000..218ee25f2b11b65c83c16dbea9d47f652c4993b0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.apache.httpcomponents.httpclient-4.5.13.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.apache.httpcomponents.httpcore-4.4.14.jar b/keycloak-19.0.1/lib/lib/main/org.apache.httpcomponents.httpcore-4.4.14.jar new file mode 100644 index 0000000000000000000000000000000000000000..349db181c33c3e43667145a90a963bd857e8ab29 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.apache.httpcomponents.httpcore-4.4.14.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.apache.james.apache-mime4j-core-0.8.3.jar b/keycloak-19.0.1/lib/lib/main/org.apache.james.apache-mime4j-core-0.8.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..836f8fb46d4e401e6b73e86d6a26770a770ab50c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.apache.james.apache-mime4j-core-0.8.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.apache.james.apache-mime4j-dom-0.8.3.jar b/keycloak-19.0.1/lib/lib/main/org.apache.james.apache-mime4j-dom-0.8.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..071f33b2bc6cb1a9086ff6364c46f01b0cf20db6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.apache.james.apache-mime4j-dom-0.8.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.apache.james.apache-mime4j-storage-0.8.3.jar b/keycloak-19.0.1/lib/lib/main/org.apache.james.apache-mime4j-storage-0.8.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..cdbb03a68c7fd9c092c4ee211f7125f0b0171942 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.apache.james.apache-mime4j-storage-0.8.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.apache.kerby.kerby-asn1-2.0.0.jar b/keycloak-19.0.1/lib/lib/main/org.apache.kerby.kerby-asn1-2.0.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..22222d47e6795620fe7620b21099a84ca02276ee Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.apache.kerby.kerby-asn1-2.0.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.apache.santuario.xmlsec-2.2.3.jar b/keycloak-19.0.1/lib/lib/main/org.apache.santuario.xmlsec-2.2.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..fd854efb8b6a3a6187bd4c5e7c2910359f219177 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.apache.santuario.xmlsec-2.2.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.apache.sshd.sshd-common-2.7.0.jar b/keycloak-19.0.1/lib/lib/main/org.apache.sshd.sshd-common-2.7.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..329cd24ae1630cf4962c29da9ad5c342b8289234 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.apache.sshd.sshd-common-2.7.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.bitbucket.b_c.jose4j-0.7.9.jar b/keycloak-19.0.1/lib/lib/main/org.bitbucket.b_c.jose4j-0.7.9.jar new file mode 100644 index 0000000000000000000000000000000000000000..8f095a891a09435619452a01466e7ce31d9926b2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.bitbucket.b_c.jose4j-0.7.9.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.bouncycastle.bcpkix-jdk15on-1.68.jar b/keycloak-19.0.1/lib/lib/main/org.bouncycastle.bcpkix-jdk15on-1.68.jar new file mode 100644 index 0000000000000000000000000000000000000000..1b6385d894b21701b7e8704cca66c6904f33c2ab Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.bouncycastle.bcpkix-jdk15on-1.68.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.bouncycastle.bcprov-jdk15on-1.68.jar b/keycloak-19.0.1/lib/lib/main/org.bouncycastle.bcprov-jdk15on-1.68.jar new file mode 100644 index 0000000000000000000000000000000000000000..84ae48522ee97388cda33aee39de434f984276a5 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.bouncycastle.bcprov-jdk15on-1.68.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.config.microprofile-config-api-2.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.config.microprofile-config-api-2.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..6be803a98f9bbf83af12db3c3f35e83cf508dea7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.config.microprofile-config-api-2.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.context-propagation.microprofile-context-propagation-api-1.2.jar b/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.context-propagation.microprofile-context-propagation-api-1.2.jar new file mode 100644 index 0000000000000000000000000000000000000000..134f9a1e6c968b01b9f8408725edafab57c4d1ea Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.context-propagation.microprofile-context-propagation-api-1.2.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.health.microprofile-health-api-3.1.jar b/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.health.microprofile-health-api-3.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..c38edd9aebba5a74f53a4b7b9535917c62a17276 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.health.microprofile-health-api-3.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.metrics.microprofile-metrics-api-3.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.metrics.microprofile-metrics-api-3.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..fa2c43aebc21c8332cbfd880f1f9673f0a8e8615 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.eclipse.microprofile.metrics.microprofile-metrics-api-3.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.freemarker.freemarker-2.3.31.jar b/keycloak-19.0.1/lib/lib/main/org.freemarker.freemarker-2.3.31.jar new file mode 100644 index 0000000000000000000000000000000000000000..8fb169b21d62cadfe86745952ec242d44c16ce7c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.freemarker.freemarker-2.3.31.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.glassfish.jaxb.jaxb-runtime-2.3.3-b02.jar b/keycloak-19.0.1/lib/lib/main/org.glassfish.jaxb.jaxb-runtime-2.3.3-b02.jar new file mode 100644 index 0000000000000000000000000000000000000000..dadf95fa8156f1dfc432bc630652ee5fa2f9fb80 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.glassfish.jaxb.jaxb-runtime-2.3.3-b02.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.glassfish.jaxb.txw2-2.3.3-b02.jar b/keycloak-19.0.1/lib/lib/main/org.glassfish.jaxb.txw2-2.3.3-b02.jar new file mode 100644 index 0000000000000000000000000000000000000000..009ed4b4664975ae5787b30961311a8d816184e2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.glassfish.jaxb.txw2-2.3.3-b02.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.hibernate.common.hibernate-commons-annotations-5.1.2.Final.jar b/keycloak-19.0.1/lib/lib/main/org.hibernate.common.hibernate-commons-annotations-5.1.2.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..0b2e88ff76c908f5b71657160df69b823360f8cd Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.hibernate.common.hibernate-commons-annotations-5.1.2.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.hibernate.hibernate-core-5.6.5.Final.jar b/keycloak-19.0.1/lib/lib/main/org.hibernate.hibernate-core-5.6.5.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..8338a64bc2c1b337e6d606f00cb4faed4193ee01 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.hibernate.hibernate-core-5.6.5.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.hibernate.hibernate-graalvm-5.6.5.Final.jar b/keycloak-19.0.1/lib/lib/main/org.hibernate.hibernate-graalvm-5.6.5.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..06a1b4a9995238e31f503860687cad0f0c97a44e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.hibernate.hibernate-graalvm-5.6.5.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.hibernate.quarkus-local-cache-0.1.0.jar b/keycloak-19.0.1/lib/lib/main/org.hibernate.quarkus-local-cache-0.1.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..3ba83e4efebdda855714fcc037eb4b3ba7d42cad Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.hibernate.quarkus-local-cache-0.1.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-cachestore-remote-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-cachestore-remote-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..00949446626ba540aaa26e3490a15490229e0ea8 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-cachestore-remote-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-client-hotrod-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-client-hotrod-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..f5258dd1c36ab689eb79a1e4e42cc6a035d8a0b1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-client-hotrod-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-clustered-counter-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-clustered-counter-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..75ba7b1752a3223a844b569b35b2d8814a6d0d5a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-clustered-counter-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-commons-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-commons-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..343ba5d0153ebbba18bb2146ea389c1d69334264 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-commons-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-core-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-core-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..6d5697465dfc87fb2bf86f95afce787424bfaa0e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-core-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-jboss-marshalling-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-jboss-marshalling-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..79f1af3a7d2ca426f91e9f91744c533b46a442d7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-jboss-marshalling-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-multimap-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-multimap-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..95d277069834da23109b2e97bac09d80ef47c432 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-multimap-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-query-dsl-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-query-dsl-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..78de6e9aef3d407518a0462300b9ed8814776ef1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-query-dsl-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-remote-query-client-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-remote-query-client-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..4aecb97c04d91d705970f23dcf003eaa1cf39afc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-remote-query-client-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-core-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-core-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..dc7b1ca1ff5664856af77de57149c30eff0f691f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-core-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-hotrod-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-hotrod-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..fb9e91f3846c47eb1b348e4f5d2790c88e6e5b44 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-hotrod-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-rest-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-rest-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..ba21aad6878851726a077725bb051670bb5b06b8 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-rest-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-router-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-router-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a6db81721276bc56654afe1a76ab0acc3b6018c9 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-server-router-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-tasks-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-tasks-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..d583d38b50dd1e4c4a6625746e88f31d7077baf1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-tasks-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-tasks-api-13.0.9.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-tasks-api-13.0.9.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..990bde35fd84b89b9bcb609281f230ddd7dc393d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.infinispan-tasks-api-13.0.9.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.protostream.protostream-4.4.1.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.protostream.protostream-4.4.1.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..70e1414bbc92194568efdef5495c5f1f58e559ca Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.protostream.protostream-4.4.1.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.infinispan.protostream.protostream-types-4.4.1.Final.jar b/keycloak-19.0.1/lib/lib/main/org.infinispan.protostream.protostream-types-4.4.1.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..0cd2731fbedc09b3b9f0a3b28639912d006d857b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.infinispan.protostream.protostream-types-4.4.1.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.jboss-dmr-1.5.1.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.jboss-dmr-1.5.1.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..933c97bdd197552098d8e0505171f0435b4d501b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.jboss-dmr-1.5.1.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.jboss-transaction-spi-7.6.0.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.jboss-transaction-spi-7.6.0.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..49460d2af7c6797c423fa0f841d8bee16ed3fd34 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.jboss-transaction-spi-7.6.0.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.logging.commons-logging-jboss-logging-1.0.0.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.logging.commons-logging-jboss-logging-1.0.0.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..d7987d7c1b270f153557179abaf61c87ed62e875 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.logging.commons-logging-jboss-logging-1.0.0.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.logging.jboss-logging-annotations-2.2.1.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.logging.jboss-logging-annotations-2.2.1.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..84cbb84da5f56984870edf31d028e872f639a680 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.logging.jboss-logging-annotations-2.2.1.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.logmanager.log4j-jboss-logmanager-1.3.0.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.logmanager.log4j-jboss-logmanager-1.3.0.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..abb3e68516a5cfcc031db20ffac2403f6ea0dc39 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.logmanager.log4j-jboss-logmanager-1.3.0.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.marshalling.jboss-marshalling-osgi-2.0.12.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.marshalling.jboss-marshalling-osgi-2.0.12.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..2a7e1c5020353aa4a12d1627d76bfbd102db3295 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.marshalling.jboss-marshalling-osgi-2.0.12.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.narayana.jta.narayana-jta-5.12.4.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.narayana.jta.narayana-jta-5.12.4.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..e2e41064d20ee0dd4a2e1d42acba8f737de91b74 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.narayana.jta.narayana-jta-5.12.4.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.narayana.jts.narayana-jts-integration-5.12.4.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.narayana.jts.narayana-jts-integration-5.12.4.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..05fad58c6e43c5625521f69275989db4f44d5eae Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.narayana.jts.narayana-jts-integration-5.12.4.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-core-4.7.5.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-core-4.7.5.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..1a34714c1a8c5fa821b7063c098695a095f75b19 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-core-4.7.5.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-core-spi-4.7.5.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-core-spi-4.7.5.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..adbad12bca2bd6d67275b3f612d998be52717cd4 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-core-spi-4.7.5.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-jackson2-provider-4.7.5.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-jackson2-provider-4.7.5.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..4af54331d2966bd9c87b359db411d3f0c80f7ac7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-jackson2-provider-4.7.5.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-jaxb-provider-4.7.5.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-jaxb-provider-4.7.5.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..02ae54b0ad7bde324bdcf34ff0dfcb2781e5fd5c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-jaxb-provider-4.7.5.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-multipart-provider-4.7.5.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-multipart-provider-4.7.5.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..0b0a758fc419639a151ec51eedb0953958158d3a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.resteasy.resteasy-multipart-provider-4.7.5.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.slf4j.slf4j-jboss-logmanager-1.1.0.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.slf4j.slf4j-jboss-logmanager-1.1.0.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..76c375f761e5769f01c0fd36fdc9a7c409ff945a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.slf4j.slf4j-jboss-logmanager-1.1.0.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.spec.javax.resource.jboss-connector-api_1.7_spec-1.0.0.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.spec.javax.resource.jboss-connector-api_1.7_spec-1.0.0.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b8f94bbde1948406d00e3c9e2992c385965fa04b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.spec.javax.resource.jboss-connector-api_1.7_spec-1.0.0.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.spec.javax.ws.rs.jboss-jaxrs-api_2.1_spec-2.0.1.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.spec.javax.ws.rs.jboss-jaxrs-api_2.1_spec-2.0.1.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a8ffeb31437ecadb1fc5ed64f47823a00d964a6f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.spec.javax.ws.rs.jboss-jaxrs-api_2.1_spec-2.0.1.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.spec.javax.xml.bind.jboss-jaxb-api_2.3_spec-2.0.1.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.spec.javax.xml.bind.jboss-jaxb-api_2.3_spec-2.0.1.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..3e45c9c3f53dfd9acbf390ebbe18cfaba7efed17 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.spec.javax.xml.bind.jboss-jaxb-api_2.3_spec-2.0.1.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jboss.threads.jboss-threads-3.4.2.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jboss.threads.jboss-threads-3.4.2.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..320e2c7cb4d651ba1dde4c9efa5bb399fc7a4db8 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jboss.threads.jboss-threads-3.4.2.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jgroups.jgroups-4.2.18.Final.jar b/keycloak-19.0.1/lib/lib/main/org.jgroups.jgroups-4.2.18.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..2edbfce36951ac9074b7ba72c43e5649ec6480ea Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jgroups.jgroups-4.2.18.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.jvnet.staxex.stax-ex-1.8.3.jar b/keycloak-19.0.1/lib/lib/main/org.jvnet.staxex.stax-ex-1.8.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..cba7bbcc3e0a41e5a08a894e8123efc5964eea8b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.jvnet.staxex.stax-ex-1.8.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-admin-ui-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-admin-ui-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..7152c4a5ffc598c78daa5b7af6286a42f4d685d5 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-admin-ui-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-authz-policy-common-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-authz-policy-common-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..9b35fb5f288adad891ab9352403e00a86386e86d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-authz-policy-common-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-common-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-common-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..98d4573dae96c9c5a0c53824a4f4f91d3f8c821c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-common-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-config-api-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-config-api-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..c9020fe496d6bfb1f8122feae07cc7e142877f04 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-config-api-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-core-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-core-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..c9f6a6406d02f2c1e1aabecf21007d2c6ba77825 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-core-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-crypto-default-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-crypto-default-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..567382c252fd3b837e592d0896f8fb2b94a37726 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-crypto-default-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-js-adapter-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-js-adapter-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..5860ec97c491fa02b9eaf2a175ed1c5569d670e6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-js-adapter-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-kerberos-federation-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-kerberos-federation-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..eebfcc29d72d79effeac39ce78d291f30a20f4f4 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-kerberos-federation-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-ldap-federation-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-ldap-federation-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..22bff61790674d9402052a0ce230f16f221a6641 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-ldap-federation-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-infinispan-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-infinispan-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..93c14e69249847c06600f2ace0feb78aeeb1df05 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-infinispan-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-jpa-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-jpa-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..da7553bd6449c32ba2d77b9257ea3a04650a0d38 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-jpa-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-legacy-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-legacy-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..2a2d06e5f996f7efaa852faf31bafd15bee179de Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-legacy-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-legacy-private-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-legacy-private-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..e25cd52d0a1834248d88129038ad784488b386a5 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-legacy-private-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-legacy-services-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-legacy-services-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..10c6e59df779be2b2acea6147ee0ec1caf63b142 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-legacy-services-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-map-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-map-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..e383e82a2ab7ae6e461fd5c2579fe8b01b3e9c98 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-map-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-map-hot-rod-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-map-hot-rod-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..3933e180518b5ff8c594732b55e34ce53ad9bce7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-map-hot-rod-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-map-jpa-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-map-jpa-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..bddbad06f843bd00f13b2f86f70481b7327134ed Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-model-map-jpa-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-quarkus-server-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-quarkus-server-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..9fae22c6cf9b1b0311ddc5ca16d5a32d530ab152 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-quarkus-server-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-saml-core-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-saml-core-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..28234c5f9f93c228a6801634ee42e66e87dd389a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-saml-core-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-saml-core-public-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-saml-core-public-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..ca9b012bb3403950be4d54ee2a6d8a8f6c3a65e1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-saml-core-public-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-server-spi-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-server-spi-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..b858dc748c3fb0b8cea7c6e34db9b01cefc8caea Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-server-spi-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-server-spi-private-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-server-spi-private-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..fb0c65c1a3d25f6bf2d6f7ddffefbf0acf6c2b74 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-server-spi-private-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-services-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-services-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..4335a04c2b1dc4ef036b11e0a2937d199a0e910a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-services-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-sssd-federation-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-sssd-federation-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..c707eab933d0aa241cad419f5ca1c1230052b2d2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-sssd-federation-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-themes-19.0.1.jar b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-themes-19.0.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..cfcb9b808799a6e26441f66c8380544eb526155a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.keycloak.keycloak-themes-19.0.1.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.liquibase.liquibase-core-4.8.0.jar b/keycloak-19.0.1/lib/lib/main/org.liquibase.liquibase-core-4.8.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..78c479e50587af6e1056775b44becf0e975ba527 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.liquibase.liquibase-core-4.8.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.locationtech.jts.jts-core-1.15.0.jar b/keycloak-19.0.1/lib/lib/main/org.locationtech.jts.jts-core-1.15.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..f3353a399b05efe13a38989a92affa3c1a65d07f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.locationtech.jts.jts-core-1.15.0.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.mariadb.jdbc.mariadb-java-client-2.7.5.jar b/keycloak-19.0.1/lib/lib/main/org.mariadb.jdbc.mariadb-java-client-2.7.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..5036b8e04e8cf5b89e4273f9772d4bc74de41dad Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.mariadb.jdbc.mariadb-java-client-2.7.5.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.postgresql.postgresql-42.3.3.jar b/keycloak-19.0.1/lib/lib/main/org.postgresql.postgresql-42.3.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..6a5116be3f081aa426a4dc7781073785040c5b37 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.postgresql.postgresql-42.3.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.reactivestreams.reactive-streams-1.0.3.jar b/keycloak-19.0.1/lib/lib/main/org.reactivestreams.reactive-streams-1.0.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..b9b487caa3af3a32860dc1e0d68b84da62361b68 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.reactivestreams.reactive-streams-1.0.3.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.slf4j.jcl-over-slf4j-1.7.30.jar b/keycloak-19.0.1/lib/lib/main/org.slf4j.jcl-over-slf4j-1.7.30.jar new file mode 100644 index 0000000000000000000000000000000000000000..44e9f63976df6e1a05ce1185bbe5c0a7a78d4869 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.slf4j.jcl-over-slf4j-1.7.30.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.slf4j.slf4j-api-1.7.30.jar b/keycloak-19.0.1/lib/lib/main/org.slf4j.slf4j-api-1.7.30.jar new file mode 100644 index 0000000000000000000000000000000000000000..29ac26fb8cad7ef5934377a8c269c4e521520e5c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.slf4j.slf4j-api-1.7.30.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.twitter4j.twitter4j-core-4.0.7.jar b/keycloak-19.0.1/lib/lib/main/org.twitter4j.twitter4j-core-4.0.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..a1205817377a566a8a9cdd0e1b86d49e6ebbf1c9 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.twitter4j.twitter4j-core-4.0.7.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..fceec97138627aacb1e392faeb4986269864bd8d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-asn1-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-asn1-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..35718ed40e9c19b0010c9d2872f7c0be15fd4f72 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-asn1-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-audit-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-audit-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..31509bcf2729be5e0b160ce1c0117b819e39ea6a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-audit-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..2dd75b1f79309d4ea5ac17d8980239ec53375c65 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..86bdf4b642834295f8ab732b6e03331ed569c858 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-deprecated-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-deprecated-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..3f4173ca77635c778d4dea2d7588454021016c82 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-deprecated-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-http-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-http-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..2f250ca5025a352d043695697472bbe5c63a9a02 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-http-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-sasl-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-sasl-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..2cff9d5d484208aae5e2b3193373aa25c229b6f1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-server-sasl-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-util-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-util-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..987c15e453a36bc04821f65a69bb23b5ba245b38 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-auth-util-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-base-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-base-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..8b912847a13f3a9862c201fe0988a70a04dbe297 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-base-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-client-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-client-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..cfdbe261a693c54f4b52f5c746fd05e612ba9e9f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-client-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..f9815f4a6df3caaddd1b444fc54eb107210613de Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-source-deprecated-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-source-deprecated-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..db99c3802be8ab23b87bbe87ff24ae584285783f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-source-deprecated-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-source-impl-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-source-impl-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..d97f62c157ac14cc6858f8839ffacd7e92362e49 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-source-impl-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-store-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-store-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..37bc2397bae9e668bb72ff8a40f7a3471b814b21 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-credential-store-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-digest-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-digest-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..8faa4bafbc260b4780b2fdae9a536b61b024e780 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-digest-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-encryption-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-encryption-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..2c8a365ac651bb2591f060246011dffbb59a149c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-encryption-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..fda219f877d981d28c12eb131caf76daff90d28f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-basic-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-basic-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..48bb4b202c76ac23718d899f583455eb5c05ebbf Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-basic-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-bearer-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-bearer-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..37152adde0bd822509818af7c616904aa5c1cc1f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-bearer-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-cert-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-cert-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..6f8d630ad5388b830f80f769147c538d7e24b9d6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-cert-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-deprecated-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-deprecated-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..74729034613b17539b4cf39a83abad62af19dda7 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-deprecated-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-digest-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-digest-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..03fc65e65b682e108168607ae155d8740103e9a1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-digest-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-external-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-external-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..3e2e6a37b0fbda782c411410faf0206832349a82 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-external-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-form-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-form-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..568dbcc7d46ce17f5d9285ab420bef8db2ff809d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-form-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-oidc-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-oidc-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..53e69074726db55e701d5784cd6355c3d990781d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-oidc-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-spnego-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-spnego-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a63258a5656ea3cc63ef6cc751ed73fd053ed27b Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-spnego-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-sso-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-sso-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..45a98ed4fe59f3080b912cc168f7f146b216ed67 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-sso-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-util-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-util-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..e5377d6b44ca2cc5002a5120b46e3ba9ed3e78c2 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-http-util-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jacc-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jacc-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..3732404d1d5b3ce1791673cc2ba11a7330de7f30 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jacc-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jaspi-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jaspi-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..252a52ffcd7ab7d23017f25f99e43a4c9c34d0b3 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jaspi-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jose-jwk-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jose-jwk-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..27150aecc099ed5207caeef72dec1d8c7d8c6df1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jose-jwk-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jose-util-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jose-util-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..8a3cbda105984ebbd8df6055b6c11a38e4dfd5be Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-jose-util-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-json-util-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-json-util-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..8da63c90d9abe83a2eeba7c2121bed58223ad7ad Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-json-util-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-keystore-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-keystore-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..bc39002a5b7a63037e6aa68cc712c337ce2c7fcc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-keystore-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..be49631837275ceeb934fa27979ade689878de6e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-digest-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-digest-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..12f6139d77dbe9e03f76e6ed2a48aef12b059519 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-digest-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-gssapi-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-gssapi-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..76293fec7b78156da62479b22aed6e8a547459b9 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-gssapi-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-http-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-http-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..ca8e6d795e98252fefb05781557035f7a84b084f Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-http-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-oauth2-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-oauth2-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..e0202d86135be1ab3c7e17e7fc159d6b09772888 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-oauth2-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-scram-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-scram-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..44648a1481a64f0bc4040ad7b5a75823f79907dd Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-mechanism-scram-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-password-impl-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-password-impl-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..c97f7e43e4a93dcec6ace003162f8e372fecc8d0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-password-impl-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-permission-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-permission-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..d65245c364fa301be79910e1ded5098caaec6a2d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-permission-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-provider-util-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-provider-util-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..504b8c86c19ad8edfb741f84d4830a8e7c23b8af Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-provider-util-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..9878af64ae84e0c86c58309666a562ef5c5a7755 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-jdbc-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-jdbc-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..2cd178d89953f2eb74c48252dd9c7bb5fae8c970 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-jdbc-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-ldap-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-ldap-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..449919b90d734e76eb63398af622e5b4ce240848 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-ldap-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-token-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-token-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..b5381547828842f607db7a4f44b59b74dc2d06bc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-realm-token-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..aa53ea28a6628bc7ae6be620690cc468dd1c2306 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-anonymous-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-anonymous-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..cb71d4f2f11ec0a7f8bd635e1cd221271684c460 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-anonymous-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-auth-util-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-auth-util-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..d1ec6a1e5b2d4b4d14438f407f6fa86d47f5c90d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-auth-util-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-deprecated-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-deprecated-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..04a6b813221d74a3ffc06ab4951dcc17b27d390a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-deprecated-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-digest-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-digest-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..7fbf07ffab3d07b251f9e8ac1b912ada2b7e29f4 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-digest-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-entity-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-entity-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..251651f1bc8833b747f1494a567dc8008d13a63c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-entity-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-external-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-external-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..ab54def98a0415a5127819bcac8015f616f4110d Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-external-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-gs2-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-gs2-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..004cf77da2d6c443a057ef427d7a1c09f83d74ab Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-gs2-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-gssapi-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-gssapi-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..a31f61cd00d388d8370da26b0ae64e0a0bcf0956 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-gssapi-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-localuser-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-localuser-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..877cb10756fe1cc958fa1589f700e293f4a9c7ee Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-localuser-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-oauth2-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-oauth2-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..737bc7ed6cd6151b686f336a3d9c5a6fad8028ee Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-oauth2-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-otp-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-otp-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..9259db335a8d159b936195a109bc84c6fa374c18 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-otp-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-plain-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-plain-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..4f1b2645f74f54fdbfba790e10a2cd8b1c44b3e1 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-plain-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-scram-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-scram-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..d517d99e79ee41467e0776637029f5d4ea4d66fc Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-sasl-scram-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-security-manager-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-security-manager-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..15b8ea13ad782333b4a453a8d1c04a83da1ec64e Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-security-manager-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-security-manager-action-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-security-manager-action-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..0387e145c5d3d7b0d85de24cee2a2c9585aaac01 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-security-manager-action-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-ssl-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-ssl-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..12acff3da50f540b0fb0f18a1146d589ae231e86 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-ssl-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-util-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-util-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..fcb4f1baf5b63ddd377ce8d57906acb406860396 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-util-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..64e27c7dc7bc09b2a60b10696f1f5611ba12d7f6 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-cert-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-cert-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..585b45589cc9e268974ab324a2dfd5e22eb69021 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-cert-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-cert-acme-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-cert-acme-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..c3b7a9d9930fffbed540ed46a96ea8fe60e3ab1c Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-cert-acme-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-cert-util-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-cert-util-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..91ce7d6a58690757c783c9e392542397fac39d1a Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-cert-util-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-deprecated-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-deprecated-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..fcc277a344a93d80afd7ab182c2801be1ec27ccd Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-deprecated-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-principal-1.18.3.Final.jar b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-principal-1.18.3.Final.jar new file mode 100644 index 0000000000000000000000000000000000000000..1c21706a6ba2ed136f7aff476cb0be9caa1fd1c0 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.wildfly.security.wildfly-elytron-x500-principal-1.18.3.Final.jar differ diff --git a/keycloak-19.0.1/lib/lib/main/org.yaml.snakeyaml-1.30.jar b/keycloak-19.0.1/lib/lib/main/org.yaml.snakeyaml-1.30.jar new file mode 100644 index 0000000000000000000000000000000000000000..6c9b2bc65be210f0c4e07df20e62affd4e922724 Binary files /dev/null and b/keycloak-19.0.1/lib/lib/main/org.yaml.snakeyaml-1.30.jar differ diff --git a/keycloak-19.0.1/lib/quarkus-run.jar b/keycloak-19.0.1/lib/quarkus-run.jar new file mode 100644 index 0000000000000000000000000000000000000000..80dc9308f135f76eb8568743d777b44962ae6c79 Binary files /dev/null and b/keycloak-19.0.1/lib/quarkus-run.jar differ diff --git a/keycloak-19.0.1/lib/quarkus/build-system.properties b/keycloak-19.0.1/lib/quarkus/build-system.properties new file mode 100644 index 0000000000000000000000000000000000000000..3fe0a45cc3f21e80de9a037d7e40a68ee3b7815e --- /dev/null +++ b/keycloak-19.0.1/lib/quarkus/build-system.properties @@ -0,0 +1,3 @@ +quarkus.application.name=keycloak-quarkus-server-app +quarkus.application.version=19.0.1 +quarkus.version=2.7.6.Final \ No newline at end of file diff --git a/keycloak-19.0.1/lib/quarkus/generated-bytecode.jar b/keycloak-19.0.1/lib/quarkus/generated-bytecode.jar new file mode 100644 index 0000000000000000000000000000000000000000..2dad3888717ff19ceb4e5706677bb66bcf458609 Binary files /dev/null and b/keycloak-19.0.1/lib/quarkus/generated-bytecode.jar differ diff --git a/keycloak-19.0.1/lib/quarkus/quarkus-application.dat b/keycloak-19.0.1/lib/quarkus/quarkus-application.dat new file mode 100644 index 0000000000000000000000000000000000000000..104b9a25bb1a97ee6056419ec87343c1f4b00895 Binary files /dev/null and b/keycloak-19.0.1/lib/quarkus/quarkus-application.dat differ diff --git a/keycloak-19.0.1/lib/quarkus/transformed-bytecode.jar b/keycloak-19.0.1/lib/quarkus/transformed-bytecode.jar new file mode 100644 index 0000000000000000000000000000000000000000..1d780e940cb2547ab77b713552e1e6063cc39686 Binary files /dev/null and b/keycloak-19.0.1/lib/quarkus/transformed-bytecode.jar differ diff --git a/keycloak-19.0.1/providers/README.md b/keycloak-19.0.1/providers/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c30bf4762b1978fed4c4bee29dfb33c30e6a864e --- /dev/null +++ b/keycloak-19.0.1/providers/README.md @@ -0,0 +1,10 @@ +Installing Custom Providers +=========================== + +Add your custom provider JAR files in this directory. + +Once you have your providers in this directory, run the following command to complete the installation: + +``` +${kc.home.dir}/bin/kc.sh build +``` diff --git a/keycloak-19.0.1/themes/README.md b/keycloak-19.0.1/themes/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3499b8499e4fee2371ee4f935d97fcc749d61cf6 --- /dev/null +++ b/keycloak-19.0.1/themes/README.md @@ -0,0 +1,24 @@ +Creating Themes +=============== + +Themes are used to configure the look and feel of login pages and the account management console. + +Custom themes packaged in a JAR file should be deployed to the `${kc.home.dir}/providers` directory. After that, run +the `build` command to install them before starting the server. + +You are also able to create your custom themes in this directory, directly. Themes within this directory do not require +the `build` command to be installed. + +When running the server in development mode using `start-dev`, themes are not cached so that you can easily work on them without a need to restart +the server when making changes. + +See the theme section in the [Server Developer Guide](https://www.keycloak.org/docs/latest/server_development/#_themes) for more details about how to create custom themes. + +Overriding the built-in templates +--------------------------------- + +While creating custom themes, especially when overriding templates, it may be useful to use the built-in templates as +a reference. These can be found within the theme directory of `../lib/lib/main/org.keycloak.keycloak-themes-19.0.1.jar`, which can be opened using any +standard ZIP archive tool. + +**Built-in themes should not be modified directly, instead a custom theme should be created.** \ No newline at end of file diff --git a/keycloak-19.0.1/version.txt b/keycloak-19.0.1/version.txt new file mode 100644 index 0000000000000000000000000000000000000000..b50c230e88415e26f9e9b51ba0544c3b1135267c --- /dev/null +++ b/keycloak-19.0.1/version.txt @@ -0,0 +1 @@ +Keycloak - Version 19.0.1 diff --git a/progetto.bash b/progetto.bash index d6e6586b46a6396e19d180b7fef6e7479c246eb9..b46048b186b9328237517b05c160b7d0750c88e4 100755 --- a/progetto.bash +++ b/progetto.bash @@ -12,11 +12,13 @@ EOF #inserite al fondo della seguente riga il comando che vi serve per far partire il vostro microservizio, facendo attenzione a farlo precedere da una & per eseguire il tutto in parallelo; la doppia && serve per far eseguire le operazioni una dopo l'altra #per luci: basta rimuovere il cancelletto qui sotto -cd webserver && bash server.bash $1 & cd ScenariMicroservizio && bash scenari.bash $1 & cd antifurto && bash antifurto.bash $1 & cd LuciMicro && bash luci.bash +cd keycloak-19.0.1 && bin/kc.sh start-dev & +cd WebServer && bash server.bash $1 & +cd ScenariMicroservizio && bash scenari.bash $1 & +cd antifurto && bash antifurto.bash $1 #& +#cd LuciMicro && bash luci.bash #chiudo tutto il resto -#tokill=$(ps | grep 'progetto.bash' && ps | grep 'code.Server' && ps | grep 'server.bash') -#nogrep=$(grep -wv grep <<< "$tokill") @@ -46,6 +48,11 @@ do kill -15 $i done +for i in ` ps -ef | grep "start-dev" | grep -v grep | awk '{print $2}'` +do + kill -15 $i +done + echo ' diff --git a/relazione/SchemaRapportoFinale.pdf b/relazione/SchemaRapportoFinale.pdf new file mode 100644 index 0000000000000000000000000000000000000000..253f9abaa13d8179abda6a8ae9d31fb9289585c8 Binary files /dev/null and b/relazione/SchemaRapportoFinale.pdf differ diff --git a/relazione/relazione.md b/relazione/relazione.md new file mode 100644 index 0000000000000000000000000000000000000000..6d67018f3a9d59656647c2cb92bab14dacf4e8f5 --- /dev/null +++ b/relazione/relazione.md @@ -0,0 +1,34 @@ +# 1. Specifiche funzionali +## 1.1. Controllo tramite sensori ed attuatori + + +## 1.2. Accessibilita' via internet + + +# 2. Analisi +## 2.1. Installazione del sistema in reti private + + +## 2.2. Accessibilita' da rete pubblica e da rete privata + + +## 2.3. Caratteristiche del traffico dati da sostenere e vincoli in tempo reale + +## 2.4. Tecniche viste a lezione con cui soddisfare i requisiti + + +# 3. Approccio tecnologico +## 3.1. Vantaggi dell'uso di un message broker e come lo giudichiamo rispetto alle altre scelte + +# 4. Architettura del software +## 4.1. Organizzazione del software (evidenziandone i moduli) + +## 4.2. Distribuzione delle funzionalita' tra i moduli, attivita' e loro interazione + +# 5. Descrizione dell'implementazione +## 5.1. UML delle classi implementate + +## 5.2. Descrizione della UI + +# 6. Validazione del software +## 6.1. Procedure usate per verificare il corretto funzionamento del sistema diff --git a/relazione/relazione.pptx b/relazione/relazione.pptx new file mode 100644 index 0000000000000000000000000000000000000000..41d7df34d3a6a89e568d45c94aa3ad55f4d301ba Binary files /dev/null and b/relazione/relazione.pptx differ diff --git a/relazione/relazione.txt b/relazione/relazione.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/relazione/~$relazione.pptx b/relazione/~$relazione.pptx new file mode 100644 index 0000000000000000000000000000000000000000..5b8d5511a1ff7f68d97f066e25cf99db2cdebd7b Binary files /dev/null and b/relazione/~$relazione.pptx differ diff --git a/webapp/node_modules/jose/LICENSE.md b/webapp/node_modules/jose/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..d0ec038a85d95944b66fec1b44cbb1ade45919b7 --- /dev/null +++ b/webapp/node_modules/jose/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Filip Skokan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/webapp/node_modules/jose/README.md b/webapp/node_modules/jose/README.md new file mode 100644 index 0000000000000000000000000000000000000000..eb86f51c654f5b9f99a5b5a0f255823ae60b9850 --- /dev/null +++ b/webapp/node_modules/jose/README.md @@ -0,0 +1,159 @@ +# jose + +> "JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK, JWKS with no dependencies using runtime's native crypto in Node.js, Browser, Cloudflare Workers, Electron, and Deno. + +## Implemented specs & features + +The following specifications are implemented by `jose` + +- JSON Web Signature (JWS) - [RFC7515][spec-jws] +- JSON Web Encryption (JWE) - [RFC7516][spec-jwe] +- JSON Web Key (JWK) - [RFC7517][spec-jwk] +- JSON Web Algorithms (JWA) - [RFC7518][spec-jwa] +- JSON Web Token (JWT) - [RFC7519][spec-jwt] +- JSON Web Key Thumbprint - [RFC7638][spec-thumbprint] +- JSON Web Key Thumbprint URI - [RFC9278][spec-thumbprint-uri] +- JWS Unencoded Payload Option - [RFC7797][spec-b64] +- CFRG Elliptic Curve ECDH and Signatures - [RFC8037][spec-okp] +- secp256k1 EC Key curve support - [JOSE Registrations for WebAuthn Algorithms][spec-secp256k1] + +The test suite utilizes examples defined in [RFC7520][spec-cookbook] to confirm its JOSE +implementation is correct. + +## [💗 Help the project](https://github.com/sponsors/panva) + +## Documentation + +**`example`** ESM import +```js +import * as jose from 'jose' +``` + +**`example`** CJS require +```js +const jose = require('jose') +``` + +**`example`** Deno import +```js +import * as jose from 'https://deno.land/x/jose/index.ts' +``` + +- JSON Web Tokens (JWT) + - [Signing](docs/classes/jwt_sign.SignJWT.md#readme) + - [Verification & JWT Claims Set Validation](docs/functions/jwt_verify.jwtVerify.md#readme) + - Encrypted JSON Web Tokens + - [Encryption](docs/classes/jwt_encrypt.EncryptJWT.md#readme) + - [Decryption & JWT Claims Set Validation](docs/functions/jwt_decrypt.jwtDecrypt.md#readme) +- Key Import + - [JWK Import](docs/functions/key_import.importJWK.md#readme) + - [Public Key Import (SPKI)](docs/functions/key_import.importSPKI.md#readme) + - [Public Key Import (X.509 Certificate)](docs/functions/key_import.importX509.md#readme) + - [Private Key Import (PKCS #8)](docs/functions/key_import.importPKCS8.md#readme) +- JSON Web Encryption (JWE) + - Encryption - [Compact](docs/classes/jwe_compact_encrypt.CompactEncrypt.md#readme), [Flattened](docs/classes/jwe_flattened_encrypt.FlattenedEncrypt.md#readme), [General](docs/classes/jwe_general_encrypt.GeneralEncrypt.md#readme) + - Decryption - [Compact](docs/functions/jwe_compact_decrypt.compactDecrypt.md#readme), [Flattened](docs/functions/jwe_flattened_decrypt.flattenedDecrypt.md#readme), [General](docs/functions/jwe_general_decrypt.generalDecrypt.md#readme) +- JSON Web Signature (JWS) + - Signing - [Compact](docs/classes/jws_compact_sign.CompactSign.md#readme), [Flattened](docs/classes/jws_flattened_sign.FlattenedSign.md#readme), [General](docs/classes/jws_general_sign.GeneralSign.md#readme) + - Verification - [Compact](docs/functions/jws_compact_verify.compactVerify.md#readme), [Flattened](docs/functions/jws_flattened_verify.flattenedVerify.md#readme), [General](docs/functions/jws_general_verify.generalVerify.md#readme) +- JSON Web Key (JWK) + - [Calculating JWK Thumbprint](docs/functions/jwk_thumbprint.calculateJwkThumbprint.md#readme) + - [Calculating JWK Thumbprint URI](docs/functions/jwk_thumbprint.calculateJwkThumbprintUri.md#readme) + - [Verification using a JWK Embedded in a JWS Header](docs/functions/jwk_embedded.EmbeddedJWK.md#readme) +- JSON Web Key Set (JWKS) + - [Verify using a local JWKSet](docs/functions/jwks_local.createLocalJWKSet.md#readme) + - [Verify using a remote JWKSet](docs/functions/jwks_remote.createRemoteJWKSet.md#readme) +- Key Pair or Secret Generation + - [Asymmetric Key Pair Generation](docs/functions/key_generate_key_pair.generateKeyPair.md#readme) + - [Symmetric Secret Generation](docs/functions/key_generate_secret.generateSecret.md#readme) +- Key Export + - [JWK Export](docs/functions/key_export.exportJWK.md#readme) + - [Private Key Export](docs/functions/key_export.exportPKCS8.md#readme) + - [Public Key Export](docs/functions/key_export.exportSPKI.md#readme) +- Utilities + - [Decoding Token's Protected Header](docs/functions/util_decode_protected_header.decodeProtectedHeader.md#readme) + - [Decoding JWT Claims Set](docs/functions/util_decode_jwt.decodeJwt.md#readme) +- [Unsecured JWT](docs/classes/jwt_unsecured.UnsecuredJWT.md#readme) +- [JOSE Errors](docs/modules/util_errors.md#readme) + +## Supported Runtimes, Environments, Platforms + +- [Browser Support][] +- [Cloudflare Workers Support][] +- [Deno Support][] +- [Electron Support][] +- [Next.js Middleware / Vercel Edge Functions Support][] +- [Node.js Support][] + +## FAQ + +#### Supported Versions + +| Version | Security Fixes 🔑 | Other Bug Fixes 🞠| New Features â | +| ------- | --------- | -------- | -------- | +| [v4.x](https://github.com/panva/jose/tree/v4.x) | ✅ | ✅ | ✅ | +| [v3.x](https://github.com/panva/jose/tree/v3.x), [v2.x](https://github.com/panva/jose/tree/v2.x), [v1.x](https://github.com/panva/jose/tree/v1.x) | ✅ | ⌠| ⌠| + +#### Semver? + +**Yes.** All module's public API is subject to [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html). + +#### How is it different from [`jws`](https://github.com/brianloveswords/node-jws), [`jwa`](https://github.com/brianloveswords/node-jwa) or [`jsonwebtoken`](https://github.com/auth0/node-jsonwebtoken)? + +- it supports Browser, Cloudflare Workers, and Deno runtimes +- it supports encrypted JWTs (i.e. in JWE format) +- supports secp256k1, Ed25519, Ed448, X25519, and X448 +- it supports JWK Key Format for all four key types (oct, RSA, EC and OKP) +- it is exclusively using native platform Key object representations (CryptoKey and KeyObject) +- there is JSON Web Encryption support +- it supports the General and Flattened JSON Serialization Syntaxes +- it supports the "crit" member validations to make sure extensions are handled correctly + +#### How is it different from [`node-jose`](https://github.com/cisco/node-jose)? + +`node-jose` is built to work in any javascript runtime, to be able to do that it packs a lot of +polyfills and javascript implementation code in the form of +[`node-forge`](https://github.com/digitalbazaar/forge), this significantly increases the footprint +of the modules with dependencies that either aren't ever used or have native implementation available +in the runtime already, those are often times faster and more reliable. + +- supports secp256k1, Ed25519, Ed448, X25519, and X448 + +#### Uint8Array?! + +- Whenever `Uint8Array` is a valid input, so is [`Buffer`](https://nodejs.org/api/buffer.html#buffer_buffer) since buffers are instances of Uint8Array. +- Whenever `Uint8Array` is returned and you want a `Buffer` instead, use `Buffer.from(uint8array)`. + +#### Bundle Size, Package Size, Tree Shaking + +Yes the bundle size is on the larger side, that is because each module is actually published +multiple times so that it can remain truly without dependencies and be universal / isomorphic. + +Nevertheless, since each module can be required independently and is fully tree-shakeable, the +install size should not be a cause for concern. + +[documentation]: /docs/README.md +[node-jose]: https://github.com/cisco/node-jose +[spec-b64]: https://www.rfc-editor.org/rfc/rfc7797 +[spec-cookbook]: https://www.rfc-editor.org/rfc/rfc7520 +[spec-jwa]: https://www.rfc-editor.org/rfc/rfc7518 +[spec-jwe]: https://www.rfc-editor.org/rfc/rfc7516 +[spec-jwk]: https://www.rfc-editor.org/rfc/rfc7517 +[spec-jws]: https://www.rfc-editor.org/rfc/rfc7515 +[spec-jwt]: https://www.rfc-editor.org/rfc/rfc7519 +[spec-okp]: https://www.rfc-editor.org/rfc/rfc8037 +[spec-secp256k1]: https://www.rfc-editor.org/rfc/rfc8812 +[spec-thumbprint]: https://www.rfc-editor.org/rfc/rfc7638 +[spec-thumbprint-uri]: https://www.rfc-editor.org/rfc/rfc9278 +[support-sponsor]: https://github.com/sponsors/panva +[conditional-exports]: https://nodejs.org/api/packages.html#packages_conditional_exports +[webcrypto]: https://www.w3.org/TR/WebCryptoAPI/ +[nodewebcrypto]: https://nodejs.org/docs/latest-v15.x/api/webcrypto.html +[deno.land/x/jose]: https://deno.land/x/jose + +[Browser Support]: https://github.com/panva/jose/issues/263 +[Cloudflare Workers Support]: https://github.com/panva/jose/issues/265 +[Deno Support]: https://github.com/panva/jose/issues/266 +[Electron Support]: https://github.com/panva/jose/issues/264 +[Next.js Middleware / Vercel Edge Functions Support]: https://github.com/panva/jose/issues/301 +[Node.js Support]: https://github.com/panva/jose/issues/262 diff --git a/webapp/node_modules/jose/dist/browser/index.js b/webapp/node_modules/jose/dist/browser/index.js new file mode 100644 index 0000000000000000000000000000000000000000..00e8cee4cd00518c908d46e937afd6242f0e4c19 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/index.js @@ -0,0 +1,31 @@ +export { compactDecrypt } from './jwe/compact/decrypt.js'; +export { flattenedDecrypt } from './jwe/flattened/decrypt.js'; +export { generalDecrypt } from './jwe/general/decrypt.js'; +export { GeneralEncrypt } from './jwe/general/encrypt.js'; +export { compactVerify } from './jws/compact/verify.js'; +export { flattenedVerify } from './jws/flattened/verify.js'; +export { generalVerify } from './jws/general/verify.js'; +export { jwtVerify } from './jwt/verify.js'; +export { jwtDecrypt } from './jwt/decrypt.js'; +export { CompactEncrypt } from './jwe/compact/encrypt.js'; +export { FlattenedEncrypt } from './jwe/flattened/encrypt.js'; +export { CompactSign } from './jws/compact/sign.js'; +export { FlattenedSign } from './jws/flattened/sign.js'; +export { GeneralSign } from './jws/general/sign.js'; +export { SignJWT } from './jwt/sign.js'; +export { EncryptJWT } from './jwt/encrypt.js'; +export { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint.js'; +export { EmbeddedJWK } from './jwk/embedded.js'; +export { createLocalJWKSet } from './jwks/local.js'; +export { createRemoteJWKSet } from './jwks/remote.js'; +export { UnsecuredJWT } from './jwt/unsecured.js'; +export { exportPKCS8, exportSPKI, exportJWK } from './key/export.js'; +export { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js'; +export { decodeProtectedHeader } from './util/decode_protected_header.js'; +export { decodeJwt } from './util/decode_jwt.js'; +import * as errors_1 from './util/errors.js'; +export { errors_1 as errors }; +export { generateKeyPair } from './key/generate_key_pair.js'; +export { generateSecret } from './key/generate_secret.js'; +import * as base64url_1 from './util/base64url.js'; +export { base64url_1 as base64url }; diff --git a/webapp/node_modules/jose/dist/browser/jwe/compact/decrypt.js b/webapp/node_modules/jose/dist/browser/jwe/compact/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..129aeb6e39009bac382346947235e409be5b25ac --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwe/compact/decrypt.js @@ -0,0 +1,27 @@ +import { flattenedDecrypt } from '../flattened/decrypt.js'; +import { JWEInvalid } from '../../util/errors.js'; +import { decoder } from '../../lib/buffer_utils.js'; +export async function compactDecrypt(jwe, key, options) { + if (jwe instanceof Uint8Array) { + jwe = decoder.decode(jwe); + } + if (typeof jwe !== 'string') { + throw new JWEInvalid('Compact JWE must be a string or Uint8Array'); + } + const { 0: protectedHeader, 1: encryptedKey, 2: iv, 3: ciphertext, 4: tag, length, } = jwe.split('.'); + if (length !== 5) { + throw new JWEInvalid('Invalid Compact JWE'); + } + const decrypted = await flattenedDecrypt({ + ciphertext, + iv: (iv || undefined), + protected: protectedHeader || undefined, + tag: (tag || undefined), + encrypted_key: encryptedKey || undefined, + }, key, options); + const result = { plaintext: decrypted.plaintext, protectedHeader: decrypted.protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: decrypted.key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/browser/jwe/compact/encrypt.js b/webapp/node_modules/jose/dist/browser/jwe/compact/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..e689139465837103e186258977a954deda6370b1 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwe/compact/encrypt.js @@ -0,0 +1,26 @@ +import { FlattenedEncrypt } from '../flattened/encrypt.js'; +export class CompactEncrypt { + constructor(plaintext) { + this._flattened = new FlattenedEncrypt(plaintext); + } + setContentEncryptionKey(cek) { + this._flattened.setContentEncryptionKey(cek); + return this; + } + setInitializationVector(iv) { + this._flattened.setInitializationVector(iv); + return this; + } + setProtectedHeader(protectedHeader) { + this._flattened.setProtectedHeader(protectedHeader); + return this; + } + setKeyManagementParameters(parameters) { + this._flattened.setKeyManagementParameters(parameters); + return this; + } + async encrypt(key, options) { + const jwe = await this._flattened.encrypt(key, options); + return [jwe.protected, jwe.encrypted_key, jwe.iv, jwe.ciphertext, jwe.tag].join('.'); + } +} diff --git a/webapp/node_modules/jose/dist/browser/jwe/flattened/decrypt.js b/webapp/node_modules/jose/dist/browser/jwe/flattened/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..4cc03e15ec6513e017885db2f756266de67d9cfd --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwe/flattened/decrypt.js @@ -0,0 +1,137 @@ +import { decode as base64url } from '../../runtime/base64url.js'; +import decrypt from '../../runtime/decrypt.js'; +import { inflate } from '../../runtime/zlib.js'; +import { JOSEAlgNotAllowed, JOSENotSupported, JWEInvalid } from '../../util/errors.js'; +import isDisjoint from '../../lib/is_disjoint.js'; +import isObject from '../../lib/is_object.js'; +import decryptKeyManagement from '../../lib/decrypt_key_management.js'; +import { encoder, decoder, concat } from '../../lib/buffer_utils.js'; +import generateCek from '../../lib/cek.js'; +import validateCrit from '../../lib/validate_crit.js'; +import validateAlgorithms from '../../lib/validate_algorithms.js'; +export async function flattenedDecrypt(jwe, key, options) { + var _a; + if (!isObject(jwe)) { + throw new JWEInvalid('Flattened JWE must be an object'); + } + if (jwe.protected === undefined && jwe.header === undefined && jwe.unprotected === undefined) { + throw new JWEInvalid('JOSE Header missing'); + } + if (typeof jwe.iv !== 'string') { + throw new JWEInvalid('JWE Initialization Vector missing or incorrect type'); + } + if (typeof jwe.ciphertext !== 'string') { + throw new JWEInvalid('JWE Ciphertext missing or incorrect type'); + } + if (typeof jwe.tag !== 'string') { + throw new JWEInvalid('JWE Authentication Tag missing or incorrect type'); + } + if (jwe.protected !== undefined && typeof jwe.protected !== 'string') { + throw new JWEInvalid('JWE Protected Header incorrect type'); + } + if (jwe.encrypted_key !== undefined && typeof jwe.encrypted_key !== 'string') { + throw new JWEInvalid('JWE Encrypted Key incorrect type'); + } + if (jwe.aad !== undefined && typeof jwe.aad !== 'string') { + throw new JWEInvalid('JWE AAD incorrect type'); + } + if (jwe.header !== undefined && !isObject(jwe.header)) { + throw new JWEInvalid('JWE Shared Unprotected Header incorrect type'); + } + if (jwe.unprotected !== undefined && !isObject(jwe.unprotected)) { + throw new JWEInvalid('JWE Per-Recipient Unprotected Header incorrect type'); + } + let parsedProt; + if (jwe.protected) { + try { + const protectedHeader = base64url(jwe.protected); + parsedProt = JSON.parse(decoder.decode(protectedHeader)); + } + catch (_b) { + throw new JWEInvalid('JWE Protected Header is invalid'); + } + } + if (!isDisjoint(parsedProt, jwe.header, jwe.unprotected)) { + throw new JWEInvalid('JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint'); + } + const joseHeader = { + ...parsedProt, + ...jwe.header, + ...jwe.unprotected, + }; + validateCrit(JWEInvalid, new Map(), options === null || options === void 0 ? void 0 : options.crit, parsedProt, joseHeader); + if (joseHeader.zip !== undefined) { + if (!parsedProt || !parsedProt.zip) { + throw new JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected'); + } + if (joseHeader.zip !== 'DEF') { + throw new JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value'); + } + } + const { alg, enc } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new JWEInvalid('missing JWE Algorithm (alg) in JWE Header'); + } + if (typeof enc !== 'string' || !enc) { + throw new JWEInvalid('missing JWE Encryption Algorithm (enc) in JWE Header'); + } + const keyManagementAlgorithms = options && validateAlgorithms('keyManagementAlgorithms', options.keyManagementAlgorithms); + const contentEncryptionAlgorithms = options && + validateAlgorithms('contentEncryptionAlgorithms', options.contentEncryptionAlgorithms); + if (keyManagementAlgorithms && !keyManagementAlgorithms.has(alg)) { + throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed'); + } + if (contentEncryptionAlgorithms && !contentEncryptionAlgorithms.has(enc)) { + throw new JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter not allowed'); + } + let encryptedKey; + if (jwe.encrypted_key !== undefined) { + encryptedKey = base64url(jwe.encrypted_key); + } + let resolvedKey = false; + if (typeof key === 'function') { + key = await key(parsedProt, jwe); + resolvedKey = true; + } + let cek; + try { + cek = await decryptKeyManagement(alg, key, encryptedKey, joseHeader); + } + catch (err) { + if (err instanceof TypeError) { + throw err; + } + cek = generateCek(enc); + } + const iv = base64url(jwe.iv); + const tag = base64url(jwe.tag); + const protectedHeader = encoder.encode((_a = jwe.protected) !== null && _a !== void 0 ? _a : ''); + let additionalData; + if (jwe.aad !== undefined) { + additionalData = concat(protectedHeader, encoder.encode('.'), encoder.encode(jwe.aad)); + } + else { + additionalData = protectedHeader; + } + let plaintext = await decrypt(enc, cek, base64url(jwe.ciphertext), iv, tag, additionalData); + if (joseHeader.zip === 'DEF') { + plaintext = await ((options === null || options === void 0 ? void 0 : options.inflateRaw) || inflate)(plaintext); + } + const result = { plaintext }; + if (jwe.protected !== undefined) { + result.protectedHeader = parsedProt; + } + if (jwe.aad !== undefined) { + result.additionalAuthenticatedData = base64url(jwe.aad); + } + if (jwe.unprotected !== undefined) { + result.sharedUnprotectedHeader = jwe.unprotected; + } + if (jwe.header !== undefined) { + result.unprotectedHeader = jwe.header; + } + if (resolvedKey) { + return { ...result, key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/browser/jwe/flattened/encrypt.js b/webapp/node_modules/jose/dist/browser/jwe/flattened/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..1e60ecd8c470193905b13d416eab3f1f04443795 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwe/flattened/encrypt.js @@ -0,0 +1,175 @@ +import { encode as base64url } from '../../runtime/base64url.js'; +import encrypt from '../../runtime/encrypt.js'; +import { deflate } from '../../runtime/zlib.js'; +import generateIv from '../../lib/iv.js'; +import encryptKeyManagement from '../../lib/encrypt_key_management.js'; +import { JOSENotSupported, JWEInvalid } from '../../util/errors.js'; +import isDisjoint from '../../lib/is_disjoint.js'; +import { encoder, decoder, concat } from '../../lib/buffer_utils.js'; +import validateCrit from '../../lib/validate_crit.js'; +export const unprotected = Symbol(); +export class FlattenedEncrypt { + constructor(plaintext) { + if (!(plaintext instanceof Uint8Array)) { + throw new TypeError('plaintext must be an instance of Uint8Array'); + } + this._plaintext = plaintext; + } + setKeyManagementParameters(parameters) { + if (this._keyManagementParameters) { + throw new TypeError('setKeyManagementParameters can only be called once'); + } + this._keyManagementParameters = parameters; + return this; + } + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setSharedUnprotectedHeader(sharedUnprotectedHeader) { + if (this._sharedUnprotectedHeader) { + throw new TypeError('setSharedUnprotectedHeader can only be called once'); + } + this._sharedUnprotectedHeader = sharedUnprotectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + if (this._unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this._unprotectedHeader = unprotectedHeader; + return this; + } + setAdditionalAuthenticatedData(aad) { + this._aad = aad; + return this; + } + setContentEncryptionKey(cek) { + if (this._cek) { + throw new TypeError('setContentEncryptionKey can only be called once'); + } + this._cek = cek; + return this; + } + setInitializationVector(iv) { + if (this._iv) { + throw new TypeError('setInitializationVector can only be called once'); + } + this._iv = iv; + return this; + } + async encrypt(key, options) { + if (!this._protectedHeader && !this._unprotectedHeader && !this._sharedUnprotectedHeader) { + throw new JWEInvalid('either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()'); + } + if (!isDisjoint(this._protectedHeader, this._unprotectedHeader, this._sharedUnprotectedHeader)) { + throw new JWEInvalid('JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint'); + } + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + ...this._sharedUnprotectedHeader, + }; + validateCrit(JWEInvalid, new Map(), options === null || options === void 0 ? void 0 : options.crit, this._protectedHeader, joseHeader); + if (joseHeader.zip !== undefined) { + if (!this._protectedHeader || !this._protectedHeader.zip) { + throw new JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected'); + } + if (joseHeader.zip !== 'DEF') { + throw new JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value'); + } + } + const { alg, enc } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid'); + } + if (typeof enc !== 'string' || !enc) { + throw new JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid'); + } + let encryptedKey; + if (alg === 'dir') { + if (this._cek) { + throw new TypeError('setContentEncryptionKey cannot be called when using Direct Encryption'); + } + } + else if (alg === 'ECDH-ES') { + if (this._cek) { + throw new TypeError('setContentEncryptionKey cannot be called when using Direct Key Agreement'); + } + } + let cek; + { + let parameters; + ({ cek, encryptedKey, parameters } = await encryptKeyManagement(alg, enc, key, this._cek, this._keyManagementParameters)); + if (parameters) { + if (options && unprotected in options) { + if (!this._unprotectedHeader) { + this.setUnprotectedHeader(parameters); + } + else { + this._unprotectedHeader = { ...this._unprotectedHeader, ...parameters }; + } + } + else { + if (!this._protectedHeader) { + this.setProtectedHeader(parameters); + } + else { + this._protectedHeader = { ...this._protectedHeader, ...parameters }; + } + } + } + } + this._iv || (this._iv = generateIv(enc)); + let additionalData; + let protectedHeader; + let aadMember; + if (this._protectedHeader) { + protectedHeader = encoder.encode(base64url(JSON.stringify(this._protectedHeader))); + } + else { + protectedHeader = encoder.encode(''); + } + if (this._aad) { + aadMember = base64url(this._aad); + additionalData = concat(protectedHeader, encoder.encode('.'), encoder.encode(aadMember)); + } + else { + additionalData = protectedHeader; + } + let ciphertext; + let tag; + if (joseHeader.zip === 'DEF') { + const deflated = await ((options === null || options === void 0 ? void 0 : options.deflateRaw) || deflate)(this._plaintext); + ({ ciphertext, tag } = await encrypt(enc, deflated, cek, this._iv, additionalData)); + } + else { + ; + ({ ciphertext, tag } = await encrypt(enc, this._plaintext, cek, this._iv, additionalData)); + } + const jwe = { + ciphertext: base64url(ciphertext), + iv: base64url(this._iv), + tag: base64url(tag), + }; + if (encryptedKey) { + jwe.encrypted_key = base64url(encryptedKey); + } + if (aadMember) { + jwe.aad = aadMember; + } + if (this._protectedHeader) { + jwe.protected = decoder.decode(protectedHeader); + } + if (this._sharedUnprotectedHeader) { + jwe.unprotected = this._sharedUnprotectedHeader; + } + if (this._unprotectedHeader) { + jwe.header = this._unprotectedHeader; + } + return jwe; + } +} diff --git a/webapp/node_modules/jose/dist/browser/jwe/general/decrypt.js b/webapp/node_modules/jose/dist/browser/jwe/general/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..d21b6d1fa8564ac90fbbc81abb66d0300c2f3084 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwe/general/decrypt.js @@ -0,0 +1,31 @@ +import { flattenedDecrypt } from '../flattened/decrypt.js'; +import { JWEDecryptionFailed, JWEInvalid } from '../../util/errors.js'; +import isObject from '../../lib/is_object.js'; +export async function generalDecrypt(jwe, key, options) { + if (!isObject(jwe)) { + throw new JWEInvalid('General JWE must be an object'); + } + if (!Array.isArray(jwe.recipients) || !jwe.recipients.every(isObject)) { + throw new JWEInvalid('JWE Recipients missing or incorrect type'); + } + if (!jwe.recipients.length) { + throw new JWEInvalid('JWE Recipients has no members'); + } + for (const recipient of jwe.recipients) { + try { + return await flattenedDecrypt({ + aad: jwe.aad, + ciphertext: jwe.ciphertext, + encrypted_key: recipient.encrypted_key, + header: recipient.header, + iv: jwe.iv, + protected: jwe.protected, + tag: jwe.tag, + unprotected: jwe.unprotected, + }, key, options); + } + catch (_a) { + } + } + throw new JWEDecryptionFailed(); +} diff --git a/webapp/node_modules/jose/dist/browser/jwe/general/encrypt.js b/webapp/node_modules/jose/dist/browser/jwe/general/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..3ee53dec441c8f2576150ee87729e048ead6547f --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwe/general/encrypt.js @@ -0,0 +1,178 @@ +import { FlattenedEncrypt, unprotected } from '../flattened/encrypt.js'; +import { JWEInvalid } from '../../util/errors.js'; +import generateCek from '../../lib/cek.js'; +import isDisjoint from '../../lib/is_disjoint.js'; +import encryptKeyManagement from '../../lib/encrypt_key_management.js'; +import { encode as base64url } from '../../runtime/base64url.js'; +import validateCrit from '../../lib/validate_crit.js'; +class IndividualRecipient { + constructor(enc, key, options) { + this.parent = enc; + this.key = key; + this.options = options; + } + setUnprotectedHeader(unprotectedHeader) { + if (this.unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this.unprotectedHeader = unprotectedHeader; + return this; + } + addRecipient(...args) { + return this.parent.addRecipient(...args); + } + encrypt(...args) { + return this.parent.encrypt(...args); + } + done() { + return this.parent; + } +} +export class GeneralEncrypt { + constructor(plaintext) { + this._recipients = []; + this._plaintext = plaintext; + } + addRecipient(key, options) { + const recipient = new IndividualRecipient(this, key, { crit: options === null || options === void 0 ? void 0 : options.crit }); + this._recipients.push(recipient); + return recipient; + } + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setSharedUnprotectedHeader(sharedUnprotectedHeader) { + if (this._unprotectedHeader) { + throw new TypeError('setSharedUnprotectedHeader can only be called once'); + } + this._unprotectedHeader = sharedUnprotectedHeader; + return this; + } + setAdditionalAuthenticatedData(aad) { + this._aad = aad; + return this; + } + async encrypt(options) { + var _a, _b, _c; + if (!this._recipients.length) { + throw new JWEInvalid('at least one recipient must be added'); + } + options = { deflateRaw: options === null || options === void 0 ? void 0 : options.deflateRaw }; + if (this._recipients.length === 1) { + const [recipient] = this._recipients; + const flattened = await new FlattenedEncrypt(this._plaintext) + .setAdditionalAuthenticatedData(this._aad) + .setProtectedHeader(this._protectedHeader) + .setSharedUnprotectedHeader(this._unprotectedHeader) + .setUnprotectedHeader(recipient.unprotectedHeader) + .encrypt(recipient.key, { ...recipient.options, ...options }); + let jwe = { + ciphertext: flattened.ciphertext, + iv: flattened.iv, + recipients: [{}], + tag: flattened.tag, + }; + if (flattened.aad) + jwe.aad = flattened.aad; + if (flattened.protected) + jwe.protected = flattened.protected; + if (flattened.unprotected) + jwe.unprotected = flattened.unprotected; + if (flattened.encrypted_key) + jwe.recipients[0].encrypted_key = flattened.encrypted_key; + if (flattened.header) + jwe.recipients[0].header = flattened.header; + return jwe; + } + let enc; + for (let i = 0; i < this._recipients.length; i++) { + const recipient = this._recipients[i]; + if (!isDisjoint(this._protectedHeader, this._unprotectedHeader, recipient.unprotectedHeader)) { + throw new JWEInvalid('JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint'); + } + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + ...recipient.unprotectedHeader, + }; + const { alg } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid'); + } + if (alg === 'dir' || alg === 'ECDH-ES') { + throw new JWEInvalid('"dir" and "ECDH-ES" alg may only be used with a single recipient'); + } + if (typeof joseHeader.enc !== 'string' || !joseHeader.enc) { + throw new JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid'); + } + if (!enc) { + enc = joseHeader.enc; + } + else if (enc !== joseHeader.enc) { + throw new JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients'); + } + validateCrit(JWEInvalid, new Map(), recipient.options.crit, this._protectedHeader, joseHeader); + if (joseHeader.zip !== undefined) { + if (!this._protectedHeader || !this._protectedHeader.zip) { + throw new JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected'); + } + } + } + const cek = generateCek(enc); + let jwe = { + ciphertext: '', + iv: '', + recipients: [], + tag: '', + }; + for (let i = 0; i < this._recipients.length; i++) { + const recipient = this._recipients[i]; + const target = {}; + jwe.recipients.push(target); + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + ...recipient.unprotectedHeader, + }; + const p2c = joseHeader.alg.startsWith('PBES2') ? 2048 + i : undefined; + if (i === 0) { + const flattened = await new FlattenedEncrypt(this._plaintext) + .setAdditionalAuthenticatedData(this._aad) + .setContentEncryptionKey(cek) + .setProtectedHeader(this._protectedHeader) + .setSharedUnprotectedHeader(this._unprotectedHeader) + .setUnprotectedHeader(recipient.unprotectedHeader) + .setKeyManagementParameters({ p2c }) + .encrypt(recipient.key, { + ...recipient.options, + ...options, + [unprotected]: true, + }); + jwe.ciphertext = flattened.ciphertext; + jwe.iv = flattened.iv; + jwe.tag = flattened.tag; + if (flattened.aad) + jwe.aad = flattened.aad; + if (flattened.protected) + jwe.protected = flattened.protected; + if (flattened.unprotected) + jwe.unprotected = flattened.unprotected; + target.encrypted_key = flattened.encrypted_key; + if (flattened.header) + target.header = flattened.header; + continue; + } + const { encryptedKey, parameters } = await encryptKeyManagement(((_a = recipient.unprotectedHeader) === null || _a === void 0 ? void 0 : _a.alg) || + ((_b = this._protectedHeader) === null || _b === void 0 ? void 0 : _b.alg) || + ((_c = this._unprotectedHeader) === null || _c === void 0 ? void 0 : _c.alg), enc, recipient.key, cek, { p2c }); + target.encrypted_key = base64url(encryptedKey); + if (recipient.unprotectedHeader || parameters) + target.header = { ...recipient.unprotectedHeader, ...parameters }; + } + return jwe; + } +} diff --git a/webapp/node_modules/jose/dist/browser/jwk/embedded.js b/webapp/node_modules/jose/dist/browser/jwk/embedded.js new file mode 100644 index 0000000000000000000000000000000000000000..58db2825526bb2e33f402ec9865758ed1df6ec16 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwk/embedded.js @@ -0,0 +1,17 @@ +import { importJWK } from '../key/import.js'; +import isObject from '../lib/is_object.js'; +import { JWSInvalid } from '../util/errors.js'; +export async function EmbeddedJWK(protectedHeader, token) { + const joseHeader = { + ...protectedHeader, + ...token.header, + }; + if (!isObject(joseHeader.jwk)) { + throw new JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object'); + } + const key = await importJWK({ ...joseHeader.jwk, ext: true }, joseHeader.alg, true); + if (key instanceof Uint8Array || key.type !== 'public') { + throw new JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key'); + } + return key; +} diff --git a/webapp/node_modules/jose/dist/browser/jwk/thumbprint.js b/webapp/node_modules/jose/dist/browser/jwk/thumbprint.js new file mode 100644 index 0000000000000000000000000000000000000000..49f86b17430cfda95a336f3b49c1186e5a5f0a21 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwk/thumbprint.js @@ -0,0 +1,53 @@ +import digest from '../runtime/digest.js'; +import { encode as base64url } from '../runtime/base64url.js'; +import { JOSENotSupported, JWKInvalid } from '../util/errors.js'; +import { encoder } from '../lib/buffer_utils.js'; +import isObject from '../lib/is_object.js'; +const check = (value, description) => { + if (typeof value !== 'string' || !value) { + throw new JWKInvalid(`${description} missing or invalid`); + } +}; +export async function calculateJwkThumbprint(jwk, digestAlgorithm) { + if (!isObject(jwk)) { + throw new TypeError('JWK must be an object'); + } + digestAlgorithm !== null && digestAlgorithm !== void 0 ? digestAlgorithm : (digestAlgorithm = 'sha256'); + if (digestAlgorithm !== 'sha256' && + digestAlgorithm !== 'sha384' && + digestAlgorithm !== 'sha512') { + throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"'); + } + let components; + switch (jwk.kty) { + case 'EC': + check(jwk.crv, '"crv" (Curve) Parameter'); + check(jwk.x, '"x" (X Coordinate) Parameter'); + check(jwk.y, '"y" (Y Coordinate) Parameter'); + components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y }; + break; + case 'OKP': + check(jwk.crv, '"crv" (Subtype of Key Pair) Parameter'); + check(jwk.x, '"x" (Public Key) Parameter'); + components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x }; + break; + case 'RSA': + check(jwk.e, '"e" (Exponent) Parameter'); + check(jwk.n, '"n" (Modulus) Parameter'); + components = { e: jwk.e, kty: jwk.kty, n: jwk.n }; + break; + case 'oct': + check(jwk.k, '"k" (Key Value) Parameter'); + components = { k: jwk.k, kty: jwk.kty }; + break; + default: + throw new JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported'); + } + const data = encoder.encode(JSON.stringify(components)); + return base64url(await digest(digestAlgorithm, data)); +} +export async function calculateJwkThumbprintUri(jwk, digestAlgorithm) { + digestAlgorithm !== null && digestAlgorithm !== void 0 ? digestAlgorithm : (digestAlgorithm = 'sha256'); + const thumbprint = await calculateJwkThumbprint(jwk, digestAlgorithm); + return `urn:ietf:params:oauth:jwk-thumbprint:sha-${digestAlgorithm.slice(-3)}:${thumbprint}`; +} diff --git a/webapp/node_modules/jose/dist/browser/jwks/local.js b/webapp/node_modules/jose/dist/browser/jwks/local.js new file mode 100644 index 0000000000000000000000000000000000000000..42cb9c74571d962f833093f3a8fbeed612be3b49 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwks/local.js @@ -0,0 +1,98 @@ +import { importJWK } from '../key/import.js'; +import { JWKSInvalid, JOSENotSupported, JWKSNoMatchingKey, JWKSMultipleMatchingKeys, } from '../util/errors.js'; +import isObject from '../lib/is_object.js'; +function getKtyFromAlg(alg) { + switch (typeof alg === 'string' && alg.slice(0, 2)) { + case 'RS': + case 'PS': + return 'RSA'; + case 'ES': + return 'EC'; + case 'Ed': + return 'OKP'; + default: + throw new JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set'); + } +} +export function isJWKSLike(jwks) { + return (jwks && + typeof jwks === 'object' && + Array.isArray(jwks.keys) && + jwks.keys.every(isJWKLike)); +} +function isJWKLike(key) { + return isObject(key); +} +function clone(obj) { + if (typeof structuredClone === 'function') { + return structuredClone(obj); + } + return JSON.parse(JSON.stringify(obj)); +} +export class LocalJWKSet { + constructor(jwks) { + this._cached = new WeakMap(); + if (!isJWKSLike(jwks)) { + throw new JWKSInvalid('JSON Web Key Set malformed'); + } + this._jwks = clone(jwks); + } + async getKey(protectedHeader, token) { + const { alg, kid } = { ...protectedHeader, ...token.header }; + const kty = getKtyFromAlg(alg); + const candidates = this._jwks.keys.filter((jwk) => { + let candidate = kty === jwk.kty; + if (candidate && typeof kid === 'string') { + candidate = kid === jwk.kid; + } + if (candidate && typeof jwk.alg === 'string') { + candidate = alg === jwk.alg; + } + if (candidate && typeof jwk.use === 'string') { + candidate = jwk.use === 'sig'; + } + if (candidate && Array.isArray(jwk.key_ops)) { + candidate = jwk.key_ops.includes('verify'); + } + if (candidate && alg === 'EdDSA') { + candidate = jwk.crv === 'Ed25519' || jwk.crv === 'Ed448'; + } + if (candidate) { + switch (alg) { + case 'ES256': + candidate = jwk.crv === 'P-256'; + break; + case 'ES256K': + candidate = jwk.crv === 'secp256k1'; + break; + case 'ES384': + candidate = jwk.crv === 'P-384'; + break; + case 'ES512': + candidate = jwk.crv === 'P-521'; + break; + } + } + return candidate; + }); + const { 0: jwk, length } = candidates; + if (length === 0) { + throw new JWKSNoMatchingKey(); + } + else if (length !== 1) { + throw new JWKSMultipleMatchingKeys(); + } + const cached = this._cached.get(jwk) || this._cached.set(jwk, {}).get(jwk); + if (cached[alg] === undefined) { + const keyObject = await importJWK({ ...jwk, ext: true }, alg); + if (keyObject instanceof Uint8Array || keyObject.type !== 'public') { + throw new JWKSInvalid('JSON Web Key Set members must be public keys'); + } + cached[alg] = keyObject; + } + return cached[alg]; + } +} +export function createLocalJWKSet(jwks) { + return LocalJWKSet.prototype.getKey.bind(new LocalJWKSet(jwks)); +} diff --git a/webapp/node_modules/jose/dist/browser/jwks/remote.js b/webapp/node_modules/jose/dist/browser/jwks/remote.js new file mode 100644 index 0000000000000000000000000000000000000000..574ccff83bbe904f80af6345e5f7ba9ceddefa30 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwks/remote.js @@ -0,0 +1,81 @@ +import fetchJwks from '../runtime/fetch_jwks.js'; +import { isCloudflareWorkers } from '../runtime/env.js'; +import { JWKSInvalid, JWKSNoMatchingKey } from '../util/errors.js'; +import { isJWKSLike, LocalJWKSet } from './local.js'; +class RemoteJWKSet extends LocalJWKSet { + constructor(url, options) { + super({ keys: [] }); + this._jwks = undefined; + if (!(url instanceof URL)) { + throw new TypeError('url must be an instance of URL'); + } + this._url = new URL(url.href); + this._options = { agent: options === null || options === void 0 ? void 0 : options.agent, headers: options === null || options === void 0 ? void 0 : options.headers }; + this._timeoutDuration = + typeof (options === null || options === void 0 ? void 0 : options.timeoutDuration) === 'number' ? options === null || options === void 0 ? void 0 : options.timeoutDuration : 5000; + this._cooldownDuration = + typeof (options === null || options === void 0 ? void 0 : options.cooldownDuration) === 'number' ? options === null || options === void 0 ? void 0 : options.cooldownDuration : 30000; + this._cacheMaxAge = typeof (options === null || options === void 0 ? void 0 : options.cacheMaxAge) === 'number' ? options === null || options === void 0 ? void 0 : options.cacheMaxAge : 600000; + } + coolingDown() { + return typeof this._jwksTimestamp === 'number' + ? Date.now() < this._jwksTimestamp + this._cooldownDuration + : false; + } + fresh() { + return typeof this._jwksTimestamp === 'number' + ? Date.now() < this._jwksTimestamp + this._cacheMaxAge + : false; + } + async getKey(protectedHeader, token) { + if (!this._jwks || !this.fresh()) { + await this.reload(); + } + try { + return await super.getKey(protectedHeader, token); + } + catch (err) { + if (err instanceof JWKSNoMatchingKey) { + if (this.coolingDown() === false) { + await this.reload(); + return super.getKey(protectedHeader, token); + } + } + throw err; + } + } + async reload() { + if (this._pendingFetch && isCloudflareWorkers()) { + return new Promise((resolve) => { + const isDone = () => { + if (this._pendingFetch === undefined) { + resolve(); + } + else { + setTimeout(isDone, 5); + } + }; + isDone(); + }); + } + if (!this._pendingFetch) { + this._pendingFetch = fetchJwks(this._url, this._timeoutDuration, this._options) + .then((json) => { + if (!isJWKSLike(json)) { + throw new JWKSInvalid('JSON Web Key Set malformed'); + } + this._jwks = { keys: json.keys }; + this._jwksTimestamp = Date.now(); + this._pendingFetch = undefined; + }) + .catch((err) => { + this._pendingFetch = undefined; + throw err; + }); + } + await this._pendingFetch; + } +} +export function createRemoteJWKSet(url, options) { + return RemoteJWKSet.prototype.getKey.bind(new RemoteJWKSet(url, options)); +} diff --git a/webapp/node_modules/jose/dist/browser/jws/compact/sign.js b/webapp/node_modules/jose/dist/browser/jws/compact/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..b8e5ba0e2b81a2f84c2c0313c055e91da0c7b88e --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jws/compact/sign.js @@ -0,0 +1,17 @@ +import { FlattenedSign } from '../flattened/sign.js'; +export class CompactSign { + constructor(payload) { + this._flattened = new FlattenedSign(payload); + } + setProtectedHeader(protectedHeader) { + this._flattened.setProtectedHeader(protectedHeader); + return this; + } + async sign(key, options) { + const jws = await this._flattened.sign(key, options); + if (jws.payload === undefined) { + throw new TypeError('use the flattened module for creating JWS with b64: false'); + } + return `${jws.protected}.${jws.payload}.${jws.signature}`; + } +} diff --git a/webapp/node_modules/jose/dist/browser/jws/compact/verify.js b/webapp/node_modules/jose/dist/browser/jws/compact/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..c651ffb944cdd83a85d5858008b15f3616dccb19 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jws/compact/verify.js @@ -0,0 +1,21 @@ +import { flattenedVerify } from '../flattened/verify.js'; +import { JWSInvalid } from '../../util/errors.js'; +import { decoder } from '../../lib/buffer_utils.js'; +export async function compactVerify(jws, key, options) { + if (jws instanceof Uint8Array) { + jws = decoder.decode(jws); + } + if (typeof jws !== 'string') { + throw new JWSInvalid('Compact JWS must be a string or Uint8Array'); + } + const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split('.'); + if (length !== 3) { + throw new JWSInvalid('Invalid Compact JWS'); + } + const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options); + const result = { payload: verified.payload, protectedHeader: verified.protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: verified.key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/browser/jws/flattened/sign.js b/webapp/node_modules/jose/dist/browser/jws/flattened/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..76ae2896543c3e2c456430e68811497e30d76096 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jws/flattened/sign.js @@ -0,0 +1,81 @@ +import { encode as base64url } from '../../runtime/base64url.js'; +import sign from '../../runtime/sign.js'; +import isDisjoint from '../../lib/is_disjoint.js'; +import { JWSInvalid } from '../../util/errors.js'; +import { encoder, decoder, concat } from '../../lib/buffer_utils.js'; +import checkKeyType from '../../lib/check_key_type.js'; +import validateCrit from '../../lib/validate_crit.js'; +export class FlattenedSign { + constructor(payload) { + if (!(payload instanceof Uint8Array)) { + throw new TypeError('payload must be an instance of Uint8Array'); + } + this._payload = payload; + } + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + if (this._unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this._unprotectedHeader = unprotectedHeader; + return this; + } + async sign(key, options) { + if (!this._protectedHeader && !this._unprotectedHeader) { + throw new JWSInvalid('either setProtectedHeader or setUnprotectedHeader must be called before #sign()'); + } + if (!isDisjoint(this._protectedHeader, this._unprotectedHeader)) { + throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint'); + } + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + }; + const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options === null || options === void 0 ? void 0 : options.crit, this._protectedHeader, joseHeader); + let b64 = true; + if (extensions.has('b64')) { + b64 = this._protectedHeader.b64; + if (typeof b64 !== 'boolean') { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + checkKeyType(alg, key, 'sign'); + let payload = this._payload; + if (b64) { + payload = encoder.encode(base64url(payload)); + } + let protectedHeader; + if (this._protectedHeader) { + protectedHeader = encoder.encode(base64url(JSON.stringify(this._protectedHeader))); + } + else { + protectedHeader = encoder.encode(''); + } + const data = concat(protectedHeader, encoder.encode('.'), payload); + const signature = await sign(alg, key, data); + const jws = { + signature: base64url(signature), + payload: '', + }; + if (b64) { + jws.payload = decoder.decode(payload); + } + if (this._unprotectedHeader) { + jws.header = this._unprotectedHeader; + } + if (this._protectedHeader) { + jws.protected = decoder.decode(protectedHeader); + } + return jws; + } +} diff --git a/webapp/node_modules/jose/dist/browser/jws/flattened/verify.js b/webapp/node_modules/jose/dist/browser/jws/flattened/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..a55287ed8eb97889fd9d982df04953d806de857e --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jws/flattened/verify.js @@ -0,0 +1,104 @@ +import { decode as base64url } from '../../runtime/base64url.js'; +import verify from '../../runtime/verify.js'; +import { JOSEAlgNotAllowed, JWSInvalid, JWSSignatureVerificationFailed } from '../../util/errors.js'; +import { concat, encoder, decoder } from '../../lib/buffer_utils.js'; +import isDisjoint from '../../lib/is_disjoint.js'; +import isObject from '../../lib/is_object.js'; +import checkKeyType from '../../lib/check_key_type.js'; +import validateCrit from '../../lib/validate_crit.js'; +import validateAlgorithms from '../../lib/validate_algorithms.js'; +export async function flattenedVerify(jws, key, options) { + var _a; + if (!isObject(jws)) { + throw new JWSInvalid('Flattened JWS must be an object'); + } + if (jws.protected === undefined && jws.header === undefined) { + throw new JWSInvalid('Flattened JWS must have either of the "protected" or "header" members'); + } + if (jws.protected !== undefined && typeof jws.protected !== 'string') { + throw new JWSInvalid('JWS Protected Header incorrect type'); + } + if (jws.payload === undefined) { + throw new JWSInvalid('JWS Payload missing'); + } + if (typeof jws.signature !== 'string') { + throw new JWSInvalid('JWS Signature missing or incorrect type'); + } + if (jws.header !== undefined && !isObject(jws.header)) { + throw new JWSInvalid('JWS Unprotected Header incorrect type'); + } + let parsedProt = {}; + if (jws.protected) { + try { + const protectedHeader = base64url(jws.protected); + parsedProt = JSON.parse(decoder.decode(protectedHeader)); + } + catch (_b) { + throw new JWSInvalid('JWS Protected Header is invalid'); + } + } + if (!isDisjoint(parsedProt, jws.header)) { + throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint'); + } + const joseHeader = { + ...parsedProt, + ...jws.header, + }; + const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options === null || options === void 0 ? void 0 : options.crit, parsedProt, joseHeader); + let b64 = true; + if (extensions.has('b64')) { + b64 = parsedProt.b64; + if (typeof b64 !== 'boolean') { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + const algorithms = options && validateAlgorithms('algorithms', options.algorithms); + if (algorithms && !algorithms.has(alg)) { + throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed'); + } + if (b64) { + if (typeof jws.payload !== 'string') { + throw new JWSInvalid('JWS Payload must be a string'); + } + } + else if (typeof jws.payload !== 'string' && !(jws.payload instanceof Uint8Array)) { + throw new JWSInvalid('JWS Payload must be a string or an Uint8Array instance'); + } + let resolvedKey = false; + if (typeof key === 'function') { + key = await key(parsedProt, jws); + resolvedKey = true; + } + checkKeyType(alg, key, 'verify'); + const data = concat(encoder.encode((_a = jws.protected) !== null && _a !== void 0 ? _a : ''), encoder.encode('.'), typeof jws.payload === 'string' ? encoder.encode(jws.payload) : jws.payload); + const signature = base64url(jws.signature); + const verified = await verify(alg, key, signature, data); + if (!verified) { + throw new JWSSignatureVerificationFailed(); + } + let payload; + if (b64) { + payload = base64url(jws.payload); + } + else if (typeof jws.payload === 'string') { + payload = encoder.encode(jws.payload); + } + else { + payload = jws.payload; + } + const result = { payload }; + if (jws.protected !== undefined) { + result.protectedHeader = parsedProt; + } + if (jws.header !== undefined) { + result.unprotectedHeader = jws.header; + } + if (resolvedKey) { + return { ...result, key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/browser/jws/general/sign.js b/webapp/node_modules/jose/dist/browser/jws/general/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..38d5a6d766c3953dfc32192bcf08be15d7680dc2 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jws/general/sign.js @@ -0,0 +1,67 @@ +import { FlattenedSign } from '../flattened/sign.js'; +import { JWSInvalid } from '../../util/errors.js'; +class IndividualSignature { + constructor(sig, key, options) { + this.parent = sig; + this.key = key; + this.options = options; + } + setProtectedHeader(protectedHeader) { + if (this.protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this.protectedHeader = protectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + if (this.unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this.unprotectedHeader = unprotectedHeader; + return this; + } + addSignature(...args) { + return this.parent.addSignature(...args); + } + sign(...args) { + return this.parent.sign(...args); + } + done() { + return this.parent; + } +} +export class GeneralSign { + constructor(payload) { + this._signatures = []; + this._payload = payload; + } + addSignature(key, options) { + const signature = new IndividualSignature(this, key, options); + this._signatures.push(signature); + return signature; + } + async sign() { + if (!this._signatures.length) { + throw new JWSInvalid('at least one signature must be added'); + } + const jws = { + signatures: [], + payload: '', + }; + for (let i = 0; i < this._signatures.length; i++) { + const signature = this._signatures[i]; + const flattened = new FlattenedSign(this._payload); + flattened.setProtectedHeader(signature.protectedHeader); + flattened.setUnprotectedHeader(signature.unprotectedHeader); + const { payload, ...rest } = await flattened.sign(signature.key, signature.options); + if (i === 0) { + jws.payload = payload; + } + else if (jws.payload !== payload) { + throw new JWSInvalid('inconsistent use of JWS Unencoded Payload Option (RFC7797)'); + } + jws.signatures.push(rest); + } + return jws; + } +} diff --git a/webapp/node_modules/jose/dist/browser/jws/general/verify.js b/webapp/node_modules/jose/dist/browser/jws/general/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..459090afee2cff42d98e80c4a0da8d8a1e00d4a8 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jws/general/verify.js @@ -0,0 +1,24 @@ +import { flattenedVerify } from '../flattened/verify.js'; +import { JWSInvalid, JWSSignatureVerificationFailed } from '../../util/errors.js'; +import isObject from '../../lib/is_object.js'; +export async function generalVerify(jws, key, options) { + if (!isObject(jws)) { + throw new JWSInvalid('General JWS must be an object'); + } + if (!Array.isArray(jws.signatures) || !jws.signatures.every(isObject)) { + throw new JWSInvalid('JWS Signatures missing or incorrect type'); + } + for (const signature of jws.signatures) { + try { + return await flattenedVerify({ + header: signature.header, + payload: jws.payload, + protected: signature.protected, + signature: signature.signature, + }, key, options); + } + catch (_a) { + } + } + throw new JWSSignatureVerificationFailed(); +} diff --git a/webapp/node_modules/jose/dist/browser/jwt/decrypt.js b/webapp/node_modules/jose/dist/browser/jwt/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..1ec2be28f2d7a9a0d92a579293a985a4b61fa617 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwt/decrypt.js @@ -0,0 +1,23 @@ +import { compactDecrypt } from '../jwe/compact/decrypt.js'; +import jwtPayload from '../lib/jwt_claims_set.js'; +import { JWTClaimValidationFailed } from '../util/errors.js'; +export async function jwtDecrypt(jwt, key, options) { + const decrypted = await compactDecrypt(jwt, key, options); + const payload = jwtPayload(decrypted.protectedHeader, decrypted.plaintext, options); + const { protectedHeader } = decrypted; + if (protectedHeader.iss !== undefined && protectedHeader.iss !== payload.iss) { + throw new JWTClaimValidationFailed('replicated "iss" claim header parameter mismatch', 'iss', 'mismatch'); + } + if (protectedHeader.sub !== undefined && protectedHeader.sub !== payload.sub) { + throw new JWTClaimValidationFailed('replicated "sub" claim header parameter mismatch', 'sub', 'mismatch'); + } + if (protectedHeader.aud !== undefined && + JSON.stringify(protectedHeader.aud) !== JSON.stringify(payload.aud)) { + throw new JWTClaimValidationFailed('replicated "aud" claim header parameter mismatch', 'aud', 'mismatch'); + } + const result = { payload, protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: decrypted.key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/browser/jwt/encrypt.js b/webapp/node_modules/jose/dist/browser/jwt/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..15252957ae36e0b94c980c12cc01a5735ed972fb --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwt/encrypt.js @@ -0,0 +1,68 @@ +import { CompactEncrypt } from '../jwe/compact/encrypt.js'; +import { encoder } from '../lib/buffer_utils.js'; +import { ProduceJWT } from './produce.js'; +export class EncryptJWT extends ProduceJWT { + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setKeyManagementParameters(parameters) { + if (this._keyManagementParameters) { + throw new TypeError('setKeyManagementParameters can only be called once'); + } + this._keyManagementParameters = parameters; + return this; + } + setContentEncryptionKey(cek) { + if (this._cek) { + throw new TypeError('setContentEncryptionKey can only be called once'); + } + this._cek = cek; + return this; + } + setInitializationVector(iv) { + if (this._iv) { + throw new TypeError('setInitializationVector can only be called once'); + } + this._iv = iv; + return this; + } + replicateIssuerAsHeader() { + this._replicateIssuerAsHeader = true; + return this; + } + replicateSubjectAsHeader() { + this._replicateSubjectAsHeader = true; + return this; + } + replicateAudienceAsHeader() { + this._replicateAudienceAsHeader = true; + return this; + } + async encrypt(key, options) { + const enc = new CompactEncrypt(encoder.encode(JSON.stringify(this._payload))); + if (this._replicateIssuerAsHeader) { + this._protectedHeader = { ...this._protectedHeader, iss: this._payload.iss }; + } + if (this._replicateSubjectAsHeader) { + this._protectedHeader = { ...this._protectedHeader, sub: this._payload.sub }; + } + if (this._replicateAudienceAsHeader) { + this._protectedHeader = { ...this._protectedHeader, aud: this._payload.aud }; + } + enc.setProtectedHeader(this._protectedHeader); + if (this._iv) { + enc.setInitializationVector(this._iv); + } + if (this._cek) { + enc.setContentEncryptionKey(this._cek); + } + if (this._keyManagementParameters) { + enc.setKeyManagementParameters(this._keyManagementParameters); + } + return enc.encrypt(key, options); + } +} diff --git a/webapp/node_modules/jose/dist/browser/jwt/produce.js b/webapp/node_modules/jose/dist/browser/jwt/produce.js new file mode 100644 index 0000000000000000000000000000000000000000..31c929a07cc77a36ceb97b789ec604d4d51235c3 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwt/produce.js @@ -0,0 +1,54 @@ +import epoch from '../lib/epoch.js'; +import isObject from '../lib/is_object.js'; +import secs from '../lib/secs.js'; +export class ProduceJWT { + constructor(payload) { + if (!isObject(payload)) { + throw new TypeError('JWT Claims Set MUST be an object'); + } + this._payload = payload; + } + setIssuer(issuer) { + this._payload = { ...this._payload, iss: issuer }; + return this; + } + setSubject(subject) { + this._payload = { ...this._payload, sub: subject }; + return this; + } + setAudience(audience) { + this._payload = { ...this._payload, aud: audience }; + return this; + } + setJti(jwtId) { + this._payload = { ...this._payload, jti: jwtId }; + return this; + } + setNotBefore(input) { + if (typeof input === 'number') { + this._payload = { ...this._payload, nbf: input }; + } + else { + this._payload = { ...this._payload, nbf: epoch(new Date()) + secs(input) }; + } + return this; + } + setExpirationTime(input) { + if (typeof input === 'number') { + this._payload = { ...this._payload, exp: input }; + } + else { + this._payload = { ...this._payload, exp: epoch(new Date()) + secs(input) }; + } + return this; + } + setIssuedAt(input) { + if (typeof input === 'undefined') { + this._payload = { ...this._payload, iat: epoch(new Date()) }; + } + else { + this._payload = { ...this._payload, iat: input }; + } + return this; + } +} diff --git a/webapp/node_modules/jose/dist/browser/jwt/sign.js b/webapp/node_modules/jose/dist/browser/jwt/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..62352fbfa2671d40b27eb028490b36f883c6115a --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwt/sign.js @@ -0,0 +1,21 @@ +import { CompactSign } from '../jws/compact/sign.js'; +import { JWTInvalid } from '../util/errors.js'; +import { encoder } from '../lib/buffer_utils.js'; +import { ProduceJWT } from './produce.js'; +export class SignJWT extends ProduceJWT { + setProtectedHeader(protectedHeader) { + this._protectedHeader = protectedHeader; + return this; + } + async sign(key, options) { + var _a; + const sig = new CompactSign(encoder.encode(JSON.stringify(this._payload))); + sig.setProtectedHeader(this._protectedHeader); + if (Array.isArray((_a = this._protectedHeader) === null || _a === void 0 ? void 0 : _a.crit) && + this._protectedHeader.crit.includes('b64') && + this._protectedHeader.b64 === false) { + throw new JWTInvalid('JWTs MUST NOT use unencoded payload'); + } + return sig.sign(key, options); + } +} diff --git a/webapp/node_modules/jose/dist/browser/jwt/unsecured.js b/webapp/node_modules/jose/dist/browser/jwt/unsecured.js new file mode 100644 index 0000000000000000000000000000000000000000..b0276512fb821b0973f8a095e5e1a75467fae1ec --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwt/unsecured.js @@ -0,0 +1,32 @@ +import * as base64url from '../runtime/base64url.js'; +import { decoder } from '../lib/buffer_utils.js'; +import { JWTInvalid } from '../util/errors.js'; +import jwtPayload from '../lib/jwt_claims_set.js'; +import { ProduceJWT } from './produce.js'; +export class UnsecuredJWT extends ProduceJWT { + encode() { + const header = base64url.encode(JSON.stringify({ alg: 'none' })); + const payload = base64url.encode(JSON.stringify(this._payload)); + return `${header}.${payload}.`; + } + static decode(jwt, options) { + if (typeof jwt !== 'string') { + throw new JWTInvalid('Unsecured JWT must be a string'); + } + const { 0: encodedHeader, 1: encodedPayload, 2: signature, length } = jwt.split('.'); + if (length !== 3 || signature !== '') { + throw new JWTInvalid('Invalid Unsecured JWT'); + } + let header; + try { + header = JSON.parse(decoder.decode(base64url.decode(encodedHeader))); + if (header.alg !== 'none') + throw new Error(); + } + catch (_a) { + throw new JWTInvalid('Invalid Unsecured JWT'); + } + const payload = jwtPayload(header, base64url.decode(encodedPayload), options); + return { payload, header }; + } +} diff --git a/webapp/node_modules/jose/dist/browser/jwt/verify.js b/webapp/node_modules/jose/dist/browser/jwt/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..89571c18475ba653faafe870321564c6d739e651 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/jwt/verify.js @@ -0,0 +1,16 @@ +import { compactVerify } from '../jws/compact/verify.js'; +import jwtPayload from '../lib/jwt_claims_set.js'; +import { JWTInvalid } from '../util/errors.js'; +export async function jwtVerify(jwt, key, options) { + var _a; + const verified = await compactVerify(jwt, key, options); + if (((_a = verified.protectedHeader.crit) === null || _a === void 0 ? void 0 : _a.includes('b64')) && verified.protectedHeader.b64 === false) { + throw new JWTInvalid('JWTs MUST NOT use unencoded payload'); + } + const payload = jwtPayload(verified.protectedHeader, verified.payload, options); + const result = { payload, protectedHeader: verified.protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: verified.key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/browser/key/export.js b/webapp/node_modules/jose/dist/browser/key/export.js new file mode 100644 index 0000000000000000000000000000000000000000..e4017047cd30a55493a84349f70f409b40112f06 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/key/export.js @@ -0,0 +1,12 @@ +import { toSPKI as exportPublic } from '../runtime/asn1.js'; +import { toPKCS8 as exportPrivate } from '../runtime/asn1.js'; +import keyToJWK from '../runtime/key_to_jwk.js'; +export async function exportSPKI(key) { + return exportPublic(key); +} +export async function exportPKCS8(key) { + return exportPrivate(key); +} +export async function exportJWK(key) { + return keyToJWK(key); +} diff --git a/webapp/node_modules/jose/dist/browser/key/generate_key_pair.js b/webapp/node_modules/jose/dist/browser/key/generate_key_pair.js new file mode 100644 index 0000000000000000000000000000000000000000..03b9ee54cd6006b3fc1fbedb15e2de96a9c27eb2 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/key/generate_key_pair.js @@ -0,0 +1,4 @@ +import { generateKeyPair as generate } from '../runtime/generate.js'; +export async function generateKeyPair(alg, options) { + return generate(alg, options); +} diff --git a/webapp/node_modules/jose/dist/browser/key/generate_secret.js b/webapp/node_modules/jose/dist/browser/key/generate_secret.js new file mode 100644 index 0000000000000000000000000000000000000000..58f308a5439273c00ef0375744f82df7d8329e27 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/key/generate_secret.js @@ -0,0 +1,4 @@ +import { generateSecret as generate } from '../runtime/generate.js'; +export async function generateSecret(alg, options) { + return generate(alg, options); +} diff --git a/webapp/node_modules/jose/dist/browser/key/import.js b/webapp/node_modules/jose/dist/browser/key/import.js new file mode 100644 index 0000000000000000000000000000000000000000..78a926406169ca9736fec184490a70ce7db14da3 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/key/import.js @@ -0,0 +1,120 @@ +import { decode as decodeBase64URL, encodeBase64, decodeBase64 } from '../runtime/base64url.js'; +import { fromSPKI as importPublic } from '../runtime/asn1.js'; +import { fromPKCS8 as importPrivate } from '../runtime/asn1.js'; +import asKeyObject from '../runtime/jwk_to_key.js'; +import { JOSENotSupported } from '../util/errors.js'; +import formatPEM from '../lib/format_pem.js'; +import isObject from '../lib/is_object.js'; +function getElement(seq) { + let result = []; + let next = 0; + while (next < seq.length) { + let nextPart = parseElement(seq.subarray(next)); + result.push(nextPart); + next += nextPart.byteLength; + } + return result; +} +function parseElement(bytes) { + let position = 0; + let tag = bytes[0] & 0x1f; + position++; + if (tag === 0x1f) { + tag = 0; + while (bytes[position] >= 0x80) { + tag = tag * 128 + bytes[position] - 0x80; + position++; + } + tag = tag * 128 + bytes[position] - 0x80; + position++; + } + let length = 0; + if (bytes[position] < 0x80) { + length = bytes[position]; + position++; + } + else { + let numberOfDigits = bytes[position] & 0x7f; + position++; + length = 0; + for (let i = 0; i < numberOfDigits; i++) { + length = length * 256 + bytes[position]; + position++; + } + } + if (length === 0x80) { + length = 0; + while (bytes[position + length] !== 0 || bytes[position + length + 1] !== 0) { + length++; + } + const byteLength = position + length + 2; + return { + byteLength, + contents: bytes.subarray(position, position + length), + raw: bytes.subarray(0, byteLength), + }; + } + const byteLength = position + length; + return { + byteLength, + contents: bytes.subarray(position, byteLength), + raw: bytes.subarray(0, byteLength), + }; +} +function spkiFromX509(buf) { + const tbsCertificate = getElement(getElement(parseElement(buf).contents)[0].contents); + return encodeBase64(tbsCertificate[tbsCertificate[0].raw[0] === 0xa0 ? 6 : 5].raw); +} +function getSPKI(x509) { + const pem = x509.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g, ''); + const raw = decodeBase64(pem); + return formatPEM(spkiFromX509(raw), 'PUBLIC KEY'); +} +export async function importSPKI(spki, alg, options) { + if (typeof spki !== 'string' || spki.indexOf('-----BEGIN PUBLIC KEY-----') !== 0) { + throw new TypeError('"spki" must be SPKI formatted string'); + } + return importPublic(spki, alg, options); +} +export async function importX509(x509, alg, options) { + if (typeof x509 !== 'string' || x509.indexOf('-----BEGIN CERTIFICATE-----') !== 0) { + throw new TypeError('"x509" must be X.509 formatted string'); + } + const spki = getSPKI(x509); + return importPublic(spki, alg, options); +} +export async function importPKCS8(pkcs8, alg, options) { + if (typeof pkcs8 !== 'string' || pkcs8.indexOf('-----BEGIN PRIVATE KEY-----') !== 0) { + throw new TypeError('"pkcs8" must be PCKS8 formatted string'); + } + return importPrivate(pkcs8, alg, options); +} +export async function importJWK(jwk, alg, octAsKeyObject) { + if (!isObject(jwk)) { + throw new TypeError('JWK must be an object'); + } + alg || (alg = jwk.alg); + if (typeof alg !== 'string' || !alg) { + throw new TypeError('"alg" argument is required when "jwk.alg" is not present'); + } + switch (jwk.kty) { + case 'oct': + if (typeof jwk.k !== 'string' || !jwk.k) { + throw new TypeError('missing "k" (Key Value) Parameter value'); + } + octAsKeyObject !== null && octAsKeyObject !== void 0 ? octAsKeyObject : (octAsKeyObject = jwk.ext !== true); + if (octAsKeyObject) { + return asKeyObject({ ...jwk, alg, ext: false }); + } + return decodeBase64URL(jwk.k); + case 'RSA': + if (jwk.oth !== undefined) { + throw new JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported'); + } + case 'EC': + case 'OKP': + return asKeyObject({ ...jwk, alg }); + default: + throw new JOSENotSupported('Unsupported "kty" (Key Type) Parameter value'); + } +} diff --git a/webapp/node_modules/jose/dist/browser/lib/aesgcmkw.js b/webapp/node_modules/jose/dist/browser/lib/aesgcmkw.js new file mode 100644 index 0000000000000000000000000000000000000000..de3f4f91dffe193a164aed2d221e953257688a02 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/aesgcmkw.js @@ -0,0 +1,14 @@ +import encrypt from '../runtime/encrypt.js'; +import decrypt from '../runtime/decrypt.js'; +import generateIv from './iv.js'; +import { encode as base64url } from '../runtime/base64url.js'; +export async function wrap(alg, key, cek, iv) { + const jweAlgorithm = alg.slice(0, 7); + iv || (iv = generateIv(jweAlgorithm)); + const { ciphertext: encryptedKey, tag } = await encrypt(jweAlgorithm, cek, key, iv, new Uint8Array(0)); + return { encryptedKey, iv: base64url(iv), tag: base64url(tag) }; +} +export async function unwrap(alg, key, encryptedKey, iv, tag) { + const jweAlgorithm = alg.slice(0, 7); + return decrypt(jweAlgorithm, key, encryptedKey, iv, tag, new Uint8Array(0)); +} diff --git a/webapp/node_modules/jose/dist/browser/lib/buffer_utils.js b/webapp/node_modules/jose/dist/browser/lib/buffer_utils.js new file mode 100644 index 0000000000000000000000000000000000000000..5a1a7b334dfa795aaf8d44d4e218561a8be99e46 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/buffer_utils.js @@ -0,0 +1,51 @@ +import digest from '../runtime/digest.js'; +export const encoder = new TextEncoder(); +export const decoder = new TextDecoder(); +const MAX_INT32 = 2 ** 32; +export function concat(...buffers) { + const size = buffers.reduce((acc, { length }) => acc + length, 0); + const buf = new Uint8Array(size); + let i = 0; + buffers.forEach((buffer) => { + buf.set(buffer, i); + i += buffer.length; + }); + return buf; +} +export function p2s(alg, p2sInput) { + return concat(encoder.encode(alg), new Uint8Array([0]), p2sInput); +} +function writeUInt32BE(buf, value, offset) { + if (value < 0 || value >= MAX_INT32) { + throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`); + } + buf.set([value >>> 24, value >>> 16, value >>> 8, value & 0xff], offset); +} +export function uint64be(value) { + const high = Math.floor(value / MAX_INT32); + const low = value % MAX_INT32; + const buf = new Uint8Array(8); + writeUInt32BE(buf, high, 0); + writeUInt32BE(buf, low, 4); + return buf; +} +export function uint32be(value) { + const buf = new Uint8Array(4); + writeUInt32BE(buf, value); + return buf; +} +export function lengthAndInput(input) { + return concat(uint32be(input.length), input); +} +export async function concatKdf(secret, bits, value) { + const iterations = Math.ceil((bits >> 3) / 32); + const res = new Uint8Array(iterations * 32); + for (let iter = 0; iter < iterations; iter++) { + const buf = new Uint8Array(4 + secret.length + value.length); + buf.set(uint32be(iter + 1)); + buf.set(secret, 4); + buf.set(value, 4 + secret.length); + res.set(await digest('sha256', buf), iter * 32); + } + return res.slice(0, bits >> 3); +} diff --git a/webapp/node_modules/jose/dist/browser/lib/cek.js b/webapp/node_modules/jose/dist/browser/lib/cek.js new file mode 100644 index 0000000000000000000000000000000000000000..34697d3ac2008c9b26c3066d4f155243ba825017 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/cek.js @@ -0,0 +1,20 @@ +import { JOSENotSupported } from '../util/errors.js'; +import random from '../runtime/random.js'; +export function bitLength(alg) { + switch (alg) { + case 'A128GCM': + return 128; + case 'A192GCM': + return 192; + case 'A256GCM': + case 'A128CBC-HS256': + return 256; + case 'A192CBC-HS384': + return 384; + case 'A256CBC-HS512': + return 512; + default: + throw new JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`); + } +} +export default (alg) => random(new Uint8Array(bitLength(alg) >> 3)); diff --git a/webapp/node_modules/jose/dist/browser/lib/check_iv_length.js b/webapp/node_modules/jose/dist/browser/lib/check_iv_length.js new file mode 100644 index 0000000000000000000000000000000000000000..dcd28d3a9dd2b054dd09542e0370f8da967fedd4 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/check_iv_length.js @@ -0,0 +1,8 @@ +import { JWEInvalid } from '../util/errors.js'; +import { bitLength } from './iv.js'; +const checkIvLength = (enc, iv) => { + if (iv.length << 3 !== bitLength(enc)) { + throw new JWEInvalid('Invalid Initialization Vector length'); + } +}; +export default checkIvLength; diff --git a/webapp/node_modules/jose/dist/browser/lib/check_key_type.js b/webapp/node_modules/jose/dist/browser/lib/check_key_type.js new file mode 100644 index 0000000000000000000000000000000000000000..4df7a3cfcbe2d667d30958e5f9c70705ff06a112 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/check_key_type.js @@ -0,0 +1,45 @@ +import invalidKeyInput from './invalid_key_input.js'; +import isKeyLike, { types } from '../runtime/is_key_like.js'; +const symmetricTypeCheck = (key) => { + if (key instanceof Uint8Array) + return; + if (!isKeyLike(key)) { + throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array')); + } + if (key.type !== 'secret') { + throw new TypeError(`${types.join(' or ')} instances for symmetric algorithms must be of type "secret"`); + } +}; +const asymmetricTypeCheck = (key, usage) => { + if (!isKeyLike(key)) { + throw new TypeError(invalidKeyInput(key, ...types)); + } + if (key.type === 'secret') { + throw new TypeError(`${types.join(' or ')} instances for asymmetric algorithms must not be of type "secret"`); + } + if (usage === 'sign' && key.type === 'public') { + throw new TypeError(`${types.join(' or ')} instances for asymmetric algorithm signing must be of type "private"`); + } + if (usage === 'decrypt' && key.type === 'public') { + throw new TypeError(`${types.join(' or ')} instances for asymmetric algorithm decryption must be of type "private"`); + } + if (key.algorithm && usage === 'verify' && key.type === 'private') { + throw new TypeError(`${types.join(' or ')} instances for asymmetric algorithm verifying must be of type "public"`); + } + if (key.algorithm && usage === 'encrypt' && key.type === 'private') { + throw new TypeError(`${types.join(' or ')} instances for asymmetric algorithm encryption must be of type "public"`); + } +}; +const checkKeyType = (alg, key, usage) => { + const symmetric = alg.startsWith('HS') || + alg === 'dir' || + alg.startsWith('PBES2') || + /^A\d{3}(?:GCM)?KW$/.test(alg); + if (symmetric) { + symmetricTypeCheck(key); + } + else { + asymmetricTypeCheck(key, usage); + } +}; +export default checkKeyType; diff --git a/webapp/node_modules/jose/dist/browser/lib/check_p2s.js b/webapp/node_modules/jose/dist/browser/lib/check_p2s.js new file mode 100644 index 0000000000000000000000000000000000000000..a65289fa7aa4799018ab7b81f5e15a2d71a76c49 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/check_p2s.js @@ -0,0 +1,6 @@ +import { JWEInvalid } from '../util/errors.js'; +export default function checkP2s(p2s) { + if (!(p2s instanceof Uint8Array) || p2s.length < 8) { + throw new JWEInvalid('PBES2 Salt Input must be 8 or more octets'); + } +} diff --git a/webapp/node_modules/jose/dist/browser/lib/crypto_key.js b/webapp/node_modules/jose/dist/browser/lib/crypto_key.js new file mode 100644 index 0000000000000000000000000000000000000000..424f335ec4fe5262c305f2514371bffb608e2405 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/crypto_key.js @@ -0,0 +1,145 @@ +import { isCloudflareWorkers } from '../runtime/env.js'; +function unusable(name, prop = 'algorithm.name') { + return new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`); +} +function isAlgorithm(algorithm, name) { + return algorithm.name === name; +} +function getHashLength(hash) { + return parseInt(hash.name.slice(4), 10); +} +function getNamedCurve(alg) { + switch (alg) { + case 'ES256': + return 'P-256'; + case 'ES384': + return 'P-384'; + case 'ES512': + return 'P-521'; + default: + throw new Error('unreachable'); + } +} +function checkUsage(key, usages) { + if (usages.length && !usages.some((expected) => key.usages.includes(expected))) { + let msg = 'CryptoKey does not support this operation, its usages must include '; + if (usages.length > 2) { + const last = usages.pop(); + msg += `one of ${usages.join(', ')}, or ${last}.`; + } + else if (usages.length === 2) { + msg += `one of ${usages[0]} or ${usages[1]}.`; + } + else { + msg += `${usages[0]}.`; + } + throw new TypeError(msg); + } +} +export function checkSigCryptoKey(key, alg, ...usages) { + switch (alg) { + case 'HS256': + case 'HS384': + case 'HS512': { + if (!isAlgorithm(key.algorithm, 'HMAC')) + throw unusable('HMAC'); + const expected = parseInt(alg.slice(2), 10); + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + case 'RS256': + case 'RS384': + case 'RS512': { + if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5')) + throw unusable('RSASSA-PKCS1-v1_5'); + const expected = parseInt(alg.slice(2), 10); + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + case 'PS256': + case 'PS384': + case 'PS512': { + if (!isAlgorithm(key.algorithm, 'RSA-PSS')) + throw unusable('RSA-PSS'); + const expected = parseInt(alg.slice(2), 10); + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + case isCloudflareWorkers() && 'EdDSA': { + if (!isAlgorithm(key.algorithm, 'NODE-ED25519')) + throw unusable('NODE-ED25519'); + break; + } + case 'ES256': + case 'ES384': + case 'ES512': { + if (!isAlgorithm(key.algorithm, 'ECDSA')) + throw unusable('ECDSA'); + const expected = getNamedCurve(alg); + const actual = key.algorithm.namedCurve; + if (actual !== expected) + throw unusable(expected, 'algorithm.namedCurve'); + break; + } + default: + throw new TypeError('CryptoKey does not support this operation'); + } + checkUsage(key, usages); +} +export function checkEncCryptoKey(key, alg, ...usages) { + switch (alg) { + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': { + if (!isAlgorithm(key.algorithm, 'AES-GCM')) + throw unusable('AES-GCM'); + const expected = parseInt(alg.slice(1, 4), 10); + const actual = key.algorithm.length; + if (actual !== expected) + throw unusable(expected, 'algorithm.length'); + break; + } + case 'A128KW': + case 'A192KW': + case 'A256KW': { + if (!isAlgorithm(key.algorithm, 'AES-KW')) + throw unusable('AES-KW'); + const expected = parseInt(alg.slice(1, 4), 10); + const actual = key.algorithm.length; + if (actual !== expected) + throw unusable(expected, 'algorithm.length'); + break; + } + case 'ECDH': + if (!isAlgorithm(key.algorithm, 'ECDH')) + throw unusable('ECDH'); + break; + case 'PBES2-HS256+A128KW': + case 'PBES2-HS384+A192KW': + case 'PBES2-HS512+A256KW': + if (!isAlgorithm(key.algorithm, 'PBKDF2')) + throw unusable('PBKDF2'); + break; + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': { + if (!isAlgorithm(key.algorithm, 'RSA-OAEP')) + throw unusable('RSA-OAEP'); + const expected = parseInt(alg.slice(9), 10) || 1; + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + default: + throw new TypeError('CryptoKey does not support this operation'); + } + checkUsage(key, usages); +} diff --git a/webapp/node_modules/jose/dist/browser/lib/decrypt_key_management.js b/webapp/node_modules/jose/dist/browser/lib/decrypt_key_management.js new file mode 100644 index 0000000000000000000000000000000000000000..71074cac9b4bcfe59552c4d1db612fc44b1c431a --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/decrypt_key_management.js @@ -0,0 +1,95 @@ +import { unwrap as aesKw } from '../runtime/aeskw.js'; +import * as ECDH from '../runtime/ecdhes.js'; +import { decrypt as pbes2Kw } from '../runtime/pbes2kw.js'; +import { decrypt as rsaEs } from '../runtime/rsaes.js'; +import { decode as base64url } from '../runtime/base64url.js'; +import { JOSENotSupported, JWEInvalid } from '../util/errors.js'; +import { bitLength as cekLength } from '../lib/cek.js'; +import { importJWK } from '../key/import.js'; +import checkKeyType from './check_key_type.js'; +import isObject from './is_object.js'; +import { unwrap as aesGcmKw } from './aesgcmkw.js'; +async function decryptKeyManagement(alg, key, encryptedKey, joseHeader) { + checkKeyType(alg, key, 'decrypt'); + switch (alg) { + case 'dir': { + if (encryptedKey !== undefined) + throw new JWEInvalid('Encountered unexpected JWE Encrypted Key'); + return key; + } + case 'ECDH-ES': + if (encryptedKey !== undefined) + throw new JWEInvalid('Encountered unexpected JWE Encrypted Key'); + case 'ECDH-ES+A128KW': + case 'ECDH-ES+A192KW': + case 'ECDH-ES+A256KW': { + if (!isObject(joseHeader.epk)) + throw new JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`); + if (!ECDH.ecdhAllowed(key)) + throw new JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime'); + const epk = await importJWK(joseHeader.epk, alg); + let partyUInfo; + let partyVInfo; + if (joseHeader.apu !== undefined) { + if (typeof joseHeader.apu !== 'string') + throw new JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`); + partyUInfo = base64url(joseHeader.apu); + } + if (joseHeader.apv !== undefined) { + if (typeof joseHeader.apv !== 'string') + throw new JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`); + partyVInfo = base64url(joseHeader.apv); + } + const sharedSecret = await ECDH.deriveKey(epk, key, alg === 'ECDH-ES' ? joseHeader.enc : alg, alg === 'ECDH-ES' ? cekLength(joseHeader.enc) : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo); + if (alg === 'ECDH-ES') + return sharedSecret; + if (encryptedKey === undefined) + throw new JWEInvalid('JWE Encrypted Key missing'); + return aesKw(alg.slice(-6), sharedSecret, encryptedKey); + } + case 'RSA1_5': + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': { + if (encryptedKey === undefined) + throw new JWEInvalid('JWE Encrypted Key missing'); + return rsaEs(alg, key, encryptedKey); + } + case 'PBES2-HS256+A128KW': + case 'PBES2-HS384+A192KW': + case 'PBES2-HS512+A256KW': { + if (encryptedKey === undefined) + throw new JWEInvalid('JWE Encrypted Key missing'); + if (typeof joseHeader.p2c !== 'number') + throw new JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`); + if (typeof joseHeader.p2s !== 'string') + throw new JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`); + return pbes2Kw(alg, key, encryptedKey, joseHeader.p2c, base64url(joseHeader.p2s)); + } + case 'A128KW': + case 'A192KW': + case 'A256KW': { + if (encryptedKey === undefined) + throw new JWEInvalid('JWE Encrypted Key missing'); + return aesKw(alg, key, encryptedKey); + } + case 'A128GCMKW': + case 'A192GCMKW': + case 'A256GCMKW': { + if (encryptedKey === undefined) + throw new JWEInvalid('JWE Encrypted Key missing'); + if (typeof joseHeader.iv !== 'string') + throw new JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`); + if (typeof joseHeader.tag !== 'string') + throw new JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`); + const iv = base64url(joseHeader.iv); + const tag = base64url(joseHeader.tag); + return aesGcmKw(alg, key, encryptedKey, iv, tag); + } + default: { + throw new JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value'); + } + } +} +export default decryptKeyManagement; diff --git a/webapp/node_modules/jose/dist/browser/lib/encrypt_key_management.js b/webapp/node_modules/jose/dist/browser/lib/encrypt_key_management.js new file mode 100644 index 0000000000000000000000000000000000000000..eb9022c63e52ae52d5a17bda9b70e3906a181c8f --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/encrypt_key_management.js @@ -0,0 +1,87 @@ +import { wrap as aesKw } from '../runtime/aeskw.js'; +import * as ECDH from '../runtime/ecdhes.js'; +import { encrypt as pbes2Kw } from '../runtime/pbes2kw.js'; +import { encrypt as rsaEs } from '../runtime/rsaes.js'; +import { encode as base64url } from '../runtime/base64url.js'; +import generateCek, { bitLength as cekLength } from '../lib/cek.js'; +import { JOSENotSupported } from '../util/errors.js'; +import { exportJWK } from '../key/export.js'; +import checkKeyType from './check_key_type.js'; +import { wrap as aesGcmKw } from './aesgcmkw.js'; +async function encryptKeyManagement(alg, enc, key, providedCek, providedParameters = {}) { + let encryptedKey; + let parameters; + let cek; + checkKeyType(alg, key, 'encrypt'); + switch (alg) { + case 'dir': { + cek = key; + break; + } + case 'ECDH-ES': + case 'ECDH-ES+A128KW': + case 'ECDH-ES+A192KW': + case 'ECDH-ES+A256KW': { + if (!ECDH.ecdhAllowed(key)) { + throw new JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime'); + } + const { apu, apv } = providedParameters; + let { epk: ephemeralKey } = providedParameters; + ephemeralKey || (ephemeralKey = (await ECDH.generateEpk(key)).privateKey); + const { x, y, crv, kty } = await exportJWK(ephemeralKey); + const sharedSecret = await ECDH.deriveKey(key, ephemeralKey, alg === 'ECDH-ES' ? enc : alg, alg === 'ECDH-ES' ? cekLength(enc) : parseInt(alg.slice(-5, -2), 10), apu, apv); + parameters = { epk: { x, crv, kty } }; + if (kty === 'EC') + parameters.epk.y = y; + if (apu) + parameters.apu = base64url(apu); + if (apv) + parameters.apv = base64url(apv); + if (alg === 'ECDH-ES') { + cek = sharedSecret; + break; + } + cek = providedCek || generateCek(enc); + const kwAlg = alg.slice(-6); + encryptedKey = await aesKw(kwAlg, sharedSecret, cek); + break; + } + case 'RSA1_5': + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': { + cek = providedCek || generateCek(enc); + encryptedKey = await rsaEs(alg, key, cek); + break; + } + case 'PBES2-HS256+A128KW': + case 'PBES2-HS384+A192KW': + case 'PBES2-HS512+A256KW': { + cek = providedCek || generateCek(enc); + const { p2c, p2s } = providedParameters; + ({ encryptedKey, ...parameters } = await pbes2Kw(alg, key, cek, p2c, p2s)); + break; + } + case 'A128KW': + case 'A192KW': + case 'A256KW': { + cek = providedCek || generateCek(enc); + encryptedKey = await aesKw(alg, key, cek); + break; + } + case 'A128GCMKW': + case 'A192GCMKW': + case 'A256GCMKW': { + cek = providedCek || generateCek(enc); + const { iv } = providedParameters; + ({ encryptedKey, ...parameters } = await aesGcmKw(alg, key, cek, iv)); + break; + } + default: { + throw new JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value'); + } + } + return { cek, encryptedKey, parameters }; +} +export default encryptKeyManagement; diff --git a/webapp/node_modules/jose/dist/browser/lib/epoch.js b/webapp/node_modules/jose/dist/browser/lib/epoch.js new file mode 100644 index 0000000000000000000000000000000000000000..e405e4b2df8336a5c54452047c187ede4fb168d6 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/epoch.js @@ -0,0 +1 @@ +export default (date) => Math.floor(date.getTime() / 1000); diff --git a/webapp/node_modules/jose/dist/browser/lib/format_pem.js b/webapp/node_modules/jose/dist/browser/lib/format_pem.js new file mode 100644 index 0000000000000000000000000000000000000000..81673f256f3e36c16d32648a91be96b430d4728e --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/format_pem.js @@ -0,0 +1,4 @@ +export default (b64, descriptor) => { + const newlined = (b64.match(/.{1,64}/g) || []).join('\n'); + return `-----BEGIN ${descriptor}-----\n${newlined}\n-----END ${descriptor}-----`; +}; diff --git a/webapp/node_modules/jose/dist/browser/lib/invalid_key_input.js b/webapp/node_modules/jose/dist/browser/lib/invalid_key_input.js new file mode 100644 index 0000000000000000000000000000000000000000..468ad288b4d1cd2714057919f9d4ca9e91c11f5c --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/invalid_key_input.js @@ -0,0 +1,25 @@ +export default (actual, ...types) => { + let msg = 'Key must be '; + if (types.length > 2) { + const last = types.pop(); + msg += `one of type ${types.join(', ')}, or ${last}.`; + } + else if (types.length === 2) { + msg += `one of type ${types[0]} or ${types[1]}.`; + } + else { + msg += `of type ${types[0]}.`; + } + if (actual == null) { + msg += ` Received ${actual}`; + } + else if (typeof actual === 'function' && actual.name) { + msg += ` Received function ${actual.name}`; + } + else if (typeof actual === 'object' && actual != null) { + if (actual.constructor && actual.constructor.name) { + msg += ` Received an instance of ${actual.constructor.name}`; + } + } + return msg; +}; diff --git a/webapp/node_modules/jose/dist/browser/lib/is_disjoint.js b/webapp/node_modules/jose/dist/browser/lib/is_disjoint.js new file mode 100644 index 0000000000000000000000000000000000000000..6f643502dcffd4fa684c6554fd715a97b1a7113b --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/is_disjoint.js @@ -0,0 +1,22 @@ +const isDisjoint = (...headers) => { + const sources = headers.filter(Boolean); + if (sources.length === 0 || sources.length === 1) { + return true; + } + let acc; + for (const header of sources) { + const parameters = Object.keys(header); + if (!acc || acc.size === 0) { + acc = new Set(parameters); + continue; + } + for (const parameter of parameters) { + if (acc.has(parameter)) { + return false; + } + acc.add(parameter); + } + } + return true; +}; +export default isDisjoint; diff --git a/webapp/node_modules/jose/dist/browser/lib/is_object.js b/webapp/node_modules/jose/dist/browser/lib/is_object.js new file mode 100644 index 0000000000000000000000000000000000000000..4955e93225d63bfc83b9805cf71872ba2d158eb3 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/is_object.js @@ -0,0 +1,16 @@ +function isObjectLike(value) { + return typeof value === 'object' && value !== null; +} +export default function isObject(input) { + if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') { + return false; + } + if (Object.getPrototypeOf(input) === null) { + return true; + } + let proto = input; + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + return Object.getPrototypeOf(input) === proto; +} diff --git a/webapp/node_modules/jose/dist/browser/lib/iv.js b/webapp/node_modules/jose/dist/browser/lib/iv.js new file mode 100644 index 0000000000000000000000000000000000000000..cab2a127294e8ef8e9cbc870fa611efa973e4421 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/iv.js @@ -0,0 +1,20 @@ +import { JOSENotSupported } from '../util/errors.js'; +import random from '../runtime/random.js'; +export function bitLength(alg) { + switch (alg) { + case 'A128GCM': + case 'A128GCMKW': + case 'A192GCM': + case 'A192GCMKW': + case 'A256GCM': + case 'A256GCMKW': + return 96; + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + return 128; + default: + throw new JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`); + } +} +export default (alg) => random(new Uint8Array(bitLength(alg) >> 3)); diff --git a/webapp/node_modules/jose/dist/browser/lib/jwt_claims_set.js b/webapp/node_modules/jose/dist/browser/lib/jwt_claims_set.js new file mode 100644 index 0000000000000000000000000000000000000000..e9e2f1944f506b268da1a14811e42064b907abd7 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/jwt_claims_set.js @@ -0,0 +1,91 @@ +import { JWTClaimValidationFailed, JWTExpired, JWTInvalid } from '../util/errors.js'; +import { decoder } from './buffer_utils.js'; +import epoch from './epoch.js'; +import secs from './secs.js'; +import isObject from './is_object.js'; +const normalizeTyp = (value) => value.toLowerCase().replace(/^application\//, ''); +const checkAudiencePresence = (audPayload, audOption) => { + if (typeof audPayload === 'string') { + return audOption.includes(audPayload); + } + if (Array.isArray(audPayload)) { + return audOption.some(Set.prototype.has.bind(new Set(audPayload))); + } + return false; +}; +export default (protectedHeader, encodedPayload, options = {}) => { + const { typ } = options; + if (typ && + (typeof protectedHeader.typ !== 'string' || + normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) { + throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', 'typ', 'check_failed'); + } + let payload; + try { + payload = JSON.parse(decoder.decode(encodedPayload)); + } + catch (_a) { + } + if (!isObject(payload)) { + throw new JWTInvalid('JWT Claims Set must be a top-level JSON object'); + } + const { issuer } = options; + if (issuer && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) { + throw new JWTClaimValidationFailed('unexpected "iss" claim value', 'iss', 'check_failed'); + } + const { subject } = options; + if (subject && payload.sub !== subject) { + throw new JWTClaimValidationFailed('unexpected "sub" claim value', 'sub', 'check_failed'); + } + const { audience } = options; + if (audience && + !checkAudiencePresence(payload.aud, typeof audience === 'string' ? [audience] : audience)) { + throw new JWTClaimValidationFailed('unexpected "aud" claim value', 'aud', 'check_failed'); + } + let tolerance; + switch (typeof options.clockTolerance) { + case 'string': + tolerance = secs(options.clockTolerance); + break; + case 'number': + tolerance = options.clockTolerance; + break; + case 'undefined': + tolerance = 0; + break; + default: + throw new TypeError('Invalid clockTolerance option type'); + } + const { currentDate } = options; + const now = epoch(currentDate || new Date()); + if ((payload.iat !== undefined || options.maxTokenAge) && typeof payload.iat !== 'number') { + throw new JWTClaimValidationFailed('"iat" claim must be a number', 'iat', 'invalid'); + } + if (payload.nbf !== undefined) { + if (typeof payload.nbf !== 'number') { + throw new JWTClaimValidationFailed('"nbf" claim must be a number', 'nbf', 'invalid'); + } + if (payload.nbf > now + tolerance) { + throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', 'nbf', 'check_failed'); + } + } + if (payload.exp !== undefined) { + if (typeof payload.exp !== 'number') { + throw new JWTClaimValidationFailed('"exp" claim must be a number', 'exp', 'invalid'); + } + if (payload.exp <= now - tolerance) { + throw new JWTExpired('"exp" claim timestamp check failed', 'exp', 'check_failed'); + } + } + if (options.maxTokenAge) { + const age = now - payload.iat; + const max = typeof options.maxTokenAge === 'number' ? options.maxTokenAge : secs(options.maxTokenAge); + if (age - tolerance > max) { + throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', 'iat', 'check_failed'); + } + if (age < 0 - tolerance) { + throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed'); + } + } + return payload; +}; diff --git a/webapp/node_modules/jose/dist/browser/lib/secs.js b/webapp/node_modules/jose/dist/browser/lib/secs.js new file mode 100644 index 0000000000000000000000000000000000000000..cf470ed8ad45c393b273f25562b8d06d2a642b59 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/secs.js @@ -0,0 +1,44 @@ +const minute = 60; +const hour = minute * 60; +const day = hour * 24; +const week = day * 7; +const year = day * 365.25; +const REGEX = /^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i; +export default (str) => { + const matched = REGEX.exec(str); + if (!matched) { + throw new TypeError('Invalid time period format'); + } + const value = parseFloat(matched[1]); + const unit = matched[2].toLowerCase(); + switch (unit) { + case 'sec': + case 'secs': + case 'second': + case 'seconds': + case 's': + return Math.round(value); + case 'minute': + case 'minutes': + case 'min': + case 'mins': + case 'm': + return Math.round(value * minute); + case 'hour': + case 'hours': + case 'hr': + case 'hrs': + case 'h': + return Math.round(value * hour); + case 'day': + case 'days': + case 'd': + return Math.round(value * day); + case 'week': + case 'weeks': + case 'w': + return Math.round(value * week); + default: + return Math.round(value * year); + } +}; diff --git a/webapp/node_modules/jose/dist/browser/lib/validate_algorithms.js b/webapp/node_modules/jose/dist/browser/lib/validate_algorithms.js new file mode 100644 index 0000000000000000000000000000000000000000..a6a7918571f55526070266826dd48dd6e165c38e --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/validate_algorithms.js @@ -0,0 +1,11 @@ +const validateAlgorithms = (option, algorithms) => { + if (algorithms !== undefined && + (!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== 'string'))) { + throw new TypeError(`"${option}" option must be an array of strings`); + } + if (!algorithms) { + return undefined; + } + return new Set(algorithms); +}; +export default validateAlgorithms; diff --git a/webapp/node_modules/jose/dist/browser/lib/validate_crit.js b/webapp/node_modules/jose/dist/browser/lib/validate_crit.js new file mode 100644 index 0000000000000000000000000000000000000000..68c69f18f5d94f5b09a9a6de3d3fe6e0375f86a7 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/lib/validate_crit.js @@ -0,0 +1,34 @@ +import { JOSENotSupported } from '../util/errors.js'; +function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) { + if (joseHeader.crit !== undefined && protectedHeader.crit === undefined) { + throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected'); + } + if (!protectedHeader || protectedHeader.crit === undefined) { + return new Set(); + } + if (!Array.isArray(protectedHeader.crit) || + protectedHeader.crit.length === 0 || + protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) { + throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present'); + } + let recognized; + if (recognizedOption !== undefined) { + recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]); + } + else { + recognized = recognizedDefault; + } + for (const parameter of protectedHeader.crit) { + if (!recognized.has(parameter)) { + throw new JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`); + } + if (joseHeader[parameter] === undefined) { + throw new Err(`Extension Header Parameter "${parameter}" is missing`); + } + else if (recognized.get(parameter) && protectedHeader[parameter] === undefined) { + throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`); + } + } + return new Set(protectedHeader.crit); +} +export default validateCrit; diff --git a/webapp/node_modules/jose/dist/browser/package.json b/webapp/node_modules/jose/dist/browser/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6990891ff35dd464b19df096e6089004b0e31825 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/package.json @@ -0,0 +1 @@ +{"type": "module"} diff --git a/webapp/node_modules/jose/dist/browser/runtime/aeskw.js b/webapp/node_modules/jose/dist/browser/runtime/aeskw.js new file mode 100644 index 0000000000000000000000000000000000000000..bb7dff8a5be5040447ca75495a8afd81e3fefee6 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/aeskw.js @@ -0,0 +1,32 @@ +import bogusWebCrypto from './bogus.js'; +import crypto, { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +function checkKeySize(key, alg) { + if (key.algorithm.length !== parseInt(alg.slice(1, 4), 10)) { + throw new TypeError(`Invalid key size for alg: ${alg}`); + } +} +function getCryptoKey(key, alg, usage) { + if (isCryptoKey(key)) { + checkEncCryptoKey(key, alg, usage); + return key; + } + if (key instanceof Uint8Array) { + return crypto.subtle.importKey('raw', key, 'AES-KW', true, [usage]); + } + throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array')); +} +export const wrap = async (alg, key, cek) => { + const cryptoKey = await getCryptoKey(key, alg, 'wrapKey'); + checkKeySize(cryptoKey, alg); + const cryptoKeyCek = await crypto.subtle.importKey('raw', cek, ...bogusWebCrypto); + return new Uint8Array(await crypto.subtle.wrapKey('raw', cryptoKeyCek, cryptoKey, 'AES-KW')); +}; +export const unwrap = async (alg, key, encryptedKey) => { + const cryptoKey = await getCryptoKey(key, alg, 'unwrapKey'); + checkKeySize(cryptoKey, alg); + const cryptoKeyCek = await crypto.subtle.unwrapKey('raw', encryptedKey, cryptoKey, 'AES-KW', ...bogusWebCrypto); + return new Uint8Array(await crypto.subtle.exportKey('raw', cryptoKeyCek)); +}; diff --git a/webapp/node_modules/jose/dist/browser/runtime/asn1.js b/webapp/node_modules/jose/dist/browser/runtime/asn1.js new file mode 100644 index 0000000000000000000000000000000000000000..a01ffc2f10723edd90fc394b6127e0863b7767e1 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/asn1.js @@ -0,0 +1,118 @@ +import { isCloudflareWorkers } from './env.js'; +import crypto, { isCryptoKey } from './webcrypto.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { encodeBase64 } from './base64url.js'; +import formatPEM from '../lib/format_pem.js'; +import { JOSENotSupported } from '../util/errors.js'; +import { types } from './is_key_like.js'; +const genericExport = async (keyType, keyFormat, key) => { + if (!isCryptoKey(key)) { + throw new TypeError(invalidKeyInput(key, ...types)); + } + if (!key.extractable) { + throw new TypeError('CryptoKey is not extractable'); + } + if (key.type !== keyType) { + throw new TypeError(`key is not a ${keyType} key`); + } + return formatPEM(encodeBase64(new Uint8Array(await crypto.subtle.exportKey(keyFormat, key))), `${keyType.toUpperCase()} KEY`); +}; +export const toSPKI = (key) => { + return genericExport('public', 'spki', key); +}; +export const toPKCS8 = (key) => { + return genericExport('private', 'pkcs8', key); +}; +const findOid = (keyData, oid, from = 0) => { + if (from === 0) { + oid.unshift(oid.length); + oid.unshift(0x06); + } + let i = keyData.indexOf(oid[0], from); + if (i === -1) + return false; + const sub = keyData.subarray(i, i + oid.length); + if (sub.length !== oid.length) + return false; + return sub.every((value, index) => value === oid[index]) || findOid(keyData, oid, i + 1); +}; +const getNamedCurve = (keyData) => { + switch (true) { + case findOid(keyData, [0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07]): + return 'P-256'; + case findOid(keyData, [0x2b, 0x81, 0x04, 0x00, 0x22]): + return 'P-384'; + case findOid(keyData, [0x2b, 0x81, 0x04, 0x00, 0x23]): + return 'P-521'; + case isCloudflareWorkers() && findOid(keyData, [0x2b, 0x65, 0x70]): + return 'Ed25519'; + default: + throw new JOSENotSupported('Invalid or unsupported EC Key Curve or OKP Key Sub Type'); + } +}; +const genericImport = async (replace, keyFormat, pem, alg, options) => { + var _a; + let algorithm; + let keyUsages; + const keyData = new Uint8Array(atob(pem.replace(replace, '')) + .split('') + .map((c) => c.charCodeAt(0))); + const isPublic = keyFormat === 'spki'; + switch (alg) { + case 'PS256': + case 'PS384': + case 'PS512': + algorithm = { name: 'RSA-PSS', hash: `SHA-${alg.slice(-3)}` }; + keyUsages = isPublic ? ['verify'] : ['sign']; + break; + case 'RS256': + case 'RS384': + case 'RS512': + algorithm = { name: 'RSASSA-PKCS1-v1_5', hash: `SHA-${alg.slice(-3)}` }; + keyUsages = isPublic ? ['verify'] : ['sign']; + break; + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': + algorithm = { + name: 'RSA-OAEP', + hash: `SHA-${parseInt(alg.slice(-3), 10) || 1}`, + }; + keyUsages = isPublic ? ['encrypt', 'wrapKey'] : ['decrypt', 'unwrapKey']; + break; + case 'ES256': + algorithm = { name: 'ECDSA', namedCurve: 'P-256' }; + keyUsages = isPublic ? ['verify'] : ['sign']; + break; + case 'ES384': + algorithm = { name: 'ECDSA', namedCurve: 'P-384' }; + keyUsages = isPublic ? ['verify'] : ['sign']; + break; + case 'ES512': + algorithm = { name: 'ECDSA', namedCurve: 'P-521' }; + keyUsages = isPublic ? ['verify'] : ['sign']; + break; + case 'ECDH-ES': + case 'ECDH-ES+A128KW': + case 'ECDH-ES+A192KW': + case 'ECDH-ES+A256KW': + algorithm = { name: 'ECDH', namedCurve: getNamedCurve(keyData) }; + keyUsages = isPublic ? [] : ['deriveBits']; + break; + case isCloudflareWorkers() && 'EdDSA': + const namedCurve = getNamedCurve(keyData).toUpperCase(); + algorithm = { name: `NODE-${namedCurve}`, namedCurve: `NODE-${namedCurve}` }; + keyUsages = isPublic ? ['verify'] : ['sign']; + break; + default: + throw new JOSENotSupported('Invalid or unsupported "alg" (Algorithm) value'); + } + return crypto.subtle.importKey(keyFormat, keyData, algorithm, (_a = options === null || options === void 0 ? void 0 : options.extractable) !== null && _a !== void 0 ? _a : false, keyUsages); +}; +export const fromPKCS8 = (pem, alg, options) => { + return genericImport(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g, 'pkcs8', pem, alg, options); +}; +export const fromSPKI = (pem, alg, options) => { + return genericImport(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, 'spki', pem, alg, options); +}; diff --git a/webapp/node_modules/jose/dist/browser/runtime/base64url.js b/webapp/node_modules/jose/dist/browser/runtime/base64url.js new file mode 100644 index 0000000000000000000000000000000000000000..32df82bfe0e57aa75f0b9e814ecd46a0998c21d3 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/base64url.js @@ -0,0 +1,37 @@ +import { encoder, decoder } from '../lib/buffer_utils.js'; +export const encodeBase64 = (input) => { + let unencoded = input; + if (typeof unencoded === 'string') { + unencoded = encoder.encode(unencoded); + } + const CHUNK_SIZE = 0x8000; + const arr = []; + for (let i = 0; i < unencoded.length; i += CHUNK_SIZE) { + arr.push(String.fromCharCode.apply(null, unencoded.subarray(i, i + CHUNK_SIZE))); + } + return btoa(arr.join('')); +}; +export const encode = (input) => { + return encodeBase64(input).replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); +}; +export const decodeBase64 = (encoded) => { + const binary = atob(encoded); + const bytes = new Uint8Array(binary.length); + for (let i = 0; i < binary.length; i++) { + bytes[i] = binary.charCodeAt(i); + } + return bytes; +}; +export const decode = (input) => { + let encoded = input; + if (encoded instanceof Uint8Array) { + encoded = decoder.decode(encoded); + } + encoded = encoded.replace(/-/g, '+').replace(/_/g, '/').replace(/\s/g, ''); + try { + return decodeBase64(encoded); + } + catch (_a) { + throw new TypeError('The input to be decoded is not correctly encoded.'); + } +}; diff --git a/webapp/node_modules/jose/dist/browser/runtime/bogus.js b/webapp/node_modules/jose/dist/browser/runtime/bogus.js new file mode 100644 index 0000000000000000000000000000000000000000..8fde604ebfc8874cda1333ffa5074aeb734faf4e --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/bogus.js @@ -0,0 +1,6 @@ +const bogusWebCrypto = [ + { hash: 'SHA-256', name: 'HMAC' }, + true, + ['sign'], +]; +export default bogusWebCrypto; diff --git a/webapp/node_modules/jose/dist/browser/runtime/check_cek_length.js b/webapp/node_modules/jose/dist/browser/runtime/check_cek_length.js new file mode 100644 index 0000000000000000000000000000000000000000..673031e0cbfa0c5cc60afef272bdf0fea9ac8349 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/check_cek_length.js @@ -0,0 +1,7 @@ +import { JWEInvalid } from '../util/errors.js'; +const checkCekLength = (cek, expected) => { + if (cek.length << 3 !== expected) { + throw new JWEInvalid('Invalid Content Encryption Key length'); + } +}; +export default checkCekLength; diff --git a/webapp/node_modules/jose/dist/browser/runtime/check_key_length.js b/webapp/node_modules/jose/dist/browser/runtime/check_key_length.js new file mode 100644 index 0000000000000000000000000000000000000000..33970068fea16908676079c14afb6f1157a3aa85 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/check_key_length.js @@ -0,0 +1,8 @@ +export default (alg, key) => { + if (alg.startsWith('RS') || alg.startsWith('PS')) { + const { modulusLength } = key.algorithm; + if (typeof modulusLength !== 'number' || modulusLength < 2048) { + throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`); + } + } +}; diff --git a/webapp/node_modules/jose/dist/browser/runtime/decrypt.js b/webapp/node_modules/jose/dist/browser/runtime/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..68f9f7c3fe58723f76206a82c51d11dbf2823b62 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/decrypt.js @@ -0,0 +1,85 @@ +import { concat, uint64be } from '../lib/buffer_utils.js'; +import checkIvLength from '../lib/check_iv_length.js'; +import checkCekLength from './check_cek_length.js'; +import timingSafeEqual from './timing_safe_equal.js'; +import { JOSENotSupported, JWEDecryptionFailed } from '../util/errors.js'; +import crypto, { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +async function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) { + if (!(cek instanceof Uint8Array)) { + throw new TypeError(invalidKeyInput(cek, 'Uint8Array')); + } + const keySize = parseInt(enc.slice(1, 4), 10); + const encKey = await crypto.subtle.importKey('raw', cek.subarray(keySize >> 3), 'AES-CBC', false, ['decrypt']); + const macKey = await crypto.subtle.importKey('raw', cek.subarray(0, keySize >> 3), { + hash: `SHA-${keySize << 1}`, + name: 'HMAC', + }, false, ['sign']); + const macData = concat(aad, iv, ciphertext, uint64be(aad.length << 3)); + const expectedTag = new Uint8Array((await crypto.subtle.sign('HMAC', macKey, macData)).slice(0, keySize >> 3)); + let macCheckPassed; + try { + macCheckPassed = timingSafeEqual(tag, expectedTag); + } + catch (_a) { + } + if (!macCheckPassed) { + throw new JWEDecryptionFailed(); + } + let plaintext; + try { + plaintext = new Uint8Array(await crypto.subtle.decrypt({ iv, name: 'AES-CBC' }, encKey, ciphertext)); + } + catch (_b) { + } + if (!plaintext) { + throw new JWEDecryptionFailed(); + } + return plaintext; +} +async function gcmDecrypt(enc, cek, ciphertext, iv, tag, aad) { + let encKey; + if (cek instanceof Uint8Array) { + encKey = await crypto.subtle.importKey('raw', cek, 'AES-GCM', false, ['decrypt']); + } + else { + checkEncCryptoKey(cek, enc, 'decrypt'); + encKey = cek; + } + try { + return new Uint8Array(await crypto.subtle.decrypt({ + additionalData: aad, + iv, + name: 'AES-GCM', + tagLength: 128, + }, encKey, concat(ciphertext, tag))); + } + catch (_a) { + throw new JWEDecryptionFailed(); + } +} +const decrypt = async (enc, cek, ciphertext, iv, tag, aad) => { + if (!isCryptoKey(cek) && !(cek instanceof Uint8Array)) { + throw new TypeError(invalidKeyInput(cek, ...types, 'Uint8Array')); + } + checkIvLength(enc, iv); + switch (enc) { + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + if (cek instanceof Uint8Array) + checkCekLength(cek, parseInt(enc.slice(-3), 10)); + return cbcDecrypt(enc, cek, ciphertext, iv, tag, aad); + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + if (cek instanceof Uint8Array) + checkCekLength(cek, parseInt(enc.slice(1, 4), 10)); + return gcmDecrypt(enc, cek, ciphertext, iv, tag, aad); + default: + throw new JOSENotSupported('Unsupported JWE Content Encryption Algorithm'); + } +}; +export default decrypt; diff --git a/webapp/node_modules/jose/dist/browser/runtime/digest.js b/webapp/node_modules/jose/dist/browser/runtime/digest.js new file mode 100644 index 0000000000000000000000000000000000000000..39099d3b1d28dafc6f736204d7b2ab40bea6d470 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/digest.js @@ -0,0 +1,6 @@ +import crypto from './webcrypto.js'; +const digest = async (algorithm, data) => { + const subtleDigest = `SHA-${algorithm.slice(-3)}`; + return new Uint8Array(await crypto.subtle.digest(subtleDigest, data)); +}; +export default digest; diff --git a/webapp/node_modules/jose/dist/browser/runtime/ecdhes.js b/webapp/node_modules/jose/dist/browser/runtime/ecdhes.js new file mode 100644 index 0000000000000000000000000000000000000000..21af2b0c3783e7a3a559a483f16646bfaf75da9c --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/ecdhes.js @@ -0,0 +1,33 @@ +import { encoder, concat, uint32be, lengthAndInput, concatKdf } from '../lib/buffer_utils.js'; +import crypto, { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +export async function deriveKey(publicKey, privateKey, algorithm, keyLength, apu = new Uint8Array(0), apv = new Uint8Array(0)) { + if (!isCryptoKey(publicKey)) { + throw new TypeError(invalidKeyInput(publicKey, ...types)); + } + checkEncCryptoKey(publicKey, 'ECDH'); + if (!isCryptoKey(privateKey)) { + throw new TypeError(invalidKeyInput(privateKey, ...types)); + } + checkEncCryptoKey(privateKey, 'ECDH', 'deriveBits'); + const value = concat(lengthAndInput(encoder.encode(algorithm)), lengthAndInput(apu), lengthAndInput(apv), uint32be(keyLength)); + const sharedSecret = new Uint8Array(await crypto.subtle.deriveBits({ + name: 'ECDH', + public: publicKey, + }, privateKey, Math.ceil(parseInt(privateKey.algorithm.namedCurve.slice(-3), 10) / 8) << 3)); + return concatKdf(sharedSecret, keyLength, value); +} +export async function generateEpk(key) { + if (!isCryptoKey(key)) { + throw new TypeError(invalidKeyInput(key, ...types)); + } + return crypto.subtle.generateKey(key.algorithm, true, ['deriveBits']); +} +export function ecdhAllowed(key) { + if (!isCryptoKey(key)) { + throw new TypeError(invalidKeyInput(key, ...types)); + } + return ['P-256', 'P-384', 'P-521'].includes(key.algorithm.namedCurve); +} diff --git a/webapp/node_modules/jose/dist/browser/runtime/encrypt.js b/webapp/node_modules/jose/dist/browser/runtime/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..c2ec0ef91d424ef6636caf659a6185ec1063921d --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/encrypt.js @@ -0,0 +1,68 @@ +import { concat, uint64be } from '../lib/buffer_utils.js'; +import checkIvLength from '../lib/check_iv_length.js'; +import checkCekLength from './check_cek_length.js'; +import crypto, { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { JOSENotSupported } from '../util/errors.js'; +import { types } from './is_key_like.js'; +async function cbcEncrypt(enc, plaintext, cek, iv, aad) { + if (!(cek instanceof Uint8Array)) { + throw new TypeError(invalidKeyInput(cek, 'Uint8Array')); + } + const keySize = parseInt(enc.slice(1, 4), 10); + const encKey = await crypto.subtle.importKey('raw', cek.subarray(keySize >> 3), 'AES-CBC', false, ['encrypt']); + const macKey = await crypto.subtle.importKey('raw', cek.subarray(0, keySize >> 3), { + hash: `SHA-${keySize << 1}`, + name: 'HMAC', + }, false, ['sign']); + const ciphertext = new Uint8Array(await crypto.subtle.encrypt({ + iv, + name: 'AES-CBC', + }, encKey, plaintext)); + const macData = concat(aad, iv, ciphertext, uint64be(aad.length << 3)); + const tag = new Uint8Array((await crypto.subtle.sign('HMAC', macKey, macData)).slice(0, keySize >> 3)); + return { ciphertext, tag }; +} +async function gcmEncrypt(enc, plaintext, cek, iv, aad) { + let encKey; + if (cek instanceof Uint8Array) { + encKey = await crypto.subtle.importKey('raw', cek, 'AES-GCM', false, ['encrypt']); + } + else { + checkEncCryptoKey(cek, enc, 'encrypt'); + encKey = cek; + } + const encrypted = new Uint8Array(await crypto.subtle.encrypt({ + additionalData: aad, + iv, + name: 'AES-GCM', + tagLength: 128, + }, encKey, plaintext)); + const tag = encrypted.slice(-16); + const ciphertext = encrypted.slice(0, -16); + return { ciphertext, tag }; +} +const encrypt = async (enc, plaintext, cek, iv, aad) => { + if (!isCryptoKey(cek) && !(cek instanceof Uint8Array)) { + throw new TypeError(invalidKeyInput(cek, ...types, 'Uint8Array')); + } + checkIvLength(enc, iv); + switch (enc) { + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + if (cek instanceof Uint8Array) + checkCekLength(cek, parseInt(enc.slice(-3), 10)); + return cbcEncrypt(enc, plaintext, cek, iv, aad); + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + if (cek instanceof Uint8Array) + checkCekLength(cek, parseInt(enc.slice(1, 4), 10)); + return gcmEncrypt(enc, plaintext, cek, iv, aad); + default: + throw new JOSENotSupported('Unsupported JWE Content Encryption Algorithm'); + } +}; +export default encrypt; diff --git a/webapp/node_modules/jose/dist/browser/runtime/env.js b/webapp/node_modules/jose/dist/browser/runtime/env.js new file mode 100644 index 0000000000000000000000000000000000000000..6751cbb2918385b42cf6eb0a0f7d20100088b6eb --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/env.js @@ -0,0 +1,3 @@ +export function isCloudflareWorkers() { + return typeof WebSocketPair === 'function'; +} diff --git a/webapp/node_modules/jose/dist/browser/runtime/fetch_jwks.js b/webapp/node_modules/jose/dist/browser/runtime/fetch_jwks.js new file mode 100644 index 0000000000000000000000000000000000000000..85d58b675da6b2f1f9c18f7b1207e1c8e2cbc94e --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/fetch_jwks.js @@ -0,0 +1,34 @@ +import { JOSEError, JWKSTimeout } from '../util/errors.js'; +const fetchJwks = async (url, timeout, options) => { + let controller; + let id; + let timedOut = false; + if (typeof AbortController === 'function') { + controller = new AbortController(); + id = setTimeout(() => { + timedOut = true; + controller.abort(); + }, timeout); + } + const response = await fetch(url.href, { + signal: controller ? controller.signal : undefined, + redirect: 'manual', + headers: options.headers, + }).catch((err) => { + if (timedOut) + throw new JWKSTimeout(); + throw err; + }); + if (id !== undefined) + clearTimeout(id); + if (response.status !== 200) { + throw new JOSEError('Expected 200 OK from the JSON Web Key Set HTTP response'); + } + try { + return await response.json(); + } + catch (_a) { + throw new JOSEError('Failed to parse the JSON Web Key Set HTTP response as JSON'); + } +}; +export default fetchJwks; diff --git a/webapp/node_modules/jose/dist/browser/runtime/generate.js b/webapp/node_modules/jose/dist/browser/runtime/generate.js new file mode 100644 index 0000000000000000000000000000000000000000..f207e5f9e7f1c154525191cf90d7dbed96e9ae10 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/generate.js @@ -0,0 +1,126 @@ +import { isCloudflareWorkers } from './env.js'; +import crypto from './webcrypto.js'; +import { JOSENotSupported } from '../util/errors.js'; +import random from './random.js'; +export async function generateSecret(alg, options) { + var _a; + let length; + let algorithm; + let keyUsages; + switch (alg) { + case 'HS256': + case 'HS384': + case 'HS512': + length = parseInt(alg.slice(-3), 10); + algorithm = { name: 'HMAC', hash: `SHA-${length}`, length }; + keyUsages = ['sign', 'verify']; + break; + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + length = parseInt(alg.slice(-3), 10); + return random(new Uint8Array(length >> 3)); + case 'A128KW': + case 'A192KW': + case 'A256KW': + length = parseInt(alg.slice(1, 4), 10); + algorithm = { name: 'AES-KW', length }; + keyUsages = ['wrapKey', 'unwrapKey']; + break; + case 'A128GCMKW': + case 'A192GCMKW': + case 'A256GCMKW': + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + length = parseInt(alg.slice(1, 4), 10); + algorithm = { name: 'AES-GCM', length }; + keyUsages = ['encrypt', 'decrypt']; + break; + default: + throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value'); + } + return crypto.subtle.generateKey(algorithm, (_a = options === null || options === void 0 ? void 0 : options.extractable) !== null && _a !== void 0 ? _a : false, keyUsages); +} +function getModulusLengthOption(options) { + var _a; + const modulusLength = (_a = options === null || options === void 0 ? void 0 : options.modulusLength) !== null && _a !== void 0 ? _a : 2048; + if (typeof modulusLength !== 'number' || modulusLength < 2048) { + throw new JOSENotSupported('Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used'); + } + return modulusLength; +} +export async function generateKeyPair(alg, options) { + var _a, _b; + let algorithm; + let keyUsages; + switch (alg) { + case 'PS256': + case 'PS384': + case 'PS512': + algorithm = { + name: 'RSA-PSS', + hash: `SHA-${alg.slice(-3)}`, + publicExponent: new Uint8Array([0x01, 0x00, 0x01]), + modulusLength: getModulusLengthOption(options), + }; + keyUsages = ['sign', 'verify']; + break; + case 'RS256': + case 'RS384': + case 'RS512': + algorithm = { + name: 'RSASSA-PKCS1-v1_5', + hash: `SHA-${alg.slice(-3)}`, + publicExponent: new Uint8Array([0x01, 0x00, 0x01]), + modulusLength: getModulusLengthOption(options), + }; + keyUsages = ['sign', 'verify']; + break; + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': + algorithm = { + name: 'RSA-OAEP', + hash: `SHA-${parseInt(alg.slice(-3), 10) || 1}`, + publicExponent: new Uint8Array([0x01, 0x00, 0x01]), + modulusLength: getModulusLengthOption(options), + }; + keyUsages = ['decrypt', 'unwrapKey', 'encrypt', 'wrapKey']; + break; + case 'ES256': + algorithm = { name: 'ECDSA', namedCurve: 'P-256' }; + keyUsages = ['sign', 'verify']; + break; + case 'ES384': + algorithm = { name: 'ECDSA', namedCurve: 'P-384' }; + keyUsages = ['sign', 'verify']; + break; + case 'ES512': + algorithm = { name: 'ECDSA', namedCurve: 'P-521' }; + keyUsages = ['sign', 'verify']; + break; + case isCloudflareWorkers() && 'EdDSA': + switch (options === null || options === void 0 ? void 0 : options.crv) { + case undefined: + case 'Ed25519': + algorithm = { name: 'NODE-ED25519', namedCurve: 'NODE-ED25519' }; + keyUsages = ['sign', 'verify']; + break; + default: + throw new JOSENotSupported('Invalid or unsupported crv option provided'); + } + break; + case 'ECDH-ES': + case 'ECDH-ES+A128KW': + case 'ECDH-ES+A192KW': + case 'ECDH-ES+A256KW': + algorithm = { name: 'ECDH', namedCurve: (_a = options === null || options === void 0 ? void 0 : options.crv) !== null && _a !== void 0 ? _a : 'P-256' }; + keyUsages = ['deriveKey', 'deriveBits']; + break; + default: + throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value'); + } + return (crypto.subtle.generateKey(algorithm, (_b = options === null || options === void 0 ? void 0 : options.extractable) !== null && _b !== void 0 ? _b : false, keyUsages)); +} diff --git a/webapp/node_modules/jose/dist/browser/runtime/get_sign_verify_key.js b/webapp/node_modules/jose/dist/browser/runtime/get_sign_verify_key.js new file mode 100644 index 0000000000000000000000000000000000000000..db34ae8bbe0c41ffab2b13a961aa3ed70ff66db5 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/get_sign_verify_key.js @@ -0,0 +1,17 @@ +import crypto, { isCryptoKey } from './webcrypto.js'; +import { checkSigCryptoKey } from '../lib/crypto_key.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +export default function getCryptoKey(alg, key, usage) { + if (isCryptoKey(key)) { + checkSigCryptoKey(key, alg, usage); + return key; + } + if (key instanceof Uint8Array) { + if (!alg.startsWith('HS')) { + throw new TypeError(invalidKeyInput(key, ...types)); + } + return crypto.subtle.importKey('raw', key, { hash: `SHA-${alg.slice(-3)}`, name: 'HMAC' }, false, [usage]); + } + throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array')); +} diff --git a/webapp/node_modules/jose/dist/browser/runtime/is_key_like.js b/webapp/node_modules/jose/dist/browser/runtime/is_key_like.js new file mode 100644 index 0000000000000000000000000000000000000000..8d35fdc84c4f2642dd144004a8faffca7efba578 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/is_key_like.js @@ -0,0 +1,5 @@ +import { isCryptoKey } from './webcrypto.js'; +export default (key) => { + return isCryptoKey(key); +}; +export const types = ['CryptoKey']; diff --git a/webapp/node_modules/jose/dist/browser/runtime/jwk_to_key.js b/webapp/node_modules/jose/dist/browser/runtime/jwk_to_key.js new file mode 100644 index 0000000000000000000000000000000000000000..4dbd9a53d2ff7aebd659c59abce88175080e6c19 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/jwk_to_key.js @@ -0,0 +1,135 @@ +import { isCloudflareWorkers } from './env.js'; +import crypto from './webcrypto.js'; +import { JOSENotSupported } from '../util/errors.js'; +import { decode as base64url } from './base64url.js'; +function subtleMapping(jwk) { + let algorithm; + let keyUsages; + switch (jwk.kty) { + case 'oct': { + switch (jwk.alg) { + case 'HS256': + case 'HS384': + case 'HS512': + algorithm = { name: 'HMAC', hash: `SHA-${jwk.alg.slice(-3)}` }; + keyUsages = ['sign', 'verify']; + break; + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + throw new JOSENotSupported(`${jwk.alg} keys cannot be imported as CryptoKey instances`); + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + case 'A128GCMKW': + case 'A192GCMKW': + case 'A256GCMKW': + algorithm = { name: 'AES-GCM' }; + keyUsages = ['encrypt', 'decrypt']; + break; + case 'A128KW': + case 'A192KW': + case 'A256KW': + algorithm = { name: 'AES-KW' }; + keyUsages = ['wrapKey', 'unwrapKey']; + break; + case 'PBES2-HS256+A128KW': + case 'PBES2-HS384+A192KW': + case 'PBES2-HS512+A256KW': + algorithm = { name: 'PBKDF2' }; + keyUsages = ['deriveBits']; + break; + default: + throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value'); + } + break; + } + case 'RSA': { + switch (jwk.alg) { + case 'PS256': + case 'PS384': + case 'PS512': + algorithm = { name: 'RSA-PSS', hash: `SHA-${jwk.alg.slice(-3)}` }; + keyUsages = jwk.d ? ['sign'] : ['verify']; + break; + case 'RS256': + case 'RS384': + case 'RS512': + algorithm = { name: 'RSASSA-PKCS1-v1_5', hash: `SHA-${jwk.alg.slice(-3)}` }; + keyUsages = jwk.d ? ['sign'] : ['verify']; + break; + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': + algorithm = { + name: 'RSA-OAEP', + hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}`, + }; + keyUsages = jwk.d ? ['decrypt', 'unwrapKey'] : ['encrypt', 'wrapKey']; + break; + default: + throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value'); + } + break; + } + case 'EC': { + switch (jwk.alg) { + case 'ES256': + algorithm = { name: 'ECDSA', namedCurve: 'P-256' }; + keyUsages = jwk.d ? ['sign'] : ['verify']; + break; + case 'ES384': + algorithm = { name: 'ECDSA', namedCurve: 'P-384' }; + keyUsages = jwk.d ? ['sign'] : ['verify']; + break; + case 'ES512': + algorithm = { name: 'ECDSA', namedCurve: 'P-521' }; + keyUsages = jwk.d ? ['sign'] : ['verify']; + break; + case 'ECDH-ES': + case 'ECDH-ES+A128KW': + case 'ECDH-ES+A192KW': + case 'ECDH-ES+A256KW': + algorithm = { name: 'ECDH', namedCurve: jwk.crv }; + keyUsages = jwk.d ? ['deriveBits'] : []; + break; + default: + throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value'); + } + break; + } + case isCloudflareWorkers() && 'OKP': + if (jwk.alg !== 'EdDSA') { + throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value'); + } + switch (jwk.crv) { + case 'Ed25519': + algorithm = { name: 'NODE-ED25519', namedCurve: 'NODE-ED25519' }; + keyUsages = jwk.d ? ['sign'] : ['verify']; + break; + default: + throw new JOSENotSupported('Invalid or unsupported JWK "crv" (Subtype of Key Pair) Parameter value'); + } + break; + default: + throw new JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value'); + } + return { algorithm, keyUsages }; +} +const parse = async (jwk) => { + var _a, _b; + const { algorithm, keyUsages } = subtleMapping(jwk); + const rest = [ + algorithm, + (_a = jwk.ext) !== null && _a !== void 0 ? _a : false, + (_b = jwk.key_ops) !== null && _b !== void 0 ? _b : keyUsages, + ]; + if (algorithm.name === 'PBKDF2') { + return crypto.subtle.importKey('raw', base64url(jwk.k), ...rest); + } + const keyData = { ...jwk }; + delete keyData.alg; + return crypto.subtle.importKey('jwk', keyData, ...rest); +}; +export default parse; diff --git a/webapp/node_modules/jose/dist/browser/runtime/key_to_jwk.js b/webapp/node_modules/jose/dist/browser/runtime/key_to_jwk.js new file mode 100644 index 0000000000000000000000000000000000000000..438edfedc3d9696c15b9aee2666f97996bd508f6 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/key_to_jwk.js @@ -0,0 +1,21 @@ +import crypto, { isCryptoKey } from './webcrypto.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { encode as base64url } from './base64url.js'; +import { types } from './is_key_like.js'; +const keyToJWK = async (key) => { + if (key instanceof Uint8Array) { + return { + kty: 'oct', + k: base64url(key), + }; + } + if (!isCryptoKey(key)) { + throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array')); + } + if (!key.extractable) { + throw new TypeError('non-extractable CryptoKey cannot be exported as a JWK'); + } + const { ext, key_ops, alg, use, ...jwk } = await crypto.subtle.exportKey('jwk', key); + return jwk; +}; +export default keyToJWK; diff --git a/webapp/node_modules/jose/dist/browser/runtime/pbes2kw.js b/webapp/node_modules/jose/dist/browser/runtime/pbes2kw.js new file mode 100644 index 0000000000000000000000000000000000000000..575304aa6ba9cad1f245d8703d1744b3490aecaf --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/pbes2kw.js @@ -0,0 +1,51 @@ +import random from './random.js'; +import { p2s as concatSalt } from '../lib/buffer_utils.js'; +import { encode as base64url } from './base64url.js'; +import { wrap, unwrap } from './aeskw.js'; +import checkP2s from '../lib/check_p2s.js'; +import crypto, { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +function getCryptoKey(key, alg) { + if (key instanceof Uint8Array) { + return crypto.subtle.importKey('raw', key, 'PBKDF2', false, ['deriveBits']); + } + if (isCryptoKey(key)) { + checkEncCryptoKey(key, alg, 'deriveBits', 'deriveKey'); + return key; + } + throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array')); +} +async function deriveKey(p2s, alg, p2c, key) { + checkP2s(p2s); + const salt = concatSalt(alg, p2s); + const keylen = parseInt(alg.slice(13, 16), 10); + const subtleAlg = { + hash: `SHA-${alg.slice(8, 11)}`, + iterations: p2c, + name: 'PBKDF2', + salt, + }; + const wrapAlg = { + length: keylen, + name: 'AES-KW', + }; + const cryptoKey = await getCryptoKey(key, alg); + if (cryptoKey.usages.includes('deriveBits')) { + return new Uint8Array(await crypto.subtle.deriveBits(subtleAlg, cryptoKey, keylen)); + } + if (cryptoKey.usages.includes('deriveKey')) { + return crypto.subtle.deriveKey(subtleAlg, cryptoKey, wrapAlg, false, ['wrapKey', 'unwrapKey']); + } + throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"'); +} +export const encrypt = async (alg, key, cek, p2c = 2048, p2s = random(new Uint8Array(16))) => { + const derived = await deriveKey(p2s, alg, p2c, key); + const encryptedKey = await wrap(alg.slice(-6), derived, cek); + return { encryptedKey, p2c, p2s: base64url(p2s) }; +}; +export const decrypt = async (alg, key, encryptedKey, p2c, p2s) => { + const derived = await deriveKey(p2s, alg, p2c, key); + return unwrap(alg.slice(-6), derived, encryptedKey); +}; diff --git a/webapp/node_modules/jose/dist/browser/runtime/random.js b/webapp/node_modules/jose/dist/browser/runtime/random.js new file mode 100644 index 0000000000000000000000000000000000000000..e8e461124a7cfd2eb23b00f04290d8229ebf456c --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/random.js @@ -0,0 +1,2 @@ +import crypto from './webcrypto.js'; +export default crypto.getRandomValues.bind(crypto); diff --git a/webapp/node_modules/jose/dist/browser/runtime/rsaes.js b/webapp/node_modules/jose/dist/browser/runtime/rsaes.js new file mode 100644 index 0000000000000000000000000000000000000000..a1733769ec44a474c3b91fdd619eb570a5e03fed --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/rsaes.js @@ -0,0 +1,37 @@ +import subtleAlgorithm from './subtle_rsaes.js'; +import bogusWebCrypto from './bogus.js'; +import crypto, { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import checkKeyLength from './check_key_length.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +export const encrypt = async (alg, key, cek) => { + if (!isCryptoKey(key)) { + throw new TypeError(invalidKeyInput(key, ...types)); + } + checkEncCryptoKey(key, alg, 'encrypt', 'wrapKey'); + checkKeyLength(alg, key); + if (key.usages.includes('encrypt')) { + return new Uint8Array(await crypto.subtle.encrypt(subtleAlgorithm(alg), key, cek)); + } + if (key.usages.includes('wrapKey')) { + const cryptoKeyCek = await crypto.subtle.importKey('raw', cek, ...bogusWebCrypto); + return new Uint8Array(await crypto.subtle.wrapKey('raw', cryptoKeyCek, key, subtleAlgorithm(alg))); + } + throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation'); +}; +export const decrypt = async (alg, key, encryptedKey) => { + if (!isCryptoKey(key)) { + throw new TypeError(invalidKeyInput(key, ...types)); + } + checkEncCryptoKey(key, alg, 'decrypt', 'unwrapKey'); + checkKeyLength(alg, key); + if (key.usages.includes('decrypt')) { + return new Uint8Array(await crypto.subtle.decrypt(subtleAlgorithm(alg), key, encryptedKey)); + } + if (key.usages.includes('unwrapKey')) { + const cryptoKeyCek = await crypto.subtle.unwrapKey('raw', encryptedKey, key, subtleAlgorithm(alg), ...bogusWebCrypto); + return new Uint8Array(await crypto.subtle.exportKey('raw', cryptoKeyCek)); + } + throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation'); +}; diff --git a/webapp/node_modules/jose/dist/browser/runtime/sign.js b/webapp/node_modules/jose/dist/browser/runtime/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..3ccb9e16c3890ee60cbe9939a7a319a3727f7f92 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/sign.js @@ -0,0 +1,11 @@ +import subtleAlgorithm from './subtle_dsa.js'; +import crypto from './webcrypto.js'; +import checkKeyLength from './check_key_length.js'; +import getSignKey from './get_sign_verify_key.js'; +const sign = async (alg, key, data) => { + const cryptoKey = await getSignKey(alg, key, 'sign'); + checkKeyLength(alg, cryptoKey); + const signature = await crypto.subtle.sign(subtleAlgorithm(alg, cryptoKey.algorithm), cryptoKey, data); + return new Uint8Array(signature); +}; +export default sign; diff --git a/webapp/node_modules/jose/dist/browser/runtime/subtle_dsa.js b/webapp/node_modules/jose/dist/browser/runtime/subtle_dsa.js new file mode 100644 index 0000000000000000000000000000000000000000..7828e6790d47f82c1cc00543f630971a04739717 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/subtle_dsa.js @@ -0,0 +1,28 @@ +import { isCloudflareWorkers } from './env.js'; +import { JOSENotSupported } from '../util/errors.js'; +export default function subtleDsa(alg, algorithm) { + const hash = `SHA-${alg.slice(-3)}`; + switch (alg) { + case 'HS256': + case 'HS384': + case 'HS512': + return { hash, name: 'HMAC' }; + case 'PS256': + case 'PS384': + case 'PS512': + return { hash, name: 'RSA-PSS', saltLength: alg.slice(-3) >> 3 }; + case 'RS256': + case 'RS384': + case 'RS512': + return { hash, name: 'RSASSA-PKCS1-v1_5' }; + case 'ES256': + case 'ES384': + case 'ES512': + return { hash, name: 'ECDSA', namedCurve: algorithm.namedCurve }; + case isCloudflareWorkers() && 'EdDSA': + const { namedCurve } = algorithm; + return { name: namedCurve, namedCurve }; + default: + throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} diff --git a/webapp/node_modules/jose/dist/browser/runtime/subtle_rsaes.js b/webapp/node_modules/jose/dist/browser/runtime/subtle_rsaes.js new file mode 100644 index 0000000000000000000000000000000000000000..3a399bcfa7d63e5fe97a03ef131b3a6ab15c18cb --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/subtle_rsaes.js @@ -0,0 +1,12 @@ +import { JOSENotSupported } from '../util/errors.js'; +export default function subtleRsaEs(alg) { + switch (alg) { + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': + return 'RSA-OAEP'; + default: + throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} diff --git a/webapp/node_modules/jose/dist/browser/runtime/timing_safe_equal.js b/webapp/node_modules/jose/dist/browser/runtime/timing_safe_equal.js new file mode 100644 index 0000000000000000000000000000000000000000..442cdccd20673435ff02530df7d8fb202d16b10e --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/timing_safe_equal.js @@ -0,0 +1,19 @@ +const timingSafeEqual = (a, b) => { + if (!(a instanceof Uint8Array)) { + throw new TypeError('First argument must be a buffer'); + } + if (!(b instanceof Uint8Array)) { + throw new TypeError('Second argument must be a buffer'); + } + if (a.length !== b.length) { + throw new TypeError('Input buffers must have the same length'); + } + const len = a.length; + let out = 0; + let i = -1; + while (++i < len) { + out |= a[i] ^ b[i]; + } + return out === 0; +}; +export default timingSafeEqual; diff --git a/webapp/node_modules/jose/dist/browser/runtime/verify.js b/webapp/node_modules/jose/dist/browser/runtime/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..2ad4c7ffe2c3252e51ea9c12f2033fa0f8027f62 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/verify.js @@ -0,0 +1,16 @@ +import subtleAlgorithm from './subtle_dsa.js'; +import crypto from './webcrypto.js'; +import checkKeyLength from './check_key_length.js'; +import getVerifyKey from './get_sign_verify_key.js'; +const verify = async (alg, key, signature, data) => { + const cryptoKey = await getVerifyKey(alg, key, 'verify'); + checkKeyLength(alg, cryptoKey); + const algorithm = subtleAlgorithm(alg, cryptoKey.algorithm); + try { + return await crypto.subtle.verify(algorithm, cryptoKey, signature, data); + } + catch (_a) { + return false; + } +}; +export default verify; diff --git a/webapp/node_modules/jose/dist/browser/runtime/webcrypto.js b/webapp/node_modules/jose/dist/browser/runtime/webcrypto.js new file mode 100644 index 0000000000000000000000000000000000000000..f9e1e915390c4ebf7cf0581f4b183cae253ae402 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/webcrypto.js @@ -0,0 +1,2 @@ +export default crypto; +export const isCryptoKey = (key) => key instanceof CryptoKey; diff --git a/webapp/node_modules/jose/dist/browser/runtime/zlib.js b/webapp/node_modules/jose/dist/browser/runtime/zlib.js new file mode 100644 index 0000000000000000000000000000000000000000..e47cb532dc07683397af53af61513be18f8997e0 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/runtime/zlib.js @@ -0,0 +1,7 @@ +import { JOSENotSupported } from '../util/errors.js'; +export const inflate = async () => { + throw new JOSENotSupported('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `inflateRaw` decrypt option to provide Inflate Raw implementation.'); +}; +export const deflate = async () => { + throw new JOSENotSupported('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `deflateRaw` encrypt option to provide Deflate Raw implementation.'); +}; diff --git a/webapp/node_modules/jose/dist/browser/util/base64url.js b/webapp/node_modules/jose/dist/browser/util/base64url.js new file mode 100644 index 0000000000000000000000000000000000000000..88ce7556d6f7b34fc4068e2b8c213eda756801b3 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/util/base64url.js @@ -0,0 +1,3 @@ +import * as base64url from '../runtime/base64url.js'; +export const encode = base64url.encode; +export const decode = base64url.decode; diff --git a/webapp/node_modules/jose/dist/browser/util/decode_jwt.js b/webapp/node_modules/jose/dist/browser/util/decode_jwt.js new file mode 100644 index 0000000000000000000000000000000000000000..bea0ea9018c8cecc07839afc7f7cf15c87b8d466 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/util/decode_jwt.js @@ -0,0 +1,32 @@ +import { decode as base64url } from './base64url.js'; +import { decoder } from '../lib/buffer_utils.js'; +import isObject from '../lib/is_object.js'; +import { JWTInvalid } from './errors.js'; +export function decodeJwt(jwt) { + if (typeof jwt !== 'string') + throw new JWTInvalid('JWTs must use Compact JWS serialization, JWT must be a string'); + const { 1: payload, length } = jwt.split('.'); + if (length === 5) + throw new JWTInvalid('Only JWTs using Compact JWS serialization can be decoded'); + if (length !== 3) + throw new JWTInvalid('Invalid JWT'); + if (!payload) + throw new JWTInvalid('JWTs must contain a payload'); + let decoded; + try { + decoded = base64url(payload); + } + catch (_a) { + throw new JWTInvalid('Failed to parse the base64url encoded payload'); + } + let result; + try { + result = JSON.parse(decoder.decode(decoded)); + } + catch (_b) { + throw new JWTInvalid('Failed to parse the decoded payload as JSON'); + } + if (!isObject(result)) + throw new JWTInvalid('Invalid JWT Claims Set'); + return result; +} diff --git a/webapp/node_modules/jose/dist/browser/util/decode_protected_header.js b/webapp/node_modules/jose/dist/browser/util/decode_protected_header.js new file mode 100644 index 0000000000000000000000000000000000000000..aecbfe2390c40c35075c8d5aad1ba03133c8bf5e --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/util/decode_protected_header.js @@ -0,0 +1,34 @@ +import { decode as base64url } from './base64url.js'; +import { decoder } from '../lib/buffer_utils.js'; +import isObject from '../lib/is_object.js'; +export function decodeProtectedHeader(token) { + let protectedB64u; + if (typeof token === 'string') { + const parts = token.split('.'); + if (parts.length === 3 || parts.length === 5) { + ; + [protectedB64u] = parts; + } + } + else if (typeof token === 'object' && token) { + if ('protected' in token) { + protectedB64u = token.protected; + } + else { + throw new TypeError('Token does not contain a Protected Header'); + } + } + try { + if (typeof protectedB64u !== 'string' || !protectedB64u) { + throw new Error(); + } + const result = JSON.parse(decoder.decode(base64url(protectedB64u))); + if (!isObject(result)) { + throw new Error(); + } + return result; + } + catch (_a) { + throw new TypeError('Invalid Token or Protected Header formatting'); + } +} diff --git a/webapp/node_modules/jose/dist/browser/util/errors.js b/webapp/node_modules/jose/dist/browser/util/errors.js new file mode 100644 index 0000000000000000000000000000000000000000..777ce985b8f60980b67fb25a7f7d2324d6024b71 --- /dev/null +++ b/webapp/node_modules/jose/dist/browser/util/errors.js @@ -0,0 +1,147 @@ +export class JOSEError extends Error { + constructor(message) { + var _a; + super(message); + this.code = 'ERR_JOSE_GENERIC'; + this.name = this.constructor.name; + (_a = Error.captureStackTrace) === null || _a === void 0 ? void 0 : _a.call(Error, this, this.constructor); + } + static get code() { + return 'ERR_JOSE_GENERIC'; + } +} +export class JWTClaimValidationFailed extends JOSEError { + constructor(message, claim = 'unspecified', reason = 'unspecified') { + super(message); + this.code = 'ERR_JWT_CLAIM_VALIDATION_FAILED'; + this.claim = claim; + this.reason = reason; + } + static get code() { + return 'ERR_JWT_CLAIM_VALIDATION_FAILED'; + } +} +export class JWTExpired extends JOSEError { + constructor(message, claim = 'unspecified', reason = 'unspecified') { + super(message); + this.code = 'ERR_JWT_EXPIRED'; + this.claim = claim; + this.reason = reason; + } + static get code() { + return 'ERR_JWT_EXPIRED'; + } +} +export class JOSEAlgNotAllowed extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JOSE_ALG_NOT_ALLOWED'; + } + static get code() { + return 'ERR_JOSE_ALG_NOT_ALLOWED'; + } +} +export class JOSENotSupported extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JOSE_NOT_SUPPORTED'; + } + static get code() { + return 'ERR_JOSE_NOT_SUPPORTED'; + } +} +export class JWEDecryptionFailed extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWE_DECRYPTION_FAILED'; + this.message = 'decryption operation failed'; + } + static get code() { + return 'ERR_JWE_DECRYPTION_FAILED'; + } +} +export class JWEInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWE_INVALID'; + } + static get code() { + return 'ERR_JWE_INVALID'; + } +} +export class JWSInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWS_INVALID'; + } + static get code() { + return 'ERR_JWS_INVALID'; + } +} +export class JWTInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWT_INVALID'; + } + static get code() { + return 'ERR_JWT_INVALID'; + } +} +export class JWKInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWK_INVALID'; + } + static get code() { + return 'ERR_JWK_INVALID'; + } +} +export class JWKSInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_INVALID'; + } + static get code() { + return 'ERR_JWKS_INVALID'; + } +} +export class JWKSNoMatchingKey extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_NO_MATCHING_KEY'; + this.message = 'no applicable key found in the JSON Web Key Set'; + } + static get code() { + return 'ERR_JWKS_NO_MATCHING_KEY'; + } +} +export class JWKSMultipleMatchingKeys extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS'; + this.message = 'multiple matching keys found in the JSON Web Key Set'; + } + static get code() { + return 'ERR_JWKS_MULTIPLE_MATCHING_KEYS'; + } +} +export class JWKSTimeout extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_TIMEOUT'; + this.message = 'request timed out'; + } + static get code() { + return 'ERR_JWKS_TIMEOUT'; + } +} +export class JWSSignatureVerificationFailed extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'; + this.message = 'signature verification failed'; + } + static get code() { + return 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'; + } +} diff --git a/webapp/node_modules/jose/dist/node/cjs/index.js b/webapp/node_modules/jose/dist/node/cjs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5f418405009bc64ccb951784926d9a5bba080baf --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/index.js @@ -0,0 +1,65 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.base64url = exports.generateSecret = exports.generateKeyPair = exports.errors = exports.decodeJwt = exports.decodeProtectedHeader = exports.importJWK = exports.importX509 = exports.importPKCS8 = exports.importSPKI = exports.exportJWK = exports.exportSPKI = exports.exportPKCS8 = exports.UnsecuredJWT = exports.createRemoteJWKSet = exports.createLocalJWKSet = exports.EmbeddedJWK = exports.calculateJwkThumbprintUri = exports.calculateJwkThumbprint = exports.EncryptJWT = exports.SignJWT = exports.GeneralSign = exports.FlattenedSign = exports.CompactSign = exports.FlattenedEncrypt = exports.CompactEncrypt = exports.jwtDecrypt = exports.jwtVerify = exports.generalVerify = exports.flattenedVerify = exports.compactVerify = exports.GeneralEncrypt = exports.generalDecrypt = exports.flattenedDecrypt = exports.compactDecrypt = void 0; +var decrypt_js_1 = require("./jwe/compact/decrypt.js"); +Object.defineProperty(exports, "compactDecrypt", { enumerable: true, get: function () { return decrypt_js_1.compactDecrypt; } }); +var decrypt_js_2 = require("./jwe/flattened/decrypt.js"); +Object.defineProperty(exports, "flattenedDecrypt", { enumerable: true, get: function () { return decrypt_js_2.flattenedDecrypt; } }); +var decrypt_js_3 = require("./jwe/general/decrypt.js"); +Object.defineProperty(exports, "generalDecrypt", { enumerable: true, get: function () { return decrypt_js_3.generalDecrypt; } }); +var encrypt_js_1 = require("./jwe/general/encrypt.js"); +Object.defineProperty(exports, "GeneralEncrypt", { enumerable: true, get: function () { return encrypt_js_1.GeneralEncrypt; } }); +var verify_js_1 = require("./jws/compact/verify.js"); +Object.defineProperty(exports, "compactVerify", { enumerable: true, get: function () { return verify_js_1.compactVerify; } }); +var verify_js_2 = require("./jws/flattened/verify.js"); +Object.defineProperty(exports, "flattenedVerify", { enumerable: true, get: function () { return verify_js_2.flattenedVerify; } }); +var verify_js_3 = require("./jws/general/verify.js"); +Object.defineProperty(exports, "generalVerify", { enumerable: true, get: function () { return verify_js_3.generalVerify; } }); +var verify_js_4 = require("./jwt/verify.js"); +Object.defineProperty(exports, "jwtVerify", { enumerable: true, get: function () { return verify_js_4.jwtVerify; } }); +var decrypt_js_4 = require("./jwt/decrypt.js"); +Object.defineProperty(exports, "jwtDecrypt", { enumerable: true, get: function () { return decrypt_js_4.jwtDecrypt; } }); +var encrypt_js_2 = require("./jwe/compact/encrypt.js"); +Object.defineProperty(exports, "CompactEncrypt", { enumerable: true, get: function () { return encrypt_js_2.CompactEncrypt; } }); +var encrypt_js_3 = require("./jwe/flattened/encrypt.js"); +Object.defineProperty(exports, "FlattenedEncrypt", { enumerable: true, get: function () { return encrypt_js_3.FlattenedEncrypt; } }); +var sign_js_1 = require("./jws/compact/sign.js"); +Object.defineProperty(exports, "CompactSign", { enumerable: true, get: function () { return sign_js_1.CompactSign; } }); +var sign_js_2 = require("./jws/flattened/sign.js"); +Object.defineProperty(exports, "FlattenedSign", { enumerable: true, get: function () { return sign_js_2.FlattenedSign; } }); +var sign_js_3 = require("./jws/general/sign.js"); +Object.defineProperty(exports, "GeneralSign", { enumerable: true, get: function () { return sign_js_3.GeneralSign; } }); +var sign_js_4 = require("./jwt/sign.js"); +Object.defineProperty(exports, "SignJWT", { enumerable: true, get: function () { return sign_js_4.SignJWT; } }); +var encrypt_js_4 = require("./jwt/encrypt.js"); +Object.defineProperty(exports, "EncryptJWT", { enumerable: true, get: function () { return encrypt_js_4.EncryptJWT; } }); +var thumbprint_js_1 = require("./jwk/thumbprint.js"); +Object.defineProperty(exports, "calculateJwkThumbprint", { enumerable: true, get: function () { return thumbprint_js_1.calculateJwkThumbprint; } }); +Object.defineProperty(exports, "calculateJwkThumbprintUri", { enumerable: true, get: function () { return thumbprint_js_1.calculateJwkThumbprintUri; } }); +var embedded_js_1 = require("./jwk/embedded.js"); +Object.defineProperty(exports, "EmbeddedJWK", { enumerable: true, get: function () { return embedded_js_1.EmbeddedJWK; } }); +var local_js_1 = require("./jwks/local.js"); +Object.defineProperty(exports, "createLocalJWKSet", { enumerable: true, get: function () { return local_js_1.createLocalJWKSet; } }); +var remote_js_1 = require("./jwks/remote.js"); +Object.defineProperty(exports, "createRemoteJWKSet", { enumerable: true, get: function () { return remote_js_1.createRemoteJWKSet; } }); +var unsecured_js_1 = require("./jwt/unsecured.js"); +Object.defineProperty(exports, "UnsecuredJWT", { enumerable: true, get: function () { return unsecured_js_1.UnsecuredJWT; } }); +var export_js_1 = require("./key/export.js"); +Object.defineProperty(exports, "exportPKCS8", { enumerable: true, get: function () { return export_js_1.exportPKCS8; } }); +Object.defineProperty(exports, "exportSPKI", { enumerable: true, get: function () { return export_js_1.exportSPKI; } }); +Object.defineProperty(exports, "exportJWK", { enumerable: true, get: function () { return export_js_1.exportJWK; } }); +var import_js_1 = require("./key/import.js"); +Object.defineProperty(exports, "importSPKI", { enumerable: true, get: function () { return import_js_1.importSPKI; } }); +Object.defineProperty(exports, "importPKCS8", { enumerable: true, get: function () { return import_js_1.importPKCS8; } }); +Object.defineProperty(exports, "importX509", { enumerable: true, get: function () { return import_js_1.importX509; } }); +Object.defineProperty(exports, "importJWK", { enumerable: true, get: function () { return import_js_1.importJWK; } }); +var decode_protected_header_js_1 = require("./util/decode_protected_header.js"); +Object.defineProperty(exports, "decodeProtectedHeader", { enumerable: true, get: function () { return decode_protected_header_js_1.decodeProtectedHeader; } }); +var decode_jwt_js_1 = require("./util/decode_jwt.js"); +Object.defineProperty(exports, "decodeJwt", { enumerable: true, get: function () { return decode_jwt_js_1.decodeJwt; } }); +exports.errors = require("./util/errors.js"); +var generate_key_pair_js_1 = require("./key/generate_key_pair.js"); +Object.defineProperty(exports, "generateKeyPair", { enumerable: true, get: function () { return generate_key_pair_js_1.generateKeyPair; } }); +var generate_secret_js_1 = require("./key/generate_secret.js"); +Object.defineProperty(exports, "generateSecret", { enumerable: true, get: function () { return generate_secret_js_1.generateSecret; } }); +exports.base64url = require("./util/base64url.js"); diff --git a/webapp/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js b/webapp/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..055b3c45643cb27814a189e08c01ec855b52c1a2 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.compactDecrypt = void 0; +const decrypt_js_1 = require("../flattened/decrypt.js"); +const errors_js_1 = require("../../util/errors.js"); +const buffer_utils_js_1 = require("../../lib/buffer_utils.js"); +async function compactDecrypt(jwe, key, options) { + if (jwe instanceof Uint8Array) { + jwe = buffer_utils_js_1.decoder.decode(jwe); + } + if (typeof jwe !== 'string') { + throw new errors_js_1.JWEInvalid('Compact JWE must be a string or Uint8Array'); + } + const { 0: protectedHeader, 1: encryptedKey, 2: iv, 3: ciphertext, 4: tag, length, } = jwe.split('.'); + if (length !== 5) { + throw new errors_js_1.JWEInvalid('Invalid Compact JWE'); + } + const decrypted = await (0, decrypt_js_1.flattenedDecrypt)({ + ciphertext, + iv: (iv || undefined), + protected: protectedHeader || undefined, + tag: (tag || undefined), + encrypted_key: encryptedKey || undefined, + }, key, options); + const result = { plaintext: decrypted.plaintext, protectedHeader: decrypted.protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: decrypted.key }; + } + return result; +} +exports.compactDecrypt = compactDecrypt; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js b/webapp/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..949fbb6df762cf038bdb5d05f1ced0fb8fcdc528 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CompactEncrypt = void 0; +const encrypt_js_1 = require("../flattened/encrypt.js"); +class CompactEncrypt { + constructor(plaintext) { + this._flattened = new encrypt_js_1.FlattenedEncrypt(plaintext); + } + setContentEncryptionKey(cek) { + this._flattened.setContentEncryptionKey(cek); + return this; + } + setInitializationVector(iv) { + this._flattened.setInitializationVector(iv); + return this; + } + setProtectedHeader(protectedHeader) { + this._flattened.setProtectedHeader(protectedHeader); + return this; + } + setKeyManagementParameters(parameters) { + this._flattened.setKeyManagementParameters(parameters); + return this; + } + async encrypt(key, options) { + const jwe = await this._flattened.encrypt(key, options); + return [jwe.protected, jwe.encrypted_key, jwe.iv, jwe.ciphertext, jwe.tag].join('.'); + } +} +exports.CompactEncrypt = CompactEncrypt; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js b/webapp/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..ba3d2d99cfc04e2c4e46e99bb6ed64b6eae029b7 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js @@ -0,0 +1,141 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.flattenedDecrypt = void 0; +const base64url_js_1 = require("../../runtime/base64url.js"); +const decrypt_js_1 = require("../../runtime/decrypt.js"); +const zlib_js_1 = require("../../runtime/zlib.js"); +const errors_js_1 = require("../../util/errors.js"); +const is_disjoint_js_1 = require("../../lib/is_disjoint.js"); +const is_object_js_1 = require("../../lib/is_object.js"); +const decrypt_key_management_js_1 = require("../../lib/decrypt_key_management.js"); +const buffer_utils_js_1 = require("../../lib/buffer_utils.js"); +const cek_js_1 = require("../../lib/cek.js"); +const validate_crit_js_1 = require("../../lib/validate_crit.js"); +const validate_algorithms_js_1 = require("../../lib/validate_algorithms.js"); +async function flattenedDecrypt(jwe, key, options) { + var _a; + if (!(0, is_object_js_1.default)(jwe)) { + throw new errors_js_1.JWEInvalid('Flattened JWE must be an object'); + } + if (jwe.protected === undefined && jwe.header === undefined && jwe.unprotected === undefined) { + throw new errors_js_1.JWEInvalid('JOSE Header missing'); + } + if (typeof jwe.iv !== 'string') { + throw new errors_js_1.JWEInvalid('JWE Initialization Vector missing or incorrect type'); + } + if (typeof jwe.ciphertext !== 'string') { + throw new errors_js_1.JWEInvalid('JWE Ciphertext missing or incorrect type'); + } + if (typeof jwe.tag !== 'string') { + throw new errors_js_1.JWEInvalid('JWE Authentication Tag missing or incorrect type'); + } + if (jwe.protected !== undefined && typeof jwe.protected !== 'string') { + throw new errors_js_1.JWEInvalid('JWE Protected Header incorrect type'); + } + if (jwe.encrypted_key !== undefined && typeof jwe.encrypted_key !== 'string') { + throw new errors_js_1.JWEInvalid('JWE Encrypted Key incorrect type'); + } + if (jwe.aad !== undefined && typeof jwe.aad !== 'string') { + throw new errors_js_1.JWEInvalid('JWE AAD incorrect type'); + } + if (jwe.header !== undefined && !(0, is_object_js_1.default)(jwe.header)) { + throw new errors_js_1.JWEInvalid('JWE Shared Unprotected Header incorrect type'); + } + if (jwe.unprotected !== undefined && !(0, is_object_js_1.default)(jwe.unprotected)) { + throw new errors_js_1.JWEInvalid('JWE Per-Recipient Unprotected Header incorrect type'); + } + let parsedProt; + if (jwe.protected) { + try { + const protectedHeader = (0, base64url_js_1.decode)(jwe.protected); + parsedProt = JSON.parse(buffer_utils_js_1.decoder.decode(protectedHeader)); + } + catch { + throw new errors_js_1.JWEInvalid('JWE Protected Header is invalid'); + } + } + if (!(0, is_disjoint_js_1.default)(parsedProt, jwe.header, jwe.unprotected)) { + throw new errors_js_1.JWEInvalid('JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint'); + } + const joseHeader = { + ...parsedProt, + ...jwe.header, + ...jwe.unprotected, + }; + (0, validate_crit_js_1.default)(errors_js_1.JWEInvalid, new Map(), options === null || options === void 0 ? void 0 : options.crit, parsedProt, joseHeader); + if (joseHeader.zip !== undefined) { + if (!parsedProt || !parsedProt.zip) { + throw new errors_js_1.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected'); + } + if (joseHeader.zip !== 'DEF') { + throw new errors_js_1.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value'); + } + } + const { alg, enc } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new errors_js_1.JWEInvalid('missing JWE Algorithm (alg) in JWE Header'); + } + if (typeof enc !== 'string' || !enc) { + throw new errors_js_1.JWEInvalid('missing JWE Encryption Algorithm (enc) in JWE Header'); + } + const keyManagementAlgorithms = options && (0, validate_algorithms_js_1.default)('keyManagementAlgorithms', options.keyManagementAlgorithms); + const contentEncryptionAlgorithms = options && + (0, validate_algorithms_js_1.default)('contentEncryptionAlgorithms', options.contentEncryptionAlgorithms); + if (keyManagementAlgorithms && !keyManagementAlgorithms.has(alg)) { + throw new errors_js_1.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed'); + } + if (contentEncryptionAlgorithms && !contentEncryptionAlgorithms.has(enc)) { + throw new errors_js_1.JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter not allowed'); + } + let encryptedKey; + if (jwe.encrypted_key !== undefined) { + encryptedKey = (0, base64url_js_1.decode)(jwe.encrypted_key); + } + let resolvedKey = false; + if (typeof key === 'function') { + key = await key(parsedProt, jwe); + resolvedKey = true; + } + let cek; + try { + cek = await (0, decrypt_key_management_js_1.default)(alg, key, encryptedKey, joseHeader); + } + catch (err) { + if (err instanceof TypeError) { + throw err; + } + cek = (0, cek_js_1.default)(enc); + } + const iv = (0, base64url_js_1.decode)(jwe.iv); + const tag = (0, base64url_js_1.decode)(jwe.tag); + const protectedHeader = buffer_utils_js_1.encoder.encode((_a = jwe.protected) !== null && _a !== void 0 ? _a : ''); + let additionalData; + if (jwe.aad !== undefined) { + additionalData = (0, buffer_utils_js_1.concat)(protectedHeader, buffer_utils_js_1.encoder.encode('.'), buffer_utils_js_1.encoder.encode(jwe.aad)); + } + else { + additionalData = protectedHeader; + } + let plaintext = await (0, decrypt_js_1.default)(enc, cek, (0, base64url_js_1.decode)(jwe.ciphertext), iv, tag, additionalData); + if (joseHeader.zip === 'DEF') { + plaintext = await ((options === null || options === void 0 ? void 0 : options.inflateRaw) || zlib_js_1.inflate)(plaintext); + } + const result = { plaintext }; + if (jwe.protected !== undefined) { + result.protectedHeader = parsedProt; + } + if (jwe.aad !== undefined) { + result.additionalAuthenticatedData = (0, base64url_js_1.decode)(jwe.aad); + } + if (jwe.unprotected !== undefined) { + result.sharedUnprotectedHeader = jwe.unprotected; + } + if (jwe.header !== undefined) { + result.unprotectedHeader = jwe.header; + } + if (resolvedKey) { + return { ...result, key }; + } + return result; +} +exports.flattenedDecrypt = flattenedDecrypt; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js b/webapp/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..8a69ccf40a1b2c8d80613f158a2eb79e4c5fe3d2 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js @@ -0,0 +1,179 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FlattenedEncrypt = exports.unprotected = void 0; +const base64url_js_1 = require("../../runtime/base64url.js"); +const encrypt_js_1 = require("../../runtime/encrypt.js"); +const zlib_js_1 = require("../../runtime/zlib.js"); +const iv_js_1 = require("../../lib/iv.js"); +const encrypt_key_management_js_1 = require("../../lib/encrypt_key_management.js"); +const errors_js_1 = require("../../util/errors.js"); +const is_disjoint_js_1 = require("../../lib/is_disjoint.js"); +const buffer_utils_js_1 = require("../../lib/buffer_utils.js"); +const validate_crit_js_1 = require("../../lib/validate_crit.js"); +exports.unprotected = Symbol(); +class FlattenedEncrypt { + constructor(plaintext) { + if (!(plaintext instanceof Uint8Array)) { + throw new TypeError('plaintext must be an instance of Uint8Array'); + } + this._plaintext = plaintext; + } + setKeyManagementParameters(parameters) { + if (this._keyManagementParameters) { + throw new TypeError('setKeyManagementParameters can only be called once'); + } + this._keyManagementParameters = parameters; + return this; + } + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setSharedUnprotectedHeader(sharedUnprotectedHeader) { + if (this._sharedUnprotectedHeader) { + throw new TypeError('setSharedUnprotectedHeader can only be called once'); + } + this._sharedUnprotectedHeader = sharedUnprotectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + if (this._unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this._unprotectedHeader = unprotectedHeader; + return this; + } + setAdditionalAuthenticatedData(aad) { + this._aad = aad; + return this; + } + setContentEncryptionKey(cek) { + if (this._cek) { + throw new TypeError('setContentEncryptionKey can only be called once'); + } + this._cek = cek; + return this; + } + setInitializationVector(iv) { + if (this._iv) { + throw new TypeError('setInitializationVector can only be called once'); + } + this._iv = iv; + return this; + } + async encrypt(key, options) { + if (!this._protectedHeader && !this._unprotectedHeader && !this._sharedUnprotectedHeader) { + throw new errors_js_1.JWEInvalid('either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()'); + } + if (!(0, is_disjoint_js_1.default)(this._protectedHeader, this._unprotectedHeader, this._sharedUnprotectedHeader)) { + throw new errors_js_1.JWEInvalid('JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint'); + } + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + ...this._sharedUnprotectedHeader, + }; + (0, validate_crit_js_1.default)(errors_js_1.JWEInvalid, new Map(), options === null || options === void 0 ? void 0 : options.crit, this._protectedHeader, joseHeader); + if (joseHeader.zip !== undefined) { + if (!this._protectedHeader || !this._protectedHeader.zip) { + throw new errors_js_1.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected'); + } + if (joseHeader.zip !== 'DEF') { + throw new errors_js_1.JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value'); + } + } + const { alg, enc } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new errors_js_1.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid'); + } + if (typeof enc !== 'string' || !enc) { + throw new errors_js_1.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid'); + } + let encryptedKey; + if (alg === 'dir') { + if (this._cek) { + throw new TypeError('setContentEncryptionKey cannot be called when using Direct Encryption'); + } + } + else if (alg === 'ECDH-ES') { + if (this._cek) { + throw new TypeError('setContentEncryptionKey cannot be called when using Direct Key Agreement'); + } + } + let cek; + { + let parameters; + ({ cek, encryptedKey, parameters } = await (0, encrypt_key_management_js_1.default)(alg, enc, key, this._cek, this._keyManagementParameters)); + if (parameters) { + if (options && exports.unprotected in options) { + if (!this._unprotectedHeader) { + this.setUnprotectedHeader(parameters); + } + else { + this._unprotectedHeader = { ...this._unprotectedHeader, ...parameters }; + } + } + else { + if (!this._protectedHeader) { + this.setProtectedHeader(parameters); + } + else { + this._protectedHeader = { ...this._protectedHeader, ...parameters }; + } + } + } + } + this._iv || (this._iv = (0, iv_js_1.default)(enc)); + let additionalData; + let protectedHeader; + let aadMember; + if (this._protectedHeader) { + protectedHeader = buffer_utils_js_1.encoder.encode((0, base64url_js_1.encode)(JSON.stringify(this._protectedHeader))); + } + else { + protectedHeader = buffer_utils_js_1.encoder.encode(''); + } + if (this._aad) { + aadMember = (0, base64url_js_1.encode)(this._aad); + additionalData = (0, buffer_utils_js_1.concat)(protectedHeader, buffer_utils_js_1.encoder.encode('.'), buffer_utils_js_1.encoder.encode(aadMember)); + } + else { + additionalData = protectedHeader; + } + let ciphertext; + let tag; + if (joseHeader.zip === 'DEF') { + const deflated = await ((options === null || options === void 0 ? void 0 : options.deflateRaw) || zlib_js_1.deflate)(this._plaintext); + ({ ciphertext, tag } = await (0, encrypt_js_1.default)(enc, deflated, cek, this._iv, additionalData)); + } + else { + ; + ({ ciphertext, tag } = await (0, encrypt_js_1.default)(enc, this._plaintext, cek, this._iv, additionalData)); + } + const jwe = { + ciphertext: (0, base64url_js_1.encode)(ciphertext), + iv: (0, base64url_js_1.encode)(this._iv), + tag: (0, base64url_js_1.encode)(tag), + }; + if (encryptedKey) { + jwe.encrypted_key = (0, base64url_js_1.encode)(encryptedKey); + } + if (aadMember) { + jwe.aad = aadMember; + } + if (this._protectedHeader) { + jwe.protected = buffer_utils_js_1.decoder.decode(protectedHeader); + } + if (this._sharedUnprotectedHeader) { + jwe.unprotected = this._sharedUnprotectedHeader; + } + if (this._unprotectedHeader) { + jwe.header = this._unprotectedHeader; + } + return jwe; + } +} +exports.FlattenedEncrypt = FlattenedEncrypt; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js b/webapp/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..accb23aa6a68e379ad0168c0bc980b2650042795 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generalDecrypt = void 0; +const decrypt_js_1 = require("../flattened/decrypt.js"); +const errors_js_1 = require("../../util/errors.js"); +const is_object_js_1 = require("../../lib/is_object.js"); +async function generalDecrypt(jwe, key, options) { + if (!(0, is_object_js_1.default)(jwe)) { + throw new errors_js_1.JWEInvalid('General JWE must be an object'); + } + if (!Array.isArray(jwe.recipients) || !jwe.recipients.every(is_object_js_1.default)) { + throw new errors_js_1.JWEInvalid('JWE Recipients missing or incorrect type'); + } + if (!jwe.recipients.length) { + throw new errors_js_1.JWEInvalid('JWE Recipients has no members'); + } + for (const recipient of jwe.recipients) { + try { + return await (0, decrypt_js_1.flattenedDecrypt)({ + aad: jwe.aad, + ciphertext: jwe.ciphertext, + encrypted_key: recipient.encrypted_key, + header: recipient.header, + iv: jwe.iv, + protected: jwe.protected, + tag: jwe.tag, + unprotected: jwe.unprotected, + }, key, options); + } + catch { + } + } + throw new errors_js_1.JWEDecryptionFailed(); +} +exports.generalDecrypt = generalDecrypt; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js b/webapp/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..3caa084eda3b39c31d6fe241702bf2c3086b2d1c --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js @@ -0,0 +1,182 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GeneralEncrypt = void 0; +const encrypt_js_1 = require("../flattened/encrypt.js"); +const errors_js_1 = require("../../util/errors.js"); +const cek_js_1 = require("../../lib/cek.js"); +const is_disjoint_js_1 = require("../../lib/is_disjoint.js"); +const encrypt_key_management_js_1 = require("../../lib/encrypt_key_management.js"); +const base64url_js_1 = require("../../runtime/base64url.js"); +const validate_crit_js_1 = require("../../lib/validate_crit.js"); +class IndividualRecipient { + constructor(enc, key, options) { + this.parent = enc; + this.key = key; + this.options = options; + } + setUnprotectedHeader(unprotectedHeader) { + if (this.unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this.unprotectedHeader = unprotectedHeader; + return this; + } + addRecipient(...args) { + return this.parent.addRecipient(...args); + } + encrypt(...args) { + return this.parent.encrypt(...args); + } + done() { + return this.parent; + } +} +class GeneralEncrypt { + constructor(plaintext) { + this._recipients = []; + this._plaintext = plaintext; + } + addRecipient(key, options) { + const recipient = new IndividualRecipient(this, key, { crit: options === null || options === void 0 ? void 0 : options.crit }); + this._recipients.push(recipient); + return recipient; + } + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setSharedUnprotectedHeader(sharedUnprotectedHeader) { + if (this._unprotectedHeader) { + throw new TypeError('setSharedUnprotectedHeader can only be called once'); + } + this._unprotectedHeader = sharedUnprotectedHeader; + return this; + } + setAdditionalAuthenticatedData(aad) { + this._aad = aad; + return this; + } + async encrypt(options) { + var _a, _b, _c; + if (!this._recipients.length) { + throw new errors_js_1.JWEInvalid('at least one recipient must be added'); + } + options = { deflateRaw: options === null || options === void 0 ? void 0 : options.deflateRaw }; + if (this._recipients.length === 1) { + const [recipient] = this._recipients; + const flattened = await new encrypt_js_1.FlattenedEncrypt(this._plaintext) + .setAdditionalAuthenticatedData(this._aad) + .setProtectedHeader(this._protectedHeader) + .setSharedUnprotectedHeader(this._unprotectedHeader) + .setUnprotectedHeader(recipient.unprotectedHeader) + .encrypt(recipient.key, { ...recipient.options, ...options }); + let jwe = { + ciphertext: flattened.ciphertext, + iv: flattened.iv, + recipients: [{}], + tag: flattened.tag, + }; + if (flattened.aad) + jwe.aad = flattened.aad; + if (flattened.protected) + jwe.protected = flattened.protected; + if (flattened.unprotected) + jwe.unprotected = flattened.unprotected; + if (flattened.encrypted_key) + jwe.recipients[0].encrypted_key = flattened.encrypted_key; + if (flattened.header) + jwe.recipients[0].header = flattened.header; + return jwe; + } + let enc; + for (let i = 0; i < this._recipients.length; i++) { + const recipient = this._recipients[i]; + if (!(0, is_disjoint_js_1.default)(this._protectedHeader, this._unprotectedHeader, recipient.unprotectedHeader)) { + throw new errors_js_1.JWEInvalid('JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint'); + } + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + ...recipient.unprotectedHeader, + }; + const { alg } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new errors_js_1.JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid'); + } + if (alg === 'dir' || alg === 'ECDH-ES') { + throw new errors_js_1.JWEInvalid('"dir" and "ECDH-ES" alg may only be used with a single recipient'); + } + if (typeof joseHeader.enc !== 'string' || !joseHeader.enc) { + throw new errors_js_1.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid'); + } + if (!enc) { + enc = joseHeader.enc; + } + else if (enc !== joseHeader.enc) { + throw new errors_js_1.JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients'); + } + (0, validate_crit_js_1.default)(errors_js_1.JWEInvalid, new Map(), recipient.options.crit, this._protectedHeader, joseHeader); + if (joseHeader.zip !== undefined) { + if (!this._protectedHeader || !this._protectedHeader.zip) { + throw new errors_js_1.JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected'); + } + } + } + const cek = (0, cek_js_1.default)(enc); + let jwe = { + ciphertext: '', + iv: '', + recipients: [], + tag: '', + }; + for (let i = 0; i < this._recipients.length; i++) { + const recipient = this._recipients[i]; + const target = {}; + jwe.recipients.push(target); + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + ...recipient.unprotectedHeader, + }; + const p2c = joseHeader.alg.startsWith('PBES2') ? 2048 + i : undefined; + if (i === 0) { + const flattened = await new encrypt_js_1.FlattenedEncrypt(this._plaintext) + .setAdditionalAuthenticatedData(this._aad) + .setContentEncryptionKey(cek) + .setProtectedHeader(this._protectedHeader) + .setSharedUnprotectedHeader(this._unprotectedHeader) + .setUnprotectedHeader(recipient.unprotectedHeader) + .setKeyManagementParameters({ p2c }) + .encrypt(recipient.key, { + ...recipient.options, + ...options, + [encrypt_js_1.unprotected]: true, + }); + jwe.ciphertext = flattened.ciphertext; + jwe.iv = flattened.iv; + jwe.tag = flattened.tag; + if (flattened.aad) + jwe.aad = flattened.aad; + if (flattened.protected) + jwe.protected = flattened.protected; + if (flattened.unprotected) + jwe.unprotected = flattened.unprotected; + target.encrypted_key = flattened.encrypted_key; + if (flattened.header) + target.header = flattened.header; + continue; + } + const { encryptedKey, parameters } = await (0, encrypt_key_management_js_1.default)(((_a = recipient.unprotectedHeader) === null || _a === void 0 ? void 0 : _a.alg) || + ((_b = this._protectedHeader) === null || _b === void 0 ? void 0 : _b.alg) || + ((_c = this._unprotectedHeader) === null || _c === void 0 ? void 0 : _c.alg), enc, recipient.key, cek, { p2c }); + target.encrypted_key = (0, base64url_js_1.encode)(encryptedKey); + if (recipient.unprotectedHeader || parameters) + target.header = { ...recipient.unprotectedHeader, ...parameters }; + } + return jwe; + } +} +exports.GeneralEncrypt = GeneralEncrypt; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwk/embedded.js b/webapp/node_modules/jose/dist/node/cjs/jwk/embedded.js new file mode 100644 index 0000000000000000000000000000000000000000..3fe1268e6884e61407de19fd97a4689450271975 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwk/embedded.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EmbeddedJWK = void 0; +const import_js_1 = require("../key/import.js"); +const is_object_js_1 = require("../lib/is_object.js"); +const errors_js_1 = require("../util/errors.js"); +async function EmbeddedJWK(protectedHeader, token) { + const joseHeader = { + ...protectedHeader, + ...token.header, + }; + if (!(0, is_object_js_1.default)(joseHeader.jwk)) { + throw new errors_js_1.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object'); + } + const key = await (0, import_js_1.importJWK)({ ...joseHeader.jwk, ext: true }, joseHeader.alg, true); + if (key instanceof Uint8Array || key.type !== 'public') { + throw new errors_js_1.JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key'); + } + return key; +} +exports.EmbeddedJWK = EmbeddedJWK; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwk/thumbprint.js b/webapp/node_modules/jose/dist/node/cjs/jwk/thumbprint.js new file mode 100644 index 0000000000000000000000000000000000000000..d50e2ba35700c8dd3eaf2a05abe12425e0cab22e --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwk/thumbprint.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.calculateJwkThumbprintUri = exports.calculateJwkThumbprint = void 0; +const digest_js_1 = require("../runtime/digest.js"); +const base64url_js_1 = require("../runtime/base64url.js"); +const errors_js_1 = require("../util/errors.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const is_object_js_1 = require("../lib/is_object.js"); +const check = (value, description) => { + if (typeof value !== 'string' || !value) { + throw new errors_js_1.JWKInvalid(`${description} missing or invalid`); + } +}; +async function calculateJwkThumbprint(jwk, digestAlgorithm) { + if (!(0, is_object_js_1.default)(jwk)) { + throw new TypeError('JWK must be an object'); + } + digestAlgorithm !== null && digestAlgorithm !== void 0 ? digestAlgorithm : (digestAlgorithm = 'sha256'); + if (digestAlgorithm !== 'sha256' && + digestAlgorithm !== 'sha384' && + digestAlgorithm !== 'sha512') { + throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"'); + } + let components; + switch (jwk.kty) { + case 'EC': + check(jwk.crv, '"crv" (Curve) Parameter'); + check(jwk.x, '"x" (X Coordinate) Parameter'); + check(jwk.y, '"y" (Y Coordinate) Parameter'); + components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y }; + break; + case 'OKP': + check(jwk.crv, '"crv" (Subtype of Key Pair) Parameter'); + check(jwk.x, '"x" (Public Key) Parameter'); + components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x }; + break; + case 'RSA': + check(jwk.e, '"e" (Exponent) Parameter'); + check(jwk.n, '"n" (Modulus) Parameter'); + components = { e: jwk.e, kty: jwk.kty, n: jwk.n }; + break; + case 'oct': + check(jwk.k, '"k" (Key Value) Parameter'); + components = { k: jwk.k, kty: jwk.kty }; + break; + default: + throw new errors_js_1.JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported'); + } + const data = buffer_utils_js_1.encoder.encode(JSON.stringify(components)); + return (0, base64url_js_1.encode)(await (0, digest_js_1.default)(digestAlgorithm, data)); +} +exports.calculateJwkThumbprint = calculateJwkThumbprint; +async function calculateJwkThumbprintUri(jwk, digestAlgorithm) { + digestAlgorithm !== null && digestAlgorithm !== void 0 ? digestAlgorithm : (digestAlgorithm = 'sha256'); + const thumbprint = await calculateJwkThumbprint(jwk, digestAlgorithm); + return `urn:ietf:params:oauth:jwk-thumbprint:sha-${digestAlgorithm.slice(-3)}:${thumbprint}`; +} +exports.calculateJwkThumbprintUri = calculateJwkThumbprintUri; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwks/local.js b/webapp/node_modules/jose/dist/node/cjs/jwks/local.js new file mode 100644 index 0000000000000000000000000000000000000000..21817f06589ed996c7964e8be17412ea70fc28d4 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwks/local.js @@ -0,0 +1,104 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createLocalJWKSet = exports.LocalJWKSet = exports.isJWKSLike = void 0; +const import_js_1 = require("../key/import.js"); +const errors_js_1 = require("../util/errors.js"); +const is_object_js_1 = require("../lib/is_object.js"); +function getKtyFromAlg(alg) { + switch (typeof alg === 'string' && alg.slice(0, 2)) { + case 'RS': + case 'PS': + return 'RSA'; + case 'ES': + return 'EC'; + case 'Ed': + return 'OKP'; + default: + throw new errors_js_1.JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set'); + } +} +function isJWKSLike(jwks) { + return (jwks && + typeof jwks === 'object' && + Array.isArray(jwks.keys) && + jwks.keys.every(isJWKLike)); +} +exports.isJWKSLike = isJWKSLike; +function isJWKLike(key) { + return (0, is_object_js_1.default)(key); +} +function clone(obj) { + if (typeof structuredClone === 'function') { + return structuredClone(obj); + } + return JSON.parse(JSON.stringify(obj)); +} +class LocalJWKSet { + constructor(jwks) { + this._cached = new WeakMap(); + if (!isJWKSLike(jwks)) { + throw new errors_js_1.JWKSInvalid('JSON Web Key Set malformed'); + } + this._jwks = clone(jwks); + } + async getKey(protectedHeader, token) { + const { alg, kid } = { ...protectedHeader, ...token.header }; + const kty = getKtyFromAlg(alg); + const candidates = this._jwks.keys.filter((jwk) => { + let candidate = kty === jwk.kty; + if (candidate && typeof kid === 'string') { + candidate = kid === jwk.kid; + } + if (candidate && typeof jwk.alg === 'string') { + candidate = alg === jwk.alg; + } + if (candidate && typeof jwk.use === 'string') { + candidate = jwk.use === 'sig'; + } + if (candidate && Array.isArray(jwk.key_ops)) { + candidate = jwk.key_ops.includes('verify'); + } + if (candidate && alg === 'EdDSA') { + candidate = jwk.crv === 'Ed25519' || jwk.crv === 'Ed448'; + } + if (candidate) { + switch (alg) { + case 'ES256': + candidate = jwk.crv === 'P-256'; + break; + case 'ES256K': + candidate = jwk.crv === 'secp256k1'; + break; + case 'ES384': + candidate = jwk.crv === 'P-384'; + break; + case 'ES512': + candidate = jwk.crv === 'P-521'; + break; + } + } + return candidate; + }); + const { 0: jwk, length } = candidates; + if (length === 0) { + throw new errors_js_1.JWKSNoMatchingKey(); + } + else if (length !== 1) { + throw new errors_js_1.JWKSMultipleMatchingKeys(); + } + const cached = this._cached.get(jwk) || this._cached.set(jwk, {}).get(jwk); + if (cached[alg] === undefined) { + const keyObject = await (0, import_js_1.importJWK)({ ...jwk, ext: true }, alg); + if (keyObject instanceof Uint8Array || keyObject.type !== 'public') { + throw new errors_js_1.JWKSInvalid('JSON Web Key Set members must be public keys'); + } + cached[alg] = keyObject; + } + return cached[alg]; + } +} +exports.LocalJWKSet = LocalJWKSet; +function createLocalJWKSet(jwks) { + return LocalJWKSet.prototype.getKey.bind(new LocalJWKSet(jwks)); +} +exports.createLocalJWKSet = createLocalJWKSet; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwks/remote.js b/webapp/node_modules/jose/dist/node/cjs/jwks/remote.js new file mode 100644 index 0000000000000000000000000000000000000000..79794cdee17f5dfae444eba308a7c447ed076d06 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwks/remote.js @@ -0,0 +1,85 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createRemoteJWKSet = void 0; +const fetch_jwks_js_1 = require("../runtime/fetch_jwks.js"); +const env_js_1 = require("../runtime/env.js"); +const errors_js_1 = require("../util/errors.js"); +const local_js_1 = require("./local.js"); +class RemoteJWKSet extends local_js_1.LocalJWKSet { + constructor(url, options) { + super({ keys: [] }); + this._jwks = undefined; + if (!(url instanceof URL)) { + throw new TypeError('url must be an instance of URL'); + } + this._url = new URL(url.href); + this._options = { agent: options === null || options === void 0 ? void 0 : options.agent, headers: options === null || options === void 0 ? void 0 : options.headers }; + this._timeoutDuration = + typeof (options === null || options === void 0 ? void 0 : options.timeoutDuration) === 'number' ? options === null || options === void 0 ? void 0 : options.timeoutDuration : 5000; + this._cooldownDuration = + typeof (options === null || options === void 0 ? void 0 : options.cooldownDuration) === 'number' ? options === null || options === void 0 ? void 0 : options.cooldownDuration : 30000; + this._cacheMaxAge = typeof (options === null || options === void 0 ? void 0 : options.cacheMaxAge) === 'number' ? options === null || options === void 0 ? void 0 : options.cacheMaxAge : 600000; + } + coolingDown() { + return typeof this._jwksTimestamp === 'number' + ? Date.now() < this._jwksTimestamp + this._cooldownDuration + : false; + } + fresh() { + return typeof this._jwksTimestamp === 'number' + ? Date.now() < this._jwksTimestamp + this._cacheMaxAge + : false; + } + async getKey(protectedHeader, token) { + if (!this._jwks || !this.fresh()) { + await this.reload(); + } + try { + return await super.getKey(protectedHeader, token); + } + catch (err) { + if (err instanceof errors_js_1.JWKSNoMatchingKey) { + if (this.coolingDown() === false) { + await this.reload(); + return super.getKey(protectedHeader, token); + } + } + throw err; + } + } + async reload() { + if (this._pendingFetch && (0, env_js_1.isCloudflareWorkers)()) { + return new Promise((resolve) => { + const isDone = () => { + if (this._pendingFetch === undefined) { + resolve(); + } + else { + setTimeout(isDone, 5); + } + }; + isDone(); + }); + } + if (!this._pendingFetch) { + this._pendingFetch = (0, fetch_jwks_js_1.default)(this._url, this._timeoutDuration, this._options) + .then((json) => { + if (!(0, local_js_1.isJWKSLike)(json)) { + throw new errors_js_1.JWKSInvalid('JSON Web Key Set malformed'); + } + this._jwks = { keys: json.keys }; + this._jwksTimestamp = Date.now(); + this._pendingFetch = undefined; + }) + .catch((err) => { + this._pendingFetch = undefined; + throw err; + }); + } + await this._pendingFetch; + } +} +function createRemoteJWKSet(url, options) { + return RemoteJWKSet.prototype.getKey.bind(new RemoteJWKSet(url, options)); +} +exports.createRemoteJWKSet = createRemoteJWKSet; diff --git a/webapp/node_modules/jose/dist/node/cjs/jws/compact/sign.js b/webapp/node_modules/jose/dist/node/cjs/jws/compact/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..e960ade473813d12e2f478ef16dadd7fd688cee9 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jws/compact/sign.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CompactSign = void 0; +const sign_js_1 = require("../flattened/sign.js"); +class CompactSign { + constructor(payload) { + this._flattened = new sign_js_1.FlattenedSign(payload); + } + setProtectedHeader(protectedHeader) { + this._flattened.setProtectedHeader(protectedHeader); + return this; + } + async sign(key, options) { + const jws = await this._flattened.sign(key, options); + if (jws.payload === undefined) { + throw new TypeError('use the flattened module for creating JWS with b64: false'); + } + return `${jws.protected}.${jws.payload}.${jws.signature}`; + } +} +exports.CompactSign = CompactSign; diff --git a/webapp/node_modules/jose/dist/node/cjs/jws/compact/verify.js b/webapp/node_modules/jose/dist/node/cjs/jws/compact/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..b7e672477f8f849c96c830f5e4431c71523c1e23 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jws/compact/verify.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.compactVerify = void 0; +const verify_js_1 = require("../flattened/verify.js"); +const errors_js_1 = require("../../util/errors.js"); +const buffer_utils_js_1 = require("../../lib/buffer_utils.js"); +async function compactVerify(jws, key, options) { + if (jws instanceof Uint8Array) { + jws = buffer_utils_js_1.decoder.decode(jws); + } + if (typeof jws !== 'string') { + throw new errors_js_1.JWSInvalid('Compact JWS must be a string or Uint8Array'); + } + const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split('.'); + if (length !== 3) { + throw new errors_js_1.JWSInvalid('Invalid Compact JWS'); + } + const verified = await (0, verify_js_1.flattenedVerify)({ payload, protected: protectedHeader, signature }, key, options); + const result = { payload: verified.payload, protectedHeader: verified.protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: verified.key }; + } + return result; +} +exports.compactVerify = compactVerify; diff --git a/webapp/node_modules/jose/dist/node/cjs/jws/flattened/sign.js b/webapp/node_modules/jose/dist/node/cjs/jws/flattened/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..2281e97cf308b1320f00c632b8e7ac607fa77d51 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jws/flattened/sign.js @@ -0,0 +1,85 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FlattenedSign = void 0; +const base64url_js_1 = require("../../runtime/base64url.js"); +const sign_js_1 = require("../../runtime/sign.js"); +const is_disjoint_js_1 = require("../../lib/is_disjoint.js"); +const errors_js_1 = require("../../util/errors.js"); +const buffer_utils_js_1 = require("../../lib/buffer_utils.js"); +const check_key_type_js_1 = require("../../lib/check_key_type.js"); +const validate_crit_js_1 = require("../../lib/validate_crit.js"); +class FlattenedSign { + constructor(payload) { + if (!(payload instanceof Uint8Array)) { + throw new TypeError('payload must be an instance of Uint8Array'); + } + this._payload = payload; + } + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + if (this._unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this._unprotectedHeader = unprotectedHeader; + return this; + } + async sign(key, options) { + if (!this._protectedHeader && !this._unprotectedHeader) { + throw new errors_js_1.JWSInvalid('either setProtectedHeader or setUnprotectedHeader must be called before #sign()'); + } + if (!(0, is_disjoint_js_1.default)(this._protectedHeader, this._unprotectedHeader)) { + throw new errors_js_1.JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint'); + } + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + }; + const extensions = (0, validate_crit_js_1.default)(errors_js_1.JWSInvalid, new Map([['b64', true]]), options === null || options === void 0 ? void 0 : options.crit, this._protectedHeader, joseHeader); + let b64 = true; + if (extensions.has('b64')) { + b64 = this._protectedHeader.b64; + if (typeof b64 !== 'boolean') { + throw new errors_js_1.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new errors_js_1.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + (0, check_key_type_js_1.default)(alg, key, 'sign'); + let payload = this._payload; + if (b64) { + payload = buffer_utils_js_1.encoder.encode((0, base64url_js_1.encode)(payload)); + } + let protectedHeader; + if (this._protectedHeader) { + protectedHeader = buffer_utils_js_1.encoder.encode((0, base64url_js_1.encode)(JSON.stringify(this._protectedHeader))); + } + else { + protectedHeader = buffer_utils_js_1.encoder.encode(''); + } + const data = (0, buffer_utils_js_1.concat)(protectedHeader, buffer_utils_js_1.encoder.encode('.'), payload); + const signature = await (0, sign_js_1.default)(alg, key, data); + const jws = { + signature: (0, base64url_js_1.encode)(signature), + payload: '', + }; + if (b64) { + jws.payload = buffer_utils_js_1.decoder.decode(payload); + } + if (this._unprotectedHeader) { + jws.header = this._unprotectedHeader; + } + if (this._protectedHeader) { + jws.protected = buffer_utils_js_1.decoder.decode(protectedHeader); + } + return jws; + } +} +exports.FlattenedSign = FlattenedSign; diff --git a/webapp/node_modules/jose/dist/node/cjs/jws/flattened/verify.js b/webapp/node_modules/jose/dist/node/cjs/jws/flattened/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..5f0c3930e17e7b9f98632e9373aa0afa1dfcdff7 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jws/flattened/verify.js @@ -0,0 +1,108 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.flattenedVerify = void 0; +const base64url_js_1 = require("../../runtime/base64url.js"); +const verify_js_1 = require("../../runtime/verify.js"); +const errors_js_1 = require("../../util/errors.js"); +const buffer_utils_js_1 = require("../../lib/buffer_utils.js"); +const is_disjoint_js_1 = require("../../lib/is_disjoint.js"); +const is_object_js_1 = require("../../lib/is_object.js"); +const check_key_type_js_1 = require("../../lib/check_key_type.js"); +const validate_crit_js_1 = require("../../lib/validate_crit.js"); +const validate_algorithms_js_1 = require("../../lib/validate_algorithms.js"); +async function flattenedVerify(jws, key, options) { + var _a; + if (!(0, is_object_js_1.default)(jws)) { + throw new errors_js_1.JWSInvalid('Flattened JWS must be an object'); + } + if (jws.protected === undefined && jws.header === undefined) { + throw new errors_js_1.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members'); + } + if (jws.protected !== undefined && typeof jws.protected !== 'string') { + throw new errors_js_1.JWSInvalid('JWS Protected Header incorrect type'); + } + if (jws.payload === undefined) { + throw new errors_js_1.JWSInvalid('JWS Payload missing'); + } + if (typeof jws.signature !== 'string') { + throw new errors_js_1.JWSInvalid('JWS Signature missing or incorrect type'); + } + if (jws.header !== undefined && !(0, is_object_js_1.default)(jws.header)) { + throw new errors_js_1.JWSInvalid('JWS Unprotected Header incorrect type'); + } + let parsedProt = {}; + if (jws.protected) { + try { + const protectedHeader = (0, base64url_js_1.decode)(jws.protected); + parsedProt = JSON.parse(buffer_utils_js_1.decoder.decode(protectedHeader)); + } + catch { + throw new errors_js_1.JWSInvalid('JWS Protected Header is invalid'); + } + } + if (!(0, is_disjoint_js_1.default)(parsedProt, jws.header)) { + throw new errors_js_1.JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint'); + } + const joseHeader = { + ...parsedProt, + ...jws.header, + }; + const extensions = (0, validate_crit_js_1.default)(errors_js_1.JWSInvalid, new Map([['b64', true]]), options === null || options === void 0 ? void 0 : options.crit, parsedProt, joseHeader); + let b64 = true; + if (extensions.has('b64')) { + b64 = parsedProt.b64; + if (typeof b64 !== 'boolean') { + throw new errors_js_1.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new errors_js_1.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + const algorithms = options && (0, validate_algorithms_js_1.default)('algorithms', options.algorithms); + if (algorithms && !algorithms.has(alg)) { + throw new errors_js_1.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed'); + } + if (b64) { + if (typeof jws.payload !== 'string') { + throw new errors_js_1.JWSInvalid('JWS Payload must be a string'); + } + } + else if (typeof jws.payload !== 'string' && !(jws.payload instanceof Uint8Array)) { + throw new errors_js_1.JWSInvalid('JWS Payload must be a string or an Uint8Array instance'); + } + let resolvedKey = false; + if (typeof key === 'function') { + key = await key(parsedProt, jws); + resolvedKey = true; + } + (0, check_key_type_js_1.default)(alg, key, 'verify'); + const data = (0, buffer_utils_js_1.concat)(buffer_utils_js_1.encoder.encode((_a = jws.protected) !== null && _a !== void 0 ? _a : ''), buffer_utils_js_1.encoder.encode('.'), typeof jws.payload === 'string' ? buffer_utils_js_1.encoder.encode(jws.payload) : jws.payload); + const signature = (0, base64url_js_1.decode)(jws.signature); + const verified = await (0, verify_js_1.default)(alg, key, signature, data); + if (!verified) { + throw new errors_js_1.JWSSignatureVerificationFailed(); + } + let payload; + if (b64) { + payload = (0, base64url_js_1.decode)(jws.payload); + } + else if (typeof jws.payload === 'string') { + payload = buffer_utils_js_1.encoder.encode(jws.payload); + } + else { + payload = jws.payload; + } + const result = { payload }; + if (jws.protected !== undefined) { + result.protectedHeader = parsedProt; + } + if (jws.header !== undefined) { + result.unprotectedHeader = jws.header; + } + if (resolvedKey) { + return { ...result, key }; + } + return result; +} +exports.flattenedVerify = flattenedVerify; diff --git a/webapp/node_modules/jose/dist/node/cjs/jws/general/sign.js b/webapp/node_modules/jose/dist/node/cjs/jws/general/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..6a876d905b41a355a0d7d8caa44fdbc1dec869f5 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jws/general/sign.js @@ -0,0 +1,71 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GeneralSign = void 0; +const sign_js_1 = require("../flattened/sign.js"); +const errors_js_1 = require("../../util/errors.js"); +class IndividualSignature { + constructor(sig, key, options) { + this.parent = sig; + this.key = key; + this.options = options; + } + setProtectedHeader(protectedHeader) { + if (this.protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this.protectedHeader = protectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + if (this.unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this.unprotectedHeader = unprotectedHeader; + return this; + } + addSignature(...args) { + return this.parent.addSignature(...args); + } + sign(...args) { + return this.parent.sign(...args); + } + done() { + return this.parent; + } +} +class GeneralSign { + constructor(payload) { + this._signatures = []; + this._payload = payload; + } + addSignature(key, options) { + const signature = new IndividualSignature(this, key, options); + this._signatures.push(signature); + return signature; + } + async sign() { + if (!this._signatures.length) { + throw new errors_js_1.JWSInvalid('at least one signature must be added'); + } + const jws = { + signatures: [], + payload: '', + }; + for (let i = 0; i < this._signatures.length; i++) { + const signature = this._signatures[i]; + const flattened = new sign_js_1.FlattenedSign(this._payload); + flattened.setProtectedHeader(signature.protectedHeader); + flattened.setUnprotectedHeader(signature.unprotectedHeader); + const { payload, ...rest } = await flattened.sign(signature.key, signature.options); + if (i === 0) { + jws.payload = payload; + } + else if (jws.payload !== payload) { + throw new errors_js_1.JWSInvalid('inconsistent use of JWS Unencoded Payload Option (RFC7797)'); + } + jws.signatures.push(rest); + } + return jws; + } +} +exports.GeneralSign = GeneralSign; diff --git a/webapp/node_modules/jose/dist/node/cjs/jws/general/verify.js b/webapp/node_modules/jose/dist/node/cjs/jws/general/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..9d4a07a296e76dc1da61367f0522268b32fdaccd --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jws/general/verify.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generalVerify = void 0; +const verify_js_1 = require("../flattened/verify.js"); +const errors_js_1 = require("../../util/errors.js"); +const is_object_js_1 = require("../../lib/is_object.js"); +async function generalVerify(jws, key, options) { + if (!(0, is_object_js_1.default)(jws)) { + throw new errors_js_1.JWSInvalid('General JWS must be an object'); + } + if (!Array.isArray(jws.signatures) || !jws.signatures.every(is_object_js_1.default)) { + throw new errors_js_1.JWSInvalid('JWS Signatures missing or incorrect type'); + } + for (const signature of jws.signatures) { + try { + return await (0, verify_js_1.flattenedVerify)({ + header: signature.header, + payload: jws.payload, + protected: signature.protected, + signature: signature.signature, + }, key, options); + } + catch { + } + } + throw new errors_js_1.JWSSignatureVerificationFailed(); +} +exports.generalVerify = generalVerify; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwt/decrypt.js b/webapp/node_modules/jose/dist/node/cjs/jwt/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..3539ceab536db3067f9e961ca90f69126bbcc994 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwt/decrypt.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.jwtDecrypt = void 0; +const decrypt_js_1 = require("../jwe/compact/decrypt.js"); +const jwt_claims_set_js_1 = require("../lib/jwt_claims_set.js"); +const errors_js_1 = require("../util/errors.js"); +async function jwtDecrypt(jwt, key, options) { + const decrypted = await (0, decrypt_js_1.compactDecrypt)(jwt, key, options); + const payload = (0, jwt_claims_set_js_1.default)(decrypted.protectedHeader, decrypted.plaintext, options); + const { protectedHeader } = decrypted; + if (protectedHeader.iss !== undefined && protectedHeader.iss !== payload.iss) { + throw new errors_js_1.JWTClaimValidationFailed('replicated "iss" claim header parameter mismatch', 'iss', 'mismatch'); + } + if (protectedHeader.sub !== undefined && protectedHeader.sub !== payload.sub) { + throw new errors_js_1.JWTClaimValidationFailed('replicated "sub" claim header parameter mismatch', 'sub', 'mismatch'); + } + if (protectedHeader.aud !== undefined && + JSON.stringify(protectedHeader.aud) !== JSON.stringify(payload.aud)) { + throw new errors_js_1.JWTClaimValidationFailed('replicated "aud" claim header parameter mismatch', 'aud', 'mismatch'); + } + const result = { payload, protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: decrypted.key }; + } + return result; +} +exports.jwtDecrypt = jwtDecrypt; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwt/encrypt.js b/webapp/node_modules/jose/dist/node/cjs/jwt/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..8ce18f1e731a5b3925d9a4179a35afb144ec2498 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwt/encrypt.js @@ -0,0 +1,72 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EncryptJWT = void 0; +const encrypt_js_1 = require("../jwe/compact/encrypt.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const produce_js_1 = require("./produce.js"); +class EncryptJWT extends produce_js_1.ProduceJWT { + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setKeyManagementParameters(parameters) { + if (this._keyManagementParameters) { + throw new TypeError('setKeyManagementParameters can only be called once'); + } + this._keyManagementParameters = parameters; + return this; + } + setContentEncryptionKey(cek) { + if (this._cek) { + throw new TypeError('setContentEncryptionKey can only be called once'); + } + this._cek = cek; + return this; + } + setInitializationVector(iv) { + if (this._iv) { + throw new TypeError('setInitializationVector can only be called once'); + } + this._iv = iv; + return this; + } + replicateIssuerAsHeader() { + this._replicateIssuerAsHeader = true; + return this; + } + replicateSubjectAsHeader() { + this._replicateSubjectAsHeader = true; + return this; + } + replicateAudienceAsHeader() { + this._replicateAudienceAsHeader = true; + return this; + } + async encrypt(key, options) { + const enc = new encrypt_js_1.CompactEncrypt(buffer_utils_js_1.encoder.encode(JSON.stringify(this._payload))); + if (this._replicateIssuerAsHeader) { + this._protectedHeader = { ...this._protectedHeader, iss: this._payload.iss }; + } + if (this._replicateSubjectAsHeader) { + this._protectedHeader = { ...this._protectedHeader, sub: this._payload.sub }; + } + if (this._replicateAudienceAsHeader) { + this._protectedHeader = { ...this._protectedHeader, aud: this._payload.aud }; + } + enc.setProtectedHeader(this._protectedHeader); + if (this._iv) { + enc.setInitializationVector(this._iv); + } + if (this._cek) { + enc.setContentEncryptionKey(this._cek); + } + if (this._keyManagementParameters) { + enc.setKeyManagementParameters(this._keyManagementParameters); + } + return enc.encrypt(key, options); + } +} +exports.EncryptJWT = EncryptJWT; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwt/produce.js b/webapp/node_modules/jose/dist/node/cjs/jwt/produce.js new file mode 100644 index 0000000000000000000000000000000000000000..54d9ccb134efce60d93097c0a17aed5869d268b0 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwt/produce.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProduceJWT = void 0; +const epoch_js_1 = require("../lib/epoch.js"); +const is_object_js_1 = require("../lib/is_object.js"); +const secs_js_1 = require("../lib/secs.js"); +class ProduceJWT { + constructor(payload) { + if (!(0, is_object_js_1.default)(payload)) { + throw new TypeError('JWT Claims Set MUST be an object'); + } + this._payload = payload; + } + setIssuer(issuer) { + this._payload = { ...this._payload, iss: issuer }; + return this; + } + setSubject(subject) { + this._payload = { ...this._payload, sub: subject }; + return this; + } + setAudience(audience) { + this._payload = { ...this._payload, aud: audience }; + return this; + } + setJti(jwtId) { + this._payload = { ...this._payload, jti: jwtId }; + return this; + } + setNotBefore(input) { + if (typeof input === 'number') { + this._payload = { ...this._payload, nbf: input }; + } + else { + this._payload = { ...this._payload, nbf: (0, epoch_js_1.default)(new Date()) + (0, secs_js_1.default)(input) }; + } + return this; + } + setExpirationTime(input) { + if (typeof input === 'number') { + this._payload = { ...this._payload, exp: input }; + } + else { + this._payload = { ...this._payload, exp: (0, epoch_js_1.default)(new Date()) + (0, secs_js_1.default)(input) }; + } + return this; + } + setIssuedAt(input) { + if (typeof input === 'undefined') { + this._payload = { ...this._payload, iat: (0, epoch_js_1.default)(new Date()) }; + } + else { + this._payload = { ...this._payload, iat: input }; + } + return this; + } +} +exports.ProduceJWT = ProduceJWT; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwt/sign.js b/webapp/node_modules/jose/dist/node/cjs/jwt/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..ad9193c13a59df1a9cf2bcde45109f84f815a9ce --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwt/sign.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SignJWT = void 0; +const sign_js_1 = require("../jws/compact/sign.js"); +const errors_js_1 = require("../util/errors.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const produce_js_1 = require("./produce.js"); +class SignJWT extends produce_js_1.ProduceJWT { + setProtectedHeader(protectedHeader) { + this._protectedHeader = protectedHeader; + return this; + } + async sign(key, options) { + var _a; + const sig = new sign_js_1.CompactSign(buffer_utils_js_1.encoder.encode(JSON.stringify(this._payload))); + sig.setProtectedHeader(this._protectedHeader); + if (Array.isArray((_a = this._protectedHeader) === null || _a === void 0 ? void 0 : _a.crit) && + this._protectedHeader.crit.includes('b64') && + this._protectedHeader.b64 === false) { + throw new errors_js_1.JWTInvalid('JWTs MUST NOT use unencoded payload'); + } + return sig.sign(key, options); + } +} +exports.SignJWT = SignJWT; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwt/unsecured.js b/webapp/node_modules/jose/dist/node/cjs/jwt/unsecured.js new file mode 100644 index 0000000000000000000000000000000000000000..482782fed1c2cecb862387376a15783fce5c18be --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwt/unsecured.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UnsecuredJWT = void 0; +const base64url = require("../runtime/base64url.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const errors_js_1 = require("../util/errors.js"); +const jwt_claims_set_js_1 = require("../lib/jwt_claims_set.js"); +const produce_js_1 = require("./produce.js"); +class UnsecuredJWT extends produce_js_1.ProduceJWT { + encode() { + const header = base64url.encode(JSON.stringify({ alg: 'none' })); + const payload = base64url.encode(JSON.stringify(this._payload)); + return `${header}.${payload}.`; + } + static decode(jwt, options) { + if (typeof jwt !== 'string') { + throw new errors_js_1.JWTInvalid('Unsecured JWT must be a string'); + } + const { 0: encodedHeader, 1: encodedPayload, 2: signature, length } = jwt.split('.'); + if (length !== 3 || signature !== '') { + throw new errors_js_1.JWTInvalid('Invalid Unsecured JWT'); + } + let header; + try { + header = JSON.parse(buffer_utils_js_1.decoder.decode(base64url.decode(encodedHeader))); + if (header.alg !== 'none') + throw new Error(); + } + catch { + throw new errors_js_1.JWTInvalid('Invalid Unsecured JWT'); + } + const payload = (0, jwt_claims_set_js_1.default)(header, base64url.decode(encodedPayload), options); + return { payload, header }; + } +} +exports.UnsecuredJWT = UnsecuredJWT; diff --git a/webapp/node_modules/jose/dist/node/cjs/jwt/verify.js b/webapp/node_modules/jose/dist/node/cjs/jwt/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..d77bb960964363046230bf2b788aefb222e7a018 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/jwt/verify.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.jwtVerify = void 0; +const verify_js_1 = require("../jws/compact/verify.js"); +const jwt_claims_set_js_1 = require("../lib/jwt_claims_set.js"); +const errors_js_1 = require("../util/errors.js"); +async function jwtVerify(jwt, key, options) { + var _a; + const verified = await (0, verify_js_1.compactVerify)(jwt, key, options); + if (((_a = verified.protectedHeader.crit) === null || _a === void 0 ? void 0 : _a.includes('b64')) && verified.protectedHeader.b64 === false) { + throw new errors_js_1.JWTInvalid('JWTs MUST NOT use unencoded payload'); + } + const payload = (0, jwt_claims_set_js_1.default)(verified.protectedHeader, verified.payload, options); + const result = { payload, protectedHeader: verified.protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: verified.key }; + } + return result; +} +exports.jwtVerify = jwtVerify; diff --git a/webapp/node_modules/jose/dist/node/cjs/key/export.js b/webapp/node_modules/jose/dist/node/cjs/key/export.js new file mode 100644 index 0000000000000000000000000000000000000000..1c083efe72bf81416ed7ec0bc7483827add627c0 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/key/export.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.exportJWK = exports.exportPKCS8 = exports.exportSPKI = void 0; +const asn1_js_1 = require("../runtime/asn1.js"); +const asn1_js_2 = require("../runtime/asn1.js"); +const key_to_jwk_js_1 = require("../runtime/key_to_jwk.js"); +async function exportSPKI(key) { + return (0, asn1_js_1.toSPKI)(key); +} +exports.exportSPKI = exportSPKI; +async function exportPKCS8(key) { + return (0, asn1_js_2.toPKCS8)(key); +} +exports.exportPKCS8 = exportPKCS8; +async function exportJWK(key) { + return (0, key_to_jwk_js_1.default)(key); +} +exports.exportJWK = exportJWK; diff --git a/webapp/node_modules/jose/dist/node/cjs/key/generate_key_pair.js b/webapp/node_modules/jose/dist/node/cjs/key/generate_key_pair.js new file mode 100644 index 0000000000000000000000000000000000000000..3d14da5c3ec657f644d2ca064dcd5005bf1cb9d4 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/key/generate_key_pair.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generateKeyPair = void 0; +const generate_js_1 = require("../runtime/generate.js"); +async function generateKeyPair(alg, options) { + return (0, generate_js_1.generateKeyPair)(alg, options); +} +exports.generateKeyPair = generateKeyPair; diff --git a/webapp/node_modules/jose/dist/node/cjs/key/generate_secret.js b/webapp/node_modules/jose/dist/node/cjs/key/generate_secret.js new file mode 100644 index 0000000000000000000000000000000000000000..5f3c9ba21426025507f7f46fe12e4f49b198fa31 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/key/generate_secret.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generateSecret = void 0; +const generate_js_1 = require("../runtime/generate.js"); +async function generateSecret(alg, options) { + return (0, generate_js_1.generateSecret)(alg, options); +} +exports.generateSecret = generateSecret; diff --git a/webapp/node_modules/jose/dist/node/cjs/key/import.js b/webapp/node_modules/jose/dist/node/cjs/key/import.js new file mode 100644 index 0000000000000000000000000000000000000000..9736dbc18a6830c63d8ac81d3f552b2c63110c78 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/key/import.js @@ -0,0 +1,127 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.importJWK = exports.importPKCS8 = exports.importX509 = exports.importSPKI = void 0; +const base64url_js_1 = require("../runtime/base64url.js"); +const asn1_js_1 = require("../runtime/asn1.js"); +const asn1_js_2 = require("../runtime/asn1.js"); +const jwk_to_key_js_1 = require("../runtime/jwk_to_key.js"); +const errors_js_1 = require("../util/errors.js"); +const format_pem_js_1 = require("../lib/format_pem.js"); +const is_object_js_1 = require("../lib/is_object.js"); +function getElement(seq) { + let result = []; + let next = 0; + while (next < seq.length) { + let nextPart = parseElement(seq.subarray(next)); + result.push(nextPart); + next += nextPart.byteLength; + } + return result; +} +function parseElement(bytes) { + let position = 0; + let tag = bytes[0] & 0x1f; + position++; + if (tag === 0x1f) { + tag = 0; + while (bytes[position] >= 0x80) { + tag = tag * 128 + bytes[position] - 0x80; + position++; + } + tag = tag * 128 + bytes[position] - 0x80; + position++; + } + let length = 0; + if (bytes[position] < 0x80) { + length = bytes[position]; + position++; + } + else { + let numberOfDigits = bytes[position] & 0x7f; + position++; + length = 0; + for (let i = 0; i < numberOfDigits; i++) { + length = length * 256 + bytes[position]; + position++; + } + } + if (length === 0x80) { + length = 0; + while (bytes[position + length] !== 0 || bytes[position + length + 1] !== 0) { + length++; + } + const byteLength = position + length + 2; + return { + byteLength, + contents: bytes.subarray(position, position + length), + raw: bytes.subarray(0, byteLength), + }; + } + const byteLength = position + length; + return { + byteLength, + contents: bytes.subarray(position, byteLength), + raw: bytes.subarray(0, byteLength), + }; +} +function spkiFromX509(buf) { + const tbsCertificate = getElement(getElement(parseElement(buf).contents)[0].contents); + return (0, base64url_js_1.encodeBase64)(tbsCertificate[tbsCertificate[0].raw[0] === 0xa0 ? 6 : 5].raw); +} +function getSPKI(x509) { + const pem = x509.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g, ''); + const raw = (0, base64url_js_1.decodeBase64)(pem); + return (0, format_pem_js_1.default)(spkiFromX509(raw), 'PUBLIC KEY'); +} +async function importSPKI(spki, alg, options) { + if (typeof spki !== 'string' || spki.indexOf('-----BEGIN PUBLIC KEY-----') !== 0) { + throw new TypeError('"spki" must be SPKI formatted string'); + } + return (0, asn1_js_1.fromSPKI)(spki, alg, options); +} +exports.importSPKI = importSPKI; +async function importX509(x509, alg, options) { + if (typeof x509 !== 'string' || x509.indexOf('-----BEGIN CERTIFICATE-----') !== 0) { + throw new TypeError('"x509" must be X.509 formatted string'); + } + const spki = getSPKI(x509); + return (0, asn1_js_1.fromSPKI)(spki, alg, options); +} +exports.importX509 = importX509; +async function importPKCS8(pkcs8, alg, options) { + if (typeof pkcs8 !== 'string' || pkcs8.indexOf('-----BEGIN PRIVATE KEY-----') !== 0) { + throw new TypeError('"pkcs8" must be PCKS8 formatted string'); + } + return (0, asn1_js_2.fromPKCS8)(pkcs8, alg, options); +} +exports.importPKCS8 = importPKCS8; +async function importJWK(jwk, alg, octAsKeyObject) { + if (!(0, is_object_js_1.default)(jwk)) { + throw new TypeError('JWK must be an object'); + } + alg || (alg = jwk.alg); + if (typeof alg !== 'string' || !alg) { + throw new TypeError('"alg" argument is required when "jwk.alg" is not present'); + } + switch (jwk.kty) { + case 'oct': + if (typeof jwk.k !== 'string' || !jwk.k) { + throw new TypeError('missing "k" (Key Value) Parameter value'); + } + octAsKeyObject !== null && octAsKeyObject !== void 0 ? octAsKeyObject : (octAsKeyObject = jwk.ext !== true); + if (octAsKeyObject) { + return (0, jwk_to_key_js_1.default)({ ...jwk, alg, ext: false }); + } + return (0, base64url_js_1.decode)(jwk.k); + case 'RSA': + if (jwk.oth !== undefined) { + throw new errors_js_1.JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported'); + } + case 'EC': + case 'OKP': + return (0, jwk_to_key_js_1.default)({ ...jwk, alg }); + default: + throw new errors_js_1.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value'); + } +} +exports.importJWK = importJWK; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js b/webapp/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js new file mode 100644 index 0000000000000000000000000000000000000000..c3e61e8eab31cdd5bfeaff537d3f663d25fbeef4 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.unwrap = exports.wrap = void 0; +const encrypt_js_1 = require("../runtime/encrypt.js"); +const decrypt_js_1 = require("../runtime/decrypt.js"); +const iv_js_1 = require("./iv.js"); +const base64url_js_1 = require("../runtime/base64url.js"); +async function wrap(alg, key, cek, iv) { + const jweAlgorithm = alg.slice(0, 7); + iv || (iv = (0, iv_js_1.default)(jweAlgorithm)); + const { ciphertext: encryptedKey, tag } = await (0, encrypt_js_1.default)(jweAlgorithm, cek, key, iv, new Uint8Array(0)); + return { encryptedKey, iv: (0, base64url_js_1.encode)(iv), tag: (0, base64url_js_1.encode)(tag) }; +} +exports.wrap = wrap; +async function unwrap(alg, key, encryptedKey, iv, tag) { + const jweAlgorithm = alg.slice(0, 7); + return (0, decrypt_js_1.default)(jweAlgorithm, key, encryptedKey, iv, tag, new Uint8Array(0)); +} +exports.unwrap = unwrap; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/buffer_utils.js b/webapp/node_modules/jose/dist/node/cjs/lib/buffer_utils.js new file mode 100644 index 0000000000000000000000000000000000000000..7932178142f1ede796b8d8cfbd8d11a1ea8daea5 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/buffer_utils.js @@ -0,0 +1,60 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concatKdf = exports.lengthAndInput = exports.uint32be = exports.uint64be = exports.p2s = exports.concat = exports.decoder = exports.encoder = void 0; +const digest_js_1 = require("../runtime/digest.js"); +exports.encoder = new TextEncoder(); +exports.decoder = new TextDecoder(); +const MAX_INT32 = 2 ** 32; +function concat(...buffers) { + const size = buffers.reduce((acc, { length }) => acc + length, 0); + const buf = new Uint8Array(size); + let i = 0; + buffers.forEach((buffer) => { + buf.set(buffer, i); + i += buffer.length; + }); + return buf; +} +exports.concat = concat; +function p2s(alg, p2sInput) { + return concat(exports.encoder.encode(alg), new Uint8Array([0]), p2sInput); +} +exports.p2s = p2s; +function writeUInt32BE(buf, value, offset) { + if (value < 0 || value >= MAX_INT32) { + throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`); + } + buf.set([value >>> 24, value >>> 16, value >>> 8, value & 0xff], offset); +} +function uint64be(value) { + const high = Math.floor(value / MAX_INT32); + const low = value % MAX_INT32; + const buf = new Uint8Array(8); + writeUInt32BE(buf, high, 0); + writeUInt32BE(buf, low, 4); + return buf; +} +exports.uint64be = uint64be; +function uint32be(value) { + const buf = new Uint8Array(4); + writeUInt32BE(buf, value); + return buf; +} +exports.uint32be = uint32be; +function lengthAndInput(input) { + return concat(uint32be(input.length), input); +} +exports.lengthAndInput = lengthAndInput; +async function concatKdf(secret, bits, value) { + const iterations = Math.ceil((bits >> 3) / 32); + const res = new Uint8Array(iterations * 32); + for (let iter = 0; iter < iterations; iter++) { + const buf = new Uint8Array(4 + secret.length + value.length); + buf.set(uint32be(iter + 1)); + buf.set(secret, 4); + buf.set(value, 4 + secret.length); + res.set(await (0, digest_js_1.default)('sha256', buf), iter * 32); + } + return res.slice(0, bits >> 3); +} +exports.concatKdf = concatKdf; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/cek.js b/webapp/node_modules/jose/dist/node/cjs/lib/cek.js new file mode 100644 index 0000000000000000000000000000000000000000..e4a0133909299d87a6ea8afb4b0a27d6a1e65f9e --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/cek.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bitLength = void 0; +const errors_js_1 = require("../util/errors.js"); +const random_js_1 = require("../runtime/random.js"); +function bitLength(alg) { + switch (alg) { + case 'A128GCM': + return 128; + case 'A192GCM': + return 192; + case 'A256GCM': + case 'A128CBC-HS256': + return 256; + case 'A192CBC-HS384': + return 384; + case 'A256CBC-HS512': + return 512; + default: + throw new errors_js_1.JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`); + } +} +exports.bitLength = bitLength; +exports.default = (alg) => (0, random_js_1.default)(new Uint8Array(bitLength(alg) >> 3)); diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/check_iv_length.js b/webapp/node_modules/jose/dist/node/cjs/lib/check_iv_length.js new file mode 100644 index 0000000000000000000000000000000000000000..3fbee85bb01ec6db2ef46cf0f84bffe71cb8d9fd --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/check_iv_length.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const errors_js_1 = require("../util/errors.js"); +const iv_js_1 = require("./iv.js"); +const checkIvLength = (enc, iv) => { + if (iv.length << 3 !== (0, iv_js_1.bitLength)(enc)) { + throw new errors_js_1.JWEInvalid('Invalid Initialization Vector length'); + } +}; +exports.default = checkIvLength; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/check_key_type.js b/webapp/node_modules/jose/dist/node/cjs/lib/check_key_type.js new file mode 100644 index 0000000000000000000000000000000000000000..221a8e57a586cd0cb8ecec81528ef1f11bdc2739 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/check_key_type.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const invalid_key_input_js_1 = require("./invalid_key_input.js"); +const is_key_like_js_1 = require("../runtime/is_key_like.js"); +const symmetricTypeCheck = (key) => { + if (key instanceof Uint8Array) + return; + if (!(0, is_key_like_js_1.default)(key)) { + throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types, 'Uint8Array')); + } + if (key.type !== 'secret') { + throw new TypeError(`${is_key_like_js_1.types.join(' or ')} instances for symmetric algorithms must be of type "secret"`); + } +}; +const asymmetricTypeCheck = (key, usage) => { + if (!(0, is_key_like_js_1.default)(key)) { + throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types)); + } + if (key.type === 'secret') { + throw new TypeError(`${is_key_like_js_1.types.join(' or ')} instances for asymmetric algorithms must not be of type "secret"`); + } + if (usage === 'sign' && key.type === 'public') { + throw new TypeError(`${is_key_like_js_1.types.join(' or ')} instances for asymmetric algorithm signing must be of type "private"`); + } + if (usage === 'decrypt' && key.type === 'public') { + throw new TypeError(`${is_key_like_js_1.types.join(' or ')} instances for asymmetric algorithm decryption must be of type "private"`); + } + if (key.algorithm && usage === 'verify' && key.type === 'private') { + throw new TypeError(`${is_key_like_js_1.types.join(' or ')} instances for asymmetric algorithm verifying must be of type "public"`); + } + if (key.algorithm && usage === 'encrypt' && key.type === 'private') { + throw new TypeError(`${is_key_like_js_1.types.join(' or ')} instances for asymmetric algorithm encryption must be of type "public"`); + } +}; +const checkKeyType = (alg, key, usage) => { + const symmetric = alg.startsWith('HS') || + alg === 'dir' || + alg.startsWith('PBES2') || + /^A\d{3}(?:GCM)?KW$/.test(alg); + if (symmetric) { + symmetricTypeCheck(key); + } + else { + asymmetricTypeCheck(key, usage); + } +}; +exports.default = checkKeyType; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/check_p2s.js b/webapp/node_modules/jose/dist/node/cjs/lib/check_p2s.js new file mode 100644 index 0000000000000000000000000000000000000000..4bdeaa766c2005c6aaaa2a05d4c32c0ad679a8fa --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/check_p2s.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const errors_js_1 = require("../util/errors.js"); +function checkP2s(p2s) { + if (!(p2s instanceof Uint8Array) || p2s.length < 8) { + throw new errors_js_1.JWEInvalid('PBES2 Salt Input must be 8 or more octets'); + } +} +exports.default = checkP2s; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/crypto_key.js b/webapp/node_modules/jose/dist/node/cjs/lib/crypto_key.js new file mode 100644 index 0000000000000000000000000000000000000000..266d794f65f237d1da3a26b65b64d992f348f98e --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/crypto_key.js @@ -0,0 +1,150 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkEncCryptoKey = exports.checkSigCryptoKey = void 0; +const env_js_1 = require("../runtime/env.js"); +function unusable(name, prop = 'algorithm.name') { + return new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`); +} +function isAlgorithm(algorithm, name) { + return algorithm.name === name; +} +function getHashLength(hash) { + return parseInt(hash.name.slice(4), 10); +} +function getNamedCurve(alg) { + switch (alg) { + case 'ES256': + return 'P-256'; + case 'ES384': + return 'P-384'; + case 'ES512': + return 'P-521'; + default: + throw new Error('unreachable'); + } +} +function checkUsage(key, usages) { + if (usages.length && !usages.some((expected) => key.usages.includes(expected))) { + let msg = 'CryptoKey does not support this operation, its usages must include '; + if (usages.length > 2) { + const last = usages.pop(); + msg += `one of ${usages.join(', ')}, or ${last}.`; + } + else if (usages.length === 2) { + msg += `one of ${usages[0]} or ${usages[1]}.`; + } + else { + msg += `${usages[0]}.`; + } + throw new TypeError(msg); + } +} +function checkSigCryptoKey(key, alg, ...usages) { + switch (alg) { + case 'HS256': + case 'HS384': + case 'HS512': { + if (!isAlgorithm(key.algorithm, 'HMAC')) + throw unusable('HMAC'); + const expected = parseInt(alg.slice(2), 10); + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + case 'RS256': + case 'RS384': + case 'RS512': { + if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5')) + throw unusable('RSASSA-PKCS1-v1_5'); + const expected = parseInt(alg.slice(2), 10); + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + case 'PS256': + case 'PS384': + case 'PS512': { + if (!isAlgorithm(key.algorithm, 'RSA-PSS')) + throw unusable('RSA-PSS'); + const expected = parseInt(alg.slice(2), 10); + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + case (0, env_js_1.isCloudflareWorkers)() && 'EdDSA': { + if (!isAlgorithm(key.algorithm, 'NODE-ED25519')) + throw unusable('NODE-ED25519'); + break; + } + case 'ES256': + case 'ES384': + case 'ES512': { + if (!isAlgorithm(key.algorithm, 'ECDSA')) + throw unusable('ECDSA'); + const expected = getNamedCurve(alg); + const actual = key.algorithm.namedCurve; + if (actual !== expected) + throw unusable(expected, 'algorithm.namedCurve'); + break; + } + default: + throw new TypeError('CryptoKey does not support this operation'); + } + checkUsage(key, usages); +} +exports.checkSigCryptoKey = checkSigCryptoKey; +function checkEncCryptoKey(key, alg, ...usages) { + switch (alg) { + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': { + if (!isAlgorithm(key.algorithm, 'AES-GCM')) + throw unusable('AES-GCM'); + const expected = parseInt(alg.slice(1, 4), 10); + const actual = key.algorithm.length; + if (actual !== expected) + throw unusable(expected, 'algorithm.length'); + break; + } + case 'A128KW': + case 'A192KW': + case 'A256KW': { + if (!isAlgorithm(key.algorithm, 'AES-KW')) + throw unusable('AES-KW'); + const expected = parseInt(alg.slice(1, 4), 10); + const actual = key.algorithm.length; + if (actual !== expected) + throw unusable(expected, 'algorithm.length'); + break; + } + case 'ECDH': + if (!isAlgorithm(key.algorithm, 'ECDH')) + throw unusable('ECDH'); + break; + case 'PBES2-HS256+A128KW': + case 'PBES2-HS384+A192KW': + case 'PBES2-HS512+A256KW': + if (!isAlgorithm(key.algorithm, 'PBKDF2')) + throw unusable('PBKDF2'); + break; + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': { + if (!isAlgorithm(key.algorithm, 'RSA-OAEP')) + throw unusable('RSA-OAEP'); + const expected = parseInt(alg.slice(9), 10) || 1; + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + default: + throw new TypeError('CryptoKey does not support this operation'); + } + checkUsage(key, usages); +} +exports.checkEncCryptoKey = checkEncCryptoKey; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js b/webapp/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js new file mode 100644 index 0000000000000000000000000000000000000000..a7f8e4e750924abc537c0f452845e9f033145dfe --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js @@ -0,0 +1,97 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const aeskw_js_1 = require("../runtime/aeskw.js"); +const ECDH = require("../runtime/ecdhes.js"); +const pbes2kw_js_1 = require("../runtime/pbes2kw.js"); +const rsaes_js_1 = require("../runtime/rsaes.js"); +const base64url_js_1 = require("../runtime/base64url.js"); +const errors_js_1 = require("../util/errors.js"); +const cek_js_1 = require("../lib/cek.js"); +const import_js_1 = require("../key/import.js"); +const check_key_type_js_1 = require("./check_key_type.js"); +const is_object_js_1 = require("./is_object.js"); +const aesgcmkw_js_1 = require("./aesgcmkw.js"); +async function decryptKeyManagement(alg, key, encryptedKey, joseHeader) { + (0, check_key_type_js_1.default)(alg, key, 'decrypt'); + switch (alg) { + case 'dir': { + if (encryptedKey !== undefined) + throw new errors_js_1.JWEInvalid('Encountered unexpected JWE Encrypted Key'); + return key; + } + case 'ECDH-ES': + if (encryptedKey !== undefined) + throw new errors_js_1.JWEInvalid('Encountered unexpected JWE Encrypted Key'); + case 'ECDH-ES+A128KW': + case 'ECDH-ES+A192KW': + case 'ECDH-ES+A256KW': { + if (!(0, is_object_js_1.default)(joseHeader.epk)) + throw new errors_js_1.JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`); + if (!ECDH.ecdhAllowed(key)) + throw new errors_js_1.JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime'); + const epk = await (0, import_js_1.importJWK)(joseHeader.epk, alg); + let partyUInfo; + let partyVInfo; + if (joseHeader.apu !== undefined) { + if (typeof joseHeader.apu !== 'string') + throw new errors_js_1.JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`); + partyUInfo = (0, base64url_js_1.decode)(joseHeader.apu); + } + if (joseHeader.apv !== undefined) { + if (typeof joseHeader.apv !== 'string') + throw new errors_js_1.JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`); + partyVInfo = (0, base64url_js_1.decode)(joseHeader.apv); + } + const sharedSecret = await ECDH.deriveKey(epk, key, alg === 'ECDH-ES' ? joseHeader.enc : alg, alg === 'ECDH-ES' ? (0, cek_js_1.bitLength)(joseHeader.enc) : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo); + if (alg === 'ECDH-ES') + return sharedSecret; + if (encryptedKey === undefined) + throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing'); + return (0, aeskw_js_1.unwrap)(alg.slice(-6), sharedSecret, encryptedKey); + } + case 'RSA1_5': + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': { + if (encryptedKey === undefined) + throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing'); + return (0, rsaes_js_1.decrypt)(alg, key, encryptedKey); + } + case 'PBES2-HS256+A128KW': + case 'PBES2-HS384+A192KW': + case 'PBES2-HS512+A256KW': { + if (encryptedKey === undefined) + throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing'); + if (typeof joseHeader.p2c !== 'number') + throw new errors_js_1.JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`); + if (typeof joseHeader.p2s !== 'string') + throw new errors_js_1.JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`); + return (0, pbes2kw_js_1.decrypt)(alg, key, encryptedKey, joseHeader.p2c, (0, base64url_js_1.decode)(joseHeader.p2s)); + } + case 'A128KW': + case 'A192KW': + case 'A256KW': { + if (encryptedKey === undefined) + throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing'); + return (0, aeskw_js_1.unwrap)(alg, key, encryptedKey); + } + case 'A128GCMKW': + case 'A192GCMKW': + case 'A256GCMKW': { + if (encryptedKey === undefined) + throw new errors_js_1.JWEInvalid('JWE Encrypted Key missing'); + if (typeof joseHeader.iv !== 'string') + throw new errors_js_1.JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`); + if (typeof joseHeader.tag !== 'string') + throw new errors_js_1.JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`); + const iv = (0, base64url_js_1.decode)(joseHeader.iv); + const tag = (0, base64url_js_1.decode)(joseHeader.tag); + return (0, aesgcmkw_js_1.unwrap)(alg, key, encryptedKey, iv, tag); + } + default: { + throw new errors_js_1.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value'); + } + } +} +exports.default = decryptKeyManagement; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js b/webapp/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js new file mode 100644 index 0000000000000000000000000000000000000000..709364b064039f683458681d497ae5c0ee468e42 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js @@ -0,0 +1,89 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const aeskw_js_1 = require("../runtime/aeskw.js"); +const ECDH = require("../runtime/ecdhes.js"); +const pbes2kw_js_1 = require("../runtime/pbes2kw.js"); +const rsaes_js_1 = require("../runtime/rsaes.js"); +const base64url_js_1 = require("../runtime/base64url.js"); +const cek_js_1 = require("../lib/cek.js"); +const errors_js_1 = require("../util/errors.js"); +const export_js_1 = require("../key/export.js"); +const check_key_type_js_1 = require("./check_key_type.js"); +const aesgcmkw_js_1 = require("./aesgcmkw.js"); +async function encryptKeyManagement(alg, enc, key, providedCek, providedParameters = {}) { + let encryptedKey; + let parameters; + let cek; + (0, check_key_type_js_1.default)(alg, key, 'encrypt'); + switch (alg) { + case 'dir': { + cek = key; + break; + } + case 'ECDH-ES': + case 'ECDH-ES+A128KW': + case 'ECDH-ES+A192KW': + case 'ECDH-ES+A256KW': { + if (!ECDH.ecdhAllowed(key)) { + throw new errors_js_1.JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime'); + } + const { apu, apv } = providedParameters; + let { epk: ephemeralKey } = providedParameters; + ephemeralKey || (ephemeralKey = (await ECDH.generateEpk(key)).privateKey); + const { x, y, crv, kty } = await (0, export_js_1.exportJWK)(ephemeralKey); + const sharedSecret = await ECDH.deriveKey(key, ephemeralKey, alg === 'ECDH-ES' ? enc : alg, alg === 'ECDH-ES' ? (0, cek_js_1.bitLength)(enc) : parseInt(alg.slice(-5, -2), 10), apu, apv); + parameters = { epk: { x, crv, kty } }; + if (kty === 'EC') + parameters.epk.y = y; + if (apu) + parameters.apu = (0, base64url_js_1.encode)(apu); + if (apv) + parameters.apv = (0, base64url_js_1.encode)(apv); + if (alg === 'ECDH-ES') { + cek = sharedSecret; + break; + } + cek = providedCek || (0, cek_js_1.default)(enc); + const kwAlg = alg.slice(-6); + encryptedKey = await (0, aeskw_js_1.wrap)(kwAlg, sharedSecret, cek); + break; + } + case 'RSA1_5': + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': { + cek = providedCek || (0, cek_js_1.default)(enc); + encryptedKey = await (0, rsaes_js_1.encrypt)(alg, key, cek); + break; + } + case 'PBES2-HS256+A128KW': + case 'PBES2-HS384+A192KW': + case 'PBES2-HS512+A256KW': { + cek = providedCek || (0, cek_js_1.default)(enc); + const { p2c, p2s } = providedParameters; + ({ encryptedKey, ...parameters } = await (0, pbes2kw_js_1.encrypt)(alg, key, cek, p2c, p2s)); + break; + } + case 'A128KW': + case 'A192KW': + case 'A256KW': { + cek = providedCek || (0, cek_js_1.default)(enc); + encryptedKey = await (0, aeskw_js_1.wrap)(alg, key, cek); + break; + } + case 'A128GCMKW': + case 'A192GCMKW': + case 'A256GCMKW': { + cek = providedCek || (0, cek_js_1.default)(enc); + const { iv } = providedParameters; + ({ encryptedKey, ...parameters } = await (0, aesgcmkw_js_1.wrap)(alg, key, cek, iv)); + break; + } + default: { + throw new errors_js_1.JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value'); + } + } + return { cek, encryptedKey, parameters }; +} +exports.default = encryptKeyManagement; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/epoch.js b/webapp/node_modules/jose/dist/node/cjs/lib/epoch.js new file mode 100644 index 0000000000000000000000000000000000000000..a0792b4f7ff3e3a758de380a73964c5c1aad925c --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/epoch.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = (date) => Math.floor(date.getTime() / 1000); diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/format_pem.js b/webapp/node_modules/jose/dist/node/cjs/lib/format_pem.js new file mode 100644 index 0000000000000000000000000000000000000000..fdcf455ab7be87779be2d32d0349611361d33dd6 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/format_pem.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = (b64, descriptor) => { + const newlined = (b64.match(/.{1,64}/g) || []).join('\n'); + return `-----BEGIN ${descriptor}-----\n${newlined}\n-----END ${descriptor}-----`; +}; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js b/webapp/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js new file mode 100644 index 0000000000000000000000000000000000000000..b1213054aefeb5f777fe65323119f9d691dde036 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = (actual, ...types) => { + let msg = 'Key must be '; + if (types.length > 2) { + const last = types.pop(); + msg += `one of type ${types.join(', ')}, or ${last}.`; + } + else if (types.length === 2) { + msg += `one of type ${types[0]} or ${types[1]}.`; + } + else { + msg += `of type ${types[0]}.`; + } + if (actual == null) { + msg += ` Received ${actual}`; + } + else if (typeof actual === 'function' && actual.name) { + msg += ` Received function ${actual.name}`; + } + else if (typeof actual === 'object' && actual != null) { + if (actual.constructor && actual.constructor.name) { + msg += ` Received an instance of ${actual.constructor.name}`; + } + } + return msg; +}; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/is_disjoint.js b/webapp/node_modules/jose/dist/node/cjs/lib/is_disjoint.js new file mode 100644 index 0000000000000000000000000000000000000000..66c2fc6c82aaf9ccf421a4e6c30055d5026f2418 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/is_disjoint.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const isDisjoint = (...headers) => { + const sources = headers.filter(Boolean); + if (sources.length === 0 || sources.length === 1) { + return true; + } + let acc; + for (const header of sources) { + const parameters = Object.keys(header); + if (!acc || acc.size === 0) { + acc = new Set(parameters); + continue; + } + for (const parameter of parameters) { + if (acc.has(parameter)) { + return false; + } + acc.add(parameter); + } + } + return true; +}; +exports.default = isDisjoint; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/is_object.js b/webapp/node_modules/jose/dist/node/cjs/lib/is_object.js new file mode 100644 index 0000000000000000000000000000000000000000..870938b59b9fb48e4a8c28972a3638b6dee8918d --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/is_object.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function isObjectLike(value) { + return typeof value === 'object' && value !== null; +} +function isObject(input) { + if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') { + return false; + } + if (Object.getPrototypeOf(input) === null) { + return true; + } + let proto = input; + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + return Object.getPrototypeOf(input) === proto; +} +exports.default = isObject; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/iv.js b/webapp/node_modules/jose/dist/node/cjs/lib/iv.js new file mode 100644 index 0000000000000000000000000000000000000000..db7d3a5912e08c22322a9f2715b2a0e2b09b26f7 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/iv.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bitLength = void 0; +const errors_js_1 = require("../util/errors.js"); +const random_js_1 = require("../runtime/random.js"); +function bitLength(alg) { + switch (alg) { + case 'A128GCM': + case 'A128GCMKW': + case 'A192GCM': + case 'A192GCMKW': + case 'A256GCM': + case 'A256GCMKW': + return 96; + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + return 128; + default: + throw new errors_js_1.JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`); + } +} +exports.bitLength = bitLength; +exports.default = (alg) => (0, random_js_1.default)(new Uint8Array(bitLength(alg) >> 3)); diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js b/webapp/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js new file mode 100644 index 0000000000000000000000000000000000000000..ce5e0ebbe38f476831471b107fa3d344a5e296a2 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js @@ -0,0 +1,93 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const errors_js_1 = require("../util/errors.js"); +const buffer_utils_js_1 = require("./buffer_utils.js"); +const epoch_js_1 = require("./epoch.js"); +const secs_js_1 = require("./secs.js"); +const is_object_js_1 = require("./is_object.js"); +const normalizeTyp = (value) => value.toLowerCase().replace(/^application\//, ''); +const checkAudiencePresence = (audPayload, audOption) => { + if (typeof audPayload === 'string') { + return audOption.includes(audPayload); + } + if (Array.isArray(audPayload)) { + return audOption.some(Set.prototype.has.bind(new Set(audPayload))); + } + return false; +}; +exports.default = (protectedHeader, encodedPayload, options = {}) => { + const { typ } = options; + if (typ && + (typeof protectedHeader.typ !== 'string' || + normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) { + throw new errors_js_1.JWTClaimValidationFailed('unexpected "typ" JWT header value', 'typ', 'check_failed'); + } + let payload; + try { + payload = JSON.parse(buffer_utils_js_1.decoder.decode(encodedPayload)); + } + catch { + } + if (!(0, is_object_js_1.default)(payload)) { + throw new errors_js_1.JWTInvalid('JWT Claims Set must be a top-level JSON object'); + } + const { issuer } = options; + if (issuer && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) { + throw new errors_js_1.JWTClaimValidationFailed('unexpected "iss" claim value', 'iss', 'check_failed'); + } + const { subject } = options; + if (subject && payload.sub !== subject) { + throw new errors_js_1.JWTClaimValidationFailed('unexpected "sub" claim value', 'sub', 'check_failed'); + } + const { audience } = options; + if (audience && + !checkAudiencePresence(payload.aud, typeof audience === 'string' ? [audience] : audience)) { + throw new errors_js_1.JWTClaimValidationFailed('unexpected "aud" claim value', 'aud', 'check_failed'); + } + let tolerance; + switch (typeof options.clockTolerance) { + case 'string': + tolerance = (0, secs_js_1.default)(options.clockTolerance); + break; + case 'number': + tolerance = options.clockTolerance; + break; + case 'undefined': + tolerance = 0; + break; + default: + throw new TypeError('Invalid clockTolerance option type'); + } + const { currentDate } = options; + const now = (0, epoch_js_1.default)(currentDate || new Date()); + if ((payload.iat !== undefined || options.maxTokenAge) && typeof payload.iat !== 'number') { + throw new errors_js_1.JWTClaimValidationFailed('"iat" claim must be a number', 'iat', 'invalid'); + } + if (payload.nbf !== undefined) { + if (typeof payload.nbf !== 'number') { + throw new errors_js_1.JWTClaimValidationFailed('"nbf" claim must be a number', 'nbf', 'invalid'); + } + if (payload.nbf > now + tolerance) { + throw new errors_js_1.JWTClaimValidationFailed('"nbf" claim timestamp check failed', 'nbf', 'check_failed'); + } + } + if (payload.exp !== undefined) { + if (typeof payload.exp !== 'number') { + throw new errors_js_1.JWTClaimValidationFailed('"exp" claim must be a number', 'exp', 'invalid'); + } + if (payload.exp <= now - tolerance) { + throw new errors_js_1.JWTExpired('"exp" claim timestamp check failed', 'exp', 'check_failed'); + } + } + if (options.maxTokenAge) { + const age = now - payload.iat; + const max = typeof options.maxTokenAge === 'number' ? options.maxTokenAge : (0, secs_js_1.default)(options.maxTokenAge); + if (age - tolerance > max) { + throw new errors_js_1.JWTExpired('"iat" claim timestamp check failed (too far in the past)', 'iat', 'check_failed'); + } + if (age < 0 - tolerance) { + throw new errors_js_1.JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed'); + } + } + return payload; +}; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/secs.js b/webapp/node_modules/jose/dist/node/cjs/lib/secs.js new file mode 100644 index 0000000000000000000000000000000000000000..f1b6a0c15d24d3258bbff7d85185a3d734343a96 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/secs.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const minute = 60; +const hour = minute * 60; +const day = hour * 24; +const week = day * 7; +const year = day * 365.25; +const REGEX = /^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i; +exports.default = (str) => { + const matched = REGEX.exec(str); + if (!matched) { + throw new TypeError('Invalid time period format'); + } + const value = parseFloat(matched[1]); + const unit = matched[2].toLowerCase(); + switch (unit) { + case 'sec': + case 'secs': + case 'second': + case 'seconds': + case 's': + return Math.round(value); + case 'minute': + case 'minutes': + case 'min': + case 'mins': + case 'm': + return Math.round(value * minute); + case 'hour': + case 'hours': + case 'hr': + case 'hrs': + case 'h': + return Math.round(value * hour); + case 'day': + case 'days': + case 'd': + return Math.round(value * day); + case 'week': + case 'weeks': + case 'w': + return Math.round(value * week); + default: + return Math.round(value * year); + } +}; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js b/webapp/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js new file mode 100644 index 0000000000000000000000000000000000000000..29f4e80df93f7d6764f0c6a6b1f2f9ac0c227bb3 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const validateAlgorithms = (option, algorithms) => { + if (algorithms !== undefined && + (!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== 'string'))) { + throw new TypeError(`"${option}" option must be an array of strings`); + } + if (!algorithms) { + return undefined; + } + return new Set(algorithms); +}; +exports.default = validateAlgorithms; diff --git a/webapp/node_modules/jose/dist/node/cjs/lib/validate_crit.js b/webapp/node_modules/jose/dist/node/cjs/lib/validate_crit.js new file mode 100644 index 0000000000000000000000000000000000000000..b0229e3b72b226e6a996864d71109ba775bd287b --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/lib/validate_crit.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const errors_js_1 = require("../util/errors.js"); +function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) { + if (joseHeader.crit !== undefined && protectedHeader.crit === undefined) { + throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected'); + } + if (!protectedHeader || protectedHeader.crit === undefined) { + return new Set(); + } + if (!Array.isArray(protectedHeader.crit) || + protectedHeader.crit.length === 0 || + protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) { + throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present'); + } + let recognized; + if (recognizedOption !== undefined) { + recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]); + } + else { + recognized = recognizedDefault; + } + for (const parameter of protectedHeader.crit) { + if (!recognized.has(parameter)) { + throw new errors_js_1.JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`); + } + if (joseHeader[parameter] === undefined) { + throw new Err(`Extension Header Parameter "${parameter}" is missing`); + } + else if (recognized.get(parameter) && protectedHeader[parameter] === undefined) { + throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`); + } + } + return new Set(protectedHeader.crit); +} +exports.default = validateCrit; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/aeskw.js b/webapp/node_modules/jose/dist/node/cjs/runtime/aeskw.js new file mode 100644 index 0000000000000000000000000000000000000000..ca26086881ba388858c8bab0a14df62b5193e740 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/aeskw.js @@ -0,0 +1,55 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.unwrap = exports.wrap = void 0; +const buffer_1 = require("buffer"); +const crypto_1 = require("crypto"); +const errors_js_1 = require("../util/errors.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const webcrypto_js_1 = require("./webcrypto.js"); +const crypto_key_js_1 = require("../lib/crypto_key.js"); +const is_key_object_js_1 = require("./is_key_object.js"); +const invalid_key_input_js_1 = require("../lib/invalid_key_input.js"); +const ciphers_js_1 = require("./ciphers.js"); +const is_key_like_js_1 = require("./is_key_like.js"); +function checkKeySize(key, alg) { + if (key.symmetricKeySize << 3 !== parseInt(alg.slice(1, 4), 10)) { + throw new TypeError(`Invalid key size for alg: ${alg}`); + } +} +function ensureKeyObject(key, alg, usage) { + if ((0, is_key_object_js_1.default)(key)) { + return key; + } + if (key instanceof Uint8Array) { + return (0, crypto_1.createSecretKey)(key); + } + if ((0, webcrypto_js_1.isCryptoKey)(key)) { + (0, crypto_key_js_1.checkEncCryptoKey)(key, alg, usage); + return crypto_1.KeyObject.from(key); + } + throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types, 'Uint8Array')); +} +const wrap = (alg, key, cek) => { + const size = parseInt(alg.slice(1, 4), 10); + const algorithm = `aes${size}-wrap`; + if (!(0, ciphers_js_1.default)(algorithm)) { + throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } + const keyObject = ensureKeyObject(key, alg, 'wrapKey'); + checkKeySize(keyObject, alg); + const cipher = (0, crypto_1.createCipheriv)(algorithm, keyObject, buffer_1.Buffer.alloc(8, 0xa6)); + return (0, buffer_utils_js_1.concat)(cipher.update(cek), cipher.final()); +}; +exports.wrap = wrap; +const unwrap = (alg, key, encryptedKey) => { + const size = parseInt(alg.slice(1, 4), 10); + const algorithm = `aes${size}-wrap`; + if (!(0, ciphers_js_1.default)(algorithm)) { + throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } + const keyObject = ensureKeyObject(key, alg, 'unwrapKey'); + checkKeySize(keyObject, alg); + const cipher = (0, crypto_1.createDecipheriv)(algorithm, keyObject, buffer_1.Buffer.alloc(8, 0xa6)); + return (0, buffer_utils_js_1.concat)(cipher.update(encryptedKey), cipher.final()); +}; +exports.unwrap = unwrap; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/asn1.js b/webapp/node_modules/jose/dist/node/cjs/runtime/asn1.js new file mode 100644 index 0000000000000000000000000000000000000000..71f4bcf60e6798a1ab8db1a976066e3d6515de56 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/asn1.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromSPKI = exports.fromPKCS8 = exports.toPKCS8 = exports.toSPKI = void 0; +const crypto_1 = require("crypto"); +const buffer_1 = require("buffer"); +const webcrypto_js_1 = require("./webcrypto.js"); +const is_key_object_js_1 = require("./is_key_object.js"); +const invalid_key_input_js_1 = require("../lib/invalid_key_input.js"); +const is_key_like_js_1 = require("./is_key_like.js"); +const genericExport = (keyType, keyFormat, key) => { + let keyObject; + if ((0, webcrypto_js_1.isCryptoKey)(key)) { + if (!key.extractable) { + throw new TypeError('CryptoKey is not extractable'); + } + keyObject = crypto_1.KeyObject.from(key); + } + else if ((0, is_key_object_js_1.default)(key)) { + keyObject = key; + } + else { + throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types)); + } + if (keyObject.type !== keyType) { + throw new TypeError(`key is not a ${keyType} key`); + } + return keyObject.export({ format: 'pem', type: keyFormat }); +}; +const toSPKI = (key) => { + return genericExport('public', 'spki', key); +}; +exports.toSPKI = toSPKI; +const toPKCS8 = (key) => { + return genericExport('private', 'pkcs8', key); +}; +exports.toPKCS8 = toPKCS8; +const fromPKCS8 = (pem) => (0, crypto_1.createPrivateKey)({ + key: buffer_1.Buffer.from(pem.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g, ''), 'base64'), + type: 'pkcs8', + format: 'der', +}); +exports.fromPKCS8 = fromPKCS8; +const fromSPKI = (pem) => (0, crypto_1.createPublicKey)({ + key: buffer_1.Buffer.from(pem.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, ''), 'base64'), + type: 'spki', + format: 'der', +}); +exports.fromSPKI = fromSPKI; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/asn1_sequence_decoder.js b/webapp/node_modules/jose/dist/node/cjs/runtime/asn1_sequence_decoder.js new file mode 100644 index 0000000000000000000000000000000000000000..4f965223355560d18597bd526ba9bb5172d4218e --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/asn1_sequence_decoder.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tagInteger = 0x02; +const tagSequence = 0x30; +class Asn1SequenceDecoder { + constructor(buffer) { + if (buffer[0] !== tagSequence) { + throw new TypeError(); + } + this.buffer = buffer; + this.offset = 1; + const len = this.decodeLength(); + if (len !== buffer.length - this.offset) { + throw new TypeError(); + } + } + decodeLength() { + let length = this.buffer[this.offset++]; + if (length & 0x80) { + const nBytes = length & ~0x80; + length = 0; + for (let i = 0; i < nBytes; i++) + length = (length << 8) | this.buffer[this.offset + i]; + this.offset += nBytes; + } + return length; + } + unsignedInteger() { + if (this.buffer[this.offset++] !== tagInteger) { + throw new TypeError(); + } + let length = this.decodeLength(); + if (this.buffer[this.offset] === 0) { + this.offset++; + length--; + } + const result = this.buffer.slice(this.offset, this.offset + length); + this.offset += length; + return result; + } + end() { + if (this.offset !== this.buffer.length) { + throw new TypeError(); + } + } +} +exports.default = Asn1SequenceDecoder; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/asn1_sequence_encoder.js b/webapp/node_modules/jose/dist/node/cjs/runtime/asn1_sequence_encoder.js new file mode 100644 index 0000000000000000000000000000000000000000..8b71d6dc28d3ad457c824c945a825c7101937286 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/asn1_sequence_encoder.js @@ -0,0 +1,91 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const buffer_1 = require("buffer"); +const errors_js_1 = require("../util/errors.js"); +const tagInteger = 0x02; +const tagBitStr = 0x03; +const tagOctStr = 0x04; +const tagSequence = 0x30; +const bZero = buffer_1.Buffer.from([0x00]); +const bTagInteger = buffer_1.Buffer.from([tagInteger]); +const bTagBitStr = buffer_1.Buffer.from([tagBitStr]); +const bTagSequence = buffer_1.Buffer.from([tagSequence]); +const bTagOctStr = buffer_1.Buffer.from([tagOctStr]); +const encodeLength = (len) => { + if (len < 128) + return buffer_1.Buffer.from([len]); + const buffer = buffer_1.Buffer.alloc(5); + buffer.writeUInt32BE(len, 1); + let offset = 1; + while (buffer[offset] === 0) + offset++; + buffer[offset - 1] = 0x80 | (5 - offset); + return buffer.slice(offset - 1); +}; +const oids = new Map([ + ['P-256', buffer_1.Buffer.from('06 08 2A 86 48 CE 3D 03 01 07'.replace(/ /g, ''), 'hex')], + ['secp256k1', buffer_1.Buffer.from('06 05 2B 81 04 00 0A'.replace(/ /g, ''), 'hex')], + ['P-384', buffer_1.Buffer.from('06 05 2B 81 04 00 22'.replace(/ /g, ''), 'hex')], + ['P-521', buffer_1.Buffer.from('06 05 2B 81 04 00 23'.replace(/ /g, ''), 'hex')], + ['ecPublicKey', buffer_1.Buffer.from('06 07 2A 86 48 CE 3D 02 01'.replace(/ /g, ''), 'hex')], + ['X25519', buffer_1.Buffer.from('06 03 2B 65 6E'.replace(/ /g, ''), 'hex')], + ['X448', buffer_1.Buffer.from('06 03 2B 65 6F'.replace(/ /g, ''), 'hex')], + ['Ed25519', buffer_1.Buffer.from('06 03 2B 65 70'.replace(/ /g, ''), 'hex')], + ['Ed448', buffer_1.Buffer.from('06 03 2B 65 71'.replace(/ /g, ''), 'hex')], +]); +class DumbAsn1Encoder { + constructor() { + this.length = 0; + this.elements = []; + } + oidFor(oid) { + const bOid = oids.get(oid); + if (!bOid) { + throw new errors_js_1.JOSENotSupported('Invalid or unsupported OID'); + } + this.elements.push(bOid); + this.length += bOid.length; + } + zero() { + this.elements.push(bTagInteger, buffer_1.Buffer.from([0x01]), bZero); + this.length += 3; + } + one() { + this.elements.push(bTagInteger, buffer_1.Buffer.from([0x01]), buffer_1.Buffer.from([0x01])); + this.length += 3; + } + unsignedInteger(integer) { + if (integer[0] & 0x80) { + const len = encodeLength(integer.length + 1); + this.elements.push(bTagInteger, len, bZero, integer); + this.length += 2 + len.length + integer.length; + } + else { + let i = 0; + while (integer[i] === 0 && (integer[i + 1] & 0x80) === 0) + i++; + const len = encodeLength(integer.length - i); + this.elements.push(bTagInteger, encodeLength(integer.length - i), integer.slice(i)); + this.length += 1 + len.length + integer.length - i; + } + } + octStr(octStr) { + const len = encodeLength(octStr.length); + this.elements.push(bTagOctStr, encodeLength(octStr.length), octStr); + this.length += 1 + len.length + octStr.length; + } + bitStr(bitS) { + const len = encodeLength(bitS.length + 1); + this.elements.push(bTagBitStr, encodeLength(bitS.length + 1), bZero, bitS); + this.length += 1 + len.length + bitS.length + 1; + } + add(seq) { + this.elements.push(seq); + this.length += seq.length; + } + end(tag = bTagSequence) { + const len = encodeLength(this.length); + return buffer_1.Buffer.concat([tag, len, ...this.elements], 1 + len.length + this.length); + } +} +exports.default = DumbAsn1Encoder; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/base64url.js b/webapp/node_modules/jose/dist/node/cjs/runtime/base64url.js new file mode 100644 index 0000000000000000000000000000000000000000..3a38a4ba74afa9ebb1806819c2e0ccc34a8c8e2d --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/base64url.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decode = exports.encode = exports.encodeBase64 = exports.decodeBase64 = void 0; +const buffer_1 = require("buffer"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +let encode; +exports.encode = encode; +function normalize(input) { + let encoded = input; + if (encoded instanceof Uint8Array) { + encoded = buffer_utils_js_1.decoder.decode(encoded); + } + return encoded; +} +if (buffer_1.Buffer.isEncoding('base64url')) { + exports.encode = encode = (input) => buffer_1.Buffer.from(input).toString('base64url'); +} +else { + exports.encode = encode = (input) => buffer_1.Buffer.from(input).toString('base64').replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); +} +const decodeBase64 = (input) => buffer_1.Buffer.from(input, 'base64'); +exports.decodeBase64 = decodeBase64; +const encodeBase64 = (input) => buffer_1.Buffer.from(input).toString('base64'); +exports.encodeBase64 = encodeBase64; +const decode = (input) => buffer_1.Buffer.from(normalize(input), 'base64'); +exports.decode = decode; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js b/webapp/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js new file mode 100644 index 0000000000000000000000000000000000000000..03412c2cfb0c8e90ea579386289625a34de7f997 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto_1 = require("crypto"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +function cbcTag(aad, iv, ciphertext, macSize, macKey, keySize) { + const macData = (0, buffer_utils_js_1.concat)(aad, iv, ciphertext, (0, buffer_utils_js_1.uint64be)(aad.length << 3)); + const hmac = (0, crypto_1.createHmac)(`sha${macSize}`, macKey); + hmac.update(macData); + return hmac.digest().slice(0, keySize >> 3); +} +exports.default = cbcTag; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js b/webapp/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js new file mode 100644 index 0000000000000000000000000000000000000000..82b89004c98ae5e83091db3b7707635bc531ccf3 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const errors_js_1 = require("../util/errors.js"); +const is_key_object_js_1 = require("./is_key_object.js"); +const checkCekLength = (enc, cek) => { + let expected; + switch (enc) { + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + expected = parseInt(enc.slice(-3), 10); + break; + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + expected = parseInt(enc.slice(1, 4), 10); + break; + default: + throw new errors_js_1.JOSENotSupported(`Content Encryption Algorithm ${enc} is not supported either by JOSE or your javascript runtime`); + } + if (cek instanceof Uint8Array) { + if (cek.length << 3 !== expected) { + throw new errors_js_1.JWEInvalid('Invalid Content Encryption Key length'); + } + return; + } + if ((0, is_key_object_js_1.default)(cek) && cek.type === 'secret') { + if (cek.symmetricKeySize << 3 !== expected) { + throw new errors_js_1.JWEInvalid('Invalid Content Encryption Key length'); + } + return; + } + throw new TypeError('Invalid Content Encryption Key type'); +}; +exports.default = checkCekLength; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/check_modulus_length.js b/webapp/node_modules/jose/dist/node/cjs/runtime/check_modulus_length.js new file mode 100644 index 0000000000000000000000000000000000000000..72c670eba3e1f3e914caa856a49eacebe50f8e24 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/check_modulus_length.js @@ -0,0 +1,52 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.setModulusLength = exports.weakMap = void 0; +exports.weakMap = new WeakMap(); +const getLength = (buf, index) => { + let len = buf.readUInt8(1); + if ((len & 0x80) === 0) { + if (index === 0) { + return len; + } + return getLength(buf.subarray(2 + len), index - 1); + } + const num = len & 0x7f; + len = 0; + for (let i = 0; i < num; i++) { + len <<= 8; + const j = buf.readUInt8(2 + i); + len |= j; + } + if (index === 0) { + return len; + } + return getLength(buf.subarray(2 + len), index - 1); +}; +const getLengthOfSeqIndex = (sequence, index) => { + const len = sequence.readUInt8(1); + if ((len & 0x80) === 0) { + return getLength(sequence.subarray(2), index); + } + const num = len & 0x7f; + return getLength(sequence.subarray(2 + num), index); +}; +const getModulusLength = (key) => { + var _a, _b; + if (exports.weakMap.has(key)) { + return exports.weakMap.get(key); + } + const modulusLength = (_b = (_a = key.asymmetricKeyDetails) === null || _a === void 0 ? void 0 : _a.modulusLength) !== null && _b !== void 0 ? _b : (getLengthOfSeqIndex(key.export({ format: 'der', type: 'pkcs1' }), key.type === 'private' ? 1 : 0) - + 1) << + 3; + exports.weakMap.set(key, modulusLength); + return modulusLength; +}; +const setModulusLength = (keyObject, modulusLength) => { + exports.weakMap.set(keyObject, modulusLength); +}; +exports.setModulusLength = setModulusLength; +exports.default = (key, alg) => { + if (getModulusLength(key) < 2048) { + throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`); + } +}; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/ciphers.js b/webapp/node_modules/jose/dist/node/cjs/runtime/ciphers.js new file mode 100644 index 0000000000000000000000000000000000000000..e004c8456265d142076f5d5a77022d7f515aa896 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/ciphers.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto_1 = require("crypto"); +let ciphers; +exports.default = (algorithm) => { + ciphers || (ciphers = new Set((0, crypto_1.getCiphers)())); + return ciphers.has(algorithm); +}; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/decrypt.js b/webapp/node_modules/jose/dist/node/cjs/runtime/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..6e0de6d47228362e2cd6a97bd3b63b37ca6b0a99 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/decrypt.js @@ -0,0 +1,97 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto_1 = require("crypto"); +const check_iv_length_js_1 = require("../lib/check_iv_length.js"); +const check_cek_length_js_1 = require("./check_cek_length.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const errors_js_1 = require("../util/errors.js"); +const timing_safe_equal_js_1 = require("./timing_safe_equal.js"); +const cbc_tag_js_1 = require("./cbc_tag.js"); +const webcrypto_js_1 = require("./webcrypto.js"); +const crypto_key_js_1 = require("../lib/crypto_key.js"); +const is_key_object_js_1 = require("./is_key_object.js"); +const invalid_key_input_js_1 = require("../lib/invalid_key_input.js"); +const ciphers_js_1 = require("./ciphers.js"); +const is_key_like_js_1 = require("./is_key_like.js"); +function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) { + const keySize = parseInt(enc.slice(1, 4), 10); + if ((0, is_key_object_js_1.default)(cek)) { + cek = cek.export(); + } + const encKey = cek.subarray(keySize >> 3); + const macKey = cek.subarray(0, keySize >> 3); + const macSize = parseInt(enc.slice(-3), 10); + const algorithm = `aes-${keySize}-cbc`; + if (!(0, ciphers_js_1.default)(algorithm)) { + throw new errors_js_1.JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`); + } + const expectedTag = (0, cbc_tag_js_1.default)(aad, iv, ciphertext, macSize, macKey, keySize); + let macCheckPassed; + try { + macCheckPassed = (0, timing_safe_equal_js_1.default)(tag, expectedTag); + } + catch { + } + if (!macCheckPassed) { + throw new errors_js_1.JWEDecryptionFailed(); + } + let plaintext; + try { + const decipher = (0, crypto_1.createDecipheriv)(algorithm, encKey, iv); + plaintext = (0, buffer_utils_js_1.concat)(decipher.update(ciphertext), decipher.final()); + } + catch { + } + if (!plaintext) { + throw new errors_js_1.JWEDecryptionFailed(); + } + return plaintext; +} +function gcmDecrypt(enc, cek, ciphertext, iv, tag, aad) { + const keySize = parseInt(enc.slice(1, 4), 10); + const algorithm = `aes-${keySize}-gcm`; + if (!(0, ciphers_js_1.default)(algorithm)) { + throw new errors_js_1.JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`); + } + try { + const decipher = (0, crypto_1.createDecipheriv)(algorithm, cek, iv, { authTagLength: 16 }); + decipher.setAuthTag(tag); + if (aad.byteLength) { + decipher.setAAD(aad, { plaintextLength: ciphertext.length }); + } + const plaintext = decipher.update(ciphertext); + decipher.final(); + return plaintext; + } + catch { + throw new errors_js_1.JWEDecryptionFailed(); + } +} +const decrypt = (enc, cek, ciphertext, iv, tag, aad) => { + let key; + if ((0, webcrypto_js_1.isCryptoKey)(cek)) { + (0, crypto_key_js_1.checkEncCryptoKey)(cek, enc, 'decrypt'); + key = crypto_1.KeyObject.from(cek); + } + else if (cek instanceof Uint8Array || (0, is_key_object_js_1.default)(cek)) { + key = cek; + } + else { + throw new TypeError((0, invalid_key_input_js_1.default)(cek, ...is_key_like_js_1.types, 'Uint8Array')); + } + (0, check_cek_length_js_1.default)(enc, key); + (0, check_iv_length_js_1.default)(enc, iv); + switch (enc) { + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + return cbcDecrypt(enc, key, ciphertext, iv, tag, aad); + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + return gcmDecrypt(enc, key, ciphertext, iv, tag, aad); + default: + throw new errors_js_1.JOSENotSupported('Unsupported JWE Content Encryption Algorithm'); + } +}; +exports.default = decrypt; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/digest.js b/webapp/node_modules/jose/dist/node/cjs/runtime/digest.js new file mode 100644 index 0000000000000000000000000000000000000000..13c194a8ed7a822bfada68ebb6a5eafc7b0e82fe --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/digest.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto_1 = require("crypto"); +const digest = (algorithm, data) => (0, crypto_1.createHash)(algorithm).update(data).digest(); +exports.default = digest; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js b/webapp/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js new file mode 100644 index 0000000000000000000000000000000000000000..fde4883e81eabbdbd8b5d5d2bbbf667cb2b328ee --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const errors_js_1 = require("../util/errors.js"); +function dsaDigest(alg) { + switch (alg) { + case 'PS256': + case 'RS256': + case 'ES256': + case 'ES256K': + return 'sha256'; + case 'PS384': + case 'RS384': + case 'ES384': + return 'sha384'; + case 'PS512': + case 'RS512': + case 'ES512': + return 'sha512'; + case 'EdDSA': + return undefined; + default: + throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} +exports.default = dsaDigest; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/ecdhes.js b/webapp/node_modules/jose/dist/node/cjs/runtime/ecdhes.js new file mode 100644 index 0000000000000000000000000000000000000000..d769af7603e97a709ba5acd8c75c183270cdd7e4 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/ecdhes.js @@ -0,0 +1,70 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ecdhAllowed = exports.generateEpk = exports.deriveKey = void 0; +const crypto_1 = require("crypto"); +const util_1 = require("util"); +const get_named_curve_js_1 = require("./get_named_curve.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const errors_js_1 = require("../util/errors.js"); +const webcrypto_js_1 = require("./webcrypto.js"); +const crypto_key_js_1 = require("../lib/crypto_key.js"); +const is_key_object_js_1 = require("./is_key_object.js"); +const invalid_key_input_js_1 = require("../lib/invalid_key_input.js"); +const is_key_like_js_1 = require("./is_key_like.js"); +const generateKeyPair = (0, util_1.promisify)(crypto_1.generateKeyPair); +async function deriveKey(publicKee, privateKee, algorithm, keyLength, apu = new Uint8Array(0), apv = new Uint8Array(0)) { + let publicKey; + if ((0, webcrypto_js_1.isCryptoKey)(publicKee)) { + (0, crypto_key_js_1.checkEncCryptoKey)(publicKee, 'ECDH'); + publicKey = crypto_1.KeyObject.from(publicKee); + } + else if ((0, is_key_object_js_1.default)(publicKee)) { + publicKey = publicKee; + } + else { + throw new TypeError((0, invalid_key_input_js_1.default)(publicKee, ...is_key_like_js_1.types)); + } + let privateKey; + if ((0, webcrypto_js_1.isCryptoKey)(privateKee)) { + (0, crypto_key_js_1.checkEncCryptoKey)(privateKee, 'ECDH', 'deriveBits'); + privateKey = crypto_1.KeyObject.from(privateKee); + } + else if ((0, is_key_object_js_1.default)(privateKee)) { + privateKey = privateKee; + } + else { + throw new TypeError((0, invalid_key_input_js_1.default)(privateKee, ...is_key_like_js_1.types)); + } + const value = (0, buffer_utils_js_1.concat)((0, buffer_utils_js_1.lengthAndInput)(buffer_utils_js_1.encoder.encode(algorithm)), (0, buffer_utils_js_1.lengthAndInput)(apu), (0, buffer_utils_js_1.lengthAndInput)(apv), (0, buffer_utils_js_1.uint32be)(keyLength)); + const sharedSecret = (0, crypto_1.diffieHellman)({ privateKey, publicKey }); + return (0, buffer_utils_js_1.concatKdf)(sharedSecret, keyLength, value); +} +exports.deriveKey = deriveKey; +async function generateEpk(kee) { + let key; + if ((0, webcrypto_js_1.isCryptoKey)(kee)) { + key = crypto_1.KeyObject.from(kee); + } + else if ((0, is_key_object_js_1.default)(kee)) { + key = kee; + } + else { + throw new TypeError((0, invalid_key_input_js_1.default)(kee, ...is_key_like_js_1.types)); + } + switch (key.asymmetricKeyType) { + case 'x25519': + return generateKeyPair('x25519'); + case 'x448': { + return generateKeyPair('x448'); + } + case 'ec': { + const namedCurve = (0, get_named_curve_js_1.default)(key); + return generateKeyPair('ec', { namedCurve }); + } + default: + throw new errors_js_1.JOSENotSupported('Invalid or unsupported EPK'); + } +} +exports.generateEpk = generateEpk; +const ecdhAllowed = (key) => ['P-256', 'P-384', 'P-521', 'X25519', 'X448'].includes((0, get_named_curve_js_1.default)(key)); +exports.ecdhAllowed = ecdhAllowed; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/encrypt.js b/webapp/node_modules/jose/dist/node/cjs/runtime/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..940a1ed28b61232e5519623c3267363b30481335 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/encrypt.js @@ -0,0 +1,74 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto_1 = require("crypto"); +const check_iv_length_js_1 = require("../lib/check_iv_length.js"); +const check_cek_length_js_1 = require("./check_cek_length.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const cbc_tag_js_1 = require("./cbc_tag.js"); +const webcrypto_js_1 = require("./webcrypto.js"); +const crypto_key_js_1 = require("../lib/crypto_key.js"); +const is_key_object_js_1 = require("./is_key_object.js"); +const invalid_key_input_js_1 = require("../lib/invalid_key_input.js"); +const errors_js_1 = require("../util/errors.js"); +const ciphers_js_1 = require("./ciphers.js"); +const is_key_like_js_1 = require("./is_key_like.js"); +function cbcEncrypt(enc, plaintext, cek, iv, aad) { + const keySize = parseInt(enc.slice(1, 4), 10); + if ((0, is_key_object_js_1.default)(cek)) { + cek = cek.export(); + } + const encKey = cek.subarray(keySize >> 3); + const macKey = cek.subarray(0, keySize >> 3); + const algorithm = `aes-${keySize}-cbc`; + if (!(0, ciphers_js_1.default)(algorithm)) { + throw new errors_js_1.JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`); + } + const cipher = (0, crypto_1.createCipheriv)(algorithm, encKey, iv); + const ciphertext = (0, buffer_utils_js_1.concat)(cipher.update(plaintext), cipher.final()); + const macSize = parseInt(enc.slice(-3), 10); + const tag = (0, cbc_tag_js_1.default)(aad, iv, ciphertext, macSize, macKey, keySize); + return { ciphertext, tag }; +} +function gcmEncrypt(enc, plaintext, cek, iv, aad) { + const keySize = parseInt(enc.slice(1, 4), 10); + const algorithm = `aes-${keySize}-gcm`; + if (!(0, ciphers_js_1.default)(algorithm)) { + throw new errors_js_1.JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`); + } + const cipher = (0, crypto_1.createCipheriv)(algorithm, cek, iv, { authTagLength: 16 }); + if (aad.byteLength) { + cipher.setAAD(aad, { plaintextLength: plaintext.length }); + } + const ciphertext = cipher.update(plaintext); + cipher.final(); + const tag = cipher.getAuthTag(); + return { ciphertext, tag }; +} +const encrypt = (enc, plaintext, cek, iv, aad) => { + let key; + if ((0, webcrypto_js_1.isCryptoKey)(cek)) { + (0, crypto_key_js_1.checkEncCryptoKey)(cek, enc, 'encrypt'); + key = crypto_1.KeyObject.from(cek); + } + else if (cek instanceof Uint8Array || (0, is_key_object_js_1.default)(cek)) { + key = cek; + } + else { + throw new TypeError((0, invalid_key_input_js_1.default)(cek, ...is_key_like_js_1.types, 'Uint8Array')); + } + (0, check_cek_length_js_1.default)(enc, key); + (0, check_iv_length_js_1.default)(enc, iv); + switch (enc) { + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + return cbcEncrypt(enc, plaintext, key, iv, aad); + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + return gcmEncrypt(enc, plaintext, key, iv, aad); + default: + throw new errors_js_1.JOSENotSupported('Unsupported JWE Content Encryption Algorithm'); + } +}; +exports.default = encrypt; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/env.js b/webapp/node_modules/jose/dist/node/cjs/runtime/env.js new file mode 100644 index 0000000000000000000000000000000000000000..e6a6f4acfe28c32bb0bb4c55f994fb29e6d736c5 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/env.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isCloudflareWorkers = void 0; +function isCloudflareWorkers() { + return false; +} +exports.isCloudflareWorkers = isCloudflareWorkers; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js b/webapp/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js new file mode 100644 index 0000000000000000000000000000000000000000..b034fd5bb474b5b80bdee6e31e14c6838061bf16 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const http = require("http"); +const https = require("https"); +const events_1 = require("events"); +const errors_js_1 = require("../util/errors.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const fetchJwks = async (url, timeout, options) => { + let get; + switch (url.protocol) { + case 'https:': + get = https.get; + break; + case 'http:': + get = http.get; + break; + default: + throw new TypeError('Unsupported URL protocol.'); + } + const { agent, headers } = options; + const req = get(url.href, { + agent, + timeout, + headers, + }); + const [response] = (await Promise.race([(0, events_1.once)(req, 'response'), (0, events_1.once)(req, 'timeout')])); + if (!response) { + req.destroy(); + throw new errors_js_1.JWKSTimeout(); + } + if (response.statusCode !== 200) { + throw new errors_js_1.JOSEError('Expected 200 OK from the JSON Web Key Set HTTP response'); + } + const parts = []; + for await (const part of response) { + parts.push(part); + } + try { + return JSON.parse(buffer_utils_js_1.decoder.decode((0, buffer_utils_js_1.concat)(...parts))); + } + catch { + throw new errors_js_1.JOSEError('Failed to parse the JSON Web Key Set HTTP response as JSON'); + } +}; +exports.default = fetchJwks; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/generate.js b/webapp/node_modules/jose/dist/node/cjs/runtime/generate.js new file mode 100644 index 0000000000000000000000000000000000000000..38aa92bae36453ba098777a5ab9144446caf0b1f --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/generate.js @@ -0,0 +1,105 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generateKeyPair = exports.generateSecret = void 0; +const crypto_1 = require("crypto"); +const util_1 = require("util"); +const random_js_1 = require("./random.js"); +const check_modulus_length_js_1 = require("./check_modulus_length.js"); +const errors_js_1 = require("../util/errors.js"); +const generate = (0, util_1.promisify)(crypto_1.generateKeyPair); +async function generateSecret(alg, options) { + let length; + switch (alg) { + case 'HS256': + case 'HS384': + case 'HS512': + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + length = parseInt(alg.slice(-3), 10); + break; + case 'A128KW': + case 'A192KW': + case 'A256KW': + case 'A128GCMKW': + case 'A192GCMKW': + case 'A256GCMKW': + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + length = parseInt(alg.slice(1, 4), 10); + break; + default: + throw new errors_js_1.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value'); + } + return (0, crypto_1.createSecretKey)((0, random_js_1.default)(new Uint8Array(length >> 3))); +} +exports.generateSecret = generateSecret; +async function generateKeyPair(alg, options) { + var _a, _b; + switch (alg) { + case 'RS256': + case 'RS384': + case 'RS512': + case 'PS256': + case 'PS384': + case 'PS512': + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': + case 'RSA1_5': { + const modulusLength = (_a = options === null || options === void 0 ? void 0 : options.modulusLength) !== null && _a !== void 0 ? _a : 2048; + if (typeof modulusLength !== 'number' || modulusLength < 2048) { + throw new errors_js_1.JOSENotSupported('Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used'); + } + const keypair = await generate('rsa', { + modulusLength, + publicExponent: 0x10001, + }); + (0, check_modulus_length_js_1.setModulusLength)(keypair.privateKey, modulusLength); + (0, check_modulus_length_js_1.setModulusLength)(keypair.publicKey, modulusLength); + return keypair; + } + case 'ES256': + return generate('ec', { namedCurve: 'P-256' }); + case 'ES256K': + return generate('ec', { namedCurve: 'secp256k1' }); + case 'ES384': + return generate('ec', { namedCurve: 'P-384' }); + case 'ES512': + return generate('ec', { namedCurve: 'P-521' }); + case 'EdDSA': { + switch (options === null || options === void 0 ? void 0 : options.crv) { + case undefined: + case 'Ed25519': + return generate('ed25519'); + case 'Ed448': + return generate('ed448'); + default: + throw new errors_js_1.JOSENotSupported('Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448'); + } + } + case 'ECDH-ES': + case 'ECDH-ES+A128KW': + case 'ECDH-ES+A192KW': + case 'ECDH-ES+A256KW': + const crv = (_b = options === null || options === void 0 ? void 0 : options.crv) !== null && _b !== void 0 ? _b : 'P-256'; + switch (crv) { + case undefined: + case 'P-256': + case 'P-384': + case 'P-521': + return generate('ec', { namedCurve: crv }); + case 'X25519': + return generate('x25519'); + case 'X448': + return generate('x448'); + default: + throw new errors_js_1.JOSENotSupported('Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448'); + } + default: + throw new errors_js_1.JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value'); + } +} +exports.generateKeyPair = generateKeyPair; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js b/webapp/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js new file mode 100644 index 0000000000000000000000000000000000000000..bb46729e3d126871ed694fb057ffbf0728711a7a --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js @@ -0,0 +1,95 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.setCurve = exports.weakMap = void 0; +const buffer_1 = require("buffer"); +const crypto_1 = require("crypto"); +const errors_js_1 = require("../util/errors.js"); +const webcrypto_js_1 = require("./webcrypto.js"); +const is_key_object_js_1 = require("./is_key_object.js"); +const invalid_key_input_js_1 = require("../lib/invalid_key_input.js"); +const is_key_like_js_1 = require("./is_key_like.js"); +const p256 = buffer_1.Buffer.from([42, 134, 72, 206, 61, 3, 1, 7]); +const p384 = buffer_1.Buffer.from([43, 129, 4, 0, 34]); +const p521 = buffer_1.Buffer.from([43, 129, 4, 0, 35]); +const secp256k1 = buffer_1.Buffer.from([43, 129, 4, 0, 10]); +exports.weakMap = new WeakMap(); +const namedCurveToJOSE = (namedCurve) => { + switch (namedCurve) { + case 'prime256v1': + return 'P-256'; + case 'secp384r1': + return 'P-384'; + case 'secp521r1': + return 'P-521'; + case 'secp256k1': + return 'secp256k1'; + default: + throw new errors_js_1.JOSENotSupported('Unsupported key curve for this operation'); + } +}; +const getNamedCurve = (kee, raw) => { + var _a; + let key; + if ((0, webcrypto_js_1.isCryptoKey)(kee)) { + key = crypto_1.KeyObject.from(kee); + } + else if ((0, is_key_object_js_1.default)(kee)) { + key = kee; + } + else { + throw new TypeError((0, invalid_key_input_js_1.default)(kee, ...is_key_like_js_1.types)); + } + if (key.type === 'secret') { + throw new TypeError('only "private" or "public" type keys can be used for this operation'); + } + switch (key.asymmetricKeyType) { + case 'ed25519': + case 'ed448': + return `Ed${key.asymmetricKeyType.slice(2)}`; + case 'x25519': + case 'x448': + return `X${key.asymmetricKeyType.slice(1)}`; + case 'ec': { + if (exports.weakMap.has(key)) { + return exports.weakMap.get(key); + } + let namedCurve = (_a = key.asymmetricKeyDetails) === null || _a === void 0 ? void 0 : _a.namedCurve; + if (!namedCurve && key.type === 'private') { + namedCurve = getNamedCurve((0, crypto_1.createPublicKey)(key), true); + } + else if (!namedCurve) { + const buf = key.export({ format: 'der', type: 'spki' }); + const i = buf[1] < 128 ? 14 : 15; + const len = buf[i]; + const curveOid = buf.slice(i + 1, i + 1 + len); + if (curveOid.equals(p256)) { + namedCurve = 'prime256v1'; + } + else if (curveOid.equals(p384)) { + namedCurve = 'secp384r1'; + } + else if (curveOid.equals(p521)) { + namedCurve = 'secp521r1'; + } + else if (curveOid.equals(secp256k1)) { + namedCurve = 'secp256k1'; + } + else { + throw new errors_js_1.JOSENotSupported('Unsupported key curve for this operation'); + } + } + if (raw) + return namedCurve; + const curve = namedCurveToJOSE(namedCurve); + exports.weakMap.set(key, curve); + return curve; + } + default: + throw new TypeError('Invalid asymmetric key type for this operation'); + } +}; +function setCurve(keyObject, curve) { + exports.weakMap.set(keyObject, curve); +} +exports.setCurve = setCurve; +exports.default = getNamedCurve; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js b/webapp/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js new file mode 100644 index 0000000000000000000000000000000000000000..fea98c71d5428dcf55df07505fb848a1f443e999 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto_1 = require("crypto"); +const webcrypto_js_1 = require("./webcrypto.js"); +const crypto_key_js_1 = require("../lib/crypto_key.js"); +const invalid_key_input_js_1 = require("../lib/invalid_key_input.js"); +const is_key_like_js_1 = require("./is_key_like.js"); +function getSignVerifyKey(alg, key, usage) { + if (key instanceof Uint8Array) { + if (!alg.startsWith('HS')) { + throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types)); + } + return (0, crypto_1.createSecretKey)(key); + } + if (key instanceof crypto_1.KeyObject) { + return key; + } + if ((0, webcrypto_js_1.isCryptoKey)(key)) { + (0, crypto_key_js_1.checkSigCryptoKey)(key, alg, usage); + return crypto_1.KeyObject.from(key); + } + throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types, 'Uint8Array')); +} +exports.default = getSignVerifyKey; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js b/webapp/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js new file mode 100644 index 0000000000000000000000000000000000000000..c3935124c7655e13d9e0518020707cf5ccd35f56 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const errors_js_1 = require("../util/errors.js"); +function hmacDigest(alg) { + switch (alg) { + case 'HS256': + return 'sha256'; + case 'HS384': + return 'sha384'; + case 'HS512': + return 'sha512'; + default: + throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} +exports.default = hmacDigest; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/is_key_like.js b/webapp/node_modules/jose/dist/node/cjs/runtime/is_key_like.js new file mode 100644 index 0000000000000000000000000000000000000000..7e53a1ae0c2518debbd450e60f53dde6fadff805 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/is_key_like.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.types = void 0; +const webcrypto_js_1 = require("./webcrypto.js"); +const is_key_object_js_1 = require("./is_key_object.js"); +exports.default = (key) => (0, is_key_object_js_1.default)(key) || (0, webcrypto_js_1.isCryptoKey)(key); +const types = ['KeyObject']; +exports.types = types; +if (parseInt(process.versions.node) >= 16) { + types.push('CryptoKey'); +} diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/is_key_object.js b/webapp/node_modules/jose/dist/node/cjs/runtime/is_key_object.js new file mode 100644 index 0000000000000000000000000000000000000000..54b02cca1b91c90f9b959db9ba9fece7cdac1b34 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/is_key_object.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto_1 = require("crypto"); +const util = require("util"); +exports.default = util.types.isKeyObject + ? (obj) => util.types.isKeyObject(obj) + : (obj) => obj != null && obj instanceof crypto_1.KeyObject; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js b/webapp/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js new file mode 100644 index 0000000000000000000000000000000000000000..3658809c7dfea429e259abb7c7d6d746eb5a8fa5 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js @@ -0,0 +1,122 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const buffer_1 = require("buffer"); +const crypto_1 = require("crypto"); +const base64url_js_1 = require("./base64url.js"); +const errors_js_1 = require("../util/errors.js"); +const get_named_curve_js_1 = require("./get_named_curve.js"); +const check_modulus_length_js_1 = require("./check_modulus_length.js"); +const asn1_sequence_encoder_js_1 = require("./asn1_sequence_encoder.js"); +const [major, minor] = process.version + .slice(1) + .split('.') + .map((str) => parseInt(str, 10)); +const jwkImportSupported = major >= 16 || (major === 15 && minor >= 12); +const parse = (jwk) => { + if (jwkImportSupported && jwk.kty !== 'oct') { + return jwk.d + ? (0, crypto_1.createPrivateKey)({ format: 'jwk', key: jwk }) + : (0, crypto_1.createPublicKey)({ format: 'jwk', key: jwk }); + } + switch (jwk.kty) { + case 'oct': { + return (0, crypto_1.createSecretKey)((0, base64url_js_1.decode)(jwk.k)); + } + case 'RSA': { + const enc = new asn1_sequence_encoder_js_1.default(); + const isPrivate = jwk.d !== undefined; + const modulus = buffer_1.Buffer.from(jwk.n, 'base64'); + const exponent = buffer_1.Buffer.from(jwk.e, 'base64'); + if (isPrivate) { + enc.zero(); + enc.unsignedInteger(modulus); + enc.unsignedInteger(exponent); + enc.unsignedInteger(buffer_1.Buffer.from(jwk.d, 'base64')); + enc.unsignedInteger(buffer_1.Buffer.from(jwk.p, 'base64')); + enc.unsignedInteger(buffer_1.Buffer.from(jwk.q, 'base64')); + enc.unsignedInteger(buffer_1.Buffer.from(jwk.dp, 'base64')); + enc.unsignedInteger(buffer_1.Buffer.from(jwk.dq, 'base64')); + enc.unsignedInteger(buffer_1.Buffer.from(jwk.qi, 'base64')); + } + else { + enc.unsignedInteger(modulus); + enc.unsignedInteger(exponent); + } + const der = enc.end(); + const createInput = { + key: der, + format: 'der', + type: 'pkcs1', + }; + const keyObject = isPrivate ? (0, crypto_1.createPrivateKey)(createInput) : (0, crypto_1.createPublicKey)(createInput); + (0, check_modulus_length_js_1.setModulusLength)(keyObject, modulus.length << 3); + return keyObject; + } + case 'EC': { + const enc = new asn1_sequence_encoder_js_1.default(); + const isPrivate = jwk.d !== undefined; + const pub = buffer_1.Buffer.concat([ + buffer_1.Buffer.alloc(1, 4), + buffer_1.Buffer.from(jwk.x, 'base64'), + buffer_1.Buffer.from(jwk.y, 'base64'), + ]); + if (isPrivate) { + enc.zero(); + const enc$1 = new asn1_sequence_encoder_js_1.default(); + enc$1.oidFor('ecPublicKey'); + enc$1.oidFor(jwk.crv); + enc.add(enc$1.end()); + const enc$2 = new asn1_sequence_encoder_js_1.default(); + enc$2.one(); + enc$2.octStr(buffer_1.Buffer.from(jwk.d, 'base64')); + const enc$3 = new asn1_sequence_encoder_js_1.default(); + enc$3.bitStr(pub); + const f2 = enc$3.end(buffer_1.Buffer.from([0xa1])); + enc$2.add(f2); + const f = enc$2.end(); + const enc$4 = new asn1_sequence_encoder_js_1.default(); + enc$4.add(f); + const f3 = enc$4.end(buffer_1.Buffer.from([0x04])); + enc.add(f3); + const der = enc.end(); + const keyObject = (0, crypto_1.createPrivateKey)({ key: der, format: 'der', type: 'pkcs8' }); + (0, get_named_curve_js_1.setCurve)(keyObject, jwk.crv); + return keyObject; + } + const enc$1 = new asn1_sequence_encoder_js_1.default(); + enc$1.oidFor('ecPublicKey'); + enc$1.oidFor(jwk.crv); + enc.add(enc$1.end()); + enc.bitStr(pub); + const der = enc.end(); + const keyObject = (0, crypto_1.createPublicKey)({ key: der, format: 'der', type: 'spki' }); + (0, get_named_curve_js_1.setCurve)(keyObject, jwk.crv); + return keyObject; + } + case 'OKP': { + const enc = new asn1_sequence_encoder_js_1.default(); + const isPrivate = jwk.d !== undefined; + if (isPrivate) { + enc.zero(); + const enc$1 = new asn1_sequence_encoder_js_1.default(); + enc$1.oidFor(jwk.crv); + enc.add(enc$1.end()); + const enc$2 = new asn1_sequence_encoder_js_1.default(); + enc$2.octStr(buffer_1.Buffer.from(jwk.d, 'base64')); + const f = enc$2.end(buffer_1.Buffer.from([0x04])); + enc.add(f); + const der = enc.end(); + return (0, crypto_1.createPrivateKey)({ key: der, format: 'der', type: 'pkcs8' }); + } + const enc$1 = new asn1_sequence_encoder_js_1.default(); + enc$1.oidFor(jwk.crv); + enc.add(enc$1.end()); + enc.bitStr(buffer_1.Buffer.from(jwk.x, 'base64')); + const der = enc.end(); + return (0, crypto_1.createPublicKey)({ key: der, format: 'der', type: 'spki' }); + } + default: + throw new errors_js_1.JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value'); + } +}; +exports.default = parse; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js b/webapp/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js new file mode 100644 index 0000000000000000000000000000000000000000..9bd0df872d4baba445afcd2946fac8783d327030 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js @@ -0,0 +1,164 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto_1 = require("crypto"); +const base64url_js_1 = require("./base64url.js"); +const asn1_sequence_decoder_js_1 = require("./asn1_sequence_decoder.js"); +const errors_js_1 = require("../util/errors.js"); +const get_named_curve_js_1 = require("./get_named_curve.js"); +const webcrypto_js_1 = require("./webcrypto.js"); +const is_key_object_js_1 = require("./is_key_object.js"); +const invalid_key_input_js_1 = require("../lib/invalid_key_input.js"); +const is_key_like_js_1 = require("./is_key_like.js"); +const [major, minor] = process.version + .slice(1) + .split('.') + .map((str) => parseInt(str, 10)); +const jwkExportSupported = major >= 16 || (major === 15 && minor >= 9); +const keyToJWK = (key) => { + let keyObject; + if ((0, webcrypto_js_1.isCryptoKey)(key)) { + if (!key.extractable) { + throw new TypeError('CryptoKey is not extractable'); + } + keyObject = crypto_1.KeyObject.from(key); + } + else if ((0, is_key_object_js_1.default)(key)) { + keyObject = key; + } + else if (key instanceof Uint8Array) { + return { + kty: 'oct', + k: (0, base64url_js_1.encode)(key), + }; + } + else { + throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types, 'Uint8Array')); + } + if (jwkExportSupported) { + if (keyObject.type !== 'secret' && + !['rsa', 'ec', 'ed25519', 'x25519', 'ed448', 'x448'].includes(keyObject.asymmetricKeyType)) { + throw new errors_js_1.JOSENotSupported('Unsupported key asymmetricKeyType'); + } + return keyObject.export({ format: 'jwk' }); + } + switch (keyObject.type) { + case 'secret': + return { + kty: 'oct', + k: (0, base64url_js_1.encode)(keyObject.export()), + }; + case 'private': + case 'public': { + switch (keyObject.asymmetricKeyType) { + case 'rsa': { + const der = keyObject.export({ format: 'der', type: 'pkcs1' }); + const dec = new asn1_sequence_decoder_js_1.default(der); + if (keyObject.type === 'private') { + dec.unsignedInteger(); + } + const n = (0, base64url_js_1.encode)(dec.unsignedInteger()); + const e = (0, base64url_js_1.encode)(dec.unsignedInteger()); + let jwk; + if (keyObject.type === 'private') { + jwk = { + d: (0, base64url_js_1.encode)(dec.unsignedInteger()), + p: (0, base64url_js_1.encode)(dec.unsignedInteger()), + q: (0, base64url_js_1.encode)(dec.unsignedInteger()), + dp: (0, base64url_js_1.encode)(dec.unsignedInteger()), + dq: (0, base64url_js_1.encode)(dec.unsignedInteger()), + qi: (0, base64url_js_1.encode)(dec.unsignedInteger()), + }; + } + dec.end(); + return { kty: 'RSA', n, e, ...jwk }; + } + case 'ec': { + const crv = (0, get_named_curve_js_1.default)(keyObject); + let len; + let offset; + let correction; + switch (crv) { + case 'secp256k1': + len = 64; + offset = 31 + 2; + correction = -1; + break; + case 'P-256': + len = 64; + offset = 34 + 2; + correction = -1; + break; + case 'P-384': + len = 96; + offset = 33 + 2; + correction = -3; + break; + case 'P-521': + len = 132; + offset = 33 + 2; + correction = -3; + break; + default: + throw new errors_js_1.JOSENotSupported('Unsupported curve'); + } + if (keyObject.type === 'public') { + const der = keyObject.export({ type: 'spki', format: 'der' }); + return { + kty: 'EC', + crv, + x: (0, base64url_js_1.encode)(der.subarray(-len, -len / 2)), + y: (0, base64url_js_1.encode)(der.subarray(-len / 2)), + }; + } + const der = keyObject.export({ type: 'pkcs8', format: 'der' }); + if (der.length < 100) { + offset += correction; + } + return { + ...keyToJWK((0, crypto_1.createPublicKey)(keyObject)), + d: (0, base64url_js_1.encode)(der.subarray(offset, offset + len / 2)), + }; + } + case 'ed25519': + case 'x25519': { + const crv = (0, get_named_curve_js_1.default)(keyObject); + if (keyObject.type === 'public') { + const der = keyObject.export({ type: 'spki', format: 'der' }); + return { + kty: 'OKP', + crv, + x: (0, base64url_js_1.encode)(der.subarray(-32)), + }; + } + const der = keyObject.export({ type: 'pkcs8', format: 'der' }); + return { + ...keyToJWK((0, crypto_1.createPublicKey)(keyObject)), + d: (0, base64url_js_1.encode)(der.subarray(-32)), + }; + } + case 'ed448': + case 'x448': { + const crv = (0, get_named_curve_js_1.default)(keyObject); + if (keyObject.type === 'public') { + const der = keyObject.export({ type: 'spki', format: 'der' }); + return { + kty: 'OKP', + crv, + x: (0, base64url_js_1.encode)(der.subarray(crv === 'Ed448' ? -57 : -56)), + }; + } + const der = keyObject.export({ type: 'pkcs8', format: 'der' }); + return { + ...keyToJWK((0, crypto_1.createPublicKey)(keyObject)), + d: (0, base64url_js_1.encode)(der.subarray(crv === 'Ed448' ? -57 : -56)), + }; + } + default: + throw new errors_js_1.JOSENotSupported('Unsupported key asymmetricKeyType'); + } + } + default: + throw new errors_js_1.JOSENotSupported('Unsupported key type'); + } +}; +exports.default = keyToJWK; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/node_key.js b/webapp/node_modules/jose/dist/node/cjs/runtime/node_key.js new file mode 100644 index 0000000000000000000000000000000000000000..a1672aaa92933f0add819472969beb74431cc3f3 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/node_key.js @@ -0,0 +1,83 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto_1 = require("crypto"); +const get_named_curve_js_1 = require("./get_named_curve.js"); +const errors_js_1 = require("../util/errors.js"); +const check_modulus_length_js_1 = require("./check_modulus_length.js"); +const [major, minor] = process.version + .slice(1) + .split('.') + .map((str) => parseInt(str, 10)); +const electron = 'electron' in process.versions; +const rsaPssParams = !electron && (major >= 17 || (major === 16 && minor >= 9)); +const PSS = { + padding: crypto_1.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto_1.constants.RSA_PSS_SALTLEN_DIGEST, +}; +const ecCurveAlgMap = new Map([ + ['ES256', 'P-256'], + ['ES256K', 'secp256k1'], + ['ES384', 'P-384'], + ['ES512', 'P-521'], +]); +function keyForCrypto(alg, key) { + switch (alg) { + case 'EdDSA': + if (!['ed25519', 'ed448'].includes(key.asymmetricKeyType)) { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448'); + } + return key; + case 'RS256': + case 'RS384': + case 'RS512': + if (key.asymmetricKeyType !== 'rsa') { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa'); + } + (0, check_modulus_length_js_1.default)(key, alg); + return key; + case rsaPssParams && 'PS256': + case rsaPssParams && 'PS384': + case rsaPssParams && 'PS512': + if (key.asymmetricKeyType === 'rsa-pss') { + const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails; + const length = parseInt(alg.slice(-3), 10); + if (hashAlgorithm !== undefined && + (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm)) { + throw new TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${alg}`); + } + if (saltLength !== undefined && saltLength > length >> 3) { + throw new TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${alg}`); + } + } + else if (key.asymmetricKeyType !== 'rsa') { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss'); + } + (0, check_modulus_length_js_1.default)(key, alg); + return { key, ...PSS }; + case !rsaPssParams && 'PS256': + case !rsaPssParams && 'PS384': + case !rsaPssParams && 'PS512': + if (key.asymmetricKeyType !== 'rsa') { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa'); + } + (0, check_modulus_length_js_1.default)(key, alg); + return { key, ...PSS }; + case 'ES256': + case 'ES256K': + case 'ES384': + case 'ES512': { + if (key.asymmetricKeyType !== 'ec') { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be ec'); + } + const actual = (0, get_named_curve_js_1.default)(key); + const expected = ecCurveAlgMap.get(alg); + if (actual !== expected) { + throw new TypeError(`Invalid key curve for the algorithm, its curve must be ${expected}, got ${actual}`); + } + return { dsaEncoding: 'ieee-p1363', key }; + } + default: + throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} +exports.default = keyForCrypto; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js b/webapp/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js new file mode 100644 index 0000000000000000000000000000000000000000..8298b0e7d8367eaf03d1eae4579bd9bb0f662ba0 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decrypt = exports.encrypt = void 0; +const util_1 = require("util"); +const crypto_1 = require("crypto"); +const random_js_1 = require("./random.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const base64url_js_1 = require("./base64url.js"); +const aeskw_js_1 = require("./aeskw.js"); +const check_p2s_js_1 = require("../lib/check_p2s.js"); +const webcrypto_js_1 = require("./webcrypto.js"); +const crypto_key_js_1 = require("../lib/crypto_key.js"); +const is_key_object_js_1 = require("./is_key_object.js"); +const invalid_key_input_js_1 = require("../lib/invalid_key_input.js"); +const is_key_like_js_1 = require("./is_key_like.js"); +const pbkdf2 = (0, util_1.promisify)(crypto_1.pbkdf2); +function getPassword(key, alg) { + if ((0, is_key_object_js_1.default)(key)) { + return key.export(); + } + if (key instanceof Uint8Array) { + return key; + } + if ((0, webcrypto_js_1.isCryptoKey)(key)) { + (0, crypto_key_js_1.checkEncCryptoKey)(key, alg, 'deriveBits', 'deriveKey'); + return crypto_1.KeyObject.from(key).export(); + } + throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types, 'Uint8Array')); +} +const encrypt = async (alg, key, cek, p2c = 2048, p2s = (0, random_js_1.default)(new Uint8Array(16))) => { + (0, check_p2s_js_1.default)(p2s); + const salt = (0, buffer_utils_js_1.p2s)(alg, p2s); + const keylen = parseInt(alg.slice(13, 16), 10) >> 3; + const password = getPassword(key, alg); + const derivedKey = await pbkdf2(password, salt, p2c, keylen, `sha${alg.slice(8, 11)}`); + const encryptedKey = await (0, aeskw_js_1.wrap)(alg.slice(-6), derivedKey, cek); + return { encryptedKey, p2c, p2s: (0, base64url_js_1.encode)(p2s) }; +}; +exports.encrypt = encrypt; +const decrypt = async (alg, key, encryptedKey, p2c, p2s) => { + (0, check_p2s_js_1.default)(p2s); + const salt = (0, buffer_utils_js_1.p2s)(alg, p2s); + const keylen = parseInt(alg.slice(13, 16), 10) >> 3; + const password = getPassword(key, alg); + const derivedKey = await pbkdf2(password, salt, p2c, keylen, `sha${alg.slice(8, 11)}`); + return (0, aeskw_js_1.unwrap)(alg.slice(-6), derivedKey, encryptedKey); +}; +exports.decrypt = decrypt; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/random.js b/webapp/node_modules/jose/dist/node/cjs/runtime/random.js new file mode 100644 index 0000000000000000000000000000000000000000..459da2bb0841a401fd1d08858c554319b5aa45c5 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/random.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = void 0; +var crypto_1 = require("crypto"); +Object.defineProperty(exports, "default", { enumerable: true, get: function () { return crypto_1.randomFillSync; } }); diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/rsaes.js b/webapp/node_modules/jose/dist/node/cjs/runtime/rsaes.js new file mode 100644 index 0000000000000000000000000000000000000000..4e625226b8b055e2bb0c9241ed635cd57c3675d1 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/rsaes.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decrypt = exports.encrypt = void 0; +const crypto_1 = require("crypto"); +const check_modulus_length_js_1 = require("./check_modulus_length.js"); +const webcrypto_js_1 = require("./webcrypto.js"); +const crypto_key_js_1 = require("../lib/crypto_key.js"); +const is_key_object_js_1 = require("./is_key_object.js"); +const invalid_key_input_js_1 = require("../lib/invalid_key_input.js"); +const is_key_like_js_1 = require("./is_key_like.js"); +const checkKey = (key, alg) => { + if (key.asymmetricKeyType !== 'rsa') { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa'); + } + (0, check_modulus_length_js_1.default)(key, alg); +}; +const resolvePadding = (alg) => { + switch (alg) { + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': + return crypto_1.constants.RSA_PKCS1_OAEP_PADDING; + case 'RSA1_5': + return crypto_1.constants.RSA_PKCS1_PADDING; + default: + return undefined; + } +}; +const resolveOaepHash = (alg) => { + switch (alg) { + case 'RSA-OAEP': + return 'sha1'; + case 'RSA-OAEP-256': + return 'sha256'; + case 'RSA-OAEP-384': + return 'sha384'; + case 'RSA-OAEP-512': + return 'sha512'; + default: + return undefined; + } +}; +function ensureKeyObject(key, alg, ...usages) { + if ((0, is_key_object_js_1.default)(key)) { + return key; + } + if ((0, webcrypto_js_1.isCryptoKey)(key)) { + (0, crypto_key_js_1.checkEncCryptoKey)(key, alg, ...usages); + return crypto_1.KeyObject.from(key); + } + throw new TypeError((0, invalid_key_input_js_1.default)(key, ...is_key_like_js_1.types)); +} +const encrypt = (alg, key, cek) => { + const padding = resolvePadding(alg); + const oaepHash = resolveOaepHash(alg); + const keyObject = ensureKeyObject(key, alg, 'wrapKey', 'encrypt'); + checkKey(keyObject, alg); + return (0, crypto_1.publicEncrypt)({ key: keyObject, oaepHash, padding }, cek); +}; +exports.encrypt = encrypt; +const decrypt = (alg, key, encryptedKey) => { + const padding = resolvePadding(alg); + const oaepHash = resolveOaepHash(alg); + const keyObject = ensureKeyObject(key, alg, 'unwrapKey', 'decrypt'); + checkKey(keyObject, alg); + return (0, crypto_1.privateDecrypt)({ key: keyObject, oaepHash, padding }, encryptedKey); +}; +exports.decrypt = decrypt; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/sign.js b/webapp/node_modules/jose/dist/node/cjs/runtime/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..cc19300d9e8409704cbeb61b75aa043032b06920 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/sign.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto = require("crypto"); +const util_1 = require("util"); +const dsa_digest_js_1 = require("./dsa_digest.js"); +const hmac_digest_js_1 = require("./hmac_digest.js"); +const node_key_js_1 = require("./node_key.js"); +const get_sign_verify_key_js_1 = require("./get_sign_verify_key.js"); +let oneShotSign; +if (crypto.sign.length > 3) { + oneShotSign = (0, util_1.promisify)(crypto.sign); +} +else { + oneShotSign = crypto.sign; +} +const sign = async (alg, key, data) => { + const keyObject = (0, get_sign_verify_key_js_1.default)(alg, key, 'sign'); + if (alg.startsWith('HS')) { + const hmac = crypto.createHmac((0, hmac_digest_js_1.default)(alg), keyObject); + hmac.update(data); + return hmac.digest(); + } + return oneShotSign((0, dsa_digest_js_1.default)(alg), data, (0, node_key_js_1.default)(alg, keyObject)); +}; +exports.default = sign; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js b/webapp/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js new file mode 100644 index 0000000000000000000000000000000000000000..e1e4ef6100281dbebae316f37cc53b210f1689f4 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto_1 = require("crypto"); +const timingSafeEqual = crypto_1.timingSafeEqual; +exports.default = timingSafeEqual; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/verify.js b/webapp/node_modules/jose/dist/node/cjs/runtime/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..b699472ea296660eba547ffa5db21068dfe820df --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/verify.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const crypto = require("crypto"); +const util_1 = require("util"); +const dsa_digest_js_1 = require("./dsa_digest.js"); +const node_key_js_1 = require("./node_key.js"); +const sign_js_1 = require("./sign.js"); +const get_sign_verify_key_js_1 = require("./get_sign_verify_key.js"); +const [major, minor] = process.version + .slice(1) + .split('.') + .map((str) => parseInt(str, 10)); +const oneShotCallbackSupported = major >= 16 || (major === 15 && minor >= 13); +let oneShotVerify; +if (crypto.verify.length > 4 && oneShotCallbackSupported) { + oneShotVerify = (0, util_1.promisify)(crypto.verify); +} +else { + oneShotVerify = crypto.verify; +} +const verify = async (alg, key, signature, data) => { + const keyObject = (0, get_sign_verify_key_js_1.default)(alg, key, 'verify'); + if (alg.startsWith('HS')) { + const expected = await (0, sign_js_1.default)(alg, keyObject, data); + const actual = signature; + try { + return crypto.timingSafeEqual(actual, expected); + } + catch { + return false; + } + } + const algorithm = (0, dsa_digest_js_1.default)(alg); + const keyInput = (0, node_key_js_1.default)(alg, keyObject); + try { + return await oneShotVerify(algorithm, data, keyInput, signature); + } + catch { + return false; + } +}; +exports.default = verify; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/webcrypto.js b/webapp/node_modules/jose/dist/node/cjs/runtime/webcrypto.js new file mode 100644 index 0000000000000000000000000000000000000000..8a3e72e06ea9cd718760e92a09b9625b79da1585 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/webcrypto.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isCryptoKey = void 0; +const crypto = require("crypto"); +const util = require("util"); +const webcrypto = crypto.webcrypto; +exports.default = webcrypto; +exports.isCryptoKey = util.types.isCryptoKey + ? (key) => util.types.isCryptoKey(key) + : + (key) => false; diff --git a/webapp/node_modules/jose/dist/node/cjs/runtime/zlib.js b/webapp/node_modules/jose/dist/node/cjs/runtime/zlib.js new file mode 100644 index 0000000000000000000000000000000000000000..7dcfddf49b9cc1ccc64cd8c7fbf231728b73246e --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/runtime/zlib.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.deflate = exports.inflate = void 0; +const util_1 = require("util"); +const zlib_1 = require("zlib"); +const inflateRaw = (0, util_1.promisify)(zlib_1.inflateRaw); +const deflateRaw = (0, util_1.promisify)(zlib_1.deflateRaw); +const inflate = (input) => inflateRaw(input); +exports.inflate = inflate; +const deflate = (input) => deflateRaw(input); +exports.deflate = deflate; diff --git a/webapp/node_modules/jose/dist/node/cjs/util/base64url.js b/webapp/node_modules/jose/dist/node/cjs/util/base64url.js new file mode 100644 index 0000000000000000000000000000000000000000..4d383b516797ff34e676c8f3d2a38021c0b548ca --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/util/base64url.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decode = exports.encode = void 0; +const base64url = require("../runtime/base64url.js"); +exports.encode = base64url.encode; +exports.decode = base64url.decode; diff --git a/webapp/node_modules/jose/dist/node/cjs/util/decode_jwt.js b/webapp/node_modules/jose/dist/node/cjs/util/decode_jwt.js new file mode 100644 index 0000000000000000000000000000000000000000..f5b6122e46c6721eb78417e2027fa40d150e35ba --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/util/decode_jwt.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decodeJwt = void 0; +const base64url_js_1 = require("./base64url.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const is_object_js_1 = require("../lib/is_object.js"); +const errors_js_1 = require("./errors.js"); +function decodeJwt(jwt) { + if (typeof jwt !== 'string') + throw new errors_js_1.JWTInvalid('JWTs must use Compact JWS serialization, JWT must be a string'); + const { 1: payload, length } = jwt.split('.'); + if (length === 5) + throw new errors_js_1.JWTInvalid('Only JWTs using Compact JWS serialization can be decoded'); + if (length !== 3) + throw new errors_js_1.JWTInvalid('Invalid JWT'); + if (!payload) + throw new errors_js_1.JWTInvalid('JWTs must contain a payload'); + let decoded; + try { + decoded = (0, base64url_js_1.decode)(payload); + } + catch { + throw new errors_js_1.JWTInvalid('Failed to parse the base64url encoded payload'); + } + let result; + try { + result = JSON.parse(buffer_utils_js_1.decoder.decode(decoded)); + } + catch { + throw new errors_js_1.JWTInvalid('Failed to parse the decoded payload as JSON'); + } + if (!(0, is_object_js_1.default)(result)) + throw new errors_js_1.JWTInvalid('Invalid JWT Claims Set'); + return result; +} +exports.decodeJwt = decodeJwt; diff --git a/webapp/node_modules/jose/dist/node/cjs/util/decode_protected_header.js b/webapp/node_modules/jose/dist/node/cjs/util/decode_protected_header.js new file mode 100644 index 0000000000000000000000000000000000000000..601ebb729710116607f7a38bae089f98b820c48c --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/util/decode_protected_header.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decodeProtectedHeader = void 0; +const base64url_js_1 = require("./base64url.js"); +const buffer_utils_js_1 = require("../lib/buffer_utils.js"); +const is_object_js_1 = require("../lib/is_object.js"); +function decodeProtectedHeader(token) { + let protectedB64u; + if (typeof token === 'string') { + const parts = token.split('.'); + if (parts.length === 3 || parts.length === 5) { + ; + [protectedB64u] = parts; + } + } + else if (typeof token === 'object' && token) { + if ('protected' in token) { + protectedB64u = token.protected; + } + else { + throw new TypeError('Token does not contain a Protected Header'); + } + } + try { + if (typeof protectedB64u !== 'string' || !protectedB64u) { + throw new Error(); + } + const result = JSON.parse(buffer_utils_js_1.decoder.decode((0, base64url_js_1.decode)(protectedB64u))); + if (!(0, is_object_js_1.default)(result)) { + throw new Error(); + } + return result; + } + catch { + throw new TypeError('Invalid Token or Protected Header formatting'); + } +} +exports.decodeProtectedHeader = decodeProtectedHeader; diff --git a/webapp/node_modules/jose/dist/node/cjs/util/errors.js b/webapp/node_modules/jose/dist/node/cjs/util/errors.js new file mode 100644 index 0000000000000000000000000000000000000000..03fa19fa86657adbf7078ce4f6cb879f48bf225a --- /dev/null +++ b/webapp/node_modules/jose/dist/node/cjs/util/errors.js @@ -0,0 +1,165 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.JWSSignatureVerificationFailed = exports.JWKSTimeout = exports.JWKSMultipleMatchingKeys = exports.JWKSNoMatchingKey = exports.JWKSInvalid = exports.JWKInvalid = exports.JWTInvalid = exports.JWSInvalid = exports.JWEInvalid = exports.JWEDecryptionFailed = exports.JOSENotSupported = exports.JOSEAlgNotAllowed = exports.JWTExpired = exports.JWTClaimValidationFailed = exports.JOSEError = void 0; +class JOSEError extends Error { + constructor(message) { + var _a; + super(message); + this.code = 'ERR_JOSE_GENERIC'; + this.name = this.constructor.name; + (_a = Error.captureStackTrace) === null || _a === void 0 ? void 0 : _a.call(Error, this, this.constructor); + } + static get code() { + return 'ERR_JOSE_GENERIC'; + } +} +exports.JOSEError = JOSEError; +class JWTClaimValidationFailed extends JOSEError { + constructor(message, claim = 'unspecified', reason = 'unspecified') { + super(message); + this.code = 'ERR_JWT_CLAIM_VALIDATION_FAILED'; + this.claim = claim; + this.reason = reason; + } + static get code() { + return 'ERR_JWT_CLAIM_VALIDATION_FAILED'; + } +} +exports.JWTClaimValidationFailed = JWTClaimValidationFailed; +class JWTExpired extends JOSEError { + constructor(message, claim = 'unspecified', reason = 'unspecified') { + super(message); + this.code = 'ERR_JWT_EXPIRED'; + this.claim = claim; + this.reason = reason; + } + static get code() { + return 'ERR_JWT_EXPIRED'; + } +} +exports.JWTExpired = JWTExpired; +class JOSEAlgNotAllowed extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JOSE_ALG_NOT_ALLOWED'; + } + static get code() { + return 'ERR_JOSE_ALG_NOT_ALLOWED'; + } +} +exports.JOSEAlgNotAllowed = JOSEAlgNotAllowed; +class JOSENotSupported extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JOSE_NOT_SUPPORTED'; + } + static get code() { + return 'ERR_JOSE_NOT_SUPPORTED'; + } +} +exports.JOSENotSupported = JOSENotSupported; +class JWEDecryptionFailed extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWE_DECRYPTION_FAILED'; + this.message = 'decryption operation failed'; + } + static get code() { + return 'ERR_JWE_DECRYPTION_FAILED'; + } +} +exports.JWEDecryptionFailed = JWEDecryptionFailed; +class JWEInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWE_INVALID'; + } + static get code() { + return 'ERR_JWE_INVALID'; + } +} +exports.JWEInvalid = JWEInvalid; +class JWSInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWS_INVALID'; + } + static get code() { + return 'ERR_JWS_INVALID'; + } +} +exports.JWSInvalid = JWSInvalid; +class JWTInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWT_INVALID'; + } + static get code() { + return 'ERR_JWT_INVALID'; + } +} +exports.JWTInvalid = JWTInvalid; +class JWKInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWK_INVALID'; + } + static get code() { + return 'ERR_JWK_INVALID'; + } +} +exports.JWKInvalid = JWKInvalid; +class JWKSInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_INVALID'; + } + static get code() { + return 'ERR_JWKS_INVALID'; + } +} +exports.JWKSInvalid = JWKSInvalid; +class JWKSNoMatchingKey extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_NO_MATCHING_KEY'; + this.message = 'no applicable key found in the JSON Web Key Set'; + } + static get code() { + return 'ERR_JWKS_NO_MATCHING_KEY'; + } +} +exports.JWKSNoMatchingKey = JWKSNoMatchingKey; +class JWKSMultipleMatchingKeys extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS'; + this.message = 'multiple matching keys found in the JSON Web Key Set'; + } + static get code() { + return 'ERR_JWKS_MULTIPLE_MATCHING_KEYS'; + } +} +exports.JWKSMultipleMatchingKeys = JWKSMultipleMatchingKeys; +class JWKSTimeout extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_TIMEOUT'; + this.message = 'request timed out'; + } + static get code() { + return 'ERR_JWKS_TIMEOUT'; + } +} +exports.JWKSTimeout = JWKSTimeout; +class JWSSignatureVerificationFailed extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'; + this.message = 'signature verification failed'; + } + static get code() { + return 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'; + } +} +exports.JWSSignatureVerificationFailed = JWSSignatureVerificationFailed; diff --git a/webapp/node_modules/jose/dist/node/esm/index.js b/webapp/node_modules/jose/dist/node/esm/index.js new file mode 100644 index 0000000000000000000000000000000000000000..d2ce09d71ab5115c295781b73fe4afd5d7b40ba6 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/index.js @@ -0,0 +1,29 @@ +export { compactDecrypt } from './jwe/compact/decrypt.js'; +export { flattenedDecrypt } from './jwe/flattened/decrypt.js'; +export { generalDecrypt } from './jwe/general/decrypt.js'; +export { GeneralEncrypt } from './jwe/general/encrypt.js'; +export { compactVerify } from './jws/compact/verify.js'; +export { flattenedVerify } from './jws/flattened/verify.js'; +export { generalVerify } from './jws/general/verify.js'; +export { jwtVerify } from './jwt/verify.js'; +export { jwtDecrypt } from './jwt/decrypt.js'; +export { CompactEncrypt } from './jwe/compact/encrypt.js'; +export { FlattenedEncrypt } from './jwe/flattened/encrypt.js'; +export { CompactSign } from './jws/compact/sign.js'; +export { FlattenedSign } from './jws/flattened/sign.js'; +export { GeneralSign } from './jws/general/sign.js'; +export { SignJWT } from './jwt/sign.js'; +export { EncryptJWT } from './jwt/encrypt.js'; +export { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint.js'; +export { EmbeddedJWK } from './jwk/embedded.js'; +export { createLocalJWKSet } from './jwks/local.js'; +export { createRemoteJWKSet } from './jwks/remote.js'; +export { UnsecuredJWT } from './jwt/unsecured.js'; +export { exportPKCS8, exportSPKI, exportJWK } from './key/export.js'; +export { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js'; +export { decodeProtectedHeader } from './util/decode_protected_header.js'; +export { decodeJwt } from './util/decode_jwt.js'; +export * as errors from './util/errors.js'; +export { generateKeyPair } from './key/generate_key_pair.js'; +export { generateSecret } from './key/generate_secret.js'; +export * as base64url from './util/base64url.js'; diff --git a/webapp/node_modules/jose/dist/node/esm/jwe/compact/decrypt.js b/webapp/node_modules/jose/dist/node/esm/jwe/compact/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..129aeb6e39009bac382346947235e409be5b25ac --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwe/compact/decrypt.js @@ -0,0 +1,27 @@ +import { flattenedDecrypt } from '../flattened/decrypt.js'; +import { JWEInvalid } from '../../util/errors.js'; +import { decoder } from '../../lib/buffer_utils.js'; +export async function compactDecrypt(jwe, key, options) { + if (jwe instanceof Uint8Array) { + jwe = decoder.decode(jwe); + } + if (typeof jwe !== 'string') { + throw new JWEInvalid('Compact JWE must be a string or Uint8Array'); + } + const { 0: protectedHeader, 1: encryptedKey, 2: iv, 3: ciphertext, 4: tag, length, } = jwe.split('.'); + if (length !== 5) { + throw new JWEInvalid('Invalid Compact JWE'); + } + const decrypted = await flattenedDecrypt({ + ciphertext, + iv: (iv || undefined), + protected: protectedHeader || undefined, + tag: (tag || undefined), + encrypted_key: encryptedKey || undefined, + }, key, options); + const result = { plaintext: decrypted.plaintext, protectedHeader: decrypted.protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: decrypted.key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwe/compact/encrypt.js b/webapp/node_modules/jose/dist/node/esm/jwe/compact/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..e689139465837103e186258977a954deda6370b1 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwe/compact/encrypt.js @@ -0,0 +1,26 @@ +import { FlattenedEncrypt } from '../flattened/encrypt.js'; +export class CompactEncrypt { + constructor(plaintext) { + this._flattened = new FlattenedEncrypt(plaintext); + } + setContentEncryptionKey(cek) { + this._flattened.setContentEncryptionKey(cek); + return this; + } + setInitializationVector(iv) { + this._flattened.setInitializationVector(iv); + return this; + } + setProtectedHeader(protectedHeader) { + this._flattened.setProtectedHeader(protectedHeader); + return this; + } + setKeyManagementParameters(parameters) { + this._flattened.setKeyManagementParameters(parameters); + return this; + } + async encrypt(key, options) { + const jwe = await this._flattened.encrypt(key, options); + return [jwe.protected, jwe.encrypted_key, jwe.iv, jwe.ciphertext, jwe.tag].join('.'); + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwe/flattened/decrypt.js b/webapp/node_modules/jose/dist/node/esm/jwe/flattened/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..a6d128a6ba7d66e90ed47a093c1d33793d438ba8 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwe/flattened/decrypt.js @@ -0,0 +1,137 @@ +import { decode as base64url } from '../../runtime/base64url.js'; +import decrypt from '../../runtime/decrypt.js'; +import { inflate } from '../../runtime/zlib.js'; +import { JOSEAlgNotAllowed, JOSENotSupported, JWEInvalid } from '../../util/errors.js'; +import isDisjoint from '../../lib/is_disjoint.js'; +import isObject from '../../lib/is_object.js'; +import decryptKeyManagement from '../../lib/decrypt_key_management.js'; +import { encoder, decoder, concat } from '../../lib/buffer_utils.js'; +import generateCek from '../../lib/cek.js'; +import validateCrit from '../../lib/validate_crit.js'; +import validateAlgorithms from '../../lib/validate_algorithms.js'; +export async function flattenedDecrypt(jwe, key, options) { + var _a; + if (!isObject(jwe)) { + throw new JWEInvalid('Flattened JWE must be an object'); + } + if (jwe.protected === undefined && jwe.header === undefined && jwe.unprotected === undefined) { + throw new JWEInvalid('JOSE Header missing'); + } + if (typeof jwe.iv !== 'string') { + throw new JWEInvalid('JWE Initialization Vector missing or incorrect type'); + } + if (typeof jwe.ciphertext !== 'string') { + throw new JWEInvalid('JWE Ciphertext missing or incorrect type'); + } + if (typeof jwe.tag !== 'string') { + throw new JWEInvalid('JWE Authentication Tag missing or incorrect type'); + } + if (jwe.protected !== undefined && typeof jwe.protected !== 'string') { + throw new JWEInvalid('JWE Protected Header incorrect type'); + } + if (jwe.encrypted_key !== undefined && typeof jwe.encrypted_key !== 'string') { + throw new JWEInvalid('JWE Encrypted Key incorrect type'); + } + if (jwe.aad !== undefined && typeof jwe.aad !== 'string') { + throw new JWEInvalid('JWE AAD incorrect type'); + } + if (jwe.header !== undefined && !isObject(jwe.header)) { + throw new JWEInvalid('JWE Shared Unprotected Header incorrect type'); + } + if (jwe.unprotected !== undefined && !isObject(jwe.unprotected)) { + throw new JWEInvalid('JWE Per-Recipient Unprotected Header incorrect type'); + } + let parsedProt; + if (jwe.protected) { + try { + const protectedHeader = base64url(jwe.protected); + parsedProt = JSON.parse(decoder.decode(protectedHeader)); + } + catch { + throw new JWEInvalid('JWE Protected Header is invalid'); + } + } + if (!isDisjoint(parsedProt, jwe.header, jwe.unprotected)) { + throw new JWEInvalid('JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint'); + } + const joseHeader = { + ...parsedProt, + ...jwe.header, + ...jwe.unprotected, + }; + validateCrit(JWEInvalid, new Map(), options === null || options === void 0 ? void 0 : options.crit, parsedProt, joseHeader); + if (joseHeader.zip !== undefined) { + if (!parsedProt || !parsedProt.zip) { + throw new JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected'); + } + if (joseHeader.zip !== 'DEF') { + throw new JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value'); + } + } + const { alg, enc } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new JWEInvalid('missing JWE Algorithm (alg) in JWE Header'); + } + if (typeof enc !== 'string' || !enc) { + throw new JWEInvalid('missing JWE Encryption Algorithm (enc) in JWE Header'); + } + const keyManagementAlgorithms = options && validateAlgorithms('keyManagementAlgorithms', options.keyManagementAlgorithms); + const contentEncryptionAlgorithms = options && + validateAlgorithms('contentEncryptionAlgorithms', options.contentEncryptionAlgorithms); + if (keyManagementAlgorithms && !keyManagementAlgorithms.has(alg)) { + throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed'); + } + if (contentEncryptionAlgorithms && !contentEncryptionAlgorithms.has(enc)) { + throw new JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter not allowed'); + } + let encryptedKey; + if (jwe.encrypted_key !== undefined) { + encryptedKey = base64url(jwe.encrypted_key); + } + let resolvedKey = false; + if (typeof key === 'function') { + key = await key(parsedProt, jwe); + resolvedKey = true; + } + let cek; + try { + cek = await decryptKeyManagement(alg, key, encryptedKey, joseHeader); + } + catch (err) { + if (err instanceof TypeError) { + throw err; + } + cek = generateCek(enc); + } + const iv = base64url(jwe.iv); + const tag = base64url(jwe.tag); + const protectedHeader = encoder.encode((_a = jwe.protected) !== null && _a !== void 0 ? _a : ''); + let additionalData; + if (jwe.aad !== undefined) { + additionalData = concat(protectedHeader, encoder.encode('.'), encoder.encode(jwe.aad)); + } + else { + additionalData = protectedHeader; + } + let plaintext = await decrypt(enc, cek, base64url(jwe.ciphertext), iv, tag, additionalData); + if (joseHeader.zip === 'DEF') { + plaintext = await ((options === null || options === void 0 ? void 0 : options.inflateRaw) || inflate)(plaintext); + } + const result = { plaintext }; + if (jwe.protected !== undefined) { + result.protectedHeader = parsedProt; + } + if (jwe.aad !== undefined) { + result.additionalAuthenticatedData = base64url(jwe.aad); + } + if (jwe.unprotected !== undefined) { + result.sharedUnprotectedHeader = jwe.unprotected; + } + if (jwe.header !== undefined) { + result.unprotectedHeader = jwe.header; + } + if (resolvedKey) { + return { ...result, key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwe/flattened/encrypt.js b/webapp/node_modules/jose/dist/node/esm/jwe/flattened/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..1e60ecd8c470193905b13d416eab3f1f04443795 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwe/flattened/encrypt.js @@ -0,0 +1,175 @@ +import { encode as base64url } from '../../runtime/base64url.js'; +import encrypt from '../../runtime/encrypt.js'; +import { deflate } from '../../runtime/zlib.js'; +import generateIv from '../../lib/iv.js'; +import encryptKeyManagement from '../../lib/encrypt_key_management.js'; +import { JOSENotSupported, JWEInvalid } from '../../util/errors.js'; +import isDisjoint from '../../lib/is_disjoint.js'; +import { encoder, decoder, concat } from '../../lib/buffer_utils.js'; +import validateCrit from '../../lib/validate_crit.js'; +export const unprotected = Symbol(); +export class FlattenedEncrypt { + constructor(plaintext) { + if (!(plaintext instanceof Uint8Array)) { + throw new TypeError('plaintext must be an instance of Uint8Array'); + } + this._plaintext = plaintext; + } + setKeyManagementParameters(parameters) { + if (this._keyManagementParameters) { + throw new TypeError('setKeyManagementParameters can only be called once'); + } + this._keyManagementParameters = parameters; + return this; + } + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setSharedUnprotectedHeader(sharedUnprotectedHeader) { + if (this._sharedUnprotectedHeader) { + throw new TypeError('setSharedUnprotectedHeader can only be called once'); + } + this._sharedUnprotectedHeader = sharedUnprotectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + if (this._unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this._unprotectedHeader = unprotectedHeader; + return this; + } + setAdditionalAuthenticatedData(aad) { + this._aad = aad; + return this; + } + setContentEncryptionKey(cek) { + if (this._cek) { + throw new TypeError('setContentEncryptionKey can only be called once'); + } + this._cek = cek; + return this; + } + setInitializationVector(iv) { + if (this._iv) { + throw new TypeError('setInitializationVector can only be called once'); + } + this._iv = iv; + return this; + } + async encrypt(key, options) { + if (!this._protectedHeader && !this._unprotectedHeader && !this._sharedUnprotectedHeader) { + throw new JWEInvalid('either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()'); + } + if (!isDisjoint(this._protectedHeader, this._unprotectedHeader, this._sharedUnprotectedHeader)) { + throw new JWEInvalid('JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint'); + } + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + ...this._sharedUnprotectedHeader, + }; + validateCrit(JWEInvalid, new Map(), options === null || options === void 0 ? void 0 : options.crit, this._protectedHeader, joseHeader); + if (joseHeader.zip !== undefined) { + if (!this._protectedHeader || !this._protectedHeader.zip) { + throw new JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected'); + } + if (joseHeader.zip !== 'DEF') { + throw new JOSENotSupported('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value'); + } + } + const { alg, enc } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid'); + } + if (typeof enc !== 'string' || !enc) { + throw new JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid'); + } + let encryptedKey; + if (alg === 'dir') { + if (this._cek) { + throw new TypeError('setContentEncryptionKey cannot be called when using Direct Encryption'); + } + } + else if (alg === 'ECDH-ES') { + if (this._cek) { + throw new TypeError('setContentEncryptionKey cannot be called when using Direct Key Agreement'); + } + } + let cek; + { + let parameters; + ({ cek, encryptedKey, parameters } = await encryptKeyManagement(alg, enc, key, this._cek, this._keyManagementParameters)); + if (parameters) { + if (options && unprotected in options) { + if (!this._unprotectedHeader) { + this.setUnprotectedHeader(parameters); + } + else { + this._unprotectedHeader = { ...this._unprotectedHeader, ...parameters }; + } + } + else { + if (!this._protectedHeader) { + this.setProtectedHeader(parameters); + } + else { + this._protectedHeader = { ...this._protectedHeader, ...parameters }; + } + } + } + } + this._iv || (this._iv = generateIv(enc)); + let additionalData; + let protectedHeader; + let aadMember; + if (this._protectedHeader) { + protectedHeader = encoder.encode(base64url(JSON.stringify(this._protectedHeader))); + } + else { + protectedHeader = encoder.encode(''); + } + if (this._aad) { + aadMember = base64url(this._aad); + additionalData = concat(protectedHeader, encoder.encode('.'), encoder.encode(aadMember)); + } + else { + additionalData = protectedHeader; + } + let ciphertext; + let tag; + if (joseHeader.zip === 'DEF') { + const deflated = await ((options === null || options === void 0 ? void 0 : options.deflateRaw) || deflate)(this._plaintext); + ({ ciphertext, tag } = await encrypt(enc, deflated, cek, this._iv, additionalData)); + } + else { + ; + ({ ciphertext, tag } = await encrypt(enc, this._plaintext, cek, this._iv, additionalData)); + } + const jwe = { + ciphertext: base64url(ciphertext), + iv: base64url(this._iv), + tag: base64url(tag), + }; + if (encryptedKey) { + jwe.encrypted_key = base64url(encryptedKey); + } + if (aadMember) { + jwe.aad = aadMember; + } + if (this._protectedHeader) { + jwe.protected = decoder.decode(protectedHeader); + } + if (this._sharedUnprotectedHeader) { + jwe.unprotected = this._sharedUnprotectedHeader; + } + if (this._unprotectedHeader) { + jwe.header = this._unprotectedHeader; + } + return jwe; + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwe/general/decrypt.js b/webapp/node_modules/jose/dist/node/esm/jwe/general/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..659958a8bc9093e4739b562a9364233ff35addb9 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwe/general/decrypt.js @@ -0,0 +1,31 @@ +import { flattenedDecrypt } from '../flattened/decrypt.js'; +import { JWEDecryptionFailed, JWEInvalid } from '../../util/errors.js'; +import isObject from '../../lib/is_object.js'; +export async function generalDecrypt(jwe, key, options) { + if (!isObject(jwe)) { + throw new JWEInvalid('General JWE must be an object'); + } + if (!Array.isArray(jwe.recipients) || !jwe.recipients.every(isObject)) { + throw new JWEInvalid('JWE Recipients missing or incorrect type'); + } + if (!jwe.recipients.length) { + throw new JWEInvalid('JWE Recipients has no members'); + } + for (const recipient of jwe.recipients) { + try { + return await flattenedDecrypt({ + aad: jwe.aad, + ciphertext: jwe.ciphertext, + encrypted_key: recipient.encrypted_key, + header: recipient.header, + iv: jwe.iv, + protected: jwe.protected, + tag: jwe.tag, + unprotected: jwe.unprotected, + }, key, options); + } + catch { + } + } + throw new JWEDecryptionFailed(); +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwe/general/encrypt.js b/webapp/node_modules/jose/dist/node/esm/jwe/general/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..3ee53dec441c8f2576150ee87729e048ead6547f --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwe/general/encrypt.js @@ -0,0 +1,178 @@ +import { FlattenedEncrypt, unprotected } from '../flattened/encrypt.js'; +import { JWEInvalid } from '../../util/errors.js'; +import generateCek from '../../lib/cek.js'; +import isDisjoint from '../../lib/is_disjoint.js'; +import encryptKeyManagement from '../../lib/encrypt_key_management.js'; +import { encode as base64url } from '../../runtime/base64url.js'; +import validateCrit from '../../lib/validate_crit.js'; +class IndividualRecipient { + constructor(enc, key, options) { + this.parent = enc; + this.key = key; + this.options = options; + } + setUnprotectedHeader(unprotectedHeader) { + if (this.unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this.unprotectedHeader = unprotectedHeader; + return this; + } + addRecipient(...args) { + return this.parent.addRecipient(...args); + } + encrypt(...args) { + return this.parent.encrypt(...args); + } + done() { + return this.parent; + } +} +export class GeneralEncrypt { + constructor(plaintext) { + this._recipients = []; + this._plaintext = plaintext; + } + addRecipient(key, options) { + const recipient = new IndividualRecipient(this, key, { crit: options === null || options === void 0 ? void 0 : options.crit }); + this._recipients.push(recipient); + return recipient; + } + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setSharedUnprotectedHeader(sharedUnprotectedHeader) { + if (this._unprotectedHeader) { + throw new TypeError('setSharedUnprotectedHeader can only be called once'); + } + this._unprotectedHeader = sharedUnprotectedHeader; + return this; + } + setAdditionalAuthenticatedData(aad) { + this._aad = aad; + return this; + } + async encrypt(options) { + var _a, _b, _c; + if (!this._recipients.length) { + throw new JWEInvalid('at least one recipient must be added'); + } + options = { deflateRaw: options === null || options === void 0 ? void 0 : options.deflateRaw }; + if (this._recipients.length === 1) { + const [recipient] = this._recipients; + const flattened = await new FlattenedEncrypt(this._plaintext) + .setAdditionalAuthenticatedData(this._aad) + .setProtectedHeader(this._protectedHeader) + .setSharedUnprotectedHeader(this._unprotectedHeader) + .setUnprotectedHeader(recipient.unprotectedHeader) + .encrypt(recipient.key, { ...recipient.options, ...options }); + let jwe = { + ciphertext: flattened.ciphertext, + iv: flattened.iv, + recipients: [{}], + tag: flattened.tag, + }; + if (flattened.aad) + jwe.aad = flattened.aad; + if (flattened.protected) + jwe.protected = flattened.protected; + if (flattened.unprotected) + jwe.unprotected = flattened.unprotected; + if (flattened.encrypted_key) + jwe.recipients[0].encrypted_key = flattened.encrypted_key; + if (flattened.header) + jwe.recipients[0].header = flattened.header; + return jwe; + } + let enc; + for (let i = 0; i < this._recipients.length; i++) { + const recipient = this._recipients[i]; + if (!isDisjoint(this._protectedHeader, this._unprotectedHeader, recipient.unprotectedHeader)) { + throw new JWEInvalid('JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint'); + } + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + ...recipient.unprotectedHeader, + }; + const { alg } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new JWEInvalid('JWE "alg" (Algorithm) Header Parameter missing or invalid'); + } + if (alg === 'dir' || alg === 'ECDH-ES') { + throw new JWEInvalid('"dir" and "ECDH-ES" alg may only be used with a single recipient'); + } + if (typeof joseHeader.enc !== 'string' || !joseHeader.enc) { + throw new JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid'); + } + if (!enc) { + enc = joseHeader.enc; + } + else if (enc !== joseHeader.enc) { + throw new JWEInvalid('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients'); + } + validateCrit(JWEInvalid, new Map(), recipient.options.crit, this._protectedHeader, joseHeader); + if (joseHeader.zip !== undefined) { + if (!this._protectedHeader || !this._protectedHeader.zip) { + throw new JWEInvalid('JWE "zip" (Compression Algorithm) Header MUST be integrity protected'); + } + } + } + const cek = generateCek(enc); + let jwe = { + ciphertext: '', + iv: '', + recipients: [], + tag: '', + }; + for (let i = 0; i < this._recipients.length; i++) { + const recipient = this._recipients[i]; + const target = {}; + jwe.recipients.push(target); + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + ...recipient.unprotectedHeader, + }; + const p2c = joseHeader.alg.startsWith('PBES2') ? 2048 + i : undefined; + if (i === 0) { + const flattened = await new FlattenedEncrypt(this._plaintext) + .setAdditionalAuthenticatedData(this._aad) + .setContentEncryptionKey(cek) + .setProtectedHeader(this._protectedHeader) + .setSharedUnprotectedHeader(this._unprotectedHeader) + .setUnprotectedHeader(recipient.unprotectedHeader) + .setKeyManagementParameters({ p2c }) + .encrypt(recipient.key, { + ...recipient.options, + ...options, + [unprotected]: true, + }); + jwe.ciphertext = flattened.ciphertext; + jwe.iv = flattened.iv; + jwe.tag = flattened.tag; + if (flattened.aad) + jwe.aad = flattened.aad; + if (flattened.protected) + jwe.protected = flattened.protected; + if (flattened.unprotected) + jwe.unprotected = flattened.unprotected; + target.encrypted_key = flattened.encrypted_key; + if (flattened.header) + target.header = flattened.header; + continue; + } + const { encryptedKey, parameters } = await encryptKeyManagement(((_a = recipient.unprotectedHeader) === null || _a === void 0 ? void 0 : _a.alg) || + ((_b = this._protectedHeader) === null || _b === void 0 ? void 0 : _b.alg) || + ((_c = this._unprotectedHeader) === null || _c === void 0 ? void 0 : _c.alg), enc, recipient.key, cek, { p2c }); + target.encrypted_key = base64url(encryptedKey); + if (recipient.unprotectedHeader || parameters) + target.header = { ...recipient.unprotectedHeader, ...parameters }; + } + return jwe; + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwk/embedded.js b/webapp/node_modules/jose/dist/node/esm/jwk/embedded.js new file mode 100644 index 0000000000000000000000000000000000000000..58db2825526bb2e33f402ec9865758ed1df6ec16 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwk/embedded.js @@ -0,0 +1,17 @@ +import { importJWK } from '../key/import.js'; +import isObject from '../lib/is_object.js'; +import { JWSInvalid } from '../util/errors.js'; +export async function EmbeddedJWK(protectedHeader, token) { + const joseHeader = { + ...protectedHeader, + ...token.header, + }; + if (!isObject(joseHeader.jwk)) { + throw new JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object'); + } + const key = await importJWK({ ...joseHeader.jwk, ext: true }, joseHeader.alg, true); + if (key instanceof Uint8Array || key.type !== 'public') { + throw new JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key'); + } + return key; +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwk/thumbprint.js b/webapp/node_modules/jose/dist/node/esm/jwk/thumbprint.js new file mode 100644 index 0000000000000000000000000000000000000000..49f86b17430cfda95a336f3b49c1186e5a5f0a21 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwk/thumbprint.js @@ -0,0 +1,53 @@ +import digest from '../runtime/digest.js'; +import { encode as base64url } from '../runtime/base64url.js'; +import { JOSENotSupported, JWKInvalid } from '../util/errors.js'; +import { encoder } from '../lib/buffer_utils.js'; +import isObject from '../lib/is_object.js'; +const check = (value, description) => { + if (typeof value !== 'string' || !value) { + throw new JWKInvalid(`${description} missing or invalid`); + } +}; +export async function calculateJwkThumbprint(jwk, digestAlgorithm) { + if (!isObject(jwk)) { + throw new TypeError('JWK must be an object'); + } + digestAlgorithm !== null && digestAlgorithm !== void 0 ? digestAlgorithm : (digestAlgorithm = 'sha256'); + if (digestAlgorithm !== 'sha256' && + digestAlgorithm !== 'sha384' && + digestAlgorithm !== 'sha512') { + throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"'); + } + let components; + switch (jwk.kty) { + case 'EC': + check(jwk.crv, '"crv" (Curve) Parameter'); + check(jwk.x, '"x" (X Coordinate) Parameter'); + check(jwk.y, '"y" (Y Coordinate) Parameter'); + components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y }; + break; + case 'OKP': + check(jwk.crv, '"crv" (Subtype of Key Pair) Parameter'); + check(jwk.x, '"x" (Public Key) Parameter'); + components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x }; + break; + case 'RSA': + check(jwk.e, '"e" (Exponent) Parameter'); + check(jwk.n, '"n" (Modulus) Parameter'); + components = { e: jwk.e, kty: jwk.kty, n: jwk.n }; + break; + case 'oct': + check(jwk.k, '"k" (Key Value) Parameter'); + components = { k: jwk.k, kty: jwk.kty }; + break; + default: + throw new JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported'); + } + const data = encoder.encode(JSON.stringify(components)); + return base64url(await digest(digestAlgorithm, data)); +} +export async function calculateJwkThumbprintUri(jwk, digestAlgorithm) { + digestAlgorithm !== null && digestAlgorithm !== void 0 ? digestAlgorithm : (digestAlgorithm = 'sha256'); + const thumbprint = await calculateJwkThumbprint(jwk, digestAlgorithm); + return `urn:ietf:params:oauth:jwk-thumbprint:sha-${digestAlgorithm.slice(-3)}:${thumbprint}`; +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwks/local.js b/webapp/node_modules/jose/dist/node/esm/jwks/local.js new file mode 100644 index 0000000000000000000000000000000000000000..42cb9c74571d962f833093f3a8fbeed612be3b49 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwks/local.js @@ -0,0 +1,98 @@ +import { importJWK } from '../key/import.js'; +import { JWKSInvalid, JOSENotSupported, JWKSNoMatchingKey, JWKSMultipleMatchingKeys, } from '../util/errors.js'; +import isObject from '../lib/is_object.js'; +function getKtyFromAlg(alg) { + switch (typeof alg === 'string' && alg.slice(0, 2)) { + case 'RS': + case 'PS': + return 'RSA'; + case 'ES': + return 'EC'; + case 'Ed': + return 'OKP'; + default: + throw new JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set'); + } +} +export function isJWKSLike(jwks) { + return (jwks && + typeof jwks === 'object' && + Array.isArray(jwks.keys) && + jwks.keys.every(isJWKLike)); +} +function isJWKLike(key) { + return isObject(key); +} +function clone(obj) { + if (typeof structuredClone === 'function') { + return structuredClone(obj); + } + return JSON.parse(JSON.stringify(obj)); +} +export class LocalJWKSet { + constructor(jwks) { + this._cached = new WeakMap(); + if (!isJWKSLike(jwks)) { + throw new JWKSInvalid('JSON Web Key Set malformed'); + } + this._jwks = clone(jwks); + } + async getKey(protectedHeader, token) { + const { alg, kid } = { ...protectedHeader, ...token.header }; + const kty = getKtyFromAlg(alg); + const candidates = this._jwks.keys.filter((jwk) => { + let candidate = kty === jwk.kty; + if (candidate && typeof kid === 'string') { + candidate = kid === jwk.kid; + } + if (candidate && typeof jwk.alg === 'string') { + candidate = alg === jwk.alg; + } + if (candidate && typeof jwk.use === 'string') { + candidate = jwk.use === 'sig'; + } + if (candidate && Array.isArray(jwk.key_ops)) { + candidate = jwk.key_ops.includes('verify'); + } + if (candidate && alg === 'EdDSA') { + candidate = jwk.crv === 'Ed25519' || jwk.crv === 'Ed448'; + } + if (candidate) { + switch (alg) { + case 'ES256': + candidate = jwk.crv === 'P-256'; + break; + case 'ES256K': + candidate = jwk.crv === 'secp256k1'; + break; + case 'ES384': + candidate = jwk.crv === 'P-384'; + break; + case 'ES512': + candidate = jwk.crv === 'P-521'; + break; + } + } + return candidate; + }); + const { 0: jwk, length } = candidates; + if (length === 0) { + throw new JWKSNoMatchingKey(); + } + else if (length !== 1) { + throw new JWKSMultipleMatchingKeys(); + } + const cached = this._cached.get(jwk) || this._cached.set(jwk, {}).get(jwk); + if (cached[alg] === undefined) { + const keyObject = await importJWK({ ...jwk, ext: true }, alg); + if (keyObject instanceof Uint8Array || keyObject.type !== 'public') { + throw new JWKSInvalid('JSON Web Key Set members must be public keys'); + } + cached[alg] = keyObject; + } + return cached[alg]; + } +} +export function createLocalJWKSet(jwks) { + return LocalJWKSet.prototype.getKey.bind(new LocalJWKSet(jwks)); +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwks/remote.js b/webapp/node_modules/jose/dist/node/esm/jwks/remote.js new file mode 100644 index 0000000000000000000000000000000000000000..574ccff83bbe904f80af6345e5f7ba9ceddefa30 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwks/remote.js @@ -0,0 +1,81 @@ +import fetchJwks from '../runtime/fetch_jwks.js'; +import { isCloudflareWorkers } from '../runtime/env.js'; +import { JWKSInvalid, JWKSNoMatchingKey } from '../util/errors.js'; +import { isJWKSLike, LocalJWKSet } from './local.js'; +class RemoteJWKSet extends LocalJWKSet { + constructor(url, options) { + super({ keys: [] }); + this._jwks = undefined; + if (!(url instanceof URL)) { + throw new TypeError('url must be an instance of URL'); + } + this._url = new URL(url.href); + this._options = { agent: options === null || options === void 0 ? void 0 : options.agent, headers: options === null || options === void 0 ? void 0 : options.headers }; + this._timeoutDuration = + typeof (options === null || options === void 0 ? void 0 : options.timeoutDuration) === 'number' ? options === null || options === void 0 ? void 0 : options.timeoutDuration : 5000; + this._cooldownDuration = + typeof (options === null || options === void 0 ? void 0 : options.cooldownDuration) === 'number' ? options === null || options === void 0 ? void 0 : options.cooldownDuration : 30000; + this._cacheMaxAge = typeof (options === null || options === void 0 ? void 0 : options.cacheMaxAge) === 'number' ? options === null || options === void 0 ? void 0 : options.cacheMaxAge : 600000; + } + coolingDown() { + return typeof this._jwksTimestamp === 'number' + ? Date.now() < this._jwksTimestamp + this._cooldownDuration + : false; + } + fresh() { + return typeof this._jwksTimestamp === 'number' + ? Date.now() < this._jwksTimestamp + this._cacheMaxAge + : false; + } + async getKey(protectedHeader, token) { + if (!this._jwks || !this.fresh()) { + await this.reload(); + } + try { + return await super.getKey(protectedHeader, token); + } + catch (err) { + if (err instanceof JWKSNoMatchingKey) { + if (this.coolingDown() === false) { + await this.reload(); + return super.getKey(protectedHeader, token); + } + } + throw err; + } + } + async reload() { + if (this._pendingFetch && isCloudflareWorkers()) { + return new Promise((resolve) => { + const isDone = () => { + if (this._pendingFetch === undefined) { + resolve(); + } + else { + setTimeout(isDone, 5); + } + }; + isDone(); + }); + } + if (!this._pendingFetch) { + this._pendingFetch = fetchJwks(this._url, this._timeoutDuration, this._options) + .then((json) => { + if (!isJWKSLike(json)) { + throw new JWKSInvalid('JSON Web Key Set malformed'); + } + this._jwks = { keys: json.keys }; + this._jwksTimestamp = Date.now(); + this._pendingFetch = undefined; + }) + .catch((err) => { + this._pendingFetch = undefined; + throw err; + }); + } + await this._pendingFetch; + } +} +export function createRemoteJWKSet(url, options) { + return RemoteJWKSet.prototype.getKey.bind(new RemoteJWKSet(url, options)); +} diff --git a/webapp/node_modules/jose/dist/node/esm/jws/compact/sign.js b/webapp/node_modules/jose/dist/node/esm/jws/compact/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..b8e5ba0e2b81a2f84c2c0313c055e91da0c7b88e --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jws/compact/sign.js @@ -0,0 +1,17 @@ +import { FlattenedSign } from '../flattened/sign.js'; +export class CompactSign { + constructor(payload) { + this._flattened = new FlattenedSign(payload); + } + setProtectedHeader(protectedHeader) { + this._flattened.setProtectedHeader(protectedHeader); + return this; + } + async sign(key, options) { + const jws = await this._flattened.sign(key, options); + if (jws.payload === undefined) { + throw new TypeError('use the flattened module for creating JWS with b64: false'); + } + return `${jws.protected}.${jws.payload}.${jws.signature}`; + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/jws/compact/verify.js b/webapp/node_modules/jose/dist/node/esm/jws/compact/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..c651ffb944cdd83a85d5858008b15f3616dccb19 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jws/compact/verify.js @@ -0,0 +1,21 @@ +import { flattenedVerify } from '../flattened/verify.js'; +import { JWSInvalid } from '../../util/errors.js'; +import { decoder } from '../../lib/buffer_utils.js'; +export async function compactVerify(jws, key, options) { + if (jws instanceof Uint8Array) { + jws = decoder.decode(jws); + } + if (typeof jws !== 'string') { + throw new JWSInvalid('Compact JWS must be a string or Uint8Array'); + } + const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split('.'); + if (length !== 3) { + throw new JWSInvalid('Invalid Compact JWS'); + } + const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options); + const result = { payload: verified.payload, protectedHeader: verified.protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: verified.key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/node/esm/jws/flattened/sign.js b/webapp/node_modules/jose/dist/node/esm/jws/flattened/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..76ae2896543c3e2c456430e68811497e30d76096 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jws/flattened/sign.js @@ -0,0 +1,81 @@ +import { encode as base64url } from '../../runtime/base64url.js'; +import sign from '../../runtime/sign.js'; +import isDisjoint from '../../lib/is_disjoint.js'; +import { JWSInvalid } from '../../util/errors.js'; +import { encoder, decoder, concat } from '../../lib/buffer_utils.js'; +import checkKeyType from '../../lib/check_key_type.js'; +import validateCrit from '../../lib/validate_crit.js'; +export class FlattenedSign { + constructor(payload) { + if (!(payload instanceof Uint8Array)) { + throw new TypeError('payload must be an instance of Uint8Array'); + } + this._payload = payload; + } + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + if (this._unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this._unprotectedHeader = unprotectedHeader; + return this; + } + async sign(key, options) { + if (!this._protectedHeader && !this._unprotectedHeader) { + throw new JWSInvalid('either setProtectedHeader or setUnprotectedHeader must be called before #sign()'); + } + if (!isDisjoint(this._protectedHeader, this._unprotectedHeader)) { + throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint'); + } + const joseHeader = { + ...this._protectedHeader, + ...this._unprotectedHeader, + }; + const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options === null || options === void 0 ? void 0 : options.crit, this._protectedHeader, joseHeader); + let b64 = true; + if (extensions.has('b64')) { + b64 = this._protectedHeader.b64; + if (typeof b64 !== 'boolean') { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + checkKeyType(alg, key, 'sign'); + let payload = this._payload; + if (b64) { + payload = encoder.encode(base64url(payload)); + } + let protectedHeader; + if (this._protectedHeader) { + protectedHeader = encoder.encode(base64url(JSON.stringify(this._protectedHeader))); + } + else { + protectedHeader = encoder.encode(''); + } + const data = concat(protectedHeader, encoder.encode('.'), payload); + const signature = await sign(alg, key, data); + const jws = { + signature: base64url(signature), + payload: '', + }; + if (b64) { + jws.payload = decoder.decode(payload); + } + if (this._unprotectedHeader) { + jws.header = this._unprotectedHeader; + } + if (this._protectedHeader) { + jws.protected = decoder.decode(protectedHeader); + } + return jws; + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/jws/flattened/verify.js b/webapp/node_modules/jose/dist/node/esm/jws/flattened/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..a6ea3c8a1253ab622f010e7d5f8b20c98a929120 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jws/flattened/verify.js @@ -0,0 +1,104 @@ +import { decode as base64url } from '../../runtime/base64url.js'; +import verify from '../../runtime/verify.js'; +import { JOSEAlgNotAllowed, JWSInvalid, JWSSignatureVerificationFailed } from '../../util/errors.js'; +import { concat, encoder, decoder } from '../../lib/buffer_utils.js'; +import isDisjoint from '../../lib/is_disjoint.js'; +import isObject from '../../lib/is_object.js'; +import checkKeyType from '../../lib/check_key_type.js'; +import validateCrit from '../../lib/validate_crit.js'; +import validateAlgorithms from '../../lib/validate_algorithms.js'; +export async function flattenedVerify(jws, key, options) { + var _a; + if (!isObject(jws)) { + throw new JWSInvalid('Flattened JWS must be an object'); + } + if (jws.protected === undefined && jws.header === undefined) { + throw new JWSInvalid('Flattened JWS must have either of the "protected" or "header" members'); + } + if (jws.protected !== undefined && typeof jws.protected !== 'string') { + throw new JWSInvalid('JWS Protected Header incorrect type'); + } + if (jws.payload === undefined) { + throw new JWSInvalid('JWS Payload missing'); + } + if (typeof jws.signature !== 'string') { + throw new JWSInvalid('JWS Signature missing or incorrect type'); + } + if (jws.header !== undefined && !isObject(jws.header)) { + throw new JWSInvalid('JWS Unprotected Header incorrect type'); + } + let parsedProt = {}; + if (jws.protected) { + try { + const protectedHeader = base64url(jws.protected); + parsedProt = JSON.parse(decoder.decode(protectedHeader)); + } + catch { + throw new JWSInvalid('JWS Protected Header is invalid'); + } + } + if (!isDisjoint(parsedProt, jws.header)) { + throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint'); + } + const joseHeader = { + ...parsedProt, + ...jws.header, + }; + const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options === null || options === void 0 ? void 0 : options.crit, parsedProt, joseHeader); + let b64 = true; + if (extensions.has('b64')) { + b64 = parsedProt.b64; + if (typeof b64 !== 'boolean') { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== 'string' || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + const algorithms = options && validateAlgorithms('algorithms', options.algorithms); + if (algorithms && !algorithms.has(alg)) { + throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed'); + } + if (b64) { + if (typeof jws.payload !== 'string') { + throw new JWSInvalid('JWS Payload must be a string'); + } + } + else if (typeof jws.payload !== 'string' && !(jws.payload instanceof Uint8Array)) { + throw new JWSInvalid('JWS Payload must be a string or an Uint8Array instance'); + } + let resolvedKey = false; + if (typeof key === 'function') { + key = await key(parsedProt, jws); + resolvedKey = true; + } + checkKeyType(alg, key, 'verify'); + const data = concat(encoder.encode((_a = jws.protected) !== null && _a !== void 0 ? _a : ''), encoder.encode('.'), typeof jws.payload === 'string' ? encoder.encode(jws.payload) : jws.payload); + const signature = base64url(jws.signature); + const verified = await verify(alg, key, signature, data); + if (!verified) { + throw new JWSSignatureVerificationFailed(); + } + let payload; + if (b64) { + payload = base64url(jws.payload); + } + else if (typeof jws.payload === 'string') { + payload = encoder.encode(jws.payload); + } + else { + payload = jws.payload; + } + const result = { payload }; + if (jws.protected !== undefined) { + result.protectedHeader = parsedProt; + } + if (jws.header !== undefined) { + result.unprotectedHeader = jws.header; + } + if (resolvedKey) { + return { ...result, key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/node/esm/jws/general/sign.js b/webapp/node_modules/jose/dist/node/esm/jws/general/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..38d5a6d766c3953dfc32192bcf08be15d7680dc2 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jws/general/sign.js @@ -0,0 +1,67 @@ +import { FlattenedSign } from '../flattened/sign.js'; +import { JWSInvalid } from '../../util/errors.js'; +class IndividualSignature { + constructor(sig, key, options) { + this.parent = sig; + this.key = key; + this.options = options; + } + setProtectedHeader(protectedHeader) { + if (this.protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this.protectedHeader = protectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + if (this.unprotectedHeader) { + throw new TypeError('setUnprotectedHeader can only be called once'); + } + this.unprotectedHeader = unprotectedHeader; + return this; + } + addSignature(...args) { + return this.parent.addSignature(...args); + } + sign(...args) { + return this.parent.sign(...args); + } + done() { + return this.parent; + } +} +export class GeneralSign { + constructor(payload) { + this._signatures = []; + this._payload = payload; + } + addSignature(key, options) { + const signature = new IndividualSignature(this, key, options); + this._signatures.push(signature); + return signature; + } + async sign() { + if (!this._signatures.length) { + throw new JWSInvalid('at least one signature must be added'); + } + const jws = { + signatures: [], + payload: '', + }; + for (let i = 0; i < this._signatures.length; i++) { + const signature = this._signatures[i]; + const flattened = new FlattenedSign(this._payload); + flattened.setProtectedHeader(signature.protectedHeader); + flattened.setUnprotectedHeader(signature.unprotectedHeader); + const { payload, ...rest } = await flattened.sign(signature.key, signature.options); + if (i === 0) { + jws.payload = payload; + } + else if (jws.payload !== payload) { + throw new JWSInvalid('inconsistent use of JWS Unencoded Payload Option (RFC7797)'); + } + jws.signatures.push(rest); + } + return jws; + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/jws/general/verify.js b/webapp/node_modules/jose/dist/node/esm/jws/general/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..c511b722dc75cb01f817976d189470687a591c71 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jws/general/verify.js @@ -0,0 +1,24 @@ +import { flattenedVerify } from '../flattened/verify.js'; +import { JWSInvalid, JWSSignatureVerificationFailed } from '../../util/errors.js'; +import isObject from '../../lib/is_object.js'; +export async function generalVerify(jws, key, options) { + if (!isObject(jws)) { + throw new JWSInvalid('General JWS must be an object'); + } + if (!Array.isArray(jws.signatures) || !jws.signatures.every(isObject)) { + throw new JWSInvalid('JWS Signatures missing or incorrect type'); + } + for (const signature of jws.signatures) { + try { + return await flattenedVerify({ + header: signature.header, + payload: jws.payload, + protected: signature.protected, + signature: signature.signature, + }, key, options); + } + catch { + } + } + throw new JWSSignatureVerificationFailed(); +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwt/decrypt.js b/webapp/node_modules/jose/dist/node/esm/jwt/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..1ec2be28f2d7a9a0d92a579293a985a4b61fa617 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwt/decrypt.js @@ -0,0 +1,23 @@ +import { compactDecrypt } from '../jwe/compact/decrypt.js'; +import jwtPayload from '../lib/jwt_claims_set.js'; +import { JWTClaimValidationFailed } from '../util/errors.js'; +export async function jwtDecrypt(jwt, key, options) { + const decrypted = await compactDecrypt(jwt, key, options); + const payload = jwtPayload(decrypted.protectedHeader, decrypted.plaintext, options); + const { protectedHeader } = decrypted; + if (protectedHeader.iss !== undefined && protectedHeader.iss !== payload.iss) { + throw new JWTClaimValidationFailed('replicated "iss" claim header parameter mismatch', 'iss', 'mismatch'); + } + if (protectedHeader.sub !== undefined && protectedHeader.sub !== payload.sub) { + throw new JWTClaimValidationFailed('replicated "sub" claim header parameter mismatch', 'sub', 'mismatch'); + } + if (protectedHeader.aud !== undefined && + JSON.stringify(protectedHeader.aud) !== JSON.stringify(payload.aud)) { + throw new JWTClaimValidationFailed('replicated "aud" claim header parameter mismatch', 'aud', 'mismatch'); + } + const result = { payload, protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: decrypted.key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwt/encrypt.js b/webapp/node_modules/jose/dist/node/esm/jwt/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..15252957ae36e0b94c980c12cc01a5735ed972fb --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwt/encrypt.js @@ -0,0 +1,68 @@ +import { CompactEncrypt } from '../jwe/compact/encrypt.js'; +import { encoder } from '../lib/buffer_utils.js'; +import { ProduceJWT } from './produce.js'; +export class EncryptJWT extends ProduceJWT { + setProtectedHeader(protectedHeader) { + if (this._protectedHeader) { + throw new TypeError('setProtectedHeader can only be called once'); + } + this._protectedHeader = protectedHeader; + return this; + } + setKeyManagementParameters(parameters) { + if (this._keyManagementParameters) { + throw new TypeError('setKeyManagementParameters can only be called once'); + } + this._keyManagementParameters = parameters; + return this; + } + setContentEncryptionKey(cek) { + if (this._cek) { + throw new TypeError('setContentEncryptionKey can only be called once'); + } + this._cek = cek; + return this; + } + setInitializationVector(iv) { + if (this._iv) { + throw new TypeError('setInitializationVector can only be called once'); + } + this._iv = iv; + return this; + } + replicateIssuerAsHeader() { + this._replicateIssuerAsHeader = true; + return this; + } + replicateSubjectAsHeader() { + this._replicateSubjectAsHeader = true; + return this; + } + replicateAudienceAsHeader() { + this._replicateAudienceAsHeader = true; + return this; + } + async encrypt(key, options) { + const enc = new CompactEncrypt(encoder.encode(JSON.stringify(this._payload))); + if (this._replicateIssuerAsHeader) { + this._protectedHeader = { ...this._protectedHeader, iss: this._payload.iss }; + } + if (this._replicateSubjectAsHeader) { + this._protectedHeader = { ...this._protectedHeader, sub: this._payload.sub }; + } + if (this._replicateAudienceAsHeader) { + this._protectedHeader = { ...this._protectedHeader, aud: this._payload.aud }; + } + enc.setProtectedHeader(this._protectedHeader); + if (this._iv) { + enc.setInitializationVector(this._iv); + } + if (this._cek) { + enc.setContentEncryptionKey(this._cek); + } + if (this._keyManagementParameters) { + enc.setKeyManagementParameters(this._keyManagementParameters); + } + return enc.encrypt(key, options); + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwt/produce.js b/webapp/node_modules/jose/dist/node/esm/jwt/produce.js new file mode 100644 index 0000000000000000000000000000000000000000..31c929a07cc77a36ceb97b789ec604d4d51235c3 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwt/produce.js @@ -0,0 +1,54 @@ +import epoch from '../lib/epoch.js'; +import isObject from '../lib/is_object.js'; +import secs from '../lib/secs.js'; +export class ProduceJWT { + constructor(payload) { + if (!isObject(payload)) { + throw new TypeError('JWT Claims Set MUST be an object'); + } + this._payload = payload; + } + setIssuer(issuer) { + this._payload = { ...this._payload, iss: issuer }; + return this; + } + setSubject(subject) { + this._payload = { ...this._payload, sub: subject }; + return this; + } + setAudience(audience) { + this._payload = { ...this._payload, aud: audience }; + return this; + } + setJti(jwtId) { + this._payload = { ...this._payload, jti: jwtId }; + return this; + } + setNotBefore(input) { + if (typeof input === 'number') { + this._payload = { ...this._payload, nbf: input }; + } + else { + this._payload = { ...this._payload, nbf: epoch(new Date()) + secs(input) }; + } + return this; + } + setExpirationTime(input) { + if (typeof input === 'number') { + this._payload = { ...this._payload, exp: input }; + } + else { + this._payload = { ...this._payload, exp: epoch(new Date()) + secs(input) }; + } + return this; + } + setIssuedAt(input) { + if (typeof input === 'undefined') { + this._payload = { ...this._payload, iat: epoch(new Date()) }; + } + else { + this._payload = { ...this._payload, iat: input }; + } + return this; + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwt/sign.js b/webapp/node_modules/jose/dist/node/esm/jwt/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..62352fbfa2671d40b27eb028490b36f883c6115a --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwt/sign.js @@ -0,0 +1,21 @@ +import { CompactSign } from '../jws/compact/sign.js'; +import { JWTInvalid } from '../util/errors.js'; +import { encoder } from '../lib/buffer_utils.js'; +import { ProduceJWT } from './produce.js'; +export class SignJWT extends ProduceJWT { + setProtectedHeader(protectedHeader) { + this._protectedHeader = protectedHeader; + return this; + } + async sign(key, options) { + var _a; + const sig = new CompactSign(encoder.encode(JSON.stringify(this._payload))); + sig.setProtectedHeader(this._protectedHeader); + if (Array.isArray((_a = this._protectedHeader) === null || _a === void 0 ? void 0 : _a.crit) && + this._protectedHeader.crit.includes('b64') && + this._protectedHeader.b64 === false) { + throw new JWTInvalid('JWTs MUST NOT use unencoded payload'); + } + return sig.sign(key, options); + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwt/unsecured.js b/webapp/node_modules/jose/dist/node/esm/jwt/unsecured.js new file mode 100644 index 0000000000000000000000000000000000000000..41c7c33bb59f7ca527db65720fbf7f7347d3566a --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwt/unsecured.js @@ -0,0 +1,32 @@ +import * as base64url from '../runtime/base64url.js'; +import { decoder } from '../lib/buffer_utils.js'; +import { JWTInvalid } from '../util/errors.js'; +import jwtPayload from '../lib/jwt_claims_set.js'; +import { ProduceJWT } from './produce.js'; +export class UnsecuredJWT extends ProduceJWT { + encode() { + const header = base64url.encode(JSON.stringify({ alg: 'none' })); + const payload = base64url.encode(JSON.stringify(this._payload)); + return `${header}.${payload}.`; + } + static decode(jwt, options) { + if (typeof jwt !== 'string') { + throw new JWTInvalid('Unsecured JWT must be a string'); + } + const { 0: encodedHeader, 1: encodedPayload, 2: signature, length } = jwt.split('.'); + if (length !== 3 || signature !== '') { + throw new JWTInvalid('Invalid Unsecured JWT'); + } + let header; + try { + header = JSON.parse(decoder.decode(base64url.decode(encodedHeader))); + if (header.alg !== 'none') + throw new Error(); + } + catch { + throw new JWTInvalid('Invalid Unsecured JWT'); + } + const payload = jwtPayload(header, base64url.decode(encodedPayload), options); + return { payload, header }; + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/jwt/verify.js b/webapp/node_modules/jose/dist/node/esm/jwt/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..89571c18475ba653faafe870321564c6d739e651 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/jwt/verify.js @@ -0,0 +1,16 @@ +import { compactVerify } from '../jws/compact/verify.js'; +import jwtPayload from '../lib/jwt_claims_set.js'; +import { JWTInvalid } from '../util/errors.js'; +export async function jwtVerify(jwt, key, options) { + var _a; + const verified = await compactVerify(jwt, key, options); + if (((_a = verified.protectedHeader.crit) === null || _a === void 0 ? void 0 : _a.includes('b64')) && verified.protectedHeader.b64 === false) { + throw new JWTInvalid('JWTs MUST NOT use unencoded payload'); + } + const payload = jwtPayload(verified.protectedHeader, verified.payload, options); + const result = { payload, protectedHeader: verified.protectedHeader }; + if (typeof key === 'function') { + return { ...result, key: verified.key }; + } + return result; +} diff --git a/webapp/node_modules/jose/dist/node/esm/key/export.js b/webapp/node_modules/jose/dist/node/esm/key/export.js new file mode 100644 index 0000000000000000000000000000000000000000..e4017047cd30a55493a84349f70f409b40112f06 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/key/export.js @@ -0,0 +1,12 @@ +import { toSPKI as exportPublic } from '../runtime/asn1.js'; +import { toPKCS8 as exportPrivate } from '../runtime/asn1.js'; +import keyToJWK from '../runtime/key_to_jwk.js'; +export async function exportSPKI(key) { + return exportPublic(key); +} +export async function exportPKCS8(key) { + return exportPrivate(key); +} +export async function exportJWK(key) { + return keyToJWK(key); +} diff --git a/webapp/node_modules/jose/dist/node/esm/key/generate_key_pair.js b/webapp/node_modules/jose/dist/node/esm/key/generate_key_pair.js new file mode 100644 index 0000000000000000000000000000000000000000..03b9ee54cd6006b3fc1fbedb15e2de96a9c27eb2 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/key/generate_key_pair.js @@ -0,0 +1,4 @@ +import { generateKeyPair as generate } from '../runtime/generate.js'; +export async function generateKeyPair(alg, options) { + return generate(alg, options); +} diff --git a/webapp/node_modules/jose/dist/node/esm/key/generate_secret.js b/webapp/node_modules/jose/dist/node/esm/key/generate_secret.js new file mode 100644 index 0000000000000000000000000000000000000000..58f308a5439273c00ef0375744f82df7d8329e27 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/key/generate_secret.js @@ -0,0 +1,4 @@ +import { generateSecret as generate } from '../runtime/generate.js'; +export async function generateSecret(alg, options) { + return generate(alg, options); +} diff --git a/webapp/node_modules/jose/dist/node/esm/key/import.js b/webapp/node_modules/jose/dist/node/esm/key/import.js new file mode 100644 index 0000000000000000000000000000000000000000..78a926406169ca9736fec184490a70ce7db14da3 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/key/import.js @@ -0,0 +1,120 @@ +import { decode as decodeBase64URL, encodeBase64, decodeBase64 } from '../runtime/base64url.js'; +import { fromSPKI as importPublic } from '../runtime/asn1.js'; +import { fromPKCS8 as importPrivate } from '../runtime/asn1.js'; +import asKeyObject from '../runtime/jwk_to_key.js'; +import { JOSENotSupported } from '../util/errors.js'; +import formatPEM from '../lib/format_pem.js'; +import isObject from '../lib/is_object.js'; +function getElement(seq) { + let result = []; + let next = 0; + while (next < seq.length) { + let nextPart = parseElement(seq.subarray(next)); + result.push(nextPart); + next += nextPart.byteLength; + } + return result; +} +function parseElement(bytes) { + let position = 0; + let tag = bytes[0] & 0x1f; + position++; + if (tag === 0x1f) { + tag = 0; + while (bytes[position] >= 0x80) { + tag = tag * 128 + bytes[position] - 0x80; + position++; + } + tag = tag * 128 + bytes[position] - 0x80; + position++; + } + let length = 0; + if (bytes[position] < 0x80) { + length = bytes[position]; + position++; + } + else { + let numberOfDigits = bytes[position] & 0x7f; + position++; + length = 0; + for (let i = 0; i < numberOfDigits; i++) { + length = length * 256 + bytes[position]; + position++; + } + } + if (length === 0x80) { + length = 0; + while (bytes[position + length] !== 0 || bytes[position + length + 1] !== 0) { + length++; + } + const byteLength = position + length + 2; + return { + byteLength, + contents: bytes.subarray(position, position + length), + raw: bytes.subarray(0, byteLength), + }; + } + const byteLength = position + length; + return { + byteLength, + contents: bytes.subarray(position, byteLength), + raw: bytes.subarray(0, byteLength), + }; +} +function spkiFromX509(buf) { + const tbsCertificate = getElement(getElement(parseElement(buf).contents)[0].contents); + return encodeBase64(tbsCertificate[tbsCertificate[0].raw[0] === 0xa0 ? 6 : 5].raw); +} +function getSPKI(x509) { + const pem = x509.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g, ''); + const raw = decodeBase64(pem); + return formatPEM(spkiFromX509(raw), 'PUBLIC KEY'); +} +export async function importSPKI(spki, alg, options) { + if (typeof spki !== 'string' || spki.indexOf('-----BEGIN PUBLIC KEY-----') !== 0) { + throw new TypeError('"spki" must be SPKI formatted string'); + } + return importPublic(spki, alg, options); +} +export async function importX509(x509, alg, options) { + if (typeof x509 !== 'string' || x509.indexOf('-----BEGIN CERTIFICATE-----') !== 0) { + throw new TypeError('"x509" must be X.509 formatted string'); + } + const spki = getSPKI(x509); + return importPublic(spki, alg, options); +} +export async function importPKCS8(pkcs8, alg, options) { + if (typeof pkcs8 !== 'string' || pkcs8.indexOf('-----BEGIN PRIVATE KEY-----') !== 0) { + throw new TypeError('"pkcs8" must be PCKS8 formatted string'); + } + return importPrivate(pkcs8, alg, options); +} +export async function importJWK(jwk, alg, octAsKeyObject) { + if (!isObject(jwk)) { + throw new TypeError('JWK must be an object'); + } + alg || (alg = jwk.alg); + if (typeof alg !== 'string' || !alg) { + throw new TypeError('"alg" argument is required when "jwk.alg" is not present'); + } + switch (jwk.kty) { + case 'oct': + if (typeof jwk.k !== 'string' || !jwk.k) { + throw new TypeError('missing "k" (Key Value) Parameter value'); + } + octAsKeyObject !== null && octAsKeyObject !== void 0 ? octAsKeyObject : (octAsKeyObject = jwk.ext !== true); + if (octAsKeyObject) { + return asKeyObject({ ...jwk, alg, ext: false }); + } + return decodeBase64URL(jwk.k); + case 'RSA': + if (jwk.oth !== undefined) { + throw new JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported'); + } + case 'EC': + case 'OKP': + return asKeyObject({ ...jwk, alg }); + default: + throw new JOSENotSupported('Unsupported "kty" (Key Type) Parameter value'); + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/lib/aesgcmkw.js b/webapp/node_modules/jose/dist/node/esm/lib/aesgcmkw.js new file mode 100644 index 0000000000000000000000000000000000000000..de3f4f91dffe193a164aed2d221e953257688a02 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/aesgcmkw.js @@ -0,0 +1,14 @@ +import encrypt from '../runtime/encrypt.js'; +import decrypt from '../runtime/decrypt.js'; +import generateIv from './iv.js'; +import { encode as base64url } from '../runtime/base64url.js'; +export async function wrap(alg, key, cek, iv) { + const jweAlgorithm = alg.slice(0, 7); + iv || (iv = generateIv(jweAlgorithm)); + const { ciphertext: encryptedKey, tag } = await encrypt(jweAlgorithm, cek, key, iv, new Uint8Array(0)); + return { encryptedKey, iv: base64url(iv), tag: base64url(tag) }; +} +export async function unwrap(alg, key, encryptedKey, iv, tag) { + const jweAlgorithm = alg.slice(0, 7); + return decrypt(jweAlgorithm, key, encryptedKey, iv, tag, new Uint8Array(0)); +} diff --git a/webapp/node_modules/jose/dist/node/esm/lib/buffer_utils.js b/webapp/node_modules/jose/dist/node/esm/lib/buffer_utils.js new file mode 100644 index 0000000000000000000000000000000000000000..5a1a7b334dfa795aaf8d44d4e218561a8be99e46 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/buffer_utils.js @@ -0,0 +1,51 @@ +import digest from '../runtime/digest.js'; +export const encoder = new TextEncoder(); +export const decoder = new TextDecoder(); +const MAX_INT32 = 2 ** 32; +export function concat(...buffers) { + const size = buffers.reduce((acc, { length }) => acc + length, 0); + const buf = new Uint8Array(size); + let i = 0; + buffers.forEach((buffer) => { + buf.set(buffer, i); + i += buffer.length; + }); + return buf; +} +export function p2s(alg, p2sInput) { + return concat(encoder.encode(alg), new Uint8Array([0]), p2sInput); +} +function writeUInt32BE(buf, value, offset) { + if (value < 0 || value >= MAX_INT32) { + throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`); + } + buf.set([value >>> 24, value >>> 16, value >>> 8, value & 0xff], offset); +} +export function uint64be(value) { + const high = Math.floor(value / MAX_INT32); + const low = value % MAX_INT32; + const buf = new Uint8Array(8); + writeUInt32BE(buf, high, 0); + writeUInt32BE(buf, low, 4); + return buf; +} +export function uint32be(value) { + const buf = new Uint8Array(4); + writeUInt32BE(buf, value); + return buf; +} +export function lengthAndInput(input) { + return concat(uint32be(input.length), input); +} +export async function concatKdf(secret, bits, value) { + const iterations = Math.ceil((bits >> 3) / 32); + const res = new Uint8Array(iterations * 32); + for (let iter = 0; iter < iterations; iter++) { + const buf = new Uint8Array(4 + secret.length + value.length); + buf.set(uint32be(iter + 1)); + buf.set(secret, 4); + buf.set(value, 4 + secret.length); + res.set(await digest('sha256', buf), iter * 32); + } + return res.slice(0, bits >> 3); +} diff --git a/webapp/node_modules/jose/dist/node/esm/lib/cek.js b/webapp/node_modules/jose/dist/node/esm/lib/cek.js new file mode 100644 index 0000000000000000000000000000000000000000..34697d3ac2008c9b26c3066d4f155243ba825017 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/cek.js @@ -0,0 +1,20 @@ +import { JOSENotSupported } from '../util/errors.js'; +import random from '../runtime/random.js'; +export function bitLength(alg) { + switch (alg) { + case 'A128GCM': + return 128; + case 'A192GCM': + return 192; + case 'A256GCM': + case 'A128CBC-HS256': + return 256; + case 'A192CBC-HS384': + return 384; + case 'A256CBC-HS512': + return 512; + default: + throw new JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`); + } +} +export default (alg) => random(new Uint8Array(bitLength(alg) >> 3)); diff --git a/webapp/node_modules/jose/dist/node/esm/lib/check_iv_length.js b/webapp/node_modules/jose/dist/node/esm/lib/check_iv_length.js new file mode 100644 index 0000000000000000000000000000000000000000..dcd28d3a9dd2b054dd09542e0370f8da967fedd4 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/check_iv_length.js @@ -0,0 +1,8 @@ +import { JWEInvalid } from '../util/errors.js'; +import { bitLength } from './iv.js'; +const checkIvLength = (enc, iv) => { + if (iv.length << 3 !== bitLength(enc)) { + throw new JWEInvalid('Invalid Initialization Vector length'); + } +}; +export default checkIvLength; diff --git a/webapp/node_modules/jose/dist/node/esm/lib/check_key_type.js b/webapp/node_modules/jose/dist/node/esm/lib/check_key_type.js new file mode 100644 index 0000000000000000000000000000000000000000..4df7a3cfcbe2d667d30958e5f9c70705ff06a112 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/check_key_type.js @@ -0,0 +1,45 @@ +import invalidKeyInput from './invalid_key_input.js'; +import isKeyLike, { types } from '../runtime/is_key_like.js'; +const symmetricTypeCheck = (key) => { + if (key instanceof Uint8Array) + return; + if (!isKeyLike(key)) { + throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array')); + } + if (key.type !== 'secret') { + throw new TypeError(`${types.join(' or ')} instances for symmetric algorithms must be of type "secret"`); + } +}; +const asymmetricTypeCheck = (key, usage) => { + if (!isKeyLike(key)) { + throw new TypeError(invalidKeyInput(key, ...types)); + } + if (key.type === 'secret') { + throw new TypeError(`${types.join(' or ')} instances for asymmetric algorithms must not be of type "secret"`); + } + if (usage === 'sign' && key.type === 'public') { + throw new TypeError(`${types.join(' or ')} instances for asymmetric algorithm signing must be of type "private"`); + } + if (usage === 'decrypt' && key.type === 'public') { + throw new TypeError(`${types.join(' or ')} instances for asymmetric algorithm decryption must be of type "private"`); + } + if (key.algorithm && usage === 'verify' && key.type === 'private') { + throw new TypeError(`${types.join(' or ')} instances for asymmetric algorithm verifying must be of type "public"`); + } + if (key.algorithm && usage === 'encrypt' && key.type === 'private') { + throw new TypeError(`${types.join(' or ')} instances for asymmetric algorithm encryption must be of type "public"`); + } +}; +const checkKeyType = (alg, key, usage) => { + const symmetric = alg.startsWith('HS') || + alg === 'dir' || + alg.startsWith('PBES2') || + /^A\d{3}(?:GCM)?KW$/.test(alg); + if (symmetric) { + symmetricTypeCheck(key); + } + else { + asymmetricTypeCheck(key, usage); + } +}; +export default checkKeyType; diff --git a/webapp/node_modules/jose/dist/node/esm/lib/check_p2s.js b/webapp/node_modules/jose/dist/node/esm/lib/check_p2s.js new file mode 100644 index 0000000000000000000000000000000000000000..a65289fa7aa4799018ab7b81f5e15a2d71a76c49 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/check_p2s.js @@ -0,0 +1,6 @@ +import { JWEInvalid } from '../util/errors.js'; +export default function checkP2s(p2s) { + if (!(p2s instanceof Uint8Array) || p2s.length < 8) { + throw new JWEInvalid('PBES2 Salt Input must be 8 or more octets'); + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/lib/crypto_key.js b/webapp/node_modules/jose/dist/node/esm/lib/crypto_key.js new file mode 100644 index 0000000000000000000000000000000000000000..424f335ec4fe5262c305f2514371bffb608e2405 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/crypto_key.js @@ -0,0 +1,145 @@ +import { isCloudflareWorkers } from '../runtime/env.js'; +function unusable(name, prop = 'algorithm.name') { + return new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`); +} +function isAlgorithm(algorithm, name) { + return algorithm.name === name; +} +function getHashLength(hash) { + return parseInt(hash.name.slice(4), 10); +} +function getNamedCurve(alg) { + switch (alg) { + case 'ES256': + return 'P-256'; + case 'ES384': + return 'P-384'; + case 'ES512': + return 'P-521'; + default: + throw new Error('unreachable'); + } +} +function checkUsage(key, usages) { + if (usages.length && !usages.some((expected) => key.usages.includes(expected))) { + let msg = 'CryptoKey does not support this operation, its usages must include '; + if (usages.length > 2) { + const last = usages.pop(); + msg += `one of ${usages.join(', ')}, or ${last}.`; + } + else if (usages.length === 2) { + msg += `one of ${usages[0]} or ${usages[1]}.`; + } + else { + msg += `${usages[0]}.`; + } + throw new TypeError(msg); + } +} +export function checkSigCryptoKey(key, alg, ...usages) { + switch (alg) { + case 'HS256': + case 'HS384': + case 'HS512': { + if (!isAlgorithm(key.algorithm, 'HMAC')) + throw unusable('HMAC'); + const expected = parseInt(alg.slice(2), 10); + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + case 'RS256': + case 'RS384': + case 'RS512': { + if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5')) + throw unusable('RSASSA-PKCS1-v1_5'); + const expected = parseInt(alg.slice(2), 10); + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + case 'PS256': + case 'PS384': + case 'PS512': { + if (!isAlgorithm(key.algorithm, 'RSA-PSS')) + throw unusable('RSA-PSS'); + const expected = parseInt(alg.slice(2), 10); + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + case isCloudflareWorkers() && 'EdDSA': { + if (!isAlgorithm(key.algorithm, 'NODE-ED25519')) + throw unusable('NODE-ED25519'); + break; + } + case 'ES256': + case 'ES384': + case 'ES512': { + if (!isAlgorithm(key.algorithm, 'ECDSA')) + throw unusable('ECDSA'); + const expected = getNamedCurve(alg); + const actual = key.algorithm.namedCurve; + if (actual !== expected) + throw unusable(expected, 'algorithm.namedCurve'); + break; + } + default: + throw new TypeError('CryptoKey does not support this operation'); + } + checkUsage(key, usages); +} +export function checkEncCryptoKey(key, alg, ...usages) { + switch (alg) { + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': { + if (!isAlgorithm(key.algorithm, 'AES-GCM')) + throw unusable('AES-GCM'); + const expected = parseInt(alg.slice(1, 4), 10); + const actual = key.algorithm.length; + if (actual !== expected) + throw unusable(expected, 'algorithm.length'); + break; + } + case 'A128KW': + case 'A192KW': + case 'A256KW': { + if (!isAlgorithm(key.algorithm, 'AES-KW')) + throw unusable('AES-KW'); + const expected = parseInt(alg.slice(1, 4), 10); + const actual = key.algorithm.length; + if (actual !== expected) + throw unusable(expected, 'algorithm.length'); + break; + } + case 'ECDH': + if (!isAlgorithm(key.algorithm, 'ECDH')) + throw unusable('ECDH'); + break; + case 'PBES2-HS256+A128KW': + case 'PBES2-HS384+A192KW': + case 'PBES2-HS512+A256KW': + if (!isAlgorithm(key.algorithm, 'PBKDF2')) + throw unusable('PBKDF2'); + break; + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': { + if (!isAlgorithm(key.algorithm, 'RSA-OAEP')) + throw unusable('RSA-OAEP'); + const expected = parseInt(alg.slice(9), 10) || 1; + const actual = getHashLength(key.algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, 'algorithm.hash'); + break; + } + default: + throw new TypeError('CryptoKey does not support this operation'); + } + checkUsage(key, usages); +} diff --git a/webapp/node_modules/jose/dist/node/esm/lib/decrypt_key_management.js b/webapp/node_modules/jose/dist/node/esm/lib/decrypt_key_management.js new file mode 100644 index 0000000000000000000000000000000000000000..71074cac9b4bcfe59552c4d1db612fc44b1c431a --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/decrypt_key_management.js @@ -0,0 +1,95 @@ +import { unwrap as aesKw } from '../runtime/aeskw.js'; +import * as ECDH from '../runtime/ecdhes.js'; +import { decrypt as pbes2Kw } from '../runtime/pbes2kw.js'; +import { decrypt as rsaEs } from '../runtime/rsaes.js'; +import { decode as base64url } from '../runtime/base64url.js'; +import { JOSENotSupported, JWEInvalid } from '../util/errors.js'; +import { bitLength as cekLength } from '../lib/cek.js'; +import { importJWK } from '../key/import.js'; +import checkKeyType from './check_key_type.js'; +import isObject from './is_object.js'; +import { unwrap as aesGcmKw } from './aesgcmkw.js'; +async function decryptKeyManagement(alg, key, encryptedKey, joseHeader) { + checkKeyType(alg, key, 'decrypt'); + switch (alg) { + case 'dir': { + if (encryptedKey !== undefined) + throw new JWEInvalid('Encountered unexpected JWE Encrypted Key'); + return key; + } + case 'ECDH-ES': + if (encryptedKey !== undefined) + throw new JWEInvalid('Encountered unexpected JWE Encrypted Key'); + case 'ECDH-ES+A128KW': + case 'ECDH-ES+A192KW': + case 'ECDH-ES+A256KW': { + if (!isObject(joseHeader.epk)) + throw new JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`); + if (!ECDH.ecdhAllowed(key)) + throw new JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime'); + const epk = await importJWK(joseHeader.epk, alg); + let partyUInfo; + let partyVInfo; + if (joseHeader.apu !== undefined) { + if (typeof joseHeader.apu !== 'string') + throw new JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`); + partyUInfo = base64url(joseHeader.apu); + } + if (joseHeader.apv !== undefined) { + if (typeof joseHeader.apv !== 'string') + throw new JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`); + partyVInfo = base64url(joseHeader.apv); + } + const sharedSecret = await ECDH.deriveKey(epk, key, alg === 'ECDH-ES' ? joseHeader.enc : alg, alg === 'ECDH-ES' ? cekLength(joseHeader.enc) : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo); + if (alg === 'ECDH-ES') + return sharedSecret; + if (encryptedKey === undefined) + throw new JWEInvalid('JWE Encrypted Key missing'); + return aesKw(alg.slice(-6), sharedSecret, encryptedKey); + } + case 'RSA1_5': + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': { + if (encryptedKey === undefined) + throw new JWEInvalid('JWE Encrypted Key missing'); + return rsaEs(alg, key, encryptedKey); + } + case 'PBES2-HS256+A128KW': + case 'PBES2-HS384+A192KW': + case 'PBES2-HS512+A256KW': { + if (encryptedKey === undefined) + throw new JWEInvalid('JWE Encrypted Key missing'); + if (typeof joseHeader.p2c !== 'number') + throw new JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`); + if (typeof joseHeader.p2s !== 'string') + throw new JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`); + return pbes2Kw(alg, key, encryptedKey, joseHeader.p2c, base64url(joseHeader.p2s)); + } + case 'A128KW': + case 'A192KW': + case 'A256KW': { + if (encryptedKey === undefined) + throw new JWEInvalid('JWE Encrypted Key missing'); + return aesKw(alg, key, encryptedKey); + } + case 'A128GCMKW': + case 'A192GCMKW': + case 'A256GCMKW': { + if (encryptedKey === undefined) + throw new JWEInvalid('JWE Encrypted Key missing'); + if (typeof joseHeader.iv !== 'string') + throw new JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`); + if (typeof joseHeader.tag !== 'string') + throw new JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`); + const iv = base64url(joseHeader.iv); + const tag = base64url(joseHeader.tag); + return aesGcmKw(alg, key, encryptedKey, iv, tag); + } + default: { + throw new JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value'); + } + } +} +export default decryptKeyManagement; diff --git a/webapp/node_modules/jose/dist/node/esm/lib/encrypt_key_management.js b/webapp/node_modules/jose/dist/node/esm/lib/encrypt_key_management.js new file mode 100644 index 0000000000000000000000000000000000000000..eb9022c63e52ae52d5a17bda9b70e3906a181c8f --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/encrypt_key_management.js @@ -0,0 +1,87 @@ +import { wrap as aesKw } from '../runtime/aeskw.js'; +import * as ECDH from '../runtime/ecdhes.js'; +import { encrypt as pbes2Kw } from '../runtime/pbes2kw.js'; +import { encrypt as rsaEs } from '../runtime/rsaes.js'; +import { encode as base64url } from '../runtime/base64url.js'; +import generateCek, { bitLength as cekLength } from '../lib/cek.js'; +import { JOSENotSupported } from '../util/errors.js'; +import { exportJWK } from '../key/export.js'; +import checkKeyType from './check_key_type.js'; +import { wrap as aesGcmKw } from './aesgcmkw.js'; +async function encryptKeyManagement(alg, enc, key, providedCek, providedParameters = {}) { + let encryptedKey; + let parameters; + let cek; + checkKeyType(alg, key, 'encrypt'); + switch (alg) { + case 'dir': { + cek = key; + break; + } + case 'ECDH-ES': + case 'ECDH-ES+A128KW': + case 'ECDH-ES+A192KW': + case 'ECDH-ES+A256KW': { + if (!ECDH.ecdhAllowed(key)) { + throw new JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime'); + } + const { apu, apv } = providedParameters; + let { epk: ephemeralKey } = providedParameters; + ephemeralKey || (ephemeralKey = (await ECDH.generateEpk(key)).privateKey); + const { x, y, crv, kty } = await exportJWK(ephemeralKey); + const sharedSecret = await ECDH.deriveKey(key, ephemeralKey, alg === 'ECDH-ES' ? enc : alg, alg === 'ECDH-ES' ? cekLength(enc) : parseInt(alg.slice(-5, -2), 10), apu, apv); + parameters = { epk: { x, crv, kty } }; + if (kty === 'EC') + parameters.epk.y = y; + if (apu) + parameters.apu = base64url(apu); + if (apv) + parameters.apv = base64url(apv); + if (alg === 'ECDH-ES') { + cek = sharedSecret; + break; + } + cek = providedCek || generateCek(enc); + const kwAlg = alg.slice(-6); + encryptedKey = await aesKw(kwAlg, sharedSecret, cek); + break; + } + case 'RSA1_5': + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': { + cek = providedCek || generateCek(enc); + encryptedKey = await rsaEs(alg, key, cek); + break; + } + case 'PBES2-HS256+A128KW': + case 'PBES2-HS384+A192KW': + case 'PBES2-HS512+A256KW': { + cek = providedCek || generateCek(enc); + const { p2c, p2s } = providedParameters; + ({ encryptedKey, ...parameters } = await pbes2Kw(alg, key, cek, p2c, p2s)); + break; + } + case 'A128KW': + case 'A192KW': + case 'A256KW': { + cek = providedCek || generateCek(enc); + encryptedKey = await aesKw(alg, key, cek); + break; + } + case 'A128GCMKW': + case 'A192GCMKW': + case 'A256GCMKW': { + cek = providedCek || generateCek(enc); + const { iv } = providedParameters; + ({ encryptedKey, ...parameters } = await aesGcmKw(alg, key, cek, iv)); + break; + } + default: { + throw new JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value'); + } + } + return { cek, encryptedKey, parameters }; +} +export default encryptKeyManagement; diff --git a/webapp/node_modules/jose/dist/node/esm/lib/epoch.js b/webapp/node_modules/jose/dist/node/esm/lib/epoch.js new file mode 100644 index 0000000000000000000000000000000000000000..e405e4b2df8336a5c54452047c187ede4fb168d6 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/epoch.js @@ -0,0 +1 @@ +export default (date) => Math.floor(date.getTime() / 1000); diff --git a/webapp/node_modules/jose/dist/node/esm/lib/format_pem.js b/webapp/node_modules/jose/dist/node/esm/lib/format_pem.js new file mode 100644 index 0000000000000000000000000000000000000000..81673f256f3e36c16d32648a91be96b430d4728e --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/format_pem.js @@ -0,0 +1,4 @@ +export default (b64, descriptor) => { + const newlined = (b64.match(/.{1,64}/g) || []).join('\n'); + return `-----BEGIN ${descriptor}-----\n${newlined}\n-----END ${descriptor}-----`; +}; diff --git a/webapp/node_modules/jose/dist/node/esm/lib/invalid_key_input.js b/webapp/node_modules/jose/dist/node/esm/lib/invalid_key_input.js new file mode 100644 index 0000000000000000000000000000000000000000..468ad288b4d1cd2714057919f9d4ca9e91c11f5c --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/invalid_key_input.js @@ -0,0 +1,25 @@ +export default (actual, ...types) => { + let msg = 'Key must be '; + if (types.length > 2) { + const last = types.pop(); + msg += `one of type ${types.join(', ')}, or ${last}.`; + } + else if (types.length === 2) { + msg += `one of type ${types[0]} or ${types[1]}.`; + } + else { + msg += `of type ${types[0]}.`; + } + if (actual == null) { + msg += ` Received ${actual}`; + } + else if (typeof actual === 'function' && actual.name) { + msg += ` Received function ${actual.name}`; + } + else if (typeof actual === 'object' && actual != null) { + if (actual.constructor && actual.constructor.name) { + msg += ` Received an instance of ${actual.constructor.name}`; + } + } + return msg; +}; diff --git a/webapp/node_modules/jose/dist/node/esm/lib/is_disjoint.js b/webapp/node_modules/jose/dist/node/esm/lib/is_disjoint.js new file mode 100644 index 0000000000000000000000000000000000000000..6f643502dcffd4fa684c6554fd715a97b1a7113b --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/is_disjoint.js @@ -0,0 +1,22 @@ +const isDisjoint = (...headers) => { + const sources = headers.filter(Boolean); + if (sources.length === 0 || sources.length === 1) { + return true; + } + let acc; + for (const header of sources) { + const parameters = Object.keys(header); + if (!acc || acc.size === 0) { + acc = new Set(parameters); + continue; + } + for (const parameter of parameters) { + if (acc.has(parameter)) { + return false; + } + acc.add(parameter); + } + } + return true; +}; +export default isDisjoint; diff --git a/webapp/node_modules/jose/dist/node/esm/lib/is_object.js b/webapp/node_modules/jose/dist/node/esm/lib/is_object.js new file mode 100644 index 0000000000000000000000000000000000000000..4955e93225d63bfc83b9805cf71872ba2d158eb3 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/is_object.js @@ -0,0 +1,16 @@ +function isObjectLike(value) { + return typeof value === 'object' && value !== null; +} +export default function isObject(input) { + if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') { + return false; + } + if (Object.getPrototypeOf(input) === null) { + return true; + } + let proto = input; + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + return Object.getPrototypeOf(input) === proto; +} diff --git a/webapp/node_modules/jose/dist/node/esm/lib/iv.js b/webapp/node_modules/jose/dist/node/esm/lib/iv.js new file mode 100644 index 0000000000000000000000000000000000000000..cab2a127294e8ef8e9cbc870fa611efa973e4421 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/iv.js @@ -0,0 +1,20 @@ +import { JOSENotSupported } from '../util/errors.js'; +import random from '../runtime/random.js'; +export function bitLength(alg) { + switch (alg) { + case 'A128GCM': + case 'A128GCMKW': + case 'A192GCM': + case 'A192GCMKW': + case 'A256GCM': + case 'A256GCMKW': + return 96; + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + return 128; + default: + throw new JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`); + } +} +export default (alg) => random(new Uint8Array(bitLength(alg) >> 3)); diff --git a/webapp/node_modules/jose/dist/node/esm/lib/jwt_claims_set.js b/webapp/node_modules/jose/dist/node/esm/lib/jwt_claims_set.js new file mode 100644 index 0000000000000000000000000000000000000000..fc4193ad9013e6ecf9c293d5c7796008fd691276 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/jwt_claims_set.js @@ -0,0 +1,91 @@ +import { JWTClaimValidationFailed, JWTExpired, JWTInvalid } from '../util/errors.js'; +import { decoder } from './buffer_utils.js'; +import epoch from './epoch.js'; +import secs from './secs.js'; +import isObject from './is_object.js'; +const normalizeTyp = (value) => value.toLowerCase().replace(/^application\//, ''); +const checkAudiencePresence = (audPayload, audOption) => { + if (typeof audPayload === 'string') { + return audOption.includes(audPayload); + } + if (Array.isArray(audPayload)) { + return audOption.some(Set.prototype.has.bind(new Set(audPayload))); + } + return false; +}; +export default (protectedHeader, encodedPayload, options = {}) => { + const { typ } = options; + if (typ && + (typeof protectedHeader.typ !== 'string' || + normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) { + throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', 'typ', 'check_failed'); + } + let payload; + try { + payload = JSON.parse(decoder.decode(encodedPayload)); + } + catch { + } + if (!isObject(payload)) { + throw new JWTInvalid('JWT Claims Set must be a top-level JSON object'); + } + const { issuer } = options; + if (issuer && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) { + throw new JWTClaimValidationFailed('unexpected "iss" claim value', 'iss', 'check_failed'); + } + const { subject } = options; + if (subject && payload.sub !== subject) { + throw new JWTClaimValidationFailed('unexpected "sub" claim value', 'sub', 'check_failed'); + } + const { audience } = options; + if (audience && + !checkAudiencePresence(payload.aud, typeof audience === 'string' ? [audience] : audience)) { + throw new JWTClaimValidationFailed('unexpected "aud" claim value', 'aud', 'check_failed'); + } + let tolerance; + switch (typeof options.clockTolerance) { + case 'string': + tolerance = secs(options.clockTolerance); + break; + case 'number': + tolerance = options.clockTolerance; + break; + case 'undefined': + tolerance = 0; + break; + default: + throw new TypeError('Invalid clockTolerance option type'); + } + const { currentDate } = options; + const now = epoch(currentDate || new Date()); + if ((payload.iat !== undefined || options.maxTokenAge) && typeof payload.iat !== 'number') { + throw new JWTClaimValidationFailed('"iat" claim must be a number', 'iat', 'invalid'); + } + if (payload.nbf !== undefined) { + if (typeof payload.nbf !== 'number') { + throw new JWTClaimValidationFailed('"nbf" claim must be a number', 'nbf', 'invalid'); + } + if (payload.nbf > now + tolerance) { + throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', 'nbf', 'check_failed'); + } + } + if (payload.exp !== undefined) { + if (typeof payload.exp !== 'number') { + throw new JWTClaimValidationFailed('"exp" claim must be a number', 'exp', 'invalid'); + } + if (payload.exp <= now - tolerance) { + throw new JWTExpired('"exp" claim timestamp check failed', 'exp', 'check_failed'); + } + } + if (options.maxTokenAge) { + const age = now - payload.iat; + const max = typeof options.maxTokenAge === 'number' ? options.maxTokenAge : secs(options.maxTokenAge); + if (age - tolerance > max) { + throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', 'iat', 'check_failed'); + } + if (age < 0 - tolerance) { + throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed'); + } + } + return payload; +}; diff --git a/webapp/node_modules/jose/dist/node/esm/lib/secs.js b/webapp/node_modules/jose/dist/node/esm/lib/secs.js new file mode 100644 index 0000000000000000000000000000000000000000..cf470ed8ad45c393b273f25562b8d06d2a642b59 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/secs.js @@ -0,0 +1,44 @@ +const minute = 60; +const hour = minute * 60; +const day = hour * 24; +const week = day * 7; +const year = day * 365.25; +const REGEX = /^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i; +export default (str) => { + const matched = REGEX.exec(str); + if (!matched) { + throw new TypeError('Invalid time period format'); + } + const value = parseFloat(matched[1]); + const unit = matched[2].toLowerCase(); + switch (unit) { + case 'sec': + case 'secs': + case 'second': + case 'seconds': + case 's': + return Math.round(value); + case 'minute': + case 'minutes': + case 'min': + case 'mins': + case 'm': + return Math.round(value * minute); + case 'hour': + case 'hours': + case 'hr': + case 'hrs': + case 'h': + return Math.round(value * hour); + case 'day': + case 'days': + case 'd': + return Math.round(value * day); + case 'week': + case 'weeks': + case 'w': + return Math.round(value * week); + default: + return Math.round(value * year); + } +}; diff --git a/webapp/node_modules/jose/dist/node/esm/lib/validate_algorithms.js b/webapp/node_modules/jose/dist/node/esm/lib/validate_algorithms.js new file mode 100644 index 0000000000000000000000000000000000000000..a6a7918571f55526070266826dd48dd6e165c38e --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/validate_algorithms.js @@ -0,0 +1,11 @@ +const validateAlgorithms = (option, algorithms) => { + if (algorithms !== undefined && + (!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== 'string'))) { + throw new TypeError(`"${option}" option must be an array of strings`); + } + if (!algorithms) { + return undefined; + } + return new Set(algorithms); +}; +export default validateAlgorithms; diff --git a/webapp/node_modules/jose/dist/node/esm/lib/validate_crit.js b/webapp/node_modules/jose/dist/node/esm/lib/validate_crit.js new file mode 100644 index 0000000000000000000000000000000000000000..68c69f18f5d94f5b09a9a6de3d3fe6e0375f86a7 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/lib/validate_crit.js @@ -0,0 +1,34 @@ +import { JOSENotSupported } from '../util/errors.js'; +function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) { + if (joseHeader.crit !== undefined && protectedHeader.crit === undefined) { + throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected'); + } + if (!protectedHeader || protectedHeader.crit === undefined) { + return new Set(); + } + if (!Array.isArray(protectedHeader.crit) || + protectedHeader.crit.length === 0 || + protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) { + throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present'); + } + let recognized; + if (recognizedOption !== undefined) { + recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]); + } + else { + recognized = recognizedDefault; + } + for (const parameter of protectedHeader.crit) { + if (!recognized.has(parameter)) { + throw new JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`); + } + if (joseHeader[parameter] === undefined) { + throw new Err(`Extension Header Parameter "${parameter}" is missing`); + } + else if (recognized.get(parameter) && protectedHeader[parameter] === undefined) { + throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`); + } + } + return new Set(protectedHeader.crit); +} +export default validateCrit; diff --git a/webapp/node_modules/jose/dist/node/esm/package.json b/webapp/node_modules/jose/dist/node/esm/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6990891ff35dd464b19df096e6089004b0e31825 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/package.json @@ -0,0 +1 @@ +{"type": "module"} diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/aeskw.js b/webapp/node_modules/jose/dist/node/esm/runtime/aeskw.js new file mode 100644 index 0000000000000000000000000000000000000000..722b8b37e5b87e7a38e1f87b6b6e8755b8e61bbe --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/aeskw.js @@ -0,0 +1,50 @@ +import { Buffer } from 'buffer'; +import { KeyObject, createDecipheriv, createCipheriv, createSecretKey } from 'crypto'; +import { JOSENotSupported } from '../util/errors.js'; +import { concat } from '../lib/buffer_utils.js'; +import { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import isKeyObject from './is_key_object.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import supported from './ciphers.js'; +import { types } from './is_key_like.js'; +function checkKeySize(key, alg) { + if (key.symmetricKeySize << 3 !== parseInt(alg.slice(1, 4), 10)) { + throw new TypeError(`Invalid key size for alg: ${alg}`); + } +} +function ensureKeyObject(key, alg, usage) { + if (isKeyObject(key)) { + return key; + } + if (key instanceof Uint8Array) { + return createSecretKey(key); + } + if (isCryptoKey(key)) { + checkEncCryptoKey(key, alg, usage); + return KeyObject.from(key); + } + throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array')); +} +export const wrap = (alg, key, cek) => { + const size = parseInt(alg.slice(1, 4), 10); + const algorithm = `aes${size}-wrap`; + if (!supported(algorithm)) { + throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } + const keyObject = ensureKeyObject(key, alg, 'wrapKey'); + checkKeySize(keyObject, alg); + const cipher = createCipheriv(algorithm, keyObject, Buffer.alloc(8, 0xa6)); + return concat(cipher.update(cek), cipher.final()); +}; +export const unwrap = (alg, key, encryptedKey) => { + const size = parseInt(alg.slice(1, 4), 10); + const algorithm = `aes${size}-wrap`; + if (!supported(algorithm)) { + throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } + const keyObject = ensureKeyObject(key, alg, 'unwrapKey'); + checkKeySize(keyObject, alg); + const cipher = createDecipheriv(algorithm, keyObject, Buffer.alloc(8, 0xa6)); + return concat(cipher.update(encryptedKey), cipher.final()); +}; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/asn1.js b/webapp/node_modules/jose/dist/node/esm/runtime/asn1.js new file mode 100644 index 0000000000000000000000000000000000000000..1a5e9e6b222858955360e56b3f949504db5fa580 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/asn1.js @@ -0,0 +1,41 @@ +import { createPrivateKey, createPublicKey, KeyObject } from 'crypto'; +import { Buffer } from 'buffer'; +import { isCryptoKey } from './webcrypto.js'; +import isKeyObject from './is_key_object.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +const genericExport = (keyType, keyFormat, key) => { + let keyObject; + if (isCryptoKey(key)) { + if (!key.extractable) { + throw new TypeError('CryptoKey is not extractable'); + } + keyObject = KeyObject.from(key); + } + else if (isKeyObject(key)) { + keyObject = key; + } + else { + throw new TypeError(invalidKeyInput(key, ...types)); + } + if (keyObject.type !== keyType) { + throw new TypeError(`key is not a ${keyType} key`); + } + return keyObject.export({ format: 'pem', type: keyFormat }); +}; +export const toSPKI = (key) => { + return genericExport('public', 'spki', key); +}; +export const toPKCS8 = (key) => { + return genericExport('private', 'pkcs8', key); +}; +export const fromPKCS8 = (pem) => createPrivateKey({ + key: Buffer.from(pem.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g, ''), 'base64'), + type: 'pkcs8', + format: 'der', +}); +export const fromSPKI = (pem) => createPublicKey({ + key: Buffer.from(pem.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, ''), 'base64'), + type: 'spki', + format: 'der', +}); diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/asn1_sequence_decoder.js b/webapp/node_modules/jose/dist/node/esm/runtime/asn1_sequence_decoder.js new file mode 100644 index 0000000000000000000000000000000000000000..61ba4c31160d1abf7c80951dfaa522c78b520b1f --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/asn1_sequence_decoder.js @@ -0,0 +1,44 @@ +const tagInteger = 0x02; +const tagSequence = 0x30; +export default class Asn1SequenceDecoder { + constructor(buffer) { + if (buffer[0] !== tagSequence) { + throw new TypeError(); + } + this.buffer = buffer; + this.offset = 1; + const len = this.decodeLength(); + if (len !== buffer.length - this.offset) { + throw new TypeError(); + } + } + decodeLength() { + let length = this.buffer[this.offset++]; + if (length & 0x80) { + const nBytes = length & ~0x80; + length = 0; + for (let i = 0; i < nBytes; i++) + length = (length << 8) | this.buffer[this.offset + i]; + this.offset += nBytes; + } + return length; + } + unsignedInteger() { + if (this.buffer[this.offset++] !== tagInteger) { + throw new TypeError(); + } + let length = this.decodeLength(); + if (this.buffer[this.offset] === 0) { + this.offset++; + length--; + } + const result = this.buffer.slice(this.offset, this.offset + length); + this.offset += length; + return result; + } + end() { + if (this.offset !== this.buffer.length) { + throw new TypeError(); + } + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/asn1_sequence_encoder.js b/webapp/node_modules/jose/dist/node/esm/runtime/asn1_sequence_encoder.js new file mode 100644 index 0000000000000000000000000000000000000000..ac672776a46cf4efdba91597d51face4fda9214e --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/asn1_sequence_encoder.js @@ -0,0 +1,88 @@ +import { Buffer } from 'buffer'; +import { JOSENotSupported } from '../util/errors.js'; +const tagInteger = 0x02; +const tagBitStr = 0x03; +const tagOctStr = 0x04; +const tagSequence = 0x30; +const bZero = Buffer.from([0x00]); +const bTagInteger = Buffer.from([tagInteger]); +const bTagBitStr = Buffer.from([tagBitStr]); +const bTagSequence = Buffer.from([tagSequence]); +const bTagOctStr = Buffer.from([tagOctStr]); +const encodeLength = (len) => { + if (len < 128) + return Buffer.from([len]); + const buffer = Buffer.alloc(5); + buffer.writeUInt32BE(len, 1); + let offset = 1; + while (buffer[offset] === 0) + offset++; + buffer[offset - 1] = 0x80 | (5 - offset); + return buffer.slice(offset - 1); +}; +const oids = new Map([ + ['P-256', Buffer.from('06 08 2A 86 48 CE 3D 03 01 07'.replace(/ /g, ''), 'hex')], + ['secp256k1', Buffer.from('06 05 2B 81 04 00 0A'.replace(/ /g, ''), 'hex')], + ['P-384', Buffer.from('06 05 2B 81 04 00 22'.replace(/ /g, ''), 'hex')], + ['P-521', Buffer.from('06 05 2B 81 04 00 23'.replace(/ /g, ''), 'hex')], + ['ecPublicKey', Buffer.from('06 07 2A 86 48 CE 3D 02 01'.replace(/ /g, ''), 'hex')], + ['X25519', Buffer.from('06 03 2B 65 6E'.replace(/ /g, ''), 'hex')], + ['X448', Buffer.from('06 03 2B 65 6F'.replace(/ /g, ''), 'hex')], + ['Ed25519', Buffer.from('06 03 2B 65 70'.replace(/ /g, ''), 'hex')], + ['Ed448', Buffer.from('06 03 2B 65 71'.replace(/ /g, ''), 'hex')], +]); +export default class DumbAsn1Encoder { + constructor() { + this.length = 0; + this.elements = []; + } + oidFor(oid) { + const bOid = oids.get(oid); + if (!bOid) { + throw new JOSENotSupported('Invalid or unsupported OID'); + } + this.elements.push(bOid); + this.length += bOid.length; + } + zero() { + this.elements.push(bTagInteger, Buffer.from([0x01]), bZero); + this.length += 3; + } + one() { + this.elements.push(bTagInteger, Buffer.from([0x01]), Buffer.from([0x01])); + this.length += 3; + } + unsignedInteger(integer) { + if (integer[0] & 0x80) { + const len = encodeLength(integer.length + 1); + this.elements.push(bTagInteger, len, bZero, integer); + this.length += 2 + len.length + integer.length; + } + else { + let i = 0; + while (integer[i] === 0 && (integer[i + 1] & 0x80) === 0) + i++; + const len = encodeLength(integer.length - i); + this.elements.push(bTagInteger, encodeLength(integer.length - i), integer.slice(i)); + this.length += 1 + len.length + integer.length - i; + } + } + octStr(octStr) { + const len = encodeLength(octStr.length); + this.elements.push(bTagOctStr, encodeLength(octStr.length), octStr); + this.length += 1 + len.length + octStr.length; + } + bitStr(bitS) { + const len = encodeLength(bitS.length + 1); + this.elements.push(bTagBitStr, encodeLength(bitS.length + 1), bZero, bitS); + this.length += 1 + len.length + bitS.length + 1; + } + add(seq) { + this.elements.push(seq); + this.length += seq.length; + } + end(tag = bTagSequence) { + const len = encodeLength(this.length); + return Buffer.concat([tag, len, ...this.elements], 1 + len.length + this.length); + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/base64url.js b/webapp/node_modules/jose/dist/node/esm/runtime/base64url.js new file mode 100644 index 0000000000000000000000000000000000000000..1579359fdf18d9c2688121790e8607e1a9e22b33 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/base64url.js @@ -0,0 +1,20 @@ +import { Buffer } from 'buffer'; +import { decoder } from '../lib/buffer_utils.js'; +let encode; +function normalize(input) { + let encoded = input; + if (encoded instanceof Uint8Array) { + encoded = decoder.decode(encoded); + } + return encoded; +} +if (Buffer.isEncoding('base64url')) { + encode = (input) => Buffer.from(input).toString('base64url'); +} +else { + encode = (input) => Buffer.from(input).toString('base64').replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); +} +export const decodeBase64 = (input) => Buffer.from(input, 'base64'); +export const encodeBase64 = (input) => Buffer.from(input).toString('base64'); +export { encode }; +export const decode = (input) => Buffer.from(normalize(input), 'base64'); diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/cbc_tag.js b/webapp/node_modules/jose/dist/node/esm/runtime/cbc_tag.js new file mode 100644 index 0000000000000000000000000000000000000000..fa58c38b6c1b39bcd21d3f774ca7faa97a32fb4c --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/cbc_tag.js @@ -0,0 +1,8 @@ +import { createHmac } from 'crypto'; +import { concat, uint64be } from '../lib/buffer_utils.js'; +export default function cbcTag(aad, iv, ciphertext, macSize, macKey, keySize) { + const macData = concat(aad, iv, ciphertext, uint64be(aad.length << 3)); + const hmac = createHmac(`sha${macSize}`, macKey); + hmac.update(macData); + return hmac.digest().slice(0, keySize >> 3); +} diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/check_cek_length.js b/webapp/node_modules/jose/dist/node/esm/runtime/check_cek_length.js new file mode 100644 index 0000000000000000000000000000000000000000..3922a7bce5cebfc7024ee8ed0f7bf2037ed72b74 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/check_cek_length.js @@ -0,0 +1,33 @@ +import { JWEInvalid, JOSENotSupported } from '../util/errors.js'; +import isKeyObject from './is_key_object.js'; +const checkCekLength = (enc, cek) => { + let expected; + switch (enc) { + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + expected = parseInt(enc.slice(-3), 10); + break; + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + expected = parseInt(enc.slice(1, 4), 10); + break; + default: + throw new JOSENotSupported(`Content Encryption Algorithm ${enc} is not supported either by JOSE or your javascript runtime`); + } + if (cek instanceof Uint8Array) { + if (cek.length << 3 !== expected) { + throw new JWEInvalid('Invalid Content Encryption Key length'); + } + return; + } + if (isKeyObject(cek) && cek.type === 'secret') { + if (cek.symmetricKeySize << 3 !== expected) { + throw new JWEInvalid('Invalid Content Encryption Key length'); + } + return; + } + throw new TypeError('Invalid Content Encryption Key type'); +}; +export default checkCekLength; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/check_modulus_length.js b/webapp/node_modules/jose/dist/node/esm/runtime/check_modulus_length.js new file mode 100644 index 0000000000000000000000000000000000000000..690f80960277978ce53bfacb76dae5cb6e26e59a --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/check_modulus_length.js @@ -0,0 +1,48 @@ +export const weakMap = new WeakMap(); +const getLength = (buf, index) => { + let len = buf.readUInt8(1); + if ((len & 0x80) === 0) { + if (index === 0) { + return len; + } + return getLength(buf.subarray(2 + len), index - 1); + } + const num = len & 0x7f; + len = 0; + for (let i = 0; i < num; i++) { + len <<= 8; + const j = buf.readUInt8(2 + i); + len |= j; + } + if (index === 0) { + return len; + } + return getLength(buf.subarray(2 + len), index - 1); +}; +const getLengthOfSeqIndex = (sequence, index) => { + const len = sequence.readUInt8(1); + if ((len & 0x80) === 0) { + return getLength(sequence.subarray(2), index); + } + const num = len & 0x7f; + return getLength(sequence.subarray(2 + num), index); +}; +const getModulusLength = (key) => { + var _a, _b; + if (weakMap.has(key)) { + return weakMap.get(key); + } + const modulusLength = (_b = (_a = key.asymmetricKeyDetails) === null || _a === void 0 ? void 0 : _a.modulusLength) !== null && _b !== void 0 ? _b : (getLengthOfSeqIndex(key.export({ format: 'der', type: 'pkcs1' }), key.type === 'private' ? 1 : 0) - + 1) << + 3; + weakMap.set(key, modulusLength); + return modulusLength; +}; +export const setModulusLength = (keyObject, modulusLength) => { + weakMap.set(keyObject, modulusLength); +}; +export default (key, alg) => { + if (getModulusLength(key) < 2048) { + throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`); + } +}; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/ciphers.js b/webapp/node_modules/jose/dist/node/esm/runtime/ciphers.js new file mode 100644 index 0000000000000000000000000000000000000000..daded1d5032ebd84fa51e4590b363e81d0e321d8 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/ciphers.js @@ -0,0 +1,6 @@ +import { getCiphers } from 'crypto'; +let ciphers; +export default (algorithm) => { + ciphers || (ciphers = new Set(getCiphers())); + return ciphers.has(algorithm); +}; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/decrypt.js b/webapp/node_modules/jose/dist/node/esm/runtime/decrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..8a611d174bba619f727c552dd4e43016ddb31436 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/decrypt.js @@ -0,0 +1,95 @@ +import { createDecipheriv, KeyObject } from 'crypto'; +import checkIvLength from '../lib/check_iv_length.js'; +import checkCekLength from './check_cek_length.js'; +import { concat } from '../lib/buffer_utils.js'; +import { JOSENotSupported, JWEDecryptionFailed } from '../util/errors.js'; +import timingSafeEqual from './timing_safe_equal.js'; +import cbcTag from './cbc_tag.js'; +import { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import isKeyObject from './is_key_object.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import supported from './ciphers.js'; +import { types } from './is_key_like.js'; +function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) { + const keySize = parseInt(enc.slice(1, 4), 10); + if (isKeyObject(cek)) { + cek = cek.export(); + } + const encKey = cek.subarray(keySize >> 3); + const macKey = cek.subarray(0, keySize >> 3); + const macSize = parseInt(enc.slice(-3), 10); + const algorithm = `aes-${keySize}-cbc`; + if (!supported(algorithm)) { + throw new JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`); + } + const expectedTag = cbcTag(aad, iv, ciphertext, macSize, macKey, keySize); + let macCheckPassed; + try { + macCheckPassed = timingSafeEqual(tag, expectedTag); + } + catch { + } + if (!macCheckPassed) { + throw new JWEDecryptionFailed(); + } + let plaintext; + try { + const decipher = createDecipheriv(algorithm, encKey, iv); + plaintext = concat(decipher.update(ciphertext), decipher.final()); + } + catch { + } + if (!plaintext) { + throw new JWEDecryptionFailed(); + } + return plaintext; +} +function gcmDecrypt(enc, cek, ciphertext, iv, tag, aad) { + const keySize = parseInt(enc.slice(1, 4), 10); + const algorithm = `aes-${keySize}-gcm`; + if (!supported(algorithm)) { + throw new JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`); + } + try { + const decipher = createDecipheriv(algorithm, cek, iv, { authTagLength: 16 }); + decipher.setAuthTag(tag); + if (aad.byteLength) { + decipher.setAAD(aad, { plaintextLength: ciphertext.length }); + } + const plaintext = decipher.update(ciphertext); + decipher.final(); + return plaintext; + } + catch { + throw new JWEDecryptionFailed(); + } +} +const decrypt = (enc, cek, ciphertext, iv, tag, aad) => { + let key; + if (isCryptoKey(cek)) { + checkEncCryptoKey(cek, enc, 'decrypt'); + key = KeyObject.from(cek); + } + else if (cek instanceof Uint8Array || isKeyObject(cek)) { + key = cek; + } + else { + throw new TypeError(invalidKeyInput(cek, ...types, 'Uint8Array')); + } + checkCekLength(enc, key); + checkIvLength(enc, iv); + switch (enc) { + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + return cbcDecrypt(enc, key, ciphertext, iv, tag, aad); + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + return gcmDecrypt(enc, key, ciphertext, iv, tag, aad); + default: + throw new JOSENotSupported('Unsupported JWE Content Encryption Algorithm'); + } +}; +export default decrypt; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/digest.js b/webapp/node_modules/jose/dist/node/esm/runtime/digest.js new file mode 100644 index 0000000000000000000000000000000000000000..0facde6c299a33ccc5c5ffd9bfb7cb0d2148c418 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/digest.js @@ -0,0 +1,3 @@ +import { createHash } from 'crypto'; +const digest = (algorithm, data) => createHash(algorithm).update(data).digest(); +export default digest; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/dsa_digest.js b/webapp/node_modules/jose/dist/node/esm/runtime/dsa_digest.js new file mode 100644 index 0000000000000000000000000000000000000000..ce7215bd67764a0897b4f3540e878c35921719eb --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/dsa_digest.js @@ -0,0 +1,22 @@ +import { JOSENotSupported } from '../util/errors.js'; +export default function dsaDigest(alg) { + switch (alg) { + case 'PS256': + case 'RS256': + case 'ES256': + case 'ES256K': + return 'sha256'; + case 'PS384': + case 'RS384': + case 'ES384': + return 'sha384'; + case 'PS512': + case 'RS512': + case 'ES512': + return 'sha512'; + case 'EdDSA': + return undefined; + default: + throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/ecdhes.js b/webapp/node_modules/jose/dist/node/esm/runtime/ecdhes.js new file mode 100644 index 0000000000000000000000000000000000000000..d3faef4a059df7fc7c2477ef5b166162ae4631a6 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/ecdhes.js @@ -0,0 +1,64 @@ +import { diffieHellman, generateKeyPair as generateKeyPairCb, KeyObject } from 'crypto'; +import { promisify } from 'util'; +import getNamedCurve from './get_named_curve.js'; +import { encoder, concat, uint32be, lengthAndInput, concatKdf } from '../lib/buffer_utils.js'; +import { JOSENotSupported } from '../util/errors.js'; +import { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import isKeyObject from './is_key_object.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +const generateKeyPair = promisify(generateKeyPairCb); +export async function deriveKey(publicKee, privateKee, algorithm, keyLength, apu = new Uint8Array(0), apv = new Uint8Array(0)) { + let publicKey; + if (isCryptoKey(publicKee)) { + checkEncCryptoKey(publicKee, 'ECDH'); + publicKey = KeyObject.from(publicKee); + } + else if (isKeyObject(publicKee)) { + publicKey = publicKee; + } + else { + throw new TypeError(invalidKeyInput(publicKee, ...types)); + } + let privateKey; + if (isCryptoKey(privateKee)) { + checkEncCryptoKey(privateKee, 'ECDH', 'deriveBits'); + privateKey = KeyObject.from(privateKee); + } + else if (isKeyObject(privateKee)) { + privateKey = privateKee; + } + else { + throw new TypeError(invalidKeyInput(privateKee, ...types)); + } + const value = concat(lengthAndInput(encoder.encode(algorithm)), lengthAndInput(apu), lengthAndInput(apv), uint32be(keyLength)); + const sharedSecret = diffieHellman({ privateKey, publicKey }); + return concatKdf(sharedSecret, keyLength, value); +} +export async function generateEpk(kee) { + let key; + if (isCryptoKey(kee)) { + key = KeyObject.from(kee); + } + else if (isKeyObject(kee)) { + key = kee; + } + else { + throw new TypeError(invalidKeyInput(kee, ...types)); + } + switch (key.asymmetricKeyType) { + case 'x25519': + return generateKeyPair('x25519'); + case 'x448': { + return generateKeyPair('x448'); + } + case 'ec': { + const namedCurve = getNamedCurve(key); + return generateKeyPair('ec', { namedCurve }); + } + default: + throw new JOSENotSupported('Invalid or unsupported EPK'); + } +} +export const ecdhAllowed = (key) => ['P-256', 'P-384', 'P-521', 'X25519', 'X448'].includes(getNamedCurve(key)); diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/encrypt.js b/webapp/node_modules/jose/dist/node/esm/runtime/encrypt.js new file mode 100644 index 0000000000000000000000000000000000000000..8dfb87b10c9cb7c8507158229a3a8abc72f3c887 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/encrypt.js @@ -0,0 +1,72 @@ +import { createCipheriv, KeyObject } from 'crypto'; +import checkIvLength from '../lib/check_iv_length.js'; +import checkCekLength from './check_cek_length.js'; +import { concat } from '../lib/buffer_utils.js'; +import cbcTag from './cbc_tag.js'; +import { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import isKeyObject from './is_key_object.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { JOSENotSupported } from '../util/errors.js'; +import supported from './ciphers.js'; +import { types } from './is_key_like.js'; +function cbcEncrypt(enc, plaintext, cek, iv, aad) { + const keySize = parseInt(enc.slice(1, 4), 10); + if (isKeyObject(cek)) { + cek = cek.export(); + } + const encKey = cek.subarray(keySize >> 3); + const macKey = cek.subarray(0, keySize >> 3); + const algorithm = `aes-${keySize}-cbc`; + if (!supported(algorithm)) { + throw new JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`); + } + const cipher = createCipheriv(algorithm, encKey, iv); + const ciphertext = concat(cipher.update(plaintext), cipher.final()); + const macSize = parseInt(enc.slice(-3), 10); + const tag = cbcTag(aad, iv, ciphertext, macSize, macKey, keySize); + return { ciphertext, tag }; +} +function gcmEncrypt(enc, plaintext, cek, iv, aad) { + const keySize = parseInt(enc.slice(1, 4), 10); + const algorithm = `aes-${keySize}-gcm`; + if (!supported(algorithm)) { + throw new JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`); + } + const cipher = createCipheriv(algorithm, cek, iv, { authTagLength: 16 }); + if (aad.byteLength) { + cipher.setAAD(aad, { plaintextLength: plaintext.length }); + } + const ciphertext = cipher.update(plaintext); + cipher.final(); + const tag = cipher.getAuthTag(); + return { ciphertext, tag }; +} +const encrypt = (enc, plaintext, cek, iv, aad) => { + let key; + if (isCryptoKey(cek)) { + checkEncCryptoKey(cek, enc, 'encrypt'); + key = KeyObject.from(cek); + } + else if (cek instanceof Uint8Array || isKeyObject(cek)) { + key = cek; + } + else { + throw new TypeError(invalidKeyInput(cek, ...types, 'Uint8Array')); + } + checkCekLength(enc, key); + checkIvLength(enc, iv); + switch (enc) { + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + return cbcEncrypt(enc, plaintext, key, iv, aad); + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + return gcmEncrypt(enc, plaintext, key, iv, aad); + default: + throw new JOSENotSupported('Unsupported JWE Content Encryption Algorithm'); + } +}; +export default encrypt; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/env.js b/webapp/node_modules/jose/dist/node/esm/runtime/env.js new file mode 100644 index 0000000000000000000000000000000000000000..f55de30dc110e62072189504e8874a2fc4512021 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/env.js @@ -0,0 +1,3 @@ +export function isCloudflareWorkers() { + return false; +} diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/fetch_jwks.js b/webapp/node_modules/jose/dist/node/esm/runtime/fetch_jwks.js new file mode 100644 index 0000000000000000000000000000000000000000..5853424ec129675d85b0a2e3c4670b4bac05d525 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/fetch_jwks.js @@ -0,0 +1,43 @@ +import * as http from 'http'; +import * as https from 'https'; +import { once } from 'events'; +import { JOSEError, JWKSTimeout } from '../util/errors.js'; +import { concat, decoder } from '../lib/buffer_utils.js'; +const fetchJwks = async (url, timeout, options) => { + let get; + switch (url.protocol) { + case 'https:': + get = https.get; + break; + case 'http:': + get = http.get; + break; + default: + throw new TypeError('Unsupported URL protocol.'); + } + const { agent, headers } = options; + const req = get(url.href, { + agent, + timeout, + headers, + }); + const [response] = (await Promise.race([once(req, 'response'), once(req, 'timeout')])); + if (!response) { + req.destroy(); + throw new JWKSTimeout(); + } + if (response.statusCode !== 200) { + throw new JOSEError('Expected 200 OK from the JSON Web Key Set HTTP response'); + } + const parts = []; + for await (const part of response) { + parts.push(part); + } + try { + return JSON.parse(decoder.decode(concat(...parts))); + } + catch { + throw new JOSEError('Failed to parse the JSON Web Key Set HTTP response as JSON'); + } +}; +export default fetchJwks; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/generate.js b/webapp/node_modules/jose/dist/node/esm/runtime/generate.js new file mode 100644 index 0000000000000000000000000000000000000000..64f76962f18ca90f2f1965c6427dc873b3a4f6f7 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/generate.js @@ -0,0 +1,100 @@ +import { createSecretKey, generateKeyPair as generateKeyPairCb } from 'crypto'; +import { promisify } from 'util'; +import random from './random.js'; +import { setModulusLength } from './check_modulus_length.js'; +import { JOSENotSupported } from '../util/errors.js'; +const generate = promisify(generateKeyPairCb); +export async function generateSecret(alg, options) { + let length; + switch (alg) { + case 'HS256': + case 'HS384': + case 'HS512': + case 'A128CBC-HS256': + case 'A192CBC-HS384': + case 'A256CBC-HS512': + length = parseInt(alg.slice(-3), 10); + break; + case 'A128KW': + case 'A192KW': + case 'A256KW': + case 'A128GCMKW': + case 'A192GCMKW': + case 'A256GCMKW': + case 'A128GCM': + case 'A192GCM': + case 'A256GCM': + length = parseInt(alg.slice(1, 4), 10); + break; + default: + throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value'); + } + return createSecretKey(random(new Uint8Array(length >> 3))); +} +export async function generateKeyPair(alg, options) { + var _a, _b; + switch (alg) { + case 'RS256': + case 'RS384': + case 'RS512': + case 'PS256': + case 'PS384': + case 'PS512': + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': + case 'RSA1_5': { + const modulusLength = (_a = options === null || options === void 0 ? void 0 : options.modulusLength) !== null && _a !== void 0 ? _a : 2048; + if (typeof modulusLength !== 'number' || modulusLength < 2048) { + throw new JOSENotSupported('Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used'); + } + const keypair = await generate('rsa', { + modulusLength, + publicExponent: 0x10001, + }); + setModulusLength(keypair.privateKey, modulusLength); + setModulusLength(keypair.publicKey, modulusLength); + return keypair; + } + case 'ES256': + return generate('ec', { namedCurve: 'P-256' }); + case 'ES256K': + return generate('ec', { namedCurve: 'secp256k1' }); + case 'ES384': + return generate('ec', { namedCurve: 'P-384' }); + case 'ES512': + return generate('ec', { namedCurve: 'P-521' }); + case 'EdDSA': { + switch (options === null || options === void 0 ? void 0 : options.crv) { + case undefined: + case 'Ed25519': + return generate('ed25519'); + case 'Ed448': + return generate('ed448'); + default: + throw new JOSENotSupported('Invalid or unsupported crv option provided, supported values are Ed25519 and Ed448'); + } + } + case 'ECDH-ES': + case 'ECDH-ES+A128KW': + case 'ECDH-ES+A192KW': + case 'ECDH-ES+A256KW': + const crv = (_b = options === null || options === void 0 ? void 0 : options.crv) !== null && _b !== void 0 ? _b : 'P-256'; + switch (crv) { + case undefined: + case 'P-256': + case 'P-384': + case 'P-521': + return generate('ec', { namedCurve: crv }); + case 'X25519': + return generate('x25519'); + case 'X448': + return generate('x448'); + default: + throw new JOSENotSupported('Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448'); + } + default: + throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value'); + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/get_named_curve.js b/webapp/node_modules/jose/dist/node/esm/runtime/get_named_curve.js new file mode 100644 index 0000000000000000000000000000000000000000..e453a6660e01a396a536d65fd8f2ddfb4a0a42d6 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/get_named_curve.js @@ -0,0 +1,91 @@ +import { Buffer } from 'buffer'; +import { createPublicKey, KeyObject } from 'crypto'; +import { JOSENotSupported } from '../util/errors.js'; +import { isCryptoKey } from './webcrypto.js'; +import isKeyObject from './is_key_object.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +const p256 = Buffer.from([42, 134, 72, 206, 61, 3, 1, 7]); +const p384 = Buffer.from([43, 129, 4, 0, 34]); +const p521 = Buffer.from([43, 129, 4, 0, 35]); +const secp256k1 = Buffer.from([43, 129, 4, 0, 10]); +export const weakMap = new WeakMap(); +const namedCurveToJOSE = (namedCurve) => { + switch (namedCurve) { + case 'prime256v1': + return 'P-256'; + case 'secp384r1': + return 'P-384'; + case 'secp521r1': + return 'P-521'; + case 'secp256k1': + return 'secp256k1'; + default: + throw new JOSENotSupported('Unsupported key curve for this operation'); + } +}; +const getNamedCurve = (kee, raw) => { + var _a; + let key; + if (isCryptoKey(kee)) { + key = KeyObject.from(kee); + } + else if (isKeyObject(kee)) { + key = kee; + } + else { + throw new TypeError(invalidKeyInput(kee, ...types)); + } + if (key.type === 'secret') { + throw new TypeError('only "private" or "public" type keys can be used for this operation'); + } + switch (key.asymmetricKeyType) { + case 'ed25519': + case 'ed448': + return `Ed${key.asymmetricKeyType.slice(2)}`; + case 'x25519': + case 'x448': + return `X${key.asymmetricKeyType.slice(1)}`; + case 'ec': { + if (weakMap.has(key)) { + return weakMap.get(key); + } + let namedCurve = (_a = key.asymmetricKeyDetails) === null || _a === void 0 ? void 0 : _a.namedCurve; + if (!namedCurve && key.type === 'private') { + namedCurve = getNamedCurve(createPublicKey(key), true); + } + else if (!namedCurve) { + const buf = key.export({ format: 'der', type: 'spki' }); + const i = buf[1] < 128 ? 14 : 15; + const len = buf[i]; + const curveOid = buf.slice(i + 1, i + 1 + len); + if (curveOid.equals(p256)) { + namedCurve = 'prime256v1'; + } + else if (curveOid.equals(p384)) { + namedCurve = 'secp384r1'; + } + else if (curveOid.equals(p521)) { + namedCurve = 'secp521r1'; + } + else if (curveOid.equals(secp256k1)) { + namedCurve = 'secp256k1'; + } + else { + throw new JOSENotSupported('Unsupported key curve for this operation'); + } + } + if (raw) + return namedCurve; + const curve = namedCurveToJOSE(namedCurve); + weakMap.set(key, curve); + return curve; + } + default: + throw new TypeError('Invalid asymmetric key type for this operation'); + } +}; +export function setCurve(keyObject, curve) { + weakMap.set(keyObject, curve); +} +export default getNamedCurve; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/get_sign_verify_key.js b/webapp/node_modules/jose/dist/node/esm/runtime/get_sign_verify_key.js new file mode 100644 index 0000000000000000000000000000000000000000..46aa2b45515c520178be7cc823c2370768d636f8 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/get_sign_verify_key.js @@ -0,0 +1,21 @@ +import { KeyObject, createSecretKey } from 'crypto'; +import { isCryptoKey } from './webcrypto.js'; +import { checkSigCryptoKey } from '../lib/crypto_key.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +export default function getSignVerifyKey(alg, key, usage) { + if (key instanceof Uint8Array) { + if (!alg.startsWith('HS')) { + throw new TypeError(invalidKeyInput(key, ...types)); + } + return createSecretKey(key); + } + if (key instanceof KeyObject) { + return key; + } + if (isCryptoKey(key)) { + checkSigCryptoKey(key, alg, usage); + return KeyObject.from(key); + } + throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array')); +} diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/hmac_digest.js b/webapp/node_modules/jose/dist/node/esm/runtime/hmac_digest.js new file mode 100644 index 0000000000000000000000000000000000000000..29d55c3e9c5523deff827e7b32ba118a1229d656 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/hmac_digest.js @@ -0,0 +1,13 @@ +import { JOSENotSupported } from '../util/errors.js'; +export default function hmacDigest(alg) { + switch (alg) { + case 'HS256': + return 'sha256'; + case 'HS384': + return 'sha384'; + case 'HS512': + return 'sha512'; + default: + throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/is_key_like.js b/webapp/node_modules/jose/dist/node/esm/runtime/is_key_like.js new file mode 100644 index 0000000000000000000000000000000000000000..5e6e7a32560e6178d32619afe4917f647ff188f0 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/is_key_like.js @@ -0,0 +1,8 @@ +import { isCryptoKey } from './webcrypto.js'; +import isKeyObject from './is_key_object.js'; +export default (key) => isKeyObject(key) || isCryptoKey(key); +const types = ['KeyObject']; +if (parseInt(process.versions.node) >= 16) { + types.push('CryptoKey'); +} +export { types }; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/is_key_object.js b/webapp/node_modules/jose/dist/node/esm/runtime/is_key_object.js new file mode 100644 index 0000000000000000000000000000000000000000..3a28cd80eba0afe73f3073ed8d4255ef77fc4488 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/is_key_object.js @@ -0,0 +1,5 @@ +import { KeyObject } from 'crypto'; +import * as util from 'util'; +export default util.types.isKeyObject + ? (obj) => util.types.isKeyObject(obj) + : (obj) => obj != null && obj instanceof KeyObject; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/jwk_to_key.js b/webapp/node_modules/jose/dist/node/esm/runtime/jwk_to_key.js new file mode 100644 index 0000000000000000000000000000000000000000..6cbcab33e8f4ec3da6aa79437bb8525150b51ea2 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/jwk_to_key.js @@ -0,0 +1,120 @@ +import { Buffer } from 'buffer'; +import { createPrivateKey, createPublicKey, createSecretKey } from 'crypto'; +import { decode as base64url } from './base64url.js'; +import { JOSENotSupported } from '../util/errors.js'; +import { setCurve } from './get_named_curve.js'; +import { setModulusLength } from './check_modulus_length.js'; +import Asn1SequenceEncoder from './asn1_sequence_encoder.js'; +const [major, minor] = process.version + .slice(1) + .split('.') + .map((str) => parseInt(str, 10)); +const jwkImportSupported = major >= 16 || (major === 15 && minor >= 12); +const parse = (jwk) => { + if (jwkImportSupported && jwk.kty !== 'oct') { + return jwk.d + ? createPrivateKey({ format: 'jwk', key: jwk }) + : createPublicKey({ format: 'jwk', key: jwk }); + } + switch (jwk.kty) { + case 'oct': { + return createSecretKey(base64url(jwk.k)); + } + case 'RSA': { + const enc = new Asn1SequenceEncoder(); + const isPrivate = jwk.d !== undefined; + const modulus = Buffer.from(jwk.n, 'base64'); + const exponent = Buffer.from(jwk.e, 'base64'); + if (isPrivate) { + enc.zero(); + enc.unsignedInteger(modulus); + enc.unsignedInteger(exponent); + enc.unsignedInteger(Buffer.from(jwk.d, 'base64')); + enc.unsignedInteger(Buffer.from(jwk.p, 'base64')); + enc.unsignedInteger(Buffer.from(jwk.q, 'base64')); + enc.unsignedInteger(Buffer.from(jwk.dp, 'base64')); + enc.unsignedInteger(Buffer.from(jwk.dq, 'base64')); + enc.unsignedInteger(Buffer.from(jwk.qi, 'base64')); + } + else { + enc.unsignedInteger(modulus); + enc.unsignedInteger(exponent); + } + const der = enc.end(); + const createInput = { + key: der, + format: 'der', + type: 'pkcs1', + }; + const keyObject = isPrivate ? createPrivateKey(createInput) : createPublicKey(createInput); + setModulusLength(keyObject, modulus.length << 3); + return keyObject; + } + case 'EC': { + const enc = new Asn1SequenceEncoder(); + const isPrivate = jwk.d !== undefined; + const pub = Buffer.concat([ + Buffer.alloc(1, 4), + Buffer.from(jwk.x, 'base64'), + Buffer.from(jwk.y, 'base64'), + ]); + if (isPrivate) { + enc.zero(); + const enc$1 = new Asn1SequenceEncoder(); + enc$1.oidFor('ecPublicKey'); + enc$1.oidFor(jwk.crv); + enc.add(enc$1.end()); + const enc$2 = new Asn1SequenceEncoder(); + enc$2.one(); + enc$2.octStr(Buffer.from(jwk.d, 'base64')); + const enc$3 = new Asn1SequenceEncoder(); + enc$3.bitStr(pub); + const f2 = enc$3.end(Buffer.from([0xa1])); + enc$2.add(f2); + const f = enc$2.end(); + const enc$4 = new Asn1SequenceEncoder(); + enc$4.add(f); + const f3 = enc$4.end(Buffer.from([0x04])); + enc.add(f3); + const der = enc.end(); + const keyObject = createPrivateKey({ key: der, format: 'der', type: 'pkcs8' }); + setCurve(keyObject, jwk.crv); + return keyObject; + } + const enc$1 = new Asn1SequenceEncoder(); + enc$1.oidFor('ecPublicKey'); + enc$1.oidFor(jwk.crv); + enc.add(enc$1.end()); + enc.bitStr(pub); + const der = enc.end(); + const keyObject = createPublicKey({ key: der, format: 'der', type: 'spki' }); + setCurve(keyObject, jwk.crv); + return keyObject; + } + case 'OKP': { + const enc = new Asn1SequenceEncoder(); + const isPrivate = jwk.d !== undefined; + if (isPrivate) { + enc.zero(); + const enc$1 = new Asn1SequenceEncoder(); + enc$1.oidFor(jwk.crv); + enc.add(enc$1.end()); + const enc$2 = new Asn1SequenceEncoder(); + enc$2.octStr(Buffer.from(jwk.d, 'base64')); + const f = enc$2.end(Buffer.from([0x04])); + enc.add(f); + const der = enc.end(); + return createPrivateKey({ key: der, format: 'der', type: 'pkcs8' }); + } + const enc$1 = new Asn1SequenceEncoder(); + enc$1.oidFor(jwk.crv); + enc.add(enc$1.end()); + enc.bitStr(Buffer.from(jwk.x, 'base64')); + const der = enc.end(); + return createPublicKey({ key: der, format: 'der', type: 'spki' }); + } + default: + throw new JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value'); + } +}; +export default parse; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/key_to_jwk.js b/webapp/node_modules/jose/dist/node/esm/runtime/key_to_jwk.js new file mode 100644 index 0000000000000000000000000000000000000000..0279f4fa88e2e6cd07d5f0747444c18154a9a3a9 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/key_to_jwk.js @@ -0,0 +1,162 @@ +import { KeyObject, createPublicKey } from 'crypto'; +import { encode as base64url } from './base64url.js'; +import Asn1SequenceDecoder from './asn1_sequence_decoder.js'; +import { JOSENotSupported } from '../util/errors.js'; +import getNamedCurve from './get_named_curve.js'; +import { isCryptoKey } from './webcrypto.js'; +import isKeyObject from './is_key_object.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +const [major, minor] = process.version + .slice(1) + .split('.') + .map((str) => parseInt(str, 10)); +const jwkExportSupported = major >= 16 || (major === 15 && minor >= 9); +const keyToJWK = (key) => { + let keyObject; + if (isCryptoKey(key)) { + if (!key.extractable) { + throw new TypeError('CryptoKey is not extractable'); + } + keyObject = KeyObject.from(key); + } + else if (isKeyObject(key)) { + keyObject = key; + } + else if (key instanceof Uint8Array) { + return { + kty: 'oct', + k: base64url(key), + }; + } + else { + throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array')); + } + if (jwkExportSupported) { + if (keyObject.type !== 'secret' && + !['rsa', 'ec', 'ed25519', 'x25519', 'ed448', 'x448'].includes(keyObject.asymmetricKeyType)) { + throw new JOSENotSupported('Unsupported key asymmetricKeyType'); + } + return keyObject.export({ format: 'jwk' }); + } + switch (keyObject.type) { + case 'secret': + return { + kty: 'oct', + k: base64url(keyObject.export()), + }; + case 'private': + case 'public': { + switch (keyObject.asymmetricKeyType) { + case 'rsa': { + const der = keyObject.export({ format: 'der', type: 'pkcs1' }); + const dec = new Asn1SequenceDecoder(der); + if (keyObject.type === 'private') { + dec.unsignedInteger(); + } + const n = base64url(dec.unsignedInteger()); + const e = base64url(dec.unsignedInteger()); + let jwk; + if (keyObject.type === 'private') { + jwk = { + d: base64url(dec.unsignedInteger()), + p: base64url(dec.unsignedInteger()), + q: base64url(dec.unsignedInteger()), + dp: base64url(dec.unsignedInteger()), + dq: base64url(dec.unsignedInteger()), + qi: base64url(dec.unsignedInteger()), + }; + } + dec.end(); + return { kty: 'RSA', n, e, ...jwk }; + } + case 'ec': { + const crv = getNamedCurve(keyObject); + let len; + let offset; + let correction; + switch (crv) { + case 'secp256k1': + len = 64; + offset = 31 + 2; + correction = -1; + break; + case 'P-256': + len = 64; + offset = 34 + 2; + correction = -1; + break; + case 'P-384': + len = 96; + offset = 33 + 2; + correction = -3; + break; + case 'P-521': + len = 132; + offset = 33 + 2; + correction = -3; + break; + default: + throw new JOSENotSupported('Unsupported curve'); + } + if (keyObject.type === 'public') { + const der = keyObject.export({ type: 'spki', format: 'der' }); + return { + kty: 'EC', + crv, + x: base64url(der.subarray(-len, -len / 2)), + y: base64url(der.subarray(-len / 2)), + }; + } + const der = keyObject.export({ type: 'pkcs8', format: 'der' }); + if (der.length < 100) { + offset += correction; + } + return { + ...keyToJWK(createPublicKey(keyObject)), + d: base64url(der.subarray(offset, offset + len / 2)), + }; + } + case 'ed25519': + case 'x25519': { + const crv = getNamedCurve(keyObject); + if (keyObject.type === 'public') { + const der = keyObject.export({ type: 'spki', format: 'der' }); + return { + kty: 'OKP', + crv, + x: base64url(der.subarray(-32)), + }; + } + const der = keyObject.export({ type: 'pkcs8', format: 'der' }); + return { + ...keyToJWK(createPublicKey(keyObject)), + d: base64url(der.subarray(-32)), + }; + } + case 'ed448': + case 'x448': { + const crv = getNamedCurve(keyObject); + if (keyObject.type === 'public') { + const der = keyObject.export({ type: 'spki', format: 'der' }); + return { + kty: 'OKP', + crv, + x: base64url(der.subarray(crv === 'Ed448' ? -57 : -56)), + }; + } + const der = keyObject.export({ type: 'pkcs8', format: 'der' }); + return { + ...keyToJWK(createPublicKey(keyObject)), + d: base64url(der.subarray(crv === 'Ed448' ? -57 : -56)), + }; + } + default: + throw new JOSENotSupported('Unsupported key asymmetricKeyType'); + } + } + default: + throw new JOSENotSupported('Unsupported key type'); + } +}; +export default keyToJWK; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/node_key.js b/webapp/node_modules/jose/dist/node/esm/runtime/node_key.js new file mode 100644 index 0000000000000000000000000000000000000000..96d1bdbbf8c6ab77ee092644d4693b1a0d2e30e5 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/node_key.js @@ -0,0 +1,80 @@ +import { constants } from 'crypto'; +import getNamedCurve from './get_named_curve.js'; +import { JOSENotSupported } from '../util/errors.js'; +import checkModulusLength from './check_modulus_length.js'; +const [major, minor] = process.version + .slice(1) + .split('.') + .map((str) => parseInt(str, 10)); +const electron = 'electron' in process.versions; +const rsaPssParams = !electron && (major >= 17 || (major === 16 && minor >= 9)); +const PSS = { + padding: constants.RSA_PKCS1_PSS_PADDING, + saltLength: constants.RSA_PSS_SALTLEN_DIGEST, +}; +const ecCurveAlgMap = new Map([ + ['ES256', 'P-256'], + ['ES256K', 'secp256k1'], + ['ES384', 'P-384'], + ['ES512', 'P-521'], +]); +export default function keyForCrypto(alg, key) { + switch (alg) { + case 'EdDSA': + if (!['ed25519', 'ed448'].includes(key.asymmetricKeyType)) { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448'); + } + return key; + case 'RS256': + case 'RS384': + case 'RS512': + if (key.asymmetricKeyType !== 'rsa') { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa'); + } + checkModulusLength(key, alg); + return key; + case rsaPssParams && 'PS256': + case rsaPssParams && 'PS384': + case rsaPssParams && 'PS512': + if (key.asymmetricKeyType === 'rsa-pss') { + const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails; + const length = parseInt(alg.slice(-3), 10); + if (hashAlgorithm !== undefined && + (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm)) { + throw new TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${alg}`); + } + if (saltLength !== undefined && saltLength > length >> 3) { + throw new TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${alg}`); + } + } + else if (key.asymmetricKeyType !== 'rsa') { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss'); + } + checkModulusLength(key, alg); + return { key, ...PSS }; + case !rsaPssParams && 'PS256': + case !rsaPssParams && 'PS384': + case !rsaPssParams && 'PS512': + if (key.asymmetricKeyType !== 'rsa') { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa'); + } + checkModulusLength(key, alg); + return { key, ...PSS }; + case 'ES256': + case 'ES256K': + case 'ES384': + case 'ES512': { + if (key.asymmetricKeyType !== 'ec') { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be ec'); + } + const actual = getNamedCurve(key); + const expected = ecCurveAlgMap.get(alg); + if (actual !== expected) { + throw new TypeError(`Invalid key curve for the algorithm, its curve must be ${expected}, got ${actual}`); + } + return { dsaEncoding: 'ieee-p1363', key }; + } + default: + throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/pbes2kw.js b/webapp/node_modules/jose/dist/node/esm/runtime/pbes2kw.js new file mode 100644 index 0000000000000000000000000000000000000000..63122e04efc31c575edcae57cc9f67868972329c --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/pbes2kw.js @@ -0,0 +1,43 @@ +import { promisify } from 'util'; +import { KeyObject, pbkdf2 as pbkdf2cb } from 'crypto'; +import random from './random.js'; +import { p2s as concatSalt } from '../lib/buffer_utils.js'; +import { encode as base64url } from './base64url.js'; +import { wrap, unwrap } from './aeskw.js'; +import checkP2s from '../lib/check_p2s.js'; +import { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import isKeyObject from './is_key_object.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +const pbkdf2 = promisify(pbkdf2cb); +function getPassword(key, alg) { + if (isKeyObject(key)) { + return key.export(); + } + if (key instanceof Uint8Array) { + return key; + } + if (isCryptoKey(key)) { + checkEncCryptoKey(key, alg, 'deriveBits', 'deriveKey'); + return KeyObject.from(key).export(); + } + throw new TypeError(invalidKeyInput(key, ...types, 'Uint8Array')); +} +export const encrypt = async (alg, key, cek, p2c = 2048, p2s = random(new Uint8Array(16))) => { + checkP2s(p2s); + const salt = concatSalt(alg, p2s); + const keylen = parseInt(alg.slice(13, 16), 10) >> 3; + const password = getPassword(key, alg); + const derivedKey = await pbkdf2(password, salt, p2c, keylen, `sha${alg.slice(8, 11)}`); + const encryptedKey = await wrap(alg.slice(-6), derivedKey, cek); + return { encryptedKey, p2c, p2s: base64url(p2s) }; +}; +export const decrypt = async (alg, key, encryptedKey, p2c, p2s) => { + checkP2s(p2s); + const salt = concatSalt(alg, p2s); + const keylen = parseInt(alg.slice(13, 16), 10) >> 3; + const password = getPassword(key, alg); + const derivedKey = await pbkdf2(password, salt, p2c, keylen, `sha${alg.slice(8, 11)}`); + return unwrap(alg.slice(-6), derivedKey, encryptedKey); +}; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/random.js b/webapp/node_modules/jose/dist/node/esm/runtime/random.js new file mode 100644 index 0000000000000000000000000000000000000000..80478ea94637e0694031ca3a2096ab036d25fe96 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/random.js @@ -0,0 +1 @@ +export { randomFillSync as default } from 'crypto'; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/rsaes.js b/webapp/node_modules/jose/dist/node/esm/runtime/rsaes.js new file mode 100644 index 0000000000000000000000000000000000000000..3556fe343654e4c7f98e4defd52638f0b41fd9d2 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/rsaes.js @@ -0,0 +1,64 @@ +import { KeyObject, publicEncrypt, constants, privateDecrypt } from 'crypto'; +import checkModulusLength from './check_modulus_length.js'; +import { isCryptoKey } from './webcrypto.js'; +import { checkEncCryptoKey } from '../lib/crypto_key.js'; +import isKeyObject from './is_key_object.js'; +import invalidKeyInput from '../lib/invalid_key_input.js'; +import { types } from './is_key_like.js'; +const checkKey = (key, alg) => { + if (key.asymmetricKeyType !== 'rsa') { + throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa'); + } + checkModulusLength(key, alg); +}; +const resolvePadding = (alg) => { + switch (alg) { + case 'RSA-OAEP': + case 'RSA-OAEP-256': + case 'RSA-OAEP-384': + case 'RSA-OAEP-512': + return constants.RSA_PKCS1_OAEP_PADDING; + case 'RSA1_5': + return constants.RSA_PKCS1_PADDING; + default: + return undefined; + } +}; +const resolveOaepHash = (alg) => { + switch (alg) { + case 'RSA-OAEP': + return 'sha1'; + case 'RSA-OAEP-256': + return 'sha256'; + case 'RSA-OAEP-384': + return 'sha384'; + case 'RSA-OAEP-512': + return 'sha512'; + default: + return undefined; + } +}; +function ensureKeyObject(key, alg, ...usages) { + if (isKeyObject(key)) { + return key; + } + if (isCryptoKey(key)) { + checkEncCryptoKey(key, alg, ...usages); + return KeyObject.from(key); + } + throw new TypeError(invalidKeyInput(key, ...types)); +} +export const encrypt = (alg, key, cek) => { + const padding = resolvePadding(alg); + const oaepHash = resolveOaepHash(alg); + const keyObject = ensureKeyObject(key, alg, 'wrapKey', 'encrypt'); + checkKey(keyObject, alg); + return publicEncrypt({ key: keyObject, oaepHash, padding }, cek); +}; +export const decrypt = (alg, key, encryptedKey) => { + const padding = resolvePadding(alg); + const oaepHash = resolveOaepHash(alg); + const keyObject = ensureKeyObject(key, alg, 'unwrapKey', 'decrypt'); + checkKey(keyObject, alg); + return privateDecrypt({ key: keyObject, oaepHash, padding }, encryptedKey); +}; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/sign.js b/webapp/node_modules/jose/dist/node/esm/runtime/sign.js new file mode 100644 index 0000000000000000000000000000000000000000..8902d4151cb73b4ad2d8d850029acc4f7f64cc00 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/sign.js @@ -0,0 +1,23 @@ +import * as crypto from 'crypto'; +import { promisify } from 'util'; +import nodeDigest from './dsa_digest.js'; +import hmacDigest from './hmac_digest.js'; +import nodeKey from './node_key.js'; +import getSignKey from './get_sign_verify_key.js'; +let oneShotSign; +if (crypto.sign.length > 3) { + oneShotSign = promisify(crypto.sign); +} +else { + oneShotSign = crypto.sign; +} +const sign = async (alg, key, data) => { + const keyObject = getSignKey(alg, key, 'sign'); + if (alg.startsWith('HS')) { + const hmac = crypto.createHmac(hmacDigest(alg), keyObject); + hmac.update(data); + return hmac.digest(); + } + return oneShotSign(nodeDigest(alg), data, nodeKey(alg, keyObject)); +}; +export default sign; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/timing_safe_equal.js b/webapp/node_modules/jose/dist/node/esm/runtime/timing_safe_equal.js new file mode 100644 index 0000000000000000000000000000000000000000..901ae38bdd5a2473fda055c53a1fa679fee8a921 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/timing_safe_equal.js @@ -0,0 +1,3 @@ +import { timingSafeEqual as impl } from 'crypto'; +const timingSafeEqual = impl; +export default timingSafeEqual; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/verify.js b/webapp/node_modules/jose/dist/node/esm/runtime/verify.js new file mode 100644 index 0000000000000000000000000000000000000000..e286e07360bcb40fb80c5d6d8e1d7d259bdc976e --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/verify.js @@ -0,0 +1,40 @@ +import * as crypto from 'crypto'; +import { promisify } from 'util'; +import nodeDigest from './dsa_digest.js'; +import nodeKey from './node_key.js'; +import sign from './sign.js'; +import getVerifyKey from './get_sign_verify_key.js'; +const [major, minor] = process.version + .slice(1) + .split('.') + .map((str) => parseInt(str, 10)); +const oneShotCallbackSupported = major >= 16 || (major === 15 && minor >= 13); +let oneShotVerify; +if (crypto.verify.length > 4 && oneShotCallbackSupported) { + oneShotVerify = promisify(crypto.verify); +} +else { + oneShotVerify = crypto.verify; +} +const verify = async (alg, key, signature, data) => { + const keyObject = getVerifyKey(alg, key, 'verify'); + if (alg.startsWith('HS')) { + const expected = await sign(alg, keyObject, data); + const actual = signature; + try { + return crypto.timingSafeEqual(actual, expected); + } + catch { + return false; + } + } + const algorithm = nodeDigest(alg); + const keyInput = nodeKey(alg, keyObject); + try { + return await oneShotVerify(algorithm, data, keyInput, signature); + } + catch { + return false; + } +}; +export default verify; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/webcrypto.js b/webapp/node_modules/jose/dist/node/esm/runtime/webcrypto.js new file mode 100644 index 0000000000000000000000000000000000000000..a2fdb2a7a1b98d287d466481f37ef2671e080f4d --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/webcrypto.js @@ -0,0 +1,8 @@ +import * as crypto from 'crypto'; +import * as util from 'util'; +const webcrypto = crypto.webcrypto; +export default webcrypto; +export const isCryptoKey = util.types.isCryptoKey + ? (key) => util.types.isCryptoKey(key) + : + (key) => false; diff --git a/webapp/node_modules/jose/dist/node/esm/runtime/zlib.js b/webapp/node_modules/jose/dist/node/esm/runtime/zlib.js new file mode 100644 index 0000000000000000000000000000000000000000..8bb72cbf184163c58889331d98cbe394dee30a67 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/runtime/zlib.js @@ -0,0 +1,6 @@ +import { promisify } from 'util'; +import { inflateRaw as inflateRawCb, deflateRaw as deflateRawCb } from 'zlib'; +const inflateRaw = promisify(inflateRawCb); +const deflateRaw = promisify(deflateRawCb); +export const inflate = (input) => inflateRaw(input); +export const deflate = (input) => deflateRaw(input); diff --git a/webapp/node_modules/jose/dist/node/esm/util/base64url.js b/webapp/node_modules/jose/dist/node/esm/util/base64url.js new file mode 100644 index 0000000000000000000000000000000000000000..88ce7556d6f7b34fc4068e2b8c213eda756801b3 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/util/base64url.js @@ -0,0 +1,3 @@ +import * as base64url from '../runtime/base64url.js'; +export const encode = base64url.encode; +export const decode = base64url.decode; diff --git a/webapp/node_modules/jose/dist/node/esm/util/decode_jwt.js b/webapp/node_modules/jose/dist/node/esm/util/decode_jwt.js new file mode 100644 index 0000000000000000000000000000000000000000..0b824ed580ef28065dad9af83ba1407fc15a2637 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/util/decode_jwt.js @@ -0,0 +1,32 @@ +import { decode as base64url } from './base64url.js'; +import { decoder } from '../lib/buffer_utils.js'; +import isObject from '../lib/is_object.js'; +import { JWTInvalid } from './errors.js'; +export function decodeJwt(jwt) { + if (typeof jwt !== 'string') + throw new JWTInvalid('JWTs must use Compact JWS serialization, JWT must be a string'); + const { 1: payload, length } = jwt.split('.'); + if (length === 5) + throw new JWTInvalid('Only JWTs using Compact JWS serialization can be decoded'); + if (length !== 3) + throw new JWTInvalid('Invalid JWT'); + if (!payload) + throw new JWTInvalid('JWTs must contain a payload'); + let decoded; + try { + decoded = base64url(payload); + } + catch { + throw new JWTInvalid('Failed to parse the base64url encoded payload'); + } + let result; + try { + result = JSON.parse(decoder.decode(decoded)); + } + catch { + throw new JWTInvalid('Failed to parse the decoded payload as JSON'); + } + if (!isObject(result)) + throw new JWTInvalid('Invalid JWT Claims Set'); + return result; +} diff --git a/webapp/node_modules/jose/dist/node/esm/util/decode_protected_header.js b/webapp/node_modules/jose/dist/node/esm/util/decode_protected_header.js new file mode 100644 index 0000000000000000000000000000000000000000..04be31d8f29e44fa6044b07dd54faf1ce435b0d8 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/util/decode_protected_header.js @@ -0,0 +1,34 @@ +import { decode as base64url } from './base64url.js'; +import { decoder } from '../lib/buffer_utils.js'; +import isObject from '../lib/is_object.js'; +export function decodeProtectedHeader(token) { + let protectedB64u; + if (typeof token === 'string') { + const parts = token.split('.'); + if (parts.length === 3 || parts.length === 5) { + ; + [protectedB64u] = parts; + } + } + else if (typeof token === 'object' && token) { + if ('protected' in token) { + protectedB64u = token.protected; + } + else { + throw new TypeError('Token does not contain a Protected Header'); + } + } + try { + if (typeof protectedB64u !== 'string' || !protectedB64u) { + throw new Error(); + } + const result = JSON.parse(decoder.decode(base64url(protectedB64u))); + if (!isObject(result)) { + throw new Error(); + } + return result; + } + catch { + throw new TypeError('Invalid Token or Protected Header formatting'); + } +} diff --git a/webapp/node_modules/jose/dist/node/esm/util/errors.js b/webapp/node_modules/jose/dist/node/esm/util/errors.js new file mode 100644 index 0000000000000000000000000000000000000000..777ce985b8f60980b67fb25a7f7d2324d6024b71 --- /dev/null +++ b/webapp/node_modules/jose/dist/node/esm/util/errors.js @@ -0,0 +1,147 @@ +export class JOSEError extends Error { + constructor(message) { + var _a; + super(message); + this.code = 'ERR_JOSE_GENERIC'; + this.name = this.constructor.name; + (_a = Error.captureStackTrace) === null || _a === void 0 ? void 0 : _a.call(Error, this, this.constructor); + } + static get code() { + return 'ERR_JOSE_GENERIC'; + } +} +export class JWTClaimValidationFailed extends JOSEError { + constructor(message, claim = 'unspecified', reason = 'unspecified') { + super(message); + this.code = 'ERR_JWT_CLAIM_VALIDATION_FAILED'; + this.claim = claim; + this.reason = reason; + } + static get code() { + return 'ERR_JWT_CLAIM_VALIDATION_FAILED'; + } +} +export class JWTExpired extends JOSEError { + constructor(message, claim = 'unspecified', reason = 'unspecified') { + super(message); + this.code = 'ERR_JWT_EXPIRED'; + this.claim = claim; + this.reason = reason; + } + static get code() { + return 'ERR_JWT_EXPIRED'; + } +} +export class JOSEAlgNotAllowed extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JOSE_ALG_NOT_ALLOWED'; + } + static get code() { + return 'ERR_JOSE_ALG_NOT_ALLOWED'; + } +} +export class JOSENotSupported extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JOSE_NOT_SUPPORTED'; + } + static get code() { + return 'ERR_JOSE_NOT_SUPPORTED'; + } +} +export class JWEDecryptionFailed extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWE_DECRYPTION_FAILED'; + this.message = 'decryption operation failed'; + } + static get code() { + return 'ERR_JWE_DECRYPTION_FAILED'; + } +} +export class JWEInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWE_INVALID'; + } + static get code() { + return 'ERR_JWE_INVALID'; + } +} +export class JWSInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWS_INVALID'; + } + static get code() { + return 'ERR_JWS_INVALID'; + } +} +export class JWTInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWT_INVALID'; + } + static get code() { + return 'ERR_JWT_INVALID'; + } +} +export class JWKInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWK_INVALID'; + } + static get code() { + return 'ERR_JWK_INVALID'; + } +} +export class JWKSInvalid extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_INVALID'; + } + static get code() { + return 'ERR_JWKS_INVALID'; + } +} +export class JWKSNoMatchingKey extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_NO_MATCHING_KEY'; + this.message = 'no applicable key found in the JSON Web Key Set'; + } + static get code() { + return 'ERR_JWKS_NO_MATCHING_KEY'; + } +} +export class JWKSMultipleMatchingKeys extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS'; + this.message = 'multiple matching keys found in the JSON Web Key Set'; + } + static get code() { + return 'ERR_JWKS_MULTIPLE_MATCHING_KEYS'; + } +} +export class JWKSTimeout extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWKS_TIMEOUT'; + this.message = 'request timed out'; + } + static get code() { + return 'ERR_JWKS_TIMEOUT'; + } +} +export class JWSSignatureVerificationFailed extends JOSEError { + constructor() { + super(...arguments); + this.code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'; + this.message = 'signature verification failed'; + } + static get code() { + return 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'; + } +} diff --git a/webapp/node_modules/jose/dist/types/index.d.ts b/webapp/node_modules/jose/dist/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6ce928e73a2fac78aaaf77b0bca769a8b0d3dc2f --- /dev/null +++ b/webapp/node_modules/jose/dist/types/index.d.ts @@ -0,0 +1,47 @@ +export { compactDecrypt } from './jwe/compact/decrypt'; +export type { CompactDecryptGetKey } from './jwe/compact/decrypt'; +export { flattenedDecrypt } from './jwe/flattened/decrypt'; +export type { FlattenedDecryptGetKey } from './jwe/flattened/decrypt'; +export { generalDecrypt } from './jwe/general/decrypt'; +export type { GeneralDecryptGetKey } from './jwe/general/decrypt'; +export { GeneralEncrypt } from './jwe/general/encrypt'; +export type { Recipient } from './jwe/general/encrypt'; +export { compactVerify } from './jws/compact/verify'; +export type { CompactVerifyGetKey } from './jws/compact/verify'; +export { flattenedVerify } from './jws/flattened/verify'; +export type { FlattenedVerifyGetKey } from './jws/flattened/verify'; +export { generalVerify } from './jws/general/verify'; +export type { GeneralVerifyGetKey } from './jws/general/verify'; +export { jwtVerify } from './jwt/verify'; +export type { JWTVerifyOptions, JWTVerifyGetKey } from './jwt/verify'; +export { jwtDecrypt } from './jwt/decrypt'; +export type { JWTDecryptOptions, JWTDecryptGetKey } from './jwt/decrypt'; +export type { ProduceJWT } from './jwt/produce'; +export { CompactEncrypt } from './jwe/compact/encrypt'; +export { FlattenedEncrypt } from './jwe/flattened/encrypt'; +export { CompactSign } from './jws/compact/sign'; +export { FlattenedSign } from './jws/flattened/sign'; +export { GeneralSign } from './jws/general/sign'; +export type { Signature } from './jws/general/sign'; +export { SignJWT } from './jwt/sign'; +export { EncryptJWT } from './jwt/encrypt'; +export { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint'; +export { EmbeddedJWK } from './jwk/embedded'; +export { createLocalJWKSet } from './jwks/local'; +export { createRemoteJWKSet } from './jwks/remote'; +export type { RemoteJWKSetOptions } from './jwks/remote'; +export { UnsecuredJWT } from './jwt/unsecured'; +export type { UnsecuredResult } from './jwt/unsecured'; +export { exportPKCS8, exportSPKI, exportJWK } from './key/export'; +export { importSPKI, importPKCS8, importX509, importJWK } from './key/import'; +export type { PEMImportOptions } from './key/import'; +export { decodeProtectedHeader } from './util/decode_protected_header'; +export { decodeJwt } from './util/decode_jwt'; +export type { ProtectedHeaderParameters } from './util/decode_protected_header'; +export * as errors from './util/errors'; +export { generateKeyPair } from './key/generate_key_pair'; +export type { GenerateKeyPairResult, GenerateKeyPairOptions } from './key/generate_key_pair'; +export { generateSecret } from './key/generate_secret'; +export type { GenerateSecretOptions } from './key/generate_secret'; +export * as base64url from './util/base64url'; +export type { KeyLike, JWK, FlattenedJWSInput, GeneralJWSInput, FlattenedJWS, GeneralJWS, JoseHeaderParameters, JWSHeaderParameters, JWEKeyManagementHeaderParameters, FlattenedJWE, GeneralJWE, JWEHeaderParameters, CritOption, DeflateOption, DecryptOptions, EncryptOptions, JWTClaimVerificationOptions, VerifyOptions, SignOptions, JWTPayload, DeflateFunction, InflateFunction, FlattenedDecryptResult, GeneralDecryptResult, CompactDecryptResult, FlattenedVerifyResult, GeneralVerifyResult, CompactVerifyResult, JWTVerifyResult, JWTDecryptResult, ResolvedKey, CompactJWEHeaderParameters, CompactJWSHeaderParameters, JWTHeaderParameters, JSONWebKeySet, } from './types'; diff --git a/webapp/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts b/webapp/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0a37a97656001f4afc260d7790cdbb6de2503787 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts @@ -0,0 +1,33 @@ +import type { KeyLike, DecryptOptions, CompactJWEHeaderParameters, GetKeyFunction, FlattenedJWE, CompactDecryptResult, ResolvedKey } from '../../types'; +/** + * Interface for Compact JWE Decryption dynamic key resolution. No token components have been + * verified at the time of this function call. + */ +export interface CompactDecryptGetKey extends GetKeyFunction<CompactJWEHeaderParameters, FlattenedJWE> { +} +/** + * Decrypts a Compact JWE. + * + * @example Usage + * + * ```js + * const jwe = + * 'eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIn0.nyQ19eq9ogh9wA7fFtnI2oouzy5_8b5DeLkoRMfi2yijgfTs2zEnayCEofz_qhnL-nwszabd9qUeHv0-IwvhhJJS7GUJOU3ikiIe42qcIAFme1A_Fo9CTxw4XTOy-I5qanl8So91u6hwfyN1VxAqVLsSE7_23EC-gfGEg_5znew9PyXXsOIE-K_HH7IQowRrlZ1X_bM_Liu53RzDpLDvRz59mp3S8L56YqpM8FexFGTGpEaoTcEIst375qncYt3-79IVR7gZN1RWsWgjPatfvVbnh74PglQcATSf3UUhaW0OAKn6q7r3PDx6DIKQ35bgHQg5QopuN00eIfLQL2trGw.W3grIVj5HVuAb76X.6PcuDe5D6ttWFYyv0oqqdDXfI2R8wBg1F2Q80UUA_Gv8eEimNWfxIWdLxrjzgQGSvIhxmFKuLM0.a93_Ug3uZHuczj70Zavx8Q' + * + * const { plaintext, protectedHeader } = await jose.compactDecrypt(jwe, privateKey) + * + * console.log(protectedHeader) + * console.log(new TextDecoder().decode(plaintext)) + * ``` + * + * @param jwe Compact JWE. + * @param key Private Key or Secret to decrypt the JWE with. + * @param options JWE Decryption options. + */ +export declare function compactDecrypt(jwe: string | Uint8Array, key: KeyLike | Uint8Array, options?: DecryptOptions): Promise<CompactDecryptResult>; +/** + * @param jwe Compact JWE. + * @param getKey Function resolving Private Key or Secret to decrypt the JWE with. + * @param options JWE Decryption options. + */ +export declare function compactDecrypt(jwe: string | Uint8Array, getKey: CompactDecryptGetKey, options?: DecryptOptions): Promise<CompactDecryptResult & ResolvedKey>; diff --git a/webapp/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts b/webapp/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0f48815a7894d05eb85585d246e8f4e44ebedb81 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts @@ -0,0 +1,60 @@ +import type { KeyLike, JWEKeyManagementHeaderParameters, CompactJWEHeaderParameters, EncryptOptions } from '../../types'; +/** + * The CompactEncrypt class is a utility for creating Compact JWE strings. + * + * @example Usage + * + * ```js + * const jwe = await new jose.CompactEncrypt( + * new TextEncoder().encode('It’s a dangerous business, Frodo, going out your door.'), + * ) + * .setProtectedHeader({ alg: 'RSA-OAEP-256', enc: 'A256GCM' }) + * .encrypt(publicKey) + * + * console.log(jwe) + * ``` + */ +export declare class CompactEncrypt { + private _flattened; + /** @param plaintext Binary representation of the plaintext to encrypt. */ + constructor(plaintext: Uint8Array); + /** + * Sets a content encryption key to use, by default a random suitable one is generated for the JWE + * enc" (Encryption Algorithm) Header Parameter. + * + * @deprecated You should not use this method. It is only really intended for test and vector + * validation purposes. + * @param cek JWE Content Encryption Key. + */ + setContentEncryptionKey(cek: Uint8Array): this; + /** + * Sets the JWE Initialization Vector to use for content encryption, by default a random suitable + * one is generated for the JWE enc" (Encryption Algorithm) Header Parameter. + * + * @deprecated You should not use this method. It is only really intended for test and vector + * validation purposes. + * @param iv JWE Initialization Vector. + */ + setInitializationVector(iv: Uint8Array): this; + /** + * Sets the JWE Protected Header on the CompactEncrypt object. + * + * @param protectedHeader JWE Protected Header object. + */ + setProtectedHeader(protectedHeader: CompactJWEHeaderParameters): this; + /** + * Sets the JWE Key Management parameters to be used when encrypting the Content Encryption Key. + * You do not need to invoke this method, it is only really intended for test and vector + * validation purposes. + * + * @param parameters JWE Key Management parameters. + */ + setKeyManagementParameters(parameters: JWEKeyManagementHeaderParameters): this; + /** + * Encrypts and resolves the value of the Compact JWE string. + * + * @param key Public Key or Secret to encrypt the JWE with. + * @param options JWE Encryption options. + */ + encrypt(key: KeyLike | Uint8Array, options?: EncryptOptions): Promise<string>; +} diff --git a/webapp/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts b/webapp/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..016ca62bbc0081b2c803e08e1352462965f83e2b --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts @@ -0,0 +1,43 @@ +import type { FlattenedDecryptResult, KeyLike, FlattenedJWE, JWEHeaderParameters, DecryptOptions, GetKeyFunction, ResolvedKey } from '../../types'; +/** + * Interface for Flattened JWE Decryption dynamic key resolution. No token components have been + * verified at the time of this function call. + */ +export interface FlattenedDecryptGetKey extends GetKeyFunction<JWEHeaderParameters | undefined, FlattenedJWE> { +} +/** + * Decrypts a Flattened JWE. + * + * @example Usage + * + * ```js + * const jwe = { + * ciphertext: '9EzjFISUyoG-ifC2mSihfP0DPC80yeyrxhTzKt1C_VJBkxeBG0MI4Te61Pk45RAGubUvBpU9jm4', + * iv: '8Fy7A_IuoX5VXG9s', + * tag: 'W76IYV6arGRuDSaSyWrQNg', + * encrypted_key: + * 'Z6eD4UK_yFb5ZoKvKkGAdqywEG_m0e4IYo0x8Vf30LAMJcsc-_zSgIeiF82teZyYi2YYduHKoqImk7MRnoPZOlEs0Q5BNK1OgBmSOhCE8DFyqh9Zh48TCTP6lmBQ52naqoUJFMtHzu-0LwZH26hxos0GP3Dt19O379MJB837TdKKa87skq0zHaVLAquRHOBF77GI54Bc7O49d8aOrSu1VEFGMThlW2caspPRiTSePDMDPq7_WGk50izRhB3Asl9wmP9wEeaTrkJKRnQj5ips1SAZ1hDBsqEQKKukxP1HtdcopHV5_qgwU8Hjm5EwSLMluMQuiE6hwlkXGOujZLVizA', + * aad: 'VGhlIEZlbGxvd3NoaXAgb2YgdGhlIFJpbmc', + * protected: 'eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIn0', + * } + * + * const { plaintext, protectedHeader, additionalAuthenticatedData } = + * await jose.flattenedDecrypt(jwe, privateKey) + * + * console.log(protectedHeader) + * const decoder = new TextDecoder() + * console.log(decoder.decode(plaintext)) + * console.log(decoder.decode(additionalAuthenticatedData)) + * ``` + * + * @param jwe Flattened JWE. + * @param key Private Key or Secret to decrypt the JWE with. + * @param options JWE Decryption options. + */ +export declare function flattenedDecrypt(jwe: FlattenedJWE, key: KeyLike | Uint8Array, options?: DecryptOptions): Promise<FlattenedDecryptResult>; +/** + * @param jwe Flattened JWE. + * @param getKey Function resolving Private Key or Secret to decrypt the JWE with. + * @param options JWE Decryption options. + */ +export declare function flattenedDecrypt(jwe: FlattenedJWE, getKey: FlattenedDecryptGetKey, options?: DecryptOptions): Promise<FlattenedDecryptResult & ResolvedKey>; diff --git a/webapp/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts b/webapp/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d5d02fdfbb7359d946d16b5460d7d95e0a2743b7 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts @@ -0,0 +1,89 @@ +import type { KeyLike, FlattenedJWE, JWEHeaderParameters, JWEKeyManagementHeaderParameters, EncryptOptions } from '../../types'; +/** @private */ +export declare const unprotected: unique symbol; +/** + * The FlattenedEncrypt class is a utility for creating Flattened JWE objects. + * + * @example Usage + * + * ```js + * const jwe = await new jose.FlattenedEncrypt( + * new TextEncoder().encode('It’s a dangerous business, Frodo, going out your door.'), + * ) + * .setProtectedHeader({ alg: 'RSA-OAEP-256', enc: 'A256GCM' }) + * .setAdditionalAuthenticatedData(encoder.encode('The Fellowship of the Ring')) + * .encrypt(publicKey) + * + * console.log(jwe) + * ``` + */ +export declare class FlattenedEncrypt { + private _plaintext; + private _protectedHeader; + private _sharedUnprotectedHeader; + private _unprotectedHeader; + private _aad; + private _cek; + private _iv; + private _keyManagementParameters; + /** @param plaintext Binary representation of the plaintext to encrypt. */ + constructor(plaintext: Uint8Array); + /** + * Sets the JWE Key Management parameters to be used when encrypting. Use of this is method is + * really only needed for ECDH based algorithms when utilizing the Agreement PartyUInfo or + * Agreement PartyVInfo parameters. Other parameters will always be randomly generated when needed + * and missing. + * + * @param parameters JWE Key Management parameters. + */ + setKeyManagementParameters(parameters: JWEKeyManagementHeaderParameters): this; + /** + * Sets the JWE Protected Header on the FlattenedEncrypt object. + * + * @param protectedHeader JWE Protected Header. + */ + setProtectedHeader(protectedHeader: JWEHeaderParameters): this; + /** + * Sets the JWE Shared Unprotected Header on the FlattenedEncrypt object. + * + * @param sharedUnprotectedHeader JWE Shared Unprotected Header. + */ + setSharedUnprotectedHeader(sharedUnprotectedHeader: JWEHeaderParameters): this; + /** + * Sets the JWE Per-Recipient Unprotected Header on the FlattenedEncrypt object. + * + * @param unprotectedHeader JWE Per-Recipient Unprotected Header. + */ + setUnprotectedHeader(unprotectedHeader: JWEHeaderParameters): this; + /** + * Sets the Additional Authenticated Data on the FlattenedEncrypt object. + * + * @param aad Additional Authenticated Data. + */ + setAdditionalAuthenticatedData(aad: Uint8Array): this; + /** + * Sets a content encryption key to use, by default a random suitable one is generated for the JWE + * enc" (Encryption Algorithm) Header Parameter. + * + * @deprecated You should not use this method. It is only really intended for test and vector + * validation purposes. + * @param cek JWE Content Encryption Key. + */ + setContentEncryptionKey(cek: Uint8Array): this; + /** + * Sets the JWE Initialization Vector to use for content encryption, by default a random suitable + * one is generated for the JWE enc" (Encryption Algorithm) Header Parameter. + * + * @deprecated You should not use this method. It is only really intended for test and vector + * validation purposes. + * @param iv JWE Initialization Vector. + */ + setInitializationVector(iv: Uint8Array): this; + /** + * Encrypts and resolves the value of the Flattened JWE object. + * + * @param key Public Key or Secret to encrypt the JWE with. + * @param options JWE Encryption options. + */ + encrypt(key: KeyLike | Uint8Array, options?: EncryptOptions): Promise<FlattenedJWE>; +} diff --git a/webapp/node_modules/jose/dist/types/jwe/general/decrypt.d.ts b/webapp/node_modules/jose/dist/types/jwe/general/decrypt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d6efd0ff516677331523cfacae85fe451ec7a3c0 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwe/general/decrypt.d.ts @@ -0,0 +1,47 @@ +import type { KeyLike, DecryptOptions, JWEHeaderParameters, GetKeyFunction, FlattenedJWE, GeneralJWE, GeneralDecryptResult, ResolvedKey } from '../../types'; +/** + * Interface for General JWE Decryption dynamic key resolution. No token components have been + * verified at the time of this function call. + */ +export interface GeneralDecryptGetKey extends GetKeyFunction<JWEHeaderParameters, FlattenedJWE> { +} +/** + * Decrypts a General JWE. + * + * @example Usage + * + * ```js + * const jwe = { + * ciphertext: '9EzjFISUyoG-ifC2mSihfP0DPC80yeyrxhTzKt1C_VJBkxeBG0MI4Te61Pk45RAGubUvBpU9jm4', + * iv: '8Fy7A_IuoX5VXG9s', + * tag: 'W76IYV6arGRuDSaSyWrQNg', + * aad: 'VGhlIEZlbGxvd3NoaXAgb2YgdGhlIFJpbmc', + * protected: 'eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIn0', + * recipients: [ + * { + * encrypted_key: + * 'Z6eD4UK_yFb5ZoKvKkGAdqywEG_m0e4IYo0x8Vf30LAMJcsc-_zSgIeiF82teZyYi2YYduHKoqImk7MRnoPZOlEs0Q5BNK1OgBmSOhCE8DFyqh9Zh48TCTP6lmBQ52naqoUJFMtHzu-0LwZH26hxos0GP3Dt19O379MJB837TdKKa87skq0zHaVLAquRHOBF77GI54Bc7O49d8aOrSu1VEFGMThlW2caspPRiTSePDMDPq7_WGk50izRhB3Asl9wmP9wEeaTrkJKRnQj5ips1SAZ1hDBsqEQKKukxP1HtdcopHV5_qgwU8Hjm5EwSLMluMQuiE6hwlkXGOujZLVizA', + * }, + * ], + * } + * + * const { plaintext, protectedHeader, additionalAuthenticatedData } = + * await jose.generalDecrypt(jwe, privateKey) + * + * console.log(protectedHeader) + * const decoder = new TextDecoder() + * console.log(decoder.decode(plaintext)) + * console.log(decoder.decode(additionalAuthenticatedData)) + * ``` + * + * @param jwe General JWE. + * @param key Private Key or Secret to decrypt the JWE with. + * @param options JWE Decryption options. + */ +export declare function generalDecrypt(jwe: GeneralJWE, key: KeyLike | Uint8Array, options?: DecryptOptions): Promise<GeneralDecryptResult>; +/** + * @param jwe General JWE. + * @param getKey Function resolving Private Key or Secret to decrypt the JWE with. + * @param options JWE Decryption options. + */ +export declare function generalDecrypt(jwe: GeneralJWE, getKey: GeneralDecryptGetKey, options?: DecryptOptions): Promise<GeneralDecryptResult & ResolvedKey>; diff --git a/webapp/node_modules/jose/dist/types/jwe/general/encrypt.d.ts b/webapp/node_modules/jose/dist/types/jwe/general/encrypt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..70dee92e94f7fb0479940a955d2364be5081f2fc --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwe/general/encrypt.d.ts @@ -0,0 +1,74 @@ +import type { KeyLike, GeneralJWE, JWEHeaderParameters, CritOption, DeflateOption } from '../../types'; +export interface Recipient { + /** + * Sets the JWE Per-Recipient Unprotected Header on the Recipient object. + * + * @param unprotectedHeader JWE Per-Recipient Unprotected Header. + */ + setUnprotectedHeader(unprotectedHeader: JWEHeaderParameters): Recipient; + /** A shorthand for calling addRecipient() on the enclosing GeneralEncrypt instance */ + addRecipient(...args: Parameters<GeneralEncrypt['addRecipient']>): Recipient; + /** A shorthand for calling encrypt() on the enclosing GeneralEncrypt instance */ + encrypt(...args: Parameters<GeneralEncrypt['encrypt']>): Promise<GeneralJWE>; + /** Returns the enclosing GeneralEncrypt */ + done(): GeneralEncrypt; +} +/** + * The GeneralEncrypt class is a utility for creating General JWE objects. + * + * @example Usage + * + * ```js + * const jwe = await new jose.GeneralEncrypt( + * new TextEncoder().encode('It’s a dangerous business, Frodo, going out your door.'), + * ) + * .setProtectedHeader({ enc: 'A256GCM' }) + * .addRecipient(ecPublicKey) + * .setUnprotectedHeader({ alg: 'ECDH-ES+A256KW' }) + * .addRecipient(rsaPublicKey) + * .setUnprotectedHeader({ alg: 'RSA-OAEP-384' }) + * .encrypt() + * + * console.log(jwe) + * ``` + */ +export declare class GeneralEncrypt { + private _plaintext; + private _recipients; + private _protectedHeader; + private _unprotectedHeader; + private _aad; + /** @param plaintext Binary representation of the plaintext to encrypt. */ + constructor(plaintext: Uint8Array); + /** + * Adds an additional recipient for the General JWE object. + * + * @param key Public Key or Secret to encrypt the Content Encryption Key for the recipient with. + * @param options JWE Encryption options. + */ + addRecipient(key: KeyLike | Uint8Array, options?: CritOption): Recipient; + /** + * Sets the JWE Protected Header on the GeneralEncrypt object. + * + * @param protectedHeader JWE Protected Header object. + */ + setProtectedHeader(protectedHeader: JWEHeaderParameters): this; + /** + * Sets the JWE Shared Unprotected Header on the GeneralEncrypt object. + * + * @param sharedUnprotectedHeader JWE Shared Unprotected Header object. + */ + setSharedUnprotectedHeader(sharedUnprotectedHeader: JWEHeaderParameters): this; + /** + * Sets the Additional Authenticated Data on the GeneralEncrypt object. + * + * @param aad Additional Authenticated Data. + */ + setAdditionalAuthenticatedData(aad: Uint8Array): this; + /** + * Encrypts and resolves the value of the General JWE object. + * + * @param options JWE Encryption options. + */ + encrypt(options?: DeflateOption): Promise<GeneralJWE>; +} diff --git a/webapp/node_modules/jose/dist/types/jwk/embedded.d.ts b/webapp/node_modules/jose/dist/types/jwk/embedded.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..af05d9504d76f78bbb551622128fa7d99ef61472 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwk/embedded.d.ts @@ -0,0 +1,23 @@ +import type { FlattenedJWSInput, JWSHeaderParameters } from '../types'; +/** + * EmbeddedJWK is an implementation of a GetKeyFunction intended to be used with the JWS/JWT verify + * operations whenever you need to opt-in to verify signatures with a public key embedded in the + * token's "jwk" (JSON Web Key) Header Parameter. It is recommended to combine this with the verify + * algorithms option to whitelist JWS algorithms to accept. + * + * @example Usage + * + * ```js + * const jwt = + * 'eyJqd2siOnsiY3J2IjoiUC0yNTYiLCJ4IjoiVU05ZzVuS25aWFlvdldBbE03NmNMejl2VG96UmpfX0NIVV9kT2wtZ09vRSIsInkiOiJkczhhZVF3MWwyY0RDQTdiQ2tPTnZ3REtwWEFidFhqdnFDbGVZSDhXc19VIiwia3R5IjoiRUMifSwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiJ1cm46ZXhhbXBsZTppc3N1ZXIiLCJhdWQiOiJ1cm46ZXhhbXBsZTphdWRpZW5jZSIsImlhdCI6MTYwNDU4MDc5NH0.60boak3_dErnW47ZPty1C0nrjeVq86EN_eK0GOq6K8w2OA0thKoBxFK4j-NuU9yZ_A9UKGxPT_G87DladBaV9g' + * + * const { payload, protectedHeader } = await jose.jwtVerify(jwt, jose.EmbeddedJWK, { + * issuer: 'urn:example:issuer', + * audience: 'urn:example:audience', + * }) + * + * console.log(protectedHeader) + * console.log(payload) + * ``` + */ +export declare function EmbeddedJWK(protectedHeader: JWSHeaderParameters, token: FlattenedJWSInput): Promise<import("../types.d").KeyLike>; diff --git a/webapp/node_modules/jose/dist/types/jwk/thumbprint.d.ts b/webapp/node_modules/jose/dist/types/jwk/thumbprint.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..08a61bf192227dd5b69e20bc0a1deb22000d2272 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwk/thumbprint.d.ts @@ -0,0 +1,44 @@ +import type { JWK } from '../types'; +/** + * Calculates a base64url-encoded JSON Web Key (JWK) Thumbprint as per + * [RFC7638](https://www.rfc-editor.org/rfc/rfc7638). + * + * @example Usage + * + * ```js + * const thumbprint = await jose.calculateJwkThumbprint({ + * kty: 'EC', + * crv: 'P-256', + * x: 'jJ6Flys3zK9jUhnOHf6G49Dyp5hah6CNP84-gY-n9eo', + * y: 'nhI6iD5eFXgBTLt_1p3aip-5VbZeMhxeFSpjfEAf7Ww', + * }) + * + * console.log(thumbprint) + * // 'w9eYdC6_s_tLQ8lH6PUpc0mddazaqtPgeC2IgWDiqY8' + * ``` + * + * @param jwk JSON Web Key. + * @param digestAlgorithm Digest Algorithm to use for calculating the thumbprint. Default is "sha256". + */ +export declare function calculateJwkThumbprint(jwk: JWK, digestAlgorithm?: 'sha256' | 'sha384' | 'sha512'): Promise<string>; +/** + * Calculates a JSON Web Key (JWK) Thumbprint URI as per [RFC9278](https://www.rfc-editor.org/rfc/rfc9278). + * + * @example Usage + * + * ```js + * const thumbprintUri = await jose.calculateJwkThumbprintUri({ + * kty: 'EC', + * crv: 'P-256', + * x: 'jJ6Flys3zK9jUhnOHf6G49Dyp5hah6CNP84-gY-n9eo', + * y: 'nhI6iD5eFXgBTLt_1p3aip-5VbZeMhxeFSpjfEAf7Ww', + * }) + * + * console.log(thumbprint) + * // 'urn:ietf:params:oauth:jwk-thumbprint:sha-256:w9eYdC6_s_tLQ8lH6PUpc0mddazaqtPgeC2IgWDiqY8' + * ``` + * + * @param jwk JSON Web Key. + * @param digestAlgorithm Digest Algorithm to use for calculating the thumbprint. Default is "sha256". + */ +export declare function calculateJwkThumbprintUri(jwk: JWK, digestAlgorithm?: 'sha256' | 'sha384' | 'sha512'): Promise<string>; diff --git a/webapp/node_modules/jose/dist/types/jwks/local.d.ts b/webapp/node_modules/jose/dist/types/jwks/local.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e9ea6867f94c651f92170ae61db2859fa57bea81 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwks/local.d.ts @@ -0,0 +1,48 @@ +import type { KeyLike, JWSHeaderParameters, JSONWebKeySet, FlattenedJWSInput, GetKeyFunction } from '../types'; +/** @private */ +export declare function isJWKSLike(jwks: unknown): jwks is JSONWebKeySet; +/** @private */ +export declare class LocalJWKSet { + protected _jwks?: JSONWebKeySet; + private _cached; + constructor(jwks: unknown); + getKey(protectedHeader: JWSHeaderParameters, token: FlattenedJWSInput): Promise<KeyLike>; +} +/** + * Returns a function that resolves to a key object from a locally stored, or otherwise available, + * JSON Web Key Set. + * + * Only a single public key must match the selection process. + * + * @example Usage + * + * ```js + * const JWKS = jose.createLocalJWKSet({ + * keys: [ + * { + * kty: 'RSA', + * e: 'AQAB', + * n: '12oBZRhCiZFJLcPg59LkZZ9mdhSMTKAQZYq32k_ti5SBB6jerkh-WzOMAO664r_qyLkqHUSp3u5SbXtseZEpN3XPWGKSxjsy-1JyEFTdLSYe6f9gfrmxkUF_7DTpq0gn6rntP05g2-wFW50YO7mosfdslfrTJYWHFhJALabAeYirYD7-9kqq9ebfFMF4sRRELbv9oi36As6Q9B3Qb5_C1rAzqfao_PCsf9EPsTZsVVVkA5qoIAr47lo1ipfiBPxUCCNSdvkmDTYgvvRm6ZoMjFbvOtgyts55fXKdMWv7I9HMD5HwE9uW839PWA514qhbcIsXEYSFMPMV6fnlsiZvQQ', + * alg: 'PS256', + * }, + * { + * crv: 'P-256', + * kty: 'EC', + * x: 'ySK38C1jBdLwDsNWKzzBHqKYEE5Cgv-qjWvorUXk9fw', + * y: '_LeQBw07cf5t57Iavn4j-BqJsAD1dpoz8gokd3sBsOo', + * alg: 'ES256', + * }, + * ], + * }) + * + * const { payload, protectedHeader } = await jose.jwtVerify(jwt, JWKS, { + * issuer: 'urn:example:issuer', + * audience: 'urn:example:audience', + * }) + * console.log(protectedHeader) + * console.log(payload) + * ``` + * + * @param jwks JSON Web Key Set formatted object. + */ +export declare function createLocalJWKSet(jwks: JSONWebKeySet): GetKeyFunction<JWSHeaderParameters, FlattenedJWSInput>; diff --git a/webapp/node_modules/jose/dist/types/jwks/remote.d.ts b/webapp/node_modules/jose/dist/types/jwks/remote.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c214f9e07df6309030885f01c20755a45316eb88 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwks/remote.d.ts @@ -0,0 +1,54 @@ +import type { JWSHeaderParameters, FlattenedJWSInput, GetKeyFunction } from '../types'; +/** Options for the remote JSON Web Key Set. */ +export interface RemoteJWKSetOptions { + /** + * Timeout (in milliseconds) for the HTTP request. When reached the request will be aborted and + * the verification will fail. Default is 5000 (5 seconds). + */ + timeoutDuration?: number; + /** + * Duration (in milliseconds) for which no more HTTP requests will be triggered after a previous + * successful fetch. Default is 30000 (30 seconds). + */ + cooldownDuration?: number; + /** Maximum time (in milliseconds) between successful HTTP requests. Default is 600000 (10 minutes). */ + cacheMaxAge?: number | typeof Infinity; + /** + * An instance of [http.Agent](https://nodejs.org/api/http.html#class-httpagent) or + * [https.Agent](https://nodejs.org/api/https.html#class-httpsagent) to pass to the + * [http.get](https://nodejs.org/api/http.html#httpgetoptions-callback) or + * [https.get](https://nodejs.org/api/https.html#httpsgetoptions-callback) method's options. Use + * when behind an http(s) proxy. This is a Node.js runtime specific option, it is ignored when + * used outside of Node.js runtime. + */ + agent?: any; + /** Optional headers to be sent with the HTTP request. */ + headers?: Record<string, string>; +} +interface URL { + href: string; +} +/** + * Returns a function that resolves to a key object downloaded from a remote endpoint returning a + * JSON Web Key Set, that is, for example, an OAuth 2.0 or OIDC jwks_uri. Only a single public key + * must match the selection process. The JSON Web Key Set is fetched when no key matches the + * selection process but only as frequently as the `cooldownDuration` option allows, to prevent abuse. + * + * @example Usage + * + * ```js + * const JWKS = jose.createRemoteJWKSet(new URL('https://www.googleapis.com/oauth2/v3/certs')) + * + * const { payload, protectedHeader } = await jose.jwtVerify(jwt, JWKS, { + * issuer: 'urn:example:issuer', + * audience: 'urn:example:audience', + * }) + * console.log(protectedHeader) + * console.log(payload) + * ``` + * + * @param url URL to fetch the JSON Web Key Set from. + * @param options Options for the remote JSON Web Key Set. + */ +export declare function createRemoteJWKSet(url: URL, options?: RemoteJWKSetOptions): GetKeyFunction<JWSHeaderParameters, FlattenedJWSInput>; +export {}; diff --git a/webapp/node_modules/jose/dist/types/jws/compact/sign.d.ts b/webapp/node_modules/jose/dist/types/jws/compact/sign.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1edb1790d77ca2f4c7be9b685f3e322fe3cac1aa --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jws/compact/sign.d.ts @@ -0,0 +1,34 @@ +import type { CompactJWSHeaderParameters, KeyLike, SignOptions } from '../../types'; +/** + * The CompactSign class is a utility for creating Compact JWS strings. + * + * @example Usage + * + * ```js + * const jws = await new jose.CompactSign( + * new TextEncoder().encode('It’s a dangerous business, Frodo, going out your door.'), + * ) + * .setProtectedHeader({ alg: 'ES256' }) + * .sign(privateKey) + * + * console.log(jws) + * ``` + */ +export declare class CompactSign { + private _flattened; + /** @param payload Binary representation of the payload to sign. */ + constructor(payload: Uint8Array); + /** + * Sets the JWS Protected Header on the Sign object. + * + * @param protectedHeader JWS Protected Header. + */ + setProtectedHeader(protectedHeader: CompactJWSHeaderParameters): this; + /** + * Signs and resolves the value of the Compact JWS string. + * + * @param key Private Key or Secret to sign the JWS with. + * @param options JWS Sign options. + */ + sign(key: KeyLike | Uint8Array, options?: SignOptions): Promise<string>; +} diff --git a/webapp/node_modules/jose/dist/types/jws/compact/verify.d.ts b/webapp/node_modules/jose/dist/types/jws/compact/verify.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e164c10447c5997f20c4a43a57001c9279b4419a --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jws/compact/verify.d.ts @@ -0,0 +1,37 @@ +import type { CompactVerifyResult, FlattenedJWSInput, GetKeyFunction, CompactJWSHeaderParameters, KeyLike, VerifyOptions, ResolvedKey } from '../../types'; +/** + * Interface for Compact JWS Verification dynamic key resolution. No token components have been + * verified at the time of this function call. + * + * See + * [createRemoteJWKSet](../functions/jwks_remote.createRemoteJWKSet.md#function-createremotejwkset) + * to verify using a remote JSON Web Key Set. + */ +export interface CompactVerifyGetKey extends GetKeyFunction<CompactJWSHeaderParameters, FlattenedJWSInput> { +} +/** + * Verifies the signature and format of and afterwards decodes the Compact JWS. + * + * @example Usage + * + * ```js + * const jws = + * 'eyJhbGciOiJFUzI1NiJ9.SXTigJlzIGEgZGFuZ2Vyb3VzIGJ1c2luZXNzLCBGcm9kbywgZ29pbmcgb3V0IHlvdXIgZG9vci4.kkAs_gPPxWMI3rHuVlxHaTPfDWDoqdI8jSvuSmqV-8IHIWXg9mcAeC9ggV-45ZHRbiRJ3obUIFo1rHphPA5URg' + * + * const { payload, protectedHeader } = await jose.compactVerify(jws, publicKey) + * + * console.log(protectedHeader) + * console.log(new TextDecoder().decode(payload)) + * ``` + * + * @param jws Compact JWS. + * @param key Key to verify the JWS with. + * @param options JWS Verify options. + */ +export declare function compactVerify(jws: string | Uint8Array, key: KeyLike | Uint8Array, options?: VerifyOptions): Promise<CompactVerifyResult>; +/** + * @param jws Compact JWS. + * @param getKey Function resolving a key to verify the JWS with. + * @param options JWS Verify options. + */ +export declare function compactVerify(jws: string | Uint8Array, getKey: CompactVerifyGetKey, options?: VerifyOptions): Promise<CompactVerifyResult & ResolvedKey>; diff --git a/webapp/node_modules/jose/dist/types/jws/flattened/sign.d.ts b/webapp/node_modules/jose/dist/types/jws/flattened/sign.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b719e7e1efd115b88e60a4168596f4f6a06d289b --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jws/flattened/sign.d.ts @@ -0,0 +1,42 @@ +import type { KeyLike, FlattenedJWS, JWSHeaderParameters, SignOptions } from '../../types'; +/** + * The FlattenedSign class is a utility for creating Flattened JWS objects. + * + * @example Usage + * + * ```js + * const jws = await new jose.FlattenedSign( + * new TextEncoder().encode('It’s a dangerous business, Frodo, going out your door.'), + * ) + * .setProtectedHeader({ alg: 'ES256' }) + * .sign(privateKey) + * + * console.log(jws) + * ``` + */ +export declare class FlattenedSign { + private _payload; + private _protectedHeader; + private _unprotectedHeader; + /** @param payload Binary representation of the payload to sign. */ + constructor(payload: Uint8Array); + /** + * Sets the JWS Protected Header on the FlattenedSign object. + * + * @param protectedHeader JWS Protected Header. + */ + setProtectedHeader(protectedHeader: JWSHeaderParameters): this; + /** + * Sets the JWS Unprotected Header on the FlattenedSign object. + * + * @param unprotectedHeader JWS Unprotected Header. + */ + setUnprotectedHeader(unprotectedHeader: JWSHeaderParameters): this; + /** + * Signs and resolves the value of the Flattened JWS object. + * + * @param key Private Key or Secret to sign the JWS with. + * @param options JWS Sign options. + */ + sign(key: KeyLike | Uint8Array, options?: SignOptions): Promise<FlattenedJWS>; +} diff --git a/webapp/node_modules/jose/dist/types/jws/flattened/verify.d.ts b/webapp/node_modules/jose/dist/types/jws/flattened/verify.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b4b7d65d641cf2d26288f315e0f3e2decbbe5fcc --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jws/flattened/verify.d.ts @@ -0,0 +1,42 @@ +import type { FlattenedVerifyResult, KeyLike, FlattenedJWSInput, JWSHeaderParameters, VerifyOptions, GetKeyFunction, ResolvedKey } from '../../types'; +/** + * Interface for Flattened JWS Verification dynamic key resolution. No token components have been + * verified at the time of this function call. + * + * See + * [createRemoteJWKSet](../functions/jwks_remote.createRemoteJWKSet.md#function-createremotejwkset) + * to verify using a remote JSON Web Key Set. + */ +export interface FlattenedVerifyGetKey extends GetKeyFunction<JWSHeaderParameters | undefined, FlattenedJWSInput> { +} +/** + * Verifies the signature and format of and afterwards decodes the Flattened JWS. + * + * @example Usage + * + * ```js + * const decoder = new TextDecoder() + * const jws = { + * signature: + * 'FVVOXwj6kD3DqdfD9yYqfT2W9jv-Nop4kOehp_DeDGNB5dQNSPRvntBY6xH3uxlCxE8na9d_kyhYOcanpDJ0EA', + * payload: 'SXTigJlzIGEgZGFuZ2Vyb3VzIGJ1c2luZXNzLCBGcm9kbywgZ29pbmcgb3V0IHlvdXIgZG9vci4', + * protected: 'eyJhbGciOiJFUzI1NiJ9', + * } + * + * const { payload, protectedHeader } = await jose.flattenedVerify(jws, publicKey) + * + * console.log(protectedHeader) + * console.log(decoder.decode(payload)) + * ``` + * + * @param jws Flattened JWS. + * @param key Key to verify the JWS with. + * @param options JWS Verify options. + */ +export declare function flattenedVerify(jws: FlattenedJWSInput, key: KeyLike | Uint8Array, options?: VerifyOptions): Promise<FlattenedVerifyResult>; +/** + * @param jws Flattened JWS. + * @param getKey Function resolving a key to verify the JWS with. + * @param options JWS Verify options. + */ +export declare function flattenedVerify(jws: FlattenedJWSInput, getKey: FlattenedVerifyGetKey, options?: VerifyOptions): Promise<FlattenedVerifyResult & ResolvedKey>; diff --git a/webapp/node_modules/jose/dist/types/jws/general/sign.d.ts b/webapp/node_modules/jose/dist/types/jws/general/sign.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..59a765cfef4722b9f317ffe5e211e40a486658f2 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jws/general/sign.d.ts @@ -0,0 +1,54 @@ +import type { KeyLike, GeneralJWS, JWSHeaderParameters, SignOptions } from '../../types'; +export interface Signature { + /** + * Sets the JWS Protected Header on the Signature object. + * + * @param protectedHeader JWS Protected Header. + */ + setProtectedHeader(protectedHeader: JWSHeaderParameters): Signature; + /** + * Sets the JWS Unprotected Header on the Signature object. + * + * @param unprotectedHeader JWS Unprotected Header. + */ + setUnprotectedHeader(unprotectedHeader: JWSHeaderParameters): Signature; + /** A shorthand for calling addSignature() on the enclosing GeneralSign instance */ + addSignature(...args: Parameters<GeneralSign['addSignature']>): Signature; + /** A shorthand for calling encrypt() on the enclosing GeneralSign instance */ + sign(...args: Parameters<GeneralSign['sign']>): Promise<GeneralJWS>; + /** Returns the enclosing GeneralSign */ + done(): GeneralSign; +} +/** + * The GeneralSign class is a utility for creating General JWS objects. + * + * @example Usage + * + * ```js + * const jws = await new jose.GeneralSign( + * new TextEncoder().encode('It’s a dangerous business, Frodo, going out your door.'), + * ) + * .addSignature(ecPrivateKey) + * .setProtectedHeader({ alg: 'ES256' }) + * .addSignature(rsaPrivateKey) + * .setProtectedHeader({ alg: 'PS256' }) + * .sign() + * + * console.log(jws) + * ``` + */ +export declare class GeneralSign { + private _payload; + private _signatures; + /** @param payload Binary representation of the payload to sign. */ + constructor(payload: Uint8Array); + /** + * Adds an additional signature for the General JWS object. + * + * @param key Private Key or Secret to sign the individual JWS signature with. + * @param options JWS Sign options. + */ + addSignature(key: KeyLike | Uint8Array, options?: SignOptions): Signature; + /** Signs and resolves the value of the General JWS object. */ + sign(): Promise<GeneralJWS>; +} diff --git a/webapp/node_modules/jose/dist/types/jws/general/verify.d.ts b/webapp/node_modules/jose/dist/types/jws/general/verify.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3795656add1a64ca33171d84d1b48902290eb703 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jws/general/verify.d.ts @@ -0,0 +1,45 @@ +import type { GeneralJWSInput, GeneralVerifyResult, FlattenedJWSInput, GetKeyFunction, JWSHeaderParameters, KeyLike, VerifyOptions, ResolvedKey } from '../../types'; +/** + * Interface for General JWS Verification dynamic key resolution. No token components have been + * verified at the time of this function call. + * + * See + * [createRemoteJWKSet](../functions/jwks_remote.createRemoteJWKSet.md#function-createremotejwkset) + * to verify using a remote JSON Web Key Set. + */ +export interface GeneralVerifyGetKey extends GetKeyFunction<JWSHeaderParameters, FlattenedJWSInput> { +} +/** + * Verifies the signature and format of and afterwards decodes the General JWS. + * + * @example Usage + * + * ```js + * const jws = { + * payload: 'SXTigJlzIGEgZGFuZ2Vyb3VzIGJ1c2luZXNzLCBGcm9kbywgZ29pbmcgb3V0IHlvdXIgZG9vci4', + * signatures: [ + * { + * signature: + * 'FVVOXwj6kD3DqdfD9yYqfT2W9jv-Nop4kOehp_DeDGNB5dQNSPRvntBY6xH3uxlCxE8na9d_kyhYOcanpDJ0EA', + * protected: 'eyJhbGciOiJFUzI1NiJ9', + * }, + * ], + * } + * + * const { payload, protectedHeader } = await jose.generalVerify(jws, publicKey) + * + * console.log(protectedHeader) + * console.log(new TextDecoder().decode(payload)) + * ``` + * + * @param jws General JWS. + * @param key Key to verify the JWS with. + * @param options JWS Verify options. + */ +export declare function generalVerify(jws: GeneralJWSInput, key: KeyLike | Uint8Array, options?: VerifyOptions): Promise<GeneralVerifyResult>; +/** + * @param jws General JWS. + * @param getKey Function resolving a key to verify the JWS with. + * @param options JWS Verify options. + */ +export declare function generalVerify(jws: GeneralJWSInput, getKey: GeneralVerifyGetKey, options?: VerifyOptions): Promise<GeneralVerifyResult & ResolvedKey>; diff --git a/webapp/node_modules/jose/dist/types/jwt/decrypt.d.ts b/webapp/node_modules/jose/dist/types/jwt/decrypt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..22b00170aa2a69cbbbf9edf7e5f9895866497278 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwt/decrypt.d.ts @@ -0,0 +1,40 @@ +import type { KeyLike, DecryptOptions, JWTClaimVerificationOptions, GetKeyFunction, CompactJWEHeaderParameters, FlattenedJWE, JWTDecryptResult, ResolvedKey } from '../types'; +/** Combination of JWE Decryption options and JWT Claims Set verification options. */ +export interface JWTDecryptOptions extends DecryptOptions, JWTClaimVerificationOptions { +} +/** + * Interface for JWT Decryption dynamic key resolution. No token components have been verified at + * the time of this function call. + */ +export interface JWTDecryptGetKey extends GetKeyFunction<CompactJWEHeaderParameters, FlattenedJWE> { +} +/** + * Verifies the JWT format (to be a JWE Compact format), decrypts the ciphertext, validates the JWT + * Claims Set. + * + * @example Usage + * + * ```js + * const jwt = + * 'eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..KVcNLqK-3-8ZkYIC.xSwF4VxO0kUMUD2W-cifsNUxnr-swyBq-nADBptyt6y9n79-iNc5b0AALJpRwc0wwDkJw8hNOMjApNUTMsK9b-asToZ3DXFMvwfJ6n1aWefvd7RsoZ2LInWFfVAuttJDzoGB.uuexQoWHwrLMEYRElT8pBQ' + * + * const { payload, protectedHeader } = await jose.jwtDecrypt(jwt, secretKey, { + * issuer: 'urn:example:issuer', + * audience: 'urn:example:audience', + * }) + * + * console.log(protectedHeader) + * console.log(payload) + * ``` + * + * @param jwt JSON Web Token value (encoded as JWE). + * @param key Private Key or Secret to decrypt and verify the JWT with. + * @param options JWT Decryption and JWT Claims Set validation options. + */ +export declare function jwtDecrypt(jwt: string | Uint8Array, key: KeyLike | Uint8Array, options?: JWTDecryptOptions): Promise<JWTDecryptResult>; +/** + * @param jwt JSON Web Token value (encoded as JWE). + * @param getKey Function resolving Private Key or Secret to decrypt and verify the JWT with. + * @param options JWT Decryption and JWT Claims Set validation options. + */ +export declare function jwtDecrypt(jwt: string | Uint8Array, getKey: JWTDecryptGetKey, options?: JWTDecryptOptions): Promise<JWTDecryptResult & ResolvedKey>; diff --git a/webapp/node_modules/jose/dist/types/jwt/encrypt.d.ts b/webapp/node_modules/jose/dist/types/jwt/encrypt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3608909427c227885625ca17d132520e5fe12dfa --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwt/encrypt.d.ts @@ -0,0 +1,84 @@ +import type { EncryptOptions, CompactJWEHeaderParameters, JWEKeyManagementHeaderParameters, KeyLike } from '../types'; +import { ProduceJWT } from './produce'; +/** + * The EncryptJWT class is a utility for creating Compact JWE formatted JWT strings. + * + * @example Usage + * + * ```js + * const jwt = await new jose.EncryptJWT({ 'urn:example:claim': true }) + * .setProtectedHeader({ alg: 'dir', enc: 'A256GCM' }) + * .setIssuedAt() + * .setIssuer('urn:example:issuer') + * .setAudience('urn:example:audience') + * .setExpirationTime('2h') + * .encrypt(secretKey) + * + * console.log(jwt) + * ``` + */ +export declare class EncryptJWT extends ProduceJWT { + private _cek; + private _iv; + private _keyManagementParameters; + private _protectedHeader; + private _replicateIssuerAsHeader; + private _replicateSubjectAsHeader; + private _replicateAudienceAsHeader; + /** + * Sets the JWE Protected Header on the EncryptJWT object. + * + * @param protectedHeader JWE Protected Header. Must contain an "alg" (JWE Algorithm) and "enc" + * (JWE Encryption Algorithm) properties. + */ + setProtectedHeader(protectedHeader: CompactJWEHeaderParameters): this; + /** + * Sets the JWE Key Management parameters to be used when encrypting. Use of this is method is + * really only needed for ECDH based algorithms when utilizing the Agreement PartyUInfo or + * Agreement PartyVInfo parameters. Other parameters will always be randomly generated when needed + * and missing. + * + * @param parameters JWE Key Management parameters. + */ + setKeyManagementParameters(parameters: JWEKeyManagementHeaderParameters): this; + /** + * Sets a content encryption key to use, by default a random suitable one is generated for the JWE + * enc" (Encryption Algorithm) Header Parameter. + * + * @deprecated You should not use this method. It is only really intended for test and vector + * validation purposes. + * @param cek JWE Content Encryption Key. + */ + setContentEncryptionKey(cek: Uint8Array): this; + /** + * Sets the JWE Initialization Vector to use for content encryption, by default a random suitable + * one is generated for the JWE enc" (Encryption Algorithm) Header Parameter. + * + * @deprecated You should not use this method. It is only really intended for test and vector + * validation purposes. + * @param iv JWE Initialization Vector. + */ + setInitializationVector(iv: Uint8Array): this; + /** + * Replicates the "iss" (Issuer) Claim as a JWE Protected Header Parameter as per + * [RFC7519#section-5.3](https://www.rfc-editor.org/rfc/rfc7519#section-5.3). + */ + replicateIssuerAsHeader(): this; + /** + * Replicates the "sub" (Subject) Claim as a JWE Protected Header Parameter as per + * [RFC7519#section-5.3](https://www.rfc-editor.org/rfc/rfc7519#section-5.3). + */ + replicateSubjectAsHeader(): this; + /** + * Replicates the "aud" (Audience) Claim as a JWE Protected Header Parameter as per + * [RFC7519#section-5.3](https://www.rfc-editor.org/rfc/rfc7519#section-5.3). + */ + replicateAudienceAsHeader(): this; + /** + * Encrypts and returns the JWT. + * + * @param key Public Key or Secret to encrypt the JWT with. + * @param options JWE Encryption options. + */ + encrypt(key: KeyLike | Uint8Array, options?: EncryptOptions): Promise<string>; +} diff --git a/webapp/node_modules/jose/dist/types/jwt/produce.d.ts b/webapp/node_modules/jose/dist/types/jwt/produce.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0a9f30266db72fc8d0a1ac0a24c1dcef092150e4 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwt/produce.d.ts @@ -0,0 +1,53 @@ +import type { JWTPayload } from '../types'; +/** Generic class for JWT producing. */ +export declare class ProduceJWT { + protected _payload: JWTPayload; + /** @param payload The JWT Claims Set object. */ + constructor(payload: JWTPayload); + /** + * Set "iss" (Issuer) Claim. + * + * @param issuer "Issuer" Claim value to set on the JWT Claims Set. + */ + setIssuer(issuer: string): this; + /** + * Set "sub" (Subject) Claim. + * + * @param subject "sub" (Subject) Claim value to set on the JWT Claims Set. + */ + setSubject(subject: string): this; + /** + * Set "aud" (Audience) Claim. + * + * @param audience "aud" (Audience) Claim value to set on the JWT Claims Set. + */ + setAudience(audience: string | string[]): this; + /** + * Set "jti" (JWT ID) Claim. + * + * @param jwtId "jti" (JWT ID) Claim value to set on the JWT Claims Set. + */ + setJti(jwtId: string): this; + /** + * Set "nbf" (Not Before) Claim. + * + * @param input "nbf" (Not Before) Claim value to set on the JWT Claims Set. When number is passed + * that is used as a value, when string is passed it is resolved to a time span and added to the + * current timestamp. + */ + setNotBefore(input: number | string): this; + /** + * Set "exp" (Expiration Time) Claim. + * + * @param input "exp" (Expiration Time) Claim value to set on the JWT Claims Set. When number is + * passed that is used as a value, when string is passed it is resolved to a time span and added + * to the current timestamp. + */ + setExpirationTime(input: number | string): this; + /** + * Set "iat" (Issued At) Claim. + * + * @param input "iat" (Issued At) Claim value to set on the JWT Claims Set. Default is current timestamp. + */ + setIssuedAt(input?: number): this; +} diff --git a/webapp/node_modules/jose/dist/types/jwt/sign.d.ts b/webapp/node_modules/jose/dist/types/jwt/sign.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f381c107e25a973689373ca16b04d37be9b0eacc --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwt/sign.d.ts @@ -0,0 +1,35 @@ +import type { JWTHeaderParameters, KeyLike, SignOptions } from '../types'; +import { ProduceJWT } from './produce'; +/** + * The SignJWT class is a utility for creating Compact JWS formatted JWT strings. + * + * @example Usage + * + * ```js + * const jwt = await new jose.SignJWT({ 'urn:example:claim': true }) + * .setProtectedHeader({ alg: 'ES256' }) + * .setIssuedAt() + * .setIssuer('urn:example:issuer') + * .setAudience('urn:example:audience') + * .setExpirationTime('2h') + * .sign(privateKey) + * + * console.log(jwt) + * ``` + */ +export declare class SignJWT extends ProduceJWT { + private _protectedHeader; + /** + * Sets the JWS Protected Header on the SignJWT object. + * + * @param protectedHeader JWS Protected Header. Must contain an "alg" (JWS Algorithm) property. + */ + setProtectedHeader(protectedHeader: JWTHeaderParameters): this; + /** + * Signs and returns the JWT. + * + * @param key Private Key or Secret to sign the JWT with. + * @param options JWT Sign options. + */ + sign(key: KeyLike | Uint8Array, options?: SignOptions): Promise<string>; +} diff --git a/webapp/node_modules/jose/dist/types/jwt/unsecured.d.ts b/webapp/node_modules/jose/dist/types/jwt/unsecured.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..767ea184612a7ae8e7c82cdeed72a7c0e04ec21c --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwt/unsecured.d.ts @@ -0,0 +1,44 @@ +import type { JWSHeaderParameters, JWTClaimVerificationOptions, JWTPayload } from '../types'; +import { ProduceJWT } from './produce'; +export interface UnsecuredResult { + payload: JWTPayload; + header: JWSHeaderParameters; +} +/** + * The UnsecuredJWT class is a utility for dealing with `{ "alg": "none" }` Unsecured JWTs. + * + * @example Encoding + * + * ```js + * const unsecuredJwt = new jose.UnsecuredJWT({ 'urn:example:claim': true }) + * .setIssuedAt() + * .setIssuer('urn:example:issuer') + * .setAudience('urn:example:audience') + * .setExpirationTime('2h') + * .encode() + * + * console.log(unsecuredJwt) + * ``` + * + * @example Decoding + * + * ```js + * const payload = jose.UnsecuredJWT.decode(jwt, { + * issuer: 'urn:example:issuer', + * audience: 'urn:example:audience', + * }) + * + * console.log(payload) + * ``` + */ +export declare class UnsecuredJWT extends ProduceJWT { + /** Encodes the Unsecured JWT. */ + encode(): string; + /** + * Decodes an unsecured JWT. + * + * @param jwt Unsecured JWT to decode the payload of. + * @param options JWT Claims Set validation options. + */ + static decode(jwt: string, options?: JWTClaimVerificationOptions): UnsecuredResult; +} diff --git a/webapp/node_modules/jose/dist/types/jwt/verify.d.ts b/webapp/node_modules/jose/dist/types/jwt/verify.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ebf87895811d19a2cc323ecc91a30bcb357d1b12 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/jwt/verify.d.ts @@ -0,0 +1,44 @@ +import type { KeyLike, VerifyOptions, JWTClaimVerificationOptions, JWTHeaderParameters, GetKeyFunction, FlattenedJWSInput, JWTVerifyResult, ResolvedKey } from '../types'; +/** Combination of JWS Verification options and JWT Claims Set verification options. */ +export interface JWTVerifyOptions extends VerifyOptions, JWTClaimVerificationOptions { +} +/** + * Interface for JWT Verification dynamic key resolution. No token components have been verified at + * the time of this function call. + * + * See + * [createRemoteJWKSet](../functions/jwks_remote.createRemoteJWKSet.md#function-createremotejwkset) + * to verify using a remote JSON Web Key Set. + */ +export interface JWTVerifyGetKey extends GetKeyFunction<JWTHeaderParameters, FlattenedJWSInput> { +} +/** + * Verifies the JWT format (to be a JWS Compact format), verifies the JWS signature, validates the + * JWT Claims Set. + * + * @example Usage + * + * ```js + * const jwt = + * 'eyJhbGciOiJFUzI1NiJ9.eyJ1cm46ZXhhbXBsZTpjbGFpbSI6dHJ1ZSwiaWF0IjoxNjA0MzE1MDc0LCJpc3MiOiJ1cm46ZXhhbXBsZTppc3N1ZXIiLCJhdWQiOiJ1cm46ZXhhbXBsZTphdWRpZW5jZSJ9.hx1nOfAT5LlXuzu8O-bhjXBGpklWDt2EsHw7-MDn49NrnwvVsstNhEnkW2ddauB7eSikFtUNeumLpFI9CWDBsg' + * + * const { payload, protectedHeader } = await jose.jwtVerify(jwt, publicKey, { + * issuer: 'urn:example:issuer', + * audience: 'urn:example:audience', + * }) + * + * console.log(protectedHeader) + * console.log(payload) + * ``` + * + * @param jwt JSON Web Token value (encoded as JWS). + * @param key Key to verify the JWT with. + * @param options JWT Decryption and JWT Claims Set validation options. + */ +export declare function jwtVerify(jwt: string | Uint8Array, key: KeyLike | Uint8Array, options?: JWTVerifyOptions): Promise<JWTVerifyResult>; +/** + * @param jwt JSON Web Token value (encoded as JWS). + * @param getKey Function resolving a key to verify the JWT with. + * @param options JWT Decryption and JWT Claims Set validation options. + */ +export declare function jwtVerify(jwt: string | Uint8Array, getKey: JWTVerifyGetKey, options?: JWTVerifyOptions): Promise<JWTVerifyResult & ResolvedKey>; diff --git a/webapp/node_modules/jose/dist/types/key/export.d.ts b/webapp/node_modules/jose/dist/types/key/export.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5d745e446f8f234ee22508fa5a33fa1398bdcf9e --- /dev/null +++ b/webapp/node_modules/jose/dist/types/key/export.d.ts @@ -0,0 +1,47 @@ +import type { JWK, KeyLike } from '../types'; +/** + * Exports a runtime-specific public key representation (KeyObject or CryptoKey) to a PEM-encoded + * SPKI string format. + * + * @example Usage + * + * ```js + * const spkiPem = await jose.exportSPKI(publicKey) + * + * console.log(spkiPem) + * ``` + * + * @param key Key representation to transform to a PEM-encoded SPKI string format. + */ +export declare function exportSPKI(key: KeyLike): Promise<string>; +/** + * Exports a runtime-specific private key representation (KeyObject or CryptoKey) to a PEM-encoded + * PKCS8 string format. + * + * @example Usage + * + * ```js + * const pkcs8Pem = await jose.exportPKCS8(privateKey) + * + * console.log(pkcs8Pem) + * ``` + * + * @param key Key representation to transform to a PEM-encoded PKCS8 string format. + */ +export declare function exportPKCS8(key: KeyLike): Promise<string>; +/** + * Exports a runtime-specific key representation (KeyLike) to a JWK. + * + * @example Usage + * + * ```js + * const privateJwk = await jose.exportJWK(privateKey) + * const publicJwk = await jose.exportJWK(publicKey) + * + * console.log(privateJwk) + * console.log(publicJwk) + * ``` + * + * @param key Key representation to export as JWK. + */ +export declare function exportJWK(key: KeyLike | Uint8Array): Promise<JWK>; diff --git a/webapp/node_modules/jose/dist/types/key/generate_key_pair.d.ts b/webapp/node_modules/jose/dist/types/key/generate_key_pair.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..faf89b1f14b03281ccfe3f7967fd48d972824a1f --- /dev/null +++ b/webapp/node_modules/jose/dist/types/key/generate_key_pair.d.ts @@ -0,0 +1,44 @@ +import type { KeyLike } from '../types'; +export interface GenerateKeyPairResult { + /** The generated Private Key. */ + privateKey: KeyLike; + /** Public Key corresponding to the generated Private Key. */ + publicKey: KeyLike; +} +export interface GenerateKeyPairOptions { + /** + * The EC "crv" (Curve) or OKP "crv" (Subtype of Key Pair) value to generate. The curve must be + * both supported on the runtime as well as applicable for the given JWA algorithm identifier. + */ + crv?: string; + /** + * A hint for RSA algorithms to generate an RSA key of a given `modulusLength` (Key size in bits). + * JOSE requires 2048 bits or larger. Default is 2048. + */ + modulusLength?: number; + /** + * (Web Cryptography API specific) The value to use as + * [SubtleCrypto.generateKey()](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/generateKey) + * `extractable` argument. Default is false. + */ + extractable?: boolean; +} +/** + * Generates a private and a public key for a given JWA algorithm identifier. This can only generate + * asymmetric key pairs. For symmetric secrets use the `generateSecret` function. + * + * Note: Under Web Cryptography API runtime the `privateKey` is generated with `extractable` set to + * `false` by default. + * + * @example Usage + * + * ```js + * const { publicKey, privateKey } = await jose.generateKeyPair('PS256') + * console.log(publicKey) + * console.log(privateKey) + * ``` + * + * @param alg JWA Algorithm Identifier to be used with the generated key pair. + * @param options Additional options passed down to the key pair generation. + */ +export declare function generateKeyPair(alg: string, options?: GenerateKeyPairOptions): Promise<GenerateKeyPairResult>; diff --git a/webapp/node_modules/jose/dist/types/key/generate_secret.d.ts b/webapp/node_modules/jose/dist/types/key/generate_secret.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f3d64616b992a3e400ee53efa0d0ca6ff4232c88 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/key/generate_secret.d.ts @@ -0,0 +1,26 @@ +import type { KeyLike } from '../types'; +export interface GenerateSecretOptions { + /** + * (Web Cryptography API specific) The value to use as + * [SubtleCrypto.generateKey()](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/generateKey) + * `extractable` argument. Default is false. + */ + extractable?: boolean; +} +/** + * Generates a symmetric secret key for a given JWA algorithm identifier. + * + * Note: Under Web Cryptography API runtime the secret key is generated with `extractable` set to + * `false` by default. + * + * @example Usage + * + * ```js + * const secret = await jose.generateSecret('HS256') + * console.log(secret) + * ``` + * + * @param alg JWA Algorithm Identifier to be used with the generated secret. + * @param options Additional options passed down to the secret generation. + */ +export declare function generateSecret(alg: string, options?: GenerateSecretOptions): Promise<KeyLike | Uint8Array>; diff --git a/webapp/node_modules/jose/dist/types/key/import.d.ts b/webapp/node_modules/jose/dist/types/key/import.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6a8236028f5e5e23538d5115821ff46d30589f83 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/key/import.d.ts @@ -0,0 +1,115 @@ +import type { JWK, KeyLike } from '../types'; +export interface PEMImportOptions { + /** + * (Web Cryptography API specific) The value to use as + * [SubtleCrypto.importKey()](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey) + * `extractable` argument. Default is false. + */ + extractable?: boolean; +} +/** + * Imports a PEM-encoded SPKI string as a runtime-specific public key representation (KeyObject or + * CryptoKey). See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210) to learn + * about key to algorithm requirements and mapping. + * + * @example Usage + * + * ```js + * const algorithm = 'ES256' + * const spki = `-----BEGIN PUBLIC KEY----- + * MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFlHHWfLk0gLBbsLTcuCrbCqoHqmM + * YJepMC+Q+Dd6RBmBiA41evUsNMwLeN+PNFqib+xwi9JkJ8qhZkq8Y/IzGg== + * -----END PUBLIC KEY-----` + * const ecPublicKey = await jose.importSPKI(spki, algorithm) + * ``` + * + * @param pem PEM-encoded SPKI string + * @param alg JSON Web Algorithm identifier to be used with the imported key. + */ +export declare function importSPKI(spki: string, alg: string, options?: PEMImportOptions): Promise<KeyLike>; +/** + * Imports the SPKI from an X.509 string certificate as a runtime-specific public key representation + * (KeyObject or CryptoKey). See [Algorithm Key + * Requirements](https://github.com/panva/jose/issues/210) to learn about key to algorithm + * requirements and mapping. + * + * @example Usage + * + * ```js + * const algorithm = 'ES256' + * const x509 = `-----BEGIN CERTIFICATE----- + * MIIBXjCCAQSgAwIBAgIGAXvykuMKMAoGCCqGSM49BAMCMDYxNDAyBgNVBAMMK3Np + * QXBNOXpBdk1VaXhXVWVGaGtjZXg1NjJRRzFyQUhXaV96UlFQTVpQaG8wHhcNMjEw + * OTE3MDcwNTE3WhcNMjIwNzE0MDcwNTE3WjA2MTQwMgYDVQQDDCtzaUFwTTl6QXZN + * VWl4V1VlRmhrY2V4NTYyUUcxckFIV2lfelJRUE1aUGhvMFkwEwYHKoZIzj0CAQYI + * KoZIzj0DAQcDQgAE8PbPvCv5D5xBFHEZlBp/q5OEUymq7RIgWIi7tkl9aGSpYE35 + * UH+kBKDnphJO3odpPZ5gvgKs2nwRWcrDnUjYLDAKBggqhkjOPQQDAgNIADBFAiEA + * 1yyMTRe66MhEXID9+uVub7woMkNYd0LhSHwKSPMUUTkCIFQGsfm1ecXOpeGOufAh + * v+A1QWZMuTWqYt+uh/YSRNDn + * -----END CERTIFICATE-----` + * const ecPublicKey = await jose.importX509(x509, algorithm) + * ``` + * + * @param pem X.509 certificate string + * @param alg JSON Web Algorithm identifier to be used with the imported key. + */ +export declare function importX509(x509: string, alg: string, options?: PEMImportOptions): Promise<KeyLike>; +/** + * Imports a PEM-encoded PKCS8 string as a runtime-specific private key representation (KeyObject or + * CryptoKey). See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210) to learn + * about key to algorithm requirements and mapping. Encrypted keys are not supported. + * + * @example Usage + * + * ```js + * const algorithm = 'ES256' + * const pkcs8 = `-----BEGIN PRIVATE KEY----- + * MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgiyvo0X+VQ0yIrOaN + * nlrnUclopnvuuMfoc8HHly3505OhRANCAAQWUcdZ8uTSAsFuwtNy4KtsKqgeqYxg + * l6kwL5D4N3pEGYGIDjV69Sw0zAt43480WqJv7HCL0mQnyqFmSrxj8jMa + * -----END PRIVATE KEY-----` + * const ecPrivateKey = await jose.importPKCS8(pkcs8, algorithm) + * ``` + * + * @param pem PEM-encoded PKCS8 string + * @param alg JSON Web Algorithm identifier to be used with the imported key. + */ +export declare function importPKCS8(pkcs8: string, alg: string, options?: PEMImportOptions): Promise<KeyLike>; +/** + * Imports a JWK to a runtime-specific key representation (KeyLike). Either JWK "alg" (Algorithm) + * Parameter must be present or the optional "alg" argument. When running on a runtime using [Web + * Cryptography API](https://www.w3.org/TR/WebCryptoAPI/) the jwk parameters "use", "key_ops", and + * "ext" are also used in the resulting `CryptoKey`. See [Algorithm Key + * Requirements](https://github.com/panva/jose/issues/210) to learn about key to algorithm + * requirements and mapping. + * + * @example Usage + * + * ```js + * const ecPublicKey = await jose.importJWK( + * { + * crv: 'P-256', + * kty: 'EC', + * x: 'ySK38C1jBdLwDsNWKzzBHqKYEE5Cgv-qjWvorUXk9fw', + * y: '_LeQBw07cf5t57Iavn4j-BqJsAD1dpoz8gokd3sBsOo', + * }, + * 'ES256', + * ) + * + * const rsaPublicKey = await jose.importJWK( + * { + * kty: 'RSA', + * e: 'AQAB', + * n: '12oBZRhCiZFJLcPg59LkZZ9mdhSMTKAQZYq32k_ti5SBB6jerkh-WzOMAO664r_qyLkqHUSp3u5SbXtseZEpN3XPWGKSxjsy-1JyEFTdLSYe6f9gfrmxkUF_7DTpq0gn6rntP05g2-wFW50YO7mosfdslfrTJYWHFhJALabAeYirYD7-9kqq9ebfFMF4sRRELbv9oi36As6Q9B3Qb5_C1rAzqfao_PCsf9EPsTZsVVVkA5qoIAr47lo1ipfiBPxUCCNSdvkmDTYgvvRm6ZoMjFbvOtgyts55fXKdMWv7I9HMD5HwE9uW839PWA514qhbcIsXEYSFMPMV6fnlsiZvQQ', + * }, + * 'PS256', + * ) + * ``` + * + * @param jwk JSON Web Key. + * @param alg JSON Web Algorithm identifier to be used with the imported key. Default is the "alg" + * property on the JWK. + * @param octAsKeyObject Forces a symmetric key to be imported to a KeyObject or CryptoKey. Default + * is true unless JWK "ext" (Extractable) is true. + */ +export declare function importJWK(jwk: JWK, alg?: string, octAsKeyObject?: boolean): Promise<KeyLike | Uint8Array>; diff --git a/webapp/node_modules/jose/dist/types/types.d.ts b/webapp/node_modules/jose/dist/types/types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..cc7f2c2dcffa140a70f5bfe27938c4d08bee3ac3 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/types.d.ts @@ -0,0 +1,595 @@ +/** + * KeyLike are runtime-specific classes representing asymmetric keys or symmetric secrets. These are + * instances of [CryptoKey](https://developer.mozilla.org/en-US/docs/Web/API/CryptoKey) and + * additionally [KeyObject](https://nodejs.org/api/crypto.html#class-keyobject) in Node.js runtime. + * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) + * instances are also accepted as symmetric secret representation only. + * + * [Key Import Functions](../modules/key_import.md#readme) can be used to import PEM, or JWK + * formatted asymmetric keys and certificates to these runtime-specific representations. + * + * In Node.js the [Buffer](https://nodejs.org/api/buffer.html#buffer) class is a subclass of + * Uint8Array and so Buffer can be provided for symmetric secrets as well. + * + * [KeyObject](https://nodejs.org/api/crypto.html#class-keyobject) is a representation of a + * key/secret available in the Node.js runtime. In addition to the import functions of this library + * you may use the runtime APIs + * [crypto.createPublicKey](https://nodejs.org/api/crypto.html#cryptocreatepublickeykey), + * [crypto.createPrivateKey](https://nodejs.org/api/crypto.html#cryptocreateprivatekeykey), and + * [crypto.createSecretKey](https://nodejs.org/api/crypto.html#cryptocreatesecretkeykey-encoding) to + * obtain a KeyObject from your existing key material. + * + * [CryptoKey](https://developer.mozilla.org/en-US/docs/Web/API/CryptoKey) is a representation of a + * key/secret available in the Browser and Deno runtimes. In addition to the import functions of + * this library you may use the + * [SubtleCrypto.importKey](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey) + * API to obtain a CryptoKey from your existing key material. + * + * @example Import a PEM-encoded SPKI Public Key + * + * ```js + * const algorithm = 'ES256' + * const spki = `-----BEGIN PUBLIC KEY----- + * MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFlHHWfLk0gLBbsLTcuCrbCqoHqmM + * YJepMC+Q+Dd6RBmBiA41evUsNMwLeN+PNFqib+xwi9JkJ8qhZkq8Y/IzGg== + * -----END PUBLIC KEY-----` + * const ecPublicKey = await jose.importSPKI(spki, algorithm) + * ``` + * + * @example Import a X.509 Certificate + * + * ```js + * const algorithm = 'ES256' + * const x509 = `-----BEGIN CERTIFICATE----- + * MIIBXjCCAQSgAwIBAgIGAXvykuMKMAoGCCqGSM49BAMCMDYxNDAyBgNVBAMMK3Np + * QXBNOXpBdk1VaXhXVWVGaGtjZXg1NjJRRzFyQUhXaV96UlFQTVpQaG8wHhcNMjEw + * OTE3MDcwNTE3WhcNMjIwNzE0MDcwNTE3WjA2MTQwMgYDVQQDDCtzaUFwTTl6QXZN + * VWl4V1VlRmhrY2V4NTYyUUcxckFIV2lfelJRUE1aUGhvMFkwEwYHKoZIzj0CAQYI + * KoZIzj0DAQcDQgAE8PbPvCv5D5xBFHEZlBp/q5OEUymq7RIgWIi7tkl9aGSpYE35 + * UH+kBKDnphJO3odpPZ5gvgKs2nwRWcrDnUjYLDAKBggqhkjOPQQDAgNIADBFAiEA + * 1yyMTRe66MhEXID9+uVub7woMkNYd0LhSHwKSPMUUTkCIFQGsfm1ecXOpeGOufAh + * v+A1QWZMuTWqYt+uh/YSRNDn + * -----END CERTIFICATE-----` + * const ecPublicKey = await jose.importX509(x509, algorithm) + * ``` + * + * @example Import a PEM-encoded PKCS8 Private Key + * + * ```js + * const algorithm = 'ES256' + * const pkcs8 = `-----BEGIN PRIVATE KEY----- + * MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgiyvo0X+VQ0yIrOaN + * nlrnUclopnvuuMfoc8HHly3505OhRANCAAQWUcdZ8uTSAsFuwtNy4KtsKqgeqYxg + * l6kwL5D4N3pEGYGIDjV69Sw0zAt43480WqJv7HCL0mQnyqFmSrxj8jMa + * -----END PRIVATE KEY-----` + * const ecPrivateKey = await jose.importPKCS8(pkcs8, algorithm) + * ``` + * + * @example Import a JSON Web Key (JWK) + * + * ```js + * const ecPublicKey = await jose.importJWK( + * { + * crv: 'P-256', + * kty: 'EC', + * x: 'ySK38C1jBdLwDsNWKzzBHqKYEE5Cgv-qjWvorUXk9fw', + * y: '_LeQBw07cf5t57Iavn4j-BqJsAD1dpoz8gokd3sBsOo', + * }, + * 'ES256', + * ) + * + * const rsaPublicKey = await jose.importJWK( + * { + * kty: 'RSA', + * e: 'AQAB', + * n: '12oBZRhCiZFJLcPg59LkZZ9mdhSMTKAQZYq32k_ti5SBB6jerkh-WzOMAO664r_qyLkqHUSp3u5SbXtseZEpN3XPWGKSxjsy-1JyEFTdLSYe6f9gfrmxkUF_7DTpq0gn6rntP05g2-wFW50YO7mosfdslfrTJYWHFhJALabAeYirYD7-9kqq9ebfFMF4sRRELbv9oi36As6Q9B3Qb5_C1rAzqfao_PCsf9EPsTZsVVVkA5qoIAr47lo1ipfiBPxUCCNSdvkmDTYgvvRm6ZoMjFbvOtgyts55fXKdMWv7I9HMD5HwE9uW839PWA514qhbcIsXEYSFMPMV6fnlsiZvQQ', + * }, + * 'PS256', + * ) + * ``` + */ +export type KeyLike = { type: string } + +/** + * JSON Web Key ([JWK](https://www.rfc-editor.org/rfc/rfc7517)). "RSA", "EC", "OKP", and "oct" key + * types are supported. + */ +export interface JWK { + /** JWK "alg" (Algorithm) Parameter. */ + alg?: string + crv?: string + d?: string + dp?: string + dq?: string + e?: string + /** JWK "ext" (Extractable) Parameter. */ + ext?: boolean + k?: string + /** JWK "key_ops" (Key Operations) Parameter. */ + key_ops?: string[] + /** JWK "kid" (Key ID) Parameter. */ + kid?: string + /** JWK "kty" (Key Type) Parameter. */ + kty?: string + n?: string + oth?: Array<{ + d?: string + r?: string + t?: string + }> + p?: string + q?: string + qi?: string + /** JWK "use" (Public Key Use) Parameter. */ + use?: string + x?: string + y?: string + /** JWK "x5c" (X.509 Certificate Chain) Parameter. */ + x5c?: string[] + /** JWK "x5t" (X.509 Certificate SHA-1 Thumbprint) Parameter. */ + x5t?: string + /** "x5t#S256" (X.509 Certificate SHA-256 Thumbprint) Parameter. */ + 'x5t#S256'?: string + /** JWK "x5u" (X.509 URL) Parameter. */ + x5u?: string + + [propName: string]: unknown +} + +/** + * Generic Interface for consuming operations dynamic key resolution. No token components have been + * verified at the time of this function call. + * + * If you cannot match a key suitable for the token, throw an error instead. + * + * @param protectedHeader JWE or JWS Protected Header. + * @param token The consumed JWE or JWS token. + */ +export interface GetKeyFunction<T, T2> { + (protectedHeader: T, token: T2): Promise<KeyLike | Uint8Array> | KeyLike | Uint8Array +} + +/** + * Flattened JWS definition for verify function inputs, allows payload as Uint8Array for detached + * signature validation. + */ +export interface FlattenedJWSInput { + /** + * The "header" member MUST be present and contain the value JWS Unprotected Header when the JWS + * Unprotected Header value is non- empty; otherwise, it MUST be absent. This value is represented + * as an unencoded JSON object, rather than as a string. These Header Parameter values are not + * integrity protected. + */ + header?: JWSHeaderParameters + + /** + * The "payload" member MUST be present and contain the value BASE64URL(JWS Payload). When RFC7797 + * "b64": false is used the value passed may also be a Uint8Array. + */ + payload: string | Uint8Array + + /** + * The "protected" member MUST be present and contain the value BASE64URL(UTF8(JWS Protected + * Header)) when the JWS Protected Header value is non-empty; otherwise, it MUST be absent. These + * Header Parameter values are integrity protected. + */ + protected?: string + + /** The "signature" member MUST be present and contain the value BASE64URL(JWS Signature). */ + signature: string +} + +/** + * General JWS definition for verify function inputs, allows payload as Uint8Array for detached + * signature validation. + */ +export interface GeneralJWSInput { + /** + * The "payload" member MUST be present and contain the value BASE64URL(JWS Payload). When RFC7797 + * "b64": false is used the value passed may also be a Uint8Array. + */ + payload: string | Uint8Array + + /** + * The "signatures" member value MUST be an array of JSON objects. Each object represents a + * signature or MAC over the JWS Payload and the JWS Protected Header. + */ + signatures: Omit<FlattenedJWSInput, 'payload'>[] +} + +/** + * Flattened JWS definition. Payload is returned as an empty string when JWS Unencoded Payload + * Option [RFC7797](https://www.rfc-editor.org/rfc/rfc7797) is used. + */ +export interface FlattenedJWS extends Partial<FlattenedJWSInput> { + payload: string + signature: string +} + +/** + * General JWS definition. Payload is returned as an empty string when JWS Unencoded Payload Option + * [RFC7797](https://www.rfc-editor.org/rfc/rfc7797) is used. + */ +export interface GeneralJWS { + payload: string + signatures: Omit<FlattenedJWSInput, 'payload'>[] +} + +export interface JoseHeaderParameters { + /** "kid" (Key ID) Header Parameter. */ + kid?: string + + /** "x5t" (X.509 Certificate SHA-1 Thumbprint) Header Parameter. */ + x5t?: string + + /** "x5c" (X.509 Certificate Chain) Header Parameter. */ + x5c?: string[] + + /** "x5u" (X.509 URL) Header Parameter. */ + x5u?: string + + /** "jku" (JWK Set URL) Header Parameter. */ + jku?: string + + /** "jwk" (JSON Web Key) Header Parameter. */ + jwk?: Pick<JWK, 'kty' | 'crv' | 'x' | 'y' | 'e' | 'n'> + + /** "typ" (Type) Header Parameter. */ + typ?: string + + /** "cty" (Content Type) Header Parameter. */ + cty?: string +} + +/** Recognized JWS Header Parameters, any other Header Members may also be present. */ +export interface JWSHeaderParameters extends JoseHeaderParameters { + /** JWS "alg" (Algorithm) Header Parameter. */ + alg?: string + + /** + * This JWS Extension Header Parameter modifies the JWS Payload representation and the JWS Signing + * Input computation as per [RFC7797](https://www.rfc-editor.org/rfc/rfc7797). + */ + b64?: boolean + + /** JWS "crit" (Critical) Header Parameter. */ + crit?: string[] + + /** Any other JWS Header member. */ + [propName: string]: unknown +} + +/** Recognized JWE Key Management-related Header Parameters. */ +export interface JWEKeyManagementHeaderParameters { + apu?: Uint8Array + apv?: Uint8Array + /** + * @deprecated You should not use this parameter. It is only really intended for test and vector + * validation purposes. + */ + p2c?: number + /** + * @deprecated You should not use this parameter. It is only really intended for test and vector + * validation purposes. + */ + p2s?: Uint8Array + /** + * @deprecated You should not use this parameter. It is only really intended for test and vector + * validation purposes. + */ + iv?: Uint8Array + /** + * @deprecated You should not use this parameter. It is only really intended for test and vector + * validation purposes. + */ + epk?: KeyLike +} + +/** Flattened JWE definition. */ +export interface FlattenedJWE { + /** + * The "aad" member MUST be present and contain the value BASE64URL(JWE AAD)) when the JWE AAD + * value is non-empty; otherwise, it MUST be absent. A JWE AAD value can be included to supply a + * base64url-encoded value to be integrity protected but not encrypted. + */ + aad?: string + + /** The "ciphertext" member MUST be present and contain the value BASE64URL(JWE Ciphertext). */ + ciphertext: string + + /** + * The "encrypted_key" member MUST be present and contain the value BASE64URL(JWE Encrypted Key) + * when the JWE Encrypted Key value is non-empty; otherwise, it MUST be absent. + */ + encrypted_key?: string + + /** + * The "header" member MUST be present and contain the value JWE Per- Recipient Unprotected Header + * when the JWE Per-Recipient Unprotected Header value is non-empty; otherwise, it MUST be absent. + * This value is represented as an unencoded JSON object, rather than as a string. These Header + * Parameter values are not integrity protected. + */ + header?: JWEHeaderParameters + + /** + * The "iv" member MUST be present and contain the value BASE64URL(JWE Initialization Vector) when + * the JWE Initialization Vector value is non-empty; otherwise, it MUST be absent. + */ + iv: string + + /** + * The "protected" member MUST be present and contain the value BASE64URL(UTF8(JWE Protected + * Header)) when the JWE Protected Header value is non-empty; otherwise, it MUST be absent. These + * Header Parameter values are integrity protected. + */ + protected?: string + + /** + * The "tag" member MUST be present and contain the value BASE64URL(JWE Authentication Tag) when + * the JWE Authentication Tag value is non-empty; otherwise, it MUST be absent. + */ + tag: string + + /** + * The "unprotected" member MUST be present and contain the value JWE Shared Unprotected Header + * when the JWE Shared Unprotected Header value is non-empty; otherwise, it MUST be absent. This + * value is represented as an unencoded JSON object, rather than as a string. These Header + * Parameter values are not integrity protected. + */ + unprotected?: JWEHeaderParameters +} + +export interface GeneralJWE extends Omit<FlattenedJWE, 'encrypted_key' | 'header'> { + recipients: Pick<FlattenedJWE, 'encrypted_key' | 'header'>[] +} + +/** Recognized JWE Header Parameters, any other Header members may also be present. */ +export interface JWEHeaderParameters extends JoseHeaderParameters { + /** JWE "alg" (Algorithm) Header Parameter. */ + alg?: string + + /** JWE "enc" (Encryption Algorithm) Header Parameter. */ + enc?: string + + /** JWE "crit" (Critical) Header Parameter. */ + crit?: string[] + + /** JWE "zip" (Compression Algorithm) Header Parameter. */ + zip?: string + + /** Any other JWE Header member. */ + [propName: string]: unknown +} + +/** Shared Interface with a "crit" property for all sign, verify, encrypt and decrypt operations. */ +export interface CritOption { + /** + * An object with keys representing recognized "crit" (Critical) Header Parameter names. The value + * for those is either `true` or `false`. `true` when the Header Parameter MUST be integrity + * protected, `false` when it's irrelevant. + * + * This makes the "Extension Header Parameter "${parameter}" is not recognized" error go away. + * + * Use this when a given JWS/JWT/JWE profile requires the use of proprietary non-registered "crit" + * (Critical) Header Parameters. This will only make sure the Header Parameter is syntactically + * correct when provided and that it is optionally integrity protected. It will not process the + * Header Parameter in any way or reject the operation if it is missing. You MUST still verify the + * Header Parameter was present and process it according to the profile's validation steps after + * the operation succeeds. + * + * The JWS extension Header Parameter `b64` is always recognized and processed properly. No other + * registered Header Parameters that need this kind of default built-in treatment are currently available. + */ + crit?: { + [propName: string]: boolean + } +} + +/** JWE Decryption options. */ +export interface DecryptOptions extends CritOption { + /** A list of accepted JWE "alg" (Algorithm) Header Parameter values. */ + keyManagementAlgorithms?: string[] + + /** + * A list of accepted JWE "enc" (Encryption Algorithm) Header Parameter values. By default all + * "enc" (Encryption Algorithm) values applicable for the used key/secret are allowed. + */ + contentEncryptionAlgorithms?: string[] + + /** + * In a browser runtime you have to provide an implementation for Inflate Raw when you expect JWEs + * with compressed plaintext. + */ + inflateRaw?: InflateFunction +} + +/** JWE Deflate option. */ +export interface DeflateOption { + /** + * In a browser runtime you have to provide an implementation for Deflate Raw when you will be + * producing JWEs with compressed plaintext. + */ + deflateRaw?: DeflateFunction +} + +/** JWE Encryption options. */ +export interface EncryptOptions extends CritOption, DeflateOption {} + +/** JWT Claims Set verification options. */ +export interface JWTClaimVerificationOptions { + /** Expected JWT "aud" (Audience) Claim value(s). */ + audience?: string | string[] + + /** + * Expected clock tolerance + * + * - In seconds when number (e.g. 5) + * - Parsed as seconds when a string (e.g. "5 seconds", "10 minutes", "2 hours"). + */ + clockTolerance?: string | number + + /** Expected JWT "iss" (Issuer) Claim value(s). */ + issuer?: string | string[] + + /** + * Maximum time elapsed (in seconds) from the JWT "iat" (Issued At) Claim value. + * + * - In seconds when number (e.g. 5) + * - Parsed as seconds when a string (e.g. "5 seconds", "10 minutes", "2 hours"). + */ + maxTokenAge?: string | number + + /** Expected JWT "sub" (Subject) Claim value. */ + subject?: string + + /** Expected JWT "typ" (Type) Header Parameter value. */ + typ?: string + + /** Date to use when comparing NumericDate claims, defaults to `new Date()`. */ + currentDate?: Date +} + +/** JWS Verification options. */ +export interface VerifyOptions extends CritOption { + /** + * A list of accepted JWS "alg" (Algorithm) Header Parameter values. By default all "alg" + * (Algorithm) values applicable for the used key/secret are allowed. Note: "none" is never accepted. + */ + algorithms?: string[] +} + +/** JWS Signing options. */ +export interface SignOptions extends CritOption {} + +/** Recognized JWT Claims Set members, any other members may also be present. */ +export interface JWTPayload { + /** JWT Issuer - [RFC7519#section-4.1.1](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.1). */ + iss?: string + + /** JWT Subject - [RFC7519#section-4.1.2](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.2). */ + sub?: string + + /** JWT Audience [RFC7519#section-4.1.3](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.3). */ + aud?: string | string[] + + /** JWT ID - [RFC7519#section-4.1.7](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.7). */ + jti?: string + + /** JWT Not Before - [RFC7519#section-4.1.5](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.5). */ + nbf?: number + + /** JWT Expiration Time - [RFC7519#section-4.1.4](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.4). */ + exp?: number + + /** JWT Issued At - [RFC7519#section-4.1.6](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.6). */ + iat?: number + + /** Any other JWT Claim Set member. */ + [propName: string]: unknown +} + +/** + * Deflate Raw implementation, e.g. promisified + * [zlib.deflateRaw](https://nodejs.org/api/zlib.html#zlibdeflaterawbuffer-options-callback). + */ +export interface DeflateFunction { + (input: Uint8Array): Promise<Uint8Array> +} + +/** + * Inflate Raw implementation, e.g. promisified + * [zlib.inflateRaw](https://nodejs.org/api/zlib.html#zlibinflaterawbuffer-options-callback). + */ +export interface InflateFunction { + (input: Uint8Array): Promise<Uint8Array> +} + +export interface FlattenedDecryptResult { + /** JWE AAD. */ + additionalAuthenticatedData?: Uint8Array + + /** Plaintext. */ + plaintext: Uint8Array + + /** JWE Protected Header. */ + protectedHeader?: JWEHeaderParameters + + /** JWE Shared Unprotected Header. */ + sharedUnprotectedHeader?: JWEHeaderParameters + + /** JWE Per-Recipient Unprotected Header. */ + unprotectedHeader?: JWEHeaderParameters +} + +export interface GeneralDecryptResult extends FlattenedDecryptResult {} + +export interface CompactDecryptResult { + /** Plaintext. */ + plaintext: Uint8Array + + /** JWE Protected Header. */ + protectedHeader: CompactJWEHeaderParameters +} + +export interface FlattenedVerifyResult { + /** JWS Payload. */ + payload: Uint8Array + + /** JWS Protected Header. */ + protectedHeader?: JWSHeaderParameters + + /** JWS Unprotected Header. */ + unprotectedHeader?: JWSHeaderParameters +} + +export interface GeneralVerifyResult extends FlattenedVerifyResult {} + +export interface CompactVerifyResult { + /** JWS Payload. */ + payload: Uint8Array + + /** JWS Protected Header. */ + protectedHeader: CompactJWSHeaderParameters +} + +export interface JWTVerifyResult { + /** JWT Claims Set. */ + payload: JWTPayload + + /** JWS Protected Header. */ + protectedHeader: JWTHeaderParameters +} + +export interface JWTDecryptResult { + /** JWT Claims Set. */ + payload: JWTPayload + + /** JWE Protected Header. */ + protectedHeader: CompactJWEHeaderParameters +} + +export interface ResolvedKey { + /** Key resolved from the key resolver function. */ + key: KeyLike | Uint8Array +} + +/** Recognized Compact JWS Header Parameters, any other Header Members may also be present. */ +export interface CompactJWSHeaderParameters extends JWSHeaderParameters { + alg: string +} + +/** Recognized Signed JWT Header Parameters, any other Header Members may also be present. */ +export interface JWTHeaderParameters extends CompactJWSHeaderParameters { + b64?: true +} + +/** Recognized Compact JWE Header Parameters, any other Header Members may also be present. */ +export interface CompactJWEHeaderParameters extends JWEHeaderParameters { + alg: string + enc: string +} + +/** JSON Web Key Set */ +export interface JSONWebKeySet { + keys: JWK[] +} diff --git a/webapp/node_modules/jose/dist/types/util/base64url.d.ts b/webapp/node_modules/jose/dist/types/util/base64url.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ec08361d2cdcb3f9ed3a7446c0ba2b28e4db63c0 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/util/base64url.d.ts @@ -0,0 +1,19 @@ +/** + * Utility function to encode a string or Uint8Array as a base64url string. + * + * @param input Value that will be base64url-encoded. + */ +interface Base64UrlEncode { + (input: Uint8Array | string): string; +} +/** + * Utility function to decode a base64url encoded string. + * + * @param input Value that will be base64url-decoded. + */ +interface Base64UrlDecode { + (input: Uint8Array | string): Uint8Array; +} +export declare const encode: Base64UrlEncode; +export declare const decode: Base64UrlDecode; +export {}; diff --git a/webapp/node_modules/jose/dist/types/util/decode_jwt.d.ts b/webapp/node_modules/jose/dist/types/util/decode_jwt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..151cf733d1691461aac99bf8819ad8c565476a0a --- /dev/null +++ b/webapp/node_modules/jose/dist/types/util/decode_jwt.d.ts @@ -0,0 +1,17 @@ +import type { JWTPayload } from '../types'; +/** + * Decodes a signed JSON Web Token payload. This does not validate the JWT Claims Set types or + * values. This does not validate the JWS Signature. For a proper Signed JWT Claims Set validation + * and JWS signature verification use `jose.jwtVerify()`. For an encrypted JWT Claims Set validation + * and JWE decryption use `jose.jwtDecrypt()`. + * + * @example Usage + * + * ```js + * const claims = jose.decodeJwt(token) + * console.log(claims) + * ``` + * + * @param jwt JWT token in compact JWS serialization. + */ +export declare function decodeJwt(jwt: string): JWTPayload; diff --git a/webapp/node_modules/jose/dist/types/util/decode_protected_header.d.ts b/webapp/node_modules/jose/dist/types/util/decode_protected_header.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d3f0e493236c0ac73e97097ef20eacae02523735 --- /dev/null +++ b/webapp/node_modules/jose/dist/types/util/decode_protected_header.d.ts @@ -0,0 +1,15 @@ +import type { JWSHeaderParameters, JWEHeaderParameters } from '../types'; +export declare type ProtectedHeaderParameters = JWSHeaderParameters & JWEHeaderParameters; +/** + * Decodes the Protected Header of a JWE/JWS/JWT token utilizing any JOSE serialization. + * + * @example Usage + * + * ```js + * const protectedHeader = jose.decodeProtectedHeader(token) + * console.log(protectedHeader) + * ``` + * + * @param token JWE/JWS/JWT token in any JOSE serialization. + */ +export declare function decodeProtectedHeader(token: string | object): ProtectedHeaderParameters; diff --git a/webapp/node_modules/jose/dist/types/util/errors.d.ts b/webapp/node_modules/jose/dist/types/util/errors.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a77cb729b0d7cb26897f1844f5915c621b6a7a2f --- /dev/null +++ b/webapp/node_modules/jose/dist/types/util/errors.d.ts @@ -0,0 +1,96 @@ +/** A generic Error subclass that all other specific JOSE Error subclasses inherit from. */ +export declare class JOSEError extends Error { + /** A unique error code for the particular error subclass. */ + static get code(): string; + /** A unique error code for the particular error subclass. */ + code: string; + constructor(message?: string); +} +/** An error subclass thrown when a JWT Claim Set member validation fails. */ +export declare class JWTClaimValidationFailed extends JOSEError { + static get code(): 'ERR_JWT_CLAIM_VALIDATION_FAILED'; + code: string; + /** The Claim for which the validation failed. */ + claim: string; + /** Reason code for the validation failure. */ + reason: string; + constructor(message: string, claim?: string, reason?: string); +} +/** An error subclass thrown when a JWT is expired. */ +export declare class JWTExpired extends JOSEError implements JWTClaimValidationFailed { + static get code(): 'ERR_JWT_EXPIRED'; + code: string; + /** The Claim for which the validation failed. */ + claim: string; + /** Reason code for the validation failure. */ + reason: string; + constructor(message: string, claim?: string, reason?: string); +} +/** An error subclass thrown when a JOSE Algorithm is not allowed per developer preference. */ +export declare class JOSEAlgNotAllowed extends JOSEError { + static get code(): 'ERR_JOSE_ALG_NOT_ALLOWED'; + code: string; +} +/** + * An error subclass thrown when a particular feature or algorithm is not supported by this + * implementation or JOSE in general. + */ +export declare class JOSENotSupported extends JOSEError { + static get code(): 'ERR_JOSE_NOT_SUPPORTED'; + code: string; +} +/** An error subclass thrown when a JWE ciphertext decryption fails. */ +export declare class JWEDecryptionFailed extends JOSEError { + static get code(): 'ERR_JWE_DECRYPTION_FAILED'; + code: string; + message: string; +} +/** An error subclass thrown when a JWE is invalid. */ +export declare class JWEInvalid extends JOSEError { + static get code(): 'ERR_JWE_INVALID'; + code: string; +} +/** An error subclass thrown when a JWS is invalid. */ +export declare class JWSInvalid extends JOSEError { + static get code(): 'ERR_JWS_INVALID'; + code: string; +} +/** An error subclass thrown when a JWT is invalid. */ +export declare class JWTInvalid extends JOSEError { + static get code(): 'ERR_JWT_INVALID'; + code: string; +} +/** An error subclass thrown when a JWK is invalid. */ +export declare class JWKInvalid extends JOSEError { + static get code(): 'ERR_JWK_INVALID'; + code: string; +} +/** An error subclass thrown when a JWKS is invalid. */ +export declare class JWKSInvalid extends JOSEError { + static get code(): 'ERR_JWKS_INVALID'; + code: string; +} +/** An error subclass thrown when no keys match from a JWKS. */ +export declare class JWKSNoMatchingKey extends JOSEError { + static get code(): 'ERR_JWKS_NO_MATCHING_KEY'; + code: string; + message: string; +} +/** An error subclass thrown when multiple keys match from a JWKS. */ +export declare class JWKSMultipleMatchingKeys extends JOSEError { + static get code(): 'ERR_JWKS_MULTIPLE_MATCHING_KEYS'; + code: string; + message: string; +} +/** Timeout was reached when retrieving the JWKS response. */ +export declare class JWKSTimeout extends JOSEError { + static get code(): 'ERR_JWKS_TIMEOUT'; + code: string; + message: string; +} +/** An error subclass thrown when JWS signature verification fails. */ +export declare class JWSSignatureVerificationFailed extends JOSEError { + static get code(): 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'; + code: string; + message: string; +} diff --git a/webapp/node_modules/jose/package.json b/webapp/node_modules/jose/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6f85f3786d28b8eabaa604e41ab488b777a22d1d --- /dev/null +++ b/webapp/node_modules/jose/package.json @@ -0,0 +1,115 @@ +{ + "_from": "jose", + "_id": "jose@4.9.0", + "_inBundle": false, + "_integrity": "sha512-RgaqEOZLkVO+ViN3KkN44XJt9g7+wMveUv59sVLaTxONcUPc8ZpfqOCeLphVBZyih2dgkvZ0Ap1CNcokvY7Uyw==", + "_location": "/jose", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "jose", + "name": "jose", + "escapedName": "jose", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/jose/-/jose-4.9.0.tgz", + "_shasum": "98ecaf81b13361d1931c0126e3f765549c782f92", + "_spec": "jose", + "_where": "/home/elisa/Documenti/Reti 2/GitLab/pissirsmarthome/webapp", + "author": { + "name": "Filip Skokan", + "email": "panva.ip@gmail.com" + }, + "browser": "./dist/browser/index.js", + "bugs": { + "url": "https://github.com/panva/jose/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK, JWKS with no dependencies using runtime's native crypto", + "exports": { + ".": { + "types": "./dist/types/index.d.ts", + "browser": "./dist/browser/index.js", + "worker": "./dist/browser/index.js", + "import": "./dist/node/esm/index.js", + "require": "./dist/node/cjs/index.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "dist/**/package.json", + "dist/**/*.js", + "dist/types/**/*.d.ts", + "!dist/**/*.bundle.js", + "!dist/**/*.umd.js", + "!dist/**/*.min.js", + "!dist/node/webcrypto/**/*", + "!dist/types/runtime/*", + "!dist/types/lib/*" + ], + "funding": { + "url": "https://github.com/sponsors/panva" + }, + "homepage": "https://github.com/panva/jose", + "keywords": [ + "browser", + "cloudflare", + "compact", + "decode", + "decrypt", + "deno", + "detached", + "ec", + "ecdsa", + "eddsa", + "electron", + "embedded", + "encrypt", + "flattened", + "general", + "isomorphic", + "jose", + "json web token", + "jsonwebtoken", + "jwa", + "jwe", + "jwk", + "jwks", + "jws", + "jwt", + "oct", + "okp", + "payload", + "pem", + "pkcs8", + "rsa", + "secp256k1", + "sign", + "signature", + "spki", + "universal", + "validate", + "verify", + "webcrypto", + "workers", + "x509" + ], + "license": "MIT", + "main": "./dist/node/cjs/index.js", + "name": "jose", + "repository": { + "type": "git", + "url": "git+https://github.com/panva/jose.git" + }, + "sideEffects": false, + "types": "./dist/types/index.d.ts", + "version": "4.9.0" +} diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 33d9dd903c16a70c0389132e575ef96e6d6220d8..fd11844b887515cffb34d5c999eca9f2ea0ea19a 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -7,6 +7,11 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, + "jose": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.9.0.tgz", + "integrity": "sha512-RgaqEOZLkVO+ViN3KkN44XJt9g7+wMveUv59sVLaTxONcUPc8ZpfqOCeLphVBZyih2dgkvZ0Ap1CNcokvY7Uyw==" + }, "js-sha256": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", diff --git a/webapp/public/css/domains.css b/webapp/public/css/domains.css new file mode 100644 index 0000000000000000000000000000000000000000..3f1b2b8fb212b40f329d76e832aa2bc9035cb64a --- /dev/null +++ b/webapp/public/css/domains.css @@ -0,0 +1,40 @@ +/* switch toggle */ +/* .switch-container { + position: relative; + left: 50%; + top: 50%; +} */ + +.toggle-button { + background: gray; + width: 50px; + height: 20px; + border-radius: 30px; + padding: 5px; + cursor: pointer; + transition: all 300ms ease-in-out; +} + +.toggle-button>.inner-circle { + background: white; + width: 20px; + height: 20px; + border-radius: 50%; + transition: all 300ms ease-in-out; +} + +.toggle-button.active { + background: #00ff22; +} + +.toggle-button.active>.inner-circle { + margin-left: 30px; +} + +.no-box-sizing { + box-sizing: content-box !important; +} + +.trash-padding { + margin-top: 50px; +} \ No newline at end of file diff --git a/webapp/public/domains.html b/webapp/public/domains.html new file mode 100644 index 0000000000000000000000000000000000000000..e642bebd4031c96070b58dd9d253894887a19563 --- /dev/null +++ b/webapp/public/domains.html @@ -0,0 +1,163 @@ +<!DOCTYPE html> +<html lang="it"> + +<head> + <meta charset="utf-8"> + <title id="title">SmartHome</title> + <link rel="icon" href="res/favicon.png"> + <!-- link all other useful scripts --> + + <!-- link bootstrap --> + <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" + integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> + <script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" + integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" + crossorigin="anonymous"></script> + + <!-- link fontawesome (for icons)--> + <script defer src="https://kit.fontawesome.com/a1635545b7.js" crossorigin="anonymous"></script> + <!-- link my scripts and styles --> + <link rel="stylesheet" href="css/domains.css" type="text/css"> + + <script defer src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.min.js"></script> + <script defer src="js/authentication/moment.min.js"></script> + <script defer src="js/authentication/script.js" type="module"></script> +</head> + +<body id="body-id"> + <h1>Pissir SmartHome</h1> + <!-- <a href="http://$DOMAIN/realms/$REALM/protocol/openid-connect/auth? + response_type=code& + code_challenge=$MY_CODE_CHALLENGE& + code_challenge_method=S256& + client_id=myclient& + redirect_uri=$MY_REDIRECT_URI& + scope=openid& + nonce=a81e1a84-8885-4702-b8d1-f6c5a0d1fc4d& + response_mode=fragment& + state=$MY_STATE" id="my-link">I'm the best at logging in :p</a> --> + +<div class="container-fluid table-responsive"> + <table class="table table-striped"> + <thead> + <tr class="more-margin-top"> + <th scope="col"> + <h2 class="d-flex justify-content-center">Dominio</h2> + </th> + <th scope="col"> + <h2 class="d-flex justify-content-center">Stato</h2> + </th> + <th scope="col"> + <h2 class="d-flex justify-content-center">Elimina</h2> + </th> + </tr> + </thead> + <tbody id="table-row-domains"> + <!-- row to add a new element --> + <!--<tr> + <th scope="row"> + <h4 class="d-flex justify-content-center mt-2">Casa</h4> + </th> + <td class="align-middle"> + <div class="switch-container no-box-sizing d-flex justify-content-center"> + <div class="toggle-button no-box-sizing"> + <div class="inner-circle no-box-sizing"></div> + </div> + </div> + </td> + <td class="d-flex justify-content-center"> + <i class="fa-solid fa-trash fa-2x py-2"> + </td> + </tr>--> + + + + <tr> + <th scope="row" class="d-flex justify-content-center"> + <!-- FIXME show fa-bounce if there's at no light [it moves the button :/] --> + <i class="fa-solid fa-circle-plus fa-2x" data-bs-toggle="modal" + data-bs-target="#domain-modal"></i> + </th> + <td> + <span class="d-flex justify-content-center">Crea un nuovo dominio</span> + </td> + <td> + </td> + </tr> + </tbody> + </table> +</div> +<button class="btn btn-primary position-absolute bottom-0 end-0" id="button-logout">Logout</button> +<!-- <a class="btn btn-primary position-absolute bottom-0 end-0" href="http://localhost:8080/realms/test00/protocol/openid-connect/logout?id_token_hint=$ID_TOKEN" role="button" id="id-logout">Link</a> --> + <div class="modal fade" id="domain-modal" tabindex="-1" aria-hidden="true"> + <div class="modal-dialog modal-dialog-centered"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title">Creazione di un nuovo dominio</h5> + <!-- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> --> + </div> + <form method="POST" id="new-domain-form"> + <div class="modal-body" id="modal-body-new-domain"> + + <label for="#nuovoDominio" class="form-label">Nome del dominio</label> + <input type="text" class="form-control" id="nuovoDominio" aria-describedby="#nuovoDominioHelp" placeholder="Nome del dominio"> + <div id="valid-domainName" class="valid-feedback"></div> + <div id="invalid-domainName" class="invalid-feedback"></div> + + <!--<div class="form-check"> + <input class="form-check-input" type="checkbox" value="" id="${nomeServizio}"/> + <label class="form-check-label" for="#${nomeServizio}"> + ${nomeServizio} + </label> + </div>--> + + <!--<fieldset class="is-invalid"> + <legend>Scegli uno o piu' servizi</legend> + <div class="form-check"> + <input class="form-check-input" type="checkbox" value="${nomeServizio}" id="${nomeServizio}"/> + <label class="form-check-label" for="#${nomeServizio}"> + ${nomeServizio} + </label> + </div> + <div class="form-check"> + <input class="form-check-input" type="checkbox" value="${nomeServizio}" id="${nomeServizio2}"/> + <label class="form-check-label" for="#${nomeServizio2}"> + ${nomeServizio} + </label> + </div> + <div class="form-check"> + <input class="form-check-input" type="checkbox" value="${nomeServizio}" id="${nomeServizio3}"/> + <label class="form-check-label" for="#${nomeServizio3}"> + ${nomeServizio} + </label> + </div> + <div class="form-check"> + <input class="form-check-input" type="checkbox" value="${nomeServizio}" id="${nomeServizio4}"/> + <label class="form-check-label" for="#${nomeServizio4}"> + ${nomeServizio} + </label> + </div> + </fieldset> --> + + <!--<div id="utente0"> + <label for="#nuovoUtente" class="form-label">Nuovo utente</label> + <input type="text" class="form-control" id="nuovoUtente" aria-describedby="#nuovoUtenteHelp"> + <div id="nuovoUtenteHelp" class="form-text">Inserisci il nome del nuovo utente.</div> + + <label for="#passwordUtente" class="form-label">Password utente</label> + <input type="text" class="form-control" id="passwordUtente" aria-describedby="#passwordUtenteHelp"> + <div id="passwordUtenteHelp" class="form-text">Inserisci la password del nuovo utente.</div> + </div>--> + + </div> + <div class="modal-footer justify-content-around"> + <button type="button" class="btn btn-dark" id="add-user-button">Aggiungi utente</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal" id="cancel-button">Cancella</button> + <button type="submit" class="btn btn-primary">Crea</button> + </div> + </form> + </div> + </div> + </div> +</body> +</html> \ No newline at end of file diff --git a/webapp/public/index.html b/webapp/public/index.html index 75c0daf5723ae5217e55eef3bbd380be91b06f2a..f401ba1d446a7987df0832d9713b541087fc802a 100644 --- a/webapp/public/index.html +++ b/webapp/public/index.html @@ -6,6 +6,8 @@ <title id="title">SmartHome</title> <link rel="icon" href="res/favicon.png"> <!-- link all other useful scripts --> + <!-- link crypto.js --> + <script defer src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.min.js"></script> <!-- <script defer src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.js" type="text/javascript"></script> --> <script defer src="js/mqtt/paho.javascript-1.0.3/paho-mqtt.js" type="text/javascript"></script> <script defer src="js/mqtt/mqtthat.js" type="module"></script> @@ -26,8 +28,8 @@ <link rel="stylesheet" href="css/style.css" type="text/css"> <link rel="stylesheet" href="css/buttons.css" type="text/css"> <!-- link ts/stript.ts which calls other scripts --> - <script defer src="js/authentication/keycloak.js"></script> - <script defer src="js/script.js" type="module"></script> + <script defer src="js/authentication/moment.min.js"></script> + <script defer src="js/scriptIndex.js" type="module"></script> </head> <body id="body-id"> @@ -44,16 +46,17 @@ <!-- alert-danger --> <!-- alert-success --> </div> + <button class="btn btn-primary position-absolute bottom-0 end-0" id="button-logout">Logout</button> <!-- container of the top buttons to change what is seen --> <div id="mainButtonContainer" class="d-flex flex-row justify-content-around"> - <button class="btn-12 btn btn-dark"> + <button class="btn-12 btn btn-dark" id="luci-btn"> <span>Luci</span> </button> - <button class="btn-12 btn btn-dark"> + <button class="btn-12 btn btn-dark" id="scenari-btn"> <span>Scenari</span> </button> - <button class="btn-12 btn btn-dark"> + <button class="btn-12 btn btn-dark" id="antifurto-btn"> <span>Antifurto</span> </button> </div> @@ -135,6 +138,49 @@ </button> </div> </div> + <div class="admin-panel invisible"> + <i class="fa-solid fa-user-cog fa-2x" data-bs-toggle="modal" data-bs-target="#admin-modal-scenari"></i> + </div> + <!-- create modal for admin --> + <div class="modal fade" id="admin-modal-scenari" tabindex="-1" role="dialog" aria-labelledby="admin-modal-title" + aria-hidden="true"> + <div class="modal-dialog" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="admin-modal-title">Modifica impostazioni di base</h5> + <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + </div> + <div class="modal-body"> + <div class="form-group"> + <label for="admin-in-apprendimento">Seleziona un ingresso per attivare l'apprendimento.</label> + <select class="form-select scelta-porta-in" name="porta-in" id="admin-in-apprendimento"> + <option value="unselected">Scegli la porta di apprendimento</option> + <!-- <option value="in0">in0</option> --> + <!-- js populates the options with the available sensors --> + </select> + <label for="admin-in-scenari">Seleziona un ingresso per attivare gli scenari.</label> + <select class="form-select scelta-porta-in" name="porta-in" id="admin-in-scenari"> + <option value="unselected">Scegli la porta degli scenari</option> + <!-- <option value="in0">in0</option> --> + <!-- js populates the options with the available sensors --> + </select> + <label for="admin-out-scenari">Seleziona un'uscita per mostrare l'attivazione degli scenari.</label> + <select class="form-select scelta-porta-out" name="porta-out" id="admin-out-scenari"> + <option value="unselected">Scegli la porta della luce</option> + <!-- <option value="in0">in0</option> --> + <!-- js populates the options with the available sensors --> + </select> + </div> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Annulla</button> + <button type="button" class="btn btn-primary" id="admin-login">Conferma scelte</button> + </div> + </div> + </div> + </div> </div> <!-- antifurto --> <div id="antifurtoContainer" class="invisible container-fluid"> diff --git a/webapp/public/js/authentication/app.js b/webapp/public/js/authentication/app.js new file mode 100644 index 0000000000000000000000000000000000000000..be5ece815171b80536b3c24ecadcb8347a56fa3d --- /dev/null +++ b/webapp/public/js/authentication/app.js @@ -0,0 +1,263 @@ +'use strict'; +import {createRowDomain} from '../templates/domains-template.js'; +import { getToken, logoutKeycloak } from './script.js'; +import {createNewUser, createNewService, createControlServices} from '../templates/create-new-domain-template.js'; +import RequestToDomain from './requests-to-domain.js'; + +class App { + constructor(myDomains) { + // this.myDomains = myDomains; + this.showAllDomains(myDomains); + this.fillModal(); + this.performLogout(); + } + + showAllDomains(domainsToShow) { + const addHere = document.getElementById('table-row-domains'); + for(const d of domainsToShow) { + this.showSingleDomain(d,addHere); + } + } + + showSingleDomain(domainObject,addHere){ + const container = addHere == null ? document.getElementById('table-row-domains') : addHere; + const tr = document.createElement('tr'); + tr.innerHTML = createRowDomain(domainObject); + const plusRow = container.lastElementChild; + container.insertBefore(tr, plusRow); + if(domainObject.admin) { + const toggle = tr.querySelector('.toggle-button'); + this.statoDomainToggle(domainObject, toggle); + const deleteDomain = tr.querySelector('.fa-trash'); + deleteDomain.addEventListener('click', async () => { + const resultDelete = await RequestToDomain.deleteDomain(domainObject); + if(resultDelete) { + container.removeChild(tr); + } + else { + throw new Error('Impossibile eliminare il dominio, provare piu\' tardi'); + } + }); + } + } + + + statoDomainToggle(domain, toggle) { + toggle.addEventListener('click', async (event) => { + event.preventDefault(); + const stop = toggle.classList.contains('active'); + const linkDomain = toggle.parentElement.parentElement.previousElementSibling.querySelector('a'); + if(stop) { + // toggle attiva. Se clicco richiedo che il dominio sia fermato + const resultStop = await RequestToDomain.stopDomain(domain); + if(resultStop) { + toggle.classList.remove('active'); + linkDomain.setAttribute('href','#'); + } + else { + throw new Error('Impossibile fermare il dominio, provare piu\' tardi'); + } + } + else { + const resultStart = await RequestToDomain.startDomain(domain); + if(resultStart) { + toggle.classList.add('active'); + linkDomain.setAttribute('href','/secured/home/'); + + } + else { + throw new Error('Impossibile far partire il dominio, provare piu\' tardi'); + } + } + }); + } + + + async fillModal() { + const allServices = await RequestToDomain.getAllServices(); + const div = document.createElement('div'); + div.id = "checkbox-div"; + div.classList.add('pt-4'); + div.classList.add('pb-2'); + for(const s of allServices) { + div.insertAdjacentHTML('beforeend', createNewService(s)); + } + + const modalBody = document.getElementById('modal-body-new-domain'); + modalBody.appendChild(div); + div.insertAdjacentHTML('afterend', createControlServices()); + modalBody.insertAdjacentHTML('beforeend', createNewUser()); + + let userNum = 1; + const addUserButton = document.getElementById('add-user-button'); + addUserButton.addEventListener('click', () => { + modalBody.insertAdjacentHTML('beforeend', createNewUser()); + userNum++; + }); + + + const form = document.getElementById('new-domain-form'); + const cancelForm = document.getElementById('cancel-button'); + form.addEventListener('submit', async (event) => { + event.preventDefault(); + + const domainNameInput = document.getElementById('nuovoDominio'); + const domainName = domainNameInput.value.trim(); + if(domainName === ''){ + domainNameInput.classList.add('is-invalid'); + domainNameInput.classList.remove('is-valid'); + document.getElementById('valid-domainName').innerHTML = ''; + document.getElementById('invalid-domainName').innerHTML = 'Inserire un nome'; + } + else { + domainNameInput.classList.add('is-valid'); + domainNameInput.classList.remove('is-invalid'); + document.getElementById('valid-domainName').innerHTML = 'Ok'; + document.getElementById('invalid-domainName').innerHTML = ''; + } + + const topicsArr = [ {role:"A", topic: `+/${domainName}/#`} ]; + const checkboxarr = document.querySelectorAll("input.form-check-input"); + const checks = []; // array contentente i nomi dei servizi che l'utente vuole nel dominio che sta creando + for(const c of checkboxarr){ + if(c.checked) { + checks.push(c.value); + topicsArr.push({role:"U", topic: `to/${domainName}/luci/${c.value}/#`}); + topicsArr.push({role:"U", topic: `from/${domainName}/luci/${c.value}/#`}); + topicsArr.push({role:"U", topic: `rpc/${domainName}/luci/${c.value}/#`}); + + // DA FARE: cancella i commenti qui sotto + // DOMANDA: E se il sottodominio fosse dove viene pubblicato il messaggio, ovvero CLOUD o BB ? PER ORA PENSIAMO DI NO. + // Noi finora stiamo usando sempre lo stesso sottodominio, giusto? SI Cioè usiamo sempre e solo 'luci'? SI + // Devo aggiungere anche : + /* + topicsArr.push({role:"U", topic: `to/${domainName}/cloud/${c.value}/#`}); + topicsArr.push({role:"U", topic: `from/${domainName}/cloud/${c.value}/#`}); + topicsArr.push({role:"U", topic: `rpc/${domainName}/cloud/${c.value}/#`}); + */ + // ? RISPOSTA: per ora pensiamo di NO. + + // to/all NON LO USIAMO (OGNI MICROSERVIZIO SOTTOSCRIVE to/all e INVIA DI CONSEGUENZA UNA RISPOSTA, MA NESSUNO LA LEGGE). + // Secondo me to/all non è da consentire nè a un amministratore nè a un utente normale! + } + } + const checkboxDiv = document.getElementById('checkbox-div'); + + if(checks.length === 0){ + checkboxDiv.classList.add('is-invalid'); + checkboxDiv.classList.remove('is-valid'); + document.getElementById('valid-services').innerHTML = ''; + document.getElementById('invalid-services').innerHTML = 'Selezionare almeno un servizio'; + } + else { + checkboxDiv.classList.add('is-valid'); + checkboxDiv.classList.remove('is-invalid'); + document.getElementById('valid-services').innerHTML = 'Ok'; + document.getElementById('invalid-services').innerHTML = ''; + } + + let i=1; + const utenti = []; + while(i<=userNum){ + const nomeInput = document.getElementById(`nuovoUtente${i}`); + const nome = nomeInput.value; + + if(nome==='') { + nomeInput.classList.add('is-invalid'); + nomeInput.classList.remove('is-valid'); + document.getElementById(`valid-userName${i}`).innerHTML = ''; + document.getElementById(`invalid-userName${i}`).innerHTML = 'Inserire il nome dell\'utente'; + } + else { + nomeInput.classList.add('is-valid'); + nomeInput.classList.remove('is-invalid'); + document.getElementById(`valid-userName${i}`).innerHTML = 'Ok'; + document.getElementById(`invalid-userName${i}`).innerHTML = ''; + } + + const passwordInput = document.getElementById(`passwordUtente${i}`); + const password = passwordInput.value; + if(password==='') { + passwordInput.classList.add('is-invalid'); + passwordInput.classList.remove('is-valid'); + document.getElementById(`valid-userPassword${i}`).innerHTML = ''; + document.getElementById(`invalid-userPassword${i}`).innerHTML = 'Inserire la password per l\'utente'; + } + else { + passwordInput.classList.add('is-valid'); + passwordInput.classList.remove('is-invalid'); + document.getElementById(`valid-userPassword${i}`).innerHTML = 'Ok'; + document.getElementById(`invalid-userPassword${i}`).innerHTML = ''; + } + + const ruoloInput = document.getElementById(`ruoloUtente${i}`); + const ruolo = ruoloInput.value; + if(ruolo ==='' || ruolo === 'unselected') { + ruoloInput.classList.add('is-invalid'); + ruoloInput.classList.remove('is-valid'); + document.getElementById(`valid-userRole${i}`).innerHTML = ''; + document.getElementById(`invalid-userRole${i}`).innerHTML = 'Specificare il ruolo dell\'utente'; + } + else { + ruoloInput.classList.add('is-valid'); + ruoloInput.classList.remove('is-invalid'); + document.getElementById(`valid-userRole${i}`).innerHTML = 'Ok'; + document.getElementById(`invalid-userRole${i}`).innerHTML = ''; + } + + utenti.push({ + user: nome, + role: ruolo, + passwd: password + }); + i++; + } + + const json = { + domain: domainName, + services: checks, + users: utenti, + topics: topicsArr + }; + cancelForm.click(); + + const resultInstall = await RequestToDomain.createNewDomain(json); + if(resultInstall) { + const domainCreated = { + nome: domainName, + stato: "off", + admin: true + }; + this.showSingleDomain(domainCreated); + } + else { + throw new Error('Impossibile creare il dominio, provare piu\' tardi'); + } + + }); + + + cancelForm.addEventListener('click', () => { + form.reset(); + for(let i=2; i<=userNum; i++){ + const divRow = document.getElementById(`utente${i}`); + const parent = divRow.parentNode; + parent.removeChild(divRow); + } + userNum = 1; + }); + } + + + + performLogout() { + const buttonLogout = document.getElementById('button-logout'); + buttonLogout.addEventListener('click', async (event) => { + event.preventDefault(); + logoutKeycloak(); + }); + } + +} + +export default App; \ No newline at end of file diff --git a/webapp/public/js/authentication/domain.js b/webapp/public/js/authentication/domain.js new file mode 100644 index 0000000000000000000000000000000000000000..0251f6e03aa3bccadb976ed1b28a1a102b6a39a3 --- /dev/null +++ b/webapp/public/js/authentication/domain.js @@ -0,0 +1,22 @@ +'use strict'; + +class Domain { + constructor(nome, stato, admin) { + this.nome = nome; // nome del dominio + this.stato = stato; // on/off + this.admin = admin; // true se l'utente attualmente loggato e' amministratore di questo dominio, false altrimenti + } + + /** + * Costruisce un oggetto Domain partendo dall'oggetto passato in input. + * @param {*} json oggetto dal quale si vuole creare un oggetto Domain. + * @returns l'oggetto Domain creato. + */ + static from(json) { + const p = Object.assign(new Domain(), json); + return p; + } + +} + +export default Domain; \ No newline at end of file diff --git a/webapp/public/js/authentication/keycloak.js b/webapp/public/js/authentication/keycloak.js deleted file mode 100644 index 0f81a74bed047ebcdda28b56181d4ccf84e76df2..0000000000000000000000000000000000000000 --- a/webapp/public/js/authentication/keycloak.js +++ /dev/null @@ -1,2408 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define('keycloak', factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Keycloak = factory()); -})(this, (function () { 'use strict'; - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function commonjsRequire(path) { - throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); - } - - var es6Promise_min = {exports: {}}; - - (function (module, exports) { - !function(t,e){module.exports=e();}(commonjsGlobal,function(){function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return "function"==typeof t}function n(t){W=t;}function r(t){z=t;}function o(){return function(){return process.nextTick(a)}}function i(){return "undefined"!=typeof U?function(){U(a);}:c()}function s(){var t=0,e=new H(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2;}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<N;t+=2){var e=Q[t],n=Q[t+1];e(n),Q[t]=void 0,Q[t+1]=void 0;}N=0;}function f(){try{var t=Function("return this")().require("vertx");return U=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(v);void 0===r[V]&&x(r);var o=n._state;if(o){var i=arguments[o-1];z(function(){return T(o,r,i,n._result)});}else j(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(v);return w(n,t),n}function v(){}function p(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t,e,n,r){try{t.call(e,n,r);}catch(o){return o}}function y(t,e,n){z(function(t){var r=!1,o=_(n,e,function(n){r||(r=!0,e!==n?w(t,n):A(t,n));},function(e){r||(r=!0,S(t,e));},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,S(t,o));},t);}function m(t,e){e._state===Z?A(t,e._result):e._state===$?S(t,e._result):j(e,void 0,function(e){return w(t,e)},function(e){return S(t,e)});}function b(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?m(t,n):void 0===r?A(t,n):e(r)?y(t,n,r):A(t,n);}function w(e,n){if(e===n)S(e,p());else if(t(n)){var r=void 0;try{r=n.then;}catch(o){return void S(e,o)}b(e,n,r);}else A(e,n);}function g(t){t._onerror&&t._onerror(t._result),E(t);}function A(t,e){t._state===X&&(t._result=e,t._state=Z,0!==t._subscribers.length&&z(E,t));}function S(t,e){t._state===X&&(t._state=$,t._result=e,z(g,t));}function j(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+Z]=n,o[i+$]=r,0===i&&t._state&&z(E,t);}function E(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?T(n,r,o,i):o(i);t._subscribers.length=0;}}function T(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=!0;if(i){try{s=r(o);}catch(a){c=!1,u=a;}if(n===s)return void S(n,d())}else s=o;n._state!==X||(i&&c?w(n,s):c===!1?S(n,u):t===Z?A(n,s):t===$&&S(n,s));}function M(t,e){try{e(function(e){w(t,e);},function(e){S(t,e);});}catch(n){S(t,n);}}function P(){return tt++}function x(t){t[V]=tt++,t._state=void 0,t._result=void 0,t._subscribers=[];}function C(){return new Error("Array Methods must be provided an Array")}function O(t){return new et(this,t).promise}function k(t){var e=this;return new e(L(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r);}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function F(t){var e=this,n=new e(v);return S(n,t),n}function Y(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function q(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function D(){var t=void 0;if("undefined"!=typeof commonjsGlobal)t=commonjsGlobal;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")();}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve());}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=nt;}var K=void 0;K=Array.isArray?Array.isArray:function(t){return "[object Array]"===Object.prototype.toString.call(t)};var L=K,N=0,U=void 0,W=void 0,z=function(t,e){Q[N]=t,Q[N+1]=e,N+=2,2===N&&(W?W(a):R());},B="undefined"!=typeof window?window:void 0,G=B||{},H=G.MutationObserver||G.WebKitMutationObserver,I="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),J="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Q=new Array(1e3),R=void 0;R=I?o():H?s():J?u():void 0===B&&"function"==typeof commonjsRequire?f():c();var V=Math.random().toString(36).substring(2),X=void 0,Z=1,$=2,tt=0,et=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(v),this.promise[V]||x(this.promise),L(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&A(this.promise,this._result))):S(this.promise,C());}return t.prototype._enumerate=function(t){for(var e=0;this._state===X&&e<t.length;e++)this._eachEntry(t[e],e);},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=void 0,i=void 0,s=!1;try{o=t.then;}catch(u){s=!0,i=u;}if(o===l&&t._state!==X)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===nt){var c=new n(v);s?S(c,i):b(c,t,o),this._willSettleAt(c,e);}else this._willSettleAt(new n(function(e){return e(t)}),e);}else this._willSettleAt(r(t),e);},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===X&&(this._remaining--,t===$?S(r,n):this._result[e]=n),0===this._remaining&&A(r,this._result);},t.prototype._willSettleAt=function(t,e){var n=this;j(t,void 0,function(t){return n._settledAt(Z,e,t)},function(t){return n._settledAt($,e,t)});},t}(),nt=function(){function t(e){this[V]=P(),this._result=this._state=void 0,this._subscribers=[],v!==e&&("function"!=typeof e&&Y(),this instanceof t?M(this,e):q());}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var n=this,r=n.constructor;return e(t)?n.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})}):n.then(t,t)},t}();return nt.prototype.then=l,nt.all=O,nt.race=k,nt.resolve=h,nt.reject=F,nt._setScheduler=n,nt._setAsap=r,nt._asap=z,nt.polyfill=D,nt.Promise=nt,nt}); - } (es6Promise_min)); - - var base64Js = {}; - - base64Js.byteLength = byteLength; - base64Js.toByteArray = toByteArray; - base64Js.fromByteArray = fromByteArray; - - var lookup = []; - var revLookup = []; - var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; - - var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i]; - revLookup[code.charCodeAt(i)] = i; - } - - // Support decoding URL-safe base64 strings, as Node.js does. - // See: https://en.wikipedia.org/wiki/Base64#URL_applications - revLookup['-'.charCodeAt(0)] = 62; - revLookup['_'.charCodeAt(0)] = 63; - - function getLens (b64) { - var len = b64.length; - - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('='); - if (validLen === -1) validLen = len; - - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4); - - return [validLen, placeHoldersLen] - } - - // base64 is 4/3 + up to two characters of the original data - function byteLength (b64) { - var lens = getLens(b64); - var validLen = lens[0]; - var placeHoldersLen = lens[1]; - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen - } - - function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen - } - - function toByteArray (b64) { - var tmp; - var lens = getLens(b64); - var validLen = lens[0]; - var placeHoldersLen = lens[1]; - - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)); - - var curByte = 0; - - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen; - - var i; - for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)]; - arr[curByte++] = (tmp >> 16) & 0xFF; - arr[curByte++] = (tmp >> 8) & 0xFF; - arr[curByte++] = tmp & 0xFF; - } - - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4); - arr[curByte++] = tmp & 0xFF; - } - - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2); - arr[curByte++] = (tmp >> 8) & 0xFF; - arr[curByte++] = tmp & 0xFF; - } - - return arr - } - - function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] - } - - function encodeChunk (uint8, start, end) { - var tmp; - var output = []; - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF); - output.push(tripletToBase64(tmp)); - } - return output.join('') - } - - function fromByteArray (uint8) { - var tmp; - var len = uint8.length; - var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes - var parts = []; - var maxChunkLength = 16383; // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1]; - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ); - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1]; - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ); - } - - return parts.join('') - } - - var sha256$1 = {exports: {}}; - - /** - * [js-sha256]{@link https://github.com/emn178/js-sha256} - * - * @version 0.9.0 - * @author Chen, Yi-Cyuan [emn178@gmail.com] - * @copyright Chen, Yi-Cyuan 2014-2017 - * @license MIT - */ - - (function (module) { - /*jslint bitwise: true */ - (function () { - - var ERROR = 'input is invalid type'; - var WINDOW = typeof window === 'object'; - var root = WINDOW ? window : {}; - if (root.JS_SHA256_NO_WINDOW) { - WINDOW = false; - } - var WEB_WORKER = !WINDOW && typeof self === 'object'; - var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node; - if (NODE_JS) { - root = commonjsGlobal; - } else if (WEB_WORKER) { - root = self; - } - var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && 'object' === 'object' && module.exports; - var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined'; - var HEX_CHARS = '0123456789abcdef'.split(''); - var EXTRA = [-2147483648, 8388608, 32768, 128]; - var SHIFT = [24, 16, 8, 0]; - var K = [ - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 - ]; - var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer']; - - var blocks = []; - - if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) { - Array.isArray = function (obj) { - return Object.prototype.toString.call(obj) === '[object Array]'; - }; - } - - if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) { - ArrayBuffer.isView = function (obj) { - return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer; - }; - } - - var createOutputMethod = function (outputType, is224) { - return function (message) { - return new Sha256(is224, true).update(message)[outputType](); - }; - }; - - var createMethod = function (is224) { - var method = createOutputMethod('hex', is224); - if (NODE_JS) { - method = nodeWrap(method, is224); - } - method.create = function () { - return new Sha256(is224); - }; - method.update = function (message) { - return method.create().update(message); - }; - for (var i = 0; i < OUTPUT_TYPES.length; ++i) { - var type = OUTPUT_TYPES[i]; - method[type] = createOutputMethod(type, is224); - } - return method; - }; - - var nodeWrap = function (method, is224) { - var crypto = eval("require('crypto')"); - var Buffer = eval("require('buffer').Buffer"); - var algorithm = is224 ? 'sha224' : 'sha256'; - var nodeMethod = function (message) { - if (typeof message === 'string') { - return crypto.createHash(algorithm).update(message, 'utf8').digest('hex'); - } else { - if (message === null || message === undefined) { - throw new Error(ERROR); - } else if (message.constructor === ArrayBuffer) { - message = new Uint8Array(message); - } - } - if (Array.isArray(message) || ArrayBuffer.isView(message) || - message.constructor === Buffer) { - return crypto.createHash(algorithm).update(new Buffer(message)).digest('hex'); - } else { - return method(message); - } - }; - return nodeMethod; - }; - - var createHmacOutputMethod = function (outputType, is224) { - return function (key, message) { - return new HmacSha256(key, is224, true).update(message)[outputType](); - }; - }; - - var createHmacMethod = function (is224) { - var method = createHmacOutputMethod('hex', is224); - method.create = function (key) { - return new HmacSha256(key, is224); - }; - method.update = function (key, message) { - return method.create(key).update(message); - }; - for (var i = 0; i < OUTPUT_TYPES.length; ++i) { - var type = OUTPUT_TYPES[i]; - method[type] = createHmacOutputMethod(type, is224); - } - return method; - }; - - function Sha256(is224, sharedMemory) { - if (sharedMemory) { - blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = - blocks[4] = blocks[5] = blocks[6] = blocks[7] = - blocks[8] = blocks[9] = blocks[10] = blocks[11] = - blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; - this.blocks = blocks; - } else { - this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - } - - if (is224) { - this.h0 = 0xc1059ed8; - this.h1 = 0x367cd507; - this.h2 = 0x3070dd17; - this.h3 = 0xf70e5939; - this.h4 = 0xffc00b31; - this.h5 = 0x68581511; - this.h6 = 0x64f98fa7; - this.h7 = 0xbefa4fa4; - } else { // 256 - this.h0 = 0x6a09e667; - this.h1 = 0xbb67ae85; - this.h2 = 0x3c6ef372; - this.h3 = 0xa54ff53a; - this.h4 = 0x510e527f; - this.h5 = 0x9b05688c; - this.h6 = 0x1f83d9ab; - this.h7 = 0x5be0cd19; - } - - this.block = this.start = this.bytes = this.hBytes = 0; - this.finalized = this.hashed = false; - this.first = true; - this.is224 = is224; - } - - Sha256.prototype.update = function (message) { - if (this.finalized) { - return; - } - var notString, type = typeof message; - if (type !== 'string') { - if (type === 'object') { - if (message === null) { - throw new Error(ERROR); - } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) { - message = new Uint8Array(message); - } else if (!Array.isArray(message)) { - if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) { - throw new Error(ERROR); - } - } - } else { - throw new Error(ERROR); - } - notString = true; - } - var code, index = 0, i, length = message.length, blocks = this.blocks; - - while (index < length) { - if (this.hashed) { - this.hashed = false; - blocks[0] = this.block; - blocks[16] = blocks[1] = blocks[2] = blocks[3] = - blocks[4] = blocks[5] = blocks[6] = blocks[7] = - blocks[8] = blocks[9] = blocks[10] = blocks[11] = - blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; - } - - if (notString) { - for (i = this.start; index < length && i < 64; ++index) { - blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; - } - } else { - for (i = this.start; index < length && i < 64; ++index) { - code = message.charCodeAt(index); - if (code < 0x80) { - blocks[i >> 2] |= code << SHIFT[i++ & 3]; - } else if (code < 0x800) { - blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; - } else if (code < 0xd800 || code >= 0xe000) { - blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; - } else { - code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); - blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; - blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; - } - } - } - - this.lastByteIndex = i; - this.bytes += i - this.start; - if (i >= 64) { - this.block = blocks[16]; - this.start = i - 64; - this.hash(); - this.hashed = true; - } else { - this.start = i; - } - } - if (this.bytes > 4294967295) { - this.hBytes += this.bytes / 4294967296 << 0; - this.bytes = this.bytes % 4294967296; - } - return this; - }; - - Sha256.prototype.finalize = function () { - if (this.finalized) { - return; - } - this.finalized = true; - var blocks = this.blocks, i = this.lastByteIndex; - blocks[16] = this.block; - blocks[i >> 2] |= EXTRA[i & 3]; - this.block = blocks[16]; - if (i >= 56) { - if (!this.hashed) { - this.hash(); - } - blocks[0] = this.block; - blocks[16] = blocks[1] = blocks[2] = blocks[3] = - blocks[4] = blocks[5] = blocks[6] = blocks[7] = - blocks[8] = blocks[9] = blocks[10] = blocks[11] = - blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; - } - blocks[14] = this.hBytes << 3 | this.bytes >>> 29; - blocks[15] = this.bytes << 3; - this.hash(); - }; - - Sha256.prototype.hash = function () { - var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, - h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc; - - for (j = 16; j < 64; ++j) { - // rightrotate - t1 = blocks[j - 15]; - s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3); - t1 = blocks[j - 2]; - s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10); - blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0; - } - - bc = b & c; - for (j = 0; j < 64; j += 4) { - if (this.first) { - if (this.is224) { - ab = 300032; - t1 = blocks[0] - 1413257819; - h = t1 - 150054599 << 0; - d = t1 + 24177077 << 0; - } else { - ab = 704751109; - t1 = blocks[0] - 210244248; - h = t1 - 1521486534 << 0; - d = t1 + 143694565 << 0; - } - this.first = false; - } else { - s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10)); - s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7)); - ab = a & b; - maj = ab ^ (a & c) ^ bc; - ch = (e & f) ^ (~e & g); - t1 = h + s1 + ch + K[j] + blocks[j]; - t2 = s0 + maj; - h = d + t1 << 0; - d = t1 + t2 << 0; - } - s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10)); - s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7)); - da = d & a; - maj = da ^ (d & b) ^ ab; - ch = (h & e) ^ (~h & f); - t1 = g + s1 + ch + K[j + 1] + blocks[j + 1]; - t2 = s0 + maj; - g = c + t1 << 0; - c = t1 + t2 << 0; - s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10)); - s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7)); - cd = c & d; - maj = cd ^ (c & a) ^ da; - ch = (g & h) ^ (~g & e); - t1 = f + s1 + ch + K[j + 2] + blocks[j + 2]; - t2 = s0 + maj; - f = b + t1 << 0; - b = t1 + t2 << 0; - s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10)); - s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7)); - bc = b & c; - maj = bc ^ (b & d) ^ cd; - ch = (f & g) ^ (~f & h); - t1 = e + s1 + ch + K[j + 3] + blocks[j + 3]; - t2 = s0 + maj; - e = a + t1 << 0; - a = t1 + t2 << 0; - } - - this.h0 = this.h0 + a << 0; - this.h1 = this.h1 + b << 0; - this.h2 = this.h2 + c << 0; - this.h3 = this.h3 + d << 0; - this.h4 = this.h4 + e << 0; - this.h5 = this.h5 + f << 0; - this.h6 = this.h6 + g << 0; - this.h7 = this.h7 + h << 0; - }; - - Sha256.prototype.hex = function () { - this.finalize(); - - var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, - h6 = this.h6, h7 = this.h7; - - var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] + - HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] + - HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] + - HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] + - HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] + - HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] + - HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] + - HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] + - HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] + - HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] + - HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] + - HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] + - HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] + - HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] + - HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] + - HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] + - HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] + - HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] + - HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] + - HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] + - HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] + - HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] + - HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] + - HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] + - HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] + - HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] + - HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] + - HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F]; - if (!this.is224) { - hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] + - HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] + - HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] + - HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F]; - } - return hex; - }; - - Sha256.prototype.toString = Sha256.prototype.hex; - - Sha256.prototype.digest = function () { - this.finalize(); - - var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, - h6 = this.h6, h7 = this.h7; - - var arr = [ - (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF, - (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF, - (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF, - (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF, - (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF, - (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF, - (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF - ]; - if (!this.is224) { - arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF); - } - return arr; - }; - - Sha256.prototype.array = Sha256.prototype.digest; - - Sha256.prototype.arrayBuffer = function () { - this.finalize(); - - var buffer = new ArrayBuffer(this.is224 ? 28 : 32); - var dataView = new DataView(buffer); - dataView.setUint32(0, this.h0); - dataView.setUint32(4, this.h1); - dataView.setUint32(8, this.h2); - dataView.setUint32(12, this.h3); - dataView.setUint32(16, this.h4); - dataView.setUint32(20, this.h5); - dataView.setUint32(24, this.h6); - if (!this.is224) { - dataView.setUint32(28, this.h7); - } - return buffer; - }; - - function HmacSha256(key, is224, sharedMemory) { - var i, type = typeof key; - if (type === 'string') { - var bytes = [], length = key.length, index = 0, code; - for (i = 0; i < length; ++i) { - code = key.charCodeAt(i); - if (code < 0x80) { - bytes[index++] = code; - } else if (code < 0x800) { - bytes[index++] = (0xc0 | (code >> 6)); - bytes[index++] = (0x80 | (code & 0x3f)); - } else if (code < 0xd800 || code >= 0xe000) { - bytes[index++] = (0xe0 | (code >> 12)); - bytes[index++] = (0x80 | ((code >> 6) & 0x3f)); - bytes[index++] = (0x80 | (code & 0x3f)); - } else { - code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff)); - bytes[index++] = (0xf0 | (code >> 18)); - bytes[index++] = (0x80 | ((code >> 12) & 0x3f)); - bytes[index++] = (0x80 | ((code >> 6) & 0x3f)); - bytes[index++] = (0x80 | (code & 0x3f)); - } - } - key = bytes; - } else { - if (type === 'object') { - if (key === null) { - throw new Error(ERROR); - } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) { - key = new Uint8Array(key); - } else if (!Array.isArray(key)) { - if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) { - throw new Error(ERROR); - } - } - } else { - throw new Error(ERROR); - } - } - - if (key.length > 64) { - key = (new Sha256(is224, true)).update(key).array(); - } - - var oKeyPad = [], iKeyPad = []; - for (i = 0; i < 64; ++i) { - var b = key[i] || 0; - oKeyPad[i] = 0x5c ^ b; - iKeyPad[i] = 0x36 ^ b; - } - - Sha256.call(this, is224, sharedMemory); - - this.update(iKeyPad); - this.oKeyPad = oKeyPad; - this.inner = true; - this.sharedMemory = sharedMemory; - } - HmacSha256.prototype = new Sha256(); - - HmacSha256.prototype.finalize = function () { - Sha256.prototype.finalize.call(this); - if (this.inner) { - this.inner = false; - var innerHash = this.array(); - Sha256.call(this, this.is224, this.sharedMemory); - this.update(this.oKeyPad); - this.update(innerHash); - Sha256.prototype.finalize.call(this); - } - }; - - var exports = createMethod(); - exports.sha256 = exports; - exports.sha224 = createMethod(true); - exports.sha256.hmac = createHmacMethod(); - exports.sha224.hmac = createHmacMethod(true); - - if (COMMON_JS) { - module.exports = exports; - } else { - root.sha256 = exports.sha256; - root.sha224 = exports.sha224; - } - })(); - } (sha256$1)); - - var sha256 = sha256$1.exports; - - if (typeof es6Promise_min.exports.Promise === 'undefined') { - throw Error('Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.'); - } - - var loggedPromiseDeprecation = false; - - function logPromiseDeprecation() { - if (!loggedPromiseDeprecation) { - loggedPromiseDeprecation = true; - console.warn('[KEYCLOAK] Usage of legacy style promise methods such as `.error()` and `.success()` has been deprecated and support will be removed in future versions. Use standard style promise methods such as `.then() and `.catch()` instead.'); - } - } - - function Keycloak (config) { - if (!(this instanceof Keycloak)) { - return new Keycloak(config); - } - - var kc = this; - var adapter; - var refreshQueue = []; - var callbackStorage; - - var loginIframe = { - enable: true, - callbackList: [], - interval: 5 - }; - - var scripts = document.getElementsByTagName('script'); - for (var i = 0; i < scripts.length; i++) { - if ((scripts[i].src.indexOf('keycloak.js') !== -1 || scripts[i].src.indexOf('keycloak.min.js') !== -1) && scripts[i].src.indexOf('version=') !== -1) { - kc.iframeVersion = scripts[i].src.substring(scripts[i].src.indexOf('version=') + 8).split('&')[0]; - } - } - - var useNonce = true; - var logInfo = createLogger(console.info); - var logWarn = createLogger(console.warn); - - kc.init = function (initOptions) { - kc.authenticated = false; - - callbackStorage = createCallbackStorage(); - var adapters = ['default', 'cordova', 'cordova-native']; - - if (initOptions && adapters.indexOf(initOptions.adapter) > -1) { - adapter = loadAdapter(initOptions.adapter); - } else if (initOptions && typeof initOptions.adapter === "object") { - adapter = initOptions.adapter; - } else { - if (window.Cordova || window.cordova) { - adapter = loadAdapter('cordova'); - } else { - adapter = loadAdapter(); - } - } - - if (initOptions) { - if (typeof initOptions.useNonce !== 'undefined') { - useNonce = initOptions.useNonce; - } - - if (typeof initOptions.checkLoginIframe !== 'undefined') { - loginIframe.enable = initOptions.checkLoginIframe; - } - - if (initOptions.checkLoginIframeInterval) { - loginIframe.interval = initOptions.checkLoginIframeInterval; - } - - if (initOptions.onLoad === 'login-required') { - kc.loginRequired = true; - } - - if (initOptions.responseMode) { - if (initOptions.responseMode === 'query' || initOptions.responseMode === 'fragment') { - kc.responseMode = initOptions.responseMode; - } else { - throw 'Invalid value for responseMode'; - } - } - - if (initOptions.flow) { - switch (initOptions.flow) { - case 'standard': - kc.responseType = 'code'; - break; - case 'implicit': - kc.responseType = 'id_token token'; - break; - case 'hybrid': - kc.responseType = 'code id_token token'; - break; - default: - throw 'Invalid value for flow'; - } - kc.flow = initOptions.flow; - } - - if (initOptions.timeSkew != null) { - kc.timeSkew = initOptions.timeSkew; - } - - if(initOptions.redirectUri) { - kc.redirectUri = initOptions.redirectUri; - } - - if (initOptions.silentCheckSsoRedirectUri) { - kc.silentCheckSsoRedirectUri = initOptions.silentCheckSsoRedirectUri; - } - - if (typeof initOptions.silentCheckSsoFallback === 'boolean') { - kc.silentCheckSsoFallback = initOptions.silentCheckSsoFallback; - } else { - kc.silentCheckSsoFallback = true; - } - - if (initOptions.pkceMethod) { - if (initOptions.pkceMethod !== "S256") { - throw 'Invalid value for pkceMethod'; - } - kc.pkceMethod = initOptions.pkceMethod; - } - - if (typeof initOptions.enableLogging === 'boolean') { - kc.enableLogging = initOptions.enableLogging; - } else { - kc.enableLogging = false; - } - - if (typeof initOptions.scope === 'string') { - kc.scope = initOptions.scope; - } - - if (typeof initOptions.messageReceiveTimeout === 'number' && initOptions.messageReceiveTimeout > 0) { - kc.messageReceiveTimeout = initOptions.messageReceiveTimeout; - } else { - kc.messageReceiveTimeout = 10000; - } - } - - if (!kc.responseMode) { - kc.responseMode = 'fragment'; - } - if (!kc.responseType) { - kc.responseType = 'code'; - kc.flow = 'standard'; - } - - var promise = createPromise(); - - var initPromise = createPromise(); - initPromise.promise.then(function() { - kc.onReady && kc.onReady(kc.authenticated); - promise.setSuccess(kc.authenticated); - }).catch(function(error) { - promise.setError(error); - }); - - var configPromise = loadConfig(); - - function onLoad() { - var doLogin = function(prompt) { - if (!prompt) { - options.prompt = 'none'; - } - - kc.login(options).then(function () { - initPromise.setSuccess(); - }).catch(function (error) { - initPromise.setError(error); - }); - }; - - var checkSsoSilently = function() { - var ifrm = document.createElement("iframe"); - var src = kc.createLoginUrl({prompt: 'none', redirectUri: kc.silentCheckSsoRedirectUri}); - ifrm.setAttribute("src", src); - ifrm.setAttribute("title", "keycloak-silent-check-sso"); - ifrm.style.display = "none"; - document.body.appendChild(ifrm); - - var messageCallback = function(event) { - if (event.origin !== window.location.origin || ifrm.contentWindow !== event.source) { - return; - } - - var oauth = parseCallback(event.data); - processCallback(oauth, initPromise); - - document.body.removeChild(ifrm); - window.removeEventListener("message", messageCallback); - }; - - window.addEventListener("message", messageCallback); - }; - - var options = {}; - switch (initOptions.onLoad) { - case 'check-sso': - if (loginIframe.enable) { - setupCheckLoginIframe().then(function() { - checkLoginIframe().then(function (unchanged) { - if (!unchanged) { - kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false); - } else { - initPromise.setSuccess(); - } - }).catch(function (error) { - initPromise.setError(error); - }); - }); - } else { - kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false); - } - break; - case 'login-required': - doLogin(true); - break; - default: - throw 'Invalid value for onLoad'; - } - } - - function processInit() { - var callback = parseCallback(window.location.href); - - if (callback) { - window.history.replaceState(window.history.state, null, callback.newUrl); - } - - if (callback && callback.valid) { - return setupCheckLoginIframe().then(function() { - processCallback(callback, initPromise); - }).catch(function (error) { - initPromise.setError(error); - }); - } else if (initOptions) { - if (initOptions.token && initOptions.refreshToken) { - setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken); - - if (loginIframe.enable) { - setupCheckLoginIframe().then(function() { - checkLoginIframe().then(function (unchanged) { - if (unchanged) { - kc.onAuthSuccess && kc.onAuthSuccess(); - initPromise.setSuccess(); - scheduleCheckIframe(); - } else { - initPromise.setSuccess(); - } - }).catch(function (error) { - initPromise.setError(error); - }); - }); - } else { - kc.updateToken(-1).then(function() { - kc.onAuthSuccess && kc.onAuthSuccess(); - initPromise.setSuccess(); - }).catch(function(error) { - kc.onAuthError && kc.onAuthError(); - if (initOptions.onLoad) { - onLoad(); - } else { - initPromise.setError(error); - } - }); - } - } else if (initOptions.onLoad) { - onLoad(); - } else { - initPromise.setSuccess(); - } - } else { - initPromise.setSuccess(); - } - } - - function domReady() { - var promise = createPromise(); - - var checkReadyState = function () { - if (document.readyState === 'interactive' || document.readyState === 'complete') { - document.removeEventListener('readystatechange', checkReadyState); - promise.setSuccess(); - } - }; - document.addEventListener('readystatechange', checkReadyState); - - checkReadyState(); // just in case the event was already fired and we missed it (in case the init is done later than at the load time, i.e. it's done from code) - - return promise.promise; - } - - configPromise.then(function () { - domReady() - .then(check3pCookiesSupported) - .then(processInit) - .catch(function (error) { - promise.setError(error); - }); - }); - configPromise.catch(function (error) { - promise.setError(error); - }); - - return promise.promise; - }; - - kc.login = function (options) { - return adapter.login(options); - }; - - function generateRandomData(len) { - // use web crypto APIs if possible - var array = null; - var crypto = window.crypto || window.msCrypto; - if (crypto && crypto.getRandomValues && window.Uint8Array) { - array = new Uint8Array(len); - crypto.getRandomValues(array); - return array; - } - - // fallback to Math random - array = new Array(len); - for (var j = 0; j < array.length; j++) { - array[j] = Math.floor(256 * Math.random()); - } - return array; - } - - function generateCodeVerifier(len) { - return generateRandomString(len, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'); - } - - function generateRandomString(len, alphabet){ - var randomData = generateRandomData(len); - var chars = new Array(len); - for (var i = 0; i < len; i++) { - chars[i] = alphabet.charCodeAt(randomData[i] % alphabet.length); - } - return String.fromCharCode.apply(null, chars); - } - - function generatePkceChallenge(pkceMethod, codeVerifier) { - switch (pkceMethod) { - // The use of the "plain" method is considered insecure and therefore not supported. - case "S256": - // hash codeVerifier, then encode as url-safe base64 without padding - var hashBytes = new Uint8Array(sha256.arrayBuffer(codeVerifier)); - var encodedHash = base64Js.fromByteArray(hashBytes) - .replace(/\+/g, '-') - .replace(/\//g, '_') - .replace(/\=/g, ''); - return encodedHash; - default: - throw 'Invalid value for pkceMethod'; - } - } - - function buildClaimsParameter(requestedAcr){ - var claims = { - id_token: { - acr: requestedAcr - } - }; - return JSON.stringify(claims); - } - - kc.createLoginUrl = function(options) { - var state = createUUID(); - var nonce = createUUID(); - - var redirectUri = adapter.redirectUri(options); - - var callbackState = { - state: state, - nonce: nonce, - redirectUri: encodeURIComponent(redirectUri) - }; - - if (options && options.prompt) { - callbackState.prompt = options.prompt; - } - - var baseUrl; - if (options && options.action == 'register') { - baseUrl = kc.endpoints.register(); - } else { - baseUrl = kc.endpoints.authorize(); - } - - var scope = options && options.scope || kc.scope; - if (!scope) { - // if scope is not set, default to "openid" - scope = "openid"; - } else if (scope.indexOf("openid") === -1) { - // if openid scope is missing, prefix the given scopes with it - scope = "openid " + scope; - } - - var url = baseUrl - + '?client_id=' + encodeURIComponent(kc.clientId) - + '&redirect_uri=' + encodeURIComponent(redirectUri) - + '&state=' + encodeURIComponent(state) - + '&response_mode=' + encodeURIComponent(kc.responseMode) - + '&response_type=' + encodeURIComponent(kc.responseType) - + '&scope=' + encodeURIComponent(scope); - if (useNonce) { - url = url + '&nonce=' + encodeURIComponent(nonce); - } - - if (options && options.prompt) { - url += '&prompt=' + encodeURIComponent(options.prompt); - } - - if (options && options.maxAge) { - url += '&max_age=' + encodeURIComponent(options.maxAge); - } - - if (options && options.loginHint) { - url += '&login_hint=' + encodeURIComponent(options.loginHint); - } - - if (options && options.idpHint) { - url += '&kc_idp_hint=' + encodeURIComponent(options.idpHint); - } - - if (options && options.action && options.action != 'register') { - url += '&kc_action=' + encodeURIComponent(options.action); - } - - if (options && options.locale) { - url += '&ui_locales=' + encodeURIComponent(options.locale); - } - - if (options && options.acr) { - var claimsParameter = buildClaimsParameter(options.acr); - url += '&claims=' + encodeURIComponent(claimsParameter); - } - - if (kc.pkceMethod) { - var codeVerifier = generateCodeVerifier(96); - callbackState.pkceCodeVerifier = codeVerifier; - var pkceChallenge = generatePkceChallenge(kc.pkceMethod, codeVerifier); - url += '&code_challenge=' + pkceChallenge; - url += '&code_challenge_method=' + kc.pkceMethod; - } - - callbackStorage.add(callbackState); - - return url; - }; - - kc.logout = function(options) { - return adapter.logout(options); - }; - - kc.createLogoutUrl = function(options) { - var url = kc.endpoints.logout() - + '?client_id=' + encodeURIComponent(kc.clientId) - + '&post_logout_redirect_uri=' + encodeURIComponent(adapter.redirectUri(options, false)); - - if (kc.idToken) { - url += '&id_token_hint=' + encodeURIComponent(kc.idToken); - } - - return url; - }; - - kc.register = function (options) { - return adapter.register(options); - }; - - kc.createRegisterUrl = function(options) { - if (!options) { - options = {}; - } - options.action = 'register'; - return kc.createLoginUrl(options); - }; - - kc.createAccountUrl = function(options) { - var realm = getRealmUrl(); - var url = undefined; - if (typeof realm !== 'undefined') { - url = realm - + '/account' - + '?referrer=' + encodeURIComponent(kc.clientId) - + '&referrer_uri=' + encodeURIComponent(adapter.redirectUri(options)); - } - return url; - }; - - kc.accountManagement = function() { - return adapter.accountManagement(); - }; - - kc.hasRealmRole = function (role) { - var access = kc.realmAccess; - return !!access && access.roles.indexOf(role) >= 0; - }; - - kc.hasResourceRole = function(role, resource) { - if (!kc.resourceAccess) { - return false; - } - - var access = kc.resourceAccess[resource || kc.clientId]; - return !!access && access.roles.indexOf(role) >= 0; - }; - - kc.loadUserProfile = function() { - var url = getRealmUrl() + '/account'; - var req = new XMLHttpRequest(); - req.open('GET', url, true); - req.setRequestHeader('Accept', 'application/json'); - req.setRequestHeader('Authorization', 'bearer ' + kc.token); - - var promise = createPromise(); - - req.onreadystatechange = function () { - if (req.readyState == 4) { - if (req.status == 200) { - kc.profile = JSON.parse(req.responseText); - promise.setSuccess(kc.profile); - } else { - promise.setError(); - } - } - }; - - req.send(); - - return promise.promise; - }; - - kc.loadUserInfo = function() { - var url = kc.endpoints.userinfo(); - var req = new XMLHttpRequest(); - req.open('GET', url, true); - req.setRequestHeader('Accept', 'application/json'); - req.setRequestHeader('Authorization', 'bearer ' + kc.token); - - var promise = createPromise(); - - req.onreadystatechange = function () { - if (req.readyState == 4) { - if (req.status == 200) { - kc.userInfo = JSON.parse(req.responseText); - promise.setSuccess(kc.userInfo); - } else { - promise.setError(); - } - } - }; - - req.send(); - - return promise.promise; - }; - - kc.isTokenExpired = function(minValidity) { - if (!kc.tokenParsed || (!kc.refreshToken && kc.flow != 'implicit' )) { - throw 'Not authenticated'; - } - - if (kc.timeSkew == null) { - logInfo('[KEYCLOAK] Unable to determine if token is expired as timeskew is not set'); - return true; - } - - var expiresIn = kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + kc.timeSkew; - if (minValidity) { - if (isNaN(minValidity)) { - throw 'Invalid minValidity'; - } - expiresIn -= minValidity; - } - return expiresIn < 0; - }; - - kc.updateToken = function(minValidity) { - var promise = createPromise(); - - if (!kc.refreshToken) { - promise.setError(); - return promise.promise; - } - - minValidity = minValidity || 5; - - var exec = function() { - var refreshToken = false; - if (minValidity == -1) { - refreshToken = true; - logInfo('[KEYCLOAK] Refreshing token: forced refresh'); - } else if (!kc.tokenParsed || kc.isTokenExpired(minValidity)) { - refreshToken = true; - logInfo('[KEYCLOAK] Refreshing token: token expired'); - } - - if (!refreshToken) { - promise.setSuccess(false); - } else { - var params = 'grant_type=refresh_token&' + 'refresh_token=' + kc.refreshToken; - var url = kc.endpoints.token(); - - refreshQueue.push(promise); - - if (refreshQueue.length == 1) { - var req = new XMLHttpRequest(); - req.open('POST', url, true); - req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); - req.withCredentials = true; - - params += '&client_id=' + encodeURIComponent(kc.clientId); - - var timeLocal = new Date().getTime(); - - req.onreadystatechange = function () { - if (req.readyState == 4) { - if (req.status == 200) { - logInfo('[KEYCLOAK] Token refreshed'); - - timeLocal = (timeLocal + new Date().getTime()) / 2; - - var tokenResponse = JSON.parse(req.responseText); - - setToken(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], timeLocal); - - kc.onAuthRefreshSuccess && kc.onAuthRefreshSuccess(); - for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) { - p.setSuccess(true); - } - } else { - logWarn('[KEYCLOAK] Failed to refresh token'); - - if (req.status == 400) { - kc.clearToken(); - } - - kc.onAuthRefreshError && kc.onAuthRefreshError(); - for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) { - p.setError(true); - } - } - } - }; - - req.send(params); - } - } - }; - - if (loginIframe.enable) { - var iframePromise = checkLoginIframe(); - iframePromise.then(function() { - exec(); - }).catch(function(error) { - promise.setError(error); - }); - } else { - exec(); - } - - return promise.promise; - }; - - kc.clearToken = function() { - if (kc.token) { - setToken(null, null, null); - kc.onAuthLogout && kc.onAuthLogout(); - if (kc.loginRequired) { - kc.login(); - } - } - }; - - function getRealmUrl() { - if (typeof kc.authServerUrl !== 'undefined') { - if (kc.authServerUrl.charAt(kc.authServerUrl.length - 1) == '/') { - return kc.authServerUrl + 'realms/' + encodeURIComponent(kc.realm); - } else { - return kc.authServerUrl + '/realms/' + encodeURIComponent(kc.realm); - } - } else { - return undefined; - } - } - - function getOrigin() { - if (!window.location.origin) { - return window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: ''); - } else { - return window.location.origin; - } - } - - function processCallback(oauth, promise) { - var code = oauth.code; - var error = oauth.error; - var prompt = oauth.prompt; - - var timeLocal = new Date().getTime(); - - if (oauth['kc_action_status']) { - kc.onActionUpdate && kc.onActionUpdate(oauth['kc_action_status']); - } - - if (error) { - if (prompt != 'none') { - var errorData = { error: error, error_description: oauth.error_description }; - kc.onAuthError && kc.onAuthError(errorData); - promise && promise.setError(errorData); - } else { - promise && promise.setSuccess(); - } - return; - } else if ((kc.flow != 'standard') && (oauth.access_token || oauth.id_token)) { - authSuccess(oauth.access_token, null, oauth.id_token, true); - } - - if ((kc.flow != 'implicit') && code) { - var params = 'code=' + code + '&grant_type=authorization_code'; - var url = kc.endpoints.token(); - - var req = new XMLHttpRequest(); - req.open('POST', url, true); - req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); - - params += '&client_id=' + encodeURIComponent(kc.clientId); - params += '&redirect_uri=' + oauth.redirectUri; - - if (oauth.pkceCodeVerifier) { - params += '&code_verifier=' + oauth.pkceCodeVerifier; - } - - req.withCredentials = true; - - req.onreadystatechange = function() { - if (req.readyState == 4) { - if (req.status == 200) { - - var tokenResponse = JSON.parse(req.responseText); - authSuccess(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], kc.flow === 'standard'); - scheduleCheckIframe(); - } else { - kc.onAuthError && kc.onAuthError(); - promise && promise.setError(); - } - } - }; - - req.send(params); - } - - function authSuccess(accessToken, refreshToken, idToken, fulfillPromise) { - timeLocal = (timeLocal + new Date().getTime()) / 2; - - setToken(accessToken, refreshToken, idToken, timeLocal); - - if (useNonce && ((kc.tokenParsed && kc.tokenParsed.nonce != oauth.storedNonce) || - (kc.refreshTokenParsed && kc.refreshTokenParsed.nonce != oauth.storedNonce) || - (kc.idTokenParsed && kc.idTokenParsed.nonce != oauth.storedNonce))) { - - logInfo('[KEYCLOAK] Invalid nonce, clearing token'); - kc.clearToken(); - promise && promise.setError(); - } else { - if (fulfillPromise) { - kc.onAuthSuccess && kc.onAuthSuccess(); - promise && promise.setSuccess(); - } - } - } - - } - - function loadConfig(url) { - var promise = createPromise(); - var configUrl; - - if (!config) { - configUrl = 'keycloak.json'; - } else if (typeof config === 'string') { - configUrl = config; - } - - function setupOidcEndoints(oidcConfiguration) { - if (! oidcConfiguration) { - kc.endpoints = { - authorize: function() { - return getRealmUrl() + '/protocol/openid-connect/auth'; - }, - token: function() { - return getRealmUrl() + '/protocol/openid-connect/token'; - }, - logout: function() { - return getRealmUrl() + '/protocol/openid-connect/logout'; - }, - checkSessionIframe: function() { - var src = getRealmUrl() + '/protocol/openid-connect/login-status-iframe.html'; - if (kc.iframeVersion) { - src = src + '?version=' + kc.iframeVersion; - } - return src; - }, - thirdPartyCookiesIframe: function() { - var src = getRealmUrl() + '/protocol/openid-connect/3p-cookies/step1.html'; - if (kc.iframeVersion) { - src = src + '?version=' + kc.iframeVersion; - } - return src; - }, - register: function() { - return getRealmUrl() + '/protocol/openid-connect/registrations'; - }, - userinfo: function() { - return getRealmUrl() + '/protocol/openid-connect/userinfo'; - } - }; - } else { - kc.endpoints = { - authorize: function() { - return oidcConfiguration.authorization_endpoint; - }, - token: function() { - return oidcConfiguration.token_endpoint; - }, - logout: function() { - if (!oidcConfiguration.end_session_endpoint) { - throw "Not supported by the OIDC server"; - } - return oidcConfiguration.end_session_endpoint; - }, - checkSessionIframe: function() { - if (!oidcConfiguration.check_session_iframe) { - throw "Not supported by the OIDC server"; - } - return oidcConfiguration.check_session_iframe; - }, - register: function() { - throw 'Redirection to "Register user" page not supported in standard OIDC mode'; - }, - userinfo: function() { - if (!oidcConfiguration.userinfo_endpoint) { - throw "Not supported by the OIDC server"; - } - return oidcConfiguration.userinfo_endpoint; - } - }; - } - } - - if (configUrl) { - var req = new XMLHttpRequest(); - req.open('GET', configUrl, true); - req.setRequestHeader('Accept', 'application/json'); - - req.onreadystatechange = function () { - if (req.readyState == 4) { - if (req.status == 200 || fileLoaded(req)) { - var config = JSON.parse(req.responseText); - - kc.authServerUrl = config['auth-server-url']; - kc.realm = config['realm']; - kc.clientId = config['resource']; - setupOidcEndoints(null); - promise.setSuccess(); - } else { - promise.setError(); - } - } - }; - - req.send(); - } else { - if (!config.clientId) { - throw 'clientId missing'; - } - - kc.clientId = config.clientId; - - var oidcProvider = config['oidcProvider']; - if (!oidcProvider) { - if (!config['url']) { - var scripts = document.getElementsByTagName('script'); - for (var i = 0; i < scripts.length; i++) { - if (scripts[i].src.match(/.*keycloak\.js/)) { - config.url = scripts[i].src.substr(0, scripts[i].src.indexOf('/js/keycloak.js')); - break; - } - } - } - if (!config.realm) { - throw 'realm missing'; - } - - kc.authServerUrl = config.url; - kc.realm = config.realm; - setupOidcEndoints(null); - promise.setSuccess(); - } else { - if (typeof oidcProvider === 'string') { - var oidcProviderConfigUrl; - if (oidcProvider.charAt(oidcProvider.length - 1) == '/') { - oidcProviderConfigUrl = oidcProvider + '.well-known/openid-configuration'; - } else { - oidcProviderConfigUrl = oidcProvider + '/.well-known/openid-configuration'; - } - var req = new XMLHttpRequest(); - req.open('GET', oidcProviderConfigUrl, true); - req.setRequestHeader('Accept', 'application/json'); - - req.onreadystatechange = function () { - if (req.readyState == 4) { - if (req.status == 200 || fileLoaded(req)) { - var oidcProviderConfig = JSON.parse(req.responseText); - setupOidcEndoints(oidcProviderConfig); - promise.setSuccess(); - } else { - promise.setError(); - } - } - }; - - req.send(); - } else { - setupOidcEndoints(oidcProvider); - promise.setSuccess(); - } - } - } - - return promise.promise; - } - - function fileLoaded(xhr) { - return xhr.status == 0 && xhr.responseText && xhr.responseURL.startsWith('file:'); - } - - function setToken(token, refreshToken, idToken, timeLocal) { - if (kc.tokenTimeoutHandle) { - clearTimeout(kc.tokenTimeoutHandle); - kc.tokenTimeoutHandle = null; - } - - if (refreshToken) { - kc.refreshToken = refreshToken; - kc.refreshTokenParsed = decodeToken(refreshToken); - } else { - delete kc.refreshToken; - delete kc.refreshTokenParsed; - } - - if (idToken) { - kc.idToken = idToken; - kc.idTokenParsed = decodeToken(idToken); - } else { - delete kc.idToken; - delete kc.idTokenParsed; - } - - if (token) { - kc.token = token; - kc.tokenParsed = decodeToken(token); - kc.sessionId = kc.tokenParsed.session_state; - kc.authenticated = true; - kc.subject = kc.tokenParsed.sub; - kc.realmAccess = kc.tokenParsed.realm_access; - kc.resourceAccess = kc.tokenParsed.resource_access; - - if (timeLocal) { - kc.timeSkew = Math.floor(timeLocal / 1000) - kc.tokenParsed.iat; - } - - if (kc.timeSkew != null) { - logInfo('[KEYCLOAK] Estimated time difference between browser and server is ' + kc.timeSkew + ' seconds'); - - if (kc.onTokenExpired) { - var expiresIn = (kc.tokenParsed['exp'] - (new Date().getTime() / 1000) + kc.timeSkew) * 1000; - logInfo('[KEYCLOAK] Token expires in ' + Math.round(expiresIn / 1000) + ' s'); - if (expiresIn <= 0) { - kc.onTokenExpired(); - } else { - kc.tokenTimeoutHandle = setTimeout(kc.onTokenExpired, expiresIn); - } - } - } - } else { - delete kc.token; - delete kc.tokenParsed; - delete kc.subject; - delete kc.realmAccess; - delete kc.resourceAccess; - - kc.authenticated = false; - } - } - - function decodeToken(str) { - str = str.split('.')[1]; - - str = str.replace(/-/g, '+'); - str = str.replace(/_/g, '/'); - switch (str.length % 4) { - case 0: - break; - case 2: - str += '=='; - break; - case 3: - str += '='; - break; - default: - throw 'Invalid token'; - } - - str = decodeURIComponent(escape(atob(str))); - - str = JSON.parse(str); - return str; - } - - function createUUID() { - var hexDigits = '0123456789abcdef'; - var s = generateRandomString(36, hexDigits).split(""); - s[14] = '4'; - s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); - s[8] = s[13] = s[18] = s[23] = '-'; - var uuid = s.join(''); - return uuid; - } - - function parseCallback(url) { - var oauth = parseCallbackUrl(url); - if (!oauth) { - return; - } - - var oauthState = callbackStorage.get(oauth.state); - - if (oauthState) { - oauth.valid = true; - oauth.redirectUri = oauthState.redirectUri; - oauth.storedNonce = oauthState.nonce; - oauth.prompt = oauthState.prompt; - oauth.pkceCodeVerifier = oauthState.pkceCodeVerifier; - } - - return oauth; - } - - function parseCallbackUrl(url) { - var supportedParams; - switch (kc.flow) { - case 'standard': - supportedParams = ['code', 'state', 'session_state', 'kc_action_status']; - break; - case 'implicit': - supportedParams = ['access_token', 'token_type', 'id_token', 'state', 'session_state', 'expires_in', 'kc_action_status']; - break; - case 'hybrid': - supportedParams = ['access_token', 'token_type', 'id_token', 'code', 'state', 'session_state', 'expires_in', 'kc_action_status']; - break; - } - - supportedParams.push('error'); - supportedParams.push('error_description'); - supportedParams.push('error_uri'); - - var queryIndex = url.indexOf('?'); - var fragmentIndex = url.indexOf('#'); - - var newUrl; - var parsed; - - if (kc.responseMode === 'query' && queryIndex !== -1) { - newUrl = url.substring(0, queryIndex); - parsed = parseCallbackParams(url.substring(queryIndex + 1, fragmentIndex !== -1 ? fragmentIndex : url.length), supportedParams); - if (parsed.paramsString !== '') { - newUrl += '?' + parsed.paramsString; - } - if (fragmentIndex !== -1) { - newUrl += url.substring(fragmentIndex); - } - } else if (kc.responseMode === 'fragment' && fragmentIndex !== -1) { - newUrl = url.substring(0, fragmentIndex); - parsed = parseCallbackParams(url.substring(fragmentIndex + 1), supportedParams); - if (parsed.paramsString !== '') { - newUrl += '#' + parsed.paramsString; - } - } - - if (parsed && parsed.oauthParams) { - if (kc.flow === 'standard' || kc.flow === 'hybrid') { - if ((parsed.oauthParams.code || parsed.oauthParams.error) && parsed.oauthParams.state) { - parsed.oauthParams.newUrl = newUrl; - return parsed.oauthParams; - } - } else if (kc.flow === 'implicit') { - if ((parsed.oauthParams.access_token || parsed.oauthParams.error) && parsed.oauthParams.state) { - parsed.oauthParams.newUrl = newUrl; - return parsed.oauthParams; - } - } - } - } - - function parseCallbackParams(paramsString, supportedParams) { - var p = paramsString.split('&'); - var result = { - paramsString: '', - oauthParams: {} - }; - for (var i = 0; i < p.length; i++) { - var split = p[i].indexOf("="); - var key = p[i].slice(0, split); - if (supportedParams.indexOf(key) !== -1) { - result.oauthParams[key] = p[i].slice(split + 1); - } else { - if (result.paramsString !== '') { - result.paramsString += '&'; - } - result.paramsString += p[i]; - } - } - return result; - } - - function createPromise() { - // Need to create a native Promise which also preserves the - // interface of the custom promise type previously used by the API - var p = { - setSuccess: function(result) { - p.resolve(result); - }, - - setError: function(result) { - p.reject(result); - } - }; - p.promise = new es6Promise_min.exports.Promise(function(resolve, reject) { - p.resolve = resolve; - p.reject = reject; - }); - - p.promise.success = function(callback) { - logPromiseDeprecation(); - - this.then(function handleSuccess(value) { - callback(value); - }); - - return this; - }; - - p.promise.error = function(callback) { - logPromiseDeprecation(); - - this.catch(function handleError(error) { - callback(error); - }); - - return this; - }; - - return p; - } - - // Function to extend existing native Promise with timeout - function applyTimeoutToPromise(promise, timeout, errorMessage) { - var timeoutHandle = null; - var timeoutPromise = new es6Promise_min.exports.Promise(function (resolve, reject) { - timeoutHandle = setTimeout(function () { - reject({ "error": errorMessage || "Promise is not settled within timeout of " + timeout + "ms" }); - }, timeout); - }); - - return es6Promise_min.exports.Promise.race([promise, timeoutPromise]).finally(function () { - clearTimeout(timeoutHandle); - }); - } - - function setupCheckLoginIframe() { - var promise = createPromise(); - - if (!loginIframe.enable) { - promise.setSuccess(); - return promise.promise; - } - - if (loginIframe.iframe) { - promise.setSuccess(); - return promise.promise; - } - - var iframe = document.createElement('iframe'); - loginIframe.iframe = iframe; - - iframe.onload = function() { - var authUrl = kc.endpoints.authorize(); - if (authUrl.charAt(0) === '/') { - loginIframe.iframeOrigin = getOrigin(); - } else { - loginIframe.iframeOrigin = authUrl.substring(0, authUrl.indexOf('/', 8)); - } - promise.setSuccess(); - }; - - var src = kc.endpoints.checkSessionIframe(); - iframe.setAttribute('src', src ); - iframe.setAttribute('title', 'keycloak-session-iframe' ); - iframe.style.display = 'none'; - document.body.appendChild(iframe); - - var messageCallback = function(event) { - if ((event.origin !== loginIframe.iframeOrigin) || (loginIframe.iframe.contentWindow !== event.source)) { - return; - } - - if (!(event.data == 'unchanged' || event.data == 'changed' || event.data == 'error')) { - return; - } - - - if (event.data != 'unchanged') { - kc.clearToken(); - } - - var callbacks = loginIframe.callbackList.splice(0, loginIframe.callbackList.length); - - for (var i = callbacks.length - 1; i >= 0; --i) { - var promise = callbacks[i]; - if (event.data == 'error') { - promise.setError(); - } else { - promise.setSuccess(event.data == 'unchanged'); - } - } - }; - - window.addEventListener('message', messageCallback, false); - - return promise.promise; - } - - function scheduleCheckIframe() { - if (loginIframe.enable) { - if (kc.token) { - setTimeout(function() { - checkLoginIframe().then(function(unchanged) { - if (unchanged) { - scheduleCheckIframe(); - } - }); - }, loginIframe.interval * 1000); - } - } - } - - function checkLoginIframe() { - var promise = createPromise(); - - if (loginIframe.iframe && loginIframe.iframeOrigin ) { - var msg = kc.clientId + ' ' + (kc.sessionId ? kc.sessionId : ''); - loginIframe.callbackList.push(promise); - var origin = loginIframe.iframeOrigin; - if (loginIframe.callbackList.length == 1) { - loginIframe.iframe.contentWindow.postMessage(msg, origin); - } - } else { - promise.setSuccess(); - } - - return promise.promise; - } - - function check3pCookiesSupported() { - var promise = createPromise(); - - if (loginIframe.enable || kc.silentCheckSsoRedirectUri) { - var iframe = document.createElement('iframe'); - iframe.setAttribute('src', kc.endpoints.thirdPartyCookiesIframe()); - iframe.setAttribute('title', 'keycloak-3p-check-iframe' ); - iframe.style.display = 'none'; - document.body.appendChild(iframe); - - var messageCallback = function(event) { - if (iframe.contentWindow !== event.source) { - return; - } - - if (event.data !== "supported" && event.data !== "unsupported") { - return; - } else if (event.data === "unsupported") { - loginIframe.enable = false; - if (kc.silentCheckSsoFallback) { - kc.silentCheckSsoRedirectUri = false; - } - logWarn("[KEYCLOAK] 3rd party cookies aren't supported by this browser. checkLoginIframe and " + - "silent check-sso are not available."); - } - - document.body.removeChild(iframe); - window.removeEventListener("message", messageCallback); - promise.setSuccess(); - }; - - window.addEventListener('message', messageCallback, false); - } else { - promise.setSuccess(); - } - - return applyTimeoutToPromise(promise.promise, kc.messageReceiveTimeout, "Timeout when waiting for 3rd party check iframe message."); - } - - function loadAdapter(type) { - if (!type || type == 'default') { - return { - login: function(options) { - window.location.replace(kc.createLoginUrl(options)); - return createPromise().promise; - }, - - logout: function(options) { - window.location.replace(kc.createLogoutUrl(options)); - return createPromise().promise; - }, - - register: function(options) { - window.location.replace(kc.createRegisterUrl(options)); - return createPromise().promise; - }, - - accountManagement : function() { - var accountUrl = kc.createAccountUrl(); - if (typeof accountUrl !== 'undefined') { - window.location.href = accountUrl; - } else { - throw "Not supported by the OIDC server"; - } - return createPromise().promise; - }, - - redirectUri: function(options, encodeHash) { - - if (options && options.redirectUri) { - return options.redirectUri; - } else if (kc.redirectUri) { - return kc.redirectUri; - } else { - return location.href; - } - } - }; - } - - if (type == 'cordova') { - loginIframe.enable = false; - var cordovaOpenWindowWrapper = function(loginUrl, target, options) { - if (window.cordova && window.cordova.InAppBrowser) { - // Use inappbrowser for IOS and Android if available - return window.cordova.InAppBrowser.open(loginUrl, target, options); - } else { - return window.open(loginUrl, target, options); - } - }; - - var shallowCloneCordovaOptions = function (userOptions) { - if (userOptions && userOptions.cordovaOptions) { - return Object.keys(userOptions.cordovaOptions).reduce(function (options, optionName) { - options[optionName] = userOptions.cordovaOptions[optionName]; - return options; - }, {}); - } else { - return {}; - } - }; - - var formatCordovaOptions = function (cordovaOptions) { - return Object.keys(cordovaOptions).reduce(function (options, optionName) { - options.push(optionName+"="+cordovaOptions[optionName]); - return options; - }, []).join(","); - }; - - var createCordovaOptions = function (userOptions) { - var cordovaOptions = shallowCloneCordovaOptions(userOptions); - cordovaOptions.location = 'no'; - if (userOptions && userOptions.prompt == 'none') { - cordovaOptions.hidden = 'yes'; - } - return formatCordovaOptions(cordovaOptions); - }; - - return { - login: function(options) { - var promise = createPromise(); - - var cordovaOptions = createCordovaOptions(options); - var loginUrl = kc.createLoginUrl(options); - var ref = cordovaOpenWindowWrapper(loginUrl, '_blank', cordovaOptions); - var completed = false; - - var closed = false; - var closeBrowser = function() { - closed = true; - ref.close(); - }; - - ref.addEventListener('loadstart', function(event) { - if (event.url.indexOf('http://localhost') == 0) { - var callback = parseCallback(event.url); - processCallback(callback, promise); - closeBrowser(); - completed = true; - } - }); - - ref.addEventListener('loaderror', function(event) { - if (!completed) { - if (event.url.indexOf('http://localhost') == 0) { - var callback = parseCallback(event.url); - processCallback(callback, promise); - closeBrowser(); - completed = true; - } else { - promise.setError(); - closeBrowser(); - } - } - }); - - ref.addEventListener('exit', function(event) { - if (!closed) { - promise.setError({ - reason: "closed_by_user" - }); - } - }); - - return promise.promise; - }, - - logout: function(options) { - var promise = createPromise(); - - var logoutUrl = kc.createLogoutUrl(options); - var ref = cordovaOpenWindowWrapper(logoutUrl, '_blank', 'location=no,hidden=yes,clearcache=yes'); - - var error; - - ref.addEventListener('loadstart', function(event) { - if (event.url.indexOf('http://localhost') == 0) { - ref.close(); - } - }); - - ref.addEventListener('loaderror', function(event) { - if (event.url.indexOf('http://localhost') == 0) { - ref.close(); - } else { - error = true; - ref.close(); - } - }); - - ref.addEventListener('exit', function(event) { - if (error) { - promise.setError(); - } else { - kc.clearToken(); - promise.setSuccess(); - } - }); - - return promise.promise; - }, - - register : function(options) { - var promise = createPromise(); - var registerUrl = kc.createRegisterUrl(); - var cordovaOptions = createCordovaOptions(options); - var ref = cordovaOpenWindowWrapper(registerUrl, '_blank', cordovaOptions); - ref.addEventListener('loadstart', function(event) { - if (event.url.indexOf('http://localhost') == 0) { - ref.close(); - var oauth = parseCallback(event.url); - processCallback(oauth, promise); - } - }); - return promise.promise; - }, - - accountManagement : function() { - var accountUrl = kc.createAccountUrl(); - if (typeof accountUrl !== 'undefined') { - var ref = cordovaOpenWindowWrapper(accountUrl, '_blank', 'location=no'); - ref.addEventListener('loadstart', function(event) { - if (event.url.indexOf('http://localhost') == 0) { - ref.close(); - } - }); - } else { - throw "Not supported by the OIDC server"; - } - }, - - redirectUri: function(options) { - return 'http://localhost'; - } - } - } - - if (type == 'cordova-native') { - loginIframe.enable = false; - - return { - login: function(options) { - var promise = createPromise(); - var loginUrl = kc.createLoginUrl(options); - - universalLinks.subscribe('keycloak', function(event) { - universalLinks.unsubscribe('keycloak'); - window.cordova.plugins.browsertab.close(); - var oauth = parseCallback(event.url); - processCallback(oauth, promise); - }); - - window.cordova.plugins.browsertab.openUrl(loginUrl); - return promise.promise; - }, - - logout: function(options) { - var promise = createPromise(); - var logoutUrl = kc.createLogoutUrl(options); - - universalLinks.subscribe('keycloak', function(event) { - universalLinks.unsubscribe('keycloak'); - window.cordova.plugins.browsertab.close(); - kc.clearToken(); - promise.setSuccess(); - }); - - window.cordova.plugins.browsertab.openUrl(logoutUrl); - return promise.promise; - }, - - register : function(options) { - var promise = createPromise(); - var registerUrl = kc.createRegisterUrl(options); - universalLinks.subscribe('keycloak' , function(event) { - universalLinks.unsubscribe('keycloak'); - window.cordova.plugins.browsertab.close(); - var oauth = parseCallback(event.url); - processCallback(oauth, promise); - }); - window.cordova.plugins.browsertab.openUrl(registerUrl); - return promise.promise; - - }, - - accountManagement : function() { - var accountUrl = kc.createAccountUrl(); - if (typeof accountUrl !== 'undefined') { - window.cordova.plugins.browsertab.openUrl(accountUrl); - } else { - throw "Not supported by the OIDC server"; - } - }, - - redirectUri: function(options) { - if (options && options.redirectUri) { - return options.redirectUri; - } else if (kc.redirectUri) { - return kc.redirectUri; - } else { - return "http://localhost"; - } - } - } - } - - throw 'invalid adapter type: ' + type; - } - - var LocalStorage = function() { - if (!(this instanceof LocalStorage)) { - return new LocalStorage(); - } - - localStorage.setItem('kc-test', 'test'); - localStorage.removeItem('kc-test'); - - var cs = this; - - function clearExpired() { - var time = new Date().getTime(); - for (var i = 0; i < localStorage.length; i++) { - var key = localStorage.key(i); - if (key && key.indexOf('kc-callback-') == 0) { - var value = localStorage.getItem(key); - if (value) { - try { - var expires = JSON.parse(value).expires; - if (!expires || expires < time) { - localStorage.removeItem(key); - } - } catch (err) { - localStorage.removeItem(key); - } - } - } - } - } - - cs.get = function(state) { - if (!state) { - return; - } - - var key = 'kc-callback-' + state; - var value = localStorage.getItem(key); - if (value) { - localStorage.removeItem(key); - value = JSON.parse(value); - } - - clearExpired(); - return value; - }; - - cs.add = function(state) { - clearExpired(); - - var key = 'kc-callback-' + state.state; - state.expires = new Date().getTime() + (60 * 60 * 1000); - localStorage.setItem(key, JSON.stringify(state)); - }; - }; - - var CookieStorage = function() { - if (!(this instanceof CookieStorage)) { - return new CookieStorage(); - } - - var cs = this; - - cs.get = function(state) { - if (!state) { - return; - } - - var value = getCookie('kc-callback-' + state); - setCookie('kc-callback-' + state, '', cookieExpiration(-100)); - if (value) { - return JSON.parse(value); - } - }; - - cs.add = function(state) { - setCookie('kc-callback-' + state.state, JSON.stringify(state), cookieExpiration(60)); - }; - - cs.removeItem = function(key) { - setCookie(key, '', cookieExpiration(-100)); - }; - - var cookieExpiration = function (minutes) { - var exp = new Date(); - exp.setTime(exp.getTime() + (minutes*60*1000)); - return exp; - }; - - var getCookie = function (key) { - var name = key + '='; - var ca = document.cookie.split(';'); - for (var i = 0; i < ca.length; i++) { - var c = ca[i]; - while (c.charAt(0) == ' ') { - c = c.substring(1); - } - if (c.indexOf(name) == 0) { - return c.substring(name.length, c.length); - } - } - return ''; - }; - - var setCookie = function (key, value, expirationDate) { - var cookie = key + '=' + value + '; ' - + 'expires=' + expirationDate.toUTCString() + '; '; - document.cookie = cookie; - }; - }; - - function createCallbackStorage() { - try { - return new LocalStorage(); - } catch (err) { - } - - return new CookieStorage(); - } - - function createLogger(fn) { - return function() { - if (kc.enableLogging) { - fn.apply(console, Array.prototype.slice.call(arguments)); - } - }; - } - } - - return Keycloak; - -})); diff --git a/webapp/public/js/authentication/moment.min.js b/webapp/public/js/authentication/moment.min.js new file mode 100644 index 0000000000000000000000000000000000000000..3427886d17d9f14ea76899d7758052b3c0196bc1 --- /dev/null +++ b/webapp/public/js/authentication/moment.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var H;function f(){return H.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function F(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function o(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i<s;++i)n.push(t(e[i],i));return n}function E(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return Pt(e,t,n,s,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function A(e){if(null==e._isValid){var t=m(e),n=j.call(t.parsedDateParts,function(e){return null!=e}),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function I(e){var t=l(NaN);return null!=e?E(m(t),e):m(t).userInvalidated=!0,t}var j=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},Z=f.momentProperties=[],z=!1;function $(e,t){var n,s,i,r=Z.length;if(o(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),o(t._i)||(e._i=t._i),o(t._f)||(e._f=t._f),o(t._l)||(e._l=t._l),o(t._strict)||(e._strict=t._strict),o(t._tzm)||(e._tzm=t._tzm),o(t._isUTC)||(e._isUTC=t._isUTC),o(t._offset)||(e._offset=t._offset),o(t._pf)||(e._pf=m(t)),o(t._locale)||(e._locale=t._locale),0<r)for(n=0;n<r;n++)o(i=t[s=Z[n]])||(e[s]=i);return e}function q(e){$(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===z&&(z=!0,f.updateOffset(this),z=!1)}function h(e){return e instanceof q||null!=e&&null!=e._isAMomentObject}function B(e){!1===f.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function e(r,a){var o=!0;return E(function(){if(null!=f.deprecationHandler&&f.deprecationHandler(null,r),o){for(var e,t,n=[],s=arguments.length,i=0;i<s;i++){if(e="","object"==typeof arguments[i]){for(t in e+="\n["+i+"] ",arguments[0])c(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[i];n.push(e)}B(r+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),o=!1}return a.apply(this,arguments)},a)}var J={};function Q(e,t){null!=f.deprecationHandler&&f.deprecationHandler(e,t),J[e]||(B(t),J[e]=!0)}function d(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function X(e,t){var n,s=E({},e);for(n in t)c(t,n)&&(F(e[n])&&F(t[n])?(s[n]={},E(s[n],e[n]),E(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)c(e,n)&&!c(t,n)&&F(e[n])&&(s[n]=E({},s[n]));return s}function K(e){null!=e&&this.set(e)}f.suppressDeprecationWarnings=!1,f.deprecationHandler=null;var ee=Object.keys||function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};function r(e,t,n){var s=""+Math.abs(e);return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}var te=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,se={},ie={};function s(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(ie[e]=i),t&&(ie[t[0]]=function(){return r(i.apply(this,arguments),t[1],t[2])}),n&&(ie[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function re(e,t){return e.isValid()?(t=ae(t,e.localeData()),se[t]=se[t]||function(s){for(var e,i=s.match(te),t=0,r=i.length;t<r;t++)ie[i[t]]?i[t]=ie[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=d(i[n])?i[n].call(e,s):i[n];return t}}(t),se[t](e)):e.localeData().invalidDate()}function ae(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(ne.lastIndex=0;0<=n&&ne.test(e);)e=e.replace(ne,s),ne.lastIndex=0,--n;return e}var oe={};function t(e,t){var n=e.toLowerCase();oe[n]=oe[n+"s"]=oe[t]=e}function _(e){return"string"==typeof e?oe[e]||oe[e.toLowerCase()]:void 0}function ue(e){var t,n,s={};for(n in e)c(e,n)&&(t=_(n))&&(s[t]=e[n]);return s}var le={};function n(e,t){le[e]=t}function he(e){return e%4==0&&e%100!=0||e%400==0}function y(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function g(e){var e=+e,t=0;return t=0!=e&&isFinite(e)?y(e):t}function de(t,n){return function(e){return null!=e?(fe(this,t,e),f.updateOffset(this,n),this):ce(this,t)}}function ce(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&he(e.year())&&1===e.month()&&29===e.date()?(n=g(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),We(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var i=/\d/,w=/\d\d/,me=/\d{3}/,_e=/\d{4}/,ye=/[+-]?\d{6}/,p=/\d\d?/,ge=/\d\d\d\d?/,we=/\d\d\d\d\d\d?/,pe=/\d{1,3}/,ke=/\d{1,4}/,ve=/[+-]?\d{1,6}/,Me=/\d+/,De=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,Ye=/Z|[+-]\d\d(?::?\d\d)?/gi,k=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function v(e,n,s){be[e]=d(n)?n:function(e,t){return e&&s?s:n}}function Oe(e,t){return c(be,e)?be[e](t._strict,t._locale):new RegExp(M(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function M(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var be={},xe={};function D(e,n){var t,s,i=n;for("string"==typeof e&&(e=[e]),u(n)&&(i=function(e,t){t[n]=g(e)}),s=e.length,t=0;t<s;t++)xe[e[t]]=i}function Te(e,i){D(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var S,Y=0,O=1,b=2,x=3,T=4,N=5,Ne=6,Pe=7,Re=8;function We(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%(n=12)+n)%n;return e+=(t-n)/12,1==n?he(e)?29:28:31-n%7%2}S=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},s("M",["MM",2],"Mo",function(){return this.month()+1}),s("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),s("MMMM",0,0,function(e){return this.localeData().months(this,e)}),t("month","M"),n("month",8),v("M",p),v("MM",p,w),v("MMM",function(e,t){return t.monthsShortRegex(e)}),v("MMMM",function(e,t){return t.monthsRegex(e)}),D(["M","MM"],function(e,t){t[O]=g(e)-1}),D(["MMM","MMMM"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[O]=s:m(n).invalidMonth=e});var Ce="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ue="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),He=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Fe=k,Le=k;function Ve(e,t){var n;if(e.isValid()){if("string"==typeof t)if(/^\d+$/.test(t))t=g(t);else if(!u(t=e.localeData().monthsParse(t)))return;n=Math.min(e.date(),We(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n)}}function Ge(e){return null!=e?(Ve(this,e),f.updateOffset(this,!0),this):ce(this,"Month")}function Ee(){function e(e,t){return t.length-e.length}for(var t,n=[],s=[],i=[],r=0;r<12;r++)t=l([2e3,r]),n.push(this.monthsShort(t,"")),s.push(this.months(t,"")),i.push(this.months(t,"")),i.push(this.monthsShort(t,""));for(n.sort(e),s.sort(e),i.sort(e),r=0;r<12;r++)n[r]=M(n[r]),s[r]=M(s[r]);for(r=0;r<24;r++)i[r]=M(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Ae(e){return he(e)?366:365}s("Y",0,0,function(){var e=this.year();return e<=9999?r(e,4):"+"+e}),s(0,["YY",2],0,function(){return this.year()%100}),s(0,["YYYY",4],0,"year"),s(0,["YYYYY",5],0,"year"),s(0,["YYYYYY",6,!0],0,"year"),t("year","y"),n("year",1),v("Y",De),v("YY",p,w),v("YYYY",ke,_e),v("YYYYY",ve,ye),v("YYYYYY",ve,ye),D(["YYYYY","YYYYYY"],Y),D("YYYY",function(e,t){t[Y]=2===e.length?f.parseTwoDigitYear(e):g(e)}),D("YY",function(e,t){t[Y]=f.parseTwoDigitYear(e)}),D("Y",function(e,t){t[Y]=parseInt(e,10)}),f.parseTwoDigitYear=function(e){return g(e)+(68<g(e)?1900:2e3)};var Ie=de("FullYear",!0);function je(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}function Ze(e){var t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,t)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ze(e,t,n){n=7+t-n;return n-(7+Ze(e,0,n).getUTCDay()-t)%7-1}function $e(e,t,n,s,i){var r,t=1+7*(t-1)+(7+n-s)%7+ze(e,s,i),n=t<=0?Ae(r=e-1)+t:t>Ae(e)?(r=e+1,t-Ae(e)):(r=e,t);return{year:r,dayOfYear:n}}function qe(e,t,n){var s,i,r=ze(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+P(i=e.year()-1,t,n):r>P(e.year(),t,n)?(s=r-P(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function P(e,t,n){var s=ze(e,t,n),t=ze(e+1,t,n);return(Ae(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),t("week","w"),t("isoWeek","W"),n("week",5),n("isoWeek",5),v("w",p),v("ww",p,w),v("W",p),v("WW",p,w),Te(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=g(e)});function Be(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),t("day","d"),t("weekday","e"),t("isoWeekday","E"),n("day",11),n("weekday",11),n("isoWeekday",11),v("d",p),v("e",p),v("E",p),v("dd",function(e,t){return t.weekdaysMinRegex(e)}),v("ddd",function(e,t){return t.weekdaysShortRegex(e)}),v("dddd",function(e,t){return t.weekdaysRegex(e)}),Te(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:m(n).invalidWeekday=e}),Te(["d","e","E"],function(e,t,n,s){t[s]=g(e)});var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=k,et=k,tt=k;function nt(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=M(this.weekdaysMin(s,"")),n=M(this.weekdaysShort(s,"")),s=M(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function st(){return this.hours()%12||12}function it(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,st),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),it("a",!0),it("A",!1),t("hour","h"),n("hour",13),v("a",rt),v("A",rt),v("H",p),v("h",p),v("k",p),v("HH",p,w),v("hh",p,w),v("kk",p,w),v("hmm",ge),v("hmmss",we),v("Hmm",ge),v("Hmmss",we),D(["H","HH"],x),D(["k","kk"],function(e,t,n){e=g(e);t[x]=24===e?0:e}),D(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),D(["h","hh"],function(e,t,n){t[x]=g(e),m(n).bigHour=!0}),D("hmm",function(e,t,n){var s=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s)),m(n).bigHour=!0}),D("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s,2)),t[N]=g(e.substr(i)),m(n).bigHour=!0}),D("Hmm",function(e,t,n){var s=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s))}),D("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s,2)),t[N]=g(e.substr(i))});k=de("Hours",!0);var at,ot={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:Ue,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Xe,weekdaysShort:Qe,meridiemParse:/[ap]\.?m?\.?/i},R={},ut={};function lt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=lt(e[r]).split("-")).length,n=(n=lt(e[r+1]))?n.split("-"):null;0<t;){if(s=dt(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return at}function dt(t){var e;if(void 0===R[t]&&"undefined"!=typeof module&&module&&module.exports&&null!=t.match("^[^/\\\\]*$"))try{e=at._abbr,require("./locale/"+t),ct(e)}catch(e){R[t]=null}return R[t]}function ct(e,t){return e&&((t=o(t)?mt(e):ft(e,t))?at=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),at._abbr}function ft(e,t){if(null===t)return delete R[e],null;var n,s=ot;if(t.abbr=e,null!=R[e])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=R[e]._config;else if(null!=t.parentLocale)if(null!=R[t.parentLocale])s=R[t.parentLocale]._config;else{if(null==(n=dt(t.parentLocale)))return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;s=n._config}return R[e]=new K(X(s,t)),ut[e]&&ut[e].forEach(function(e){ft(e.name,e.config)}),ct(e),R[e]}function mt(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return at;if(!a(e)){if(t=dt(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===m(e).overflow&&(t=t[O]<0||11<t[O]?O:t[b]<1||t[b]>We(t[Y],t[O])?b:t[x]<0||24<t[x]||24===t[x]&&(0!==t[T]||0!==t[N]||0!==t[Ne])?x:t[T]<0||59<t[T]?T:t[N]<0||59<t[N]?N:t[Ne]<0||999<t[Ne]?Ne:-1,m(e)._overflowDayOfYear&&(t<Y||b<t)&&(t=b),m(e)._overflowWeeks&&-1===t&&(t=Pe),m(e)._overflowWeekday&&-1===t&&(t=Re),m(e).overflow=t),e}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],vt=/^\/?Date\((-?\d+)/i,Mt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function St(e){var t,n,s,i,r,a,o=e._i,u=yt.exec(o)||gt.exec(o),o=pt.length,l=kt.length;if(u){for(m(e).iso=!0,t=0,n=o;t<n;t++)if(pt[t][1].exec(u[1])){i=pt[t][0],s=!1!==pt[t][2];break}if(null==i)e._isValid=!1;else{if(u[3]){for(t=0,n=l;t<n;t++)if(kt[t][1].exec(u[3])){r=(u[2]||" ")+kt[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),Tt(e)}else e._isValid=!1}}else e._isValid=!1}function Yt(e,t,n,s,i,r){e=[function(e){e=parseInt(e,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(e),Ue.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&e.push(parseInt(r,10)),e}function Ot(e){var t,n,s,i,r=Mt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));r?(t=Yt(r[4],r[3],r[2],r[5],r[6],r[7]),n=r[1],s=t,i=e,n&&Qe.indexOf(n)!==new Date(s[0],s[1],s[2]).getDay()?(m(i).weekdayMismatch=!0,i._isValid=!1):(e._a=t,e._tzm=(n=r[8],s=r[9],i=r[10],n?Dt[n]:s?0:60*(((n=parseInt(i,10))-(s=n%100))/100)+s),e._d=Ze.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0)):e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function xt(e){var t,n,s,i,r,a,o,u,l,h,d,c=[];if(!e._d){for(s=e,i=new Date(f.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[b]&&null==e._a[O]&&(null!=(i=(s=e)._w).GG||null!=i.W||null!=i.E?(u=1,l=4,r=bt(i.GG,s._a[Y],qe(W(),1,4).year),a=bt(i.W,1),((o=bt(i.E,1))<1||7<o)&&(h=!0)):(u=s._locale._week.dow,l=s._locale._week.doy,d=qe(W(),u,l),r=bt(i.gg,s._a[Y],d.year),a=bt(i.w,d.week),null!=i.d?((o=i.d)<0||6<o)&&(h=!0):null!=i.e?(o=i.e+u,(i.e<0||6<i.e)&&(h=!0)):o=u),a<1||a>P(r,u,l)?m(s)._overflowWeeks=!0:null!=h?m(s)._overflowWeekday=!0:(d=$e(r,a,o,u,l),s._a[Y]=d.year,s._dayOfYear=d.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[Y],n[Y]),(e._dayOfYear>Ae(i)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),h=Ze(i,0,e._dayOfYear),e._a[O]=h.getUTCMonth(),e._a[b]=h.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[x]&&0===e._a[T]&&0===e._a[N]&&0===e._a[Ne]&&(e._nextDay=!0,e._a[x]=0),e._d=(e._useUTC?Ze:je).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[x]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(m(e).weekdayMismatch=!0)}}function Tt(e){if(e._f===f.ISO_8601)St(e);else if(e._f===f.RFC_2822)Ot(e);else{e._a=[],m(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],h=l.length,d=0;d<h;d++)n=l[d],(t=(a.match(Oe(n,e))||[])[0])&&(0<(s=a.substr(0,a.indexOf(t))).length&&m(e).unusedInput.push(s),a=a.slice(a.indexOf(t)+t.length),u+=t.length),ie[n]?(t?m(e).empty=!1:m(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&c(xe,s)&&xe[s](i,r._a,r,s)):e._strict&&!t&&m(e).unusedTokens.push(n);m(e).charsLeftOver=o-u,0<a.length&&m(e).unusedInput.push(a),e._a[x]<=12&&!0===m(e).bigHour&&0<e._a[x]&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[x]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((e=e.isPM(n))&&t<12&&(t+=12),t=e||12!==t?t:0):t}(e._locale,e._a[x],e._meridiem),null!==(o=m(e).era)&&(e._a[Y]=e._locale.erasConvertYear(o,e._a[Y])),xt(e),_t(e)}}function Nt(e){var t,n,s,i=e._i,r=e._f;if(e._locale=e._locale||mt(e._l),null===i||void 0===r&&""===i)return I({nullInput:!0});if("string"==typeof i&&(e._i=i=e._locale.preparse(i)),h(i))return new q(_t(i));if(V(i))e._d=i;else if(a(r))!function(e){var t,n,s,i,r,a,o=!1,u=e._f.length;if(0===u)return m(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<u;i++)r=0,a=!1,t=$({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Tt(t),A(t)&&(a=!0),r=(r+=m(t).charsLeftOver)+10*m(t).unusedTokens.length,m(t).score=r,o?r<s&&(s=r,n=t):(null==s||r<s||a)&&(s=r,n=t,a&&(o=!0));E(e,n||t)}(e);else if(r)Tt(e);else if(o(r=(i=e)._i))i._d=new Date(f.now());else V(r)?i._d=new Date(r.valueOf()):"string"==typeof r?(n=i,null!==(t=vt.exec(n._i))?n._d=new Date(+t[1]):(St(n),!1===n._isValid&&(delete n._isValid,Ot(n),!1===n._isValid&&(delete n._isValid,n._strict?n._isValid=!1:f.createFromInputFallback(n))))):a(r)?(i._a=G(r.slice(0),function(e){return parseInt(e,10)}),xt(i)):F(r)?(t=i)._d||(s=void 0===(n=ue(t._i)).day?n.date:n.day,t._a=G([n.year,n.month,s,n.hour,n.minute,n.second,n.millisecond],function(e){return e&&parseInt(e,10)}),xt(t)):u(r)?i._d=new Date(r):f.createFromInputFallback(i);return A(e)||(e._d=null),e}function Pt(e,t,n,s,i){var r={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(F(e)&&L(e)||a(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(i=new q(_t(Nt(i=r))))._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function W(e,t,n,s){return Pt(e,t,n,s,!1)}f.createFromInputFallback=e("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),f.ISO_8601=function(){},f.RFC_2822=function(){};ge=e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=W.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:I()}),we=e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=W.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:I()});function Rt(e,t){var n,s;if(!(t=1===t.length&&a(t[0])?t[0]:t).length)return W();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var e=ue(e),t=e.year||0,n=e.quarter||0,s=e.month||0,i=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,o=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Wt.length;for(t in e)if(c(e,t)&&(-1===S.call(Wt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Wt[n]]){if(s)return!1;parseFloat(e[Wt[n]])!==g(e[Wt[n]])&&(s=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*o+1e3*a*60*60,this._days=+r+7*i,this._months=+s+3*n+12*t,this._data={},this._locale=mt(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){s(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+r(~~(e/60),2)+n+r(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),v("Z",Ye),v("ZZ",Ye),D(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(Ye,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var t=(t||"").match(e);return null===t?null:0===(t=60*(e=((t[t.length-1]||[])+"").match(Lt)||["-",0,0])[1]+g(e[2]))?0:"+"===e[0]?t:-t}function Gt(e,t){var n;return t._isUTC?(t=t.clone(),n=(h(e)||V(e)?e:W(e)).valueOf()-t.valueOf(),t._d.setTime(t._d.valueOf()+n),f.updateOffset(t,!1),t):W(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}f.updateOffset=function(){};var It=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function C(e,t){var n,s=e,i=null;return Ut(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(i=It.exec(e))?(n="-"===i[1]?-1:1,s={y:0,d:g(i[b])*n,h:g(i[x])*n,m:g(i[T])*n,s:g(i[N])*n,ms:g(Ht(1e3*i[Ne]))*n}):(i=jt.exec(e))?(n="-"===i[1]?-1:1,s={y:Zt(i[2],n),M:Zt(i[3],n),w:Zt(i[4],n),d:Zt(i[5],n),h:Zt(i[6],n),m:Zt(i[7],n),s:Zt(i[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(t=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(W(s.from),W(s.to)),(s={}).ms=t.milliseconds,s.M=t.months),i=new Ct(s),Ut(e)&&c(e,"_locale")&&(i._locale=e._locale),Ut(e)&&c(e,"_isValid")&&(i._isValid=e._isValid),i}function Zt(e,t){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function $t(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Q(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),qt(this,C(e,t),s),this}}function qt(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),t=Ht(t._months);e.isValid()&&(s=null==s||s,t&&Ve(e,ce(e,"Month")+t*n),r&&fe(e,"Date",ce(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&f.updateOffset(e,r||t))}C.fn=Ct.prototype,C.invalid=function(){return C(NaN)};Ce=$t(1,"add"),Je=$t(-1,"subtract");function Bt(e){return"string"==typeof e||e instanceof String}function Jt(e){return h(e)||V(e)||Bt(e)||u(e)||function(t){var e=a(t),n=!1;e&&(n=0===t.filter(function(e){return!u(e)&&Bt(t)}).length);return e&&n}(e)||function(e){var t,n,s=F(e)&&!L(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a=r.length;for(t=0;t<a;t+=1)n=r[t],i=i||c(e,n);return s&&i}(e)||null==e}function Qt(e,t){if(e.date()<t.date())return-Qt(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months"),t=t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s);return-(n+t)||0}function Xt(e){return void 0===e?this._locale._abbr:(null!=(e=mt(e))&&(this._locale=e),this)}f.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",f.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";Xe=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}var en=126227808e5;function tn(e,t){return(e%t+t)%t}function nn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-en:new Date(e,t,n).valueOf()}function sn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-en:Date.UTC(e,t,n)}function rn(e,t){return t.erasAbbrRegex(e)}function an(){for(var e=[],t=[],n=[],s=[],i=this.eras(),r=0,a=i.length;r<a;++r)t.push(M(i[r].name)),e.push(M(i[r].abbr)),n.push(M(i[r].narrow)),s.push(M(i[r].name)),s.push(M(i[r].abbr)),s.push(M(i[r].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}function on(e,t){s(0,[e,e.length],0,t)}function un(e,t,n,s,i){var r;return null==e?qe(this,s,i).year:(r=P(e,s,i),function(e,t,n,s,i){e=$e(e,t,n,s,i),t=Ze(e.year,0,e.dayOfYear);return this.year(t.getUTCFullYear()),this.month(t.getUTCMonth()),this.date(t.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}s("N",0,0,"eraAbbr"),s("NN",0,0,"eraAbbr"),s("NNN",0,0,"eraAbbr"),s("NNNN",0,0,"eraName"),s("NNNNN",0,0,"eraNarrow"),s("y",["y",1],"yo","eraYear"),s("y",["yy",2],0,"eraYear"),s("y",["yyy",3],0,"eraYear"),s("y",["yyyy",4],0,"eraYear"),v("N",rn),v("NN",rn),v("NNN",rn),v("NNNN",function(e,t){return t.erasNameRegex(e)}),v("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),D(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){s=n._locale.erasParse(e,s,n._strict);s?m(n).era=s:m(n).invalidEra=e}),v("y",Me),v("yy",Me),v("yyy",Me),v("yyyy",Me),v("yo",function(e,t){return t._eraYearOrdinalRegex||Me}),D(["y","yy","yyy","yyyy"],Y),D(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Y]=n._locale.eraYearOrdinalParse(e,i):t[Y]=parseInt(e,10)}),s(0,["gg",2],0,function(){return this.weekYear()%100}),s(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),t("weekYear","gg"),t("isoWeekYear","GG"),n("weekYear",1),n("isoWeekYear",1),v("G",De),v("g",De),v("GG",p,w),v("gg",p,w),v("GGGG",ke,_e),v("gggg",ke,_e),v("GGGGG",ve,ye),v("ggggg",ve,ye),Te(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=g(e)}),Te(["gg","GG"],function(e,t,n,s){t[s]=f.parseTwoDigitYear(e)}),s("Q",0,"Qo","quarter"),t("quarter","Q"),n("quarter",7),v("Q",i),D("Q",function(e,t){t[O]=3*(g(e)-1)}),s("D",["DD",2],"Do","date"),t("date","D"),n("date",9),v("D",p),v("DD",p,w),v("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),D(["D","DD"],b),D("Do",function(e,t){t[b]=g(e.match(p)[0])});ke=de("Date",!0);s("DDD",["DDDD",3],"DDDo","dayOfYear"),t("dayOfYear","DDD"),n("dayOfYear",4),v("DDD",pe),v("DDDD",me),D(["DDD","DDDD"],function(e,t,n){n._dayOfYear=g(e)}),s("m",["mm",2],0,"minute"),t("minute","m"),n("minute",14),v("m",p),v("mm",p,w),D(["m","mm"],T);var ln,_e=de("Minutes",!1),ve=(s("s",["ss",2],0,"second"),t("second","s"),n("second",15),v("s",p),v("ss",p,w),D(["s","ss"],N),de("Seconds",!1));for(s("S",0,0,function(){return~~(this.millisecond()/100)}),s(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),s(0,["SSS",3],0,"millisecond"),s(0,["SSSS",4],0,function(){return 10*this.millisecond()}),s(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),s(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),s(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),s(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),s(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),t("millisecond","ms"),n("millisecond",16),v("S",pe,i),v("SS",pe,w),v("SSS",pe,me),ln="SSSS";ln.length<=9;ln+="S")v(ln,Me);function hn(e,t){t[Ne]=g(1e3*("0."+e))}for(ln="S";ln.length<=9;ln+="S")D(ln,hn);ye=de("Milliseconds",!1),s("z",0,0,"zoneAbbr"),s("zz",0,0,"zoneName");i=q.prototype;function dn(e){return e}i.add=Ce,i.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=F(e)&&!L(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||c(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var e=e||W(),n=Gt(e,this).startOf("day"),n=f.calendarFormat(this,n)||"sameElse",t=t&&(d(t[n])?t[n].call(this,e):t[n]);return this.format(t||this.localeData().calendar(n,this,W(e)))},i.clone=function(){return new q(this)},i.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=_(t)){case"year":r=Qt(this,s)/12;break;case"month":r=Qt(this,s);break;case"quarter":r=Qt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:y(r)},i.endOf=function(e){var t,n;if(void 0===(e=_(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1;break}return this._d.setTime(t),f.updateOffset(this,!0),this},i.format=function(e){return e=e||(this.isUtc()?f.defaultFormatUtc:f.defaultFormat),e=re(this,e),this.localeData().postformat(e)},i.from=function(e,t){return this.isValid()&&(h(e)&&e.isValid()||W(e).isValid())?C({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},i.fromNow=function(e){return this.from(W(),e)},i.to=function(e,t){return this.isValid()&&(h(e)&&e.isValid()||W(e).isValid())?C({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},i.toNow=function(e){return this.to(W(),e)},i.get=function(e){return d(this[e=_(e)])?this[e]():this},i.invalidAt=function(){return m(this).overflow},i.isAfter=function(e,t){return e=h(e)?e:W(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=_(t)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},i.isBefore=function(e,t){return e=h(e)?e:W(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=_(t)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},i.isBetween=function(e,t,n,s){return e=h(e)?e:W(e),t=h(t)?t:W(t),!!(this.isValid()&&e.isValid()&&t.isValid())&&(("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n)))},i.isSame=function(e,t){var e=h(e)?e:W(e);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=_(t)||"millisecond")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},i.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},i.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},i.isValid=function(){return A(this)},i.lang=Xe,i.locale=Xt,i.localeData=Kt,i.max=we,i.min=ge,i.parsingFlags=function(){return E({},m(this))},i.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:le[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=ue(e)),s=n.length,i=0;i<s;i++)this[n[i].unit](e[n[i].unit]);else if(d(this[e=_(e)]))return this[e](t);return this},i.startOf=function(e){var t,n;if(void 0===(e=_(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=tn(t,6e4);break;case"second":t=this._d.valueOf(),t-=tn(t,1e3);break}return this._d.setTime(t),f.updateOffset(this,!0),this},i.subtract=Je,i.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},i.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},i.toDate=function(){return new Date(this.valueOf())},i.toISOString=function(e){if(!this.isValid())return null;var t=(e=!0!==e)?this.clone().utc():this;return t.year()<0||9999<t.year()?re(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):d(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",re(t,"Z")):re(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},i.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t="moment",n="";return this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",n="Z"),t="["+t+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+(n+'[")]'))},"undefined"!=typeof Symbol&&null!=Symbol.for&&(i[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},i.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},i.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},i.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},i.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},i.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-f(n[s].since).year())*e+n[s].offset;return this.year()},i.year=Ie,i.isLeapYear=function(){return he(this.year())},i.weekYear=function(e){return un.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},i.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},i.quarter=i.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},i.month=Ge,i.daysInMonth=function(){return We(this.year(),this.month())},i.week=i.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},i.isoWeek=i.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},i.weeksInYear=function(){var e=this.localeData()._week;return P(this.year(),e.dow,e.doy)},i.weeksInWeekYear=function(){var e=this.localeData()._week;return P(this.weekYear(),e.dow,e.doy)},i.isoWeeksInYear=function(){return P(this.year(),1,4)},i.isoWeeksInISOWeekYear=function(){return P(this.isoWeekYear(),1,4)},i.date=ke,i.day=i.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},i.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},i.isoWeekday=function(e){return this.isValid()?null!=e?(t=e,n=this.localeData(),n="string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t,this.day(this.day()%7?n:n-7)):this.day()||7:null!=e?this:NaN;var t,n},i.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},i.hour=i.hours=k,i.minute=i.minutes=_e,i.second=i.seconds=ve,i.millisecond=i.milliseconds=ye,i.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(Ye,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?qt(this,C(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,f.updateOffset(this,!0),this._changeInProgress=null)),this},i.utc=function(e){return this.utcOffset(0,e)},i.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Et(this),"m")),this},i.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(Se,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},i.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?W(e).utcOffset():0,(this.utcOffset()-e)%60==0)},i.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},i.isLocal=function(){return!!this.isValid()&&!this._isUTC},i.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},i.isUtc=At,i.isUTC=At,i.zoneAbbr=function(){return this._isUTC?"UTC":""},i.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},i.dates=e("dates accessor is deprecated. Use date instead.",ke),i.months=e("months accessor is deprecated. Use month instead",Ge),i.years=e("years accessor is deprecated. Use year instead",Ie),i.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),i.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e,t={};return $(t,this),(t=Nt(t))._a?(e=(t._isUTC?l:W)(t._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&g(e[a])!==g(t[a]))&&r++;return r+i}(t._a,e.toArray())):this._isDSTShifted=!1,this._isDSTShifted});w=K.prototype;function cn(e,t,n,s){var i=mt(),s=l().set(s,t);return i[n](s,e)}function fn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=cn(e,i,n,"month");return s}function mn(e,t,n,s){t=("boolean"==typeof e?u(t)&&(n=t,t=void 0):(t=e,e=!1,u(n=t)&&(n=t,t=void 0)),t||"");var i,r=mt(),a=e?r._week.dow:0,o=[];if(null!=n)return cn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}w.calendar=function(e,t,n){return d(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},w.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(te).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},w.invalidDate=function(){return this._invalidDate},w.ordinal=function(e){return this._ordinal.replace("%d",e)},w.preparse=dn,w.postformat=dn,w.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return d(i)?i(e,t,n,s):i.replace(/%d/i,e)},w.pastFuture=function(e,t){return d(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},w.set=function(e){var t,n;for(n in e)c(e,n)&&(d(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},w.eras=function(e,t){for(var n,s=this._eras||mt("en")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case"string":n=f(s[i].since).startOf("day"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=f(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf();break}}return s},w.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s];break}else if(0<=[r,a,o].indexOf(e))return u[s]},w.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?f(e.since).year():f(e.since).year()+(t-e.offset)*n},w.erasAbbrRegex=function(e){return c(this,"_erasAbbrRegex")||an.call(this),e?this._erasAbbrRegex:this._erasRegex},w.erasNameRegex=function(e){return c(this,"_erasNameRegex")||an.call(this),e?this._erasNameRegex:this._erasRegex},w.erasNarrowRegex=function(e){return c(this,"_erasNarrowRegex")||an.call(this),e?this._erasNarrowRegex:this._erasRegex},w.months=function(e,t){return e?(a(this._months)?this._months:this._months[(this._months.isFormat||He).test(t)?"format":"standalone"])[e.month()]:a(this._months)?this._months:this._months.standalone},w.monthsShort=function(e,t){return e?(a(this._monthsShort)?this._monthsShort:this._monthsShort[He.test(t)?"format":"standalone"])[e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},w.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=S.call(this._shortMonthsParse,e))?i:null:-1!==(i=S.call(this._longMonthsParse,e))?i:null:"MMM"===t?-1!==(i=S.call(this._shortMonthsParse,e))||-1!==(i=S.call(this._longMonthsParse,e))?i:null:-1!==(i=S.call(this._longMonthsParse,e))||-1!==(i=S.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},w.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ee.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Le),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},w.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ee.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},w.week=function(e){return qe(e,this._week.dow,this._week.doy).week},w.firstDayOfYear=function(){return this._week.doy},w.firstDayOfWeek=function(){return this._week.dow},w.weekdays=function(e,t){return t=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"],!0===e?Be(t,this._week.dow):e?t[e.day()]:t},w.weekdaysMin=function(e){return!0===e?Be(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},w.weekdaysShort=function(e){return!0===e?Be(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},w.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=S.call(this._weekdaysParse,e))?i:null:"ddd"===t?-1!==(i=S.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:"dddd"===t?-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._shortWeekdaysParse,e))||-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:"ddd"===t?-1!==(i=S.call(this._shortWeekdaysParse,e))||-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:-1!==(i=S.call(this._minWeekdaysParse,e))||-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},w.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Ke),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},w.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},w.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},w.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},w.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ct("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===g(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),f.lang=e("moment.lang is deprecated. Use moment.locale instead.",ct),f.langData=e("moment.langData is deprecated. Use moment.localeData instead.",mt);var _n=Math.abs;function yn(e,t,n,s){t=C(t,n);return e._milliseconds+=s*t._milliseconds,e._days+=s*t._days,e._months+=s*t._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function pn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}pe=kn("ms"),me=kn("s"),Ce=kn("m"),we=kn("h"),ge=kn("d"),Je=kn("w"),k=kn("M"),_e=kn("Q"),ve=kn("y");function vn(e){return function(){return this.isValid()?this._data[e]:NaN}}var ye=vn("milliseconds"),ke=vn("seconds"),Ie=vn("minutes"),w=vn("hours"),Mn=vn("days"),Dn=vn("months"),Sn=vn("years");var Yn=Math.round,On={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function bn(e,t,n,s){var i=C(e).abs(),r=Yn(i.as("s")),a=Yn(i.as("m")),o=Yn(i.as("h")),u=Yn(i.as("d")),l=Yn(i.as("M")),h=Yn(i.as("w")),i=Yn(i.as("y")),r=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return(r=(r=null!=n.w?r||h<=1&&["w"]||h<n.w&&["ww",h]:r)||l<=1&&["M"]||l<n.M&&["MM",l]||i<=1&&["y"]||["yy",i])[2]=t,r[3]=0<+e,r[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,r)}var xn=Math.abs;function Tn(e){return(0<e)-(e<0)||+e}function Nn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,r,a,o=xn(this._milliseconds)/1e3,u=xn(this._days),l=xn(this._months),h=this.asSeconds();return h?(e=y(o/60),t=y(e/60),o%=60,e%=60,n=y(l/12),l%=12,s=o?o.toFixed(3).replace(/\.?0+$/,""):"",i=Tn(this._months)!==Tn(h)?"-":"",r=Tn(this._days)!==Tn(h)?"-":"",a=Tn(this._milliseconds)!==Tn(h)?"-":"",(h<0?"-":"")+"P"+(n?i+n+"Y":"")+(l?i+l+"M":"")+(u?r+u+"D":"")+(t||e||o?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(o?a+s+"S":"")):"P0D"}var U=Ct.prototype;return U.isValid=function(){return this._isValid},U.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},U.add=function(e,t){return yn(this,e,t,1)},U.subtract=function(e,t){return yn(this,e,t,-1)},U.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=_(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+wn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(pn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},U.asMilliseconds=pe,U.asSeconds=me,U.asMinutes=Ce,U.asHours=we,U.asDays=ge,U.asWeeks=Je,U.asMonths=k,U.asQuarters=_e,U.asYears=ve,U.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*g(this._months/12):NaN},U._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*gn(pn(n)+t),n=t=0),s.milliseconds=e%1e3,e=y(e/1e3),s.seconds=e%60,e=y(e/60),s.minutes=e%60,e=y(e/60),s.hours=e%24,t+=y(e/24),n+=e=y(wn(t)),t-=gn(pn(e)),e=y(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},U.clone=function(){return C(this)},U.get=function(e){return e=_(e),this.isValid()?this[e+"s"]():NaN},U.milliseconds=ye,U.seconds=ke,U.minutes=Ie,U.hours=w,U.days=Mn,U.weeks=function(){return y(this.days()/7)},U.months=Dn,U.years=Sn,U.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,s=On;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof t&&(s=Object.assign({},On,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),e=this.localeData(),t=bn(this,!n,s,e),n&&(t=e.pastFuture(+this,t)),e.postformat(t)},U.toISOString=Nn,U.toString=Nn,U.toJSON=Nn,U.locale=Xt,U.localeData=Kt,U.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Nn),U.lang=Xe,s("X",0,0,"unix"),s("x",0,0,"valueOf"),v("x",De),v("X",/[+-]?\d+(\.\d{1,3})?/),D("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),D("x",function(e,t,n){n._d=new Date(g(e))}),f.version="2.29.4",H=W,f.fn=i,f.min=function(){return Rt("isBefore",[].slice.call(arguments,0))},f.max=function(){return Rt("isAfter",[].slice.call(arguments,0))},f.now=function(){return Date.now?Date.now():+new Date},f.utc=l,f.unix=function(e){return W(1e3*e)},f.months=function(e,t){return fn(e,t,"months")},f.isDate=V,f.locale=ct,f.invalid=I,f.duration=C,f.isMoment=h,f.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},f.parseZone=function(){return W.apply(null,arguments).parseZone()},f.localeData=mt,f.isDuration=Ut,f.monthsShort=function(e,t){return fn(e,t,"monthsShort")},f.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},f.defineLocale=ft,f.updateLocale=function(e,t){var n,s;return null!=t?(s=ot,null!=R[e]&&null!=R[e].parentLocale?R[e].set(X(R[e]._config,t)):(t=X(s=null!=(n=dt(e))?n._config:s,t),null==n&&(t.abbr=e),(s=new K(t)).parentLocale=R[e],R[e]=s),ct(e)):null!=R[e]&&(null!=R[e].parentLocale?(R[e]=R[e].parentLocale,e===ct()&&ct(e)):null!=R[e]&&delete R[e]),R[e]},f.locales=function(){return ee(R)},f.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},f.normalizeUnits=_,f.relativeTimeRounding=function(e){return void 0===e?Yn:"function"==typeof e&&(Yn=e,!0)},f.relativeTimeThreshold=function(e,t){return void 0!==On[e]&&(void 0===t?On[e]:(On[e]=t,"s"===e&&(On.ss=t-1),!0))},f.calendarFormat=function(e,t){return(e=e.diff(t,"days",!0))<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},f.prototype=i,f.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},f}); +//# sourceMappingURL=moment.min.js.map \ No newline at end of file diff --git a/webapp/public/js/authentication/requests-to-domain.js b/webapp/public/js/authentication/requests-to-domain.js new file mode 100644 index 0000000000000000000000000000000000000000..1bf9ff0e3e39edb601f7950b01c96cb83ece6dbb --- /dev/null +++ b/webapp/public/js/authentication/requests-to-domain.js @@ -0,0 +1,188 @@ +'use strict'; +import {getToken} from "./script.js"; +import Domain from "./domain.js"; + +class RequestToDomain { + + constructor() { + } + + + /** + * Funzione per ottenenere dal domain manager tutte le informazioni + * sui domini dell'utente che ha effettuato il login + */ + static async getMyDomains() { + const responseDomain = await fetch('http://localhost:3001/secured/domains', { // DA FARE: controllare che l'uri che ho specificato qui coincida con quello specificato dal domain manager + method: 'GET', + headers: { + 'Authorization': `Bearer ${await getToken()}` + } + }) ; + const domainsJson = await responseDomain.json(); + if(responseDomain.ok) { + const domainsArray = domainsJson.response; + const myDomains = domainsArray.map((d) => { + Domain.from(d) + }); + return myDomains; + } + else + throw domainsJson; + } + + + /** + * Effettua la richiesta per creare un nuovo dominio. + * @param {*} json descrizione json del dominio che si vuole creare. + * @returns true se il dominio è stato creato, + * false altrimenti. + */ + static async createNewDomain(json) { + const response = await fetch('http://localhost:3001/install', { + method: 'POST', + headers: { + 'Authorization': `Bearer ${await getToken()}` + }, + body: JSON.stringify(json) + }); + if(response.ok) { + return true; + } + else { + return false; + } + } + + + /** + * Effettua la richiesta al domain manager per ottenere tutti i sevizi + * disponibili. + */ + static async getAllServices() { + const responseDomain = await fetch('http://localhost:3001/secured/services', { // DA FARE: controllare che l'uri che ho specificato qui coincida con quello specificato dal domain manager + method: 'GET', + headers: { + 'Authorization': `Bearer ${await getToken()}` + } + }) ; + const servicesJson = await responseDomain.json(); + if(responseDomain.ok) { + const servicesArray = servicesJson.response; + return servicesArray; + } + else + throw servicesJson; + } + + + /** + * Effettua la richiesta al domain manager per far partire un dominio. + * @param {*} d dominio che si vuole far partire. + * @returns true se il dominio è stato fatto partire, + * false altrimenti. + */ + static async startDomain(d) { + const response = await fetch('http://localhost:3001/start', { + method: 'POST', + headers: { + 'Authorization': `Bearer ${await getToken()}` + }, + body: JSON.stringify({domain: d.nome}) + }); + if(response.ok) { + return true; + } + else { + return false; + } + } + + + /** + * Effettua la richiesta al domain manager per fermare un dominio. + * @param {*} d dominio che si vuole fermare. + * @returns true se il dominio è stato fermato, + * false altrimenti. + */ + static async stopDomain(d) { + const response = await fetch('http://localhost:3001/stop', { + method: 'POST', + headers: { + 'Authorization': `Bearer ${await getToken()}` + }, + body: JSON.stringify({domain: d.nome}) + }); + if(response.ok) { + return true; + } + else { + return false; + } + } + + + /** + * Effettua la richiesta al domain manager per cancellare un dominio. + * @param {*} d dominio che si vuole cancellare. + * @returns true se la cancellazione è andata a buon fine, + * false altrimenti. + */ + static async deleteDomain(d) { + const response = await fetch('http://localhost:3001/delete', { + method: 'POST', + headers: { + 'Authorization': `Bearer ${await getToken()}` + }, + body: JSON.stringify({domain: d.nome}) + }); + if(response.ok) { + return true; + } + else { + return false; + } + } + + /** + * Effettua la richiesta al domain manager per ottenere tutti i servizi in uso dal dominio + * @param {*} domain + * @returns + */ + static async getUsedServices(domain) { + const response = await fetch(`http://localhost:3001/secured/services?domain=${domain}`, { + method: 'GET', + headers: { + 'Authorization': `Bearer ${await getToken()}` + } + }); + const servicesJson = await response.json();//{response: ["servizio1", "servizio2"]}; + if(response.ok) { + return servicesJson.response; + } + else + throw servicesJson; + } + + /** + * Effettua la richiesta al domain manager per sapere se l'utente e' un amministratore del dominio o meno + * @param {*} domain + * @returns + */ + static async getUserPriviledges(domain) { + const response = await fetch(`http://localhost:3001/secured/privileges?domain=${domain}`, { + method: 'GET', + headers: { + 'Authorization': `Bearer ${await getToken()}` + } + }); + const privilegesJson = await response.json();//{response: "U"} || {response: "A"}; + if(response.ok) { + return privilegesJson.response; + } + else + throw privilegesJson; + } +} + +export default RequestToDomain; \ No newline at end of file diff --git a/webapp/public/js/authentication/script.js b/webapp/public/js/authentication/script.js new file mode 100644 index 0000000000000000000000000000000000000000..f754ebe2684ed0a2368adb6ef5014c43f39c5ae4 --- /dev/null +++ b/webapp/public/js/authentication/script.js @@ -0,0 +1,179 @@ +'use strict'; +import Secure from './secure.js'; +import App from './app.js'; +import RequestToDomain from './requests-to-domain.js'; +// import * as jose from 'jose'; // per la gestione del token + + +const mySecure = new Secure(); + +let token = null; +let expirationTime = null; // momento a partire dal quale il token non sarà più valido +let alreadyRefreshed = false; // true se ho appena fatto la richiesta del token usando il refresh token +let oldTimeout = null; +const uri = window.location.toString(); + +if(!uri.includes('#') && !uri.includes("/secured/home/")) { + const a = document.getElementById("my-link"); + a.href = a.href.replace("$MY_CODE_CHALLENGE", mySecure.codeChallenge).replace("$MY_STATE", mySecure.state); + sessionStorage.setItem("stateSent", mySecure.state); // state inviato durante la richiesta dell'authcode + sessionStorage.setItem("codeVerifier", mySecure.codeVerifier); + //automatically redirect to the login page + window.location.href = a.href; +} +else if(uri.includes("#")){ + // l'uri e' del tipo localhost:3000/secured# seguito da parametri + const uriSplit = uri.split('#'); + const params = uriSplit[1].split('&'); + const uriState = queryStringGetValue(params[0]); + const uriAuthCode = queryStringGetValue(params[2]); + if(!sessionStorage.stateSent || sessionStorage.stateSent !== uriState) { + // get the body element + const body = document.getElementsByTagName('body')[0]; + body.innerHTML = `Errors in the request!`; + } + else { + await requestFirstToken(uriAuthCode); // post per la richiesta del token + if(token !== null) { + expirationTime = moment().add(token.expires_in,'s'); + sessionStorage.setItem("expirationTime", expirationTime.toJSON()); + + const myDomains = await RequestToDomain.getMyDomains(); +// const myDomains = [{nome: "casa1", stato:"on", admin: true}, +// {nome: "casa2", stato:"off", admin: false}, +// {nome: "casa3", stato:"off", admin: true}, +// {nome: "casa4", stato:"on", admin: false}, +// {nome: "casa4", stato:"on", admin: false}, +// {nome: "casa4", stato:"on", admin: false}, +// {nome: "casa4", stato:"on", admin: true}, +// {nome: "casa4", stato:"on", admin: false} +// ]; + + const app = new App(myDomains); + } + } +} else if(uri.includes('/secured/home/')) { + token = JSON.parse(sessionStorage.getItem('token')); + expirationTime = moment(sessionStorage.getItem('expirationTime')); + oldTimeout = timeoutRefresh(); +} + +/** + * Ottengo il valore associato al parametro. + * @param {*} queryString query string del tipo parametro=valore. + * @returns il valore associato al parametro. + */ +function queryStringGetValue(queryString) { + const arr = queryString.split('='); + return arr[1]; +} + + +/** + * Post per la richiesta del token + * @returns il token ottenuto + */ +async function requestFirstToken(uriAuthCode) { + + const url = 'http://localhost:8080/realms/test00/protocol/openid-connect/token'; + const response = await fetch(url, { + method: 'POST', + headers: { + 'Content-type':'application/x-www-form-urlencoded' + }, + body: new URLSearchParams({ + grant_type: 'authorization_code', + client_id: 'myclient', + code_verifier: sessionStorage.getItem("codeVerifier"), + code: uriAuthCode, + redirect_uri: 'http://localhost:3000/secured' + }) + }); + token = await response.json(); + if(response.ok) { + sessionStorage.setItem("token", JSON.stringify(token)); + oldTimeout = timeoutRefresh(); + } + else + token = null; +} + + +async function getToken() { + const now = moment(); + if(now - expirationTime < 1) { + //this token has expired, so request new token + await requestUsingRefreshToken(); + } + return token.access_token; +} + + +/** + * Post per la richiesta del token usando il refresh token. + */ + async function requestUsingRefreshToken() { + const url = 'http://localhost:8080/realms/test00/protocol/openid-connect/token'; + const response = await fetch(url, { + method: 'POST', + headers: { + 'Content-type':'application/x-www-form-urlencoded' + }, + body: new URLSearchParams({ + grant_type: 'refresh_token', + client_id: 'myclient', + refresh_token: `${token.refresh_token}` + }) + }); + token = await response.json(); + if(response.ok) { + alreadyRefreshed = true; + sessionStorage.setItem("token", JSON.stringify(token)); + expirationTime = moment().add(token.expires_in,'s'); + sessionStorage.setItem("expirationTime", expirationTime.toJSON()); + oldTimeout = timeoutRefresh(); + } + else + token = null; +} + + +/** + * Prima che scada il refresh token, richiedo nuovamente il token + * (usando il refresh token). + * @returns id di setTimeout() + */ +function timeoutRefresh() { + if(oldTimeout !== null) + clearTimeout(oldTimeout); + + return setTimeout(async () => { + if(!alreadyRefreshed) { + await requestUsingRefreshToken(); + alreadyRefreshed = false; + } + }, 10000);//(token.refresh_expires_in*1000)-5000); +} + + +/** + * Effettua il logout. + */ +async function logoutKeycloak() { + if(token == null) + return; + clearTimeout(oldTimeout); // DA FARE: funziona, ma vedere se fare il redirect alla pagina iniziale. + window.location.href = `http://localhost:8080/realms/test00/protocol/openid-connect/logout?id_token_hint=${await getIdToken()}`; +} + + +async function getIdToken() { + const now = moment(); + if(now - expirationTime < 1) { + //this token has expired, so request new token + await requestUsingRefreshToken(); + } + return token.id_token; +} + +export {getToken, logoutKeycloak}; diff --git a/webapp/public/js/authentication/secure.js b/webapp/public/js/authentication/secure.js new file mode 100644 index 0000000000000000000000000000000000000000..8d3ba13d6d6eb08ebf8c9eb91ecd4abdd396cad9 --- /dev/null +++ b/webapp/public/js/authentication/secure.js @@ -0,0 +1,20 @@ +'use strict'; + +class Secure { + + constructor() { + this.codeVerifier = this.base64URLEncode(CryptoJS.lib.WordArray.random(50)); + this.state = this.base64URLEncode(CryptoJS.lib.WordArray.random(50)); + this.codeChallenge = this.base64URLEncode(CryptoJS.SHA256(this.codeVerifier)); + } + + base64URLEncode(str) { + return CryptoJS.enc.Base64.stringify(str) + .replace(/\+/g, '-') + .replace(/\//g, '_') + .replace(/=/g, ''); + } + +} + +export default Secure; \ No newline at end of file diff --git a/webapp/public/js/authentication/secured.js b/webapp/public/js/authentication/secured.js deleted file mode 100644 index 069fb887849f797e6a97b3078d456ce195f42790..0000000000000000000000000000000000000000 --- a/webapp/public/js/authentication/secured.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -// import Keycloak from './keycloak-js'; - - -class Secured { - constructor() { - this.keycloak = null; - this.authenticated = false; - const body = document.getElementById('body-id'); - body.onload = function() { - const keycloak = new Keycloak('http://localhost:3000/keycloak.json'); - keycloak.init({ - onLoad: 'login-required' // login-required will authenticate the client if the user is logged-in to Keycloak or display the login page if not. - }).then(function(authenticated) { - this.keycloak = keycloak; - this.authenticated = authenticated; - }); - } - } - - async getUserInfo() { - if(this.keycloak) { - const userInfo = await this.keycloak.loadUserProfile(); - return {name: userInfo.name, email: userInfo.email, id: userInfo.sub}; - } - return null; - } - - logout() { - if(this.keycloak) - this.keycloak.logout(); - } -} - -export default Secured; \ No newline at end of file diff --git a/webapp/public/js/script.js b/webapp/public/js/script.js deleted file mode 100644 index bb4f5cb5a651ba3a900d016f7d72c1c6ceb18234..0000000000000000000000000000000000000000 --- a/webapp/public/js/script.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -import Luci from './luci.js'; -import Scenari from "./scenari.js"; -import Antifurto from "./antifurto.js"; -import Sensori from './sensori.js'; -import Secured from './authentication/secured.js'; -// import { setToggleMovement } from "./toggles.js"; - -// launch each class -new Secured(); -new Sensori(); -new Antifurto(); -new Scenari(); - -setTimeout(() => { - new Luci(); -}, 1000); -// setToggleMovement(); - diff --git a/webapp/public/js/scriptIndex.js b/webapp/public/js/scriptIndex.js new file mode 100644 index 0000000000000000000000000000000000000000..e5f9536ad5fc525fee2581d7cc8aa72c8b54d521 --- /dev/null +++ b/webapp/public/js/scriptIndex.js @@ -0,0 +1,69 @@ +"use strict"; +import { logoutKeycloak } from './authentication/script.js';//qui lo script si prende il token +import RequestToDomain from './authentication/requests-to-domain.js'; +import Sensori from './sensori.js'; +import Antifurto from "./antifurto.js"; +import Scenari from "./scenari.js"; +import Luci from './luci.js'; + + +const logout = document.getElementById("button-logout"); +logout.addEventListener('click', () => { + logoutKeycloak(); +}); + +// ask domain to know which service should be used +const servicesArray = await RequestToDomain.getUsedServices(); +const userPriviledges = await RequestToDomain.getUserPriviledges(); + +new Sensori(); +const boolArray = [false,false,false]; + +for(const service of servicesArray) { + if(service === 'antifurto') { + boolArray[0] = true; + } + else if(service === 'scenari') { + boolArray[1] = true; + } + else if(service === 'luci') { + boolArray[2] = true; + } +} + +// launch each class +const antifurtobtn = document.getElementById("antifurto-btn"); +if(boolArray[0]) + new Antifurto(); +else { + antifurtobtn.classList.add('invisible'); +} + + +const scenariBtn = document.getElementById("scenari-btn"); +if(boolArray[1]) + new Scenari(); +else { + scenariBtn.classList.add('invisible'); +} + +const luciBtn = document.getElementById("luci-btn"); +if(boolArray[2]) + new Luci(); +else { + luciBtn.classList.add('invisible'); +} + +// if there is only one service, click the related button +// search if there's only one true in the boolArray +if(servicesArray.length === 1) { + const btn = document.getElementById(`${servicesArray[0]}-btn`); + btn.click(); + // btn.classList.add('invisible'); +} + +// if the user is an admin, show the admin panel +if(userPriviledges.toLowerCase() === 'a') { + const adminPanel = document.querySelectorAll(".admin-panel"); + adminPanel.classList.remove('invisible'); +} \ No newline at end of file diff --git a/webapp/public/js/templates/create-new-domain-template.js b/webapp/public/js/templates/create-new-domain-template.js new file mode 100644 index 0000000000000000000000000000000000000000..822d7d812af0faf406287bb875a92982dabec246 --- /dev/null +++ b/webapp/public/js/templates/create-new-domain-template.js @@ -0,0 +1,49 @@ +'use strict'; + +let count = 0; + +function createNewUser() { + count++; + return `<div class="row p-2" id="utente${count}"> + <div class="col"> + <label for="#nuovoUtente${count}" class="form-label">Nuovo utente</label> + <input type="text" class="form-control" id="nuovoUtente${count}" aria-describedby="#nuovoUtente${count}Help" placeholder="Inserisci il nome dell'utente"> + <div id="valid-userName${count}" class="valid-feedback"></div> + <div id="invalid-userName${count}" class="invalid-feedback"></div> + </div> + <div class="col"> + <label for="#passwordUtente${count}" class="form-label">Password utente</label> + <input type="password" class="form-control" id="passwordUtente${count}" aria-describedby="#passwordUtente${count}Help" placeholder="Inserisci la password per l'utente"> + <div id="valid-userPassword${count}" class="valid-feedback"></div> + <div id="invalid-userPassword${count}" class="invalid-feedback"></div> + </div> + <div class="col"> + <label for="#ruoloUtente${count}" class="form-label">Ruolo utente</label> + <select class="form-select" id="ruoloUtente${count}" name="ruolo"> + <option value="unselected" selected>Scegli un ruolo</option> + <option value="U">Utente</option> + <option value="A">Amministratore</option> + </select> + <div id="valid-userRole${count}" class="valid-feedback"></div> + <div id="invalid-userRole${count}" class="invalid-feedback"></div> + </div> + </div>`; +} + + +function createNewService(nomeServizio) { + return `<div class="form-check"> + <input class="form-check-input" type="checkbox" value="${nomeServizio}" id="${nomeServizio}"/> + <label class="form-check-label" for="#${nomeServizio}"> + ${nomeServizio} + </label> + </div>`; +} + + +function createControlServices() { + return `<div id="valid-services" class="valid-feedback"></div> + <div id="invalid-services" class="invalid-feedback"></div>`; +} + +export {createNewUser, createNewService, createControlServices}; \ No newline at end of file diff --git a/webapp/public/js/templates/domains-template.js b/webapp/public/js/templates/domains-template.js new file mode 100644 index 0000000000000000000000000000000000000000..25271d7cbfe94b5cf0bfbe79c0eac6ea069f1d4f --- /dev/null +++ b/webapp/public/js/templates/domains-template.js @@ -0,0 +1,23 @@ +'use strict'; + +function createRowDomain(domain) { + return ` + <th scope="row"> + <h4 class="d-flex justify-content-center mt-2"> + <a href=${domain.stato.toLowerCase() === 'on' ? '"/secured/home/"' : '"#"'}>${domain.nome} + </a> + </h4> + </th> + <td class="align-middle"> + <div class="switch-container no-box-sizing d-flex justify-content-center"> + <div class="toggle-button no-box-sizing ${domain.stato.toLowerCase() === 'on' ? 'active' : ''}"> + <div class="inner-circle no-box-sizing"></div> + </div> + </div> + </td> + <td class="d-flex justify-content-center"> + ${domain.admin == true ? '<i class="fa-solid fa-trash fa-2x py-2">' : '<div class="trash-padding"></div>'} + </td>`; +} + +export {createRowDomain}; \ No newline at end of file diff --git a/webapp/public/js/toggles.js b/webapp/public/js/toggles.js index 46a04541abf64f7786541dc83097eadb65e1cc74..4a4153154a73a4ed5acb96313e92accdead59383 100644 --- a/webapp/public/js/toggles.js +++ b/webapp/public/js/toggles.js @@ -90,4 +90,4 @@ function luciToggleCallback(toggle){ toggle.classList.toggle('active'); } -export { setToggleMovement, scenariToggleListener, luciToggleListener }; \ No newline at end of file +export { setToggleMovement, scenariToggleListener, luciToggleListener}; \ No newline at end of file diff --git a/webapp/public/params.json b/webapp/public/params.json new file mode 100644 index 0000000000000000000000000000000000000000..37d3fccc862d3c8118c31505d6f050a6193064f5 --- /dev/null +++ b/webapp/public/params.json @@ -0,0 +1,6 @@ +{ + "tokenrq":"/auth/realms/$REALM/protocol/openid-connect/token", + "coderq":"/auth/realms/$REALM/protocol/openid-connect/auth?client_id=$CLIENTID&redirect_uri=http://localhost:3000/secured&state=baf78db5-4c5b-4d56-8111-8fe63c38961a&response_mode=fragment&response_type=code&scope=openid&nonce=8fa46480-ca70-4f2f-9baf-71a6f30d6a78", + "extrabody":"grant_type=authorization_code&client_id=$CLIENTID&redirect_uri=http://localhost:3000/secured&", + "redirect_uri":"http://localhost:3000/secured" +} diff --git a/webapp/public/redirect.html b/webapp/public/redirect.html new file mode 100644 index 0000000000000000000000000000000000000000..19cbdc2d2a2ffea4625d2931eb518fffd29739a5 --- /dev/null +++ b/webapp/public/redirect.html @@ -0,0 +1,46 @@ +<!DOCTYPE html> +<html lang="it"> + +<head> + <meta charset="utf-8"> + <title id="title">SmartHome</title> + <!--<link rel="icon" href="res/favicon.png">--> + <!-- link all other useful scripts --> + + <!-- link bootstrap --> + <!--<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" + integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> + <script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" + integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" + crossorigin="anonymous"></script>--> + <!-- link fontawesome (for icons)--> + <!-- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" + integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous"> --> + <!-- <script defer src="https://kit.fontawesome.com/a1635545b7.js" crossorigin="anonymous"></script> --> + <!-- link my scripts and styles --> + <!-- <link rel="stylesheet" href="css/style.css" type="text/css"> + <link rel="stylesheet" href="css/buttons.css" type="text/css"> --> + <!-- <script defer src="https://github.com/nodejs/node/blob/v18.8.0/lib/crypto.js" type="text/javascript"></script> --> + <!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script> --> + <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script> --> + <script defer src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.min.js"></script> + <!-- <script defer src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> + <script defer src="js/authentication/axios.min.js"></script> --> + <script defer src="js/authentication/moment.min.js"></script> + <script defer src="js/authentication/script.js" type="module"></script> +</head> + +<body> + <!--<h1>Pissir SmartHome</h1>--> + <a href="http://$DOMAIN/realms/$REALM/protocol/openid-connect/auth? + response_type=code& + code_challenge=$MY_CODE_CHALLENGE& + code_challenge_method=S256& + client_id=myclient& + redirect_uri=$MY_REDIRECT_URI& + scope=openid& + nonce=a81e1a84-8885-4702-b8d1-f6c5a0d1fc4d& + response_mode=fragment& + state=$MY_STATE" id="my-link" style="visibility: hidden">I'm the best at logging in :p</a> +</body> +</html> \ No newline at end of file