code: int queryCoordinates(Point2D[] 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)
  			throw new IllegalArgumentException();
  
  		AttributeStreamOfDbl xy = (AttributeStreamOfDbl) getAttributeStreamRef(VertexDescription.Semantics.POSITION);
  		int j = 0;
  		double[] dstArray = new double[dst.length * 2];
  		xy.readRange(2 * beginIndex, (endIndexC - beginIndex) * 2, dstArray, j, true);
  
  		for (int i = 0; i < dst.length; i++) {
  			dst[i] = new Point2D(dstArray[i * 2], dstArray[i * 2 + 1]);
  		}
  
  		// for (int i = beginIndex; i < endIndexC; i++, j++)
  		// {
  		// xy.read(2 * i, dst[j]);
  		// }
  
  		return endIndexC;
  	}
docs: Checked vs. Jan 11, 2011