You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2012/10/25 21:05:12 UTC

[jira] [Created] (IO-353) Add API IOUtils.copy(InputStream, OutputStream, int)

Gary Gregory created IO-353:
-------------------------------

             Summary: Add API IOUtils.copy(InputStream, OutputStream, int)
                 Key: IO-353
                 URL: https://issues.apache.org/jira/browse/IO-353
             Project: Commons IO
          Issue Type: Improvement
          Components: Utilities
         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: C:\Java\apache-maven-3.0.4\bin\..
Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_35\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
            Reporter: Gary Gregory
             Fix For: 2.5


Add API IOUtils.copy(InputStream, OutputStream, int)

{code:java}
    /**
     * Copy bytes from an <code>InputStream</code> to an <code>OutputStream</code> using an internal buffer of the
     * given size.
     * <p>
     * This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
     * <p>
     * 
     * @param input
     *            the <code>InputStream</code> to read from
     * @param output
     *            the <code>OutputStream</code> to write to
     * @param bufferSize
     *            the bufferSize used to copy from the input to the output
     * @return the number of bytes copied
     * @throws NullPointerException
     *             if the input or output is null
     * @throws IOException
     *             if an I/O error occurs
     * @since 2.5
     */
    public static long copy(InputStream input, OutputStream output, int bufferSize) throws IOException
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (IO-353) Add API IOUtils.copy(InputStream, OutputStream, int)

Posted by "Gary Gregory (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Gregory resolved IO-353.
-----------------------------

    Resolution: Fixed
      Assignee: Gary Gregory

commit -m "[IO-353] Add API IOUtils.copy(InputStream, OutputStream, int)." C:/svn/org/apache/commons/trunks-proper/io/src/test/java/org/apache/commons/io/IOUtilsCopyTestCase.java C:/svn/org/apache/commons/trunks-proper/io/src/changes/changes.xml C:/svn/org/apache/commons/trunks-proper/io/src/main/java/org/apache/commons/io/IOUtils.java
    Sending        C:/svn/org/apache/commons/trunks-proper/io/src/changes/changes.xml
    Sending        C:/svn/org/apache/commons/trunks-proper/io/src/main/java/org/apache/commons/io/IOUtils.java
    Sending        C:/svn/org/apache/commons/trunks-proper/io/src/test/java/org/apache/commons/io/IOUtilsCopyTestCase.java
    Transmitting file data ...
    Committed revision 1402280.
                
> Add API IOUtils.copy(InputStream, OutputStream, int)
> ----------------------------------------------------
>
>                 Key: IO-353
>                 URL: https://issues.apache.org/jira/browse/IO-353
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
> Maven home: C:\Java\apache-maven-3.0.4\bin\..
> Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
> Java home: C:\Program Files\Java\jdk1.6.0_35\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>             Fix For: 2.5
>
>
> Add API IOUtils.copy(InputStream, OutputStream, int)
> {code:java}
>     /**
>      * Copy bytes from an <code>InputStream</code> to an <code>OutputStream</code> using an internal buffer of the
>      * given size.
>      * <p>
>      * This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
>      * <p>
>      * 
>      * @param input
>      *            the <code>InputStream</code> to read from
>      * @param output
>      *            the <code>OutputStream</code> to write to
>      * @param bufferSize
>      *            the bufferSize used to copy from the input to the output
>      * @return the number of bytes copied
>      * @throws NullPointerException
>      *             if the input or output is null
>      * @throws IOException
>      *             if an I/O error occurs
>      * @since 2.5
>      */
>     public static long copy(InputStream input, OutputStream output, int bufferSize) throws IOException
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira