public void write(OutputStream outs, Object fieldId) throws IOException {

		byte[] buf = (byte[]) null;

		if (this.datatype.equals(IFieldType.NUMERIC) || this.datatype.equals(IFieldType.LLNVAR) || this.datatype.equals(IFieldType.LLLNVAR)) {
			buf = new byte[this.length / 2 + this.length % 2];

		} else if (this.datatype.equals(IFieldType.AMOUNT)) {
			buf = new byte[6];

		} else if ((this.datatype.equals(IFieldType.DATE10)) || (this.datatype.equals(IFieldType.DATE4)) || (this.datatype.equals(IFieldType.DATE_EXP)) || (this.datatype.equals(IFieldType.TIME))) {
			buf = new byte[this.length / 2];
		}

		if (buf != null) {
			/* 进行BCD码压缩 */
			buf = toBcd(toString(), buf.length, fieldId);

			outs.write(buf);
			/**
			 * 如果buf不为null证明value被bcd码压缩后并写入到outs中，故此return跳出该函数，
			 * 否则下面的write会重复性再写入一遍该值（不经过bcd码压缩的值）
			 */
			return;
		} else {
			outs.write(toString().getBytes());
		}
	}