private void encode(Number value)
	{
		switch (bits)
		{
			case 1:
				bytes = ByteBuffer.allocate(bits).put(value.byteValue()).array();
				break;
			case 2:
				bytes = ByteBuffer.allocate(bits).putShort(value.shortValue()).array();
				break;
			case 4:
				bytes = ByteBuffer.allocate(bits).putInt(value.intValue()).array();
				break;
			case 8:
				bytes = ByteBuffer.allocate(bits).putLong(value.longValue()).array();
				break;
		}
	}