Package java.util

Examples of java.util.Enumeration


            if (jdbcURL.getConnectionURL() != null) {
              info.setProperty(TeiidURL.CONNECTION.SERVER_URL, jdbcURL.getConnectionURL());
            }
            Properties optionalParams = jdbcURL.getProperties();
            JDBCURL.normalizeProperties(info);
            Enumeration keys = optionalParams.keys();
            while (keys.hasMoreElements()) {
                String propName = (String)keys.nextElement();
                // Don't let the URL properties override the passed-in Properties object.
                if (!info.containsKey(propName)) {
                    info.setProperty(propName, optionalParams.getProperty(propName));
                }
            }
View Full Code Here


        sb.append("Note the (MISSING) at the end to designate that the classpath entry is missing");//$NON-NLS-1$
       
       
        try {
            // find all the patch readme files and print those out.
            Enumeration readmes =  ClassLoader.getSystemResources("patch_readme.txt")//$NON-NLS-1$       
            sb.append( LINE_SEPARATOR );
            sb.append( LINE_SEPARATOR );

            sb.append("---- Patch Readme Entries----"); //$NON-NLS-1$
            sb.append( LINE_SEPARATOR );
            int cnt = 0;
            if (readmes != null) {
               
                while(readmes.hasMoreElements()) {
                    ++cnt;
                    URL url = (URL) readmes.nextElement();
                    sb.append("Patch " + url.getFile() + ":"); //$NON-NLS-1$ //$NON-NLS-2$
                    sb.append( LINE_SEPARATOR );
                    InputStream is = url.openStream();
                    byte[] data = ObjectConverterUtil.convertToByteArray(is);
                    sb.append(new String(data));
View Full Code Here

          logger.fine("Connection Url="+modifiedUrl); //$NON-NLS-1$
        }
       
        // Now clone the properties object and remove password and trusted token
        if (info != null) {
            Enumeration enumeration = info.keys();
            while (enumeration.hasMoreElements()) {
                String key = (String)enumeration.nextElement();
                Object anObj = info.get(key);
                // Log each property except for password and token.
                if (!TeiidURL.CONNECTION.PASSWORD.equalsIgnoreCase(key)) {
                    logger.fine(key+"="+anObj); //$NON-NLS-1$
                }
View Full Code Here

   * the first Map should represent the properties itself, the second Map the internal
   * defaults of the properties, the third Map the defaults of the second Map, and so on...
   * @return true all keys are present, false otherwise
   */
    private static final boolean verifyAllPropsPresent(Properties props, List chainOfMappings){
      Enumeration e = props.propertyNames();
    HashSet propNames = new HashSet();
      while (e.hasMoreElements()) {
            propNames.add( e.nextElement());
      }
     
      HashSet testNames = new HashSet();
        Iterator i = chainOfMappings.iterator();
        while (i.hasNext()) {
View Full Code Here

   * the first Map should represent the properties itself, the second Map the internal
   * defaults of the properties, the third Map the defaults of the second Map, and so on...
   * @return true if props correctly reflects the chainOfMappings, false otherwise
   */
  private static final boolean verifyCorrectMappings(Properties props, List chainOfMappings){
      Enumeration e = props.propertyNames();
    boolean allGood = true;
      while (e.hasMoreElements() && allGood) {
      boolean foundKey = false;
            String propName = (String) e.nextElement();
      String propValue = props.getProperty(propName);
            Iterator i = chainOfMappings.iterator();
            while (i.hasNext() && !foundKey) {
                Map aMapping = (Map) i.next();
                Object value = aMapping.get(propName);
View Full Code Here

  }

 
  @SuppressWarnings("unchecked")
  public static final void unzip(File file, File targetDir) throws ZipException, IOException {
      Enumeration entries = null;
      ZipFile zipFile = null;
      try {
        zipFile = new ZipFile(file);
       
        entries = zipFile.entries();

        while(entries.hasMoreElements()) {
          ZipEntry entry = (ZipEntry)entries.nextElement();
          if(entry.isDirectory()) {
            (new File(targetDir, entry.getName())).mkdir();
            continue;
          }
          InputStream in = zipFile.getInputStream(entry);
View Full Code Here

public class SortedProperties extends Properties {

  @SuppressWarnings("unchecked")
  public synchronized Enumeration keys() {
    Enumeration keysEnum = super.keys();
    Vector genericKeyList = new Vector();
    Vector prefixKeyList = new Vector();

    while (keysEnum.hasMoreElements()) {
      String key = (String) keysEnum.nextElement();
      if (key.contains(".")) {
        prefixKeyList.add(key);
      } else {
        genericKeyList.add(key);
      }
View Full Code Here

      // formulaire est connu et on peut les g�rer comme ce que j'ai
      // fait plus haut ( login, password ... )
      // CETTE PARTIE N'EST DONC PAS A REPRENDRE.

      // sauve les metaData
      Enumeration ps = request.getParameterNames();
      while (ps.hasMoreElements()) {
        String name = ps.nextElement() + "";
        if (name.startsWith("META_")) {
          name = name.substring(5);
          u.setMetaData(name, request.getParameter("META_" + name));
        }
      }
View Full Code Here

      // formulaire est connu et on peut les g�rer comme ce que j'ai
      // fait plus haut ( login, password ... )
      // CETTE PARTIE N'EST DONC PAS A REPRENDRE.

      // sauve les metaData
      Enumeration ps = request.getParameterNames();
      while (ps.hasMoreElements()) {
        String name = ps.nextElement() + "";
        if (name.startsWith("META_")) {
          name = name.substring(5);
          u.setMetaData(name, request.getParameter("META_" + name));
        }
      }
View Full Code Here

      // formulaire est connu et on peut les g�rer comme ce que j'ai
      // fait plus haut ( login, password ... )
      // CETTE PARTIE N'EST DONC PAS A REPRENDRE.

      // sauve les metaData
      Enumeration ps = request.getParameterNames();
      while (ps.hasMoreElements()) {
        String name = ps.nextElement() + "";
        if (name.startsWith("META_")) {
          name = name.substring(5);
          u.setMetaData(name, request.getParameter("META_" + name));
        }
      }
View Full Code Here

TOP

Related Classes of java.util.Enumeration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.