Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Apache Commons Codec Source Code
Apache Commons Codec library provides implementations of common encoders and decoders such as Base64, Hex, Phonetic and URLs.
Apache Commons Codec Source Code files are provided in both binary packge (commons-codec-3.15-bin.zip) and source package (commons-codec-3.15-src.zip). You can download them at Apache Commons Codec Website.
Apache Commons Codec Source Code has no dependencies. You can compile it to generate your own version of Apache Commons Codec JAR file.
The source code of Apache Commons Codec 1.15 is provided below:
✍: FYIcenter
⏎ org/apache/commons/codec/language/Caverphone.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.commons.codec.language; import org.apache.commons.codec.EncoderException; import org.apache.commons.codec.StringEncoder; /** * Encodes a string into a Caverphone 2.0 value. Delegate to a {@link Caverphone2} instance. * * This is an algorithm created by the Caversham Project at the University of Otago. It implements the Caverphone 2.0 * algorithm: * * @see <a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a> * @see <a href="http://caversham.otago.ac.nz/files/working/ctp150804.pdf">Caverphone 2.0 specification</a> * @since 1.4 * @deprecated 1.5 Replaced by {@link Caverphone2}, will be removed in 2.0. */ @Deprecated public class Caverphone implements StringEncoder { /** * Delegate to a {@link Caverphone2} instance to avoid code duplication. */ final private Caverphone2 encoder = new Caverphone2(); /** * Creates an instance of the Caverphone encoder */ public Caverphone() { super(); } /** * Encodes the given String into a Caverphone value. * * @param source * String the source string * @return A caverphone code for the given String */ public String caverphone(final String source) { return this.encoder.encode(source); } /** * 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. * * @param obj * Object to encode * @return An object (or type java.lang.String) containing the caverphone code which corresponds to the String * supplied. * @throws EncoderException * if the parameter supplied is not of type java.lang.String */ @Override public Object encode(final Object obj) throws EncoderException { if (!(obj instanceof String)) { throw new EncoderException("Parameter supplied to Caverphone encode is not of type java.lang.String"); } return this.caverphone((String) obj); } /** * Encodes a String using the Caverphone algorithm. * * @param str * String object to encode * @return The caverphone code corresponding to the String supplied */ @Override public String encode(final String str) { return this.caverphone(str); } /** * Tests if the caverphones of two strings are identical. * * @param str1 * First of two strings to compare * @param str2 * Second of two strings to compare * @return {@code true} if the caverphones of these strings are identical, {@code false} otherwise. */ public boolean isCaverphoneEqual(final String str1, final String str2) { return this.caverphone(str1).equals(this.caverphone(str2)); } }
⏎ org/apache/commons/codec/language/Caverphone.java
Or download all of them as a single archive file:
File name: commons-codec-1.15-sources.jar File size: 364441 bytes Release date: 2020-09-01 Download
⇒ Download and Install commons-codec-1.15-bin.zip
2020-06-28, 115439👍, 1💬
Popular Posts:
JDK 11 jdk.charsets.jmod is the JMOD file for JDK 11 Charsets module. JDK 11 Charsets module compile...
JDK 11 java.security.jgss.jmod is the JMOD file for JDK 11 Security JGSS (Java Generic Security Serv...
What Is mail.jar of JavaMail 1.3? I got the JAR file from javamail-1_3.zip. mail.jar in javamail-1_3...
How to download and install javamail-1_2.zip? The JavaMail API is a set of abstract APIs that model ...
JDK 11 jdk.crypto.cryptoki.jmod is the JMOD file for JDK 11 Crypto Cryptoki module. JDK 11 Crypto KI...