MCPcopy
hub / github.com/libgdx/libgdx / readFrom

Method readFrom

gdx/src/com/badlogic/gdx/utils/CharArray.java:1720–1727  ·  view source on GitHub ↗

If possible, reads chars from the provided CharBuffer directly into underlying character buffer without making extra copies. @return The number of characters read. @see #appendTo(Appendable)

(CharBuffer charBuffer)

Source from the content-addressed store, hash-verified

1718 * @return The number of characters read.
1719 * @see #appendTo(Appendable) */
1720 public int readFrom (CharBuffer charBuffer) {
1721 int oldSize = size;
1722 int remaining = charBuffer.remaining();
1723 require(remaining);
1724 charBuffer.get(items, size, remaining);
1725 size += remaining;
1726 return size - oldSize;
1727 }
1728
1729 /** If possible, reads all chars from the provided {@link Readable} directly into underlying character buffer without making
1730 * extra copies.

Callers

nothing calls this directly

Calls 5

requireMethod · 0.95
wrapMethod · 0.95
remainingMethod · 0.80
getMethod · 0.65
readMethod · 0.65

Tested by

no test coverage detected