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

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

      
    
Rootfs path

      
    
Size
2317 (2.3 KB)
MD5
f870b7852b756e1f78dd4114bfbf7d42
SHA1
93e4b21a6debaa1280cb41487e35aee0c446d471
SHA256
4215b1818567f602915d28d8a78a1ab5bbc471c598b111d5f26149ce27955c3b
SHA512

      
    
SHA1_git
1d6ed02e4567722b6b35c18f20157c5d5c059ed2
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
WarURLConnection.java | 2.3 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.war; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import java.security.Permission; import org.apache.tomcat.util.buf.UriUtil; public class WarURLConnection extends URLConnection { private final URLConnection wrappedJarUrlConnection; private boolean connected; protected WarURLConnection(URL url) throws IOException { super(url); URL innerJarUrl = UriUtil.warToJar(url); wrappedJarUrlConnection = innerJarUrl.openConnection(); } @Override public void connect() throws IOException { if (!connected) { wrappedJarUrlConnection.connect(); connected = true; } } @Override public InputStream getInputStream() throws IOException { connect(); return wrappedJarUrlConnection.getInputStream(); } @Override @Deprecated public Permission getPermission() throws IOException { return wrappedJarUrlConnection.getPermission(); } @Override public long getLastModified() { return wrappedJarUrlConnection.getLastModified(); } @Override public int getContentLength() { return wrappedJarUrlConnection.getContentLength(); } @Override public long getContentLengthLong() { return wrappedJarUrlConnection.getContentLengthLong(); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
51.29
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