public boolean add(String key, int ttlSec, Object value, long timeoutMiliSec)
		throws TimeoutException {
		try {
			StringBuilder sb = new StringBuilder();

			byte valueBytes[] = null;
			int flag = -1;

			if (value instanceof String) {
				String arg = (String) value;
				valueBytes = arg.getBytes(charset);
				flag = FLAGS_GENRIC_STRING;
			} else {
				valueBytes = getObjectBytes(value);
				flag = FLAGS_GENRIC_OBJECT;
			}
			
			validateKey(key);
			validateValue(key, valueBytes);

			//<command name> <key> <flags> <exptime> <bytes> [noreply]\r\n
			sb.append("add ").append(key).append(" ").append(flag);
			sb.append(" ").append(ttlSec).append(" ").append(valueBytes.length);
			sb.append("\r\n");
			sb.append(new String(valueBytes, charset));
			sb.append("\r\n");

			String res = sendDataOut(key, sb.toString());
			if (res == null) {
				throw new TimeoutException("we got a null reply!");
			}

			if (res.equals("STORED") == false) {
				return false;
			} else {
				return true;
			}
		} catch (TimeoutException ex) {
			throw ex;
		} catch (Exception ex) {
			throw new TimeoutException("We had error " + ex);
		}
	}