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

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

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

Util.readURLAsString介绍

暂无

代码示例

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

@Override
public void prepare(TreeLogger logger, ResourceContext context,
  ClientBundleRequirements requirements, JMethod method)
  throws UnableToCompleteException {
 URL[] urls = ResourceGeneratorUtil.findResources(logger, context, method);
 if (urls.length != 1) {
  logger.log(TreeLogger.ERROR, "Exactly one resource must be specified",
    null);
  throw new UnableToCompleteException();
 }
 URL resource = urls[0];
 String toWrite = Util.readURLAsString(resource);
 // This de-duplicates strings in the bundle.
 if (!hashes.containsKey(toWrite)) {
  hashes.put(toWrite, currentIndex++);
  if (!first) {
   data.append(",\n");
  } else {
   first = false;
  }
  data.append('"');
  data.append(Generator.escape(toWrite));
  data.append('"');
 }
 // Store the (possibly n:1) mapping of resource function to bundle index.
 offsets.put(method.getName(), hashes.get(toWrite));
}

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

sw.indent();
String toWrite = Util.readURLAsString(resource);

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

@Override
public void prepare(TreeLogger logger, ResourceContext context,
  ClientBundleRequirements requirements, JMethod method)
  throws UnableToCompleteException {
 URL[] urls = ResourceGeneratorUtil.findResources(logger, context, method);
 if (urls.length != 1) {
  logger.log(TreeLogger.ERROR, "Exactly one resource must be specified",
    null);
  throw new UnableToCompleteException();
 }
 URL resource = urls[0];
 String toWrite = Util.readURLAsString(resource);
 // This de-duplicates strings in the bundle.
 if (!hashes.containsKey(toWrite)) {
  hashes.put(toWrite, currentIndex++);
  if (!first) {
   data.append(",\n");
  } else {
   first = false;
  }
  data.append('"');
  data.append(Generator.escape(toWrite));
  data.append('"');
 }
 // Store the (possibly n:1) mapping of resource function to bundle index.
 offsets.put(method.getName(), hashes.get(toWrite));
}

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

@Override
public void prepare(TreeLogger logger, ResourceContext context,
  ClientBundleRequirements requirements, JMethod method)
  throws UnableToCompleteException {
 URL[] urls = ResourceGeneratorUtil.findResources(logger, context, method);
 if (urls.length != 1) {
  logger.log(TreeLogger.ERROR, "Exactly one resource must be specified",
    null);
  throw new UnableToCompleteException();
 }
 URL resource = urls[0];
 String toWrite = Util.readURLAsString(resource);
 // This de-duplicates strings in the bundle.
 if (!hashes.containsKey(toWrite)) {
  hashes.put(toWrite, currentIndex++);
  if (!first) {
   data.append(",\n");
  } else {
   first = false;
  }
  data.append('"');
  data.append(Generator.escape(toWrite));
  data.append('"');
 }
 // Store the (possibly n:1) mapping of resource function to bundle index.
 offsets.put(method.getName(), hashes.get(toWrite));
}

代码示例来源:origin: laaglu/lib-gwt-svg

String toWrite = Util.readURLAsString(resource);
if (getValidated(method)) {
  SVGValidator.validate(toWrite, resource.toExternalForm(), logger, null);

代码示例来源:origin: org.vectomatic/lib-gwt-svg

String toWrite = Util.readURLAsString(resource);
if (getValidated(method)) {
  SVGValidator.validate(toWrite, resource.toExternalForm(), logger, null);

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

Utility.writeTemplateBinaryFile(file, data);
} else {
 String data = Util.readURLAsString(url);
 Utility.writeTemplateFile(file, data, replacements);

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

Utility.writeTemplateBinaryFile(file, data);
} else {
 String data = Util.readURLAsString(url);
 Utility.writeTemplateFile(file, data, replacements);

代码示例来源:origin: com.asayama.gwt.angular/gwt-angular-util

String toWrite = Util.readURLAsString(resource);
if (toWrite.length() > MAX_STRING_CHUNK) {
  writeLongString(writer, toWrite);

代码示例来源:origin: geogebra/geogebra

String toWrite = Util.readURLAsString(resource);

代码示例来源:origin: com.asayama.gwt/gwt-util

String toWrite = Util.readURLAsString(resource);
if (toWrite.length() > MAX_STRING_CHUNK) {
  writeLongString(writer, toWrite);

代码示例来源:origin: com.asayama.gwt/gwt-util

String toWrite = Util.readURLAsString(resource);
if (toWrite.length() > MAX_STRING_CHUNK) {
  writeLongString(writer, toWrite);

代码示例来源:origin: org.vectomatic/lib-gwt-svg

String toWrite = Util.readURLAsString(resource);
if (getValidated(method)) {
  SVGValidator.validate(toWrite, resource.toExternalForm(), logger, null);

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

sw.indent();
String toWrite = Util.readURLAsString(resource);

代码示例来源:origin: laaglu/lib-gwt-svg

String toWrite = Util.readURLAsString(resource);
if (getValidated(method)) {
  SVGValidator.validate(toWrite, resource.toExternalForm(), logger, null);

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

sw.indent();
String toWrite = Util.readURLAsString(resource);

代码示例来源:origin: geogebra/geogebra

String css = Util.readURLAsString(resource);
  logger.log(Type.ERROR, "Error processing " + method.getName(),
      null);
  if (Util.readURLAsString(resource) == null) {
    logger.log(Type.ERROR,
        method.getName() + " not found:" + resource.toString(),

代码示例来源:origin: thothbot/parallax

String toWrite = Util.readURLAsString(resource);
if(toWrite.length() > 16383) {
  this.writeLongString(sw, toWrite);

相关文章