Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.archive.io
Class GenerationFileHandler

    java.lang.Object
      java.util.logging.Handler
          java.util.logging.StreamHandler
              java.util.logging.FileHandler
                  org.archive.io.GenerationFileHandler

    public class GenerationFileHandler

extends java.util.logging.FileHandler

FileHandler with support for rotating the current file to an archival name with a specified integer suffix, and provision of a new replacement FileHandler with the current filename.

Author:
  gojomo

Constructor Summary
`GenerationFileHandler(java.util.LinkedList<java.lang.String> filenameSeries, boolean shouldManifest)`
`GenerationFileHandler(java.lang.String pattern, boolean append, boolean shouldManifest)` Constructor.

Method Summary
`java.util.List` | `getFilenameSeries()`
`GenerationFileHandler` | `rotate(java.lang.String storeSuffix, java.lang.String activeSuffix)` Move the current file to a new filename with the storeSuffix in place of the activeSuffix; continuing logging to a new file under the original filename.
`boolean` | `shouldManifest()`

Methods inherited from class java.util.logging.FileHandler
`close, publish`

Methods inherited from class java.util.logging.StreamHandler
`flush, isLoggable, setEncoding, setOutputStream`

Methods inherited from class java.util.logging.Handler
`getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setErrorManager, setFilter, setFormatter, setLevel`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GenerationFileHandler

    public GenerationFileHandler(java.lang.String pattern,
                                 boolean append,
                                 boolean shouldManifest)
                          throws java.io.IOException,
                                 java.lang.SecurityException

  Constructor.

  Parameters:
    `pattern` -
    `append` -
    `shouldManifest` -
  Throws:
    `java.io.IOException`
    `java.lang.SecurityException`

### GenerationFileHandler

    public GenerationFileHandler(java.util.LinkedList<java.lang.String> filenameSeries,
                                 boolean shouldManifest)
                          throws java.io.IOException

Parameters:
  `filenameSeries` -
  `shouldManifest` -
Throws:
  `java.io.IOException`

Method Detail

### getFilenameSeries

    public java.util.List getFilenameSeries()

  Returns:
    Returns the filenameSeries.

### rotate

    public GenerationFileHandler rotate(java.lang.String storeSuffix,
                                        java.lang.String activeSuffix)
                                 throws java.io.IOException

  Move the current file to a new filename with the storeSuffix in place of the activeSuffix; continuing logging to a new file under the original filename.

  Parameters:
    `storeSuffix` - Suffix to put in place of `activeSuffix`
    `activeSuffix` - Suffix to replace with `storeSuffix`.
  Returns:
    GenerationFileHandler instance.
  Throws:
    `java.io.IOException`

### shouldManifest

    public boolean shouldManifest()

  Returns:
    True if should manifest.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Internet Archive. All Rights Reserved.