Class IoUtilities


  • public class IoUtilities
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      IoUtilities()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void close​(java.io.Closeable closeable)  
      static java.io.IOException close​(java.io.Closeable closeable, java.io.IOException exception)  
      static boolean contentEquals​(java.io.File file, java.io.File other)  
      static java.io.ByteArrayInputStream copy​(java.io.InputStream inputStream)  
      static java.io.IOException execute​(IBlock<java.io.IOException> block, java.io.IOException exception)  
      static int maximumLimitOfBytes​(int contentLength)  
      static int maximumLimitOfBytes​(long contentLength)  
      static void pipe​(java.io.File sourceFile, java.io.File targetFile)  
      static void pipe​(java.io.InputStream inputStream, java.io.File file)  
      static void pipe​(java.io.InputStream in, java.io.OutputStream out)  
      static void pipe​(java.io.InputStream in, java.io.OutputStream out, int bufferSize)  
      static void pipe​(java.io.InputStream in, java.io.OutputStream out, int bufferSize, long numberOfBytes)  
      static void pipe​(java.lang.Readable reader, java.io.Writer writer)  
      static void pipe​(java.lang.Readable in, java.io.Writer out, int bufferSize)  
      static void pipe​(java.lang.Readable in, java.io.Writer out, int bufferSize, long numberOfCharacters)  
      static void throwException​(java.util.List<java.lang.Throwable> throwables)  
      static byte[] toByteArray​(java.io.InputStream inputStream)  
      static void toss​(java.io.IOException exception)  
      static java.lang.String toString​(java.io.InputStream inputStream, java.lang.String contentEncoding)  
      static java.lang.String toString​(java.io.InputStream inputStream, java.lang.String contentEncoding, long numberOfBytes)  
      static java.lang.String toString​(java.io.Reader reader)  
      static java.lang.String toString​(java.io.Reader reader, int numberOfCharacters)  
      • Methods inherited from class java.lang.Object

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

      • IoUtilities

        public IoUtilities()
    • Method Detail

      • copy

        public static java.io.ByteArrayInputStream copy​(java.io.InputStream inputStream)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • pipe

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

        public static void pipe​(java.io.InputStream in,
                                java.io.OutputStream out,
                                int bufferSize)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • pipe

        public static void pipe​(java.io.InputStream in,
                                java.io.OutputStream out,
                                int bufferSize,
                                long numberOfBytes)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • pipe

        public static void pipe​(java.io.File sourceFile,
                                java.io.File targetFile)
                         throws java.io.IOException,
                                java.io.FileNotFoundException
        Throws:
        java.io.IOException
        java.io.FileNotFoundException
      • pipe

        public static void pipe​(java.lang.Readable reader,
                                java.io.Writer writer)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • pipe

        public static void pipe​(java.lang.Readable in,
                                java.io.Writer out,
                                int bufferSize)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • pipe

        public static void pipe​(java.lang.Readable in,
                                java.io.Writer out,
                                int bufferSize,
                                long numberOfCharacters)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

        public static java.lang.String toString​(java.io.Reader reader)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

        public static java.lang.String toString​(java.io.Reader reader,
                                                int numberOfCharacters)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public static void close​(java.io.Closeable closeable)
      • toss

        public static void toss​(java.io.IOException exception)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public static java.io.IOException close​(java.io.Closeable closeable,
                                                java.io.IOException exception)
      • execute

        public static java.io.IOException execute​(IBlock<java.io.IOException> block,
                                                  java.io.IOException exception)
      • toString

        public static java.lang.String toString​(java.io.InputStream inputStream,
                                                java.lang.String contentEncoding,
                                                long numberOfBytes)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

        public static java.lang.String toString​(java.io.InputStream inputStream,
                                                java.lang.String contentEncoding)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • toByteArray

        public static byte[] toByteArray​(java.io.InputStream inputStream)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • maximumLimitOfBytes

        public static int maximumLimitOfBytes​(long contentLength)
      • maximumLimitOfBytes

        public static int maximumLimitOfBytes​(int contentLength)
      • pipe

        public static void pipe​(java.io.InputStream inputStream,
                                java.io.File file)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • throwException

        public static void throwException​(java.util.List<java.lang.Throwable> throwables)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • contentEquals

        public static boolean contentEquals​(java.io.File file,
                                            java.io.File other)
                                     throws java.io.FileNotFoundException,
                                            java.io.IOException
        Throws:
        java.io.FileNotFoundException
        java.io.IOException