public static byte[] string2byte(List<String> val, String type) {
		assert val != null && type != null;

		type = type.replaceAll("\\s", "").toLowerCase();
		String[] types = type.split("\\,");
		int length = 0;
		if (types.length == val.size()) {
			ByteBuffer buff = ByteBuffer.allocate(200);
			for (int j = 0; j < types.length; ++j) {
				String tuc = types[j].toUpperCase();
				if (tuc.equals(DataType.INT.toString())) {
					int v = Integer.parseInt(val.get(j));
					buff.putInt(v);
					length += 4;
				} else if (tuc.equals(DataType.LONG.toString())) {
					long v = Long.parseLong(val.get(j));
					buff.putLong(v);
					length += 8;
				} else if (tuc.equals(DataType.BYTE.toString())) {
					byte v = Byte.parseByte(val.get(j));
					buff.put(v);
					length += 1;
				} else if (tuc.equals(DataType.STRING.toString())) {
					buff.putInt(val.get(j).length());
					byte[] v = Bytes.toBytes(val.get(j));
					buff.put(v);
					length += v.length + 4;
				}
			}
			byte[] bs = new byte[length];
			System.arraycopy(buff.array(), 0, bs, 0, length);
			return bs;
		} else
			return null;
	}