Request req = createRequest();
// Prepare the request:
req.setMethod("REGISTER-FRAME");
req.setContentType(admin.conftype);
ResourceDescription dframe = new EmptyDescription(classname, id);
ByteArrayOutputStream bout = new ByteArrayOutputStream();
OutputStream out;
if (debug) {
out = bout;
} else {
out = new GZIPOutputStream(bout);
}
admin.writer.writeResourceDescription(dframe, out);
byte bits[] = bout.toByteArray();
req.setContentLength(bits.length);
if (!debug) {
req.addTransferEncoding("gzip");
}
req.setOutputStream(new ByteArrayInputStream(bits));
// Run it:
Reply rep = admin.runRequest(req);
dframe =
admin.reader.readResourceDescription(getInputStream(rep));
id = dframe.getIdentifier();
URL url = null;
if (isFrame()) {
url = new URL(this.url, this.url.getFile()+"?" + id);
} else {
url = new URL(parent.toString() +