MCPcopy Create free account
hub / github.com/Ayush7614/Daily-Coding-DS-ALGO-Practice / readByte

Method readByte

Hackerank/Java/Strong-password.java:69–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 public int lenbuf = 0, ptrbuf = 0;
68
69 private int readByte()
70 {
71 if(lenbuf == -1)throw new InputMismatchException();
72 if(ptrbuf >= lenbuf){
73 ptrbuf = 0;
74 try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
75 if(lenbuf <= 0)return -1;
76 }
77 return inbuf[ptrbuf++];
78 }
79
80 private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
81 private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }

Callers 4

skipMethod · 0.95
nsMethod · 0.95
niMethod · 0.95
nlMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected