Class IOUtils


  • public class IOUtils
    extends java.lang.Object
    Since:
    0.1 File is deleted on JVM exit. You should delete it explicitly earlier if you know it won't be used anymore.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String UTF_8  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void copy​(java.io.InputStream in, java.io.OutputStream out)  
      static void copyToFile​(java.io.InputStream in, java.io.File file)  
      static void copyToFile​(java.io.InputStream in, java.io.File file, boolean closeIn)  
      static java.io.File copyToTempFile​(java.io.InputStream in)  
      static java.io.File copyToTempFile​(java.io.InputStream in, boolean closeIn)  
      static java.lang.String read​(java.io.InputStream in)  
      static java.lang.String read​(java.io.Reader in)  
      static void write​(java.lang.String content, java.io.OutputStream out)  
      static void writeToFile​(java.lang.String content, java.io.File file)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • copy

        public static void copy​(java.io.InputStream in,
                                java.io.OutputStream out)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • copyToTempFile

        public static java.io.File copyToTempFile​(java.io.InputStream in)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • copyToTempFile

        public static java.io.File copyToTempFile​(java.io.InputStream in,
                                                  boolean closeIn)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • copyToFile

        public static void copyToFile​(java.io.InputStream in,
                                      java.io.File file)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • copyToFile

        public static void copyToFile​(java.io.InputStream in,
                                      java.io.File file,
                                      boolean closeIn)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • writeToFile

        public static void writeToFile​(java.lang.String content,
                                       java.io.File file)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public static void write​(java.lang.String content,
                                 java.io.OutputStream out)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public static java.lang.String read​(java.io.InputStream in)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public static java.lang.String read​(java.io.Reader in)
                                     throws java.io.IOException
        Throws:
        java.io.IOException