Apime v1.0

com.java4ever.apime.io
Class VirtualDisk

java.lang.Object
  extended bycom.java4ever.apime.io.VirtualDisk

public class VirtualDisk
extends java.lang.Object

Disco virtual para almacenar ficheros.


Field Summary
static VirtualDisk instance
          Instancia global ('null' por defecto).
 
Method Summary
static void create()
          Crea el disco virtual y lo asigna a la variable global.
 void delete(java.lang.String file)
          Borra un fichero.
 void deleteAll()
          Borra todos los ficheros.
 java.util.Enumeration dir()
          Devuelve la lista de ficheros.
 boolean exists(java.lang.String file)
          Devuelve si existe un fichero.
 byte[] load(java.lang.String file)
          Carga un fichero.
 void save(java.lang.String file, byte[] data)
          Guarda un fichero.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static VirtualDisk instance
Instancia global ('null' por defecto).

Method Detail

create

public static void create()
                   throws java.io.IOException
Crea el disco virtual y lo asigna a la variable global.

Throws:
java.io.IOException
See Also:
instance

dir

public java.util.Enumeration dir()
Devuelve la lista de ficheros.


exists

public boolean exists(java.lang.String file)
Devuelve si existe un fichero.

Parameters:
file - Nombre del fichero

load

public byte[] load(java.lang.String file)
            throws java.io.IOException
Carga un fichero.

Parameters:
file - Nombre del fichero
Returns:
Array de bytes con los datos del fichero
Throws:
java.io.IOException

save

public void save(java.lang.String file,
                 byte[] data)
          throws java.io.IOException
Guarda un fichero.

Parameters:
file - Nombre del fichero
data - Array de bytes con los datos del fichero
Throws:
java.io.IOException

delete

public void delete(java.lang.String file)
            throws java.io.IOException
Borra un fichero.

Parameters:
file - Nombre del fichero
Throws:
java.io.IOException

deleteAll

public void deleteAll()
               throws java.io.IOException
Borra todos los ficheros.

Throws:
java.io.IOException

Apime v1.0

Copyright 2004 Java4Ever.com. All Rights Reserved.