protected void closeStream(Stream stream) {
if (stream.isClosed())
return;
StreamSession session = stream.getSession();
StreamClose closeDescription = new StreamClose(
stream instanceof InputStream, stream.streamID());
if (sender != null)
sender.sendPacket(session.getTransferDescription(),
StreamMetaPacketData.CLOSE.serializeInto(closeDescription),