// If there are no outstanding packets and the last packet
// was not the last one in the current block, then create a
// packet with empty payload.
synchronized (dataQueue) {
if (currentPacket == null && bytesCurBlock != 0) {
WritePacketClientProfile pktProfile = null;
if (getProfileData() != null) {
pktProfile = getProfileData().getWritePacketClientProfile();
}
currentPacket = DFSOutputStreamPacketFactory.getPacket(
DFSOutputStream.this, ifPacketIncludeVersion(),