Commons IO
  1. Commons IO
  2. IO-353

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: Utilities
    • Labels:
      None
    • Environment:

      Description

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

          /**
           * 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
      

        Activity

        Gary Gregory created issue -
        Hide
        Gary Gregory added a comment -

        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.

        Show
        Gary Gregory added a comment - 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.
        Gary Gregory made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Gary Gregory [ garydgregory ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Gary Gregory
            Reporter:
            Gary Gregory
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development