org.oreodata
Class DataUtil
java.lang.Object
|
+--org.oreodata.DataUtil
- public abstract class DataUtil
- extends java.lang.Object
a holder for various useful static routines dealing
with Oreo data
- Author:
- Jonathan Revusky
Method Summary |
static void |
copyFieldsByName(Record source,
Record dest)
convenience routine for transitioning records. |
static int |
getEmbeddedNumber(java.lang.String filename,
java.lang.String baseName)
|
static java.lang.String[] |
getNumberedArchiveFiles(java.io.File directory,
java.lang.String baseName)
utility routine that returns all the files in
directory that follow the naming pattern:
baseName.12 or baseName.12.gz, sorted by index number. |
static void |
rotateNumberedArchives(java.io.File baseFile,
boolean gzip)
|
static void |
sortFiles(java.lang.String[] filenames,
java.lang.String baseName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataUtil
public DataUtil()
copyFieldsByName
public static void copyFieldsByName(Record source,
Record dest)
- convenience routine for transitioning records.
Copies all the fields in source to dest,
where dest has a field of the same name.
getNumberedArchiveFiles
public static java.lang.String[] getNumberedArchiveFiles(java.io.File directory,
java.lang.String baseName)
- utility routine that returns all the files in
directory that follow the naming pattern:
baseName.12 or baseName.12.gz, sorted by index number.
sortFiles
public static void sortFiles(java.lang.String[] filenames,
java.lang.String baseName)
rotateNumberedArchives
public static void rotateNumberedArchives(java.io.File baseFile,
boolean gzip)
throws java.io.IOException
java.io.IOException
getEmbeddedNumber
public static int getEmbeddedNumber(java.lang.String filename,
java.lang.String baseName)