@Override
	public void write(Object target, ByteModel model) {
		BigDecimal bigDecimal = (BigDecimal) target;

		byte[] bigIntData = bigDecimal.unscaledValue().toByteArray();
		int bigIntLength = bigIntData.length;
		int scale = bigDecimal.scale();
		if (256 > bigIntLength && 128 > scale && scale > -129) {
			byte[] head = { XsonConst.BIGDECIMAL1, (byte) scale,
					(byte) bigIntLength };
			model.append(head);
			model.append(bigIntData);
		} else {
			byte[] scaleArray = ByteUtils.intTo4ByteWithMark(scale);
			byte[] intLenArray = ByteUtils.intTo4Byte(bigIntLength);
			scaleArray[0] = XsonConst.BIGDECIMAL;
			model.append(scaleArray);
			model.append(intLenArray);
			model.append(bigIntData);
		}
	}