List of utility methods to do FloatBuffer to String
void | print(FloatBuffer buffer) Utility method to print a float buffer for (int i = 0; i < buffer.capacity(); i++) { System.out.print(buffer.get(i) + " "); System.out.println(""); |
void | printFloatBuffer(FloatBuffer fb) print Float Buffer fb.rewind(); while (fb.hasRemaining()) { System.out.print(fb.get() + ", "); System.out.println(); |
void | show(final FloatBuffer buffer) show final int size = buffer.capacity(); for (int i = 0; i < size; i++) { System.out.println(buffer.get(i)); |
String | toString(FloatBuffer buffer) Returns a String representation of the remaining elements of the given buffer. return toString(buffer, buffer.remaining());
|
String | toString(FloatBuffer buffer) Utility method to toString a float buffer StringBuilder str = new StringBuilder(buffer.capacity() * 2); str.append('['); for (int i = 0; i < buffer.capacity(); i++) { str.append(buffer.get(i)); if (i != buffer.capacity() - 1) { str.append(", "); str.append(']'); return str.toString(); |
String | toString(FloatBuffer floatBuffer) to String StringBuilder builder = new StringBuilder(); for (int i = floatBuffer.position(); i < floatBuffer.limit(); i++) builder.append(i == floatBuffer.position() ? "" : ", ").append(floatBuffer.get(i)); return builder.toString(); |