<p>
获取私钥
</p>

@param keyMap 密钥对
@return
@throws Exception
547077
public static String getPrivateKey(Map<String, Object> keyMap) throws Exception {
        Key key = (Key) keyMap.get(PRIVATE_KEY);
        return String.valueOf(Base64Utils.encode(key.getEncoded()));
    }
1246438
public static <K,V> MapAdapter<K,V> mapAdapter(final Map<K,V> map) {
        return key -> Optional.ofNullable(map.get(key));
    }
609998
@SuppressWarnings("squid:S1452")
  public static <T, K, U> Collector<T, ?, Map<K, U>> toLinkedMap(
      Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends U> valueMapper) {
    return Collectors.toMap(keyMapper, valueMapper, throwingMerger(), LinkedHashMap::new);
  }
24537
@Override
	public HashMap<String, Object> getRequestMap() {
		return (HashMap<String, Object>) JKThreadLocal.getValue(JKContextConstants.HTTP_REQUEST_MAP);
	}
437333
private J4pException mapException(Exception pException) throws J4pException {
        if (pException instanceof ConnectException) {
            return new J4pConnectException(
                    "Cannot connect to " + requestHandler.getJ4pServerUrl() + ": " + pException.getMessage(),
                    (ConnectException) pException);
        } else if (pException instanceof ConnectTimeoutException) {
            return new J4pTimeoutException(
                    "Read timeout while request " + requestHandler.getJ4pServerUrl() + ": " + pException.getMessage(),
                    (ConnectTimeoutException) pException);
        } else if (pException instanceof IOException) {
            return new J4pException("IO-Error while contacting the server: " + pException,pException);
        } else if (pException instanceof URISyntaxException) {
            URISyntaxException sExp = (URISyntaxException) pException;
            return new J4pException("Invalid URI " + sExp.getInput() + ": " + sExp.getReason(),pException);
        } else {
            return new J4pException("Exception " + pException,pException);
        }
    }
404597
@Override
  public final DatabaseWriterXml<RS> create(
    final Map<String, Object> pAddParam) throws Exception {
    DatabaseWriterXml<RS> dbWriterXmlFullImport = new DatabaseWriterXml<RS>();
    SrvEntityWriterXml srvEntityWriterXml = new SrvEntityWriterXml();
    SrvFieldWriterXmlStd srvFieldWriterXmlStd = new SrvFieldWriterXmlStd();
    srvFieldWriterXmlStd.setUtilXml(this.factoryAppBeans.lazyGetUtilXml());
    SrvFieldHasIdWriterXml srvFieldHasIdWriterXml =
      new SrvFieldHasIdWriterXml();
    srvFieldHasIdWriterXml.setUtilXml(this.factoryAppBeans.lazyGetUtilXml());
    srvEntityWriterXml.setUtlReflection(this.factoryAppBeans
      .lazyGetUtlReflection());
    Map<String, ISrvFieldWriter> fieldsWritersMap =
      new HashMap<String, ISrvFieldWriter>();
    fieldsWritersMap.put("SrvFieldWriterXmlStd", srvFieldWriterXmlStd);
    fieldsWritersMap.put("SrvFieldHasIdWriterXml", srvFieldHasIdWriterXml);
    srvEntityWriterXml.setFieldsWritersMap(fieldsWritersMap);
    srvEntityWriterXml.setMngSettings(this.factoryAppBeans
      .lazyGetMngSettingsGetDbCopy());
    dbWriterXmlFullImport.setLogger(this.factoryAppBeans.lazyGetLogger());
    dbWriterXmlFullImport.setSrvEntityWriter(srvEntityWriterXml);
    dbWriterXmlFullImport.setSrvDatabase(this.factoryAppBeans
      .lazyGetSrvDatabase());
    dbWriterXmlFullImport.setSrvOrm(this.factoryAppBeans.lazyGetSrvOrm());
    return dbWriterXmlFullImport;
  }
282995
public HashMap<String, Object> getJsonToken() throws Exception {

		HashMap<String, Object> jRTObject = new HashMap<String, Object>();

		ArrayList<Object> jThreads = new ArrayList<Object>();
		for (CallStack.Thread thread : threads) {
			jThreads.add(thread.jsonToken());
		}

		jRTObject.put("threads", jThreads);
		jRTObject.put("threadCounter", threadCounter);

		return jRTObject;
	}
890149
public static <K, V> Map<K, V> newMap(Map<K, V> initMap) {
        return new HashMap<>(initMap);
    }
1169771
public JSONArray execute() throws Exception {
        try {
            JSONArray retVal = Client.getInstance(port).map(toString());

            return retVal;
        } catch (Exception e) {
            throw new Exception(queryStringRepresentation + ": " + e.getMessage());
        }
    }
64524
public static Map.Entry<Object, Object> selectMinKeyValue(AssociativeArray keyValueMap) {
        Double minValue=Double.POSITIVE_INFINITY;
        Object minValueKey = null;
        
        for(Map.Entry<Object, Object> entry : keyValueMap.entrySet()) {
            Double value = TypeInference.toDouble(entry.getValue());
            if(value!=null && value<minValue) {
                minValue=value;
                minValueKey=entry.getKey();
            }
        }
        
        return new AbstractMap.SimpleEntry<>(minValueKey, keyValueMap.get(minValueKey));
    }
1115603
private Object getKeyForActionMap(JComponent component, KeyStroke keyStroke) {
		for (int i = 0; i < 3; i++) {
			InputMap inputMap = component.getInputMap(i);
			if (inputMap != null) {
				Object key = inputMap.get(keyStroke);
				if (key != null) {
					return key;
				}
			}
		}
		return null;
	}
347788
public static Map<String, Object> newFlatKeyMap(Map<String, ?> map) {
        return newFlatKeyMap(new HashMap<>(), map);
    }
900068
static public void main(String ... args) throws Exception {
        FileInputStream fin = new FileInputStream(args[0]);
        XMLReader<Sample> reader = new XMLReader<Sample>();
        
        for( Map<String,Object> map : reader.read(fin, Sample.class) ) {
            System.out.println("Next...");
            for( Map.Entry<String,Object> entry : map.entrySet() ) {
                System.out.println("\t" + entry.getKey() + " (" + (entry.getValue() != null ? entry.getValue().getClass().getName() : "") + "): " + entry.getValue());
            }
        }
    }
449138
private SoyMap newSoyMapFromJavaMap(Map<?, ?> javaMap) {
    Map<SoyValue, SoyValueProvider> map = Maps.newHashMapWithExpectedSize(javaMap.size());
    for (Map.Entry<?, ?> entry : javaMap.entrySet()) {
      map.put(convert(entry.getKey()).resolve(), convertLazy(entry.getValue()));
    }
    return SoyMapImpl.forProviderMap(map);
  }
543902
public QueryBuilder call(String method_name, Object ... items) throws Exception {
        return map(null, method_name, items);
    }
242471
@Override
    public MapMessage createMapMessage() throws JMSRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createMapMessage");

        MapMessage mapMessage = null;

        try {
            mapMessage = jmsSession.createMapMessage();
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "createMapMessage", new Object[] { mapMessage });
        }

        return mapMessage;

    }
1272404
private Exception mapEJBException(EJSDeployedSupport s, EJBException e) throws CSIException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "mapEJBException: " + e);
        }

        Exception mappedException = null;
        String message = " ";

        // First map EJBException to a RemoteException.
        RemoteException rex;

        if (e instanceof TransactionRolledbackLocalException)
        {
            rex = new TransactionRolledbackException(message);
        }
        else if (e instanceof AccessLocalException)
        {
            rex = new AccessException(message);
        }
        else if (e instanceof InvalidTransactionLocalException)
        {
            rex = new InvalidTransactionException(message);
        }
        else if (e instanceof NoSuchObjectLocalException)
        {
            rex = new NoSuchObjectException(message);
        }
        else if (e instanceof TransactionRequiredLocalException)
        {
            rex = new TransactionRequiredException(message);
        }
        //        else if (e instanceof InvalidActivityLocalException)
//        {
//            rex = new InvalidActivityException(message);
//        }
//        else if (e instanceof ActivityRequiredLocalException)
//        {
//            rex = new ActivityRequiredException(message);
//        }
//        else if (e instanceof ActivityCompletedLocalException)
//        {
//            rex = new ActivityCompletedException(message);
//        }
        else
        {
            rex = new RemoteException(message);
        }

        // Now set detail in RemoteException.
        rex.detail = s.rootEx;

        // Since this code created the RemoteException being passed
        // to OrbUtilsImpl.mapException method, set the stack trace
        // in it to be the exception stack from the root exception
        // so that any exception chain the ORB returns to the
        // client (e.g. CORBA UnknownException case) does not point
        // to this code as being the root cause of the problem.
        rex.setStackTrace(s.rootEx.getStackTrace()); //180095

        // If the current method request came through the ORB, then the final
        // RemoteException must be mapped to the appropriate CORBA exception.
        // Otherwise, for example for WebService Endpoint methods, the
        // RemoteException does not need to be mapped to anything,
        // WebServices will do that.                                       d228774
        if (s.ivWrapper.ivInterface.ivORB)
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "mapEJBException calling OrbUtils.mapException: " + rex);
            }

            // Now have OrbUtils map to a CORBA exception for remote client stub.
            mappedException = getOrbUtils().mapException(rex);
        }
        else
        {
            mappedException = rex;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "mapEJBException returning: " + mappedException);
        }
        return mappedException;
    }