Class DefaultFileRegion

    • Field Detail

      • f

        private final java.io.File f
      • position

        private final long position
      • count

        private final long count
      • transferred

        private long transferred
      • file

        private java.nio.channels.FileChannel file
    • Constructor Detail

      • DefaultFileRegion

        public DefaultFileRegion​(java.nio.channels.FileChannel file,
                                 long position,
                                 long count)
        Create a new instance
        Parameters:
        file - the FileChannel which should be transferred
        position - the position from which the transfer should start
        count - the number of bytes to transfer
      • DefaultFileRegion

        public DefaultFileRegion​(java.io.File f,
                                 long position,
                                 long count)
        Create a new instance using the given File. The File will be opened lazily or explicitly via open().
        Parameters:
        f - the File which should be transferred
        position - the position from which the transfer should start
        count - the number of bytes to transfer