ist.palcom.storage.pfs
Class AbstractStorage
java.lang.Object
ist.palcom.storage.pfs.AbstractStorage
- All Implemented Interfaces:
- Storage
- Direct Known Subclasses:
- ByteStorage, FileStorage
public abstract class AbstractStorage
- extends java.lang.Object
- implements Storage
AbstractStorage.java
AbstractStorage defines the minimal implementation of a palcom filesystem
ie open, close, read, write. Some implementation extends this to also more
advanced filesystem functions
|
Method Summary |
int |
available(java.lang.String file)
|
abstract int |
close(java.lang.String file)
|
int |
create(java.lang.String path)
|
int |
delete(java.lang.String path)
|
int |
dirs(java.lang.String path,
java.lang.String[] files)
|
abstract int |
open(java.lang.String file,
int mode)
|
long |
pos(java.lang.String file)
|
abstract int |
read(java.lang.String file)
|
int |
readBytes(java.lang.String file,
byte[] b,
int off,
int len)
|
int |
seek(java.lang.String file,
long pos)
|
int |
volume()
|
abstract int |
write(java.lang.String file,
int b)
|
int |
writeBytes(java.lang.String file,
byte[] b,
int off,
int len)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractStorage
public AbstractStorage()
open
public abstract int open(java.lang.String file,
int mode)
throws StorageException
- Specified by:
open in interface Storage
- Throws:
StorageException
close
public abstract int close(java.lang.String file)
throws StorageException
- Specified by:
close in interface Storage
- Throws:
StorageException
read
public abstract int read(java.lang.String file)
throws java.io.IOException
- Specified by:
read in interface Storage
- Throws:
java.io.IOException
write
public abstract int write(java.lang.String file,
int b)
throws java.io.IOException
- Specified by:
write in interface Storage
- Throws:
java.io.IOException
readBytes
public int readBytes(java.lang.String file,
byte[] b,
int off,
int len)
throws java.io.IOException
- Specified by:
readBytes in interface Storage
- Throws:
java.io.IOException
writeBytes
public int writeBytes(java.lang.String file,
byte[] b,
int off,
int len)
throws java.io.IOException
- Specified by:
writeBytes in interface Storage
- Throws:
java.io.IOException
pos
public long pos(java.lang.String file)
throws StorageException
- Specified by:
pos in interface Storage
- Throws:
StorageException
seek
public int seek(java.lang.String file,
long pos)
throws StorageException
- Specified by:
seek in interface Storage
- Throws:
StorageException
available
public int available(java.lang.String file)
throws StorageException
- Specified by:
available in interface Storage
- Throws:
StorageException
create
public int create(java.lang.String path)
throws StorageException
- Specified by:
create in interface Storage
- Throws:
StorageException
delete
public int delete(java.lang.String path)
throws StorageException
- Specified by:
delete in interface Storage
- Throws:
StorageException
dirs
public int dirs(java.lang.String path,
java.lang.String[] files)
- Specified by:
dirs in interface Storage
volume
public int volume()
- Specified by:
volume in interface Storage