Look up the JarEntry of the entry referenced by this {@code
URLConnection}.
507721
private void findJarEntry() throws IOException {
        if (getEntryName() == null) {
            return;
        }
        jarEntry = jarFile.getJarEntry(getEntryName());
        if (jarEntry == null) {
            throw new FileNotFoundException(getEntryName());
        }
    }
906068
private ITemplateSourceEntry addJarEntry(Map<String, ITemplateSourceEntry> entries, JarEntry jarEntry) {
		String name = jarEntry.getName().substring(basePathLength);
		if(name.isEmpty()) {
			name = "/";
		}

		ITemplateSourceEntry entry = new JarTemplateSourceEntry(name, jarEntry);
		entries.put(name, entry);
		return entry;
	}
1041943
private static String parseRelativeURL(URL url, String spec) {
        String path = url.getPath();
        String result;

        int index = path.indexOf("!/");
        if (index == -1) {
            // The "jar" protocol requires that the path contain an entry path.
            // For backwards compatibility, we do not.  Instead, we just
            // canonicalize the base URL.
            try {
                url = Utils.newURL(Utils.newURL(path), spec);
            } catch (MalformedURLException ex) {
                throw new RuntimeException(ex);
            }

            result = url.toString();
        } else {
            String entry;

            if (spec.startsWith("/")) {
                // This is an absolute entry path, so we ignore the existing
                // entry path.
                entry = canonicalize(spec);
            } else {
                // Extract the existing entry path.
                entry = path.substring(index + 1);

                if (entry.endsWith("/")) {
                    // The entry ends with '/', so we can directly append the
                    // relative entry path.
                    entry = canonicalize(entry + spec);
                } else if (entry.endsWith("/.")) {
                    // We don't want the logic below because "." is not a
                    // "true" basename.
                    entry = canonicalize(entry + '/' + spec);
                } else {
                    // Strip off the basename with a ".." path segment and
                    // append the relative entry path.
                    entry = canonicalize(entry + "/../" + spec);
                }
            }

            result = path.substring(0, index) + '!' + entry;
        }
        return result;
    }
656543
private Entry<K, V> returnEntry(final Entry<K, V> e) {
    touchEntry(e.getKey());
    return e;
  }
835045
public String getSrcSetEntry() {

        StringBuffer result = new StringBuffer(128);
        if (m_currentScaler.isValid()) {
            // append the image source
            result.append(getSrcUrl());
            result.append(" ");
            // append width
            result.append(m_currentScaler.getWidth());
            result.append("w");
        }
        return result.toString();
    }
686613
@Override
	public com.liferay.trash.kernel.model.TrashEntry getTrashEntry()
		throws com.liferay.portal.kernel.exception.PortalException {
		return _cpDefinition.getTrashEntry();
	}
1267018
private PathEntry getPathEntry(UriEntry uri)
    {
        PathEntry  pathEntry = new PathEntry( ContextRouter.MAP_PATH_TYPE, "default");
        
        
        int length = uri.getLength();
        // like /a or /
        if ( length < 2) return pathEntry;
    

        String requestUri = uri.getRequestUri();
        
        String last_str = uri.get( length - 1 );
        if ( last_str.equals("*") || last_str.equals("") ) {
//            StringBuffer buffer = new StringBuffer();
//            buffer.append('/');
//            
//            for(int i = 0; i < length - 1; i++)
//            {
//                buffer.append(uri.get(i) + "/");
//            }
            
//            position of  last / charactor
            int lastPosition = requestUri.lastIndexOf('/');

            pathEntry.type = ContextRouter.MATCH_PATH_TYPE;
            pathEntry.key  = requestUri.substring(0, lastPosition + 1);
            
            // @TODO maybe we should get parameters to pathEntry
        } else {
            pathEntry.key  = requestUri;
        }
        
        return pathEntry;
    }
427722
private static <T extends Node> Map.Entry<CSNodeWrapper, T> findEntry(Map<CSNodeWrapper, T> map, Integer id) {
        if (id == null) return null;

        for (final Map.Entry<CSNodeWrapper, T> entry : map.entrySet()) {
            if (entry.getKey().getNextNode() != null && entry.getKey().getNextNode().getId().equals(id)) {
                return entry;
            }
        }

        return null;
    }
792541
private Entry<E> getEntry(int index) {
    Entry<E> entry = indexToEntry.get(index);
    return entry;
  }
891568
@Override
  public void getResources(Vector<URL> vector, String name)
  {
    if (_pathMap != null) {
      String cleanName = name;
      
      if (cleanName.endsWith("/"))
        cleanName = cleanName.substring(0, cleanName.length() - 1);
      
      JarMap.JarList jarEntryList = _pathMap.get(cleanName);

      for (; jarEntryList != null; jarEntryList = jarEntryList.getNext()) {
        JarEntry jarEntry = jarEntryList.getEntry();
        PathImpl path = jarEntry.getJarPath();

        path = path.lookup(name);

        try {
          URL url = new URL(path.getURL());

          if (! vector.contains(url))
            vector.add(url);
        } catch (Exception e) {
          log.log(Level.WARNING, e.toString(), e);
        }
      }
    }
    else {
      for (int i = 0; i < _jarList.size(); i++) {
        JarEntry jarEntry = _jarList.get(i);
        PathImpl path = jarEntry.getJarPath();

        path = path.lookup(name);

        if (path.exists()) {
          try {
            URL url = new URL(path.getURL());

            if (! vector.contains(url))
              vector.add(url);
          } catch (Exception e) {
            log.log(Level.WARNING, e.toString(), e);
          }
        }
      }
    }
  }
135560
@Override
  final public TraceMethod entry(String returnType, Class clazz, String methodSignature) {
    return null;
  }
993402
Reference getReference() {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "getReference");
        }

        // Create a reference object describing this class
        final Reference reference = new Reference(getConnectionType(),
                        getClass().getName(), null);

        // Make sure no-one can pull the rug from beneath us.
        synchronized (_properties) {

            // Convert the map of properties into an encoded form, where the
            // keys have the necessary prefix on the front, and the values are
            // all Strings.
            final Map encodedMap = JmsJcaReferenceUtils.getInstance()
                            .getStringEncodedMap(_properties, defaultJNDIProperties);

            // Now turn the encoded map into the reference items.
            for (final Iterator iterator = encodedMap.entrySet().iterator(); iterator
                            .hasNext();) {

                final Map.Entry entry = (Map.Entry) iterator.next();
                final String prefixedKey = (String) entry.getKey();
                final String stringForm = (String) entry.getValue();

                // Store the prefixed key and value in string form.
                reference.add(new StringRefAddr(prefixedKey, stringForm));

            }

        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(TRACE, "getReference", reference);
        }
        return reference;

    }
1187811
public SchemaEntry extractResourceLocation(SchemaEntry entry) {
        Optional<String> actualResourceUri = Optional.empty();
        if (! entry.getVocabularyDefinedBy().equals(entry.getVocabularyNamespace()))
            actualResourceUri = getContentLocation(entry.getVocabularyDefinedBy(), GENERALFORMAT, Lists.newArrayList());

        if(! actualResourceUri.isPresent())
            actualResourceUri = getContentLocation(entry.getVocabularyURI(), GENERALFORMAT, Lists.newArrayList());

        // if still nothing was found, we try to pretend to be a browser and do it over again, since some resources have really bad redirecting
        if (! actualResourceUri.isPresent() && ! entry.getVocabularyDefinedBy().equals(entry.getVocabularyNamespace()))
            actualResourceUri = getContentLocation(entry.getVocabularyDefinedBy(), TEXTHTML, Lists.newArrayList());

        if(! actualResourceUri.isPresent())
            actualResourceUri = getContentLocation(entry.getVocabularyURI(), TEXTHTML, Lists.newArrayList());

        if(! actualResourceUri.isPresent()) {
            log.info("Could not find resource for " + entry.getVocabularyURI());
            return entry;
        }
        return new SchemaEntry(entry.getPrefix(), entry.getVocabularyURI(), entry.getVocabularyNamespace(), actualResourceUri.get());
    }
1089986
public Entry getEntryByUUID(final UUID UUID) {
        List<Entry> allEntries = getEntries();

        List<Entry> entries = ListFilter.filter(allEntries, new Filter<Entry>() {

            @Override
            public boolean matches(Entry item) {

                if (item.getUuid() != null && item.getUuid().compareTo(UUID) == 0) {
                    return true;
                } else {
                    return false;
                }
            }
        });

        if (entries.size() == 1) {
            return entries.get(0);
        } else {
            return null;
        }
    }
350492
protected boolean checkConnection()
    {
        super.checkConnection();
        try
        {
            if (_jarConnection!=_connection)
                newConnection();
        }
        catch(IOException e)
        {
            LogSupport.ignore(log,e);
            _jarConnection=null;
        }
        
        return _jarConnection!=null;
    }
553812
Context findNewNode(final VirtualHost.HostEntry entry) {
        return electNode(entry.getContexts(), false, null);
    }
600071
public JPAEntry getEntry(String entryKey) {
        for (JPAEntry entry : entries) {
            if (entry.getKey().equals(entryKey)) {
                return entry;
            }
        }
        return null;
    }