Package java.util

Examples of java.util.Properties$XmlSupport


        StaticQueryContext staticContext = new StaticQueryContext(config);
        staticContext.setBaseURI(uri.toString());
        XQueryExpression exp = staticContext.compileQuery(query);

        Properties props = new Properties();
        props.setProperty(SaxonOutputKeys.WRAP, "no");
        props.setProperty(OutputKeys.INDENT, "no");
        props.setProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
        StringWriter res_sw = new StringWriter();
        DynamicQueryContext dynamicContext = new DynamicQueryContext(config);
        exp.run(dynamicContext, new StreamResult(res_sw), props);

        return res_sw.toString();
View Full Code Here


     *
     *  @param  port  SOCKS proxy port
     *  @param  host  SOCKS proxy hostname
     */
    public static void initSOCKS(String port, String host) {
        Properties props = System.getProperties();
        props.put(SOCKS_PORT, port);
        props.put(SOCKS_HOST, host);
        System.setProperties(props);
    }
View Full Code Here

     @param  username   the SOCKS username
     *  @param  password   the SOCKS password
     */
    public static void initSOCKSAuthentication(String username,
                                               String password) {
        Properties props = System.getProperties();
        props.put("java.net.socks.username", username);
        props.put("java.net.socks.password", password);
        System.setProperties(props);
    }
View Full Code Here

     * Clear SOCKS settings. Note that setting these properties affects
     * <b>all</b> TCP sockets in this JVM
     */
    public static void clearSOCKS() {
       
        Properties prop = System.getProperties();
        prop.remove(SOCKS_HOST);
        prop.remove(SOCKS_PORT);
        System.setProperties(prop);
    }
View Full Code Here

     * @param parentResource ...
     */
    public CryptResource(Resource resource, CryptResource parentResource) {
        this.resource = resource;
        this.parentResource = parentResource;
        users = new Properties();
    }
View Full Code Here

    }

    private synchronized void readFile() {
        BufferedReader reader = null;

        users = new Properties();

        try {
            reader = new BufferedReader(new StringReader(resource.getContent()));

            String line = reader.readLine();
View Full Code Here

        } else if(result instanceof StreamResult) {
            StreamResult streamResult = (StreamResult) result;
            final Writer writer = streamResult.getWriter();
            if(writer == null) {
                OutputStream os = streamResult.getOutputStream();
                writeItem(os, new Properties());
            } else {
                writeItem(writer, new Properties());
            }
        } else {
            throw new XQException("Unsupport Result class: " + result.getClass().getName());
        }
    }
View Full Code Here

            if (!(args[0] instanceof Scriptable)) {
                throw new IllegalArgumentException("Second argument to HopObject.definePrototype() must be Object");
            }

            Scriptable desc = (Scriptable) args[0];
            Properties childmapping = core.scriptableToProperties(desc);
            if (!childmapping.containsKey("collection")) {
                // if contained type isn't defined explicitly limit collection to our own type
                childmapping.put("collection", HopObjectCtor.this.getFunctionName());
            }

            Properties props = new Properties();
            props.put("_children", childmapping);
            DbMapping dbmap = new DbMapping(core.app, null, props, true);
            dbmap.update();

            WrappedNodeManager nmgr = core.app.getWrappedNodeManager();
            Node node = new Node("HopQuery", Long.toString(collectionId++), null, nmgr);
View Full Code Here

    @Override
    protected void assignExecutionProperties(Statement stmt) {
  if (stmt instanceof org.teiid.jdbc.TeiidStatement) {
    org.teiid.jdbc.TeiidStatement statement = (org.teiid.jdbc.TeiidStatement) stmt;

      Properties executionProperties = this.connStrategy.getEnvironment();
      if (executionProperties != null) {
    String txnautowrap = executionProperties
      .getProperty(CONNECTION_STRATEGY_PROPS.TXN_AUTO_WRAP);
    if (txnautowrap != null) {
        statement.setExecutionProperty(
          CONNECTION_STRATEGY_PROPS.TXN_AUTO_WRAP,
          txnautowrap);
    }
   
    String fetchSizeStr = executionProperties
        .getProperty(CONNECTION_STRATEGY_PROPS.FETCH_SIZE);
    if (fetchSizeStr != null) {
        try {
      fetchSize = Integer.parseInt(fetchSizeStr);
     
View Full Code Here

        byte[] encyptedData = LicenseUtil.readLicenseFileFromDisk(centraViewLicenseFile);
        byte[] encryptedLicenseFile = LicenseUtil.getLicenseFromLicenseFile(encyptedData);
        byte[] encryptedKey = LicenseUtil.getKeyFromLicenseFile(encyptedData);
        Key blowfishKey = LicenseUtil.decryptBlowfishKey(encryptedKey);

        Properties licenseFile = LicenseUtil.decryptLicenseFile(blowfishKey, encyptedData);
        licenseInstanceVO.updateLicenseInformation(licenseFile);

        count++;
      } catch (Exception e) {
        // Something went wrong in reading the file.
View Full Code Here

TOP

Related Classes of java.util.Properties$XmlSupport

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.