public static String[] resplitArgsWithQuotes(String[] args, int begin,
			int end) {
		ArrayList<String> ret = new ArrayList<String>(args.length);
		StringBuilder line = new StringBuilder();
		boolean inStr = false;
		for (int i = begin; i < end; i++) {
			String s = args[i];
			if (inStr) {
				boolean isEndStr = s.endsWith("\"") ? !s.endsWith("\\\"")
						|| s.endsWith("\\\\\"") : false;
				if (isEndStr) {
					line.append(s.substring(0, s.length() - 1));
					ret.add(line.toString());
					line.delete(0, line.length());
					inStr = false;
				} else {
					line.append(s);
					line.append(' ');
				}
			} else if (s.startsWith("\"")) {
				inStr = true;
				line.append(s.substring(1));
			} else if (!s.equals("")) {
				ret.add(s);
			}
		}
		return ret.toArray(new String[ret.size()]);
	}