// Get a reference to the current broadcast stream.
ClientBroadcastStream stream = (ClientBroadcastStream) ScopeApplicationAdapter.getInstance()
.getBroadcastStream(conn.getScope(), Long.valueOf(broadcastid).toString());
try {
// Save the stream to disk.
stream.saveAs(streamName, false);
} catch (Exception e) {
log.error("Error while saving stream: " + streamName, e);
}
}