Class NioFilesWrapper


  • public class NioFilesWrapper
    extends java.lang.Object
    Wrapper for Files to test methods throwing IOException.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private NioFilesWrapper()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static NioFilesWrapper instance()  
      java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream​(java.nio.file.Path dir, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)  
      java.io.InputStream newInputStream​(java.nio.file.Path path, java.nio.file.OpenOption... options)  
      long size​(java.nio.file.Path path)  
      • Methods inherited from class java.lang.Object

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

      • NioFilesWrapper

        private NioFilesWrapper()
    • Method Detail

      • newInputStream

        public java.io.InputStream newInputStream​(java.nio.file.Path path,
                                                  java.nio.file.OpenOption... options)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • newDirectoryStream

        public java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream​(java.nio.file.Path dir,
                                                                                    java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)
                                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • size

        public long size​(java.nio.file.Path path)
                  throws java.io.IOException
        Throws:
        java.io.IOException