public class HeapFileEncoder
extends java.lang.Object
| Constructor and Description |
|---|
HeapFileEncoder() |
| Modifier and Type | Method and Description |
|---|---|
static void |
convert(java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> tuples,
java.io.File outFile,
int npagebytes,
int numFields)
Convert the specified tuple list (with only integer fields) into a binary
page file.
|
static void |
convert(java.io.File inFile,
java.io.File outFile,
int npagebytes,
int numFields) |
static void |
convert(java.io.File inFile,
java.io.File outFile,
int npagebytes,
int numFields,
Type[] typeAr) |
static void |
convert(java.io.File inFile,
java.io.File outFile,
int npagebytes,
int numFields,
Type[] typeAr,
char fieldSeparator)
Convert the specified input text file into a binary
page file.
|
public static void convert(java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> tuples,
java.io.File outFile,
int npagebytes,
int numFields)
throws java.io.IOException
tuples - the tuples - a list of tuples, each represented by a list of integers that are
the field values for that tuple.outFile - The output file to write data tonpagebytes - The number of bytes per page in the output filenumFields - the number of fields in each input tuplejava.io.IOException - if the temporary/output file can't be openedHeapPage,
HeapFilepublic static void convert(java.io.File inFile,
java.io.File outFile,
int npagebytes,
int numFields)
throws java.io.IOException
java.io.IOExceptionpublic static void convert(java.io.File inFile,
java.io.File outFile,
int npagebytes,
int numFields,
Type[] typeAr)
throws java.io.IOException
java.io.IOExceptionpublic static void convert(java.io.File inFile,
java.io.File outFile,
int npagebytes,
int numFields,
Type[] typeAr,
char fieldSeparator)
throws java.io.IOException
The format of the output file will be as specified in HeapPage and HeapFile.
inFile - The input file to read data fromoutFile - The output file to write data tonpagebytes - The number of bytes per page in the output filenumFields - the number of fields in each input line/output tuplejava.io.IOException - if the input/output file can't be opened or a
malformed input line is encounteredHeapPage,
HeapFile