}
}
public synchronized byte[] getEncodedXidBytes() {
if (encodedXidBytes == null) {
outputStream = new DataByteArrayOutputStream(XID_PREFIX_SIZE + globalTransactionId.length + branchQualifier.length);
outputStream.position(10);
outputStream.writeInt(formatId);
// global length
outputStream.writeShort(globalTransactionId.length);
try {