if (this.streamChecked == null) {
this.nio = inputStream.getClass().getName().endsWith("TcpNioConnection$ChannelInputStream");
this.streamAccessor = new DirectFieldAccessor(inputStream);
this.streamChecked = Boolean.TRUE;
}
DataFrame frame = null;
BasicState state = this.getState(inputStream);
if (state != null) {
frame = state.getPendingFrame();
}
while (frame == null || (frame.getPayload() == null && frame.getBinary() == null)) {
frame = doDeserialize(inputStream, frame);
if (frame.getPayload() == null && frame.getBinary() == null) {
state.setPendingFrame(frame);
}
}
return frame;
}