Revision 4447
Added by ben leinfelder over 15 years ago
AccessControlList.java | ||
---|---|---|
642 | 642 |
} |
643 | 643 |
|
644 | 644 |
/* Get the text value of READ, WRITE or ALL. */ |
645 |
private String txtValue ( int permission )
|
|
645 |
public static String txtValue ( int permission )
|
|
646 | 646 |
{ |
647 |
StringBuffer txtPerm = new StringBuffer("\"");
|
|
648 |
if ( (permission & READ) != 0 ) {
|
|
649 |
txtPerm.append("read");
|
|
647 |
StringBuffer txtPerm = new StringBuffer(); |
|
648 |
if (permission == READ) {
|
|
649 |
txtPerm.append("READ");
|
|
650 | 650 |
} |
651 |
if ( (permission & WRITE) != 0 ) { |
|
652 |
if ( txtPerm.length() > 0 ) txtPerm.append(","); |
|
653 |
txtPerm.append("write"); |
|
651 |
if (permission == WRITE) { |
|
652 |
txtPerm.append("WRITE"); |
|
654 | 653 |
} |
655 |
if ( (permission & ALL) != 0 ) { |
|
656 |
if ( txtPerm.length() > 0 ) txtPerm.append(","); |
|
657 |
txtPerm.append("all"); |
|
654 |
if (permission == ALL) { |
|
655 |
txtPerm.append("ALL"); |
|
658 | 656 |
} |
659 | 657 |
|
660 |
return txtPerm.append("\"").toString();
|
|
658 |
return txtPerm.toString(); |
|
661 | 659 |
} |
662 | 660 |
|
663 | 661 |
/** |
Also available in: Unified diff
translate numeric permission to text permission when serializing.