org.mule.util.IOUtils.copyLarge()方法的使用及代码示例

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

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

IOUtils.copyLarge介绍

[英]Re-implement copy method to allow buffer size to be configured. This won't impact all methods because there is no polymorphism for static methods, but rather just direct use of these two methods.
[中]

代码示例

代码示例来源:origin: org.mule/mule-core

public void write(MuleEvent event, OutputStream out) throws IOException
  {
    InputStream is = (InputStream) src;
    try
    {
      IOUtils.copyLarge(is, out);
    }
    finally
    {
      is.close();
    }
  }
};

代码示例来源:origin: org.mule.transports/mule-transport-http

public void write(MuleEvent event, OutputStream out) throws IOException
  {
    InputStream is = ((HttpServletRequest) src).getInputStream();
    try
    {
      IOUtils.copyLarge(is, out);
    }
    finally
    {
      is.close();
    }
  }
};

代码示例来源:origin: org.mule.transports/mule-transport-servlet

IOUtils.copyLarge(in, baos);
byte[] buffer = baos.toByteArray();

代码示例来源:origin: org.mule/mule-core

try
  IOUtils.copyLarge(is, byteOut);

代码示例来源:origin: org.mule.transports/mule-transport-tcp

IOUtils.copyLarge(is, os);
os.flush();
os.close();

代码示例来源:origin: org.mule.transports/mule-transport-file

IOUtils.copyLarge(is, fos);
is.close();

代码示例来源:origin: org.mule.transports/mule-transport-http

IOUtils.copyLarge(in, baos);

相关文章