/** Encode the object to a short. */ public short toShort() { int s = (useraction.ordinal() << 6) | (groupaction.ordinal() << 3) | otheraction.ordinal(); return (short) s; }
/** Apply a umask to this permission and return a new one */ public FsPermission applyUMask(FsPermission umask) { return new FsPermission( useraction.and(umask.useraction.not()), groupaction.and(umask.groupaction.not()), otheraction.and(umask.otheraction.not())); }
public void fromShort(short n) { FsAction[] v = FsAction.values(); set(v[(n >>> 6) & 7], v[(n >>> 3) & 7], v[n & 7]); }