Java Code Examples for java.util.Hashtable#putAll()
The following examples show how to use
java.util.Hashtable#putAll() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: jdk-1.7-annotated File: BasicPermission.java License: Apache License 2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the perms field out as a Hashtable for * serialization compatibility with earlier releases. all_allowed * and permClass unchanged. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<String, Permission> permissions = new Hashtable<>(perms.size()*2); synchronized (this) { permissions.putAll(perms); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("all_allowed", all_allowed); pfields.put("permissions", permissions); pfields.put("permClass", permClass); out.writeFields(); }
Example 2
Source Project: jdk1.8-source-analysis File: BasicPermission.java License: Apache License 2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the perms field out as a Hashtable for * serialization compatibility with earlier releases. all_allowed * and permClass unchanged. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<String, Permission> permissions = new Hashtable<>(perms.size()*2); synchronized (this) { permissions.putAll(perms); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("all_allowed", all_allowed); pfields.put("permissions", permissions); pfields.put("permClass", permClass); out.writeFields(); }
Example 3
Source Project: Bytecoder File: Permissions.java License: Apache License 2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the permsMap field out as a Hashtable for * serialization compatibility with earlier releases. */ @java.io.Serial private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<Permission, Permission> perms = new Hashtable<>(permsMap.size()*2); perms.putAll(permsMap); // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("perms", perms); out.writeFields(); }
Example 4
Source Project: openjdk-8 File: Permissions.java License: GNU General Public License v2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the permsMap field out as a Hashtable for * serialization compatibility with earlier releases. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<Permission, Permission> perms = new Hashtable<>(permsMap.size()*2); synchronized (this) { perms.putAll(permsMap); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("perms", perms); out.writeFields(); }
Example 5
Source Project: jdk8u-jdk File: Permissions.java License: GNU General Public License v2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the permsMap field out as a Hashtable for * serialization compatibility with earlier releases. allPermission * unchanged. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<Class<?>, PermissionCollection> perms = new Hashtable<>(permsMap.size()*2); // no sync; estimate synchronized (this) { perms.putAll(permsMap); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("allPermission", allPermission); // no sync; staleness OK pfields.put("perms", perms); out.writeFields(); }
Example 6
Source Project: JDKSourceCode1.8 File: Permissions.java License: MIT License | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the permsMap field out as a Hashtable for * serialization compatibility with earlier releases. allPermission * unchanged. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<Class<?>, PermissionCollection> perms = new Hashtable<>(permsMap.size()*2); // no sync; estimate synchronized (this) { perms.putAll(permsMap); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("allPermission", allPermission); // no sync; staleness OK pfields.put("perms", perms); out.writeFields(); }
Example 7
Source Project: jdk8u_jdk File: BasicPermission.java License: GNU General Public License v2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the perms field out as a Hashtable for * serialization compatibility with earlier releases. all_allowed * and permClass unchanged. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<String, Permission> permissions = new Hashtable<>(perms.size()*2); synchronized (this) { permissions.putAll(perms); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("all_allowed", all_allowed); pfields.put("permissions", permissions); pfields.put("permClass", permClass); out.writeFields(); }
Example 8
Source Project: Java8CN File: BasicPermission.java License: Apache License 2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the perms field out as a Hashtable for * serialization compatibility with earlier releases. all_allowed * and permClass unchanged. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<String, Permission> permissions = new Hashtable<>(perms.size()*2); synchronized (this) { permissions.putAll(perms); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("all_allowed", all_allowed); pfields.put("permissions", permissions); pfields.put("permClass", permClass); out.writeFields(); }
Example 9
Source Project: TencentKona-8 File: BasicPermission.java License: GNU General Public License v2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the perms field out as a Hashtable for * serialization compatibility with earlier releases. all_allowed * and permClass unchanged. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<String, Permission> permissions = new Hashtable<>(perms.size()*2); synchronized (this) { permissions.putAll(perms); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("all_allowed", all_allowed); pfields.put("permissions", permissions); pfields.put("permClass", permClass); out.writeFields(); }
Example 10
Source Project: TencentKona-8 File: Permissions.java License: GNU General Public License v2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the permsMap field out as a Hashtable for * serialization compatibility with earlier releases. allPermission * unchanged. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<Class<?>, PermissionCollection> perms = new Hashtable<>(permsMap.size()*2); // no sync; estimate synchronized (this) { perms.putAll(permsMap); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("allPermission", allPermission); // no sync; staleness OK pfields.put("perms", perms); out.writeFields(); }
Example 11
Source Project: unitime File: CourseSolverContainerRemote.java License: Apache License 2.0 | 6 votes |
public Hashtable getAssignmentInfoTable(Collection classesOrClassIds) throws Exception { Set deptIds = iRemoteSolverProxy.getDepartmentIds(); Hashtable infos = new Hashtable(); Vector solverClassesOrClassIds = new Vector(classesOrClassIds.size()); for (Iterator i=classesOrClassIds.iterator();i.hasNext();) { Object classOrClassId = i.next(); if (classOrClassId instanceof Object[]) classOrClassId = ((Object[])classOrClassId)[0]; Class_ clazz = (classOrClassId instanceof Class_ ? (Class_)classOrClassId : (new Class_DAO()).get((Long)classOrClassId)); if (clazz.getManagingDept()==null || !deptIds.contains(clazz.getManagingDept().getUniqueId())) { AssignmentPreferenceInfo info = iCommitedClassAssignmentProxy.getAssignmentInfo(clazz); if (info!=null) infos.put(clazz.getUniqueId(), info); } else { solverClassesOrClassIds.add(clazz.getUniqueId()); } } if (!solverClassesOrClassIds.isEmpty()) infos.putAll(iRemoteSolverProxy.getAssignmentInfoTable2(solverClassesOrClassIds)); return infos; }
Example 12
Source Project: hottub File: PropertyPermission.java License: GNU General Public License v2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the perms field out as a Hashtable for * serialization compatibility with earlier releases. all_allowed * unchanged. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<String, Permission> permissions = new Hashtable<>(perms.size()*2); synchronized (this) { permissions.putAll(perms); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("all_allowed", all_allowed); pfields.put("permissions", permissions); out.writeFields(); }
Example 13
Source Project: jdk8u60 File: BasicPermission.java License: GNU General Public License v2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the perms field out as a Hashtable for * serialization compatibility with earlier releases. all_allowed * and permClass unchanged. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<String, Permission> permissions = new Hashtable<>(perms.size()*2); synchronized (this) { permissions.putAll(perms); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("all_allowed", all_allowed); pfields.put("permissions", permissions); pfields.put("permClass", permClass); out.writeFields(); }
Example 14
Source Project: openjdk-jdk9 File: Permissions.java License: GNU General Public License v2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the permsMap field out as a Hashtable for * serialization compatibility with earlier releases. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<Permission, Permission> perms = new Hashtable<>(permsMap.size()*2); perms.putAll(permsMap); // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("perms", perms); out.writeFields(); }
Example 15
Source Project: jdk8u60 File: Permissions.java License: GNU General Public License v2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the permsMap field out as a Hashtable for * serialization compatibility with earlier releases. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<Permission, Permission> perms = new Hashtable<>(permsMap.size()*2); synchronized (this) { perms.putAll(permsMap); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("perms", perms); out.writeFields(); }
Example 16
Source Project: jdk8u-jdk File: Permissions.java License: GNU General Public License v2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the permsMap field out as a Hashtable for * serialization compatibility with earlier releases. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<Permission, Permission> perms = new Hashtable<>(permsMap.size()*2); synchronized (this) { perms.putAll(permsMap); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("perms", perms); out.writeFields(); }
Example 17
Source Project: openjdk-8 File: Permissions.java License: GNU General Public License v2.0 | 6 votes |
/** * @serialData Default fields. */ /* * Writes the contents of the permsMap field out as a Hashtable for * serialization compatibility with earlier releases. allPermission * unchanged. */ private void writeObject(ObjectOutputStream out) throws IOException { // Don't call out.defaultWriteObject() // Copy perms into a Hashtable Hashtable<Class<?>, PermissionCollection> perms = new Hashtable<>(permsMap.size()*2); // no sync; estimate synchronized (this) { perms.putAll(permsMap); } // Write out serializable fields ObjectOutputStream.PutField pfields = out.putFields(); pfields.put("allPermission", allPermission); // no sync; staleness OK pfields.put("perms", perms); out.writeFields(); }
Example 18
Source Project: knopflerfish.org File: FWProps.java License: BSD 3-Clause "New" or "Revised" License | 5 votes |
public Dictionary<String, String> getProperties() { final Hashtable<String, String> p = new Hashtable<String, String>(props_default); @SuppressWarnings({ "rawtypes", "unchecked" }) final Hashtable<String,String> sysProps = (Hashtable) System.getProperties(); p.putAll(sysProps); p.putAll(props); p.put(KEY_KEYS, makeKeys()); return p; }
Example 19
Source Project: uyuni File: RhnPostMockStrutsTestCase.java License: GNU General Public License v2.0 | 5 votes |
/** * Returns all request elements, including uploaded files. * * @return the all elements */ @Override public Hashtable<String, Object> getAllElements() { Hashtable<String, Object> result = new Hashtable<String, Object>(uploadedFileElements); result.putAll(request.getParameterMap()); return result; }
Example 20
Source Project: pacbot File: ConfigManager.java License: Apache License 2.0 | 4 votes |
/** * Gets the configurations map. * * @return the configurations map */ public static Hashtable<String, Object> getConfigurationsMap() { JsonArray propertySourcesArray = new JsonArray(); Hashtable<String, Object> appPropsHashtable = new Hashtable<>(); Hashtable<String, Object> rulePropsHashtable = new Hashtable<>(); Hashtable<String, Object> configHashtable = new Hashtable<>(); String configServerURL = CommonHttpUtils.getEnvironmentVariable(PacmanSdkConstants.CONFIG_SERVICE_URL); String configCredentials = CommonHttpUtils.getEnvironmentVariable(PacmanSdkConstants.CONFIG_CREDENTIALS); if (StringUtils.isNullOrEmpty(configServerURL) || StringUtils.isNullOrEmpty(configCredentials)) { logger.info(PacmanSdkConstants.MISSING_CONFIGURATION); throw new InvalidInputException(PacmanSdkConstants.MISSING_CONFIGURATION); } Map<String, Object> configCreds = CommonHttpUtils.getHeader(configCredentials); JsonObject configurationsFromPacmanTable = CommonHttpUtils.getConfigurationsFromConfigApi(configServerURL, configCreds); logger.info("Configured values {} ",configurationsFromPacmanTable); if (configurationsFromPacmanTable != null) { propertySourcesArray = configurationsFromPacmanTable.get("propertySources").getAsJsonArray(); } if (propertySourcesArray.size() > 0) { for (int i = 0; i < propertySourcesArray.size(); i++) { JsonObject propertySource = (JsonObject) propertySourcesArray.get(i); if (propertySource.get(PacmanSdkConstants.NAME).toString().contains("application")) { JsonObject appProps = propertySource.get(PacmanSdkConstants.SOURCE).getAsJsonObject(); appPropsHashtable = new Gson().fromJson(appProps,new TypeToken<Hashtable<String, Object>>() {}.getType()); } if (propertySource.get(PacmanSdkConstants.NAME).toString().contains("rule")) { JsonObject ruleProps = propertySource.get(PacmanSdkConstants.SOURCE).getAsJsonObject(); rulePropsHashtable = new Gson().fromJson(ruleProps,new TypeToken<Hashtable<String, Object>>() {}.getType()); } } } else { logger.info(PacmanSdkConstants.MISSING_DB_CONFIGURATION); throw new InvalidInputException(PacmanSdkConstants.MISSING_DB_CONFIGURATION); } configHashtable.putAll(appPropsHashtable); configHashtable.putAll(rulePropsHashtable); return configHashtable; }