Exemplo n.º 1
0
 /*
 ** Name: readSqlData
 **
 ** Description:
 **	Reads a SqlLongChar data value from the current input message.
 **	Only a single stream data value may be active at a given time.
 **	Attempting to read another stream data value will result in
 **	the closure of the preceding stream.
 **
 **	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.
 **
 **	Only the SQL data/NULL indicator is read by this method.  If
 **	the SqlLongChar value is non-NULL, an InputStream is provided
 **	for reading the segmented data stream.  The InputStream also
 **	implements the SqlStream StreamSource interface for providing
 **	notification of stream closure events.
 **
 ** Input:
 **	None.
 **
 ** Output:
 **	value	SQL data value.
 **
 ** Returns:
 **	void.
 **
 ** History:
 **	22-Sep-03 (gordy)
 **	    Created.
 */
 public void readSqlData( SqlLongChar value )
 {
     if ( readSqlDataIndicator() )	// Read data indicator byte.
         value.set( new ByteSegIS( this, trace, in_msg_id ) );
     else
         value.setNull();		// NULL data value.
     return;
 }