public interface FileService extends Remote
FileAgent
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the current file.
|
byte[] |
read()
This method is responsible for reading a file.
|
byte[] |
readBytes(int count)
This method is responsible for writing to a file.
|
void |
write(byte[] buffer)
This method is responsible for writing to a file.
|
void |
writeBytes(byte[] buffer,
int begin,
int end)
This method is responsible for writing to a file.
|
byte[] read() throws RemoteException, FileServiceException
RemoteException
- A communications error occurredFileServiceException
- Error opening the filebyte[] readBytes(int count) throws RemoteException, FileServiceException
count
- no. of bytes to readRemoteException
- A communications error occurredFileServiceException
- Error opening the file *void write(byte[] buffer) throws RemoteException, FileServiceException
buffer
- to writeRemoteException
- A communications error occurredFileServiceException
- Error opening the filevoid writeBytes(byte[] buffer, int begin, int end) throws RemoteException, FileServiceException
buffer
- to writebegin
- staring indexend
- ending indexRemoteException
- A communications error occurredFileServiceException
- Error opening the filevoid close() throws RemoteException
RemoteException
- A communications error occurred.