byte b;
while (true) {
if (in.remaining() > 0) {
b = in.get();
if (b == (byte)0) {
Command command = Command.parse(session, sCommand);
command.exec();
System.out.println("doDecode command = "+command);
if (!(command instanceof CommandContinuation)) {
out.write(command);