All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.commons.configuration2.ConfigurationDecoder Maven / Gradle / Ivy

Go to download

Tools to assist in the reading of configuration/preferences files in various formats

There is a newer version: 2.10.1
Show newest version
/*
 * 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.configuration2;

/**
 * 

* An interface for decoding encoded values from a configuration source. *

*

* Using this interface it is possible to store encoded or encrypted values in a * configuration file. An implementing object can be assigned to a configuration * object. The {@code getEncodedString()} method of the * {@link ImmutableConfiguration} interface makes use of this instance to decode * the value read from the configuration file before it is passed to the caller. *

*

* By providing custom implementations of this interface an application can add * support for different kinds of encoded strings in configuration files. *

* * @since 2.0 */ public interface ConfigurationDecoder { /** * Decodes the specified string. This method is called with a string in * encoded form read from a configuration file. An implementation has to be * perform an appropriate decoding and return the result. This result is * passed to the calling application; so it should be in a readable form. * * @param s the string to be decoded (not null) * @return the decoded string */ String decode(String s); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy