if (remaining(writeBuffer) >= 0) {
sendWriteBuffer(address, writeBuffer, command.getCommandId());
}
else {
// lets split the command up into chunks
byte[] data = writeBuffer.toByteArray();
boolean lastFragment = false;
for (int fragment = 0, length = data.length; !lastFragment; fragment++) {
writeBuffer = createByteArrayOutputStream();
headerMarshaller.writeHeader(command, dataOut);