ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/webresources/AbstractSingleArchiveResource.java

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

      
    
Rootfs path

      
    
Size
2607 (2.5 KB)
MD5
2a5c0c48d3f71af7b0147a08594e3d42
SHA1
535c03387b378ac43497ff5656fe8dd68ac50c0a
SHA256
1d21cf98e4d7f188e722befd4a0d1ed146b639dbb5c1836788cf861afc39944b
SHA512

      
    
SHA1_git
6b4dd225d9ed08ba1db495fd149e27a321fe4c19
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
AbstractSingleArchiveResource.java | 2.5 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.catalina.webresources; import java.io.IOException; import java.io.InputStream; import java.util.jar.JarEntry; import java.util.jar.JarFile; public abstract class AbstractSingleArchiveResource extends AbstractArchiveResource { protected AbstractSingleArchiveResource(AbstractArchiveResourceSet archiveResourceSet, String webAppPath, String baseUrl, JarEntry jarEntry, String codeBaseUrl) { super(archiveResourceSet, webAppPath, baseUrl, jarEntry, codeBaseUrl); } /* * Deprecated even though this is the "new" constructor as code needs to call the old constructor for now. */ @Deprecated protected AbstractSingleArchiveResource(AbstractArchiveResourceSet archiveResourceSet, String webAppPath, String baseUrl, JarEntry jarEntry) { super(archiveResourceSet, webAppPath, baseUrl, jarEntry); } @Override protected JarInputStreamWrapper getJarInputStreamWrapper() { JarFile jarFile = null; try { jarFile = getArchiveResourceSet().openJarFile(); // Need to create a new JarEntry so the certificates can be read JarEntry jarEntry = jarFile.getJarEntry(getResource().getName()); InputStream is = jarFile.getInputStream(jarEntry); return new JarInputStreamWrapper(jarEntry, is); } catch (IOException ioe) { if (getLog().isDebugEnabled()) { getLog().debug(sm.getString("jarResource.getInputStreamFail", getResource().getName(), getBaseUrl()), ioe); } if (jarFile != null) { getArchiveResourceSet().closeJarFile(); } return null; } } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
45.77
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