t.uuid = decodeFlashUUID(length);
if (swdIn != null)
{
InputStream in = swdIn;
DebugTable swd = new DebugTable();
new DebugDecoder(in).readSwd(swd);
if (!t.uuid.equals(swd.uuid))
{
handler.error("SWD uuid "+swd.uuid+" doesn't match "+t.uuid);
}
else if (swd.version != getSwfVersion())
{
handler.error("SWD version number "+swd.version+" doesn't match SWF version number "+getSwfVersion());
}
else
{
this.swd = swd;
}
}
else if (swfUrl != null)
{
// look for a SWD file in the same place the player would look
String path = swfUrl.toString();
int q = path.indexOf("?");
String query = null;
if (q != -1)
{
query = path.substring(q);
path = path.substring(0, q);
}
URL swdUrl;
if (path.endsWith(".swf"))
{
path = path.substring(0,path.length()-4)+".swd";
}
else
{
path = path + ".swd";
}
if (query != null)
{
path = path + query;
}
swdUrl = new URL(path);
try
{
InputStream in = swdUrl.openStream();
DebugTable swd = new DebugTable();
new DebugDecoder(in).readSwd(swd);
if (!t.uuid.equals(swd.uuid))
{
handler.error("SWD uuid "+swd.uuid+" doesn't match "+t.uuid);