MCPcopy Index your code
hub / github.com/beanshell/beanshell / read

Method read

src/bsh/CommandLineReader.java:52–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 int state = lastCharNL;
51
52 public int read() throws IOException {
53 int b;
54
55 if ( state == sentSemi ) {
56 state = lastCharNL;
57 return '\n';
58 }
59
60 // skip CR
61 while ( (b = in.read()) == '\r' );
62
63 if ( b == '\n' )
64 if ( state == lastCharNL ) {
65 b = ';';
66 state = sentSemi;
67 } else
68 state = lastCharNL;
69 else
70 state = normal;
71
72 return b;
73 }
74
75 /**
76 This is a degenerate implementation.

Callers 3

mainMethod · 0.95
convertToStringMethod · 0.45
FillBuffMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected