code: int QueryCoordinates(Point3D[] dst, int dstSize, int beginIndex,
  			int endIndex) {
  		int endIndexC = endIndex < 0 ? m_pointCount : endIndex;
  		endIndexC = Math.min(endIndexC, beginIndex + dstSize);
  
  		if (beginIndex < 0 || beginIndex >= m_pointCount
  				|| endIndexC < beginIndex)
  			// TODO replace geometry exc
  			throw new IllegalArgumentException();
  
  		AttributeStreamOfDbl xy = (AttributeStreamOfDbl) getAttributeStreamRef(VertexDescription.Semantics.POSITION);
  		AttributeStreamOfDbl z = null;
  		double v = VertexDescription
  				.getDefaultValue(VertexDescription.Semantics.Z);
  		boolean bHasZ = hasAttribute(VertexDescription.Semantics.Z);
  		if (bHasZ)
  			z = (AttributeStreamOfDbl) getAttributeStreamRef(VertexDescription.Semantics.Z);
  		int j = 0;
  		for (int i = beginIndex; i < endIndexC; i++, j++) {
  			dst[j].x = xy.read(2 * i);
  			dst[j].y = xy.read(2 * i + 1);
  			dst[j].z = bHasZ ? z.read(i) : v;
  
  			dst[j] = getXYZ(i);
  		}
  
  		return endIndexC;
  	}
docs: Checked vs. Jan 11, 2011