Returns true once limit - pos >= minimum. If the data is exhausted before that many characters are available, this returns false.
(int minimum)
| 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)) { |
no outgoing calls
no test coverage detected