ereinion.io
Class FileTree

java.lang.Object
  |
  +--ereinion.io.FileTree

public class FileTree
extends java.lang.Object

Classe per la gestione di un Tree di file e directory. Vengono fornite anche funzioni di serializzazione.

Since:
EPR 1.0
Version:
1.1, 25/11/2002
Author:
Ereinion

Constructor Summary
FileTree()
           
 
Method Summary
static NTree buildFileTree(java.io.File sourcePath)
          Funzione che crea un FileTree a partire da un File radice.
static NTree fromBytes(byte[] treeData)
          Funzione che riconverte un array di byte in un NTree rappresentante un Tree di directory.
static byte[] toBytes(NTree root)
          Funzione che converte un FileTree in un array di byte.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTree

public FileTree()
Method Detail

fromBytes

public static NTree fromBytes(byte[] treeData)
Funzione che riconverte un array di byte in un NTree rappresentante un Tree di directory.

Parameters:
treeData - i dati del FileTree.
Returns:
il nodo radice del FileTree.

toBytes

public static byte[] toBytes(NTree root)
Funzione che converte un FileTree in un array di byte.

Parameters:
root - la radice del FileTree da convertire.
Returns:
i dati del FileTree.

buildFileTree

public static NTree buildFileTree(java.io.File sourcePath)
Funzione che crea un FileTree a partire da un File radice.

Parameters:
sourcePath - il file radice
Returns:
il nodo radice del FileTree.