MCPcopy Index your code
hub / github.com/google/gson / fillBuffer

Method fillBuffer

src/main/java/com/google/gson/stream/JsonReader.java:817–834  ·  view source on GitHub ↗

Returns true once limit - pos >= minimum. If the data is exhausted before that many characters are available, this returns false.

(int minimum)

Source from the content-addressed store, hash-verified

815 * false.
816 */
817 private boolean fillBuffer(int minimum) throws IOException {
818 if (limit != pos) {
819 limit -= pos;
820 System.arraycopy(buffer, pos, buffer, 0, limit);
821 } else {
822 limit = 0;
823 }
824
825 pos = 0;
826 int total;
827 while ((total = in.read(buffer, limit, buffer.length - limit)) != -1) {
828 limit += total;
829 if (limit >= minimum) {
830 return true;
831 }
832 }
833 return false;
834 }
835
836 private int nextNonWhitespace() throws IOException {
837 while (pos < limit || fillBuffer(1)) {

Callers 8

objectValueMethod · 0.95
nextNonWhitespaceMethod · 0.95
skipToEndOfLineMethod · 0.95
skipToMethod · 0.95
nextStringMethod · 0.95
nextLiteralMethod · 0.95
readEscapeCharacterMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected