Example #1
0
 /// <summary>
 /// Initializes a new instance of this class.
 /// </summary>
 /// <param name="channel">
 ///         The channel upon whose file this lock is held
 /// </param>
 /// <param name="position">
 ///         The position within the file at which the locked region starts;
 ///         must be non-negative
 /// </param>
 /// <param name="size">
 ///         The size of the locked region; must be non-negative, and the sum
 ///         <tt>position</tt>&nbsp;+&nbsp;<tt>size</tt> must be non-negative
 /// </param>
 /// <param name="shared">
 ///         <tt>true</tt> if this lock is shared,
 ///         <tt>false</tt> if it is exclusive
 /// </param>
 /// <exception cref="IllegalArgumentException">
 ///         If the preconditions on the parameters do not hold
 ///
 /// @since 1.7 </exception>
 protected internal FileLock(AsynchronousFileChannel channel, long position, long size, bool shared)
 {
     if (position < 0)
     {
         throw new IllegalArgumentException("Negative position");
     }
     if (size < 0)
     {
         throw new IllegalArgumentException("Negative size");
     }
     if (position + size < 0)
     {
         throw new IllegalArgumentException("Negative position + size");
     }
     this.Channel_Renamed  = channel;
     this.Position_Renamed = position;
     this.Size_Renamed     = size;
     this.Shared_Renamed   = shared;
 }
Example #2
0
 public FileLock(AsynchronousFileChannel prm1, long prm2, long prm3, bool prm4)
 {
 }