code: public static FsPermission valueOf(String unixSymbolicPermission) {
      if (unixSymbolicPermission == null) {
        return null;
      }
      else if (unixSymbolicPermission.length() != 10) {
        throw new IllegalArgumentException("length != 10(unixSymbolicPermission="
            + unixSymbolicPermission + ")");
      }
      int n = 0;
      for(int i = 1; i < unixSymbolicPermission.length(); i++) {
        n = n << 1;
        char c = unixSymbolicPermission.charAt(i);
        n += (c == '-' || c == 'T' || c == 'S') ? 0: 1;
      }
      return new FsPermission((short)n);
    }
docs: Create a FsPermission from a Unix symbolic permission string
  @param unixSymbolicPermission e.g. "-rw-rw-rw-"