public void write(String str) throws IOException {
        if (writer == null) {
            writer = nextWriter();
            archive.triggerMaintenance();
        }

        bytesWritten += str.length();
        writer.write(str, 0, str.length());

        if (bytesWritten >= maxSize) {
            log.fine("logfile '"
                             + currentFile.getAbsolutePath()
                             + "' full, rotating");
            writer = nextWriter();
            archive.triggerMaintenance();
        }
    }
This is called when we want to rotate the output file to
start writing the next file.  There are two scenarios when
we do this:
<UL>
<LI> initial case, when we have no file
<LI> when we have filled the file and want to rotate it
</UL>
logserver/src/main/java/com/yahoo/logserver/handlers/archive/LogWriter.java