ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/tomcat/util/file/ConfigFileLoader.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/tomcat/util/file/ConfigFileLoader.java
Status
scanned
Type
file
Name
ConfigFileLoader.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2023 (2.0 KB)
MD5
abcc998aa73aee40a935ed8901353f2d
SHA1
c876dc4b4df7fb24dfbcf0ad886985f69e17d7b7
SHA256
341be7424ed3f848fb8e29d62f27c6cf362c9d8ee179ebc3e520830564e1dc98
SHA512

      
    
SHA1_git
c4ea3c56166e2bb292900213643544ee85e6549d
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
ConfigFileLoader.java | 2.0 KB |

/* * 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.tomcat.util.file; import java.io.InputStream; /** * This class is used to obtain {@link InputStream}s for configuration files from a given location String. This allows * greater flexibility than these files having to be loaded directly from a file system. */ public class ConfigFileLoader { private static ConfigurationSource source; /** * Get the configured configuration source. If none has been configured, a default source based on the calling * directory will be used. * * @return the configuration source in use */ public static ConfigurationSource getSource() { if (source == null) { return ConfigurationSource.DEFAULT; } return source; } /** * Set the configuration source used by Tomcat to locate various configuration resources. * * @param source The source */ public static void setSource(ConfigurationSource source) { if (ConfigFileLoader.source == null) { ConfigFileLoader.source = source; } } private ConfigFileLoader() { // Hide the constructor } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
50.21
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9