Exemplo n.º 1
0
 /*
 ** Name: write
 **
 ** Description:
 **	Write a SqlLongChar data value to the current input message.
 **	The byte stream is retrieved and segmented for output by an
 **	instance of the local inner class ByteSegOS.
 **
 **	A SqlLongChar data value is composed of a data indicator byte
 **	which, if not NULL, may be followed by zero or more segments
 **	which are then followed by and end-of-segments indicator.  Each
 **	segment is composed of a two byte integer length (non-zero)
 **	followed by a character byte array of the indicated length.
 **	The end-of-segments indicator is a two byte integer with value
 **	zero.
 **
 ** Input:
 **	value	SQL data value.
 **
 ** Output:
 **	None.
 **
 ** Returns:
 **	void.
 **
 ** History:
 **	 1-Dec-03 (gordy)
 **	    Created.
 */
 public void write(SqlLongChar value)
 {
     if (writeSqlDataIndicator(value))	// Data indicator byte.
     {
     //				if (segOS == null) segOS = new ByteSegOS();
         if (segOS == null)
             segOS = new ByteSegOS(this, outBuff, trace);
         segOS.begin(out_msg_id);		// begin a new BLOB.
         try { value.get(segOS); }		// Write stream to output.
         finally { segOS.end(); }		// End-of-segments.
     }
     return;
 }