Code example for CharBuffer

Methods: limitpositionput

		CharBuffer buffer = null;
		if(dst instanceof ByteBuffer) buffer = ((ByteBuffer)dst).asCharBuffer();
		else if(dst instanceof CharBuffer) buffer = (CharBuffer)dst;
		if(buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or CharBuffer");
		int oldPosition = buffer.position();
		buffer.put(src, srcOffset, numElements);
		buffer.limit(oldPosition + numElements);
	/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} instance's 
	 * {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, the limit 
	 * will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error checking is 
	 * performed</b>. 
	 * @param src the source array. 
	 * @param srcOffset the offset into the source array. 
	 * @param dst the destination Buffer, its position is used as an offset. 
	 * @param numElements the number of elements to copy. */