src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java
/**
     * Rotates any existing files and use the newly created first one
     * for writing.
     * @throws IOException
     */
Rotates any existing files and use the newly created first one
for writing.
Rotates any existing files and use the newly created first one for writing .
private void rotateFiles()
        throws IOException
    {
        if(outputStream != null)
        {
            outputStream.flush();
            outputStream.close();
        }
        for (int i = getConfiguration().getLogfileCount() - 2; i >= 0; i--)
        {
            File f1 = files[i];
            File f2 = files[i+1];
            if (f1.exists())
            {
                if (f2.exists())
                    f2.delete();
                f1.renameTo(f2);
            }
        }
        outputStream = new FileOutputStream(files[0]);
        written = 0;
        createGlobalHeader();
    }
private void rotateFiles ( ) throws IOException { if ( outputStream != null ) { outputStream . flush ( ) ; outputStream . close ( ) ; } for ( int i = getConfiguration ( ) . getLogfileCount ( ) - 2 ; i >= 0 ; i -- ) { File f1 = files [ i ] ; File f2 = files [ i + 1 ] ; if ( f1 . exists ( ) ) { if ( f2 . exists ( ) ) f2 . delete ( ) ; f1 . renameTo ( f2 ) ; } } outputStream = new FileOutputStream ( files [ 0 ] ) ; written = 0 ; createGlobalHeader ( ) ; }
Rotates any existing files and use the newly created first one
 for writing.
Rotates any existing files and use the newly created first one for writing .