com.google.gwt.dev.util.Util.computeStrongName()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(215)

本文整理了Java中com.google.gwt.dev.util.Util.computeStrongName()方法的一些代码示例,展示了Util.computeStrongName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.computeStrongName()方法的具体详情如下:
包路径:com.google.gwt.dev.util.Util
类名称:Util
方法名:computeStrongName

Util.computeStrongName介绍

暂无

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

  1. private String getMd5HashOfData() {
  2. return Util.computeStrongName(Util.getBytes(data.toString()));
  3. }

代码示例来源:origin: com.google.gwt/gwt-servlet

  1. private static String key(ImageResourceDeclaration image, URL url) {
  2. return Util.computeStrongName(Util.readURLAsBytes(url)) + ":"
  3. + image.getScaleHeight() + ":" + image.getScaleWidth();
  4. }

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. private String getMd5HashOfData() {
  2. return Util.computeStrongName(Util.getBytes(data.toString()));
  3. }

代码示例来源:origin: net.wetheinter/gwt-user

  1. private String getMd5HashOfData() {
  2. return Util.computeStrongName(Util.getBytes(data.toString()));
  3. }

代码示例来源:origin: net.wetheinter/gwt-user

  1. boolean forceExternal) throws UnableToCompleteException {
  2. String strongName = Util.computeStrongName(data);
  3. String toReturn = strongNameToExpressions.get(strongName);
  4. if (toReturn != null) {

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. boolean forceExternal) throws UnableToCompleteException {
  2. String strongName = Util.computeStrongName(data);
  3. String toReturn = strongNameToExpressions.get(strongName);
  4. if (toReturn != null) {

代码示例来源:origin: net.wetheinter/gwt-user

  1. @Override
  2. protected void doCreateBundleForPermutation(TreeLogger logger,
  3. GeneratorContext generatorContext, FieldsImpl fields,
  4. String generatedSimpleSourceName) throws UnableToCompleteException {
  5. String partialPath = Util.computeStrongName(Util.getBytes(generatedSimpleSourceName))
  6. + BUNDLE_EXTENSION;
  7. resourceContext.setPartialPath(partialPath);
  8. fields.setInitializer(bundleBaseIdent,
  9. "\"mhtml:\" + GWT.getModuleBaseURL() + \"" + partialPath + "!cid:\"");
  10. }

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. @Override
  2. protected void doCreateBundleForPermutation(TreeLogger logger,
  3. GeneratorContext generatorContext, FieldsImpl fields,
  4. String generatedSimpleSourceName) throws UnableToCompleteException {
  5. String partialPath = Util.computeStrongName(Util.getBytes(generatedSimpleSourceName))
  6. + BUNDLE_EXTENSION;
  7. resourceContext.setPartialPath(partialPath);
  8. fields.setInitializer(bundleBaseIdent,
  9. "\"mhtml:\" + GWT.getModuleBaseURL() + \"" + partialPath + "!cid:\"");
  10. }

代码示例来源:origin: net.wetheinter/gwt-user

  1. private static String key(ImageResourceDeclaration image, URL url) {
  2. return Util.computeStrongName(Util.readURLAsBytes(url)) + ":"
  3. + image.getScaleHeight() + ":" + image.getScaleWidth();
  4. }

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. private static String key(ImageResourceDeclaration image, URL url) {
  2. return Util.computeStrongName(Util.readURLAsBytes(url)) + ":"
  3. + image.getScaleHeight() + ":" + image.getScaleWidth();
  4. }

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. private void emitPolicyFileArtifact(TreeLogger logger, GeneratorContext context,
  2. String partialPath) throws UnableToCompleteException {
  3. try {
  4. String qualifiedSourceName = serviceIntf.getQualifiedSourceName();
  5. ByteArrayOutputStream baos = new ByteArrayOutputStream();
  6. Writer writer;
  7. writer =
  8. new OutputStreamWriter(baos, SerializationPolicyLoader.SERIALIZATION_POLICY_FILE_ENCODING);
  9. writer.write("serviceClass: " + qualifiedSourceName + "\n");
  10. writer.write("path: " + partialPath + "\n");
  11. writer.close();
  12. byte[] manifestBytes = baos.toByteArray();
  13. String md5 = Util.computeStrongName(manifestBytes);
  14. OutputStream os =
  15. context.tryCreateResource(logger, MANIFEST_ARTIFACT_DIR + "/" + md5 + ".txt");
  16. os.write(manifestBytes);
  17. GeneratedResource resource = context.commitResource(logger, os);
  18. // TODO: change to Deploy when possible
  19. resource.setVisibility(Visibility.LegacyDeploy);
  20. } catch (UnsupportedEncodingException e) {
  21. logger.log(TreeLogger.ERROR, SerializationPolicyLoader.SERIALIZATION_POLICY_FILE_ENCODING
  22. + " is not supported", e);
  23. throw new UnableToCompleteException();
  24. } catch (IOException e) {
  25. logger.log(TreeLogger.ERROR, null, e);
  26. throw new UnableToCompleteException();
  27. }
  28. }

代码示例来源:origin: seanchenxi/gwt-storage

  1. private void emitPolicyFileArtifact(TreeLogger logger, GeneratorContext context,
  2. String partialPath) throws UnableToCompleteException {
  3. try {
  4. String qualifiedSourceName = serializerType.getQualifiedSourceName();
  5. ByteArrayOutputStream baos = new ByteArrayOutputStream();
  6. Writer writer;
  7. writer = new OutputStreamWriter(baos, SerializationPolicyLoader.SERIALIZATION_POLICY_FILE_ENCODING);
  8. writer.write("serviceClass: " + qualifiedSourceName + "\n");
  9. writer.write("path: " + partialPath + "\n");
  10. writer.close();
  11. byte[] manifestBytes = baos.toByteArray();
  12. String md5 = Util.computeStrongName(manifestBytes);
  13. OutputStream os =
  14. context.tryCreateResource(logger, ProxyCreator.MANIFEST_ARTIFACT_DIR + "/" + md5 + ".txt");
  15. os.write(manifestBytes);
  16. GeneratedResource resource = context.commitResource(logger, os);
  17. // TODO: change to Deploy when possible
  18. resource.setVisibility(EmittedArtifact.Visibility.LegacyDeploy);
  19. } catch (UnsupportedEncodingException e) {
  20. logger.log(TreeLogger.ERROR, SerializationPolicyLoader.SERIALIZATION_POLICY_FILE_ENCODING + " is not supported", e);
  21. throw new UnableToCompleteException();
  22. } catch (IOException e) {
  23. logger.log(TreeLogger.ERROR, null, e);
  24. throw new UnableToCompleteException();
  25. }
  26. }
  27. }

代码示例来源:origin: net.wetheinter/gwt-user

  1. private void emitPolicyFileArtifact(TreeLogger logger, GeneratorContext context,
  2. String partialPath) throws UnableToCompleteException {
  3. try {
  4. String qualifiedSourceName = serviceIntf.getQualifiedSourceName();
  5. ByteArrayOutputStream baos = new ByteArrayOutputStream();
  6. Writer writer;
  7. writer =
  8. new OutputStreamWriter(baos, SerializationPolicyLoader.SERIALIZATION_POLICY_FILE_ENCODING);
  9. writer.write("serviceClass: " + qualifiedSourceName + "\n");
  10. writer.write("path: " + partialPath + "\n");
  11. writer.close();
  12. byte[] manifestBytes = baos.toByteArray();
  13. String md5 = Util.computeStrongName(manifestBytes);
  14. OutputStream os =
  15. context.tryCreateResource(logger, MANIFEST_ARTIFACT_DIR + "/" + md5 + ".txt");
  16. os.write(manifestBytes);
  17. GeneratedResource resource = context.commitResource(logger, os);
  18. // TODO: change to Deploy when possible
  19. resource.setVisibility(Visibility.LegacyDeploy);
  20. } catch (UnsupportedEncodingException e) {
  21. logger.log(TreeLogger.ERROR, SerializationPolicyLoader.SERIALIZATION_POLICY_FILE_ENCODING
  22. + " is not supported", e);
  23. throw new UnableToCompleteException();
  24. } catch (IOException e) {
  25. logger.log(TreeLogger.ERROR, null, e);
  26. throw new UnableToCompleteException();
  27. }
  28. }

代码示例来源:origin: net.wetheinter/gwt-user

  1. String serializationPolicyName = Util.computeStrongName(serializationPolicyFileContents);

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. String serializationPolicyName = Util.computeStrongName(serializationPolicyFileContents);

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. String bundleFileName = Util.computeStrongName(imageBytes) + ".cache."
  2. + BUNDLE_FILE_TYPE;

代码示例来源:origin: net.wetheinter/gwt-user

  1. String bundleFileName = Util.computeStrongName(imageBytes) + ".cache."
  2. + BUNDLE_FILE_TYPE;

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. String strongName = Util.computeStrongName(data);

代码示例来源:origin: net.wetheinter/gwt-user

  1. String strongName = Util.computeStrongName(data);

相关文章