T
- public class FileNode<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
Boundary |
b
Boundaries of the data.
|
int |
current_file_part_load
The current part of the file loaded.
|
int |
dimension
Dimensionality of the data in its spatial extent.
|
java.lang.String |
filename
The full file-name.
|
int |
left_child
Left child of the file-octree structure.
|
static int |
MAX_ARRAY_SIZE
The maximum size that can fit into main memory.
|
int[] |
offset |
int |
partition_count
Number of partitions required to read the file.
|
int |
right_child
Right child of the file-octree structure.
|
Constructor and Description |
---|
FileNode(java.lang.String filename,
int level,
int index,
Boundary b,
java.lang.Class<T> type)
A file-node is initialized with a relative but complete path name.
|
Modifier and Type | Method and Description |
---|---|
void |
closeLoadFile()
Closes the current file load.
|
void |
closeWriteFile()
Closes the currently opened file, which was used for
a file write.
|
void |
createFile()
Method to create an empty file with the specified filename.
|
int |
get_number_of_values() |
T[] |
getSingleFile()
Reads a single file.
|
void |
initFileLoad()
Initializes a file load.
|
void |
initFileWrite(int[] data_size)
Initializes a file-write.
|
T[] |
loadNextFilePart()
Loads an array of data of type T from the currently opened file.
|
static void |
setReadBufferSize(int in) |
void |
setSingleFile(T[] data)
Sets a leaf node to the data input array.
|
void |
writeNextFilePart(short data)
Writes a single element to the currently opened file.
|
void |
writeNextFilePart(short[] data,
int size)
Writes a data block to the opened file.
|
public static final int MAX_ARRAY_SIZE
public java.lang.String filename
public Boundary b
public int left_child
public int right_child
public int dimension
public int partition_count
public int current_file_part_load
public int[] offset
public FileNode(java.lang.String filename, int level, int index, Boundary b, java.lang.Class<T> type)
filename
- level
- index
- b
- type
- public static void setReadBufferSize(int in)
public void createFile()
public void initFileWrite(int[] data_size)
data_size
- public void writeNextFilePart(short[] data, int size)
data
- size
- public void writeNextFilePart(short data)
data
- public void closeWriteFile()
public void initFileLoad()
public T[] loadNextFilePart()
public void closeLoadFile()
public T[] getSingleFile()
public void setSingleFile(T[] data)
data
- public int get_number_of_values()