本文整理了Java中org.apache.commons.net.io.Util.copyStream()
方法的一些代码示例,展示了Util.copyStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.copyStream()
方法的具体详情如下:
包路径:org.apache.commons.net.io.Util
类名称:Util
方法名:copyStream
[英]Same as copyStream(source, dest, DEFAULT_COPY_BUFFER_SIZE);
[中]与copyStream(source, dest, DEFAULT_COPY_BUFFER_SIZE);
相同
代码示例来源:origin: commons-net/commons-net
/***
* Same as <code> copyStream(source, dest, DEFAULT_COPY_BUFFER_SIZE); </code>
* @param source where to copy from
* @param dest where to copy to
* @return number of bytes copied
* @throws CopyStreamException on error
***/
public static final long copyStream(InputStream source, OutputStream dest)
throws CopyStreamException
{
return copyStream(source, dest, DEFAULT_COPY_BUFFER_SIZE);
}
代码示例来源:origin: commons-net/commons-net
/***
* Copies the contents of an InputStream to an OutputStream using a
* copy buffer of a given size. The contents of the InputStream are
* read until the end of the stream is reached, but neither the
* source nor the destination are closed. You must do this yourself
* outside of the method call. The number of bytes read/written is
* returned.
*
* @param source The source InputStream.
* @param dest The destination OutputStream.
* @param bufferSize The number of bytes to buffer during the copy.
* A zero or negative value means to use {@link #DEFAULT_COPY_BUFFER_SIZE}.
* @return The number of bytes read/written in the copy operation.
* @throws CopyStreamException If an error occurs while reading from the
* source or writing to the destination. The CopyStreamException
* will contain the number of bytes confirmed to have been
* transferred before an
* IOException occurred, and it will also contain the IOException
* that caused the error. These values can be retrieved with
* the CopyStreamException getTotalBytesTransferred() and
* getIOException() methods.
***/
public static final long copyStream(InputStream source, OutputStream dest,
int bufferSize)
throws CopyStreamException
{
return copyStream(source, dest, bufferSize,
CopyStreamEvent.UNKNOWN_STREAM_SIZE, null);
}
代码示例来源:origin: commons-net/commons-net
throws CopyStreamException
return copyStream(source, dest, bufferSize, streamSize, listener,
true);
代码示例来源:origin: commons-net/commons-net
Util.copyStream(local, output, getBufferSize(),
CopyStreamEvent.UNKNOWN_STREAM_SIZE, __mergeListeners(csl),
false);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-net
/***
* Same as <code> copyStream(source, dest, DEFAULT_COPY_BUFFER_SIZE); </code>
***/
public static final long copyStream(InputStream source, OutputStream dest)
throws CopyStreamException
{
return copyStream(source, dest, DEFAULT_COPY_BUFFER_SIZE);
}
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.net
/***
* Same as <code> copyStream(source, dest, DEFAULT_COPY_BUFFER_SIZE); </code>
***/
public static final long copyStream(InputStream source, OutputStream dest)
throws CopyStreamException
{
return copyStream(source, dest, DEFAULT_COPY_BUFFER_SIZE);
}
代码示例来源:origin: commons-net/commons-net
Util.copyStream(input, local, getBufferSize(),
CopyStreamEvent.UNKNOWN_STREAM_SIZE, __mergeListeners(csl),
false);
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.net
/***
* Copies the contents of an InputStream to an OutputStream using a
* copy buffer of a given size. The contents of the InputStream are
* read until the end of the stream is reached, but neither the
* source nor the destination are closed. You must do this yourself
* outside of the method call. The number of bytes read/written is
* returned.
* <p>
* @param source The source InputStream.
* @param dest The destination OutputStream.
* @return The number of bytes read/written in the copy operation.
* @exception CopyStreamException If an error occurs while reading from the
* source or writing to the destination. The CopyStreamException
* will contain the number of bytes confirmed to have been
* transferred before an
* IOException occurred, and it will also contain the IOException
* that caused the error. These values can be retrieved with
* the CopyStreamException getTotalBytesTransferred() and
* getIOException() methods.
***/
public static final long copyStream(InputStream source, OutputStream dest,
int bufferSize)
throws CopyStreamException
{
return copyStream(source, dest, bufferSize,
CopyStreamEvent.UNKNOWN_STREAM_SIZE, null);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-net
/***
* Copies the contents of an InputStream to an OutputStream using a
* copy buffer of a given size. The contents of the InputStream are
* read until the end of the stream is reached, but neither the
* source nor the destination are closed. You must do this yourself
* outside of the method call. The number of bytes read/written is
* returned.
* <p>
* @param source The source InputStream.
* @param dest The destination OutputStream.
* @return The number of bytes read/written in the copy operation.
* @exception CopyStreamException If an error occurs while reading from the
* source or writing to the destination. The CopyStreamException
* will contain the number of bytes confirmed to have been
* transferred before an
* IOException occurred, and it will also contain the IOException
* that caused the error. These values can be retrieved with
* the CopyStreamException getTotalBytesTransferred() and
* getIOException() methods.
***/
public static final long copyStream(InputStream source, OutputStream dest,
int bufferSize)
throws CopyStreamException
{
return copyStream(source, dest, bufferSize,
CopyStreamEvent.UNKNOWN_STREAM_SIZE, null);
}
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.net
throws CopyStreamException
return copyStream(source, dest, bufferSize, streamSize, listener,
true);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-net
throws CopyStreamException
return copyStream(source, dest, bufferSize, streamSize, listener,
true);
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.net
Util.copyStream(local, output, getBufferSize(),
CopyStreamEvent.UNKNOWN_STREAM_SIZE, null,
false);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-net
Util.copyStream(local, output, getBufferSize(),
CopyStreamEvent.UNKNOWN_STREAM_SIZE, null,
false);
代码示例来源:origin: net.seedboxer/ftp-common
Util.copyStream(ins, outs, ftpClient.getBufferSize(), size, adapter);
} finally {
outs.close();
代码示例来源:origin: TGAC/miso-lims
copyStream(fis, ops, ftp.getBufferSize(), file.length(), listener);
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.net
Util.copyStream(input, local, getBufferSize(),
CopyStreamEvent.UNKNOWN_STREAM_SIZE, null,
false);
代码示例来源:origin: com.github.goldin/maven-common
Util.copyStream(input, local, getBufferSize(),
CopyStreamEvent.UNKNOWN_STREAM_SIZE, new CopyStreamListener( this.project ),
false);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-net
Util.copyStream(input, local, getBufferSize(),
CopyStreamEvent.UNKNOWN_STREAM_SIZE, null,
false);
代码示例来源:origin: net.sourceforge.openutils/openutils-mgnlmedia
org.apache.commons.net.io.Util.copyStream(
inputStream,
os,
内容来源于网络,如有侵权,请联系作者删除!