private void handleStorageCommands(ClientHandler handler, String command)
			throws SocketTimeoutException, IOException {
		Data data = (Data) handler.getClientData();
		/*
		<command name> <key> <flags> <exptime> <bytes> [noreply]\r\n
		cas <key> <flags> <exptime> <bytes> <cas unique> [noreply]\r\n
		 */
		String cmdData[] = command.split(" ");

		String cmd = cmdData[0];
		String key = cmdData[1];
		String flags = cmdData[2];
		int exptime = Integer.parseInt(cmdData[3]);
		long bytes = Integer.parseInt(cmdData[4]);
		String casunique = null;

		boolean noreplay = false;
		if (cmdData.length >= 6) {
			if ("noreply".equals(cmdData[5])) {
				noreplay = true;
			} else {
				casunique = cmdData[5];
			}

			if (cmdData.length >= 7) {
				if ("noreply".equals(cmdData[6])) {
					noreplay = true;
				}
			}
		}
		
		if(key.length()>Data.getMaxSizeAllowedForKey()) {
			throw new IllegalArgumentException(
					"key passed to big to store "+key);
		}
		
		if(Data.getMaxSizeAllowedForValue()>0) {
			if(bytes > Data.getMaxSizeAllowedForValue()) {
				throw new IllegalArgumentException(
					"value passed to big to store "+bytes+" for key "+key);
			}
		}

		data.setCmd(cmd);
		data.setKey(key);
		data.setFlags(flags);
		data.setExptime(exptime);
		data.setDataRequiredLength(bytes);
		data.setCasUnique(casunique);
		data.setNoreplay(noreplay);
	}