byte[] fullData = out.toByteArray();
out.reset();
DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(fullData));
Command completeCommand = (Command)wireFormat.unmarshal(dataIn);
LastPartialCommand lastCommand = (LastPartialCommand)command;
lastCommand.configure(completeCommand);
getTransportListener().onCommand(completeCommand);
} catch (IOException e) {
LOG.warn("Failed to unmarshal partial command: " + command);
getTransportListener().onException(e);