Class IOUtil


  • public class IOUtil
    extends Object
    • Constructor Detail

      • IOUtil

        public IOUtil()
    • Method Detail

      • close

        public static void close​(Closeable resource)
        Close the given resource.
        Parameters:
        resource - The resource to be closed.
      • getLimitedStream

        public static InputStream getLimitedStream​(InputStream input,
                                                   long limit)
        Creates a new input stream that represents the first part of the original stream.
        Parameters:
        input - Original input stream
        limit - Size of the new stream, expressed in bytes
        Returns:
        the limited input stream