private boolean letUsersSendClassfile(OutputStream out,
                                          String filename, int length)
        throws IOException, BadHttpRequest
    {
        if (classPool == null)
            return false;

        byte[] classfile;
        String classname
            = filename.substring(0, length - 6).replace('/', '.');
        try {
            if (translator != null)
                translator.onLoad(classPool, classname);

            CtClass c = classPool.get(classname);
            classfile = c.toBytecode();
            if (debugDir != null)
                c.writeFile(debugDir);
        }
        catch (Exception e) {
            throw new BadHttpRequest(e);
        }

        sendHeader(out, classfile.length, typeClass);
        out.write(classfile);
        return true;
    }