|
|||||||||
| 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.ByteStorage
public class ByteStorage
ByteStorage.java ByteStorage is a very simple filesystem that is implemented on a byte array
| Field Summary |
|---|
| Fields inherited from interface ist.palcom.storage.pfs.Storage |
|---|
ERROR, NOP, OK, READ, READWRITE, WRITE |
| Constructor Summary | |
|---|---|
ByteStorage(java.lang.String root)
Create a ByteStorage |
|
| Method Summary | |
|---|---|
int |
close(java.lang.String filen)
Close a ByteStorage |
int |
create(java.lang.String filen)
Open a ByteStorage |
int |
fd(java.lang.String filen)
|
int |
open(java.lang.String filen,
int mode)
Open a ByteStorage |
long |
pos(java.lang.String file)
Return the position of the pointer |
void |
print()
|
int |
read(java.lang.String filen)
Read from the file |
int |
readBytes(java.lang.String file,
byte[] b,
int off,
int len)
Read from the file |
int |
seek(java.lang.String file,
long pos)
Seek in a ByteStorage |
int |
write(java.lang.String filen,
int b)
Write a byte to a file |
int |
writeBytes(java.lang.String file,
byte[] data,
int off,
int len)
Write a byte array to the file |
| Methods inherited from class ist.palcom.storage.pfs.AbstractStorage |
|---|
available, delete, dirs, volume |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteStorage(java.lang.String root)
root - the name of the root
StorageException| Method Detail |
|---|
public int create(java.lang.String filen)
create in interface Storagecreate in class AbstractStoragefilen - the filename
StorageException
public int open(java.lang.String filen,
int mode)
open in interface Storageopen in class AbstractStoragefilen - name the filenamemode - true == writeover false == append
StorageExceptionpublic int close(java.lang.String filen)
close in interface Storageclose in class AbstractStorageStorageExceptionpublic int fd(java.lang.String filen)
public int seek(java.lang.String file,
long pos)
seek in interface Storageseek in class AbstractStoragepos - the position to seek
StorageExceptionpublic long pos(java.lang.String file)
pos in interface Storagepos in class AbstractStorageStorageExceptionpublic int read(java.lang.String filen)
read in interface Storageread in class AbstractStoragefilen - the name of the file
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 write(java.lang.String filen,
int b)
write in interface Storagewrite in class AbstractStoragefilen - the name of the fileb - the Byte
StorageException
public int writeBytes(java.lang.String file,
byte[] data,
int off,
int len)
writeBytes in interface StoragewriteBytes in class AbstractStoragefile - the name of the filedata - the byte arrayoff - offset in the streamlen - lenght of the stream
StorageExceptionpublic void print()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||