Intento poner algunas cadenas en CharBuffer
con CharBuffer.put()
función pero el buffer se deja en blanco.CharBuffer.put() no funcionó
mi código:
CharBuffer charBuf = CharBuffer.allocate(1000);
for (int i = 0; i < 10; i++)
{
String text = "testing" + i + "\n";
charBuf.put(text);
}
System.out.println(charBuf);
me trató de usar con clear()
o rewind()
después allocate(1000)
pero eso no cambió el resultado.