in src/main/java/com/alibaba/com/caucho/hessian/io/HessianDebugState.java [2011:2055]
State next(int ch) {
switch (_state) {
case MAJOR:
if (ch == 't' || ch == 'S')
return new RemoteState(this).next(ch);
_major = ch;
_state = MINOR;
return this;
case MINOR:
_minor = ch;
_state = HEADER;
println(-2, "reply " + _major + "." + _minor);
return this;
case HEADER:
if (ch == 'H') {
_state = VALUE;
return new StringState(this, 'H', true);
} else if (ch == 'f') {
print("fault ");
_isObject = false;
_state = END;
return new MapState(this, 0);
} else {
_state = END;
return nextObject(ch);
}
case VALUE:
_state = HEADER;
return nextObject(ch);
case END:
println();
if (ch == 'Z') {
return _next;
} else
return _next.next(ch);
default:
throw new IllegalStateException();
}
}