code: public void setAttributeStreamRef(int semantics, AttributeStreamBase stream) {
  		// int test1 = VertexDescription.getPersistence(semantics);
  		// int test2 = stream.getPersistence();
  
  		if ((stream != null)
  				&& VertexDescription.getPersistence(semantics) != stream
  						.getPersistence())// input stream has wrong persistence
  			throw new IllegalArgumentException();
  
  		// Do not check for the stream size here to allow several streams to be
  		// attached before the point count is changed.
  		addAttribute(semantics);
  		int attributeIndex = m_description.getAttributeIndex(semantics);
  		if (m_vertexAttributes == null)
  			m_vertexAttributes = new AttributeStreamBase[m_description
  					.getAttributeCount()];
  
  		m_vertexAttributes[attributeIndex] = stream;
  		notifyModified(DirtyFlags.DirtyAll);
  	}
docs: Sets a reference to the given AttributeStream of the Geometry. Once the
  buffer has been obtained, the vertices of the Geometry can be manipulated
  directly. The AttributeStream parameters are not checked for the size. <br>
  If the attribute is missing, it will be added. <br>
  Note, that this method does not change the vertex count in the Geometry. <br>
  The stream can have more elements, than the Geometry point count, but
  only necessary part will be saved when exporting to a ESRI shape or other
  format. @param semantics Semantics of the attribute to assign the stream
  to. @param stream The input AttributeStream that will be assigned by
  reference. If one changes the stream later through the reference, one has
  to call NotifyStreamChanged. \exception Throws invalid_argument exception
  if the input stream type does not match that of the semantics
  persistence.