I don't recall seeing this used anywhere.  Maybe just get rid of it and force the contract to be "if you want to serialize bytes, use writeVarBinary(or perhaps rename it to writeBytes?) and handle the encoding of strings yourself?"