|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectist.palcom.storage.pfs.AbstractStorage
ist.palcom.storage.pfs.FileStorage
public class FileStorage
| Field Summary |
|---|
| Fields inherited from interface ist.palcom.storage.pfs.Storage |
|---|
ERROR, NOP, OK, READ, READWRITE, WRITE |
| Constructor Summary | |
|---|---|
FileStorage(java.lang.String root)
Create a FileStorage |
|
| Method Summary | |
|---|---|
int |
close(java.lang.String file)
Close a FileStorage |
int |
delete(java.lang.String file)
Delete a file |
long |
length(java.lang.String file)
The lenght of the file |
int |
open(java.lang.String name,
int mode)
Open a FileStorage |
long |
pos(java.lang.String file)
Return the position of the pointer |
int |
read(java.lang.String file)
Read from the file |
int |
readBytes(java.lang.String file,
byte[] b,
int off,
int len)
Read from the FileStorage |
int |
seek(java.lang.String file,
long pos)
Seek in a StorageAccessStream |
int |
write(java.lang.String file,
int b)
Write a byte to a file |
int |
writeBytes(java.lang.String file,
byte[] b,
int off,
int len)
Write a byte array |
| Methods inherited from class ist.palcom.storage.pfs.AbstractStorage |
|---|
available, create, dirs, volume |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileStorage(java.lang.String root)
root - the name of the root
StorageException| Method Detail |
|---|
public int open(java.lang.String name,
int mode)
open in interface Storageopen in class AbstractStoragename - the filenamemode - true == writeover false == append
StorageExceptionpublic int close(java.lang.String file)
close in interface Storageclose in class AbstractStorageStorageExceptionpublic long pos(java.lang.String file)
pos in interface Storagepos in class AbstractStorageStorageException
public int seek(java.lang.String file,
long pos)
seek in interface Storageseek in class AbstractStoragepos - the position to seek
StorageExceptionpublic int read(java.lang.String file)
read in interface Storageread in class AbstractStoragefile - the name of the file
StorageException
public int write(java.lang.String file,
int b)
write in interface Storagewrite in class AbstractStoragefile - the name of the fileb - the Byte
StorageException
public int readBytes(java.lang.String file,
byte[] b,
int off,
int len)
readBytes in interface StoragereadBytes in class AbstractStoragefile - the name of the fileb - the byte array to storeoff - the offsetlen - the length of the byte array
StorageException
public int writeBytes(java.lang.String file,
byte[] b,
int off,
int len)
writeBytes in interface StoragewriteBytes in class AbstractStoragefile - the name of the fileb - the byte arrayoff - offset in the streamlen - lenght of the stream
StorageExceptionpublic long length(java.lang.String file)
file - the name of the file
StorageExceptionpublic int delete(java.lang.String file)
delete in interface Storagedelete in class AbstractStoragefile - the name of the file
StorageException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||