org.seasar.kvasir.util.io.IOUtils.writeString()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(115)

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

IOUtils.writeString介绍

暂无

代码示例

代码示例来源:origin: org.seasar.kvasir/kvasir-util

public static void writeString(OutputStream os, String string,
  String encoding, boolean normalizeLineSeparator)
{
  writeString(os, string, encoding, normalizeLineSeparator, true);
}

代码示例来源:origin: org.seasar.kvasir/kvasir-util

public static void writeString(Writer writer, String string,
  boolean normalizeLineSeparator)
{
  writeString(writer, string, normalizeLineSeparator, true);
}

代码示例来源:origin: org.seasar.kvasir/kvasir-util

public static void writeString(OutputStream os, String string,
  String encoding, boolean normalizeLineSeparator, boolean close)
{
  try {
    writeString(new OutputStreamWriter(os, encoding), string,
      normalizeLineSeparator, close);
  } catch (UnsupportedEncodingException ex) {
    throw new IORuntimeException(ex);
  }
}

代码示例来源:origin: org.seasar.cms.ymir/ymir

void commit(String response) throws IOException {
  IOUtils.writeString(getResponse().getOutputStream(), response,
      getResponseCharset(), false, false);
}

代码示例来源:origin: org.seasar.cms.ymir/ymir-extension

void createMessages(String messagesName) {

    OutputStream os;
    try {
      os = new FileResource(getSourceCreator().getResourcesDirectory())
          .getChildResource(messagesName + SUFFIX_XPROPERTIES)
          .getOutputStream();
    } catch (IOException ex) {
      throw new IORuntimeException(ex);
    }
    IOUtils.writeString(os, "", "UTF-8", false);
  }
}

代码示例来源:origin: org.seasar.kvasir/kvasir-util

public static void writeString(Resource resource, String string,
  String encoding, boolean normalizeLineSeparator)
{
  if (resource.isDirectory()) {
    throw new IllegalArgumentException("Resource type mismatch: "
      + resource.getURL());
  }
  if (string == null) {
    if (resource.exists()) {
      resource.delete();
    }
    return;
  }
  resource.getParentResource().mkdirs();
  try {
    IOUtils.writeString(resource.getOutputStream(), string, encoding,
      normalizeLineSeparator);
  } catch (ResourceNotFoundException ex) {
    throw new IORuntimeException(ex);
  }
}

代码示例来源:origin: org.seasar.cms.ymir/ymir-extension

public Response act(Request request, PathMetaData pathMetaData) {
    Template template = getTemplate(request);
    if (template == null || !template.exists()) {
      return VoidResponse.INSTANCE;
    }

    String body = request.getParameter(PARAM_BODY);
    if (body == null) {
      return VoidResponse.INSTANCE;
    }

    try {
      IOUtils.writeString(template.getOutputStream(), body, "UTF-8",
          false);
    } catch (IOException ex) {
      throw new IORuntimeException("Can't write template: path="
          + template.getPath(), ex);
    }

    return VoidResponse.INSTANCE;
  }
}

代码示例来源:origin: org.seasar.kvasir.cms.pop/org.seasar.kvasir.cms.pop

resource.getParent().mkdirs();
try {
  IOUtils.writeString(resource.getOutputStream(variant), value,
    "UTF-8", true);
} catch (ResourceNotFoundException ex) {

相关文章