Doubt about how to use ImageToAwt.convert to convert from buffered image to jme3

Hi, reading the documentation about this function:

Method Detail
convert

public static void convert(java.awt.image.BufferedImage image,
Image.Format format,
java.nio.ByteBuffer buf)
Convert an AWT image to jME image.

I have doubts about the args:
-I suppouse that the Image.Format arg is the format in which i want to convert the awt image
-in the ByteBuffer arg i don´t know if i have to create a new ByteBuffer with a specific length or is it possible to only add a new ByteBuffer without allocate any length

Use this instead:
http://hub.jmonkeyengine.org/javadoc/com/jme3/texture/plugins/AWTLoader.html

…or at least look at its source to see how it does what it does.