code: public static int toOctalMode(String strMode) throws IOException {
  	strMode = strMode.trim().toLowerCase();
  	if (strMode.length() == 9 || strMode.length() == 10) return _toOctalMode(strMode);
  	if (strMode.length() <= 4 && strMode.length() > 0) return Integer.parseInt(strMode, 8);
  	throw new IOException("can't translate [" + strMode + "] to a mode value");
      }
docs: translate a string mode (777 or drwxrwxrwx to a octal value)
  
  @param strMode
  @return