MCPcopy Create free account
hub / github.com/ReadyTalk/avian / read

Method read

classpath/java/io/PushbackReader.java:30–50  ·  view source on GitHub ↗
(char[] b, int offset, int length)

Source from the content-addressed store, hash-verified

28 }
29
30 public int read(char[] b, int offset, int length) throws IOException {
31 int count = 0;
32 if (hasSavedChar && length > 0) {
33 length--;
34 b[offset++] = savedChar;
35 hasSavedChar = false;
36 count = 1;
37 }
38 if (length > 0) {
39 int c = in.read(b, offset, length);
40 if (c == -1) {
41 if (count == 0) {
42 count = -1;
43 }
44 } else {
45 count += c;
46 }
47 }
48
49 return count;
50 }
51
52 public void unread(char[] b, int offset, int length) throws IOException {
53 if (length != 1) {

Callers

nothing calls this directly

Calls 1

readMethod · 0.65

Tested by

no test coverage detected