Uploaded image for project: 'FtpServer'
  1. FtpServer
  2. FTPSERVER-186

org.apache.ftpserver.util.IoUtils reinvent the wheel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0-M4
    • None
    • None

    Description

      The IoUtils class contains some method that are already provided by commons-io library.

      These methods:

      • public final static void close(InputStream is)
      • public final static void close(OutputStream os)
      • public final static void close(Reader rd)
      • public final static void close(Writer wr)
        Should be substituted with the relevant closeQuietly() method of org.apache.commons.io.IOUtils.

      These methods:

      • public final static void copy(Reader input, Writer output, int bufferSize)
      • public final static void copy(InputStream input, OutputStream output, int bufferSize)
        Should be substitured with the relevant copy() methods of org.apache.commons.io.IOUtils.

      These methods:

      • public final static String readFully(Reader reader) throws IOException
      • public final static String readFully(InputStream input) throws IOException
        Should be substitured with the relevant toString() methods of org.apache.commons.io.IOUtils.

      About this mehods:

      • public final static void delete(File file) throws IOException
        I'm not sure, maybe there something in the org.apache.commons.io.FileUtils.

      Attachments

        1. IoUtilsDesignJustification.patch
          0.8 kB
          Andrea Francia

        Activity

          People

            niklas Niklas Therning
            andreafrancia Andrea Francia
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: