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