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

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

      
    
Rootfs path

      
    
Size
2009 (2.0 KB)
MD5
57beeecb24eba4409e579943ed8f125a
SHA1
efcb3200bdd9de0a677bfcf93dd357736e5589f8
SHA256
65f85b244e0ea6cae3b6c95cdaeaa0f29816e21142b57204fb751cf26e5f7d21
SHA512

      
    
SHA1_git
955a30d01822327c8cb3da00d09ea132601f1c16
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TomcatJarInputStream.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.catalina.webresources; import java.io.IOException; import java.io.InputStream; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; import java.util.zip.ZipEntry; /** * The purpose of this subclass is to obtain references to the JarEntry objects for META-INF/ and META-INF/MANIFEST.MF * that are otherwise swallowed by the JarInputStream implementation. */ public class TomcatJarInputStream extends JarInputStream { private JarEntry metaInfEntry; private JarEntry manifestEntry; TomcatJarInputStream(InputStream in) throws IOException { super(in); } @Override protected ZipEntry createZipEntry(String name) { ZipEntry ze = super.createZipEntry(name); if (metaInfEntry == null && "META-INF/".equals(name)) { metaInfEntry = (JarEntry) ze; } else if (manifestEntry == null && "META-INF/MANIFEST.MF".equals(name)) { manifestEntry = (JarEntry) ze; } return ze; } JarEntry getMetaInfEntry() { return metaInfEntry; } JarEntry getManifestEntry() { return manifestEntry; } }
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