1 17 package org.alfresco.filesys.smb; 18 19 22 public class LockingAndX 23 { 24 25 27 public static final int SharedLock = 0x0001; 28 public static final int OplockBreak = 0x0002; 29 public static final int ChangeType = 0x0004; 30 public static final int Cancel = 0x0008; 31 public static final int LargeFiles = 0x0010; 32 33 39 public final static boolean isNormalLockUnlock(int flags) 40 { 41 return (flags & 0x000F) == 0 ? true : false; 42 } 43 44 50 public final static boolean hasLargeFiles(int flags) 51 { 52 return (flags & LargeFiles) != 0 ? true : false; 53 } 54 55 61 public final static boolean hasSharedLock(int flags) 62 { 63 return (flags & SharedLock) != 0 ? true : false; 64 } 65 66 72 public final static boolean hasOplockBreak(int flags) 73 { 74 return (flags & OplockBreak) != 0 ? true : false; 75 } 76 77 83 public final static boolean hasChangeType(int flags) 84 { 85 return (flags & ChangeType) != 0 ? true : false; 86 } 87 88 94 public final static boolean hasCancel(int flags) 95 { 96 return (flags & Cancel) != 0 ? true : false; 97 } 98 } 99 | Popular Tags |